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
be3f8647042978a837a891eba069e2a7e1afb8bb
305
py
Python
saveLoadCtrls/main.py
Saij84/mayaTools
c5f3c81a57f3882074eeee7f6e5c7f1fe5dbc7b0
[ "MIT" ]
null
null
null
saveLoadCtrls/main.py
Saij84/mayaTools
c5f3c81a57f3882074eeee7f6e5c7f1fe5dbc7b0
[ "MIT" ]
null
null
null
saveLoadCtrls/main.py
Saij84/mayaTools
c5f3c81a57f3882074eeee7f6e5c7f1fe5dbc7b0
[ "MIT" ]
null
null
null
import mayaTools.saveLoadCtrls.ui.saveLoadCtrl_UI as mainUI if __name__ == '__main__': global open_import_dialog try: open_import_dialog.close() open_import_dialog.deleteLater() except: pass open_import_dialog = mainUI.MainDialog() open_import_dialog.show()
21.785714
59
0.708197
35
305
5.628571
0.571429
0.253807
0.406091
0
0
0
0
0
0
0
0
0
0.216393
305
13
60
23.461538
0.824268
0
0
0
0
0
0.02623
0
0
0
0
0
0
1
0
false
0.1
0.6
0
0.6
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
5
be4a22594b1d946f852e0efd33d311c5b644d133
663
py
Python
spec/construct/test_params_pass_array_int.py
DarkShadow44/kaitai_struct_tests
4bb13cef82965cca66dda2eb2b77cd64e9f70a12
[ "MIT" ]
11
2018-04-01T03:58:15.000Z
2021-08-14T09:04:55.000Z
spec/construct/test_params_pass_array_int.py
DarkShadow44/kaitai_struct_tests
4bb13cef82965cca66dda2eb2b77cd64e9f70a12
[ "MIT" ]
73
2016-07-20T10:27:15.000Z
2020-12-17T18:56:46.000Z
spec/construct/test_params_pass_array_int.py
DarkShadow44/kaitai_struct_tests
4bb13cef82965cca66dda2eb2b77cd64e9f70a12
[ "MIT" ]
37
2016-08-15T08:25:56.000Z
2021-08-28T14:48:46.000Z
# Autogenerated from KST: please remove this line if doing any edits by hand! import unittest from params_pass_array_int import _schema class TestParamsPassArrayInt(unittest.TestCase): def test_params_pass_array_int(self): r = _schema.parse_file('src/position_to_end.bin') self.assertEqual(len(r.pass_ints.nums), 3) self.assertEqual(r.pass_ints.nums[0], 513) self.assertEqual(r.pass_ints.nums[1], 1027) self.assertEqual(r.pass_ints.nums[2], 1541) self.assertEqual(len(r.pass_ints_calc.nums), 2) self.assertEqual(r.pass_ints_calc.nums[0], 27643) self.assertEqual(r.pass_ints_calc.nums[1], 7)
36.833333
77
0.717949
101
663
4.49505
0.475248
0.231278
0.138767
0.220264
0.462555
0.444934
0.140969
0
0
0
0
0.043636
0.170437
663
17
78
39
0.781818
0.113122
0
0
1
0
0.039249
0.039249
0
0
0
0
0.583333
1
0.083333
false
0.833333
0.166667
0
0.333333
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
1
0
0
0
1
0
0
0
0
0
5
beb27c8360efeff2165c31c9a64d9e0639b252b1
50
py
Python
appiumbase/__init__.py
Pawan7593/AppiumBase
6e767619702d1be0404a89492544323df7dc540a
[ "MIT" ]
null
null
null
appiumbase/__init__.py
Pawan7593/AppiumBase
6e767619702d1be0404a89492544323df7dc540a
[ "MIT" ]
null
null
null
appiumbase/__init__.py
Pawan7593/AppiumBase
6e767619702d1be0404a89492544323df7dc540a
[ "MIT" ]
1
2021-12-20T04:31:26.000Z
2021-12-20T04:31:26.000Z
from appiumbase.fixtures.base_case import BaseCase
50
50
0.9
7
50
6.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.06
50
1
50
50
0.93617
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
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
5
fe211e08655a582dd4e570e46ed6d7c5c1ace522
131
py
Python
component/elasticsearch/__init__.py
xin053/PocCollect
e13e137901bc91ae44465a1c9d88a9961dbab6bf
[ "MIT" ]
340
2016-06-21T08:05:57.000Z
2022-03-13T02:23:34.000Z
component/elasticsearch/__init__.py
xin053/PocCollect
e13e137901bc91ae44465a1c9d88a9961dbab6bf
[ "MIT" ]
1
2016-08-30T07:15:30.000Z
2016-08-30T07:15:30.000Z
component/elasticsearch/__init__.py
xin053/PocCollect
e13e137901bc91ae44465a1c9d88a9961dbab6bf
[ "MIT" ]
195
2016-06-21T08:06:00.000Z
2022-03-25T00:39:32.000Z
KEYWORDS = ['elasticsearch', ] def rules(head='',context='',ip='',port='',productname={},keywords='',hackinfo=''): return False
43.666667
83
0.641221
13
131
6.461538
0.923077
0
0
0
0
0
0
0
0
0
0
0
0.083969
131
3
84
43.666667
0.7
0
0
0
0
0
0.098485
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
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
0
0
0
1
1
0
0
5
fe2707285d0ca7a722ced5b3d1bc4f6b4e29dd4c
52
py
Python
modules/qgr/__init__.py
Merricx/blasto
df1f514a31ea54fb439d08d025bb39a2e0371b15
[ "MIT" ]
7
2017-07-01T18:19:54.000Z
2020-12-05T16:48:45.000Z
modules/qgr/__init__.py
Merricx/blasto
df1f514a31ea54fb439d08d025bb39a2e0371b15
[ "MIT" ]
1
2021-08-18T15:02:36.000Z
2022-03-01T09:46:58.000Z
modules/qgr/__init__.py
Merricx/blasto
df1f514a31ea54fb439d08d025bb39a2e0371b15
[ "MIT" ]
1
2020-12-05T16:43:25.000Z
2020-12-05T16:43:25.000Z
#!/usr/bin/env python import en import de import es
10.4
21
0.75
10
52
3.9
0.8
0
0
0
0
0
0
0
0
0
0
0
0.153846
52
5
22
10.4
0.886364
0.384615
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
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
0
1
0
1
0
1
0
0
5
fe3f7ccb465084879f2a66ccd23ed393eb745a71
143
py
Python
sakarya_stream_project/consume2.py
muhammeedsari/twitter-api-middleman
8b3790979694af9ee9ec5a47c76d05e7e3690e96
[ "MIT" ]
null
null
null
sakarya_stream_project/consume2.py
muhammeedsari/twitter-api-middleman
8b3790979694af9ee9ec5a47c76d05e7e3690e96
[ "MIT" ]
null
null
null
sakarya_stream_project/consume2.py
muhammeedsari/twitter-api-middleman
8b3790979694af9ee9ec5a47c76d05e7e3690e96
[ "MIT" ]
null
null
null
from controller.consumerController.consumerController import ConsumerController consumer = ConsumerController() consumer.consume_tweets_agg()
28.6
79
0.881119
12
143
10.333333
0.666667
0.419355
0
0
0
0
0
0
0
0
0
0
0.062937
143
5
80
28.6
0.925373
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
1
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
0
0
1
0
0
0
0
5
fe5c562f987595138233e792ee94d805960b4b21
491
py
Python
malib/policies/__init__.py
alvaro-serra/malib
fe2b0736974c2a3ed9e41121b6cf475a3ee0b5a0
[ "MIT" ]
23
2020-07-05T11:13:00.000Z
2022-01-28T00:24:41.000Z
malib/policies/__init__.py
Taospirit/malib
fe2b0736974c2a3ed9e41121b6cf475a3ee0b5a0
[ "MIT" ]
2
2020-09-07T19:09:40.000Z
2021-06-02T02:21:51.000Z
malib/policies/__init__.py
Taospirit/malib
fe2b0736974c2a3ed9e41121b6cf475a3ee0b5a0
[ "MIT" ]
8
2020-07-06T07:24:37.000Z
2021-09-27T20:28:25.000Z
from malib.policies.gaussian_policy import GaussianMLPPolicy from malib.policies.uniform_policy import UniformPolicy from malib.policies.deterministic_policy import DeterministicMLPPolicy from malib.policies.discrete_qf_policy import DiscreteQfDerivedPolicy from malib.policies.level_k_policy import LevelKPolicy from malib.policies.relaxed_softmax_policy import RelaxedSoftmaxMLPPolicy # __all__ = ['GaussianMLPPolicy', 'UniformPolicy', 'DeterministicMLPPolicy', 'DiscreteQfDerivedPolicy']
61.375
103
0.881874
50
491
8.4
0.42
0.128571
0.242857
0
0
0
0
0
0
0
0
0
0.063136
491
8
103
61.375
0.913043
0.205703
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
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
5
fe6b2854ff50ced8d03e9d3233f99829148a0361
271
py
Python
retriever/lib/models.py
piyushchauhan/retriever
c5197332603c8236ab3543eb0150ef0130240414
[ "MIT" ]
null
null
null
retriever/lib/models.py
piyushchauhan/retriever
c5197332603c8236ab3543eb0150ef0130240414
[ "MIT" ]
1
2019-02-23T14:11:34.000Z
2019-02-28T21:18:51.000Z
retriever/lib/models.py
piyushchauhan/retriever
c5197332603c8236ab3543eb0150ef0130240414
[ "MIT" ]
1
2020-01-06T11:37:54.000Z
2020-01-06T11:37:54.000Z
"""Data Retriever Data Model This module contains basic class definitions for the Retriever platform. """ from retriever.lib.cleanup import * from retriever.lib.engine import * from retriever.lib.table import * from retriever.lib.table import TabularDataset as Table
24.636364
72
0.797048
37
271
5.837838
0.540541
0.240741
0.296296
0.305556
0.277778
0.277778
0
0
0
0
0
0
0.136531
271
10
73
27.1
0.923077
0.365314
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
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
fe6c0268838b8dcb97b97ca729cffc3cf72e5a77
1,247
py
Python
cloudevents/http/event_type.py
timofurrer/sdk-python
390f5944c041d02979ecc403fb17fd49f4465b7a
[ "Apache-2.0" ]
null
null
null
cloudevents/http/event_type.py
timofurrer/sdk-python
390f5944c041d02979ecc403fb17fd49f4465b7a
[ "Apache-2.0" ]
null
null
null
cloudevents/http/event_type.py
timofurrer/sdk-python
390f5944c041d02979ecc403fb17fd49f4465b7a
[ "Apache-2.0" ]
null
null
null
import typing from cloudevents.sdk.converters import binary, structured def is_binary(headers: typing.Dict[str, str]) -> bool: """Uses internal marshallers to determine whether this event is binary :param headers: the HTTP headers :type headers: typing.Dict[str, str] :returns bool: returns a bool indicating whether the headers indicate a binary event type """ headers = {key.lower(): value for key, value in headers.items()} content_type = headers.get("content-type", "") binary_parser = binary.BinaryHTTPCloudEventConverter() return binary_parser.can_read(content_type=content_type, headers=headers) def is_structured(headers: typing.Dict[str, str]) -> bool: """Uses internal marshallers to determine whether this event is structured :param headers: the HTTP headers :type headers: typing.Dict[str, str] :returns bool: returns a bool indicating whether the headers indicate a structured event type """ headers = {key.lower(): value for key, value in headers.items()} content_type = headers.get("content-type", "") structured_parser = structured.JSONHTTPCloudEventConverter() return structured_parser.can_read( content_type=content_type, headers=headers )
41.566667
97
0.732959
159
1,247
5.660377
0.27673
0.097778
0.075556
0.088889
0.724444
0.724444
0.724444
0.724444
0.724444
0.615556
0
0
0.173216
1,247
29
98
43
0.872939
0.371291
0
0.285714
0
0
0.032476
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0
0.428571
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
fe76fc349aade7e81ee7fd7217a785380fe90f55
176
py
Python
training/rootnav2/__init__.py
robail-yasrab/6-RootNav-2.0
3e973c0f7fc34b3938a2294e858d1a0de76e9f0f
[ "BSD-3-Clause" ]
23
2019-07-25T10:15:20.000Z
2022-01-26T03:28:56.000Z
training/rootnav2/__init__.py
rootnav2/RootNav-2.0
3e973c0f7fc34b3938a2294e858d1a0de76e9f0f
[ "BSD-3-Clause" ]
7
2019-08-07T15:56:26.000Z
2022-01-13T01:28:22.000Z
training/rootnav2/__init__.py
rootnav2/RootNav-2.0
3e973c0f7fc34b3938a2294e858d1a0de76e9f0f
[ "BSD-3-Clause" ]
11
2019-07-25T10:15:25.000Z
2022-02-15T09:14:49.000Z
import torchvision.models as models from rootnav2.hourglass import * from rootnav2.utils import convert_state_dict from rootnav2.accuracy import nonmaximalsuppression, rrtree
29.333333
59
0.863636
22
176
6.818182
0.636364
0.24
0
0
0
0
0
0
0
0
0
0.018987
0.102273
176
5
60
35.2
0.93038
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
fe8fa5460779af2cfaed6e7101fcd60ceac4afca
924
py
Python
seija/reusables/send_large_message.py
kevlu8/Seija
3fc4cfe3b265232f7ae6315eae2214fa363336c0
[ "MIT" ]
16
2019-02-12T17:16:03.000Z
2021-07-16T05:36:06.000Z
seija/reusables/send_large_message.py
kevlu8/Seija
3fc4cfe3b265232f7ae6315eae2214fa363336c0
[ "MIT" ]
null
null
null
seija/reusables/send_large_message.py
kevlu8/Seija
3fc4cfe3b265232f7ae6315eae2214fa363336c0
[ "MIT" ]
6
2019-12-17T19:48:10.000Z
2022-03-11T04:29:06.000Z
async def send_large_text(channel, contents): return_messages = [] content_lines = contents.splitlines(True) output = "" for line in content_lines: if len(output) > 1800: return_messages.append(await channel.send(output)) output = "" output += line if len(output) > 0: return_messages.append(await channel.send(output)) return return_messages async def send_large_embed(channel, embed, contents): return_messages = [] content_lines = contents.splitlines(True) output = "" for line in content_lines: if len(output) > 1800: embed.description = output return_messages.append(await channel.send(embed=embed)) output = "" output += line if len(output) > 0: embed.description = output return_messages.append(await channel.send(embed=embed)) return return_messages
31.862069
67
0.638528
105
924
5.466667
0.238095
0.195122
0.076655
0.174216
0.8223
0.8223
0.8223
0.578397
0.578397
0.578397
0
0.014771
0.267316
924
28
68
33
0.833087
0
0
0.923077
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0.076923
0
0
0
0
null
0
0
1
1
1
1
0
0
0
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
5
feb399f8e2eb5906741d730c5095751a86de2e69
1,728
py
Python
tests/test_public_endpoints.py
snclucas/stashy
f24488fa640f561f79ac13f474ab43d6348f692f
[ "MIT" ]
null
null
null
tests/test_public_endpoints.py
snclucas/stashy
f24488fa640f561f79ac13f474ab43d6348f692f
[ "MIT" ]
1
2021-06-01T22:24:42.000Z
2021-06-01T22:24:42.000Z
tests/test_public_endpoints.py
snclucas/spaceenv
04d2ab194bb6be7793a45c373d9e8ba7a5267561
[ "MIT" ]
null
null
null
import json from tests.stashy_test_case import StashyTestCase class TestStashyAuthorization(StashyTestCase): def test_post_to_public_endpoint(self): result = self.simulate_request(method='POST', path='/p/testuser1endpoint/docs', headers=self.header_with_user1_token, protocol='http', body=json.dumps(self.test_doc)) json_data = result.json newdoc_id = json_data['id'] json_data.pop('id', None) self.assertEqual(self.ordered(json_data), self.ordered(self.test_doc)) result = self.simulate_request(method='POST', path='/p/testuser1endpoint/docs', headers=self.header_with_user2_token, protocol='http', body=json.dumps(self.test_doc)) self.assertEqual(self.ordered({"status": "fail", "message": "Cannot post to this endpoint"}), self.ordered(result.json)) # Now both users get the public data result = self.simulate_request(method='GET', path='/p/testuser1endpoint/docs/' + newdoc_id, headers=self.header_with_user1_token, protocol='http') json_data = result.json json_data.pop('id', None) self.assertEqual(self.ordered(json_data), self.ordered(self.test_doc)) result = self.simulate_request(method='GET', path='/p/testuser1endpoint/docs/' + newdoc_id, headers=self.header_with_user2_token, protocol='http') json_data = result.json json_data.pop('id', None) self.assertEqual(self.ordered(json_data), self.ordered(self.test_doc))
44.307692
101
0.608218
195
1,728
5.184615
0.266667
0.07913
0.054402
0.098912
0.725025
0.725025
0.725025
0.725025
0.705242
0.624135
0
0.006426
0.279514
1,728
38
102
45.473684
0.805622
0.019676
0
0.576923
0
0
0.109338
0.060284
0
0
0
0
0.153846
1
0.038462
false
0
0.076923
0
0.153846
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
229928c6addc09a6f842158847fe3a834e8b30b8
23,801
py
Python
dining_room/tests/test_domain.py
GT-RAIL/isolation_cyoa
f83e143fa5c4f011a80d5ca963bd722d4222f478
[ "MIT" ]
1
2021-08-18T20:59:45.000Z
2021-08-18T20:59:45.000Z
dining_room/tests/test_domain.py
GT-RAIL/isolation_cyoa
f83e143fa5c4f011a80d5ca963bd722d4222f478
[ "MIT" ]
8
2021-03-19T11:59:35.000Z
2022-02-27T10:42:43.000Z
dining_room/tests/test_domain.py
GT-RAIL/isolation_cyoa
f83e143fa5c4f011a80d5ca963bd722d4222f478
[ "MIT" ]
null
null
null
import os import copy import collections import unittest import numpy as np from django.test import SimpleTestCase, TestCase, Client from dining_room import constants from dining_room.models import User, StudyManagement from dining_room.models.domain import State, Transition, Suggestions from dining_room.views import get_next_state_json, get_suggestions_json # The tests for various aspects of the Dining Room domain class TransitionTestCase(SimpleTestCase): """ Test the state transitions given sequences of actions """ def _check_transition(self, expected, actual): """ Check that the transition JSON dictionary contains the values in expected, with some special conditions depending on the keys that we are checking """ for key, value in expected.items(): # Check that the key exists self.assertIn(key, actual) # Coerce types, if necessary if isinstance(value, (list, tuple,)): value = tuple(value) if isinstance(actual[key], (list, tuple,)): actual[key] = tuple(actual[key]) # Only compare the keys that we want to for transitions if key == 'video_link': self.assertEqual(value, os.path.basename(actual[key])) elif key in ['server_state_tuple', 'video_link', 'action_result', 'scenario_completed']: self.assertEqual(value, actual[key]) def _run_test_action_sequence(self, start_state_tuple, action_sequence): """Run the series of actions specified in action_sequence until the end. At the end, make sure that we have indeed ended""" state_tuple = start_state_tuple for idx, (action, expected_values) in enumerate(action_sequence): next_json = get_next_state_json(state_tuple, action) expected_values['scenario_completed'] = (idx + 1 == len(action_sequence)) try: self._check_transition(expected_values, next_json) except AssertionError as e: print(f"Error in step {idx+1}/{len(action_sequence)}: {e}") raise state_tuple = next_json['server_state_tuple'] def test_optimal_action_sequences(self): """Test the optimal action sequences have expected transitions""" for start_state_str, action_sequence in constants.OPTIMAL_ACTION_SEQUENCES.items(): start_state_tuple = start_state_str.split('.') self._run_test_action_sequence(start_state_tuple, action_sequence) class SuggestionsTestCase(TestCase): """ Test the suggestions """ def setUp(self): self.sm = StudyManagement.get_default() # Create a user and log them in self.user = User.objects.create_user('test_user', 'test_user') self.user.study_condition = User.StudyConditions.DXAX_100 self.user.start_condition = User.StartConditions.AT_COUNTER_OCCLUDING_ABOVE_MUG self.user.save() # # Log the user in on the client self.client.login(username='test_user', password='test_user') self.suggestions_provider = Suggestions(self.user) # Create an rng to shadow the user self.rng = np.random.default_rng(Suggestions.DEFAULT_RNG_SEED) def _reset_rng(self, idx): """ If idx = 0, reset the RNG to default. Else user the users' value. This refreshes the RNG values in the provider to simulate how we expect the RNG values to evolve as user requests come in """ self.user.refresh_from_db() if idx == 0: self.user.rng_state = Suggestions.DEFAULT_RNG_SEED self.user.save() self.suggestions_provider = Suggestions(self.user) self.rng = np.random.default_rng(Suggestions.DEFAULT_RNG_SEED) else: self.suggestions_provider = Suggestions(self.user) self.rng = np.random.default_rng(self.user.rng_state) def test_ordered_diagnoses(self): """Test the ordered diagnosis method from the Suggestions""" for start_state_str, action_sequence in constants.OPTIMAL_ACTION_SEQUENCES.items(): for idx, (action, expected_values) in enumerate(action_sequence): state = State(expected_values['server_state_tuple']) expected_suggestions = expected_values['dx_suggestions'] # Get the suggestions & test them suggestions = self.suggestions_provider.ordered_diagnoses(state, action, accumulate=True) self.assertListEqual(expected_suggestions, suggestions) suggestions = self.suggestions_provider.ordered_diagnoses(state, action) self.assertListEqual([expected_suggestions[0]], suggestions) def test_optimal_action(self): """Test the optimal actions method from the Suggestions""" for start_state_str, action_sequence in constants.OPTIMAL_ACTION_SEQUENCES.items(): for idx, (action, expected_values) in enumerate(action_sequence): state = State(expected_values['server_state_tuple']) expected_suggestions = [] if idx == len(action_sequence)-1 else [action_sequence[idx+1][0]] # Get the suggestions suggestions = self.suggestions_provider.optimal_action(state, action) # Test the suggestions self.assertListEqual(expected_suggestions, suggestions) def test_should_corrupt_3(self): """ Test that the suggestions will get corrupted when we want them to be. Level 3 noise """ dx_pattern = [False, True, False, False, True, False, False, False, True, False, False, True, False, False, True, False, False, False, True, False] ax_pattern = [False, True, False, False, True, False, False, False, True, False, False, True, False, False, True, False, False, False, True, False] self.user.study_condition = User.StudyConditions.DXAX_70 self.user.save() self.suggestions_provider = Suggestions(self.user) generated_dx = [] generated_ax = [] for action_idx in range(20): self.user.refresh_from_db() self.user.number_state_requests += 1 self.user.save() generated_dx.append(self.suggestions_provider._should_corrupt(Suggestions.DX_CORRUPT_IDX_OFFSETS)) generated_ax.append(self.suggestions_provider._should_corrupt(Suggestions.AX_CORRUPT_IDX_OFFSETS)) self.assertListEqual(dx_pattern, generated_dx) self.assertListEqual(ax_pattern, generated_ax) def test_should_corrupt_2(self): """ Test that the suggestions will get corrupted when we want them to be. Level 2 noise """ dx_pattern = [False, True, False, False, True, False, False, False, False, False, False, True, False, False, True, False, False, False, False, False] ax_pattern = [False, True, False, False, True, False, False, False, False, False, False, True, False, False, True, False, False, False, False, False] self.user.study_condition = User.StudyConditions.DXAX_80 self.user.save() self.suggestions_provider = Suggestions(self.user) generated_dx = [] generated_ax = [] for action_idx in range(20): self.user.refresh_from_db() self.user.number_state_requests += 1 self.user.save() generated_dx.append(self.suggestions_provider._should_corrupt(Suggestions.DX_CORRUPT_IDX_OFFSETS)) generated_ax.append(self.suggestions_provider._should_corrupt(Suggestions.AX_CORRUPT_IDX_OFFSETS)) self.assertListEqual(dx_pattern, generated_dx) self.assertListEqual(ax_pattern, generated_ax) def test_should_corrupt_1(self): """ Test that the suggestions will get corrupted when we want them to be. Level 1 noise """ dx_pattern = [False, True, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False] ax_pattern = [False, True, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False] self.user.study_condition = User.StudyConditions.DXAX_90 self.user.save() self.suggestions_provider = Suggestions(self.user) generated_dx = [] generated_ax = [] for action_idx in range(20): self.user.refresh_from_db() self.user.number_state_requests += 1 self.user.save() generated_dx.append(self.suggestions_provider._should_corrupt(Suggestions.DX_CORRUPT_IDX_OFFSETS)) generated_ax.append(self.suggestions_provider._should_corrupt(Suggestions.AX_CORRUPT_IDX_OFFSETS)) self.assertListEqual(dx_pattern, generated_dx) self.assertListEqual(ax_pattern, generated_ax) def test_should_corrupt_0(self): """ Test that the suggestions will get corrupted when we want them to be. Level 0 noise """ dx_pattern = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False] ax_pattern = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False] self.user.study_condition = User.StudyConditions.DXAX_100 self.user.save() self.suggestions_provider = Suggestions(self.user) generated_dx = [] generated_ax = [] for action_idx in range(20): self.user.refresh_from_db() self.user.number_state_requests += 1 self.user.save() generated_dx.append(self.suggestions_provider._should_corrupt(Suggestions.DX_CORRUPT_IDX_OFFSETS)) generated_ax.append(self.suggestions_provider._should_corrupt(Suggestions.AX_CORRUPT_IDX_OFFSETS)) self.assertListEqual(dx_pattern, generated_dx) self.assertListEqual(ax_pattern, generated_ax) def _test_dx_suggestions(self, state, action, expected_suggestions, pad): """Given state, action, and expected suggestions, test the suggestions""" alternatives = [x for x in constants.DIAGNOSES.keys() if x not in expected_suggestions] expected_suggestions = expected_suggestions[:self.sm.max_dx_suggestions] # Predict if we will see noise & then add noise accordingly will_corrupt = self.suggestions_provider._should_corrupt(Suggestions.DX_CORRUPT_IDX_OFFSETS) if will_corrupt: # Move the rng forward padded_suggestions = self.rng.choice(alternatives, size=len(expected_suggestions), replace=False).tolist() else: padded_suggestions = [x for x in expected_suggestions] # Then update if we need to pad if pad: alternatives = set(alternatives) - set(padded_suggestions) for _ in range(len(expected_suggestions), self.sm.max_dx_suggestions): padded_suggestions.append(self.rng.choice(list(sorted(alternatives)))) alternatives.discard(padded_suggestions[-1]) # Then get the suggestions & check if they match. Add additional checks # if they are corrupted suggestions = self.suggestions_provider.suggest_dx(state, action) self.assertGreaterEqual(self.sm.max_dx_suggestions, len(suggestions)) # The first test if pad: self.assertEqual(self.sm.max_dx_suggestions, len(suggestions)) else: self.assertEqual(len(expected_suggestions), len(suggestions)) # The second test for idx, suggestion in enumerate(expected_suggestions): if will_corrupt: self.assertNotIn(suggestion, suggestions) else: self.assertIn(suggestion, suggestions) # The final test... Do we predict the padded values well? self.assertListEqual(padded_suggestions, suggestions) # Return the suggestions, the padded suggestions return suggestions, padded_suggestions, will_corrupt def _test_ax_suggestions(self, state, action, expected_suggestions, pad): """Given state, action, and expected suggestions, test the suggestions""" valid_actions_check = state.get_valid_actions() alternatives = [k for k, v in valid_actions_check.items() if (k not in expected_suggestions and v)] expected_suggestions = expected_suggestions[:self.sm.max_ax_suggestions] # Predict if we will see noise & then add noise accordingly will_corrupt = self.suggestions_provider._should_corrupt(Suggestions.AX_CORRUPT_IDX_OFFSETS) if will_corrupt: # Move the rng forward padded_suggestions = self.rng.choice(alternatives, size=len(expected_suggestions), replace=False).tolist() else: padded_suggestions = [x for x in expected_suggestions] # Then update if we need to pad if pad: alternatives = set(alternatives) - set(padded_suggestions) for _ in range(len(expected_suggestions), self.sm.max_ax_suggestions): padded_suggestions.append(self.rng.choice(list(sorted(alternatives)))) alternatives.discard(padded_suggestions[-1]) # Then get the suggestions & check if they match. Add additional checks # if they are corrupted suggestions = self.suggestions_provider.suggest_ax(state, action) self.assertGreaterEqual(self.sm.max_ax_suggestions, len(suggestions)) # The first test if pad: self.assertEqual(self.sm.max_ax_suggestions, len(suggestions)) else: self.assertEqual(len(expected_suggestions), len(suggestions)) # The second test for idx, suggestion in enumerate(expected_suggestions): if will_corrupt: self.assertNotIn(suggestion, suggestions) else: self.assertIn(suggestion, suggestions) # The final test... Do we predict the padded values well? self.assertListEqual(padded_suggestions, suggestions) # Return the suggestions, the padded suggestions return suggestions, padded_suggestions, will_corrupt def test_multiple_suggestions_without_padding(self): """Test the return of multiple suggestions without padding to ensure a constant number of suggestions at all timesteps""" self.sm.max_dx_suggestions = 2 self.sm.max_ax_suggestions = 3 self.sm.save() self.user.refresh_from_db() # Refresh the values in the suggestions provider self.suggestions_provider = Suggestions(self.user) for start_state, action_sequence in constants.OPTIMAL_ACTION_SEQUENCES.items(): for idx, (action, expected_values) in enumerate(action_sequence): state = State(expected_values['server_state_tuple']) expected_suggestions = expected_values['dx_suggestions'] _, _, will_corrupt = self._test_dx_suggestions(state, action, expected_suggestions, pad=False) self.assertFalse(will_corrupt) expected_suggestions = [] if idx == len(action_sequence)-1 else [action_sequence[idx+1][0]] _, _, will_corrupt = self._test_ax_suggestions(state, action, expected_suggestions, pad=False) self.assertFalse(will_corrupt) def test_noisy_dx_suggestions_no_padding(self): """Test the addition of noise to the DX suggestions, without adding padding""" self.user.study_condition = User.StudyConditions.DXAX_70 self.user.save() self.assertEqual(0.3, self.user.noise_level) for start_state_str, action_sequence in constants.OPTIMAL_ACTION_SEQUENCES.items(): for idx, (action, expected_values) in enumerate(action_sequence): self.user.number_state_requests += 1 self.user.save() self._reset_rng(idx) state = State(expected_values['server_state_tuple']) expected_suggestions = expected_values['dx_suggestions'] self._test_dx_suggestions(state, action, expected_suggestions, pad=False) # Check the rng state self.user.refresh_from_db() self.assertEqual(Suggestions.get_next_rng_seed(self.rng), self.user.rng_state) def test_noisy_ax_suggestions_no_padding(self): """Test the addition of noise to the AX suggestions, without adding padding""" self.user.study_condition = User.StudyConditions.DXAX_70 self.user.save() self.assertEqual(0.3, self.user.noise_level) # Refresh the values in the provider self.suggestions_provider = Suggestions(self.user) for start_state_str, action_sequence in constants.OPTIMAL_ACTION_SEQUENCES.items(): for idx, (action, expected_values) in enumerate(action_sequence): self.user.number_state_requests += 1 self.user.save() self._reset_rng(idx) state = State(expected_values['server_state_tuple']) expected_suggestions = [] if idx == len(action_sequence)-1 else [action_sequence[idx+1][0]] self._test_ax_suggestions(state, action, expected_suggestions, pad=False) # Check the rng state self.user.refresh_from_db() self.assertEqual(Suggestions.get_next_rng_seed(self.rng), self.user.rng_state) def test_multiple_suggestions_with_padding(self): """Test multiple suggestions with padding, but no noise""" self.sm.max_dx_suggestions = 3 self.sm.max_ax_suggestions = 3 self.sm.pad_suggestions = True self.sm.save() self.user.refresh_from_db() # Refresh the values in the suggestions provider self.suggestions_provider = Suggestions(self.user) for start_state, action_sequence in constants.OPTIMAL_ACTION_SEQUENCES.items(): for idx, (action, expected_values) in enumerate(action_sequence): state = State(expected_values['server_state_tuple']) expected_suggestions = expected_values['dx_suggestions'] suggestions, _, will_corrupt = self._test_dx_suggestions(state, action, expected_suggestions, pad=True) self.assertFalse(will_corrupt) self.assertEqual(self.sm.max_dx_suggestions, len(suggestions)) expected_suggestions = [] if idx == len(action_sequence)-1 else [action_sequence[idx+1][0]] suggestions, _, will_corrupt = self._test_ax_suggestions(state, action, expected_suggestions, pad=True) self.assertFalse(will_corrupt) self.assertEqual(self.sm.max_ax_suggestions, len(suggestions)) def test_multiple_with_noise_and_padding(self): """Test multiple suggestions with padding and noise""" self.sm.max_dx_suggestions = 3 self.sm.max_ax_suggestions = 4 self.sm.pad_suggestions = True self.sm.save() self.user.study_condition = User.StudyConditions.DXAX_70 self.user.save() self.user.refresh_from_db() self.assertEqual(0.3, self.user.noise_level) for start_state_str, action_sequence in constants.OPTIMAL_ACTION_SEQUENCES.items(): for idx, (action, expected_values) in enumerate(action_sequence): self.user.number_state_requests += 1 self.user.save() self._reset_rng(idx) state = State(expected_values['server_state_tuple']) # First we do the DX expected_suggestions = expected_values['dx_suggestions'] self._test_dx_suggestions(state, action, expected_suggestions, pad=True) # Check the rng state self.user.refresh_from_db() self.assertEqual(Suggestions.get_next_rng_seed(self.rng), self.user.rng_state) # Then we do the AX expected_suggestions = [] if idx == len(action_sequence)-1 else [action_sequence[idx+1][0]] self._test_ax_suggestions(state, action, expected_suggestions, pad=True) # Check the rng state self.user.refresh_from_db() self.assertEqual(Suggestions.get_next_rng_seed(self.rng), self.user.rng_state) def test_all_noise_conditions_see_noise(self): """Test that all the noise conditions actually do see noise in the first 3 actions""" action_number_check_threshold = 3 # Make sure we're running the same condition that we will have for the # study. This is where we went wrong last time self.sm.max_dx_suggestions = 3 self.sm.max_ax_suggestions = 3 self.sm.pad_suggestions = True self.sm.save() # Iterate through the study conditions for study_condition in [ User.StudyConditions.DX_90, User.StudyConditions.AX_90, User.StudyConditions.DXAX_90, User.StudyConditions.DX_80, User.StudyConditions.AX_90, User.StudyConditions.DXAX_80, ]: self.user.study_condition = study_condition self.user.save() # Then run the same rigamarole of going testing noise without # padding for start_state_str, action_sequence in constants.OPTIMAL_ACTION_SEQUENCES.items(): encountered_noise = False self.user.number_state_requests = -1 self.user.save() # There has to be some noise before the end of the optimal # action sequence for idx, (action, expected_values) in enumerate(action_sequence[:-1]): self.user.number_state_requests += 1 self.user.save() self._reset_rng(idx) state = State(expected_values['server_state_tuple']) # If DX should be shown, then calculate the noise probabilty if self.user.show_dx_suggestions: expected_suggestions = expected_values['dx_suggestions'] suggestions, _, will_corrupt = self._test_dx_suggestions(state, action, expected_suggestions, pad=True) encountered_noise = encountered_noise or (will_corrupt and idx < action_number_check_threshold) # If we should show action suggestions, then check for noise if self.user.show_ax_suggestions: expected_suggestions = [] if idx == len(action_sequence)-1 else [action_sequence[idx+1][0]] suggestions, _, will_corrupt = self._test_ax_suggestions(state, action, expected_suggestions, pad=True) encountered_noise = encountered_noise or (will_corrupt and idx < action_number_check_threshold) # Check the rng state self.user.refresh_from_db() self.assertEqual(Suggestions.get_next_rng_seed(self.rng), self.user.rng_state) # Check that we have encountered noise in this condition self.assertTrue(encountered_noise, f"Did not encounter noise in {study_condition}, {start_state_str}")
46.03675
127
0.655645
2,802
23,801
5.337259
0.096717
0.069542
0.080241
0.088265
0.771448
0.749381
0.745771
0.717753
0.708058
0.694617
0
0.005531
0.263224
23,801
516
128
46.125969
0.847286
0.140456
0
0.663492
0
0
0.024008
0.001544
0
0
0
0
0.133333
1
0.060317
false
0.003175
0.031746
0
0.104762
0.003175
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
a3f48554c572b749cb92b1ee543f06829256c5b7
492
py
Python
day_34/quiz.py
steveanlorn/python_bootcamp_100_days
e542df58406ecae54c76fc8d5cbe08b81243b92f
[ "MIT" ]
null
null
null
day_34/quiz.py
steveanlorn/python_bootcamp_100_days
e542df58406ecae54c76fc8d5cbe08b81243b92f
[ "MIT" ]
null
null
null
day_34/quiz.py
steveanlorn/python_bootcamp_100_days
e542df58406ecae54c76fc8d5cbe08b81243b92f
[ "MIT" ]
1
2021-06-04T03:37:22.000Z
2021-06-04T03:37:22.000Z
from question import Question class Quiz: def __init__(self, questions: list[Question]): self.questions = questions self.question_number = 1 self.current_question = self.questions[0] def next_question(self): self.current_question = self.questions[self.question_number] self.question_number += 1 def is_still_has_question(self) -> bool: if self.question_number < len(self.questions): return True return False
27.333333
68
0.668699
59
492
5.338983
0.40678
0.206349
0.228571
0.171429
0.203175
0
0
0
0
0
0
0.00813
0.25
492
17
69
28.941176
0.845528
0
0
0
0
0
0
0
0
0
0
0
0
1
0.230769
false
0
0.076923
0
0.538462
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
4328336e983041f363c76118cc5cc7dfc699ee97
143
py
Python
tests/web_platform/css_flexbox_1/test_flex_box_wrap.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/css_flexbox_1/test_flex_box_wrap.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/css_flexbox_1/test_flex_box_wrap.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
1
2020-01-16T01:56:41.000Z
2020-01-16T01:56:41.000Z
from tests.utils import W3CTestCase class TestFlexBoxWrap(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'flex-box-wrap'))
23.833333
68
0.783217
17
143
6.294118
0.823529
0
0
0
0
0
0
0
0
0
0
0.023256
0.097902
143
5
69
28.6
0.806202
0
0
0
0
0
0.091549
0
0
0
0
0
0
1
0
true
0
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
0
1
0
1
0
1
0
0
5
4a387915d37e0145941d7136ba33105ddab73650
101
py
Python
ports/renesas-ra/boards/RA4M1_EK/manifest.py
andypiper/micropython
7883ae413ddfa6181d784533b236658658383d0c
[ "MIT" ]
1
2022-03-06T10:05:36.000Z
2022-03-06T10:05:36.000Z
ports/renesas-ra/boards/RA4M1_EK/manifest.py
andypiper/micropython
7883ae413ddfa6181d784533b236658658383d0c
[ "MIT" ]
null
null
null
ports/renesas-ra/boards/RA4M1_EK/manifest.py
andypiper/micropython
7883ae413ddfa6181d784533b236658658383d0c
[ "MIT" ]
null
null
null
# We do not want to include default frozen modules, freeze("$(MPY_DIR)/drivers/sdcard", "sdcard.py")
33.666667
51
0.732673
16
101
4.5625
0.9375
0
0
0
0
0
0
0
0
0
0
0
0.118812
101
2
52
50.5
0.820225
0.485149
0
0
0
0
0.68
0.5
0
0
0
0
0
1
0
true
0
0
0
0
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
1
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
4a4e9adb2fe7abef5e1ee505d714d18b70ed9c05
23
py
Python
DarkMatterUtilities/__init__.py
dtemps123/DarkMatterUtilities
b38b668a12fe2ee098f29a7b41b16d63da026e8a
[ "MIT" ]
null
null
null
DarkMatterUtilities/__init__.py
dtemps123/DarkMatterUtilities
b38b668a12fe2ee098f29a7b41b16d63da026e8a
[ "MIT" ]
null
null
null
DarkMatterUtilities/__init__.py
dtemps123/DarkMatterUtilities
b38b668a12fe2ee098f29a7b41b16d63da026e8a
[ "MIT" ]
null
null
null
# print("Initializing")
23
23
0.73913
2
23
8.5
1
0
0
0
0
0
0
0
0
0
0
0
0.043478
23
1
23
23
0.772727
0.913043
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
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
4a6ee8afc9be40ae3ea79da0f633a9ea013bcd7e
213
py
Python
01_PythonTutorial/016_GlobalVariables.py
EliazBobadilla/Python-Tutorial-W3Schools
0f22be2eea493c7e331d15b72847a34a4b748884
[ "MIT" ]
5
2021-05-29T23:30:57.000Z
2021-12-19T11:21:24.000Z
01_PythonTutorial/016_GlobalVariables.py
ChromeOwO/Python-Tutorial-W3Schools
0f22be2eea493c7e331d15b72847a34a4b748884
[ "MIT" ]
null
null
null
01_PythonTutorial/016_GlobalVariables.py
ChromeOwO/Python-Tutorial-W3Schools
0f22be2eea493c7e331d15b72847a34a4b748884
[ "MIT" ]
4
2021-06-04T20:23:48.000Z
2022-01-23T05:48:19.000Z
#x = "awesome" def myfunc(): print("Python is " + x) #myfunc() '''''''''''''''''''''''''''''''''''' x = "awesome" def myfunc2(): x = "fantastic" print("Python is " + x) myfunc2() print("Python is " + x)
13.3125
36
0.469484
24
213
4.166667
0.375
0.33
0.39
0.42
0
0
0
0
0
0
0
0.011628
0.192488
213
16
37
13.3125
0.569767
0.098592
0
0.333333
0
0
0.248649
0
0
0
0
0
0
1
0.222222
false
0
0
0
0.222222
0.333333
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
4a9a126bb1d30fcb017e1ad7dbb0470192700504
81
py
Python
tests/test_art.py
themiwi/ggplot
b6d23c22d52557b983da8ce7a3a6992501dadcd6
[ "BSD-2-Clause" ]
1,133
2017-01-10T16:58:15.000Z
2022-03-31T14:40:29.000Z
tests/test_art.py
themiwi/ggplot
b6d23c22d52557b983da8ce7a3a6992501dadcd6
[ "BSD-2-Clause" ]
287
2015-01-02T18:54:17.000Z
2017-01-10T14:48:14.000Z
tests/test_art.py
themiwi/ggplot
b6d23c22d52557b983da8ce7a3a6992501dadcd6
[ "BSD-2-Clause" ]
295
2017-01-16T19:16:49.000Z
2022-02-18T14:10:58.000Z
from ggplot import * print ggplot(diamonds, aes('price')) + geom_now_its_art()
16.2
57
0.728395
12
81
4.666667
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.135802
81
4
58
20.25
0.8
0
0
0
0
0
0.061728
0
0
0
0
0
0
0
null
null
0
0.5
null
null
0.5
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
1
0
0
0
1
0
0
1
0
5
437b329c502ea7f3da44da54e0d27cf8ac007440
83
py
Python
hub/__init__.py
joniumGit/mindstorms-skeleton
0921fa7e439532e26b7ccaddaf86abb90437feb4
[ "MIT" ]
null
null
null
hub/__init__.py
joniumGit/mindstorms-skeleton
0921fa7e439532e26b7ccaddaf86abb90437feb4
[ "MIT" ]
null
null
null
hub/__init__.py
joniumGit/mindstorms-skeleton
0921fa7e439532e26b7ccaddaf86abb90437feb4
[ "MIT" ]
null
null
null
# TODO # https://lego.github.io/MINDSTORMS-Robot-Inventor-hub-API/class_image.html
27.666667
75
0.783133
13
83
4.923077
1
0
0
0
0
0
0
0
0
0
0
0
0.048193
83
2
76
41.5
0.810127
0.939759
0
null
0
null
0
0
null
0
0
0.5
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
0
0
0
0
0
5
438ab587a83b778d5722b34b2c899e34cf536a98
113,128
py
Python
tests/test_providers.py
nilver/alerta
5ff6d39306e914f58aae9794f616e64d25573a27
[ "Apache-2.0" ]
1,233
2017-11-01T00:29:12.000Z
2022-03-29T04:13:09.000Z
tests/test_providers.py
nilver/alerta
5ff6d39306e914f58aae9794f616e64d25573a27
[ "Apache-2.0" ]
760
2017-10-27T20:33:41.000Z
2022-03-28T17:01:41.000Z
tests/test_providers.py
KiqoCode/alerta
5e6aa75b6fb7dab554d83f5efa7b505035ca26cd
[ "Apache-2.0" ]
238
2017-11-02T14:58:15.000Z
2022-03-29T03:59:20.000Z
import json import unittest from urllib.parse import parse_qs import requests_mock from alerta.app import create_app, db from alerta.models.enums import Scope from alerta.models.key import ApiKey from alerta.models.token import Jwt class AuthProvidersTestCase(unittest.TestCase): def setUp(self): pass def tearDown(self): db.destroy() @requests_mock.mock() def test_amazon_cognito(self, m): test_config = { 'TESTING': True, 'AUTH_REQUIRED': True, 'AUTH_PROVIDER': 'cognito', 'AWS_REGION': 'eu-west-1', 'OAUTH2_CLIENT_ID': '6gms81dft7up216pqnv7pcq194', 'OAUTH2_CLIENT_SECRET': 'oauth2-client-secret', 'COGNITO_USER_POOL_ID': 'eu-west-1_BMkhxuZsn', 'COGNITO_DOMAIN': 'alerta-webui', 'CUSTOMER_VIEWS': True, } authorization_grant = """ { "code": "9273a057-f70a-4056-b6b9-20f4f768db05", "clientId": "6gms81dft7up216pqnv7pcq194", "redirectUri": "http://localhost:8000", "state": "mlmie0tj03i" } """ discovery_doc = """ { "authorization_endpoint": "https://alerta-webui.auth.eu-west-1.amazoncognito.com/oauth2/authorize", "id_token_signing_alg_values_supported": [ "RS256" ], "issuer": "https://cognito-idp.eu-west-1.amazonaws.com/eu-west-1_BMkhxuZsn", "jwks_uri": "https://cognito-idp.eu-west-1.amazonaws.com/eu-west-1_BMkhxuZsn/.well-known/jwks.json", "response_types_supported": [ "code", "token", "token id_token" ], "scopes_supported": [ "openid", "email", "phone", "profile" ], "subject_types_supported": [ "public" ], "token_endpoint": "https://alerta-webui.auth.eu-west-1.amazoncognito.com/oauth2/token", "token_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post" ], "userinfo_endpoint": "https://alerta-webui.auth.eu-west-1.amazoncognito.com/oauth2/userInfo" } """ access_token = """ { "id_token": "eyJraWQiOiJUWnhDZzJCMEZqRTAyaEFhWnRuXC9XSE9abURiaG5sXC91amlGdDd6aWhzOHc9IiwiYWxnIjoiUlMyNTYifQ.eyJhdF9oYXNoIjoiWW9ENFpfY0FKWUVUNTBUNnZpYVlkUSIsInN1YiI6IjM4ZmFmMWU4LTYzODQtNDU5OC04MWI1LTg0ZjQzZTkxYjNkYyIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAuZXUtd2VzdC0xLmFtYXpvbmF3cy5jb21cL2V1LXdlc3QtMV9CTWtoeHVac24iLCJjb2duaXRvOnVzZXJuYW1lIjoic2F0dGVybHkiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzYXR0ZXJseSIsImdpdmVuX25hbWUiOiJOaWNrIiwicGljdHVyZSI6Imh0dHBzOlwvXC9hdmF0YWFhcnMuaW9cLyIsImF1ZCI6IjZnbXM4MWRmdDd1cDIxNnBxbnY3cGNxMTk0IiwidG9rZW5fdXNlIjoiaWQiLCJhdXRoX3RpbWUiOjE1NjEwNDI2OTksIm5hbWUiOiJOaWNrIFNhdHRlcmx5IiwiZXhwIjoxNTYxMDQ2Mjk5LCJpYXQiOjE1NjEwNDI2OTksImZhbWlseV9uYW1lIjoiU2F0dGVybHkiLCJlbWFpbCI6Im5mc2F0dGVybHkrMkBnbWFpbC5jb20ifQ.OgRHqVXzC5QCcUiioPPUJaA4O6X98XhWHPYhmjs5GzQCeSaUPVT3j45NyKqNDpkUKX3R-sijw57A4tc3MMHzr8EnLKAyr445GpqchCVGq0ntNixy0WamM073MvVSXN9ST2BZI4bu84AiGWV4D9YiqnhPt_kUEhaRxwvf9CDXPECLjlh-LHmQp5w06vI_itAJ_n6mEVHACXRNdQfSLhHbr4znWqOnQW40BP3gU3i-RulMJWjJGgDl94-dIfhqzvwRX0_k3Fnq7iYm1oz2DC8XvNiQqNCwt9Qfv7fU_pLTZkxTA2EBE3RiQnlgH4RNhZFrF_cH4kH8KRO2Hpoai57sVA", "access_token": "eyJraWQiOiJVeTEyVzZzOXNrZUJ3SGxBREtsdm5hVUp3TURFRjFxbmtGR01XOWU3NjFFPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiIzOGZhZjFlOC02Mzg0LTQ1OTgtODFiNS04NGY0M2U5MWIzZGMiLCJ0b2tlbl91c2UiOiJhY2Nlc3MiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIiwiYXV0aF90aW1lIjoxNTYxMDQyNjk5LCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAuZXUtd2VzdC0xLmFtYXpvbmF3cy5jb21cL2V1LXdlc3QtMV9CTWtoeHVac24iLCJleHAiOjE1NjEwNDYyOTksImlhdCI6MTU2MTA0MjY5OSwidmVyc2lvbiI6MiwianRpIjoiZWZkZjBmYzgtYWEwNi00M2I5LThkMmMtN2Y3MjY2OTgyZjFkIiwiY2xpZW50X2lkIjoiNmdtczgxZGZ0N3VwMjE2cHFudjdwY3ExOTQiLCJ1c2VybmFtZSI6InNhdHRlcmx5In0.QhNLAYaEG1c69yJq9-839FJ5q-Sq70IGlHFT2HeGzN_Qxx_qLBH_lZ5VNKPXxyeVAjP2Rj5EMWO0F1ygN8LrqgWaBTXw2Uw3BrfBwtfBVqQW4OFl0jg97FKrEAK9YT25zCm9HkCBdIeKVrhdY4-44w-5_JuBPevW9yzcZ5ApX5zpk4Z4aXGa32l8NYZAObxU3TDxPsCM4LKZVs7Slc1f2vzT93dll2jYg2_K6Kz9IFQkIfmRhxbNdwOsqXn3cHTtajEG-tHXG8Epsiy0ssiA1H9PQRE1It_LNMcc1RE-A34Yr1s0YGeqi10ntw-W2crtXzo-AS1YQ-gAkluAjeKe4A", "refresh_token": "eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.JxxBNOUNsqi4aGIaXVg6BqxYMKbeLEFCsKg2STYi7afj_vyTNbX1tQABb9ADiY9McOIcXyZzD2LM6ZcA1gkDqIkhoYnXsZOCWYWgy9USBnxu7kqK4aw7hVdYziF0gV9spxCCtweu9gGbcIcJFt5343dvHvDsIUSrOpMqgnIcOA_sUrA69KVkJPwehn6nvnilhwREoTbmmVDNyBphnUFI_cwLShS-jxtQSjqiYO_dFmwGBgDc7yBMdQmAzr5O52Zr9qxjyfjdy_acNLU8H31vIsDFfvahnj4n4Zf0lv-iEf8cqJcC4Fyp6Hz3_oJ4tu2FqQtqjG7QgVqQn5Vl5kfKyw.7a6qH9tAWvVexLyL.aiObMwNcnu1nlSD8-J4vCeAvrpCH-6R_QOkO0Ho0vmcDbDsorZbrSzrtVt18FBCfh6ul_R8AMCj4bLtdIU60kyZwxeArXx3qlZ0MmomnTLv3ulKkN2MQPKd0FyYSe3jeT6jL5TuBf2r8gZejkhW4JEufYpuAjz9xkf-QU1n7kRRykWKKsOl-QKW71xgKfVHceeeaFjMWk78HH5DM2M9nDIkBgJoFVCRrcn247Yjqy-vzB5zTSyKF9fCc5KlnGJ5n6TgsUuOMHoGX7KoUIVMKIAv76PjR7idjPFKti0XGu406iqplGOS7yngQI6-lm2hghx5Rbqu7wP8UnXKLouLlmRNmwCgcKnD7IHYHQU-cScktJedhdoYqHSyJAFqAPL6tmWzcu1X2IPxCtftTM6ute21Xp2Zs9V_abonooRZa7Dbjr5A_Kj8HFmCBy5QU54KOTn-VM6O_Af5sP-i2vOaTHSQ-ITOODnt6tK-B01UcK-jNmJVRL486NGF90G9EgkUOKAtHVu1oiLWTxC9JNgo9Kc01kloKrUkFK1ByHxdCYykUR2Nq8QsuKcpovYbRVXtakgY2WR6jJaRmu_LcDrKO2J1keglChvpoxmoTbBhSrAFOslvlHdalOqoyHxGYYXf-zfrIzhuiIJSUgQKlWYT4NPOLRIzBUhifbRZEPuC047CRGUt5XytgJLavYtgF9sMJecEKMFLBRQk9A1gwqvlp74ZgbFE2w4z34C8FGpcFjczE66JqWHb9SlRyqhpD-2_2YT7PHSoZiNpekNbeVD9QPYCr2YTIveCsQpEBqg-i1onylk0SAB7Sz8Fj8DUZAbhrtEMTX6JlUKujr1gWZmej4VhAlQ9YyEXLE82KGYiRj28OcJ2ROaHoI-wdZQdSeYR7JM_rVOFICaj9CZu3UrEBfVOO7O-sPs12uqiA73dHkKFwO3470L8ogC5uFN78AXwyA6kMdDFsxoKPulCqdqF5HrV2Hc14SJU8QrW16F9nkrqttQSDgJCVZkw3J7kyFpU7UCxtY2E1-ZD-lw6lGgc33rcMSDz4T35RVpMH0cd3JMqN-VgoPbWn7m9-oxSQ4cZoa4q02xheKBwBxPRR5ico5yJvYisi5T_xT3HDtzSD-bwIzqSneRHTmk87MRJzVkH1OW1yG2PAAmAGidgYrAj8WYm39vXJd8yFyRZLM8HHKI2P13B0Wo4s.adI0hTNlVZlzeI4HQByqaQ", "expires_in": 3600, "token_type": "Bearer" } """ userinfo = r""" { "sub": "38faf1e8-6384-4598-81b5-84f43e91b3dc", "email_verified": "true", "name": "Nick Satterly", "preferred_username": "satterly", "given_name": "Nick", "family_name": "Satterly", "email": "nfsatterly+2@gmail.com", "picture": "https://avataaars.io/", "username": "satterly" } """ m.get('https://cognito-idp.eu-west-1.amazonaws.com/eu-west-1_BMkhxuZsn/.well-known/openid-configuration', text=discovery_doc) m.post('https://alerta-webui.auth.eu-west-1.amazoncognito.com/oauth2/token', text=access_token) m.get('https://alerta-webui.auth.eu-west-1.amazoncognito.com/oauth2/userInfo', text=userinfo) self.app = create_app(test_config) self.client = self.app.test_client() with self.app.test_request_context('/'): self.app.preprocess_request() self.api_key = ApiKey( user='admin@alerta.io', scopes=[Scope.admin, Scope.read, Scope.write], text='demo-key' ) self.api_key.create() self.headers = { 'Authorization': f'Key {self.api_key.key}', 'Content-type': 'application/json' } # add customer mapping payload = { 'customer': 'Alphabet', 'match': 'gmail.com' } response = self.client.post('/customer', data=json.dumps(payload), content_type='application/json', headers=self.headers) self.assertEqual(response.status_code, 201) response = self.client.post('/auth/openid', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.name, 'Nick Satterly', claims) self.assertEqual(claims.preferred_username, 'satterly', claims) self.assertEqual(claims.provider, 'cognito', claims) # self.assertEqual(claims.roles, ['user'], claims) self.assertEqual(claims.scopes, ['read', 'write'], claims) self.assertEqual(claims.email, 'nfsatterly+2@gmail.com', claims) self.assertEqual(claims.email_verified, True, claims) self.assertEqual(claims.customers, ['Alphabet'], claims) token_endpoint_request = m.request_history[2] self.assertEqual( token_endpoint_request.headers.get('Authorization'), 'Basic NmdtczgxZGZ0N3VwMjE2cHFudjdwY3ExOTQ6b2F1dGgyLWNsaWVudC1zZWNyZXQ=' ) @requests_mock.mock() def test_azure_v1(self, m): test_config = { 'TESTING': True, 'AUTH_REQUIRED': True, 'AUTH_PROVIDER': 'openid', 'OIDC_ISSUER_URL': 'https://sts.windows.net/f24341ef-7a6f-4cff-abb7-99a11ab11127/', 'OIDC_TOKEN_AUTH_METHODS': ['client_secret_post', 'client_secret_basic'], 'OAUTH2_CLIENT_ID': '38ba6223-a887-43e2-9f7d-8d539df55f67', 'OAUTH2_CLIENT_SECRET': 'oauth2-client-secret', 'CUSTOMER_VIEWS': True, } authorization_grant = """ { "code": "AQABAAIAAACEfexXxjamQb3OeGQ4GugvJfMVkt3b4O9rcjh8Euhco7OpeacDZ2B-y249nPI6bFmVXZHz5x-NVY7G9UumTVrd9GZGLt7g4PN6WL50NxPROTFTZWOX3lZW4FHh6VQh9TfQ6w2-V_G4YUkJe14MZVlunWg7_AEi0HcINg1k6T1yeM9R538zzDoypaH9kP3s1QwK5O4nsBbt8azqW4QdEoQQDs1r9W9UnV3GTAEdQdS-tpaeax0-ZVlX0GlQdygw0eDfAsRxFZV2qRY9DcUyLDL_mFrlh35T7NuihSkJTvm5vIu5kzqm6Lub5oKJBBIIvQzUbW8_waTIjIPh28D1drKDCY0_QSneZsrndHTYrLJaBtJqz-M0yd6bE6xz1Vh96G997DzWyxW_ZsRaT2YIrg0CD407cqSTDrsz4GiuBbtLsSHSBwMYNSYL7RKW-uxiVD8aRMn46OSVB2nkDuKGqsv7fEcBWEQ-YQM4cYhJp6V6UWG3XBOP-O0fqlFXLyztVB8rHXyVUAllkPYEl3DVW1ToJKSr-zPLo__RXZEXGCmGvMDHFg51O04Vh21KyiGfDtuRwrv_XuMao8342G9aFanCE6oMrNx2qqWZ9fCaVmd0K5ODgUVhSx_Rd1yYVmz39X9iuFuasx5X5ftZlcdPiy0b6rsqLAlfZcRvgkS21DtwCOLvk7g4ND_k2kDDMx_EyEeaf_cosas4l_Iwxcbng6ZBkP6e2y90ccSAUAtCoCR_rOLyEP_h_FgWJ_eGJWQZGQaLWyl0ELGHPAiFq0E2lyFFJ7z3FMVA50FzGtK7ndBrYs01ZA5845_oxdzkJzQyDYY_5Vw0qJ-nmTeSrgXdbPk9RiwfsdOrKscMi-Vmz2kiKfGxa0adKFx6KKbFjs4_X-66KciSMy_b-kEG8P7m-069qxR6XL_i3SfcGiN18io9PCcqgi_0MIwLMQyO-wl0soF-PZVf4zF1ofjccxnQbpJEW2qU9x5r5bCghgA0aD3wtx0WvNx221AJ28jJ00SRd2B36zkfHe5VXuuip_lnpY8SRO6Tb5vL5BYMo9erCMQhv_lOxcsfmlJ0TqeBDyv2pbIPxBqUILtSoJeW-uQxyZMuIAA", "clientId": "38ba6223-a887-43e2-9f7d-8d539df55f67", "redirectUri": "http://local.alerta.io:8000" } """ discovery_doc = """ { "authorization_endpoint": "https://login.microsoftonline.com/f24341ef-7a6f-4cff-abb7-99a11ab11127/oauth2/authorize", "token_endpoint": "https://login.microsoftonline.com/f24341ef-7a6f-4cff-abb7-99a11ab11127/oauth2/token", "token_endpoint_auth_methods_supported": [ "client_secret_post", "private_key_jwt", "client_secret_basic" ], "jwks_uri": "https://login.microsoftonline.com/common/discovery/keys", "response_modes_supported": [ "query", "fragment", "form_post" ], "subject_types_supported": [ "pairwise" ], "id_token_signing_alg_values_supported": [ "RS256" ], "http_logout_supported": true, "frontchannel_logout_supported": true, "end_session_endpoint": "https://login.microsoftonline.com/f24341ef-7a6f-4cff-abb7-99a11ab11127/oauth2/logout", "response_types_supported": [ "code", "id_token", "code id_token", "token id_token", "token" ], "scopes_supported": [ "openid" ], "issuer": "https://sts.windows.net/f24341ef-7a6f-4cff-abb7-99a11ab11127/", "claims_supported": [ "sub", "iss", "cloud_instance_name", "cloud_instance_host_name", "cloud_graph_host_name", "msgraph_host", "aud", "exp", "iat", "auth_time", "acr", "amr", "nonce", "email", "given_name", "family_name", "nickname" ], "microsoft_multi_refresh_token": true, "check_session_iframe": "https://login.microsoftonline.com/f24341ef-7a6f-4cff-abb7-99a11ab11127/oauth2/checksession", "userinfo_endpoint": "https://login.microsoftonline.com/f24341ef-7a6f-4cff-abb7-99a11ab11127/openid/userinfo", "tenant_region_scope": "EU", "cloud_instance_name": "microsoftonline.com", "cloud_graph_host_name": "graph.windows.net", "msgraph_host": "graph.microsoft.com", "rbac_url": "https://pas.windows.net" } """ jwks_uri = """ { "keys": [ { "kty": "RSA", "use": "sig", "kid": "N-lC0n-9DALqwhuHYnHQ63GeCXc", "x5t": "N-lC0n-9DALqwhuHYnHQ63GeCXc", "n": "t3J1hnS4aRZaZGq5JUw1iKsHynCUV9lMBe2MDArXGeQlN-w8Xw9vU6InqmPVvJsUVyUkKE0jzn4dYLcwbTuttQ0hmN-lzNfGol04KKMIVdtTs1P0wo_-VyJ88EuWM3lvDxyTw1PLim14UJ1856zdp2_kZLOSy-B46K96ENJ8b2yCP_VHRTd3GgNTrx-xeU66WJdlon6SSkxI85KIAzOR4vxrl2XZZx_DkVcsAHa8KXQRkbMw82F2SHAbgJTv8qjSHR_WXjoGs3Wgds9UUqgNDXSK6qTjoG53zj8-faRkK0Px4wRD9rVXt-pPcGaul3TEkUVhpe8SyrLWETFexJesSQ", "e": "AQAB", "x5c": [ "MIIDBTCCAe2gAwIBAgIQP8sUV4hf2ZxPfw5DB0O9CjANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTE5MDIwMTAwMDAwMFoXDTIxMDIwMTAwMDAwMFowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALdydYZ0uGkWWmRquSVMNYirB8pwlFfZTAXtjAwK1xnkJTfsPF8Pb1OiJ6pj1bybFFclJChNI85+HWC3MG07rbUNIZjfpczXxqJdOCijCFXbU7NT9MKP/lcifPBLljN5bw8ck8NTy4pteFCdfOes3adv5GSzksvgeOivehDSfG9sgj/1R0U3dxoDU68fsXlOuliXZaJ+kkpMSPOSiAMzkeL8a5dl2Wcfw5FXLAB2vCl0EZGzMPNhdkhwG4CU7/Ko0h0f1l46BrN1oHbPVFKoDQ10iuqk46Bud84/Pn2kZCtD8eMEQ/a1V7fqT3Bmrpd0xJFFYaXvEsqy1hExXsSXrEkCAwEAAaMhMB8wHQYDVR0OBBYEFH5JQzlFI3FE9VxkkUbFT9XQDxifMA0GCSqGSIb3DQEBCwUAA4IBAQCb7re2PWF5ictaUCi4Ki2AWE6fGbmVRUdf0GkI06KdHWSiOgkPdB7Oka1Fv/j4GCs/ezHa1+oAx8uU96GECBBEMnCYPqkjmNKdLYkIUrcwEe9qz12MOCKJkCuYsDdLUqv+e4wHssbAnJn2+L13UmfAb6FM1VTaKIQtPs4yZsdhnk4M+Ee2EpcvgwOl2na+m58ovspieEyI6II/TolzwP9NWbvHw5VlF0IYttQprjmQU3tQ2E6j3HpZ31B0nrnFWglUB7lEC+0mkyJUGzovNECsr+BIEMhTlCp2/rbruCCbZBppYAlbWlTFwXA8TqfE4DNATYgm90ObQANcTnHJeRV1" ] }, { "kty": "RSA", "use": "sig", "kid": "HBxl9mAe6gxavCkcoOU2THsDNa0", "x5t": "HBxl9mAe6gxavCkcoOU2THsDNa0", "n": "0afCaiPd_xl_ewZGfOkxKwYPfI4Efu0COfzajK_gnviWk7w3R-88Dmb0j24DSn1qVR3ptCnA1-QUfUMyhvl8pT5-t7oRkLNPzp0hVV-dAG3ZoMaSEMW0wapshA6LVGROpBncDmc66hx5-t3eOFA24fiKfQiv2TJth3Y9jhHnLe7GBOoomWYx_pJiEG3mhYFIt7shaEwNcEjo34vr1WWzRm8D8gogjrJWd1moyeGftWLzvfp9e79QwHYJv907vQbFrT7LYuy8g7-Rpxujgumw2mx7CewcCZXwPiZ-raM3Ap1FhINiGpd5mbbYrFDDFIWAjWPUY6KNvXtc24yUfZr4MQ", "e": "AQAB", "x5c": [ "MIIDBTCCAe2gAwIBAgIQWcq84CdVhKVEcKbZdMOMGjANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTE5MDMxNDAwMDAwMFoXDTIxMDMxNDAwMDAwMFowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANGnwmoj3f8Zf3sGRnzpMSsGD3yOBH7tAjn82oyv4J74lpO8N0fvPA5m9I9uA0p9alUd6bQpwNfkFH1DMob5fKU+fre6EZCzT86dIVVfnQBt2aDGkhDFtMGqbIQOi1RkTqQZ3A5nOuocefrd3jhQNuH4in0Ir9kybYd2PY4R5y3uxgTqKJlmMf6SYhBt5oWBSLe7IWhMDXBI6N+L69Vls0ZvA/IKII6yVndZqMnhn7Vi8736fXu/UMB2Cb/dO70Gxa0+y2LsvIO/kacbo4LpsNpsewnsHAmV8D4mfq2jNwKdRYSDYhqXeZm22KxQwxSFgI1j1GOijb17XNuMlH2a+DECAwEAAaMhMB8wHQYDVR0OBBYEFIkZ5wrSV8lohIsreOmig7h5wQDkMA0GCSqGSIb3DQEBCwUAA4IBAQAd8sKZLwZBocM4pMIRKarK60907jQCOi1m449WyToUcYPXmU7wrjy9fkYwJdC5sniItVBJ3RIQbF/hyjwnRoIaEcWYMAftBnH+c19WIuiWjR3EHnIdxmSopezl/9FaTNghbKjZtrKK+jL/RdkMY9uWxwUFLjTAtMm24QOt2+CGntBA9ohQUgiML/mlUpf4qEqa2/Lh+bjiHl3smg4TwuIl0i/TMN9Rg7UgQ6BnqfgiuMl6BtBiatNollwgGNI2zJEi47MjdeMf8+C3tXs//asqqlqJCyVLwN7AN47ynYmkl89MleOfKIojhrGRxryZG2nRjD9u/kZbPJ8e3JE9px67" ] }, { "kty": "RSA", "use": "sig", "kid": "M6pX7RHoraLsprfJeRCjSxuURhc", "x5t": "M6pX7RHoraLsprfJeRCjSxuURhc", "n": "xHScZMPo8FifoDcrgncWQ7mGJtiKhrsho0-uFPXg-OdnRKYudTD7-Bq1MDjcqWRf3IfDVjFJixQS61M7wm9wALDj--lLuJJ9jDUAWTA3xWvQLbiBM-gqU0sj4mc2lWm6nPfqlyYeWtQcSC0sYkLlayNgX4noKDaXivhVOp7bwGXq77MRzeL4-9qrRYKjuzHfZL7kNBCsqO185P0NI2Jtmw-EsqYsrCaHsfNRGRrTvUHUq3hWa859kK_5uNd7TeY2ZEwKVD8ezCmSfR59ZzyxTtuPpkCSHS9OtUvS3mqTYit73qcvprjl3R8hpjXLb8oftfpWr3hFRdpxrwuoQEO4QQ", "e": "AQAB", "x5c": [ "MIIC8TCCAdmgAwIBAgIQfEWlTVc1uINEc9RBi6qHMjANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDExhsb2dpbi5taWNyb3NvZnRvbmxpbmUudXMwHhcNMTgxMDE0MDAwMDAwWhcNMjAxMDE0MDAwMDAwWjAjMSEwHwYDVQQDExhsb2dpbi5taWNyb3NvZnRvbmxpbmUudXMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDEdJxkw+jwWJ+gNyuCdxZDuYYm2IqGuyGjT64U9eD452dEpi51MPv4GrUwONypZF/ch8NWMUmLFBLrUzvCb3AAsOP76Uu4kn2MNQBZMDfFa9AtuIEz6CpTSyPiZzaVabqc9+qXJh5a1BxILSxiQuVrI2BfiegoNpeK+FU6ntvAZervsxHN4vj72qtFgqO7Md9kvuQ0EKyo7Xzk/Q0jYm2bD4SypiysJoex81EZGtO9QdSreFZrzn2Qr/m413tN5jZkTApUPx7MKZJ9Hn1nPLFO24+mQJIdL061S9LeapNiK3vepy+muOXdHyGmNctvyh+1+laveEVF2nGvC6hAQ7hBAgMBAAGjITAfMB0GA1UdDgQWBBQ5TKadw06O0cvXrQbXW0Nb3M3h/DANBgkqhkiG9w0BAQsFAAOCAQEAI48JaFtwOFcYS/3pfS5+7cINrafXAKTL+/+he4q+RMx4TCu/L1dl9zS5W1BeJNO2GUznfI+b5KndrxdlB6qJIDf6TRHh6EqfA18oJP5NOiKhU4pgkF2UMUw4kjxaZ5fQrSoD9omjfHAFNjradnHA7GOAoF4iotvXDWDBWx9K4XNZHWvD11Td66zTg5IaEQDIZ+f8WS6nn/98nAVMDtR9zW7Te5h9kGJGfe6WiHVaGRPpBvqC4iypGHjbRwANwofZvmp5wP08hY1CsnKY5tfP+E2k/iAQgKKa6QoxXToYvP7rsSkglak8N5g/+FJGnq4wP6cOzgZpjdPMwaVt5432GA==" ] } ] } """ access_token = """ { "token_type": "Bearer", "scope": "User.Read", "expires_in": "3600", "ext_expires_in": "3600", "expires_on": "1553983022", "not_before": "1553979122", "resource": "00000002-0000-0000-c000-000000000000", "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik4tbEMwbi05REFMcXdodUhZbkhRNjNHZUNYYyIsImtpZCI6Ik4tbEMwbi05REFMcXdodUhZbkhRNjNHZUNYYyJ9.eyJhdWQiOiIwMDAwMDAwMi0wMDAwLTAwMDAtYzAwMC0wMDAwMDAwMDAwMDAiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9mMjQzNDFlZi03YTZmLTRjZmYtYWJiNy05OWExMWFiMTExMjcvIiwiaWF0IjoxNTUzOTc5MTIyLCJuYmYiOjE1NTM5NzkxMjIsImV4cCI6MTU1Mzk4MzAyMiwiYWNyIjoiMSIsImFpbyI6IkFVUUF1LzhLQUFBQStQZzdRcW5EUFY3Q1JFdEsweUlESFdoTHVLL1BzZFQ3ZmtKSHE3YmxFT0dZMGpyTERvanJ4STVpUjk1eU0xZCsrVkQwZ3VuTSt5K2RpYVhvL0ErdzZBPT0iLCJhbHRzZWNpZCI6IjE6bGl2ZS5jb206MDAwMzQwMDFGMTI1MUFBRCIsImFtciI6WyJwd2QiXSwiYXBwaWQiOiIzOGJhNjIyMy1hODg3LTQzZTItOWY3ZC04ZDUzOWRmNTVmNjciLCJhcHBpZGFjciI6IjEiLCJlbWFpbCI6Im5mc2F0dGVybHlAZ21haWwuY29tIiwiZmFtaWx5X25hbWUiOiJTYXR0ZXJseSIsImdpdmVuX25hbWUiOiJOaWNrIiwiaWRwIjoibGl2ZS5jb20iLCJpcGFkZHIiOiIxNDUuMTQuMTEyLjEwMyIsIm5hbWUiOiJOaWNrIFNhdHRlcmx5Iiwib2lkIjoiZGNhMGFjYWItMTcyNy00MTJiLWEwM2EtMGUzYTRiNjYyNmIxIiwicHVpZCI6IjEwMDMyMDAwM0M2ODk5ODYiLCJzY3AiOiJVc2VyLlJlYWQiLCJzdWIiOiJndWN1a2FaNzRrSmtxVGZpdGpQQ1ZsVWkyQ1J4NUtVdVFaTDlNaWpRUlZRIiwidGVuYW50X3JlZ2lvbl9zY29wZSI6IkVVIiwidGlkIjoiZjI0MzQxZWYtN2E2Zi00Y2ZmLWFiYjctOTlhMTFhYjExMTI3IiwidW5pcXVlX25hbWUiOiJsaXZlLmNvbSNuZnNhdHRlcmx5QGdtYWlsLmNvbSIsInV0aSI6ImJOeC1UbVlZY2tXbUxmekxFLUVWQUEiLCJ2ZXIiOiIxLjAifQ.GM_KwtpOX18LHgA-0y7sdKM5DKiHaoSfA81lClJulkJ2nPJROpGND226m2MJycQqrNrYz-kEMe-6_rpApian1-xGygsprwa4lDwUtIlxa_PQs4-DQB9GFC9h31o4bPhnP5QqH5bjNZzpUTX_9v91qe9hwpbBct0fHgl9uVZD-aW8TYCLNx5_OhAb9uOmCN6prvmhK4Ttv47UU4mfWmXMInUlRIZUJ-84izdqWPeV9rk6Y6WqttwFNVunzXUGQ_1FujJB2RbHXbSrk-JKl12HOm0NA-m4Xxn0Z0K3oA2LOYtwCiTvrNtlcUDr6Lwy3vGnNtzzUAwsrTCWWvwzrfEpWw", "refresh_token": "AQABAAAAAACEfexXxjamQb3OeGQ4GugvEpV_oEBJ-4rwh3wnP_fgyuzUG0l2_I6ofeaxYrRJbmZIuybWJMVtrFt1mcxepuqkYP_X8ngoivbN4RI0kRtxI59bLbedLhq3lUUlcJIThiPLL0WRPDy7St6gICL-vbsEMe4y_1ltjoiGBlj8OaOk4o5BVWbKkXtzy2gI6IPNKHukHZ00T1sPZWA0YrObLlu9h-Tt1CcdoLxWSWRGshATAu-XepC7MNgmjSvQAUXxuW7Y6t_w3gSHGyNlPpEVm_H3oKU2RLSMvQsLi-PKLJ0WS3DXYy01V6AG3huyWY562Cd80xcgT1Ly2gl4kBjsxGwABxwNSEcgyCWVs4nzWKCdzcZ1mscyAtmY4Kr74xxGlIwPQ6Sx34gLEunnoHDGXn_RE0ipzc7qg-e5Ws8bv8_JLVHQYXm4Mi_5KRpuh_5tFBtbn5aUc6TJQqRyQOUrG_A4IER_YbTN0u90Io0C4acrp9GVidpFagmG2vL-dqczZ-rv0rLmhX0uRE__PHz7biY0UaRNURgS4hkDB33vyEsw5o-E3N9b09ajwhHiz55PkV22LfESB5ebPpRW2d5AZmKwPBkE57Z0i9oC8Z_ZfIrO2xo_deDXFiKKndFbzIlnYc4Th37lcVBd5B3yDAtfLJNkw7dtCHA4caS7kYayako2cPvkYpM13Jh3dNEiYtY9rUeaF8fkj0pvOH0g4gITQdRcMAFtyHosXrRWMrbweIVYpZ5HOF18abZcmnGs41jUjci4GR_q0SJvdt15-QdmMdDu4GlFFfNvZTtpxKb51ref1a44sdTr77fgFWVFVlYgaw3yyDV3PoYrrWksf3xFEYfOvfhZ6OkroYewPGcVwcDW-4WkEceD-RcMRzkjd1Mecu5RAPQeIWjxort6Gq1OvVHbUl4eSLA256mxLJur0W84vOHZpv3rgg9SbUP81tcPRwYGT00xJDt-mXh1mEx9RukPLpJ_BgU51TvOnch_YsFCnRW-C2jBY40OJvHqpFxZ2vUhpiROxj9phJEPO0APWTdpmXmQdycWchfoxB9LhCLF6S16fX-3rmvMc-woIhV0oNQmZt5n2HHPx-LQsHVOkNs93nr6yzIcNXLfw-QkJScArlLwgtEJ9vXVnefCLhA6TNHXYxquf6FJbarih4LB-51Cf9NmejaA8-nWLL6Sdv5234fXm-9mVq1gKeAdIM4JctidYyfm7juuDZtY3ocDiHGNK-gqPmOklWxp2hOL6ry3haoqC--j9DFNbN6cAavMX00t_NBTKA8U4qRY6yHidF_xoxM9_HwZp0SHJgJzYYKRJKxc0pfvRFHFM_Ciwb4xsFjn7OIMoxkfvAUD2Mp2JaZuQBXeOSt4l-oe1xKQoJbGdcEZa1J9Gr0BRoQhtvFiUoJa3ahNlPTsbCY38oFFS7tnIAA", "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJhdWQiOiIzOGJhNjIyMy1hODg3LTQzZTItOWY3ZC04ZDUzOWRmNTVmNjciLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9mMjQzNDFlZi03YTZmLTRjZmYtYWJiNy05OWExMWFiMTExMjcvIiwiaWF0IjoxNTUzOTc5MTIyLCJuYmYiOjE1NTM5NzkxMjIsImV4cCI6MTU1Mzk4MzAyMiwiYW1yIjpbInB3ZCJdLCJlbWFpbCI6Im5mc2F0dGVybHlAZ21haWwuY29tIiwiZmFtaWx5X25hbWUiOiJTYXR0ZXJseSIsImdpdmVuX25hbWUiOiJOaWNrIiwiaWRwIjoibGl2ZS5jb20iLCJpcGFkZHIiOiIxNDUuMTQuMTEyLjEwMyIsIm5hbWUiOiJOaWNrIFNhdHRlcmx5Iiwib2lkIjoiZGNhMGFjYWItMTcyNy00MTJiLWEwM2EtMGUzYTRiNjYyNmIxIiwic3ViIjoiOUhZaGR3X2Y3NjdyWE5JazUyamFfNldNeTE3UENTTGttcXZQSGlwcnNjYyIsInRpZCI6ImYyNDM0MWVmLTdhNmYtNGNmZi1hYmI3LTk5YTExYWIxMTEyNyIsInVuaXF1ZV9uYW1lIjoibGl2ZS5jb20jbmZzYXR0ZXJseUBnbWFpbC5jb20iLCJ2ZXIiOiIxLjAifQ." } """ userinfo = r""" { "aio": "AVQAq/8KAAAAFfowTD/1PFNpiTdO2zhegMtdKv8enA2o5jRatUb6GvYsZg3DXiAwcLnGvLngrqtL1Kb4eInAWXgHIorirIGG2kycNq3C8fLk4jzrgoFl9yA=", "amr": "[\"pwd\"]", "email": "nfsatterly@gmail.com", "family_name": "Satterly", "given_name": "Nick", "idp": "live.com", "ipaddr": "145.14.112.103", "name": "Nick Satterly", "oid": "dca0acab-1727-412b-a03a-0e3a4b6626b1", "sub": "9HYhdw_f767rXNIk52ja_6WMy17PCSLkmqvPHiprscc", "tid": "f24341ef-7a6f-4cff-abb7-99a11ab11127", "unique_name": "live.com#nfsatterly@gmail.com", "uti": "EBafu2Mx2UekJd5Y_24fAA", "ver": "1.0" } """ m.get('https://sts.windows.net/f24341ef-7a6f-4cff-abb7-99a11ab11127/.well-known/openid-configuration', text=discovery_doc) m.get('https://login.microsoftonline.com/common/discovery/keys', text=jwks_uri) m.post('https://login.microsoftonline.com/f24341ef-7a6f-4cff-abb7-99a11ab11127/oauth2/token', text=access_token) m.get('https://login.microsoftonline.com/f24341ef-7a6f-4cff-abb7-99a11ab11127/openid/userinfo', text=userinfo) self.app = create_app(test_config) self.client = self.app.test_client() with self.app.test_request_context('/'): self.app.preprocess_request() self.api_key = ApiKey( user='admin@alerta.io', scopes=[Scope.admin, Scope.read, Scope.write], text='demo-key' ) self.api_key.create() self.headers = { 'Authorization': f'Key {self.api_key.key}', 'Content-type': 'application/json' } # add customer mapping payload = { 'customer': 'Alerta IO', 'match': 'nfsatterly@gmail.com' } response = self.client.post('/customer', data=json.dumps(payload), content_type='application/json', headers=self.headers) self.assertEqual(response.status_code, 201) response = self.client.post('/auth/openid', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.name, 'Nick Satterly', claims) self.assertEqual(claims.preferred_username, 'nfsatterly@gmail.com', claims) self.assertEqual(claims.email, 'nfsatterly@gmail.com', claims) self.assertEqual(claims.provider, 'openid', claims) # self.assertEqual(claims.roles, ['user'], claims) self.assertEqual(claims.scopes, ['read', 'write'], claims) self.assertEqual(claims.email_verified, True, claims) self.assertEqual(claims.customers, ['Alerta IO'], claims) token_endpoint_request = m.request_history[2] data = parse_qs(token_endpoint_request.text) self.assertEqual(data['client_id'], ['38ba6223-a887-43e2-9f7d-8d539df55f67']) self.assertEqual(data['client_secret'], ['oauth2-client-secret']) @requests_mock.mock() def test_azure_v2(self, m): test_config = { 'TESTING': True, 'AUTH_REQUIRED': True, 'AUTH_PROVIDER': 'azure', 'AZURE_TENANT': 'common', 'OIDC_TOKEN_AUTH_METHODS': ['client_secret_post', 'client_secret_basic'], 'OAUTH2_CLIENT_ID': '00bb046a-36d9-4411-b93a-2f10fb35f0b5', 'OAUTH2_CLIENT_SECRET': 'oauth2-client-secret', 'CUSTOMER_VIEWS': True, } authorization_grant = """ { "code": "Mfd029b75-69e8-db17-b6c8-9062cafb6d06", "clientId": "00bb046a-36d9-4411-b93a-2f10fb35f0b5", "redirectUri": "http://localhost:8000", "state": "kr8y390mokk" } """ discovery_doc = """ { "authorization_endpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", "token_endpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token", "token_endpoint_auth_methods_supported": [ "client_secret_post", "private_key_jwt", "client_secret_basic" ], "jwks_uri": "https://login.microsoftonline.com/common/discovery/v2.0/keys", "response_modes_supported": [ "query", "fragment", "form_post" ], "subject_types_supported": [ "pairwise" ], "id_token_signing_alg_values_supported": [ "RS256" ], "http_logout_supported": true, "frontchannel_logout_supported": true, "end_session_endpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/logout", "response_types_supported": [ "code", "id_token", "code id_token", "id_token token" ], "scopes_supported": [ "openid", "profile", "email", "offline_access" ], "issuer": "https://login.microsoftonline.com/{tenantid}/v2.0", "claims_supported": [ "sub", "iss", "cloud_instance_name", "cloud_instance_host_name", "cloud_graph_host_name", "msgraph_host", "aud", "exp", "iat", "auth_time", "acr", "nonce", "preferred_username", "name", "tid", "ver", "at_hash", "c_hash", "email" ], "request_uri_parameter_supported": false, "userinfo_endpoint": "https://graph.microsoft.com/oidc/userinfo", "tenant_region_scope": null, "cloud_instance_name": "microsoftonline.com", "cloud_graph_host_name": "graph.windows.net", "msgraph_host": "graph.microsoft.com", "rbac_url": "https://pas.windows.net" } """ jwks_uri = """ { "keys": [ { "kty": "RSA", "use": "sig", "kid": "HBxl9mAe6gxavCkcoOU2THsDNa0", "x5t": "HBxl9mAe6gxavCkcoOU2THsDNa0", "n": "0afCaiPd_xl_ewZGfOkxKwYPfI4Efu0COfzajK_gnviWk7w3R-88Dmb0j24DSn1qVR3ptCnA1-QUfUMyhvl8pT5-t7oRkLNPzp0hVV-dAG3ZoMaSEMW0wapshA6LVGROpBncDmc66hx5-t3eOFA24fiKfQiv2TJth3Y9jhHnLe7GBOoomWYx_pJiEG3mhYFIt7shaEwNcEjo34vr1WWzRm8D8gogjrJWd1moyeGftWLzvfp9e79QwHYJv907vQbFrT7LYuy8g7-Rpxujgumw2mx7CewcCZXwPiZ-raM3Ap1FhINiGpd5mbbYrFDDFIWAjWPUY6KNvXtc24yUfZr4MQ", "e": "AQAB", "x5c": [ "MIIDBTCCAe2gAwIBAgIQWcq84CdVhKVEcKbZdMOMGjANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTE5MDMxNDAwMDAwMFoXDTIxMDMxNDAwMDAwMFowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANGnwmoj3f8Zf3sGRnzpMSsGD3yOBH7tAjn82oyv4J74lpO8N0fvPA5m9I9uA0p9alUd6bQpwNfkFH1DMob5fKU+fre6EZCzT86dIVVfnQBt2aDGkhDFtMGqbIQOi1RkTqQZ3A5nOuocefrd3jhQNuH4in0Ir9kybYd2PY4R5y3uxgTqKJlmMf6SYhBt5oWBSLe7IWhMDXBI6N+L69Vls0ZvA/IKII6yVndZqMnhn7Vi8736fXu/UMB2Cb/dO70Gxa0+y2LsvIO/kacbo4LpsNpsewnsHAmV8D4mfq2jNwKdRYSDYhqXeZm22KxQwxSFgI1j1GOijb17XNuMlH2a+DECAwEAAaMhMB8wHQYDVR0OBBYEFIkZ5wrSV8lohIsreOmig7h5wQDkMA0GCSqGSIb3DQEBCwUAA4IBAQAd8sKZLwZBocM4pMIRKarK60907jQCOi1m449WyToUcYPXmU7wrjy9fkYwJdC5sniItVBJ3RIQbF/hyjwnRoIaEcWYMAftBnH+c19WIuiWjR3EHnIdxmSopezl/9FaTNghbKjZtrKK+jL/RdkMY9uWxwUFLjTAtMm24QOt2+CGntBA9ohQUgiML/mlUpf4qEqa2/Lh+bjiHl3smg4TwuIl0i/TMN9Rg7UgQ6BnqfgiuMl6BtBiatNollwgGNI2zJEi47MjdeMf8+C3tXs//asqqlqJCyVLwN7AN47ynYmkl89MleOfKIojhrGRxryZG2nRjD9u/kZbPJ8e3JE9px67" ], "issuer": "https://login.microsoftonline.com/{tenantid}/v2.0" }, { "kty": "RSA", "use": "sig", "kid": "CtfQC8Le-8NsC7oC2zQkZpcrfOc", "x5t": "CtfQC8Le-8NsC7oC2zQkZpcrfOc", "n": "jmRWLbot3VWk7VHgzdUS0Oac_FY4ffz-fXyqlFFByYxYcI2X1Bm51kBfw7YDvDxTEew5yGECElKCUaNoe4eWc0OCrLNTisjLJ3oS0XhR0DDKm8iB15ciyCpJxHoqhN9_fBjpaOBucKKNzKWU0dBu8biX_vS3h0hr2Bc6M5G9YVPIWBrOGPfwzUrk3d3gikyNF8lTvxWFzUj9yuUhuwlD2UuAEtwwKT0LC7aZz-GjuRwUxnuNNSlPie3imrlGeII1tnILNJ7bC3dJvoTr9M9lptAThDkFFahpssSsCir4dBkViDTMsDw5CC9jtPWKTwH33P6fSrcwxl0gZJKpFNlGyw", "e": "AQAB", "x5c": [ "MIIDBTCCAe2gAwIBAgIQIKS1IbCfX7xH/fHDCq11ljANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTE5MDQyNDAwMDAwMFoXDTIxMDQyNDAwMDAwMFowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAI5kVi26Ld1VpO1R4M3VEtDmnPxWOH38/n18qpRRQcmMWHCNl9QZudZAX8O2A7w8UxHsOchhAhJSglGjaHuHlnNDgqyzU4rIyyd6EtF4UdAwypvIgdeXIsgqScR6KoTff3wY6WjgbnCijcyllNHQbvG4l/70t4dIa9gXOjORvWFTyFgazhj38M1K5N3d4IpMjRfJU78Vhc1I/crlIbsJQ9lLgBLcMCk9Cwu2mc/ho7kcFMZ7jTUpT4nt4pq5RniCNbZyCzSe2wt3Sb6E6/TPZabQE4Q5BRWoabLErAoq+HQZFYg0zLA8OQgvY7T1ik8B99z+n0q3MMZdIGSSqRTZRssCAwEAAaMhMB8wHQYDVR0OBBYEFFjkfvrQ97CY5HSyrhd98vkwj0SuMA0GCSqGSIb3DQEBCwUAA4IBAQAHVEnT+HZIxZc2jIdPqKcwCyCR4t44dsDTLYpvLB87iAJHckWgSblqgi/2hgW773PURIFSVWZbyT+/EgDPy0Bd+SHn0P9f4dOSrEWK6Ug3/GsOnUzooJ4SNcP91Shv5y5n5kCcZuglpnTBil85q+ZgB44CXQ5dPzDlZgO2IcCi2ZCYPGZUvKWSFnkQa0pjXu6wAArj1wWGbX7LuaPsSkOD1MK0A1/ve9V9kTeYr0fmmP+hD2TtOY+5fcv9oMbMQuL99Pwr+erjN3dDz7bQ0SDK+E8cerYgorHqjSIxbgH55yR9M1ca8sRriTl8Ah0rLAp/JIpFzn35oyrzCf6zzzWh" ], "issuer": "https://login.microsoftonline.com/{tenantid}/v2.0" }, { "kty": "RSA", "use": "sig", "kid": "u4OfNFPHwEBosHjtrauObV84LnY", "x5t": "u4OfNFPHwEBosHjtrauObV84LnY", "n": "oRRQG-ib30x09eWtDpL0wWahA-hgjc0lWoQU4lwBFjXV2PfPImiAvwxOxNG34Mgnw3K9huBYLsrvOQAbMdBmE8lwz8DFKMWqHqoH3xSqDGhIYFobQDiVRkkecpberH5hqJauSD7PiwDBSQ_RCDIjb0SOmSTpZR97Ws4k1z9158VRf4BUbGjzVt4tUAz_y2cI5JsXQfcgAPB3voP8eunxGwZ_iM8evw3hUOw7-nuiPyts7HSkvV6GMwrXfOymY_w07mYxw_2LnKInfsWBtcRIDG-Nrsj237LgtBhK7TkzuVrguq__-bkDwwF3qTRXGAX9KrwY4huRxDRslMIg30Hqgw", "e": "AQAB", "x5c": [ "MIIDBTCCAe2gAwIBAgIQdEMOjSqDVbdN3mzb2IumCzANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTE5MDYwNDAwMDAwMFoXDTIxMDYwNDAwMDAwMFowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKEUUBvom99MdPXlrQ6S9MFmoQPoYI3NJVqEFOJcARY11dj3zyJogL8MTsTRt+DIJ8NyvYbgWC7K7zkAGzHQZhPJcM/AxSjFqh6qB98UqgxoSGBaG0A4lUZJHnKW3qx+YaiWrkg+z4sAwUkP0QgyI29Ejpkk6WUfe1rOJNc/defFUX+AVGxo81beLVAM/8tnCOSbF0H3IADwd76D/Hrp8RsGf4jPHr8N4VDsO/p7oj8rbOx0pL1ehjMK13zspmP8NO5mMcP9i5yiJ37FgbXESAxvja7I9t+y4LQYSu05M7la4Lqv//m5A8MBd6k0VxgF/Sq8GOIbkcQ0bJTCIN9B6oMCAwEAAaMhMB8wHQYDVR0OBBYEFNRP0Lf6MDeL11RDH0uL7H+/JqtLMA0GCSqGSIb3DQEBCwUAA4IBAQCJKR1nxp9Ij/yisCmDG7bdN1yHj/2HdVvyLfCCyReRfkB3cnTZVaIOBy5occGkdmsYJ+q8uqczkoCMAz3gvvq1c0msKEiNpqWNeU2aRXqyL3QZJ/GBmUK1I0tINPVv8j7znm0DcvHHXFvhzS8E4s8ai8vQkcpyac/7Z4PN43HtjDnkZo9Zxm7JahHshrhA8sSPvsuC4dQAcHbOrLbHG+HIo3Tq2pNl7mfQ9fVJ2FxbqlzPYr/rK8H2GTA6N55SuP3KTNvyL3RnMa3hXmGTdG1dpMFzD/IE623h/BqY6j29PyQC/+MUD4UCZ6KW9oIzpi27pKQagH1i1jpBU/ceH6AW" ], "issuer": "https://login.microsoftonline.com/{tenantid}/v2.0" }, { "kty": "RSA", "use": "sig", "kid": "M6pX7RHoraLsprfJeRCjSxuURhc", "x5t": "M6pX7RHoraLsprfJeRCjSxuURhc", "n": "xHScZMPo8FifoDcrgncWQ7mGJtiKhrsho0-uFPXg-OdnRKYudTD7-Bq1MDjcqWRf3IfDVjFJixQS61M7wm9wALDj--lLuJJ9jDUAWTA3xWvQLbiBM-gqU0sj4mc2lWm6nPfqlyYeWtQcSC0sYkLlayNgX4noKDaXivhVOp7bwGXq77MRzeL4-9qrRYKjuzHfZL7kNBCsqO185P0NI2Jtmw-EsqYsrCaHsfNRGRrTvUHUq3hWa859kK_5uNd7TeY2ZEwKVD8ezCmSfR59ZzyxTtuPpkCSHS9OtUvS3mqTYit73qcvprjl3R8hpjXLb8oftfpWr3hFRdpxrwuoQEO4QQ", "e": "AQAB", "x5c": [ "MIIC8TCCAdmgAwIBAgIQfEWlTVc1uINEc9RBi6qHMjANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDExhsb2dpbi5taWNyb3NvZnRvbmxpbmUudXMwHhcNMTgxMDE0MDAwMDAwWhcNMjAxMDE0MDAwMDAwWjAjMSEwHwYDVQQDExhsb2dpbi5taWNyb3NvZnRvbmxpbmUudXMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDEdJxkw+jwWJ+gNyuCdxZDuYYm2IqGuyGjT64U9eD452dEpi51MPv4GrUwONypZF/ch8NWMUmLFBLrUzvCb3AAsOP76Uu4kn2MNQBZMDfFa9AtuIEz6CpTSyPiZzaVabqc9+qXJh5a1BxILSxiQuVrI2BfiegoNpeK+FU6ntvAZervsxHN4vj72qtFgqO7Md9kvuQ0EKyo7Xzk/Q0jYm2bD4SypiysJoex81EZGtO9QdSreFZrzn2Qr/m413tN5jZkTApUPx7MKZJ9Hn1nPLFO24+mQJIdL061S9LeapNiK3vepy+muOXdHyGmNctvyh+1+laveEVF2nGvC6hAQ7hBAgMBAAGjITAfMB0GA1UdDgQWBBQ5TKadw06O0cvXrQbXW0Nb3M3h/DANBgkqhkiG9w0BAQsFAAOCAQEAI48JaFtwOFcYS/3pfS5+7cINrafXAKTL+/+he4q+RMx4TCu/L1dl9zS5W1BeJNO2GUznfI+b5KndrxdlB6qJIDf6TRHh6EqfA18oJP5NOiKhU4pgkF2UMUw4kjxaZ5fQrSoD9omjfHAFNjradnHA7GOAoF4iotvXDWDBWx9K4XNZHWvD11Td66zTg5IaEQDIZ+f8WS6nn/98nAVMDtR9zW7Te5h9kGJGfe6WiHVaGRPpBvqC4iypGHjbRwANwofZvmp5wP08hY1CsnKY5tfP+E2k/iAQgKKa6QoxXToYvP7rsSkglak8N5g/+FJGnq4wP6cOzgZpjdPMwaVt5432GA==" ], "issuer": "https://login.microsoftonline.com/{tenantid}/v2.0" }, { "kty": "RSA", "use": "sig", "kid": "1LTMzakihiRla_8z2BEJVXeWMqo", "x5t": "1LTMzakihiRla_8z2BEJVXeWMqo", "n": "3sKcJSD4cHwTY5jYm5lNEzqk3wON1CaARO5EoWIQt5u-X-ZnW61CiRZpWpfhKwRYU153td5R8p-AJDWT-NcEJ0MHU3KiuIEPmbgJpS7qkyURuHRucDM2lO4L4XfIlvizQrlyJnJcd09uLErZEO9PcvKiDHoois2B4fGj7CsAe5UZgExJvACDlsQSku2JUyDmZUZP2_u_gCuqNJM5o0hW7FKRI3MFoYCsqSEmHnnumuJ2jF0RHDRWQpodhlAR6uKLoiWHqHO3aG7scxYMj5cMzkpe1Kq_Dm5yyHkMCSJ_JaRhwymFfV_SWkqd3n-WVZT0ADLEq0RNi9tqZ43noUnO_w", "e": "AQAB", "x5c": [ "MIIDYDCCAkigAwIBAgIJAIB4jVVJ3BeuMA0GCSqGSIb3DQEBCwUAMCkxJzAlBgNVBAMTHkxpdmUgSUQgU1RTIFNpZ25pbmcgUHVibGljIEtleTAeFw0xNjA0MDUxNDQzMzVaFw0yMTA0MDQxNDQzMzVaMCkxJzAlBgNVBAMTHkxpdmUgSUQgU1RTIFNpZ25pbmcgUHVibGljIEtleTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN7CnCUg+HB8E2OY2JuZTRM6pN8DjdQmgETuRKFiELebvl/mZ1utQokWaVqX4SsEWFNed7XeUfKfgCQ1k/jXBCdDB1NyoriBD5m4CaUu6pMlEbh0bnAzNpTuC+F3yJb4s0K5ciZyXHdPbixK2RDvT3Lyogx6KIrNgeHxo+wrAHuVGYBMSbwAg5bEEpLtiVMg5mVGT9v7v4ArqjSTOaNIVuxSkSNzBaGArKkhJh557pridoxdERw0VkKaHYZQEerii6Ilh6hzt2hu7HMWDI+XDM5KXtSqvw5ucsh5DAkifyWkYcMphX1f0lpKnd5/llWU9AAyxKtETYvbameN56FJzv8CAwEAAaOBijCBhzAdBgNVHQ4EFgQU9IdLLpbC2S8Wn1MCXsdtFac9SRYwWQYDVR0jBFIwUIAU9IdLLpbC2S8Wn1MCXsdtFac9SRahLaQrMCkxJzAlBgNVBAMTHkxpdmUgSUQgU1RTIFNpZ25pbmcgUHVibGljIEtleYIJAIB4jVVJ3BeuMAsGA1UdDwQEAwIBxjANBgkqhkiG9w0BAQsFAAOCAQEAXk0sQAib0PGqvwELTlflQEKS++vqpWYPW/2gCVCn5shbyP1J7z1nT8kE/ZDVdl3LvGgTMfdDHaRF5ie5NjkTHmVOKbbHaWpTwUFbYAFBJGnx+s/9XSdmNmW9GlUjdpd6lCZxsI6888r0ptBgKINRRrkwMlq3jD1U0kv4JlsIhafUIOqGi4+hIDXBlY0F/HJPfUU75N885/r4CCxKhmfh3PBM35XOch/NGC67fLjqLN+TIWLoxnvil9m3jRjqOA9u50JUeDGZABIYIMcAdLpI2lcfru4wXcYXuQul22nAR7yOyGKNOKULoOTE4t4AeGRqCogXSxZgaTgKSBhvhE+MGg==" ], "issuer": "https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0" }, { "kty": "RSA", "use": "sig", "kid": "xP_zn6I1YkXcUUmlBoPuXTGsaxk", "x5t": "xP_zn6I1YkXcUUmlBoPuXTGsaxk", "n": "2pWatafeb3mB0A73-Z-URwrubwDldWvivRu19GNC61MBOb3fZ4I4lyhUhNuS7aJRPJIFB6zl-HFx1nHpGg74BHe0z9skODHYZEACd2iKBIet55DdduIe1CXsZ9keyEmNaGv3XS4OW_7IDM0j5wR9OHugUifkH3PQIcFvTYanHmXojTmgjIOWoz7y0okpyN9-FbZRzdfx-ej-njaj5gR8r69muwO5wlTbIG20V40R6zYh-QODMUpayy7jDGFGw5vjFH9Ca0tLZcNQq__JKE_mp-0fODOAQobOrBUoASFkyCd95BVW7KJrndvW7ofRWaCTuZZOy5SnU4asbjMrgxFZFw", "e": "AQAB", "x5c": [ "MIIDYDCCAkigAwIBAgIJAJzCyTLC+DjJMA0GCSqGSIb3DQEBCwUAMCkxJzAlBgNVBAMTHkxpdmUgSUQgU1RTIFNpZ25pbmcgUHVibGljIEtleTAeFw0xNjA3MTMyMDMyMTFaFw0yMTA3MTIyMDMyMTFaMCkxJzAlBgNVBAMTHkxpdmUgSUQgU1RTIFNpZ25pbmcgUHVibGljIEtleTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANqVmrWn3m95gdAO9/mflEcK7m8A5XVr4r0btfRjQutTATm932eCOJcoVITbku2iUTySBQes5fhxcdZx6RoO+AR3tM/bJDgx2GRAAndoigSHreeQ3XbiHtQl7GfZHshJjWhr910uDlv+yAzNI+cEfTh7oFIn5B9z0CHBb02Gpx5l6I05oIyDlqM+8tKJKcjffhW2Uc3X8fno/p42o+YEfK+vZrsDucJU2yBttFeNEes2IfkDgzFKWssu4wxhRsOb4xR/QmtLS2XDUKv/yShP5qftHzgzgEKGzqwVKAEhZMgnfeQVVuyia53b1u6H0Vmgk7mWTsuUp1OGrG4zK4MRWRcCAwEAAaOBijCBhzAdBgNVHQ4EFgQU11z579/IePwuc4WBdN4L0ljG4CUwWQYDVR0jBFIwUIAU11z579/IePwuc4WBdN4L0ljG4CWhLaQrMCkxJzAlBgNVBAMTHkxpdmUgSUQgU1RTIFNpZ25pbmcgUHVibGljIEtleYIJAJzCyTLC+DjJMAsGA1UdDwQEAwIBxjANBgkqhkiG9w0BAQsFAAOCAQEAiASLEpQseGNahE+9f9PQgmX3VgjJerNjXr1zXWXDJfFE31DxgsxddjcIgoBL9lwegOHHvwpzK1ecgH45xcJ0Z/40OgY8NITqXbQRfdgLrEGJCoyOQEbjb5PW5k2aOdn7LBxvDsH6Y8ax26v+EFMPh3G+xheh6bfoIRSK1b+44PfoDZoJ9NfJibOZ4Cq+wt/yOvpMYQDB/9CNo18wmA3RCLYjf2nAc7RO0PDYHSIq5QDWV+1awmXDKgIdRpYPpRtn9KFXQkpCeEc/lDTG+o6n7nC40wyjioyR6QmHGvNkMR4VfSoTKCTnFATyDpI1bqU2K7KNjUEsCYfwybFB8d6mjQ==" ], "issuer": "https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0" } ] } """ access_token = """ { "token_type": "Bearer", "scope": "openid profile email", "expires_in": 3600, "ext_expires_in": 3600, "access_token": "EwBgA8l6BAAURSN/FHlDW5xN74t6GzbtsBBeBUYAAbQf93kT154CH65oNmvIxyehXU7dBZGBBt2jjbo6uCks4dZIVGkhZ+H3y7E3pYRR3aFNI1km+mzX3Emvs8HGC/0ESsJWOJof9tid6S6dlW0w912+6bmhF48W7T/CasERLLDQhaOtP6FrR5h3igGr64PlHd+JImiWltawHhNIbEmVmqyeDjjBI7J4/rOYEaJXneQu+POi8q+pQXGCx4ePB8OkeDzXuOAI7HcwWSNJlcFa5F8uL4vceQqpnCq9locH/xjNVPAKSqdD4DaLDTKcrPlE8hstQfq+NPuZIEksyzzl9QwUetrY7dEH39ihPogos1A5xHQ4wL1NuHMQW8y4fFcDZgAACPb3lig0AL5lMAIUV0FekjhyzKxZ1o2CD4WtriaYx0eF3j6i4jcd9HnhzZsJaOEQfyS22zKbzcNrkcVaB3z3nCkeBc2hN/1t/zGaH47iaWMkxo8YMp6EMUKX+vLBb7a4hohMRQA+B7LEvrrGSzS+TL5TrmI/m6ypfWI83Vwj7xvo3ESNK2BHJ/cTlJoecKgKsBaqkdgCjv3il38NJ30ekcQpNEwngpexEj63Ar5urZFlisZ3ZULbjaSx1J5nENxh1uFM3yNt1YLs4ttvUvgH+0n6/LC/9JjUcx910ix6GUELRSXOqp5DNGqKDcyYv8BaR5FcE5l99nXjOSSt8J0gWeJ4yA5to3CoGIglX5u9ZWHQdchjUsdMCIAmISqA0Y0O0VKWKg+T6N4qE1fg7nhLYjjwfp/I+t2kZ5fvnUlj+IC3iRB74CWVXtYGpMGHUMqQB2TtqBLImx9bSFlR/Q3MCeE2KEwVMbKv4zjx1XoBQguXijKFeY0PyEzlWgiGSSBNARJfD52v4FGQKJh5QCoo6SlC+Y6rIHf5R0sg1gAb4cquXuQ5TFix9MStK+WwW5j18pmYWGJn9ZY2+cDdT9OozcJ0oAF71GZv1ygGPl8WmwBFNZKzgtDXxYNbd7GxO1SG6Ag8RphoL4p/crS44RC/XTdCKR7SacNycV2ADSWdQ6S652bBsNdZ79f+tRGAAx2bO3rp0j6Vk94AiQNDWX7lQZmRMqQ52nLb0WwR9JpPUyMpgQexitHFpw7sW3YC", "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjFMVE16YWtpaGlSbGFfOHoyQkVKVlhlV01xbyJ9.eyJ2ZXIiOiIyLjAiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vOTE4ODA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkL3YyLjAiLCJzdWIiOiJBQUFBQUFBQUFBQUFBQUFBQUFBQUFGUXRFVFZJeEpISjdIVTRpTkJVbGVNIiwiYXVkIjoiMDBiYjA0NmEtMzZkOS00NDExLWI5M2EtMmYxMGZiMzVmMGI1IiwiZXhwIjoxNTU5OTgwOTQ5LCJpYXQiOjE1NTk4OTQyNDksIm5iZiI6MTU1OTg5NDI0OSwibmFtZSI6Ik5pY2sgU2F0dGVybHkiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJuaWNrLnNhdHRlcmx5QGhvdG1haWwuY29tIiwib2lkIjoiMDAwMDAwMDAtMDAwMC0wMDAwLTA2OTYtNmYzYjQ1NmVjY2QxIiwiZW1haWwiOiJuaWNrLnNhdHRlcmx5QGhvdG1haWwuY29tIiwidGlkIjoiOTE4ODA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkIiwiYWlvIjoiRGZ6UjgwRFpEVWMxaSp0cHVacXJoVUd4Snh5eHJzUW5PZVp5V040KnZNIWY1NDB0SklpdXdkcDR0azdyejZIdDNjIWtLWWk5WDFLRzhiT0UhVGhrN1BFVHRCZVNxOWt1U291YnJ2TWdUZHhSd1ZrRUhSSU8xcFFiMlNkcUJ2ZXZkU0Q2Y0M1YktUUTFBUTZqTGxuR1dZOCQifQ.G03Jyl5o-lKSAixQ8SBU71BT7FrsR3FXcbpcdQ7EHMeF9RG7MgVeqeUsr0iXHsFdxqyxpNttGj_7E2tGHqTdlqe66Nbj7IrwhjQymT32hte17fzwENKeu2k7yqNI5HsY0_iSzqKOgglDy5LXNqY9OA5L69UaMyp2txVUTLCh0WOWgtlAtLs0YSnow_HgJstgkKZZRTrNmTDaf86YOEAl9ATHOLPPWeacNjh2JkDgL4vVlNFkE_DJkpB6Iw-ARMi34dulp8BFdpD0Y6bpw9F8QqeFLcmLXvd15u7Xg0oEQSI22-FqRm5xA8JQ09pxrusvi6xc3yjqy8VUCd8RZDrsXg" } """ userinfo = r""" { "sub": "AAAAAAAAAAAAAAAAAAAAAFQtETVIxJHJ7HU4iNBUleM" } """ m.get('https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration', text=discovery_doc) m.get('https://login.microsoftonline.com/common/discovery/v2.0/keys', text=jwks_uri) m.post('https://login.microsoftonline.com/common/oauth2/v2.0/token', text=access_token) m.get('https://graph.microsoft.com/oidc/userinfo', text=userinfo) self.app = create_app(test_config) self.client = self.app.test_client() with self.app.test_request_context('/'): self.app.preprocess_request() self.api_key = ApiKey( user='admin@alerta.io', scopes=[Scope.admin, Scope.read, Scope.write], text='demo-key' ) self.api_key.create() self.headers = { 'Authorization': f'Key {self.api_key.key}', 'Content-type': 'application/json' } # add customer mapping payload = { 'customer': 'Hotmail', 'match': 'hotmail.com' } response = self.client.post('/customer', data=json.dumps(payload), content_type='application/json', headers=self.headers) self.assertEqual(response.status_code, 201) response = self.client.post('/auth/openid', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.name, 'Nick Satterly', claims) self.assertEqual(claims.preferred_username, 'nick.satterly@hotmail.com', claims) self.assertEqual(claims.email, 'nick.satterly@hotmail.com', claims) self.assertEqual(claims.provider, 'azure', claims) # self.assertEqual(claims.roles, ['user'], claims) self.assertEqual(claims.scopes, ['read', 'write'], claims) self.assertEqual(claims.email_verified, True, claims) self.assertEqual(claims.customers, ['Hotmail'], claims) token_endpoint_request = m.request_history[2] data = parse_qs(token_endpoint_request.text) self.assertEqual(data['client_id'], ['00bb046a-36d9-4411-b93a-2f10fb35f0b5']) self.assertEqual(data['client_secret'], ['oauth2-client-secret']) @requests_mock.mock() def test_github(self, m): test_config = { 'TESTING': True, 'AUTH_REQUIRED': True, 'AUTH_PROVIDER': 'github', # 'GITHUB_URL': 'https://github.com', 'OAUTH2_CLIENT_ID': '4f846ebb21eec62ebdf0', 'OAUTH2_CLIENT_SECRET': 'oauth2-client-secret', # note that for testing ROLE and GROUP are reversed 'GITHUB_ROLE_CLAIM': 'organizations', 'GITHUB_GROUP_CLAIM': 'teams', 'ALLOWED_GITHUB_ORGS': ['alerta'], 'CUSTOMER_VIEWS': True, } authorization_grant = """ { "code": "342633785949fc9da249", "clientId": "4f846ebb21eec62ebdf0", "redirectUri": "http://local.alerta.io:8000" } """ access_token = """ { "access_token": "ef0b62b3d7f14ca003008dcaee2b313265fa6199", "token_type": "bearer", "scope": "read:org,user:email" } """ profile = """ { "login": "satterly", "id": 615058, "node_id": "MDQ6VXNlcgYxNTA1Nw==", "avatar_url": "https://avatars0.githubusercontent.com/u/615057?v=4", "gravatar_id": "", "url": "https://api.github.com/users/satterly", "html_url": "https://github.com/satterly", "followers_url": "https://api.github.com/users/satterly/followers", "following_url": "https://api.github.com/users/satterly/following{/other_user}", "gists_url": "https://api.github.com/users/satterly/gists{/gist_id}", "starred_url": "https://api.github.com/users/satterly/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/satterly/subscriptions", "organizations_url": "https://api.github.com/users/satterly/orgs", "repos_url": "https://api.github.com/users/satterly/repos", "events_url": "https://api.github.com/users/satterly/events{/privacy}", "received_events_url": "https://api.github.com/users/satterly/received_events", "type": "User", "site_admin": false, "name": "Nick Satterly", "company": "@alerta", "blog": "", "location": "Stockholm", "email": null, "hireable": null, "bio": null, "public_repos": 29, "public_gists": 18, "followers": 76, "following": 4, "created_at": "2011-02-12T23:45:35Z", "updated_at": "2019-05-15T14:27:25Z" } """ teams = """ [ { "id": 1, "node_id": "MDQ6VGVhbTE=", "url": "https://api.github.com/teams/1", "html_url": "https://github.com/orgs/github/teams/justice-league", "name": "Justice League", "slug": "justice-league", "description": "A great team.", "privacy": "closed", "permission": "admin", "members_url": "https://api.github.com/teams/1/members{/member}", "repositories_url": "https://api.github.com/teams/1/repos", "parent": null, "members_count": 3, "repos_count": 10, "created_at": "2017-07-14T16:53:42Z", "updated_at": "2017-08-17T12:37:15Z", "organization": { "login": "github", "id": 1, "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", "url": "https://api.github.com/orgs/github", "repos_url": "https://api.github.com/orgs/github/repos", "events_url": "https://api.github.com/orgs/github/events", "hooks_url": "https://api.github.com/orgs/github/hooks", "issues_url": "https://api.github.com/orgs/github/issues", "members_url": "https://api.github.com/orgs/github/members{/member}", "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "description": "A great organization", "name": "github", "company": "GitHub", "blog": "https://github.com/blog", "location": "San Francisco", "email": "octocat@github.com", "is_verified": true, "has_organization_projects": true, "has_repository_projects": true, "public_repos": 2, "public_gists": 1, "followers": 20, "following": 0, "html_url": "https://github.com/octocat", "created_at": "2008-01-14T04:33:35Z", "updated_at": "2017-08-17T12:37:15Z", "type": "Organization" } } ] """ orgs = """ [ { "login": "ganglia", "id": 360097, "node_id": "MDEyOk9yZ2FuaXphdGlvbjM2MDA5Nw==", "url": "https://api.github.com/orgs/ganglia", "repos_url": "https://api.github.com/orgs/ganglia/repos", "events_url": "https://api.github.com/orgs/ganglia/events", "hooks_url": "https://api.github.com/orgs/ganglia/hooks", "issues_url": "https://api.github.com/orgs/ganglia/issues", "members_url": "https://api.github.com/orgs/ganglia/members{/member}", "public_members_url": "https://api.github.com/orgs/ganglia/public_members{/member}", "avatar_url": "https://avatars2.githubusercontent.com/u/360097?v=4", "description": null }, { "login": "alerta", "id": 5067139, "node_id": "MDEyOk9yZ2FuaXphdGlvbjUwNjcxMzk=", "url": "https://api.github.com/orgs/alerta", "repos_url": "https://api.github.com/orgs/alerta/repos", "events_url": "https://api.github.com/orgs/alerta/events", "hooks_url": "https://api.github.com/orgs/alerta/hooks", "issues_url": "https://api.github.com/orgs/alerta/issues", "members_url": "https://api.github.com/orgs/alerta/members{/member}", "public_members_url": "https://api.github.com/orgs/alerta/public_members{/member}", "avatar_url": "https://avatars1.githubusercontent.com/u/5067139?v=4", "description": "@alertaio" } ] """ m.post('https://github.com/login/oauth/access_token', text=access_token) m.get('https://api.github.com/user', text=profile) m.get('https://api.github.com/user/teams', text=teams) m.get('https://api.github.com/user/orgs', text=orgs) self.app = create_app(test_config) self.client = self.app.test_client() with self.app.test_request_context('/'): self.app.preprocess_request() self.api_key = ApiKey( user='admin@alerta.io', scopes=[Scope.admin, Scope.read, Scope.write], text='demo-key' ) self.api_key.create() self.headers = { 'Authorization': f'Key {self.api_key.key}', 'Content-type': 'application/json' } # add customer mappings payload = { 'customer': 'Alerta IO', 'match': 'alerta' } response = self.client.post('/customer', data=json.dumps(payload), content_type='application/json', headers=self.headers) self.assertEqual(response.status_code, 201) payload = { 'customer': 'Justice League', 'match': 'github/justice-league' } response = self.client.post('/customer', data=json.dumps(payload), content_type='application/json', headers=self.headers) self.assertEqual(response.status_code, 201) response = self.client.post('/auth/github', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.name, 'Nick Satterly', claims) self.assertEqual(claims.preferred_username, '@satterly', claims) self.assertEqual(claims.provider, 'github', claims) self.assertEqual(claims.groups, ['github/justice-league'], claims) self.assertEqual(claims.orgs, ['ganglia', 'alerta'], claims) self.assertEqual(claims.scopes, ['read', 'write'], claims) self.assertEqual(claims.email_verified, False, claims) self.assertEqual(claims.customers, ['Justice League'], claims) @requests_mock.mock() def test_gitlab(self, m): test_config = { 'TESTING': True, 'AUTH_REQUIRED': True, 'AUTH_PROVIDER': 'gitlab', # 'OIDC_ISSUER_URL': 'https://gitlab.com', 'OAUTH2_CLIENT_ID': '765904e9909fc9cc5c448a887849029d999cc2e400e097221bf910be39a16678', 'OAUTH2_CLIENT_SECRET': 'oauth2-client-secret', # 'OIDC_CUSTOM_CLAIM': 'groups', 'ALLOWED_GITLAB_GROUPS': ['alerta-project'], 'CUSTOMER_VIEWS': True, } authorization_grant = """ { "code": "68d753e94fab78d24e13cfa34882c2740b74ba251859bec147f56281d6ea1dd1", "clientId": "765904e9909fc9cc5c448a887849029d999cc2e400e097221bf910be39a16678", "redirectUri": "http://local.alerta.io:8000" } """ discovery_doc = """ { "issuer": "https://gitlab.com", "authorization_endpoint": "https://gitlab.com/oauth/authorize", "token_endpoint": "https://gitlab.com/oauth/token", "userinfo_endpoint": "https://gitlab.com/oauth/userinfo", "jwks_uri": "https://gitlab.com/oauth/discovery/keys", "scopes_supported": [ "api", "read_user", "sudo", "read_repository", "read_registry", "openid", "profile", "email" ], "response_types_supported": [ "code", "token" ], "response_modes_supported": [ "query", "fragment" ], "token_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post" ], "subject_types_supported": [ "public" ], "id_token_signing_alg_values_supported": [ "RS256" ], "claim_types_supported": [ "normal" ], "claims_supported": [ "iss", "sub", "aud", "exp", "iat", "sub_legacy", "name", "nickname", "email", "email_verified", "website", "profile", "picture", "groups" ] } """ jwks_uri = """ { "keys": [ { "kty": "RSA", "kid": "kewiQq9jiC84CvSsJYOB-N6A8WFLSV20Mb-y7IlWDSQ", "e": "AQAB", "n": "5RyvCSgBoOGNE03CMcJ9Bzo1JDvsU8XgddvRuJtdJAIq5zJ8fiUEGCnMfAZI4of36YXBuBalIycqkgxrRkSOENRUCWN45bf8xsQCcQ8zZxozu0St4w5S-aC7N7UTTarPZTp4BZH8ttUm-VnK4aEdMx9L3Izo0hxaJ135undTuA6gQpK-0nVsm6tRVq4akDe3OhC-7b2h6z7GWJX1SD4sAD3iaq4LZa8y1mvBBz6AIM9co8R-vU1_CduxKQc3KxCnqKALbEKXm0mTGsXha9aNv3pLNRNs_J-cCjBpb1EXAe_7qOURTiIHdv8_sdjcFTJ0OTeLWywuSf7mD0Wpx2LKcD6ImENbyq5IBuR1e2ghnh5Y9H33cuQ0FRni8ikq5W3xP3HSMfwlayhIAJN_WnmbhENRU-m2_hDPiD9JYF2CrQneLkE3kcazSdtarPbg9ZDiydHbKWCV-X7HxxIKEr9N7P1V5HKatF4ZUrG60e3eBnRyccPwmT66i9NYyrcy1_ZNN8D1DY8xh9kflUDy4dSYu4R7AEWxNJWQQov525v0MjD5FNAS03rpk4SuW3Mt7IP73m-_BpmIhW3LZsnmfd8xHRjf0M9veyJD0--ETGmh8t3_CXh3I3R9IbcSEntUl_2lCvc_6B-m8W-t2nZr4wvOq9-iaTQXAn1Au6EaOYWvDRE", "use": "sig", "alg": "RS256" } ] } """ access_token = """ { "access_token": "2152f0d2256fe245a98532e699cc7fae51c24fc85437d0f095246ae0890db0fe", "token_type": "bearer", "refresh_token": "10687059782a69dd76db7466b5f6fbe3395b9db09e78319db61d5473e31e7b2f", "scope": "openid profile email", "created_at": 1553982929, "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Imtld2lRcTlqaUM4NEN2U3NKWU9CLU42QThXRkxTVjIwTWIteTdJbFdEU1EifQ.eyJpc3MiOiJodHRwczovL2dpdGxhYi5jb20iLCJzdWIiOiIxNTY1MDEyIiwiYXVkIjoiNzY1OTA0ZTk5MDlmYzljYzVjNDQ4YTg4Nzg0OTAyOWQ5OTljYzJlNDAwZTA5NzIyMWJmOTEwYmUzOWExNjY3OCIsImV4cCI6MTU1Mzk4MzE2MywiaWF0IjoxNTUzOTgzMDQzLCJhdXRoX3RpbWUiOjE1NTMwMjQ3ODksInN1Yl9sZWdhY3kiOiJlZDk4YjUwZGI5NzdlNmNlMTczMjRhYTkyMmMzZDBlYmIwMzdiYTRjNjBkN2RlZjE2YjQ5YzlkYmJmYjIyYzc1In0.O0SpmNXksWxM1WFH9G8_0cK4d1nVg2bYV2ICUZLn6kKX5ZJ48TOTtNMPpSGF_8MkF-ZlPNse9bsx8Dp_1BmIZCVqhV0bMkRGHtPUYZJEflLln8-mOOpg0ave55HG3yYXTaegPc60CDA-UnXTVhOkzVnvjPF2RcD7EgVKXYOyI2uJ9aebz43_h02eNjIAnJig8VZAeJZbt-0LE2rMlMB3aLS9a3C015_HR9cjqoeZ4ckUpg4F3xRpROpA5hZvpRsZRRq5W56mlSrZ_6GysPCxsruxOgNkw9Of5j-i1IWGxH0mM8oG4EtRIL7y4sBO16YYKVQihkJ1zAtFLa5wQH7pK6I4uShJAoqq21EhDJqZU3-ucuWupbQHubybGdrl_y6Gk6oxFb8BHHf2yE6faQ1QznwT5kiqZH1vdCGr9HP2PheNKZnXuGn-EKy0HRI_tuN5tcIvHV4cXa6xbeiYGCgbZWqJpLWTCLDuPzT_BsinLwgZW5bvO7zXs6N5VRaWWbC03A9FWIZK9tl1xFGfa411eFVM-G5UBEjJNvT0kZHdiNHGkNG-MyO1soT0p741e-yvKQEIQwdo6kyNZ-ZJ6yA0NSmHZy4b3DM67zn5L8uZ0fSToQV0oYnbDjn40Tm83qL3oZqvLr4Y1kKQjO9AK5kOzLtFRNqxvZ2d-FtkdyHgTKM" } """ tokeninfo = """ { "resource_owner_id": 1565012, "scopes": [ "openid", "profile", "email" ], "expires_in_seconds": null, "application": { "uid": "765904e9909fc9cc5c448a887849029d999cc2e400e097221bf910be39a16678" }, "created_at": 1553982929 } """ userinfo = """ { "sub": "1565012", "sub_legacy": "ed98b50db977e6ce17324aa922c3d0ebb037ba4c60d7def16b49c9dbbfb22c75", "name": "Nick Satterly", "nickname": "satterly", "email": "nfsatterly@gmail.com", "email_verified": true, "website": "http://alerta.io", "profile": "https://gitlab.com/satterly", "picture": "https://secure.gravatar.com/avatar/520444488b63424244e4c90a5b943b91?s=80&d=identicon", "groups": [ "team-alerta", "alertaio", "alerta-project", "team-alerta/core", "team-alerta/cli", "team-alerta/sdk" ] } """ m.get('https://gitlab.com/.well-known/openid-configuration', text=discovery_doc) m.get('https://gitlab.com/oauth/discovery/keys', text=jwks_uri) m.post('https://gitlab.com/oauth/token', text=access_token) m.get('https://gitlab.com/oauth/token/info', text=tokeninfo) m.get('https://gitlab.com/oauth/userinfo', text=userinfo) self.app = create_app(test_config) self.client = self.app.test_client() with self.app.test_request_context('/'): self.app.preprocess_request() self.api_key = ApiKey( user='admin@alerta.io', scopes=[Scope.admin, Scope.read, Scope.write], text='demo-key' ) self.api_key.create() self.headers = { 'Authorization': f'Key {self.api_key.key}', 'Content-type': 'application/json' } # add customer mapping payload = { 'customer': 'Alerta IO', 'match': 'alertaio' } response = self.client.post('/customer', data=json.dumps(payload), content_type='application/json', headers=self.headers) self.assertEqual(response.status_code, 201) response = self.client.post('/auth/gitlab', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.name, 'Nick Satterly', claims) self.assertEqual(claims.preferred_username, 'satterly', claims) self.assertEqual(claims.email, 'nfsatterly@gmail.com', claims) self.assertEqual(claims.provider, 'gitlab', claims) self.assertEqual(claims.groups, ['team-alerta', 'alertaio', 'alerta-project', 'team-alerta/core', 'team-alerta/cli', 'team-alerta/sdk'], claims) self.assertEqual(claims.scopes, ['read', 'write'], claims) self.assertEqual(claims.email_verified, True, claims) self.assertEqual(claims.customers, ['Alerta IO'], claims) token_endpoint_request = m.request_history[2] self.assertEqual( token_endpoint_request.headers.get('Authorization'), 'Basic NzY1OTA0ZTk5MDlmYzljYzVjNDQ4YTg4Nzg0OTAyOWQ5OTljYzJlNDAwZTA5NzIyMWJmOTEwYmUzOWExNjY3ODpvYXV0aDItY2xpZW50LXNlY3JldA==' ) @requests_mock.mock() def test_google(self, m): test_config = { 'TESTING': True, 'AUTH_REQUIRED': True, 'AUTH_PROVIDER': 'google', # 'OIDC_ISSUER_URL': 'https://accounts.google.com', 'OIDC_TOKEN_AUTH_METHODS': ['client_secret_post', 'client_secret_basic'], 'OAUTH2_CLIENT_ID': '736147134702-glkb1pesv716j1utg4llg7c3rr7nnhli.apps.googleusercontent.com', 'OAUTH2_CLIENT_SECRET': 'oauth2-client-secret', 'CUSTOMER_VIEWS': True, } authorization_grant = """ { "code": "4/HAGPqNLjICAusQsYooo85izagxMM-_KJe2ZrEO7_lRPY7sG7-G79KMt-aZu-L6DF8Yy-Umb5iNXMdzFC041PdEE", "clientId": "736147134702-glkb1pesv716j1utg4llg7c3rr7nnhli.apps.googleusercontent.com", "redirectUri": "http://local.alerta.io:8000" } """ discovery_doc = """ { "issuer": "https://accounts.google.com", "authorization_endpoint": "https://accounts.google.com/o/oauth2/v2/auth", "token_endpoint": "https://oauth2.googleapis.com/token", "userinfo_endpoint": "https://openidconnect.googleapis.com/v1/userinfo", "revocation_endpoint": "https://oauth2.googleapis.com/revoke", "jwks_uri": "https://www.googleapis.com/oauth2/v3/certs", "response_types_supported": [ "code", "token", "id_token", "code token", "code id_token", "token id_token", "code token id_token", "none" ], "subject_types_supported": [ "public" ], "id_token_signing_alg_values_supported": [ "RS256" ], "scopes_supported": [ "openid", "email", "profile" ], "token_endpoint_auth_methods_supported": [ "client_secret_post", "client_secret_basic" ], "claims_supported": [ "aud", "email", "email_verified", "exp", "family_name", "given_name", "iat", "iss", "locale", "name", "picture", "sub" ], "code_challenge_methods_supported": [ "plain", "S256" ] } """ jwks_uri = """ { "keys": [ { "alg": "RS256", "n": "yyeEmeK35F8P54ozfpsF79n59ZsOrcZdxQWsxrzm0qjdA5r_b-be-cQnWAw_2AoGdeWHX-Cz7uPFDMdEwzLGlpv3SELi34h8PkzjyO7xlbhsNs-ICnqUyUTA7CovKtpJ47PjiQnXcaRNCFUQbli8VlEqbVLuqFjC98igICpNYR-iiVIm0VCFtkq0p8vf1yQ493Pnx2Bm8fUx6SkeJ7wKPWQq_K4e6ZH40JWLk6c1U9W5qPKeckevdNLrdZY5lsTZ5zrRvuRBoIeZfp9bKSZGMtEja4xSCDKLrkcpb4qf6Ywx9rsZ4b8eHSLpVvUzNsj3GS7qK5flHzoccovhPVBbbQ", "use": "sig", "kid": "0905d6f9cd9b0f1f852e8b207e8f673abca4bf75", "e": "AQAB", "kty": "RSA" }, { "kid": "a4313e7fd1e9e2a4ded3b292d2a7f4e519574308", "e": "AQAB", "kty": "RSA", "alg": "RS256", "n": "lO3_QoRd_D8UHAjFcdg0_8GOiLyWo4Viiy8cDLNGf8T1eQlqqhPYZmvGOPhyILWZ9FInOXT9AzH5KPfeOnMEzy4TqfGLtdcAlufqALe_qusmq7SSNIVfSw5iPZjzXk3BXjzoFNZLfqsoqheGzek-sJV1Ti5JQQ2hRPSZQhba9xVn6G8Uxr5ugVhHQ25P6HL4acjhuvpSPEFn7tivEIhWZEL35CeqHelf-48WA4PLzRVvfFMS-hW6erjX7uxT9mj8uT7zGl41_zBd9lMn2CQeP3aLDeQFoFaLaX2NZctRASErz6H9MIXQngM1piKnc84hmify-ZAsPpBcxw7heFpYRw", "use": "sig" } ] } """ access_token = """ { "access_token": "ya29.GmPbBq199Kx4bH7wwQrAnuQ4F6DhVn9Y3qCVnalVqVnOcFhJSqV5dZiABs4jbS8LFyVFBBYy_VXLmCRt4h4eP7sN11NyIK1kj-7M0t1RB6GvKS1ElLZBjvVzDDCoHG3SFVJVZAc", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email openid", "token_type": "Bearer", "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImE0MzEzZTdmZDFlOWUyYTRkZWQzYjI5MmQyYTdmNGU1MTk1NzQzMDgiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiI3MzYxNDcxMzQ3MDItZ2xrYjFwZXN2NzE2ajF1dGc0bGxnN2MzcnI3bm5obGkuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiI3MzYxNDcxMzQ3MDItZ2xrYjFwZXN2NzE2ajF1dGc0bGxnN2MzcnI3bm5obGkuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMDQwMDQ3NjQ4MjQwNjYzNTkzOTAiLCJlbWFpbCI6Im5mc2F0dGVybHlAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImF0X2hhc2giOiJVY29QSlE5d3ZNYTljY2VLdmZHdXVBIiwibmFtZSI6Ik5pY2sgU2F0dGVybHkiLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDYuZ29vZ2xldXNlcmNvbnRlbnQuY29tLy1KU2dzbjFpbFhhRS9BQUFBQUFBQUFBSS9BQUFBQUFBQUFMcy9pRFRybjFTdFo1Yy9zOTYtYy9waG90by5qcGciLCJnaXZlbl9uYW1lIjoiTmljayIsImZhbWlseV9uYW1lIjoiU2F0dGVybHkiLCJsb2NhbGUiOiJlbi1HQiIsImlhdCI6MTU1Mzg2MDE0MiwiZXhwIjoxNTUzODYzNzQyfQ.MM14xSL1E1VfHtoSUCqe1L8R6M8xY7tkr0D8PoMhOAGheXehUruGl9R73mI8ciALkqRWZJMWO-v7wgEEik9r5jJh3NbRGT0I4obQMKsKglyAvdYKl5_heB18tkg-p08EKt90CGW7bIHVyZbHPBqW0U1EvN34v2qpDv2OuErHSfJhPAY514i0EltRKhKf4t2PdbfDq6_iSz5cVCbAIzFHj7NRHL42GsYsxWohfF4OckXOQCScJk7upyFPKP2UZ14vkARIn5sagmyLynKvnXLtwwBx5n9zvsKyx63wrGsQDd8TfuN6kWM-eDI796QfW62iZ1-I0XAe_CJdjcpjA7M4Uw" } """ userinfo = """ { "sub": "104004764824066359390", "name": "Nick Satterly", "given_name": "Nick", "family_name": "Satterly", "picture": "https://lh6.googleusercontent.com/-JSgsn1ilXaE/AAAAAAAAAAI/AAAAAAAAALs/iDTrn1StZ5c/photo.jpg", "email": "nfsatterly@gmail.com", "email_verified": true, "locale": "en-GB" } """ m.get('https://accounts.google.com/.well-known/openid-configuration', text=discovery_doc) m.get('https://www.googleapis.com/oauth2/v3/certs', text=jwks_uri) m.post('https://oauth2.googleapis.com/token', text=access_token) m.get('https://openidconnect.googleapis.com/v1/userinfo', text=userinfo) self.app = create_app(test_config) self.client = self.app.test_client() with self.app.test_request_context('/'): self.app.preprocess_request() self.api_key = ApiKey( user='admin@alerta.io', scopes=[Scope.admin, Scope.read, Scope.write], text='demo-key' ) self.api_key.create() self.headers = { 'Authorization': f'Key {self.api_key.key}', 'Content-type': 'application/json' } # add customer mapping payload = { 'customer': 'Google Inc.', 'match': 'gmail.com' } response = self.client.post('/customer', data=json.dumps(payload), content_type='application/json', headers=self.headers) self.assertEqual(response.status_code, 201) response = self.client.post('/auth/google', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.name, 'Nick Satterly', claims) self.assertEqual(claims.preferred_username, 'nfsatterly@gmail.com', claims) self.assertEqual(claims.email, 'nfsatterly@gmail.com', claims) self.assertEqual(claims.provider, 'google', claims) # self.assertEqual(claims.roles, ['user'], claims) self.assertEqual(claims.scopes, ['read', 'write'], claims) self.assertEqual(claims.email_verified, True, claims) self.assertEqual(claims.customers, ['Google Inc.'], claims) token_endpoint_request = m.request_history[1] data = parse_qs(token_endpoint_request.text) self.assertEqual(data['client_id'], ['736147134702-glkb1pesv716j1utg4llg7c3rr7nnhli.apps.googleusercontent.com']) self.assertEqual(data['client_secret'], ['oauth2-client-secret']) @requests_mock.mock() def test_keycloak(self, m): test_config = { 'TESTING': True, 'AUTH_REQUIRED': True, 'AUTH_PROVIDER': 'keycloak', 'KEYCLOAK_URL': 'http://keycloak.local.alerta.io:9090', 'KEYCLOAK_REALM': 'master', 'OAUTH2_CLIENT_ID': 'alerta-ui', 'OAUTH2_CLIENT_SECRET': 'oauth2-client-secret', 'OIDC_CUSTOM_CLAIM': 'roles', # 'OIDC_ISSUER_URL': 'http://keycloak.local.alerta.io:9090/auth/realms/master', # 'OIDC_ROLE_CLAIM': 'roles', 'ALLOWED_OIDC_ROLES': ['alerta-project'], 'CUSTOMER_VIEWS': True } authorization_grant = """ { "code": "5b48d2b7-78fb-4399-bdd3-d3fa227270fe.9c3393ab-5150-4c5f-b131-b17dfbc098f6.077fc6f0-9eef-4d02-ade8-4220348ad3c4", "clientId": "alerta-ui", "redirectUri": "http://local.alerta.io:8000", "state": "67xpd400cg7" } """ discovery_doc = """ { "issuer": "http://keycloak.local.alerta.io:9090/auth/realms/master", "authorization_endpoint": "http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/auth", "token_endpoint": "http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/token", "token_introspection_endpoint": "http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/token/introspect", "userinfo_endpoint": "http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/userinfo", "end_session_endpoint": "http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/logout", "jwks_uri": "http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/certs", "check_session_iframe": "http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/login-status-iframe.html", "grant_types_supported": [ "authorization_code", "implicit", "refresh_token", "password", "client_credentials" ], "response_types_supported": [ "code", "none", "id_token", "token", "id_token token", "code id_token", "code token", "code id_token token" ], "subject_types_supported": [ "public", "pairwise" ], "id_token_signing_alg_values_supported": [ "ES384", "RS384", "HS256", "HS512", "ES256", "RS256", "HS384", "ES512", "RS512" ], "userinfo_signing_alg_values_supported": [ "ES384", "RS384", "HS256", "HS512", "ES256", "RS256", "HS384", "ES512", "RS512", "none" ], "request_object_signing_alg_values_supported": [ "ES384", "RS384", "ES256", "RS256", "ES512", "RS512", "none" ], "response_modes_supported": [ "query", "fragment", "form_post" ], "registration_endpoint": "http://keycloak.local.alerta.io:9090/auth/realms/master/clients-registrations/openid-connect", "token_endpoint_auth_methods_supported": [ "private_key_jwt", "client_secret_basic", "client_secret_post", "client_secret_jwt" ], "token_endpoint_auth_signing_alg_values_supported": [ "RS256" ], "claims_supported": [ "sub", "iss", "auth_time", "name", "given_name", "family_name", "preferred_username", "email" ], "claim_types_supported": [ "normal" ], "claims_parameter_supported": false, "scopes_supported": [ "openid", "address", "email", "offline_access", "phone", "profile", "roles", "web-origins" ], "request_parameter_supported": true, "request_uri_parameter_supported": true, "code_challenge_methods_supported": [ "plain", "S256" ], "tls_client_certificate_bound_access_tokens": true, "introspection_endpoint": "http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/token/introspect" } """ jwks_uri = """ { "keys": [ { "kid": "ve675JT-ilurPYgTl3-CHmZap-Vt-ucMbEv3nvKc6Ic", "kty": "RSA", "alg": "RS256", "use": "sig", "n": "mKJV_q1RCxz0m8tB4gOmN640erE1a9jGsPY0n50l6_a_GCS5rgy6vawl9tKc5eBNh8Wc-pdzPjLFd-PqKUmKMOBGpm9riTrTVQoqvU6115qvi5XSAYX2mbaUFaz7GjrI1KU7W7SkWMRR7tAGNkYIOW2hSblhzJYst7w3uSs1cuTxzV11xkMx0Yh9uGNhkfIUR7FitlpAF5taeJuFV61YJo2sXb38TNun4dSeD9FD1U9odK4jguh37huBv1m8UE5sW2Ud90UuOz4gXUppxHpBIdssaGdTOOON40dT18naTRlQK1wzrO9czQKK47Zi9d1sNz4ciOwJFX1sEx2Nfj403w", "e": "AQAB" } ] } """ access_token = """ { "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ2ZTY3NUpULWlsdXJQWWdUbDMtQ0htWmFwLVZ0LXVjTWJFdjNudktjNkljIn0.eyJqdGkiOiJhMjQzMWM2OC1hMzkzLTQyYWMtYjRjMS1iNmE3NDcwYmJhOWIiLCJleHAiOjE1NTQxNTc4NTMsIm5iZiI6MCwiaWF0IjoxNTU0MTU3NzkzLCJpc3MiOiJodHRwOi8va2V5Y2xvYWsubG9jYWwuYWxlcnRhLmlvOjkwOTAvYXV0aC9yZWFsbXMvbWFzdGVyIiwiYXVkIjpbIm1hc3Rlci1yZWFsbSIsImFjY291bnQiXSwic3ViIjoiNGVlYWExMjItMDhkOC00N2JjLWI2ZDAtMDEwNDgxYzA1NWM1IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiYWxlcnRhLXVpIiwiYXV0aF90aW1lIjoxNTU0MTU3Nzg0LCJzZXNzaW9uX3N0YXRlIjoiNjZhMTQyMmEtY2IyOC00NzJjLWFhNzQtYjhiMTNiNTA4ZGRjIiwiYWNyIjoiMCIsImFsbG93ZWQtb3JpZ2lucyI6WyJodHRwOi8vbG9jYWwuYWxlcnRhLmlvOjgwMDAiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImNyZWF0ZS1yZWFsbSIsImRldm9wcyIsImFkbWluIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsibWFzdGVyLXJlYWxtIjp7InJvbGVzIjpbInZpZXctcmVhbG0iLCJ2aWV3LWlkZW50aXR5LXByb3ZpZGVycyIsIm1hbmFnZS1pZGVudGl0eS1wcm92aWRlcnMiLCJpbXBlcnNvbmF0aW9uIiwiY3JlYXRlLWNsaWVudCIsIm1hbmFnZS11c2VycyIsInF1ZXJ5LXJlYWxtcyIsInZpZXctYXV0aG9yaXphdGlvbiIsInF1ZXJ5LWNsaWVudHMiLCJxdWVyeS11c2VycyIsIm1hbmFnZS1ldmVudHMiLCJtYW5hZ2UtcmVhbG0iLCJ2aWV3LWV2ZW50cyIsInZpZXctdXNlcnMiLCJ2aWV3LWNsaWVudHMiLCJtYW5hZ2UtYXV0aG9yaXphdGlvbiIsIm1hbmFnZS1jbGllbnRzIiwicXVlcnktZ3JvdXBzIl19LCJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6Im9wZW5pZCBlbWFpbCBwcm9maWxlIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsInJvbGVzIjpbImNyZWF0ZS1yZWFsbSIsImRldm9wcyIsImFkbWluIl0sIm5hbWUiOiJOaWNob2xhcyBTYXR0ZXJseSIsInByZWZlcnJlZF91c2VybmFtZSI6Im5zYXR0ZXJsIiwiZ2l2ZW5fbmFtZSI6Ik5pY2hvbGFzIiwiZmFtaWx5X25hbWUiOiJTYXR0ZXJseSIsImVtYWlsIjoibmlja0BhbGVydGEuZGV2In0.WS-XrAlRNP7JvNggjwmRT_Eurjui_FzUK4asyJF9cr4X3xXPK9mGj8euwevyKr0VodahKX0vR59fBtmcGzPaGJfMucxWNwxwNVLpbiZzQuopYJ66xNxbNXpuvmsp9zSk-ct9cOD4Oo5dVnB0Lz55ytTLyyhzaRWO-XJeTpDrSey3Qg2mihmPRkKYOz2oacQeQV2IFWyZC8MOs4BdGw_386VlNDY-RjGffr4nF0HyoSidTh6cpZCQ8WvdsRdYTeArlxlzLxv6NAj9azGop7HP-zdIo_S56Tl_a-idHuzVZuGqHfgDKGWzIWUqAlhz1zABhnOt0IrtT_4f12XQcMRfqA", "expires_in": 60, "refresh_expires_in": 1800, "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4OTdhNmIyZS04YmFhLTQxN2UtOWQ1OS03YWIzZDAzZDJkYmQifQ.eyJqdGkiOiJkMTMyNTc1MS03MGYyLTQ2NzgtODA3NS1jMTU2ZDI0NzJmNDAiLCJleHAiOjE1NTQxNTk1OTMsIm5iZiI6MCwiaWF0IjoxNTU0MTU3NzkzLCJpc3MiOiJodHRwOi8va2V5Y2xvYWsubG9jYWwuYWxlcnRhLmlvOjkwOTAvYXV0aC9yZWFsbXMvbWFzdGVyIiwiYXVkIjoiaHR0cDovL2tleWNsb2FrLmxvY2FsLmFsZXJ0YS5pbzo5MDkwL2F1dGgvcmVhbG1zL21hc3RlciIsInN1YiI6IjRlZWFhMTIyLTA4ZDgtNDdiYy1iNmQwLTAxMDQ4MWMwNTVjNSIsInR5cCI6IlJlZnJlc2giLCJhenAiOiJhbGVydGEtdWkiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiI2NmExNDIyYS1jYjI4LTQ3MmMtYWE3NC1iOGIxM2I1MDhkZGMiLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiY3JlYXRlLXJlYWxtIiwiZGV2b3BzIiwiYWRtaW4iXX0sInJlc291cmNlX2FjY2VzcyI6eyJtYXN0ZXItcmVhbG0iOnsicm9sZXMiOlsidmlldy1yZWFsbSIsInZpZXctaWRlbnRpdHktcHJvdmlkZXJzIiwibWFuYWdlLWlkZW50aXR5LXByb3ZpZGVycyIsImltcGVyc29uYXRpb24iLCJjcmVhdGUtY2xpZW50IiwibWFuYWdlLXVzZXJzIiwicXVlcnktcmVhbG1zIiwidmlldy1hdXRob3JpemF0aW9uIiwicXVlcnktY2xpZW50cyIsInF1ZXJ5LXVzZXJzIiwibWFuYWdlLWV2ZW50cyIsIm1hbmFnZS1yZWFsbSIsInZpZXctZXZlbnRzIiwidmlldy11c2VycyIsInZpZXctY2xpZW50cyIsIm1hbmFnZS1hdXRob3JpemF0aW9uIiwibWFuYWdlLWNsaWVudHMiLCJxdWVyeS1ncm91cHMiXX0sImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUifQ.MOqIkOHBARJ1D8cQIqOSJ6REHTZbcQiA-HlRHBQW3oQ", "token_type": "bearer", "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ2ZTY3NUpULWlsdXJQWWdUbDMtQ0htWmFwLVZ0LXVjTWJFdjNudktjNkljIn0.eyJqdGkiOiI0MjIzMGI4My1hOGM4LTQ0ODEtYWE5My1mMjMwNzk5YWVjMmQiLCJleHAiOjE1NTQxNTc4NTMsIm5iZiI6MCwiaWF0IjoxNTU0MTU3NzkzLCJpc3MiOiJodHRwOi8va2V5Y2xvYWsubG9jYWwuYWxlcnRhLmlvOjkwOTAvYXV0aC9yZWFsbXMvbWFzdGVyIiwiYXVkIjoiYWxlcnRhLXVpIiwic3ViIjoiNGVlYWExMjItMDhkOC00N2JjLWI2ZDAtMDEwNDgxYzA1NWM1IiwidHlwIjoiSUQiLCJhenAiOiJhbGVydGEtdWkiLCJhdXRoX3RpbWUiOjE1NTQxNTc3ODQsInNlc3Npb25fc3RhdGUiOiI2NmExNDIyYS1jYjI4LTQ3MmMtYWE3NC1iOGIxM2I1MDhkZGMiLCJhY3IiOiIwIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsInJvbGVzIjpbImNyZWF0ZS1yZWFsbSIsImRldm9wcyIsImFkbWluIl0sIm5hbWUiOiJOaWNob2xhcyBTYXR0ZXJseSIsInByZWZlcnJlZF91c2VybmFtZSI6Im5zYXR0ZXJsIiwiZ2l2ZW5fbmFtZSI6Ik5pY2hvbGFzIiwiZmFtaWx5X25hbWUiOiJTYXR0ZXJseSIsImVtYWlsIjoibmlja0BhbGVydGEuZGV2In0.H78MN_uRbniCEE6zOKFH9v2l5O_-JaNiP3W7CYiUR2sbA5H0e_vnFRy93A_RhKGiXBdEq-Lop6aE-BPgGgZpBR-G0wi9y0-pPRr3K3UHIL7z8ozUerXJ3g5DzQu3zFyHF9v62ew12YtBzRwebl2mW0_32_zEMlQPs3AzN2LxsjQT5QBV7nzygO_5xfgfA55guiBvJ8D8be13__wO-iQsFnnnFGK6JEbNDTM-M0JXqt4FtRfSEOdCjKRdLSUIfReTo1k2FrD2gtoVOcTOzUN6FCUefa8E52Xy3sgrWSHGUoE9brfoOvzoponiHUVCmbnPhHRTqBOSMZyfDw28v6z63Q", "not-before-policy": 0, "session_state": "66a1422a-cb28-472c-aa74-b8b13b508ddc", "scope": "openid email profile" } """ userinfo = """ { "sub": "4eeaa122-08d8-47bc-b6d0-010481c055c5", "email_verified": true, "roles": [ "create-realm", "devops", "alerta-project", "admin" ], "name": "Nicholas Satterly", "preferred_username": "nsatterl", "given_name": "Nicholas", "family_name": "Satterly", "email": "nick@alerta.dev" } """ m.get('http://keycloak.local.alerta.io:9090/auth/realms/master/.well-known/openid-configuration', text=discovery_doc) m.get('http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/certs', text=jwks_uri) m.post('http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/token', text=access_token) m.get('http://keycloak.local.alerta.io:9090/auth/realms/master/protocol/openid-connect/userinfo', text=userinfo) self.app = create_app(test_config) self.client = self.app.test_client() with self.app.test_request_context('/'): self.app.preprocess_request() self.api_key = ApiKey( user='admin@alerta.io', scopes=[Scope.admin, Scope.read, Scope.write], text='demo-key' ) self.api_key.create() self.headers = { 'Authorization': f'Key {self.api_key.key}', 'Content-type': 'application/json' } # add customer mapping payload = { 'customer': 'Domain Customer', 'match': 'alerta.dev' } response = self.client.post('/customer', data=json.dumps(payload), content_type='application/json', headers=self.headers) self.assertEqual(response.status_code, 201) response = self.client.post('/auth/keycloak', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.name, 'Nicholas Satterly', claims) self.assertEqual(claims.preferred_username, 'nsatterl', claims) self.assertEqual(claims.email, 'nick@alerta.dev', claims) self.assertEqual(claims.provider, 'keycloak', claims) self.assertEqual(claims.roles, ['create-realm', 'devops', 'alerta-project', 'admin'], claims) self.assertEqual(claims.scopes, ['admin', 'read', 'write'], claims) self.assertEqual(claims.email_verified, True, claims) self.assertEqual(claims.customers, ['Domain Customer'], claims) token_endpoint_request = m.request_history[2] self.assertEqual( token_endpoint_request.headers.get('Authorization'), 'Basic YWxlcnRhLXVpOm9hdXRoMi1jbGllbnQtc2VjcmV0' ) @requests_mock.mock() def test_openid_auth0(self, m): test_config = { 'TESTING': True, 'AUTH_REQUIRED': True, 'AUTH_PROVIDER': 'openid', 'OIDC_ISSUER_URL': 'https://dev-66191jdr.eu.auth0.com/', 'OAUTH2_CLIENT_ID': 'LMMEZSlPYKvM14cFxnWNWkC4DgvRk0dZ', 'OAUTH2_CLIENT_SECRET': 'oauth2-client-secret', 'CUSTOMER_VIEWS': True } authorization_grant = """ { "code": "q79ntL3d9mzPFAU-", "clientId": "LMMEZSlPYKvM14cFxnWNWkC4DgvRk0dZ", "redirectUri": "http://local.alerta.io:8000", "state": "051pvr3x5e4y" } """ discovery_doc = """ { "issuer": "https://dev-66191jdr.eu.auth0.com/", "authorization_endpoint": "https://dev-66191jdr.eu.auth0.com/authorize", "token_endpoint": "https://dev-66191jdr.eu.auth0.com/oauth/token", "userinfo_endpoint": "https://dev-66191jdr.eu.auth0.com/userinfo", "mfa_challenge_endpoint": "https://dev-66191jdr.eu.auth0.com/mfa/challenge", "jwks_uri": "https://dev-66191jdr.eu.auth0.com/.well-known/jwks.json", "registration_endpoint": "https://dev-66191jdr.eu.auth0.com/oidc/register", "revocation_endpoint": "https://dev-66191jdr.eu.auth0.com/oauth/revoke", "scopes_supported": [ "openid", "profile", "offline_access", "name", "given_name", "family_name", "nickname", "email", "email_verified", "picture", "created_at", "identities", "phone", "address" ], "response_types_supported": [ "code", "token", "id_token", "code token", "code id_token", "token id_token", "code token id_token" ], "response_modes_supported": [ "query", "fragment", "form_post" ], "subject_types_supported": [ "public" ], "id_token_signing_alg_values_supported": [ "HS256", "RS256" ], "token_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post" ], "claims_supported": [ "aud", "auth_time", "created_at", "email", "email_verified", "exp", "family_name", "given_name", "iat", "identities", "iss", "name", "nickname", "phone_number", "picture", "sub" ], "request_uri_parameter_supported": false } """ jwks_uri = """ { "keys": [ { "alg": "RS256", "kty": "RSA", "use": "sig", "x5c": [ "MIIDDTCCAfWgAwIBAgIJQGmNBJxybcLTMA0GCSqGSIb3DQEBCwUAMCQxIjAgBgNVBAMTGWRldi02NjE5MWpkci5ldS5hdXRoMC5jb20wHhcNMTkwMzMwMDYzODM1WhcNMzIxMjA2MDYzODM1WjAkMSIwIAYDVQQDExlkZXYtNjYxOTFqZHIuZXUuYXV0aDAuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp2ZcAYOMRWIVqO8Ih3qiLXoL0antgVSsyJvlHmvWJN0Oyn9xkmXX3qbJRIYN13Dj2EW0A1mGZYZBHVPDCoAe7dWLFA8UyU8ofQofQ76AXn4zEhI5ETnj5ZkqSMTfZuA8sbKtLtO7alVTPok24a4sfm4ECG8k5Rx59UOX1JIVOsvQLnWhnxYmoe+fB52XqnhY6tXF3Y+v+QC2jCWo1yZpG/ZpegMu4WcmT3zqxWqT4pbamCUH49IfJbVhRISF9JQdytz/ylfzaow4+QTgpMQHx27L99AFhgL9moxglyMmI8OO8yyoabWdkE9GPtKYiaNwxlfagze6sA0XMuWAMAH3NwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQ4VB9WhbNhas/0DpOGSvQqui8j6zAOBgNVHQ8BAf8EBAMCAoQwDQYJKoZIhvcNAQELBQADggEBACix5lFpyx46oTNwwsJKVo3+gZAlLY6/sHldbUpV8MQIC2HXwCjNQAldUWQkMVWSieU3eE4fEUrfRxIwKOXZ/hV5oA9PSnnVAJyRzXuzYijtKPV15D3InnAr3TsgLGw3kWjPUDgXecqxsIo8hnuYaVIcNPJT12mBlZYtBckf4DAMl76/xwy0Y5vdLZX8/MICl8MoXn4a4DXfhyD/SG0mLYUOepdxAKjZNV5EfTQgUVkiZlYRkiKEU0jRy1moRbXDwJ4r7t1sVASO14D8r8JfkPUhqFovijVmk5+dLbLEQlr6mbEe6221riOD2a/Eq8CTukkYzzXxSDfohVniqHO3mLA=" ], "n": "p2ZcAYOMRWIVqO8Ih3qiLXoL0antgVSsyJvlHmvWJN0Oyn9xkmXX3qbJRIYN13Dj2EW0A1mGZYZBHVPDCoAe7dWLFA8UyU8ofQofQ76AXn4zEhI5ETnj5ZkqSMTfZuA8sbKtLtO7alVTPok24a4sfm4ECG8k5Rx59UOX1JIVOsvQLnWhnxYmoe-fB52XqnhY6tXF3Y-v-QC2jCWo1yZpG_ZpegMu4WcmT3zqxWqT4pbamCUH49IfJbVhRISF9JQdytz_ylfzaow4-QTgpMQHx27L99AFhgL9moxglyMmI8OO8yyoabWdkE9GPtKYiaNwxlfagze6sA0XMuWAMAH3Nw", "e": "AQAB", "kid": "MjdFNjIxNjhFN0Y4N0E4RkFCODUyQzAyMUNBQzkxQjNFMDI2MkUyMA", "x5t": "MjdFNjIxNjhFN0Y4N0E4RkFCODUyQzAyMUNBQzkxQjNFMDI2MkUyMA" } ] } """ access_token = """ { "access_token": "h2JFhciS6loTegmGVvGrap5rXZlO-MLg", "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik1qZEZOakl4TmpoRk4wWTROMEU0UmtGQ09EVXlRekF5TVVOQlF6a3hRak5GTURJMk1rVXlNQSJ9.eyJuaWNrbmFtZSI6ImFkbWluIiwibmFtZSI6ImFkbWluQGFsZXJ0YS5kZXYiLCJwaWN0dXJlIjoiaHR0cHM6Ly9zLmdyYXZhdGFyLmNvbS9hdmF0YXIvMzA2YTMxOTRmYzZhNzJkZTk1OTE3MWQyMjQyZjMxYTc_cz00ODAmcj1wZyZkPWh0dHBzJTNBJTJGJTJGY2RuLmF1dGgwLmNvbSUyRmF2YXRhcnMlMkZhZC5wbmciLCJ1cGRhdGVkX2F0IjoiMjAxOS0wMy0zMFQwNjo1ODozNS4yNTZaIiwiZW1haWwiOiJhZG1pbkBhbGVydGEuZGV2IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJpc3MiOiJodHRwczovL2Rldi02NjE5MWpkci5ldS5hdXRoMC5jb20vIiwic3ViIjoiYXV0aDB8NWM5ZjEwNmQxODUxOGMxMWI3MGNhZTk5IiwiYXVkIjoiTE1NRVpTbFBZS3ZNMTRjRnhuV05Xa0M0RGd2UmswZFoiLCJpYXQiOjE1NTM5Mjk1NzYsImV4cCI6MTU1Mzk2NTU3Nn0.lTiboCdvtzIpFWnX2sOqtAgrY5UDe15HjVaiDUPkZPXGpx837o85IVq6YL0OFu2OOqZI3jD_7G-0GsWJpTW7EsIzNfFmWF2s0mTHf0fz1ab6bwBBANEPnAgbbGf-ZyNJNrVdhqy3cJJjpdyc5_9U2Y8ZCzC9wX0f1Fc-0d7sIFJQfLH-GHzoCtKeI7nqSQus8NCS8cToPcw_V7kkgsSSiG4ZRxwymcxANeXqWKoyT2GrOEIGWZZBznwXDu5l42QNvSFkueQjCF9Q5IB7O0G3lRVwssEBQXE6VRymGQjDnN5Ie-66dPQwX7YEbNbOQXCkQqvy8v52yUmlltMwcjToHQ", "scope": "openid profile email", "expires_in": 86400, "token_type": "Bearer" } """ userinfo = """ { "sub": "auth0|5c9f106d18518c11b70cae99", "nickname": "admin", "name": "admin@alerta.dev", "picture": "https://s.gravatar.com/avatar/306a3194fc6a72de959171d2242f31a7?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fad.png", "updated_at": "2019-03-30T06:58:35.256Z", "email": "admin@alerta.dev", "email_verified": false } """ m.get('https://dev-66191jdr.eu.auth0.com/.well-known/openid-configuration', text=discovery_doc) m.get('https://dev-66191jdr.eu.auth0.com/.well-known/jwks.json', text=jwks_uri) m.post('https://dev-66191jdr.eu.auth0.com/oauth/token', text=access_token) m.get('https://dev-66191jdr.eu.auth0.com/userinfo', text=userinfo) self.app = create_app(test_config) self.client = self.app.test_client() with self.app.test_request_context('/'): self.app.preprocess_request() self.api_key = ApiKey( user='admin@alerta.io', scopes=[Scope.admin, Scope.read, Scope.write], text='demo-key' ) self.api_key.create() self.headers = { 'Authorization': f'Key {self.api_key.key}', 'Content-type': 'application/json' } # add customer mapping payload = { 'customer': 'Foo Corp', 'match': 'admin' } response = self.client.post('/customer', data=json.dumps(payload), content_type='application/json', headers=self.headers) self.assertEqual(response.status_code, 201) response = self.client.post('/auth/openid', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.name, 'admin@alerta.dev', claims) self.assertEqual(claims.preferred_username, 'admin', claims) self.assertEqual(claims.email, 'admin@alerta.dev', claims) self.assertEqual(claims.provider, 'openid', claims) # self.assertEqual(claims.roles, ['user'], claims) self.assertEqual(claims.scopes, ['read', 'write'], claims) self.assertEqual(claims.email_verified, False, claims) self.assertEqual(claims.customers, ['Foo Corp'], claims) token_endpoint_request = m.request_history[2] self.assertEqual( token_endpoint_request.headers.get('Authorization'), 'Basic TE1NRVpTbFBZS3ZNMTRjRnhuV05Xa0M0RGd2UmswZFo6b2F1dGgyLWNsaWVudC1zZWNyZXQ=' ) @requests_mock.mock() def test_openid_idp(self, m): test_config = { 'TESTING': True, 'AUTH_REQUIRED': True, 'AUTH_PROVIDER': 'openid', 'OIDC_ISSUER_URL': 'https://dev-66191jdr.eu.auth0.com/', 'OAUTH2_CLIENT_ID': 'LMMEZSlPYKvM14cFxnWNWkC4DgvRk0dZ', 'OAUTH2_CLIENT_SECRET': 'oauth2-client-secret', } authorization_grant = """ { "code": "q79ntL3d9mzPFAU-", "clientId": "LMMEZSlPYKvM14cFxnWNWkC4DgvRk0dZ", "redirectUri": "http://local.alerta.io:8000", "state": "051pvr3x5e4y" } """ discovery_doc = """ { "issuer": "https://dev-66191jdr.eu.auth0.com/", "authorization_endpoint": "https://dev-66191jdr.eu.auth0.com/authorize", "token_endpoint": "https://dev-66191jdr.eu.auth0.com/oauth/token", "userinfo_endpoint": "https://dev-66191jdr.eu.auth0.com/userinfo", "mfa_challenge_endpoint": "https://dev-66191jdr.eu.auth0.com/mfa/challenge", "jwks_uri": "https://dev-66191jdr.eu.auth0.com/.well-known/jwks.json", "registration_endpoint": "https://dev-66191jdr.eu.auth0.com/oidc/register", "revocation_endpoint": "https://dev-66191jdr.eu.auth0.com/oauth/revoke", "scopes_supported": [ "openid", "profile", "offline_access", "name", "given_name", "family_name", "nickname", "email", "email_verified", "picture", "created_at", "identities", "phone", "address" ], "response_types_supported": [ "code", "token", "id_token", "code token", "code id_token", "token id_token", "code token id_token" ], "response_modes_supported": [ "query", "fragment", "form_post" ], "subject_types_supported": [ "public" ], "id_token_signing_alg_values_supported": [ "HS256", "RS256" ], "token_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post" ], "claims_supported": [ "aud", "auth_time", "created_at", "email", "email_verified", "exp", "family_name", "given_name", "iat", "identities", "iss", "name", "nickname", "phone_number", "picture", "sub" ], "request_uri_parameter_supported": false } """ jwks_uri = """ { "keys": [ { "alg": "RS256", "kty": "RSA", "use": "sig", "x5c": [ "MIIDDTCCAfWgAwIBAgIJQGmNBJxybcLTMA0GCSqGSIb3DQEBCwUAMCQxIjAgBgNVBAMTGWRldi02NjE5MWpkci5ldS5hdXRoMC5jb20wHhcNMTkwMzMwMDYzODM1WhcNMzIxMjA2MDYzODM1WjAkMSIwIAYDVQQDExlkZXYtNjYxOTFqZHIuZXUuYXV0aDAuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp2ZcAYOMRWIVqO8Ih3qiLXoL0antgVSsyJvlHmvWJN0Oyn9xkmXX3qbJRIYN13Dj2EW0A1mGZYZBHVPDCoAe7dWLFA8UyU8ofQofQ76AXn4zEhI5ETnj5ZkqSMTfZuA8sbKtLtO7alVTPok24a4sfm4ECG8k5Rx59UOX1JIVOsvQLnWhnxYmoe+fB52XqnhY6tXF3Y+v+QC2jCWo1yZpG/ZpegMu4WcmT3zqxWqT4pbamCUH49IfJbVhRISF9JQdytz/ylfzaow4+QTgpMQHx27L99AFhgL9moxglyMmI8OO8yyoabWdkE9GPtKYiaNwxlfagze6sA0XMuWAMAH3NwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQ4VB9WhbNhas/0DpOGSvQqui8j6zAOBgNVHQ8BAf8EBAMCAoQwDQYJKoZIhvcNAQELBQADggEBACix5lFpyx46oTNwwsJKVo3+gZAlLY6/sHldbUpV8MQIC2HXwCjNQAldUWQkMVWSieU3eE4fEUrfRxIwKOXZ/hV5oA9PSnnVAJyRzXuzYijtKPV15D3InnAr3TsgLGw3kWjPUDgXecqxsIo8hnuYaVIcNPJT12mBlZYtBckf4DAMl76/xwy0Y5vdLZX8/MICl8MoXn4a4DXfhyD/SG0mLYUOepdxAKjZNV5EfTQgUVkiZlYRkiKEU0jRy1moRbXDwJ4r7t1sVASO14D8r8JfkPUhqFovijVmk5+dLbLEQlr6mbEe6221riOD2a/Eq8CTukkYzzXxSDfohVniqHO3mLA=" ], "n": "p2ZcAYOMRWIVqO8Ih3qiLXoL0antgVSsyJvlHmvWJN0Oyn9xkmXX3qbJRIYN13Dj2EW0A1mGZYZBHVPDCoAe7dWLFA8UyU8ofQofQ76AXn4zEhI5ETnj5ZkqSMTfZuA8sbKtLtO7alVTPok24a4sfm4ECG8k5Rx59UOX1JIVOsvQLnWhnxYmoe-fB52XqnhY6tXF3Y-v-QC2jCWo1yZpG_ZpegMu4WcmT3zqxWqT4pbamCUH49IfJbVhRISF9JQdytz_ylfzaow4-QTgpMQHx27L99AFhgL9moxglyMmI8OO8yyoabWdkE9GPtKYiaNwxlfagze6sA0XMuWAMAH3Nw", "e": "AQAB", "kid": "MjdFNjIxNjhFN0Y4N0E4RkFCODUyQzAyMUNBQzkxQjNFMDI2MkUyMA", "x5t": "MjdFNjIxNjhFN0Y4N0E4RkFCODUyQzAyMUNBQzkxQjNFMDI2MkUyMA" } ] } """ # using GitHub credentials access_token = """ { "access_token": "2WkWGsYR6dOdFLFAME3LI-21l15BRFiL", "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik1qZEZOakl4TmpoRk4wWTROMEU0UmtGQ09EVXlRekF5TVVOQlF6a3hRak5GTURJMk1rVXlNQSJ9.eyJuaWNrbmFtZSI6InNhdHRlcmx5IiwibmFtZSI6Ik5pY2sgU2F0dGVybHkiLCJwaWN0dXJlIjoiaHR0cHM6Ly9hdmF0YXJzMC5naXRodWJ1c2VyY29udGVudC5jb20vdS82MTUwNTc_dj00IiwidXBkYXRlZF9hdCI6IjIwMjAtMTEtMDlUMDA6MDY6MjAuMDgxWiIsImVtYWlsIjoibmZzYXR0ZXJseUBnbWFpbC5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6Ly9kZXYtNjYxOTFqZHIuZXUuYXV0aDAuY29tLyIsInN1YiI6ImdpdGh1Ynw2MTUwNTciLCJhdWQiOiJMTU1FWlNsUFlLdk0xNGNGeG5XTldrQzREZ3ZSazBkWiIsImlhdCI6MTYwNDg4MDM4MSwiZXhwIjoxNjA0OTE2MzgxfQ.DslYi1zR2w9PYKX25jh9RMQQXVtoOS21opgl0RA0DZG98WjRztzufeSMjDydyYFrQevB739jItWxXfZU_R1uXwvMghsLOdOqT95roWoFWKQW7Z3o35KI3-9XdkLTQ9E5_IGl8U8J666alsF4kns2qUUeV57xoN3BVPFjVr1mM65tO5xWlGD3Mq3sqEVC0OwxtDelG0C4WgGnSmJQryRbaXKo0kl8ixuEDET2aBqBjXjIZ-Av73IkBBpicAsigGlxjDHxl9y6lmkhuH2ft1f1CZO0XBwFFB7VeX2mozRk9lEMudQVUXaAWZQGZPjKt-M9HbH0SwMv4vm6mchG9jkNUA", "scope": "openid profile email", "expires_in": 86400, "token_type": "Bearer" } """ userinfo = """ { "sub": "github|615057", "nickname": "satterly", "name": "Nick Satterly", "picture": "https://avatars0.githubusercontent.com/u/615057?v=4", "updated_at": "2020-11-09T00:06:20.081Z", "email": "nfsatterly@gmail.com", "email_verified": true } """ m.get('https://dev-66191jdr.eu.auth0.com/.well-known/openid-configuration', text=discovery_doc) m.get('https://dev-66191jdr.eu.auth0.com/.well-known/jwks.json', text=jwks_uri) m.post('https://dev-66191jdr.eu.auth0.com/oauth/token', text=access_token) m.get('https://dev-66191jdr.eu.auth0.com/userinfo', text=userinfo) self.app = create_app(test_config) self.client = self.app.test_client() with self.app.test_request_context('/'): self.app.preprocess_request() self.api_key = ApiKey( user='admin@alerta.io', scopes=[Scope.admin, Scope.read, Scope.write], text='demo-key' ) self.api_key.create() self.headers = { 'Authorization': f'Key {self.api_key.key}', 'Content-type': 'application/json' } response = self.client.post('/auth/openid', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.subject, 'github|615057', claims) self.assertEqual(claims.oid, None, claims) self.assertEqual(claims.preferred_username, 'satterly', claims) self.assertEqual(claims.email, 'nfsatterly@gmail.com', claims) self.assertEqual(claims.email_verified, True, claims) # using Google credentials access_token = """ { "access_token": "Ua37VMJg6W-DuQuO14GyDQlidhUXCNzT", "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik1qZEZOakl4TmpoRk4wWTROMEU0UmtGQ09EVXlRekF5TVVOQlF6a3hRak5GTURJMk1rVXlNQSJ9.eyJnaXZlbl9uYW1lIjoiTmljayIsImZhbWlseV9uYW1lIjoiU2F0dGVybHkiLCJuaWNrbmFtZSI6Im5mc2F0dGVybHkiLCJuYW1lIjoiTmljayBTYXR0ZXJseSIsInBpY3R1cmUiOiJodHRwczovL2xoMy5nb29nbGV1c2VyY29udGVudC5jb20vYS0vQU9oMTRHaFZrS3pQbXI0RnE4cjRIN3R0eTdCc2g5VWY2WlFXZnFVeFJTOVluUT1zOTYtYyIsImxvY2FsZSI6ImVuLUdCIiwidXBkYXRlZF9hdCI6IjIwMjAtMTEtMDlUMDA6MTI6MjYuODQ4WiIsImVtYWlsIjoibmZzYXR0ZXJseUBnbWFpbC5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6Ly9kZXYtNjYxOTFqZHIuZXUuYXV0aDAuY29tLyIsInN1YiI6Imdvb2dsZS1vYXV0aDJ8MTA0MDA0NzY0ODI0MDY2MzU5MzkwIiwiYXVkIjoiTE1NRVpTbFBZS3ZNMTRjRnhuV05Xa0M0RGd2UmswZFoiLCJpYXQiOjE2MDQ4ODA3NDcsImV4cCI6MTYwNDkxNjc0N30.IV_SplyKCwhGHis3gt-tCP1wZ9Enqq5o7IzF6HvP345G2SLVZE8Ue2sOZCqLoVAcWF7nMPPCyjujXXETXCMYoWjcgH67TmlPubG4JZtUkuAoTnyytSVPsm6JQpbeqoFo9urCANuAFuDfuQPUNNupX78EzNOgYmQKY66jZl86Gy28c1FRLOFNzowpGyheBm_tABu4wJTToaVoJhmWGGMsW4oHBoRZ3K2S6UEkkszAp-CtZmTNCKYh-vV9GmW5TXgysAGo0sc0TwyqPzJxLvikDhOYeC8f8uCibNnJ4cmaM1igk1YKAZ97Amom5-AmaE10oHTXP2d-_KRaEsdj5weY1g", "scope": "openid profile email", "expires_in": 86400, "token_type": "Bearer" } """ userinfo = """ { "sub": "google-oauth2|104004764824066359390", "given_name": "Nick", "family_name": "Satterly", "nickname": "nfsatterly", "name": "Nick Satterly", "picture": "https://lh3.googleusercontent.com/a-/AOh14GhVkKzPmr4Fq8r4H7tty7Bsh9Uf6ZQWfqUxRS9YnQ=s96-c", "locale": "en-GB", "updated_at": "2020-11-09T00:12:26.848Z", "email": "nfsatterly@gmail.com", "email_verified": true } """ m.post('https://dev-66191jdr.eu.auth0.com/oauth/token', text=access_token) m.get('https://dev-66191jdr.eu.auth0.com/userinfo', text=userinfo) response = self.client.post('/auth/openid', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.subject, 'google-oauth2|104004764824066359390', claims) self.assertEqual(claims.oid, 'github|615057', claims) self.assertEqual(claims.preferred_username, 'nfsatterly', claims) self.assertEqual(claims.email, 'nfsatterly@gmail.com', claims) self.assertEqual(claims.email_verified, True, claims) token_endpoint_request = m.request_history[2] self.assertEqual( token_endpoint_request.headers.get('Authorization'), 'Basic TE1NRVpTbFBZS3ZNMTRjRnhuV05Xa0M0RGd2UmswZFo6b2F1dGgyLWNsaWVudC1zZWNyZXQ=' ) @requests_mock.mock() def test_openid_okta(self, m): test_config = { 'TESTING': True, 'AUTH_REQUIRED': True, 'AUTH_PROVIDER': 'openid', 'OIDC_ISSUER_URL': 'https://dev-490527.okta.com/oauth2/default', 'OAUTH2_CLIENT_ID': '0oac5s46zwh5crGiH356', 'OAUTH2_CLIENT_SECRET': 'oauth2-client-secret', 'OIDC_ROLE_CLAIM': 'groups', # 'OIDC_CUSTOM_CLAIM': 'groups', 'CUSTOMER_VIEWS': True, } authorization_grant = """ { "code": "tdjeq4_jMQ0P9K-4Csod", "clientId": "0oac5s46zwh5crGiH356", "redirectUri": "http://local.alerta.io:8000", "state": "p3hmwtujboq" } """ discovery_doc = """ { "issuer": "https://dev-490527.okta.com/oauth2/default", "authorization_endpoint": "https://dev-490527.okta.com/oauth2/default/v1/authorize", "token_endpoint": "https://dev-490527.okta.com/oauth2/default/v1/token", "userinfo_endpoint": "https://dev-490527.okta.com/oauth2/default/v1/userinfo", "registration_endpoint": "https://dev-490527.okta.com/oauth2/v1/clients", "jwks_uri": "https://dev-490527.okta.com/oauth2/default/v1/keys", "response_types_supported": [ "code", "id_token", "code id_token", "code token", "id_token token", "code id_token token" ], "response_modes_supported": [ "query", "fragment", "form_post", "okta_post_message" ], "grant_types_supported": [ "authorization_code", "implicit", "refresh_token", "password" ], "subject_types_supported": [ "public" ], "id_token_signing_alg_values_supported": [ "RS256" ], "scopes_supported": [ "openid", "profile", "email", "address", "phone", "offline_access" ], "token_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "none" ], "claims_supported": [ "iss", "ver", "sub", "aud", "iat", "exp", "jti", "auth_time", "amr", "idp", "nonce", "name", "nickname", "preferred_username", "given_name", "middle_name", "family_name", "email", "email_verified", "profile", "zoneinfo", "locale", "address", "phone_number", "picture", "website", "gender", "birthdate", "updated_at", "at_hash", "c_hash" ], "code_challenge_methods_supported": [ "S256" ], "introspection_endpoint": "https://dev-490527.okta.com/oauth2/default/v1/introspect", "introspection_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "none" ], "revocation_endpoint": "https://dev-490527.okta.com/oauth2/default/v1/revoke", "revocation_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "none" ], "end_session_endpoint": "https://dev-490527.okta.com/oauth2/default/v1/logout", "request_parameter_supported": true, "request_object_signing_alg_values_supported": [ "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512" ] } """ jwks_uri = """ { "keys": [ { "kty": "RSA", "alg": "RS256", "kid": "KFvbIZMjjk6Gr47SrEKO8TgeeSswjlQ33X7JCgcnePk", "use": "sig", "e": "AQAB", "n": "meBXoV6oDzN2Rt0Ew7LxlRwmJHatDQ7LOeeW-TABViwTZK_MouvI9JCLuitMjNy-8ex9fl_JXuGsSej7oLgdlkPeinSzmsiMCxpiG2-v4JCdj5gYsKzAkP6j9QV4YHtBT-dds076aMlS1rVDUPiaIXP-PBAvdm4csUNO3aqNmCv1W-xyMTQ7GM_m3Ur-6QLT5gs78-Zhc_dnEljuqrG2zqVPfN7p03l8Ycic_mpE9oT2fevaOQY34ubSjbapYp-8Wz6yEVqAhCWC9LNRtkymGAObBLfaPvr3HKUmtXRYVIahodyDioKLqLAFWklqlqsVm1C-ID8dkdhz3k0Sc_UAsw" } ] } """ access_token = """ { "access_token": "eyJraWQiOiJLRnZiSVpNamprNkdyNDdTckVLTzhUZ2VlU3N3amxRMzNYN0pDZ2NuZVBrIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULlFVZTdDNW1MTmFnT0xVU3VISXdyZFBXN2lPOHVRREdpTVJpS213ZEFZcTQiLCJpc3MiOiJodHRwczovL2Rldi00OTA1Mjcub2t0YS5jb20vb2F1dGgyL2RlZmF1bHQiLCJhdWQiOiJhcGk6Ly9kZWZhdWx0IiwiaWF0IjoxNTUzOTgyMjgzLCJleHAiOjE1NTM5ODU4ODMsImNpZCI6IjBvYWM1czQ2endoNWNyR2lIMzU2IiwidWlkIjoiMDB1YzVzb3BjZWI4OWg1U2szNTYiLCJzY3AiOlsib3BlbmlkIiwicHJvZmlsZSIsImVtYWlsIl0sInN1YiI6Im5mc0BhbGVydGEuZGV2In0.AnQ4r4lXCHRg3kyzFd8uL-5Hgb-9KcAxcjkc32CkJiOogtyp0a3IVHJN6usgl2qTbMxur4R1pMgwn9MlZ4njiflkmADctcrsD5iLtCCzS8AC59XQJsq9xHjAfdRfuaqsWL00Fz2XRyjr3fZmLPzgP7RXXf96Efho9lhefZuSUPaSO46JSdPlTG-_wxTVhaxwLI_b405Dqfv_kS3Ksv5gevbAAHQ8_WRtzNzQoPN_8WR-XO6XHYgC7xKW3yiu01Yn59YRouzIDtQKXNRPMr2CigwbMw2lkikL9eYqLozQ6O7_h2o1pd-X_oJ1QbNyOBjnynIlwS3S9Aws3B-N_KhtSQ", "token_type": "Bearer", "expires_in": 3600, "scope": "openid profile email", "id_token": "eyJraWQiOiJLRnZiSVpNamprNkdyNDdTckVLTzhUZ2VlU3N3amxRMzNYN0pDZ2NuZVBrIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwMHVjNXNvcGNlYjg5aDVTazM1NiIsIm5hbWUiOiJOaWNrIFNhdHRlcmx5IiwiZW1haWwiOiJuZnNAYWxlcnRhLmRldiIsInZlciI6MSwiaXNzIjoiaHR0cHM6Ly9kZXYtNDkwNTI3Lm9rdGEuY29tL29hdXRoMi9kZWZhdWx0IiwiYXVkIjoiMG9hYzVzNDZ6d2g1Y3JHaUgzNTYiLCJpYXQiOjE1NTM5ODIyODMsImV4cCI6MTU1Mzk4NTg4MywianRpIjoiSUQuTHhEWGFOV2VibVRUekxmVHMxUXBBa05pem50VldaNDYycTZFMGlWZE9SOCIsImFtciI6WyJwd2QiXSwiaWRwIjoiMDBvYzVzb21nRXJJWHdjRDgzNTYiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJuZnNAYWxlcnRhLmRldiIsImF1dGhfdGltZSI6MTU1Mzk3MDM5NSwiYXRfaGFzaCI6IjFTbUJKN0s4UkN3dXcxeWJVV1ptdHcifQ.AyWlF4UCBRmdXDJHP6tvu5Z1QjBDzNjXZPKtRtOVdJRhIEMB5rfDMgYh5eBbv5aoK_ZYeHtSNRpXHgof6OldEWZnl8dac-iRiHeFMR65p7YqCpbxzbzYPcDuIbGY_MffGNbH34dDSFruKGg2He8atUwSIczxzMP_5kLgZk2oCMU7S_Uijzf5eosho7AOQ-ybAaWDlxLrxdH8Q0kCfdWcOu0JHFHFlh0-VvCWQVe4uZ6rGdl8_OdaeVdt6xHukEYQTR1QWmmAejEccQ04mgHmgHAjGxNAsXMzOT9mE-FQaDdQkbnap97jYWtIKp78580A5InJedJ3fn_c3brIo2MZYQ" } """ userinfo = """ { "sub": "00uc5sopceb89h5Sk356", "name": "Nick Satterly", "locale": "en-US", "email": "nfs@alerta.dev", "preferred_username": "nfs@alerta.dev", "given_name": "Nick", "family_name": "Satterly", "zoneinfo": "America/Los_Angeles", "updated_at": 1551995091, "email_verified": true, "groups": [ "Everyone" ] } """ m.get('https://dev-490527.okta.com/oauth2/default/.well-known/openid-configuration', text=discovery_doc) m.get('https://dev-490527.okta.com/oauth2/default/v1/keys', text=jwks_uri) m.post('https://dev-490527.okta.com/oauth2/default/v1/token', text=access_token) m.get('https://dev-490527.okta.com/oauth2/default/v1/userinfo', text=userinfo) self.app = create_app(test_config) self.client = self.app.test_client() with self.app.test_request_context('/'): self.app.preprocess_request() self.api_key = ApiKey( user='admin@alerta.io', scopes=[Scope.admin, Scope.read, Scope.write], text='demo-key' ) self.api_key.create() self.headers = { 'Authorization': f'Key {self.api_key.key}', 'Content-type': 'application/json' } # add customer mapping payload = { 'customer': 'Alerta Dev', 'match': 'nfs@alerta.dev' } response = self.client.post('/customer', data=json.dumps(payload), content_type='application/json', headers=self.headers) self.assertEqual(response.status_code, 201) response = self.client.post('/auth/openid', data=authorization_grant, content_type='application/json') self.assertEqual(response.status_code, 200, response.data) data = json.loads(response.data.decode('utf-8')) from alerta.models.token import Jwt with self.app.test_request_context('/'): claims = Jwt.parse(data['token'], verify=False) self.assertEqual(claims.name, 'Nick Satterly', claims) self.assertEqual(claims.preferred_username, 'nfs@alerta.dev', claims) self.assertEqual(claims.email, 'nfs@alerta.dev', claims) self.assertEqual(claims.provider, 'openid', claims) self.assertEqual(claims.groups, ['Everyone'], claims) self.assertEqual(claims.scopes, ['read', 'write'], claims) self.assertEqual(claims.email_verified, True, claims) self.assertEqual(claims.customers, ['Alerta Dev'], claims) token_endpoint_request = m.request_history[2] self.assertEqual( token_endpoint_request.headers.get('Authorization'), 'Basic MG9hYzVzNDZ6d2g1Y3JHaUgzNTY6b2F1dGgyLWNsaWVudC1zZWNyZXQ=' )
54.545805
1,979
0.691526
7,374
113,128
10.426499
0.177787
0.022436
0.022397
0.024933
0.480224
0.459908
0.4427
0.415907
0.396605
0.380685
0
0.092186
0.211035
113,128
2,073
1,980
54.572118
0.769232
0.007328
0
0.621938
0
0.041534
0.796373
0.43368
0
1
0
0
0.058573
1
0.00639
false
0.001597
0.004792
0
0.011715
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
5
43a061f20564c4e376977687019102519ed01ec6
7,409
py
Python
Parser/parsetab.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
Parser/parsetab.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
Parser/parsetab.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
# parsetab.py # This file is automatically generated. Do not edit. # pylint: disable=W,C,R _tabversion = '3.10' _lr_method = 'LALR' _lr_signature = 'leftANDORleftPLUSMINUSleftTIMESDIVIDErightUMINUSleftLPARENRPARENAND DIVIDE FLOAT GE GT ID IE IN LE LIST LPAREN LT MINUS NE NONE NOT NUMBER OR PLUS RPAREN STR TIMES\n expr : expr PLUS expr\n | expr MINUS expr\n | expr TIMES expr\n | expr DIVIDE expr\n \n expr : expr GT expr\n | expr GE expr\n | expr IE expr\n | expr LE expr\n | expr LT expr\n | expr NE expr\n \n expr : expr OR expr\n | expr AND expr\n | NOT expr\n | expr IN expr\n \n expr : list\n \n list : LIST\n \n expr : num\n \n num : NUMBER\n \n expr : float\n \n float : FLOAT\n \n expr : str\n \n str : STR\n \n expr : none\n \n none : NONE\n \n expr : LPAREN expr RPAREN\n \n expr : MINUS expr %prec UMINUS\n ' _lr_action_items = {'NOT':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,]),'LPAREN':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,]),'MINUS':([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[2,16,2,2,-15,-17,-19,-21,-23,2,-16,-18,-20,-22,-24,2,2,2,2,2,2,2,2,2,2,2,2,2,-26,16,16,-1,-2,-3,-4,16,16,16,16,16,16,16,16,16,-25,]),'LIST':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,]),'NUMBER':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,]),'FLOAT':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,]),'STR':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,]),'NONE':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,]),'$end':([1,4,5,6,7,8,10,11,12,13,14,28,29,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[0,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,-13,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-14,-25,]),'PLUS':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[15,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,15,15,-1,-2,-3,-4,15,15,15,15,15,15,15,15,15,-25,]),'TIMES':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[17,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,17,17,17,17,-3,-4,17,17,17,17,17,17,17,17,17,-25,]),'DIVIDE':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[18,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,18,18,18,18,-3,-4,18,18,18,18,18,18,18,18,18,-25,]),'GT':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[19,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,19,19,-1,-2,-3,-4,19,19,19,19,19,19,-11,-12,19,-25,]),'GE':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[20,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,20,20,-1,-2,-3,-4,20,20,20,20,20,20,-11,-12,20,-25,]),'IE':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[21,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,21,21,-1,-2,-3,-4,21,21,21,21,21,21,-11,-12,21,-25,]),'LE':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[22,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,22,22,-1,-2,-3,-4,22,22,22,22,22,22,-11,-12,22,-25,]),'LT':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[23,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,23,23,-1,-2,-3,-4,23,23,23,23,23,23,-11,-12,23,-25,]),'NE':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[24,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,24,24,-1,-2,-3,-4,24,24,24,24,24,24,-11,-12,24,-25,]),'OR':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[25,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,25,25,-1,-2,-3,-4,25,25,25,25,25,25,-11,-12,25,-25,]),'AND':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[26,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,26,26,-1,-2,-3,-4,26,26,26,26,26,26,-11,-12,26,-25,]),'IN':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[27,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,27,27,-1,-2,-3,-4,27,27,27,27,27,27,-11,-12,27,-25,]),'RPAREN':([4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,-13,44,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-14,-25,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): for _x,_y in zip(_v[0],_v[1]): if not _x in _lr_action: _lr_action[_x] = {} _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'expr':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,]),'list':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,]),'num':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,]),'float':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,]),'str':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,]),'none':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): for _x, _y in zip(_v[0], _v[1]): if not _x in _lr_goto: _lr_goto[_x] = {} _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ ("S' -> expr","S'",1,None,None,None), ('expr -> expr PLUS expr','expr',3,'p_expr','demo.py',94), ('expr -> expr MINUS expr','expr',3,'p_expr','demo.py',95), ('expr -> expr TIMES expr','expr',3,'p_expr','demo.py',96), ('expr -> expr DIVIDE expr','expr',3,'p_expr','demo.py',97), ('expr -> expr GT expr','expr',3,'p_compare','demo.py',111), ('expr -> expr GE expr','expr',3,'p_compare','demo.py',112), ('expr -> expr IE expr','expr',3,'p_compare','demo.py',113), ('expr -> expr LE expr','expr',3,'p_compare','demo.py',114), ('expr -> expr LT expr','expr',3,'p_compare','demo.py',115), ('expr -> expr NE expr','expr',3,'p_compare','demo.py',116), ('expr -> expr OR expr','expr',3,'p_logic','demo.py',133), ('expr -> expr AND expr','expr',3,'p_logic','demo.py',134), ('expr -> NOT expr','expr',2,'p_logic','demo.py',135), ('expr -> expr IN expr','expr',3,'p_logic','demo.py',136), ('expr -> list','expr',1,'p_expr_list','demo.py',150), ('list -> LIST','list',1,'p_list','demo.py',157), ('expr -> num','expr',1,'p_expr_num','demo.py',163), ('num -> NUMBER','num',1,'p_num','demo.py',170), ('expr -> float','expr',1,'p_expr_float','demo.py',176), ('float -> FLOAT','float',1,'p_float','demo.py',183), ('expr -> str','expr',1,'p_expr_str','demo.py',190), ('str -> STR','str',1,'p_str','demo.py',197), ('expr -> none','expr',1,'p_expr_none','demo.py',203), ('none -> NONE','none',1,'p_none','demo.py',209), ('expr -> LPAREN expr RPAREN','expr',3,'p_group','demo.py',215), ('expr -> MINUS expr','expr',2,'p_expr_uminus','demo.py',221), ]
129.982456
3,702
0.55878
1,858
7,409
2.177072
0.073735
0.06131
0.012608
0.016811
0.616811
0.56885
0.56885
0.499382
0.481582
0.481582
0
0.355778
0.095964
7,409
56
3,703
132.303571
0.248134
0.011338
0
0.043478
1
0.021739
0.276366
0.009153
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
43c5791087d64a14baace68ec3182012ac3f1417
22
py
Python
sofi/app/__init__.py
danlat/sofi
3305c9552cfe65b477d03ccd51b8b22c5c613dcb
[ "MIT" ]
null
null
null
sofi/app/__init__.py
danlat/sofi
3305c9552cfe65b477d03ccd51b8b22c5c613dcb
[ "MIT" ]
null
null
null
sofi/app/__init__.py
danlat/sofi
3305c9552cfe65b477d03ccd51b8b22c5c613dcb
[ "MIT" ]
null
null
null
from .app import Sofi
11
21
0.772727
4
22
4.25
1
0
0
0
0
0
0
0
0
0
0
0
0.181818
22
1
22
22
0.944444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
78df01d16a32c0bbe7b713ec9c304ace0eeb88ed
3,525
py
Python
tests/test_user.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
14
2020-08-05T15:48:06.000Z
2021-08-18T13:13:39.000Z
tests/test_user.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
4
2020-10-30T14:49:25.000Z
2021-09-29T17:11:53.000Z
tests/test_user.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
null
null
null
import unittest import inspect import files_sdk from tests.base import TestBase from files_sdk.models import User from files_sdk import user class UserTest(TestBase): pass # Instance Methods @unittest.skipUnless(TestBase.mock_server_path_exists("POST", "/users/{id}/unlock"), "Mock path does not exist") def test_unlock(self): params = { "id" : 12345, } user = User(params) user.unlock(params) @unittest.skipUnless(TestBase.mock_server_path_exists("POST", "/users/{id}/resend_welcome_email"), "Mock path does not exist") def test_resend_welcome_email(self): params = { "id" : 12345, } user = User(params) user.resend_welcome_email(params) @unittest.skipUnless(TestBase.mock_server_path_exists("POST", "/users/{id}/2fa/reset"), "Mock path does not exist") def test_user_2fa_reset(self): params = { "id" : 12345, } user = User(params) user.user_2fa_reset(params) @unittest.skipUnless(TestBase.mock_server_path_exists("PATCH", "/users/{id}"), "Mock path does not exist") def test_update(self): params = { "id" : 12345, } user = User(params) user.update(params) @unittest.skipUnless(TestBase.mock_server_path_exists("DELETE", "/users/{id}"), "Mock path does not exist") def test_delete(self): params = { "id" : 12345, } user = User(params) user.delete(params) # Alias of delete def test_destroy(self): pass # Static Methods @unittest.skipUnless(TestBase.mock_server_path_exists("GET", "/users"), "Mock path does not exist") def test_list(self): resp = user.list() @unittest.skipUnless(TestBase.mock_server_path_exists("GET", "/users/{id}"), "Mock path does not exist") def test_find(self): id = 12345 params = { "id" : 12345, } user.find(id, params) @unittest.skipUnless(TestBase.mock_server_path_exists("POST", "/users"), "Mock path does not exist") def test_create(self): resp = user.create() @unittest.skipUnless(TestBase.mock_server_path_exists("POST", "/users/{id}/unlock"), "Mock path does not exist") def test_unlock(self): id = 12345 params = { "id" : 12345, } user.unlock(id, params) @unittest.skipUnless(TestBase.mock_server_path_exists("POST", "/users/{id}/resend_welcome_email"), "Mock path does not exist") def test_resend_welcome_email(self): id = 12345 params = { "id" : 12345, } user.resend_welcome_email(id, params) @unittest.skipUnless(TestBase.mock_server_path_exists("POST", "/users/{id}/2fa/reset"), "Mock path does not exist") def test_user_2fa_reset(self): id = 12345 params = { "id" : 12345, } user.user_2fa_reset(id, params) @unittest.skipUnless(TestBase.mock_server_path_exists("PATCH", "/users/{id}"), "Mock path does not exist") def test_update(self): id = 12345 params = { "id" : 12345, } user.update(id, params) @unittest.skipUnless(TestBase.mock_server_path_exists("DELETE", "/users/{id}"), "Mock path does not exist") def test_delete(self): id = 12345 params = { "id" : 12345, } user.delete(id, params) if __name__ == '__main__': unittest.main()
31.19469
130
0.605106
422
3,525
4.85545
0.125592
0.058077
0.164959
0.190337
0.818448
0.816496
0.816496
0.744266
0.635432
0.566618
0
0.035203
0.266667
3,525
113
131
31.19469
0.757447
0.013333
0
0.578947
0
0
0.174676
0.030504
0
0
0
0
0
1
0.147368
false
0.021053
0.063158
0
0.221053
0
0
0
0
null
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
78e175f92237d14fe867d851d0f3b3aa072c0b27
66
py
Python
frakky/core/__init__.py
HeadHaus/frakky
fc1a54f78bc8a4bd580ff28b323c23c754609650
[ "MIT" ]
null
null
null
frakky/core/__init__.py
HeadHaus/frakky
fc1a54f78bc8a4bd580ff28b323c23c754609650
[ "MIT" ]
null
null
null
frakky/core/__init__.py
HeadHaus/frakky
fc1a54f78bc8a4bd580ff28b323c23c754609650
[ "MIT" ]
null
null
null
from .application import Application from .context import Context
22
36
0.848485
8
66
7
0.5
0
0
0
0
0
0
0
0
0
0
0
0.121212
66
2
37
33
0.965517
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
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
5
6035cbecaea5aa9e64299286b75f65176d945f48
35
py
Python
test/mamba_runner.py
ll-in-anki/CrowdAnki
b25eace61c2ddbc4dad078b83093b291581c0d87
[ "MIT" ]
391
2016-08-31T21:55:07.000Z
2022-03-30T16:30:12.000Z
test/mamba_runner.py
ll-in-anki/CrowdAnki
b25eace61c2ddbc4dad078b83093b291581c0d87
[ "MIT" ]
150
2016-09-01T00:35:35.000Z
2022-03-30T23:26:48.000Z
test/mamba_runner.py
ll-in-anki/CrowdAnki
b25eace61c2ddbc4dad078b83093b291581c0d87
[ "MIT" ]
51
2016-09-04T17:02:39.000Z
2022-02-04T11:49:10.000Z
from mamba.cli import main main()
8.75
26
0.742857
6
35
4.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.171429
35
3
27
11.666667
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
604dd186265eff3c882b3810ac6a98bf54c74663
191
py
Python
surreal/launch/__init__.py
PeihongYu/surreal
2556bd9c362a53e0a94da914ba59b5d4621c4081
[ "MIT" ]
471
2018-10-29T07:11:54.000Z
2022-03-31T11:56:00.000Z
surreal/launch/__init__.py
PeihongYu/surreal
2556bd9c362a53e0a94da914ba59b5d4621c4081
[ "MIT" ]
34
2018-10-30T12:02:56.000Z
2019-05-22T07:57:51.000Z
surreal/launch/__init__.py
PeihongYu/surreal
2556bd9c362a53e0a94da914ba59b5d4621c4081
[ "MIT" ]
77
2018-10-30T00:51:52.000Z
2022-03-01T08:26:35.000Z
from .build_images import SurrealDockerBuilder from .command_generator import CommandGenerator from .launcher import Launcher, SurrealDefaultLauncher from .setup_network import setup_network
38.2
54
0.884817
21
191
7.857143
0.571429
0.145455
0
0
0
0
0
0
0
0
0
0
0.089005
191
4
55
47.75
0.948276
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
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
5
604fa95b7691e14a99a3301df7bc9164f563f18f
35
py
Python
db_adapter/curw_sim/timeseries/waterlevel/__init__.py
CUrW-SL/curw_db_adapter
9d9ef24f42080910e0bd251bc7f001b0a4b0ab31
[ "MIT" ]
2
2019-04-26T07:50:33.000Z
2019-09-28T20:15:33.000Z
db_adapter/curw_sim/timeseries/waterlevel/__init__.py
CUrW-SL/curw_db_adapter
9d9ef24f42080910e0bd251bc7f001b0a4b0ab31
[ "MIT" ]
1
2019-04-03T09:30:38.000Z
2019-04-20T18:11:59.000Z
db_adapter/curw_sim/timeseries/waterlevel/__init__.py
shadhini/curw_db_adapter
4db8e1ea8794ffbd0dce29ac954a13315e83d843
[ "MIT" ]
null
null
null
from .timeseries import Timeseries
17.5
34
0.857143
4
35
7.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.114286
35
1
35
35
0.967742
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
606ffc6b74367cb221be743a58e37934b53faa32
105
py
Python
pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/arrays.py
alexus37/AugmentedRealityChess
7f600ad153270feff12aa7aa86d7ed0a49ebc71c
[ "MIT" ]
1
2015-07-12T07:24:17.000Z
2015-07-12T07:24:17.000Z
pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/arrays.py
alexus37/AugmentedRealityChess
7f600ad153270feff12aa7aa86d7ed0a49ebc71c
[ "MIT" ]
null
null
null
pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/arrays.py
alexus37/AugmentedRealityChess
7f600ad153270feff12aa7aa86d7ed0a49ebc71c
[ "MIT" ]
1
2016-02-19T21:55:53.000Z
2016-02-19T21:55:53.000Z
"""Abstraction point allowing OpenGLContext to be used with numpy or Numeric""" from vrml.arrays import *
52.5
79
0.790476
15
105
5.533333
1
0
0
0
0
0
0
0
0
0
0
0
0.133333
105
2
80
52.5
0.912088
0.695238
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
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
0
1
0
1
0
1
0
0
5
607f18f99f5004981121fdb08b58d67215d6401e
21
py
Python
src/main.py
shahana300996/ltelearn
4c0e516784770c9f404f0a6428f343df43f5ed42
[ "Apache-2.0" ]
null
null
null
src/main.py
shahana300996/ltelearn
4c0e516784770c9f404f0a6428f343df43f5ed42
[ "Apache-2.0" ]
null
null
null
src/main.py
shahana300996/ltelearn
4c0e516784770c9f404f0a6428f343df43f5ed42
[ "Apache-2.0" ]
null
null
null
#code for feature 1
10.5
20
0.714286
4
21
3.75
1
0
0
0
0
0
0
0
0
0
0
0.0625
0.238095
21
1
21
21
0.875
0.857143
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
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
717c28c4e2b46836970469eb55aece95e3303f2e
132
py
Python
tests/fail.py
catseye/Falderal
96393da75518f3796af80facb9447e34bb91e401
[ "Unlicense" ]
6
2016-10-24T17:37:41.000Z
2019-12-11T19:13:02.000Z
tests/fail.py
catseye/Falderal
96393da75518f3796af80facb9447e34bb91e401
[ "Unlicense" ]
8
2015-01-03T18:46:40.000Z
2018-12-11T09:35:45.000Z
tests/fail.py
catseye/Falderal
96393da75518f3796af80facb9447e34bb91e401
[ "Unlicense" ]
null
null
null
import sys sys.stdout.write(sys.argv[1] + '\n') sys.stdout.flush() sys.stderr.write(sys.argv[2] + '\n') sys.exit(int(sys.argv[3]))
18.857143
36
0.659091
25
132
3.48
0.52
0.241379
0.275862
0
0
0
0
0
0
0
0
0.024793
0.083333
132
6
37
22
0.694215
0
0
0
0
0
0.030303
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
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
0
0
0
0
0
5
71a7f775793beb35c93fa2b459f17ee211b1942b
297
py
Python
ITXQ/__init__.py
itxq/ip-python
aeef904c8927c661560a2ff27a9e88258a5bc65e
[ "Apache-2.0" ]
1
2021-12-20T13:12:39.000Z
2021-12-20T13:12:39.000Z
ITXQ/__init__.py
itxq/ip-python
aeef904c8927c661560a2ff27a9e88258a5bc65e
[ "Apache-2.0" ]
null
null
null
ITXQ/__init__.py
itxq/ip-python
aeef904c8927c661560a2ff27a9e88258a5bc65e
[ "Apache-2.0" ]
null
null
null
# ================================================================== # 文 件 名: __init__.py # 概 要: # 作 者: IT小强 # 创建时间: 12/19/19 6:58 PM # 修改时间: # copyright (c) 2016 - 2019 mail@xqitw.cn # ==================================================================
37.125
68
0.232323
25
297
2.6
0.96
0
0
0
0
0
0
0
0
0
0
0.076233
0.249158
297
8
69
37.125
0.215247
0.946128
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
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
5
71c3d833d0060718302ff56727e8878a5768c658
2,715
py
Python
desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/presentation.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
11
2019-03-20T07:38:35.000Z
2021-06-18T09:42:46.000Z
desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/presentation.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
80
2018-04-13T13:46:24.000Z
2022-02-16T16:01:46.000Z
desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/presentation.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
6
2018-06-06T19:55:32.000Z
2021-09-30T15:16:40.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # Contributor(s): # from .namespaces import PRESENTATIONNS from .element import Element # ODF 1.0 section 9.6 and 9.7 # Autogenerated def AnimationGroup(**args): return Element(qname = (PRESENTATIONNS,'animation-group'), **args) def Animations(**args): return Element(qname = (PRESENTATIONNS,'animations'), **args) def DateTime(**args): return Element(qname = (PRESENTATIONNS,'date-time'), **args) def DateTimeDecl(**args): return Element(qname = (PRESENTATIONNS,'date-time-decl'), **args) def Dim(**args): return Element(qname = (PRESENTATIONNS,'dim'), **args) def EventListener(**args): return Element(qname = (PRESENTATIONNS,'event-listener'), **args) def Footer(**args): return Element(qname = (PRESENTATIONNS,'footer'), **args) def FooterDecl(**args): return Element(qname = (PRESENTATIONNS,'footer-decl'), **args) def Header(**args): return Element(qname = (PRESENTATIONNS,'header'), **args) def HeaderDecl(**args): return Element(qname = (PRESENTATIONNS,'header-decl'), **args) def HideShape(**args): return Element(qname = (PRESENTATIONNS,'hide-shape'), **args) def HideText(**args): return Element(qname = (PRESENTATIONNS,'hide-text'), **args) def Notes(**args): return Element(qname = (PRESENTATIONNS,'notes'), **args) def Placeholder(**args): return Element(qname = (PRESENTATIONNS,'placeholder'), **args) def Play(**args): return Element(qname = (PRESENTATIONNS,'play'), **args) def Settings(**args): return Element(qname = (PRESENTATIONNS,'settings'), **args) def Show(**args): return Element(qname = (PRESENTATIONNS,'show'), **args) def ShowShape(**args): return Element(qname = (PRESENTATIONNS,'show-shape'), **args) def ShowText(**args): return Element(qname = (PRESENTATIONNS,'show-text'), **args) def Sound(**args): return Element(qname = (PRESENTATIONNS,'sound'), **args)
31.569767
80
0.704236
342
2,715
5.590643
0.397661
0.104603
0.177824
0.230126
0.460251
0.290795
0.08159
0
0
0
0
0.012148
0.151013
2,715
85
81
31.941176
0.817354
0.311234
0
0
0
0
0.094207
0
0
0
0
0
0
1
0.47619
true
0
0.047619
0.47619
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
5
71d7ef08b503431648f63867a7223698b9e1da5b
281
py
Python
staticfiles/photos/views.py
encok/Gallery-Application
f2c36d631ec6bc978484fdbbc5f7e5fb703e8cf6
[ "MIT" ]
null
null
null
staticfiles/photos/views.py
encok/Gallery-Application
f2c36d631ec6bc978484fdbbc5f7e5fb703e8cf6
[ "MIT" ]
null
null
null
staticfiles/photos/views.py
encok/Gallery-Application
f2c36d631ec6bc978484fdbbc5f7e5fb703e8cf6
[ "MIT" ]
null
null
null
from django.shortcuts import render # Create your views here. def gallery(request): return render(request,'photos/gallery.html') def viewPhoto(request, pk): return render(request,'photos/photo.html') def addPhoto(request): return render(request,'photos/add.html')
20.071429
48
0.740214
37
281
5.621622
0.540541
0.173077
0.274038
0.360577
0.307692
0
0
0
0
0
0
0
0.13879
281
13
49
21.615385
0.859504
0.081851
0
0
0
0
0.199219
0
0
0
0
0
0
1
0.428571
false
0
0.142857
0.428571
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
e09c4d240f0b1df16c40458b9408ced8385ebf5c
300
py
Python
amusementpark.py
charliechocho/py-crash-course
b42b8a4c1cb8d76e8316f55c1565ff42d920ee63
[ "Apache-2.0" ]
null
null
null
amusementpark.py
charliechocho/py-crash-course
b42b8a4c1cb8d76e8316f55c1565ff42d920ee63
[ "Apache-2.0" ]
null
null
null
amusementpark.py
charliechocho/py-crash-course
b42b8a4c1cb8d76e8316f55c1565ff42d920ee63
[ "Apache-2.0" ]
null
null
null
age = 3 admission_fee = (0,25,40) if age < 4: print(f"Your admission fee is ${admission_fee[0]}, welcome to the park!") elif age < 18: print(f"Your admission fee is ${admission_fee[1]}, welcome to the park!") else: print(f"You're a senior so your fee is ${admission_fee[2]}, Welcome!!")
30
77
0.663333
54
300
3.611111
0.5
0.369231
0.215385
0.261538
0.369231
0.369231
0.369231
0.369231
0
0
0
0.04898
0.183333
300
9
78
33.333333
0.746939
0
0
0
0
0
0.623333
0
0
0
0
0
0
1
0
false
0
0
0
0
0.375
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
e0dab806af7804b39f6f6bda63dfd39aeea52bd7
85
py
Python
data/data/models/structures/__init__.py
maosplx/L2py
5d81b2ea150c0096cfce184706fa226950f7f583
[ "MIT" ]
7
2020-09-01T21:52:37.000Z
2022-02-25T16:00:08.000Z
data/data/models/structures/__init__.py
maosplx/L2py
5d81b2ea150c0096cfce184706fa226950f7f583
[ "MIT" ]
4
2021-09-10T22:15:09.000Z
2022-03-25T22:17:43.000Z
data/data/models/structures/__init__.py
maosplx/L2py
5d81b2ea150c0096cfce184706fa226950f7f583
[ "MIT" ]
9
2020-09-01T21:53:39.000Z
2022-03-30T12:03:04.000Z
from data.models.structures.static.character_template import StaticCharacterTemplate
42.5
84
0.905882
9
85
8.444444
1
0
0
0
0
0
0
0
0
0
0
0
0.047059
85
1
85
85
0.938272
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
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
5
e0e2c148021e0cacac0e4029baaac83491fdec2a
1,753
py
Python
RobotFlask/RobotFlask/common.py
Microshak/iotil-RobotAPI
1e545d352a360dd99345fb657f0cb37a8b6146d6
[ "Apache-2.0" ]
null
null
null
RobotFlask/RobotFlask/common.py
Microshak/iotil-RobotAPI
1e545d352a360dd99345fb657f0cb37a8b6146d6
[ "Apache-2.0" ]
null
null
null
RobotFlask/RobotFlask/common.py
Microshak/iotil-RobotAPI
1e545d352a360dd99345fb657f0cb37a8b6146d6
[ "Apache-2.0" ]
null
null
null
class common(object): """description of class""" def generateData(dat): updateDic = { "Cartisian.position.x":dat['Cartisian[position][x]'], "Cartisian.position.y":dat['Cartisian[position][y]'], "Cartisian.position.z":dat['Cartisian[position][z]'], "Cartisian.orientation.x":dat['Cartisian[orientation][x]'], "Cartisian.orientation.y":dat['Cartisian[orientation][y]'], "Cartisian.orientation.z":dat['Cartisian[orientation][z]'], "Cartisian.orientation.w":dat['Cartisian[orientation][w]'], "FriendlyName":dat["FriendlyName"], "Order":dat["Order"], "Speed":dat["Speed"], "Action":dat["Action"] } return updateDic def generateData2(dat): updateDic = { "FriendlyName":dat["FriendlyName"], "Order":dat["Order"], "Speed":dat["Speed"], "Action":dat["Action"], "Name":dat["Name"] } updateDic["Cartisian"] = {} updateDic["Cartisian"]["position"] = {} updateDic["Cartisian"]["orientation"] = {} updateDic["Cartisian"]["position"]["x"] = dat['Cartisian[position][x]'] updateDic["Cartisian"]["position"]["y"] = dat['Cartisian[position][y]'] updateDic["Cartisian"]["position"]["z"] = dat['Cartisian[position][z]'] updateDic["Cartisian"]["orientation"]["x"] = dat['Cartisian[orientation][x]'] updateDic["Cartisian"]["orientation"]["y"] = dat['Cartisian[orientation][y]'] updateDic["Cartisian"]["orientation"]["z"] = dat['Cartisian[orientation][z]'] updateDic["Cartisian"]["orientation"]["w"] = dat['Cartisian[orientation][w]'] return updateDic
43.825
84
0.568739
158
1,753
6.310127
0.14557
0.341023
0.184554
0.054162
0.750251
0.750251
0.750251
0.232698
0.136409
0.136409
0
0.000734
0.223046
1,753
39
85
44.948718
0.731278
0.011409
0
0.285714
1
0
0.456283
0.245512
0
0
0
0
0
1
0.057143
false
0
0
0
0.142857
0
0
0
0
null
1
1
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
460a6548b22f853cc015c183009db4ccdbd1e6b6
34
py
Python
open_couplet/models/__init__.py
neoql/open_couplet
6281979161d688c90eb5a470f0163c0e7ea8ae1b
[ "MIT" ]
46
2020-05-13T06:59:39.000Z
2021-07-12T21:24:06.000Z
open_couplet/models/__init__.py
JeRainXiong/open_couplet
5b254987c91b0118f4317b91d95d2d32fd0976da
[ "MIT" ]
1
2020-10-22T05:17:37.000Z
2020-10-29T09:13:58.000Z
open_couplet/models/__init__.py
JeRainXiong/open_couplet
5b254987c91b0118f4317b91d95d2d32fd0976da
[ "MIT" ]
21
2020-05-13T06:59:46.000Z
2020-11-08T04:44:20.000Z
from .seq2seq import Seq2seqModel
17
33
0.852941
4
34
7.25
1
0
0
0
0
0
0
0
0
0
0
0.066667
0.117647
34
1
34
34
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
1cd28b0dee57e3ce39e3a0f55be0fe0255224e78
123
py
Python
beecrowd exercises/beecrowd-1096.py
pachecosamuel/Python-Exercises
de542536dd1a2bc0ad27e81824713cda8ad34054
[ "MIT" ]
null
null
null
beecrowd exercises/beecrowd-1096.py
pachecosamuel/Python-Exercises
de542536dd1a2bc0ad27e81824713cda8ad34054
[ "MIT" ]
null
null
null
beecrowd exercises/beecrowd-1096.py
pachecosamuel/Python-Exercises
de542536dd1a2bc0ad27e81824713cda8ad34054
[ "MIT" ]
null
null
null
x = 1 for i in range (0, 5): y = 7 for j in range (0, 3): print(f"I={x} J={y}") y -= 1 x += 2
13.666667
29
0.357724
26
123
1.692308
0.576923
0.318182
0.363636
0
0
0
0
0
0
0
0
0.117647
0.447154
123
8
30
15.375
0.529412
0
0
0
0
0
0.089431
0
0
0
0
0
0
1
0
false
0
0
0
0
0.142857
1
0
1
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
1cf0062bf62f249747540c33e006deaba9a53d59
101
py
Python
icls/albu/__init__.py
TaikiInoue/iClassification
7045c7721c9ee86e3823b13722d22b6c0095b76a
[ "MIT" ]
null
null
null
icls/albu/__init__.py
TaikiInoue/iClassification
7045c7721c9ee86e3823b13722d22b6c0095b76a
[ "MIT" ]
null
null
null
icls/albu/__init__.py
TaikiInoue/iClassification
7045c7721c9ee86e3823b13722d22b6c0095b76a
[ "MIT" ]
null
null
null
from albumentations import * from albumentations.pytorch import ToTensorV2 __all__ = ["ToTensorV2"]
20.2
45
0.811881
10
101
7.8
0.6
0.461538
0
0
0
0
0
0
0
0
0
0.022472
0.118812
101
4
46
25.25
0.853933
0
0
0
0
0
0.09901
0
0
0
0
0
0
1
0
false
0
0.666667
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
0
0
0
1
0
1
0
0
5
1cf35c7c41850e948fe0d947b66d032d9630151a
867
py
Python
project/views/auth.py
aldencolerain/bmanners
a5664f2b97f74b3b4aa9360c2b01f26eb3706a04
[ "MIT" ]
null
null
null
project/views/auth.py
aldencolerain/bmanners
a5664f2b97f74b3b4aa9360c2b01f26eb3706a04
[ "MIT" ]
null
null
null
project/views/auth.py
aldencolerain/bmanners
a5664f2b97f74b3b4aa9360c2b01f26eb3706a04
[ "MIT" ]
null
null
null
from django.contrib.auth import views, authenticate, login, logout, update_session_auth_hash from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from django.contrib.auth.models import User from django.shortcuts import render, redirect import logging logger = logging.getLogger(__name__) def signin(request): return views.login(request, template_name='auth/signin.html') def signout(request): return views.logout(request, next_page='home.index') def reset(request): #from_email/subject_template_name/email_template_name return views.password_reset(request, template_name='auth/reset.html', post_reset_redirect='auth.reset') def reset_confirm(request, uidb64=None, token=None): return views.password_reset_confirm(request, uidb64, token, template_name='auth/reset_confirm.html', post_reset_redirect='auth.signin')
32.111111
136
0.820069
122
867
5.598361
0.393443
0.073206
0.070278
0.061493
0.073206
0
0
0
0
0
0
0.008805
0.083045
867
26
137
33.346154
0.850314
0.059977
0
0
0
0
0.105068
0.02843
0
0
0
0
0
1
0.266667
false
0.133333
0.4
0.266667
0.933333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
1
1
1
0
0
5
e8024a979b3b6044dac46313a2a11bf5abc6e281
79
py
Python
Packages/vision/vision.py
zachlatta/robotpy
a2ab5519481170f236a6efce1ef128e4f812509d
[ "MIT", "Unlicense" ]
1
2021-09-24T22:49:11.000Z
2021-09-24T22:49:11.000Z
Packages/vision/vision.py
zachlatta/robotpy
a2ab5519481170f236a6efce1ef128e4f812509d
[ "MIT", "Unlicense" ]
null
null
null
Packages/vision/vision.py
zachlatta/robotpy
a2ab5519481170f236a6efce1ef128e4f812509d
[ "MIT", "Unlicense" ]
null
null
null
import _wpilib from nivision import * import _vision2009 from _vision import *
15.8
22
0.822785
10
79
6.2
0.6
0
0
0
0
0
0
0
0
0
0
0.059701
0.151899
79
4
23
19.75
0.865672
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
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
5
e804aa498311c0788ba27647c31c1478fef0a282
30
py
Python
pcdet/version.py
riceleslie/OpenPCDet
1be23349430b1fb39e3c4e1570526334b8d93758
[ "Apache-2.0" ]
null
null
null
pcdet/version.py
riceleslie/OpenPCDet
1be23349430b1fb39e3c4e1570526334b8d93758
[ "Apache-2.0" ]
null
null
null
pcdet/version.py
riceleslie/OpenPCDet
1be23349430b1fb39e3c4e1570526334b8d93758
[ "Apache-2.0" ]
null
null
null
__version__ = "0.3.0+5396f34"
15
29
0.7
5
30
3.4
0.8
0
0
0
0
0
0
0
0
0
0
0.333333
0.1
30
1
30
30
0.296296
0
0
0
0
0
0.433333
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
e81cf8f80feb1b196f2a4e51cab8869b31101747
524
py
Python
deepnade/buml/Instrumentation/Instrumentable.py
vlimant/NADE
e2446c73250a99979c8710a8acbb14823a54bce0
[ "BSD-3-Clause" ]
43
2017-06-19T21:19:55.000Z
2022-02-06T01:21:48.000Z
deepnade/buml/Instrumentation/Instrumentable.py
vlimant/NADE
e2446c73250a99979c8710a8acbb14823a54bce0
[ "BSD-3-Clause" ]
1
2017-08-29T14:09:49.000Z
2017-09-08T12:34:19.000Z
deepnade/buml/Instrumentation/Instrumentable.py
vlimant/NADE
e2446c73250a99979c8710a8acbb14823a54bce0
[ "BSD-3-Clause" ]
12
2017-09-12T07:56:13.000Z
2021-09-19T19:11:41.000Z
class Instrumentable (object): def __init__(self): self.instrumentation = [] def add_instrumentation(self, ins): self.instrumentation.append(ins) def get_context(self): return [] def initialize_instrumentation(self): for i in self.instrumentation: i.initialize(self) def run_instrumentation(self): for i in self.instrumentation: i.run(self) def end_instrumentation(self): for i in self.instrumentation: i.end(self)
27.578947
57
0.631679
58
524
5.551724
0.327586
0.295031
0.204969
0.214286
0.419255
0.419255
0.419255
0.419255
0
0
0
0
0.278626
524
18
58
29.111111
0.851852
0
0
0
0
0
0
0
0
0
0
0
0
1
0.461538
false
0
0
0.076923
0.615385
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
e82c99ca1b72ad67b6b6ef39be68b7d2abcd1ba6
113,201
py
Python
src/bot_data/bot1.py
PolarisVoid/EvoAI
7a7cacd4b4382613b5fb56a389a47677d8d476b3
[ "MIT" ]
null
null
null
src/bot_data/bot1.py
PolarisVoid/EvoAI
7a7cacd4b4382613b5fb56a389a47677d8d476b3
[ "MIT" ]
null
null
null
src/bot_data/bot1.py
PolarisVoid/EvoAI
7a7cacd4b4382613b5fb56a389a47677d8d476b3
[ "MIT" ]
null
null
null
bot1_wieght_layer_one = [[0.9236090789486788, 0.9210637151227483, 0.16119690767556938, 0.8891669007445379, 0.7530696859511529, 0.9684743676682231, 0.9140001906787625, 0.5462343790375778, 0.4625067913831683, 0.10294585839313619, 0.4659734634943964, 0.673851063496881, 0.4119975257359164, 0.4119836779033137, 0.7865910876180061, 0.1746772681586115, 0.14820492751578285, 0.17880158440303084, 0.638384333104671, 0.43867886886921015, 0.6326278950050328, 0.2038501568125496, 0.7776665581230366, 0.771139612953913, 0.43664378114255786, 0.6845899209090841, 0.5932741356128547, 0.11859280518324489, 0.8426718127223154, 0.4257864591630002, 0.21919389456471672, 0.1541410719278874, 0.2446740228834895, 0.9096981936870991, 0.1051376200906824, 0.123215850106273, 0.6207186782859335, 0.12151357138851293, 0.245688625096243, 0.5091516271356124, 0.28696783191231534, 0.5667720957901029, 0.10179946375444471, 0.07698229364715592, 0.1401060329173568, 0.5605864629155267, 0.5008708650129818, 0.472155979148543, 0.5114298750374805, 0.9177025359111187, 0.61180000017252, 0.9252156543730644, 0.2808056118845378, 0.6182738570732967, 0.5059140465417934, 0.5112371150715369, 0.27569977707132176, 0.02903301704146266, 0.17203745230481327, 0.9580314724608192, 0.6390629826262436, 0.8543772996780469, 0.22765734772859614, 0.9295293185057587, 0.8547086226616534, 0.9140367615756183, 0.5656403835945063, 0.7666637822837286, 0.9299245560369479, 0.8137362078324749, 0.3851752602753137, 0.8004765184387966, 0.0971362374612369, 0.13655452483402186, 0.681154264654838, 0.8355206616694442, 0.43933750924147164, 0.71607525665252, 0.8953318177972461, 0.022026267303617897, 0.5379372446996521, 0.6862725587397568, 0.27276362350445715, 0.49012588773556165, 0.5696505291988504, 0.21259703281855824, 0.1867281303140862, 0.42325083070354375, 0.631788358712714], [0.7009723489355959, 0.7755630380298649, 0.8214056821060041, 0.4461526836763151, 0.481755469593232, 0.5764701181036724, 0.7738443613698299, 0.21967191669080766, 0.19282038280162728, 0.39385789086602196, 0.5820753136137473, 0.01721939343217893, 0.480717572857995, 0.8080397884821071, 0.14979914461915833, 0.05020212300797988, 0.4793960860291525, 0.4111506744658292, 0.11930327529571894, 0.17955502154369407, 0.012925435392506346, 0.6586587616764189, 0.3350099047088869, 0.850937080408252, 0.3718678907068308, 0.11527601403252008, 0.3820497255478599, 0.8384920848109105, 0.23044526475037008, 0.9605022019079362, 0.09805750577785943, 0.6388010648085247, 0.811493593498141, 0.7564250423670958, 0.5065952240509837, 0.3192868220605316, 0.9018435753300349, 0.7925964122857911, 0.5901342628725957, 0.24032639017044632, 0.7550949068239841, 0.2236507475146402, 0.4581717506132187, 0.6432281715775092, 0.988379547788904, 0.9966056280412324, 0.1503852003097801, 0.976042458489067, 0.5836833913400898, 0.021680494802164274, 0.14334321299342823, 0.40345057671485207, 0.07690051341546122, 0.2883238996638102, 0.06247477125530687, 0.8831434714740543, 0.7992503785963946, 0.5508405994824376, 0.871669234416104, 0.026718434754273712, 0.7491959845828274, 0.20519507295138506, 0.09890971057888864, 0.05864231885284432, 0.5321323261102776, 0.026852658151600095, 0.20141662483981437, 0.760045443955652, 0.9841625274763108, 0.19685565520746218, 0.7800021932695238, 0.17249359025903865, 0.8266218686663086, 0.6559503710562061, 0.31724873992729585, 0.5043915547250579, 0.4771462768633111, 0.5324992962774662, 0.3998427431059661, 0.851042824534796, 0.29401048321424783, 0.4544698337810461, 0.5402161422297389, 0.40766838762361923, 0.8214367316258696, 0.8966562700769893, 0.335538655169051, 0.9086239832954099, 0.2969905257097156], [0.3231913811466237, 0.49455018068676915, 0.020115280341378883, 0.939309926845729, 0.809256214386146, 0.16188418048501263, 0.6947821096278696, 0.269503928890676, 0.694710666019383, 0.34130801490673524, 0.5605916497543431, 0.27172737204972475, 0.7945312677357029, 0.16491875540350354, 0.9869336720174897, 0.30965640739924993, 0.5258455430674109, 0.12750669144383564, 0.8654638043494218, 0.07456877485695645, 0.26519813578704565, 0.08240250870985188, 0.13791901503822068, 0.9262629830390752, 0.7807683018349625, 0.2866134465024618, 0.7275912230185161, 0.39633527385313094, 0.8269415815154668, 0.9252629059344307, 0.20584727649599321, 0.2732115250597331, 0.4394403529369988, 0.015555325729710745, 0.8428575769078923, 0.967126028942085, 0.4993172354888792, 0.24312585575789936, 0.6434459615728989, 0.02335972742555248, 0.6634083210927555, 0.2481544257857462, 0.3519494142105719, 0.17254804445942729, 0.4982478238034753, 0.6416114376911248, 0.7150972406764894, 0.7418676207303256, 0.42560719662783, 0.0489875647100404, 0.416476821220803, 0.15542676930763677, 0.4239585382833506, 0.21758594620000116, 0.07632062853561095, 0.9875086818905897, 0.020919543554601128, 0.675259594105383, 0.6763139304631209, 0.6674743448679705, 0.49126602590641266, 0.8975328658686905, 0.01608796536761481, 0.5519324254188372, 0.354836670790713, 0.96472998395987, 0.12715716485339834, 0.7054852504728606, 0.17895273751474383, 0.7009933372268667, 0.6954841942212401, 0.3854323324969532, 0.548654084166919, 0.32283834532831657, 0.8343092899904988, 0.38009103184225546, 0.1099413834459616, 0.8094901612213391, 0.07202157549284327, 0.2045928210556428, 0.2902079036708729, 0.46961317160129923, 0.1758368359583009, 0.3582640422327067, 0.016889696224707373, 0.1236770272039085, 0.9694625313575694, 0.8103352600561743, 0.9687763599315438], [0.4070390588651397, 0.8617588449266992, 0.08591633335314042, 0.6191989471056557, 0.3753693585165173, 0.2149345558169109, 0.7780221191994218, 0.5408325834037762, 0.020440943891304686, 0.6329782367456378, 0.6537990030532523, 0.22364638436066686, 0.07578526627260385, 0.6379292872123573, 0.9042035248510895, 0.2690482512676077, 0.6861732406804237, 0.8334933093228785, 0.3370981202351897, 0.8741826040155269, 0.29511483082457846, 0.5571312208957903, 0.3061482289248987, 0.8244277316654556, 0.2422727844397241, 0.5436010174651802, 0.37895447534567184, 0.010113688337024973, 0.9783768939285751, 0.9233279297354652, 0.5692680422198491, 0.19315369363505774, 0.6992947651255726, 0.5545602213934571, 0.1174521520800843, 0.0369244735892984, 0.8252874024755956, 0.21259160020927514, 0.7858656584310622, 0.9007851853044347, 0.2370301885058812, 0.45686879546211323, 0.11571461463718813, 0.3896826966165772, 0.4981331064743928, 0.5866411796597666, 0.6830030429417404, 0.7071669815943974, 0.8807237758828365, 0.554005183344843, 0.9636013114933643, 0.19402805842940196, 0.3978216837432135, 0.5129440332588614, 0.166553254085275, 0.5352123850156179, 0.4027616229168385, 0.005098195056520649, 0.3386189590714881, 0.7765541310547399, 0.9039211291176523, 0.04559183233801234, 0.1622843722688485, 0.03019770752386708, 0.26622001294465547, 0.43614772311783734, 0.34739222887697985, 0.9697566624307592, 0.9609419715427007, 0.7074015056633886, 0.5868196682545251, 0.7982268307295808, 0.886232311967204, 0.9518031066954507, 0.6872598812061947, 0.3526484212314378, 0.9516021862352316, 0.9640485831196367, 0.8107766071127982, 0.04525336974900995, 0.7679067193270388, 0.5662505182473457, 0.2968769818345395, 0.15202276157422823, 0.8970256324617895, 0.8271611993099104, 0.0549443663293846, 0.3623385912038649, 0.11261669206443203], [0.2797643283795904, 0.08401213798968554, 0.09171795115463965, 0.3215252061839202, 0.25810270717858663, 0.5022332226688793, 0.3117092081164258, 0.696184432075916, 0.6623992613862014, 0.8947306875377811, 0.660183510866882, 0.4389112026419373, 0.8729973077348417, 0.3593172359101109, 0.9383081704486153, 0.6814907986713262, 0.12042377644299584, 0.5196326588387824, 0.7590149173622956, 0.8227967012186834, 0.39276246517039604, 0.5893744092449043, 0.09967888604125141, 0.47180914793055106, 0.4536650098230439, 0.09236992993531501, 0.8119871643278841, 0.09946082622993269, 0.6002239914572185, 0.4889899727332142, 0.3924243726512765, 0.8642185928678245, 0.6964674340764225, 0.27204251902914445, 0.36115859166360675, 0.6173441115538776, 0.5331102719543005, 0.38184811564067744, 0.7715154543314913, 0.8996642127295942, 0.9056673110933559, 0.8510314318000046, 0.7336560542901602, 0.8912677463693386, 0.6901616315208431, 0.32561570881580604, 0.7959076593250595, 0.24942235414705494, 0.6573791527737103, 0.9201963876362174, 0.8323067850929537, 0.7279998615643604, 0.3826805993365904, 0.045676098733975934, 0.043303519044695093, 0.8440710947384173, 0.7409523987878059, 0.8000858292713338, 0.6359813072962217, 0.9061052798260985, 0.940592213468678, 0.43695012925590615, 0.3915399189988765, 0.1910117813884753, 0.8683547419579423, 0.12282755413615187, 0.11953629066114091, 0.9754448453980374, 0.7260252387777577, 0.32434725828955424, 0.9145141543079923, 0.40110248557419836, 0.34769566352601045, 0.0838353264410443, 0.9479912750604463, 0.5884767174600394, 0.6814848125020173, 0.030688358936346583, 0.35050139205693864, 0.02167886951952913, 0.6921972330226244, 0.6911967281899353, 0.6975261388316664, 0.10058100263896674, 0.3193344433949835, 0.1785130300493687, 0.2602831588019199, 0.5361167553489439, 0.022185465522298387], [0.10788444578454681, 0.702287504733945, 0.8378486373091145, 0.1764792111165694, 0.4446810930412909, 0.8418815765556584, 0.5223500638044959, 0.3366394179912534, 0.0879099654588299, 0.05731420403755483, 0.6184259060592221, 0.31176334067697586, 0.06799554084782677, 0.1207736456142624, 0.6831410900168667, 0.5396729636996535, 0.21590341847030348, 0.9767765952640611, 0.7318562628813758, 0.6344655185467192, 0.2632381920252692, 0.27982389315699674, 0.9006828529879133, 0.3140457975275168, 0.08608901192416896, 0.7354710972364773, 0.3082953317686338, 0.6946255118648296, 0.5284811516940894, 0.8081220676202092, 0.40274126433946533, 0.3488491734703477, 0.8968371036834721, 0.35695471431982806, 0.15674472673402773, 0.06273501437253737, 0.6749105444709496, 0.05005081382691212, 0.8032437874978855, 0.202158385064238, 0.1873644584663986, 0.4294318893565694, 0.18182248866450512, 0.9554560476986663, 0.3675487674862612, 0.9919634637398465, 0.023889714671826767, 0.6521530561945705, 0.6760494633176135, 0.07064749031780793, 0.3376120612771143, 0.6411435237281696, 0.9860718340623801, 0.22057486482084487, 0.9372280458752786, 0.7138460146519181, 0.559552068301644, 0.5714444889793434, 0.0922805775005755, 0.8553214064573208, 0.05328262868991385, 0.058889466346619845, 0.2915410418915184, 0.0832556509976553, 0.8828544285972318, 0.15924680299410066, 0.745766423991, 0.9872573714646465, 0.9228374075018008, 0.18595773239960256, 0.8816529492197483, 0.12081435089993442, 0.08923940274246744, 0.3605026994356263, 0.6892852873014638, 0.20914854583343834, 0.16587521109364733, 0.30794124428340286, 0.7025610167574737, 0.012539560626656288, 0.37785208376736557, 0.7477226555566733, 0.7414107605760913, 0.31943396451657036, 0.38909237944266917, 0.6335105987404311, 0.9238952535677788, 0.25289503360949805, 0.9481002587299109], [0.9721489350785666, 0.9877244968544684, 0.7855318534731416, 0.4726500885182058, 0.8739619163948421, 0.7299267386244095, 0.20954355642117828, 0.6425706285552998, 0.9062072566081306, 0.5506940996550641, 0.029809750242027255, 0.6766403812044975, 0.9779691143308561, 0.6844722355944154, 0.535512193504793, 0.15938875677668296, 0.49709536425050704, 0.26499421669509404, 0.21925168389431993, 0.4410506648359185, 0.9179772032227889, 0.13412020742978825, 0.7241828870246916, 0.40429528689236727, 0.15842309688402434, 0.46253494043756405, 0.1829744326433912, 0.08561687606826973, 0.4401108481993309, 0.7180390544115067, 0.7361107957395013, 0.724515399770915, 0.21157207165085834, 0.32237499013018844, 0.2272045768246952, 0.7781337797606571, 0.9609857833525874, 0.6049924799674548, 0.5348377726114955, 0.49890219823027726, 0.5680204612210852, 0.06488612494833657, 0.3581235064248297, 0.5187265393856662, 0.4384971714672219, 0.32113708905397287, 0.3520382064493177, 0.0443339852040564, 0.1350990845752965, 0.37562765440238965, 0.7388016841764187, 0.25462901404568794, 0.2553925655477314, 0.7176798009620682, 0.5230233058351859, 0.3193700710869337, 0.2730332404587338, 0.593261095694369, 0.9704858861893627, 0.7652462432866033, 0.29828817649869765, 0.6929683914761721, 0.3945648810798984, 0.03202772899299111, 0.49316061565035896, 0.2836364179892703, 0.8603955652443955, 0.08783230895195715, 0.04521630559808354, 0.8634890251092915, 0.8208961383729279, 0.28062549246814383, 0.45890817263819406, 0.6255127624968135, 0.4582122773091999, 0.24660015357276788, 0.2647060585811929, 0.30053561071333745, 0.5771036348873657, 0.2398972346567888, 0.1852245905965746, 0.2865783124134298, 0.37460365922842187, 0.09207147411307604, 0.6773958626475222, 0.21287875371809362, 0.07431464937189702, 0.11530672366347983, 0.9117823527960761], [0.4178119267137512, 0.5721335763079896, 0.6917349861907042, 0.21391497866678788, 0.07790870157945051, 0.9059014795349973, 0.618268349588375, 0.7490510814528829, 0.3452295820181265, 0.0778650802227353, 0.16606611482276878, 0.6267447469762019, 0.7824021188756904, 0.950827556570088, 0.10751626884378773, 0.8340746942291397, 0.9074326114302199, 0.18669786957880674, 0.8503204026569705, 0.8188397893827213, 0.4536238485410031, 0.0577434256690349, 0.6089404332635284, 0.029147445069945044, 0.5750909165928971, 0.5243436414548786, 0.06963467810681012, 0.4536999209385053, 0.8805977392883694, 0.43889768107550764, 0.4077700303695404, 0.7871784805866673, 0.19940086710859684, 0.8238585484921673, 0.8220289764497547, 0.12514902040833786, 0.9275864667613339, 0.6689332286742803, 0.5785816058284048, 0.38909375140963154, 0.06736207634079994, 0.06884357880412117, 0.9297524337016129, 0.5004920874160007, 0.10156527966087903, 0.016285795236322453, 0.9208327991499639, 0.4192081129129074, 0.14453882296664644, 0.617236605289631, 0.23509345768924972, 0.20719453604584648, 0.6892464215399696, 0.8735054849904799, 0.7821193062077179, 0.3366996999245747, 0.33265834739752487, 0.1634407463739218, 0.9546601623617, 0.28982722706758846, 0.4441568033383747, 0.4454512767724129, 0.8087240954281081, 0.5873511159612158, 0.6641779698508281, 0.4367976310412923, 0.05785742776789882, 0.633178460055429, 0.4009117758374101, 0.6703491158975458, 0.4412607175622638, 0.04796950858216176, 0.47326453920617617, 0.9378782924084312, 0.5610126447242526, 0.036442033483475855, 0.7760034475115767, 0.19312185985870955, 0.05903656488279918, 0.43454963586423356, 0.9663600285178147, 0.5054418052753229, 0.10258067927049008, 0.1208979826737776, 0.3995310737001927, 0.3575700803321339, 0.24189337505545427, 0.4214863463627905, 0.10556469936975099], [0.3030343474749423, 0.10079660010921576, 0.1991163875839299, 0.07364781735146175, 0.4142335874581575, 0.8096357584925153, 0.8388657241874425, 0.01743915845433197, 0.41437319767900005, 0.4566061929967511, 0.21172856457128342, 0.009733770707688993, 0.13492516175738167, 0.9739990297803294, 0.24579441387489287, 0.17485627819259808, 0.23908888780666027, 0.7141594443068483, 0.5626665296709473, 0.13526787588658196, 0.6413805890010359, 0.8437725568887717, 0.6858345973512588, 0.9904037421037295, 0.22617361676437275, 0.8799495093713446, 0.9580387101195238, 0.014154843794793925, 0.1807177073859868, 0.2177867950357114, 0.26645840320834513, 0.4079506125451817, 0.9708098613085748, 0.6535201536264544, 0.004762919978452684, 0.014359420763816577, 0.4755281677217933, 0.745026358861412, 0.20899278950677247, 0.7470650889774508, 0.3323097298821245, 0.6477723135962388, 0.9085528185106942, 0.23484505316670878, 0.07479274825394189, 0.9686356498515181, 0.5538725369965508, 0.5555155484170593, 0.9127647345455006, 0.5385504138229577, 0.6340082330628852, 0.7948320780751937, 0.5825452809755111, 0.32812492028278095, 0.9009050051576923, 0.5936546238119828, 0.1184996233782929, 0.4925078113703494, 0.15962675579347674, 0.824133928646716, 0.8365800232120811, 0.8338217253317379, 0.5994805918586313, 0.7868173529621724, 0.8380261472483449, 0.8090985831124037, 0.28436866305682973, 0.43235704242694317, 0.44179577270998016, 0.6850132216597447, 0.4741865277776305, 0.5945673321742275, 0.24833012256652254, 0.03897039470776775, 0.522754747531851, 0.29674725593878193, 0.6426239821422135, 0.198857331513, 0.4001871572984106, 0.6052640665876413, 0.7232659472233631, 0.30280215690491663, 0.30113720141396316, 0.9552806199687541, 0.6854237915447328, 0.13956584412785156, 0.7285386687711951, 0.98222387351813, 0.07475489762184007], [0.22648531828632212, 0.4824281514338119, 0.11872428005724212, 0.8345144873968273, 0.14020625335358883, 0.2772690174002468, 0.1546268572310644, 0.3839350572357031, 0.3005470710411313, 0.36845509047086933, 0.7524913251261408, 0.48626318000998936, 0.8171069666792441, 0.7529472336056009, 0.08781176453341055, 0.4298913410678594, 0.1257463843437665, 0.8881939436592382, 0.20312510362309733, 0.10850494766913998, 0.31635144152003947, 0.924704778311123, 0.8672715005181396, 0.1726499174473879, 0.23060196511174358, 0.36927067263672364, 0.2266753446302464, 0.4321235778173369, 0.14362677458503215, 0.5300100442704107, 0.9849521467639577, 0.2844023851634999, 0.8318850747639045, 0.6288406519894371, 0.6713160760957748, 0.12174034175844739, 0.12290818916538548, 0.7168734240091438, 0.7925680460181738, 0.06049259984371913, 0.24392988129834792, 0.20851984389351153, 0.4713852552996477, 0.040723604641543676, 0.30906667089280804, 0.26581635641797996, 0.8117701590422527, 0.2705161388340924, 0.22792033811335988, 0.11692907821213416, 0.38309580039984514, 0.04570640984864405, 0.8526654994824616, 0.1533331042999374, 0.1742761463176723, 0.48153232513084177, 0.19161464347151147, 0.9185832650576403, 0.4934548625248155, 0.021005979816700937, 0.9107291114463093, 0.10936814988728094, 0.7852916780164095, 0.3969799705109427, 0.1950010548094493, 0.2963960677709754, 0.1482047403054626, 0.7148747428954253, 0.6038827728212182, 0.6962716864275008, 0.06978022581430343, 0.6985049164364994, 0.5807456038048644, 0.6709997000805512, 0.8792863627723257, 0.7378036764941204, 0.5495443242967329, 0.3496205894698846, 0.8443835772182252, 0.10948976993947046, 0.0680888166391449, 0.1378015716108837, 0.5615030763440819, 0.8584402384714549, 0.37757596671396154, 0.8483250152768873, 0.258104165892859, 0.4750095325501692, 0.7724750025261836], [0.44389441904589344, 0.02433787946957744, 0.24172968548804485, 0.6070936202309101, 0.5056605805286013, 0.7144302651348257, 0.26230651428249174, 0.0168415855148929, 0.7546048124048121, 0.7446058038196425, 0.8103163535085638, 0.5395374329519966, 0.8677301723976767, 0.9929445362204892, 0.415005256850453, 0.1604784789833451, 0.9052899525000557, 0.9968875299806688, 0.8804810789450488, 0.2739905715506541, 0.518960224753623, 0.8834217924062843, 0.4351483691115572, 0.7339624448687048, 0.37998882464643857, 0.39931937086880287, 0.3941570909898272, 0.09265787483840182, 0.21230846215012222, 0.15217651641181051, 0.9915821118014967, 0.7701305222284069, 0.07076624648179963, 0.7508149580248991, 0.11452696072779767, 0.7269244078127457, 0.4575156855468345, 0.863866852930958, 0.8810796441716492, 0.08315205820464466, 0.2392786630549968, 0.9809881890692095, 0.49774018376494855, 0.2164936036747599, 0.4411602198773463, 0.23618217490651494, 0.25028252101285253, 0.864922793481573, 0.3275222278399894, 0.8459694418806368, 0.7414354263212619, 0.2819344946833905, 0.9799958979032483, 0.016263235919676045, 0.8290481233087124, 0.08690312692179514, 0.06661524900429139, 0.19369844080818055, 0.22645761792040642, 0.4004441020682512, 0.21574033421465555, 0.9590646119254275, 0.8332377094807794, 0.8429900328219821, 0.5508435868400916, 0.5611945355164816, 0.6400685460080022, 0.8650794150755421, 0.6099653959919991, 0.7786001373259936, 0.25603116275612714, 0.13661307012039903, 0.6688189425271687, 0.4970479316342795, 0.5938549742802922, 0.735007749219325, 0.9036241722831124, 0.7954059155310759, 0.8890075433781273, 0.5722178286390445, 0.05843675111361657, 0.882732560404803, 0.46040161135863944, 0.0036135346107771804, 0.17422593455080615, 0.9334081769443241, 0.8262015552666739, 0.6555919889511189, 0.781207543935886], [0.6754110116601949, 0.5445526452818652, 0.6073200266478743, 0.4743937456211036, 0.6133882651756238, 0.349181715790455, 0.8913479905569976, 0.39533267374518655, 0.46571217501921813, 0.9648969114865207, 0.5242259403095273, 0.5861791814341571, 0.052432257904996615, 0.42106454154707995, 0.9710280905891446, 0.8355297881537236, 0.9265693117103212, 0.9026684901522883, 0.6970234237769248, 0.03739770987704594, 0.5997405621275582, 0.8669834732764669, 0.2731050650050192, 0.1467142140829455, 0.4413216633078365, 0.2716820819081105, 0.43757272266977765, 0.7654503061819301, 0.22736943365051643, 0.10147093713883792, 0.7194627050270115, 0.7452132789062282, 0.8034522993945326, 0.31338980653830506, 0.9941236626742169, 0.5695449589931374, 0.9883695303210803, 0.4663178683387543, 0.3678555656483694, 0.09342094967147263, 0.7040522376296019, 0.46264681804216123, 0.6799663830521205, 0.5824756240800743, 0.8811498975810477, 0.10304249682922173, 0.42081437867403326, 0.26923037141479356, 0.8687985903321818, 0.8170140181229454, 0.3825266995310225, 0.6970759533263784, 0.8126079481355168, 0.271516064432218, 0.15616579782529927, 0.555735569831623, 0.9069400377242064, 0.5546618398243572, 0.7775605793385554, 0.44927082271359764, 0.8058218252598536, 0.9497308317811548, 0.9456426959167047, 0.10097260724762902, 0.536790256040104, 0.4876365527980059, 0.6813595601091766, 0.2716462311073613, 0.049775820571019924, 0.7895187266105063, 0.7725288348768223, 0.7767886142240238, 0.8786937999200706, 0.37296799216174614, 0.418971263754631, 0.8527761387184657, 0.42227147136932186, 0.5968511009009912, 0.741210911067583, 0.5009689404148686, 0.2611800722083323, 0.37705786587714896, 0.1428461867815386, 0.2947150137012575, 0.1478710297366823, 0.580996664183334, 0.9869418663834576, 0.5170287128383537, 0.3223793605807064], [0.47363761067222054, 0.348502921352425, 0.6376988556662698, 0.9450216357937573, 0.040396358562485135, 0.3055520826047141, 0.6488633108501389, 0.7081929738226214, 0.34801042875406063, 0.7783747230021859, 0.9618489717658709, 0.8642741929606672, 0.7371451333248759, 0.8292681554639788, 0.37128912793746327, 0.0053566809112577385, 0.6377305157217715, 0.2222345244435776, 0.4248646673058537, 0.30912173725625114, 0.9699363201507253, 0.5588725790842637, 0.8604879535428797, 0.553213085578852, 0.5835572285235683, 0.6104738773235407, 0.5160111040811681, 0.6476095434865877, 0.7281101003431144, 0.12176069270943624, 0.550509919455454, 0.627925413311515, 0.010847326225137732, 0.26274228198737415, 0.1983289624926493, 0.6209934985336116, 0.28785908899017676, 0.3872905025901243, 0.975598144634646, 0.28457901685878184, 0.5349504208434952, 0.6840935203133721, 0.48795789209240015, 0.841107598419212, 0.3925139595869769, 0.02474360872015302, 0.9847030537523502, 0.0061816212443317475, 0.9711004449026653, 0.048416667101451316, 0.859865267739729, 0.7925305211311096, 0.4197928844291352, 0.6839534784758764, 0.6625299918578287, 0.7333454028986263, 0.518789767990799, 0.10862640274246071, 0.28106875259371533, 0.2434205354142953, 0.8411441449127371, 0.583399825046402, 0.07501592419041614, 0.8153885301354553, 0.6974477597527748, 0.4391915967992026, 0.7498961578160926, 0.47444444288624743, 0.22816335225996676, 0.17798701807396367, 0.9045587620495678, 0.23881874785717638, 0.6798838813607976, 0.6041546101008096, 0.6668122494923934, 0.08265482303745475, 0.6010925813581808, 0.36529228274162895, 0.6889173028094426, 0.17905265356494937, 0.1254877788639145, 0.9041557162950608, 0.45854855256130567, 0.45282864962436764, 0.03560072704953943, 0.9695854800257312, 0.7030897443661815, 0.8388039278408054, 0.561794444307025], [0.807735908816847, 0.11139194890023585, 0.9071328117839277, 0.5616661858970509, 0.36661481120363326, 0.10476993159070558, 0.5610849402857655, 0.6259302923553304, 0.4463269232535091, 0.3813941372040748, 0.8612117084970073, 0.6374375237515236, 0.1142376855656192, 0.5449734220641227, 0.6613791105316364, 0.5873695465022224, 0.2829241489999047, 0.9970267815369599, 0.24513382839802944, 0.14380584927702955, 0.48527395628713454, 0.44874794611091706, 0.24510576509555504, 0.7470316841827438, 0.6540935476431394, 0.7736520630338827, 0.7241445822898341, 0.4850275719374978, 0.22572238664177902, 0.83196983634961, 0.9797609844832964, 0.1941989287812642, 0.79343007555494, 0.4863798079453081, 0.5551031964753423, 0.1976164684936882, 0.3303829177717619, 0.5130403732385073, 0.8963937829814235, 0.13661509260340632, 0.19653078718590278, 0.22574166609108748, 0.6794171016505037, 0.23732800696159984, 0.9378844295043073, 0.12171979395877097, 0.5687068384755245, 0.5944640938968451, 0.5390704310463801, 0.06000576701126348, 0.7883688123900865, 0.5531230630621755, 0.10258446679019972, 0.6733023882660187, 0.6480698304598124, 0.7717071355983769, 0.8612976084698857, 0.03401806184512013, 0.11521757764755902, 0.5721469016286939, 0.5170413933821388, 0.11717821308346621, 0.3760121576011386, 0.4511921682817326, 0.887559804266018, 0.6742879850742893, 0.22216842936471348, 0.6511042385367134, 0.5837657100831344, 0.27935499183749546, 0.6554349755192593, 0.43798377403073285, 0.2713676440950191, 0.9648416889054933, 0.4840308972957319, 0.6024871553466362, 0.41003086517252707, 0.46735340826077676, 0.05466015979196248, 0.21479358821623762, 0.8787172067655754, 0.4481262039552453, 0.7704544457240257, 0.08850603394587198, 0.02936630768814419, 0.16744137788864677, 0.5105667223256865, 0.27880563333928776, 0.39024146439752594], [0.19535158016260268, 0.8580816300579772, 0.18272913323771922, 0.5903095934600608, 0.10796903480924258, 0.3584646349587337, 0.5972566707405474, 0.7619246293711402, 0.848166047371129, 0.2679836871571215, 0.06344675476007289, 0.6236674115079759, 0.9097478939824821, 0.016329453280874318, 0.4134816257441418, 0.044279255533925754, 0.09183421070739972, 0.3039502357170105, 0.7686049767866585, 0.8875396363951107, 0.6545769659297056, 0.07574632739231313, 0.7087422801806533, 0.3180203865312541, 0.11323833234086089, 0.698140724264588, 0.7362210053089739, 0.18492138891799148, 0.6425891162848326, 0.5709360185972094, 0.5576208124643292, 0.1433454855005697, 0.3055013571139825, 0.6194981404384113, 0.847279574598229, 0.8048079055860268, 0.8471875836416023, 0.3928595051958865, 0.6800600462351265, 0.5959680959350443, 0.22074764835310912, 0.03413290772035871, 0.9259183827447341, 0.14649369716435456, 0.15046966865270162, 0.07998152654171042, 0.9165478177959402, 0.31635203503696396, 0.8981193291335272, 0.07873298687013497, 0.20243642172037168, 0.36445249645271216, 0.7929545801027236, 0.8755093729764273, 0.2482307157524295, 0.07875241769288832, 0.5743700973279281, 0.04419927319384642, 0.33569014526105445, 0.15004116783964194, 0.3727859351245687, 0.371078620065724, 0.47207253296299123, 0.8962443784997401, 0.12923003343441297, 0.7815458105802999, 0.6958626903529359, 0.4777508762193434, 0.1462046680050073, 0.5828269237975487, 0.3826280119107256, 0.7226192128415215, 0.5303073530191322, 0.3533733015412477, 0.2805014403952075, 0.8004779088335582, 0.4021663712165473, 0.5070243556712211, 0.6196307401710146, 0.605531972656143, 0.5473953660323659, 0.4832225519858323, 0.41820081339448, 0.7671389180125706, 0.19880350008041436, 0.9335557514720043, 0.7317267199807683, 0.10564321566179713, 0.910725943218761], [0.06173814051485338, 0.5994819789515876, 0.4985090433062135, 0.3481744222228068, 0.2930826260982543, 0.14599576181759555, 0.5147272414678341, 0.058052806789734124, 0.28987373727446786, 0.13216682374978606, 0.16478707837704887, 0.49789067321736824, 0.1302001677222554, 0.9917392354558564, 0.8387073662836838, 0.4731251471985226, 0.5129812048141357, 0.3433870640605823, 0.94639437620672, 0.7150857199624557, 0.21530954828780635, 0.4738539796396666, 0.16322950780565504, 0.32375555905662456, 0.050803790740591825, 0.7864937201789873, 0.9712590752086738, 0.4677320223197242, 0.20840795904363463, 0.4429352901258954, 0.8572268966955164, 0.36594232366381585, 0.580490449121416, 0.3687558418615624, 0.14522619565068606, 0.38147550905638894, 0.13209996187955075, 0.2610971939548822, 0.9591611632495901, 0.879573326848693, 0.8149858471661953, 0.00912974392000554, 0.0894528962251746, 0.18811813232673702, 0.21435406360632137, 0.30546279920663644, 0.9954415604785714, 0.9066273613746969, 0.5886945735714764, 0.06612017127891234, 0.6515374875971671, 0.7486126038480159, 0.9198079624170253, 0.5203340286525656, 0.47706998909592646, 0.5069195511928342, 0.9015051332529426, 0.03754608183309549, 0.43014839489669143, 0.5913549161393707, 0.9714970086378905, 0.8416369322963175, 0.15187295920775257, 0.2628194484865487, 0.26095415706930314, 0.5835928704412813, 0.49436629867591997, 0.6132373057739182, 0.31996668024355424, 0.010654891534005673, 0.901339372399253, 0.7390306056967024, 0.4988149723973383, 0.21751203139342978, 0.7685392178338261, 0.8569459177710408, 0.10140352222920779, 0.6095616061454283, 0.6762400648731661, 0.6030279506499625, 0.23433944746102564, 0.5725050462140842, 0.9615093269055793, 0.768751279409903, 0.6834490317195652, 0.18409086592922141, 0.6454160053237774, 0.9505479509879916, 0.5663839227290637], [0.7327549407874815, 0.6733671166650326, 0.8367646570853996, 0.018478359073776485, 0.6584731376680405, 0.31387759704581875, 0.15006813721916, 0.7346599911193442, 0.4127468651983599, 0.8548796293081616, 0.7807309369399827, 0.23207212998060778, 0.31191421276089504, 0.5923704644595996, 0.7887083432835394, 0.5935012603646707, 0.9110162037380435, 0.872946869781296, 0.9400400754134192, 0.6734571622743758, 0.8806654143045911, 0.5139032367115736, 0.7775313197564813, 0.681957396902388, 0.2624102301990351, 0.17841889615318052, 0.9387378053067176, 0.30100094988835613, 0.06491053294487226, 0.1645763260844808, 0.7990769622462853, 0.7800933536336111, 0.3932483442076554, 0.7960087195323606, 0.03320381930262495, 0.8221923615521812, 0.679228078401437, 0.6556837310390313, 0.5295752068380779, 0.37023091948706877, 0.1606207586111339, 0.15930061552475927, 0.2521126626883953, 0.6791450420857855, 0.1308518325747926, 0.6077982045468908, 0.2920489416380635, 0.9613638300835251, 0.6625797654649798, 0.586441999284505, 0.6364595494679566, 0.8538927554504315, 0.290126493784877, 0.9020750521266359, 0.9454733341398092, 0.006262228998793806, 0.3093492103495019, 0.6496551925100745, 0.3803705466672138, 0.8238161541904785, 0.4284359253159221, 0.6731695834982708, 0.2403308752322607, 0.054984859309370804, 0.0438610095816121, 0.31555673858810607, 0.7549538450536584, 0.3660365286666589, 0.3992526366062008, 0.3789048530250587, 0.22004211645090177, 0.9911983732940806, 0.4274534000048409, 0.2798807183816536, 0.24336211679897812, 0.9867104898164227, 0.307401498084926, 0.04331856121731226, 0.4703927644421433, 0.10822427544742119, 0.8161922615961262, 0.07566841479777608, 0.3880359302461226, 0.36615618964694896, 0.13696628736053296, 0.9073489881075049, 0.28853851451873624, 0.204022607160826, 0.725786769099369], [0.8780214767824338, 0.9775350101935294, 0.91875583021429, 0.5233918463240823, 0.22286859237694978, 0.9257294651561544, 0.08870162887099686, 0.8794829821812786, 0.41933866193626446, 0.2611065857239181, 0.7068972779705096, 0.8913492830861586, 0.03404717545529701, 0.5589494115993408, 0.8082257596653473, 0.9328309501276061, 0.9611939352938693, 0.32290439737389665, 0.6494030364179499, 0.14673475182438678, 0.2513487181230678, 0.28029769393794546, 0.8644282724515687, 0.9248173982808549, 0.7311834095850062, 0.7179852602747963, 0.43137872243008224, 0.9604095804692698, 0.9191159909008216, 0.7873092796158728, 0.1895542294785808, 0.5358636195716269, 0.4316543167190512, 0.07782199732913164, 0.23299231608467252, 0.534040811148236, 0.7435670057961906, 0.010975504955095583, 0.7670632878750768, 0.28966996882145424, 0.3276478808698776, 0.1437081585258274, 0.5603719672113965, 0.5343910811834202, 0.500322368284791, 0.30990097651951753, 0.26844479921362163, 0.5986541565136185, 0.8325911480572753, 0.582615585186586, 0.2100137494252733, 0.6313635845425847, 0.041970860236079655, 0.8745895441408162, 0.534830352686939, 0.6566475423897831, 0.8392886596850275, 0.5003433612505988, 0.32199955276490444, 0.8331878329028906, 0.023351224637420342, 0.10650425276014697, 0.049117318633950746, 0.5959049036806815, 0.7727706572304512, 0.47677437731513683, 0.2930505018107986, 0.6832355371967054, 0.9973346581209166, 0.17087358455061297, 0.6382327186413007, 0.7734663473948582, 0.6294640921813314, 0.33293781193082894, 0.04823936670985063, 0.5093524186507031, 0.4221438139413901, 0.5764459543177793, 0.7604211220227889, 0.7895731400933353, 0.10379627996020468, 0.1644755566386884, 0.9458085703542594, 0.047809023693736075, 0.6187327738514409, 0.9940685058728169, 0.9972088498036871, 0.09346821963160457, 0.2629879971713506], [0.5921795726907094, 0.5236691846219622, 0.5706087804198934, 0.5493111002890881, 0.2836598131336685, 0.0954378022007677, 0.3503362379744419, 0.417516677670125, 0.3584659795963766, 0.15331314351957293, 0.4895697077188811, 0.24161979094295538, 0.31659640135940736, 0.80313425939084, 0.5876016750144017, 0.6077538204506213, 0.6473472953658501, 0.9681337454032949, 0.8938292042257076, 0.8129331154958093, 0.6271089971822903, 0.0932431915990466, 0.7298615788836794, 0.31501622819680597, 0.6995327704225717, 0.944877528923261, 0.060769716260844264, 0.5575449023970561, 0.5273510594640575, 0.3332883527894366, 0.3269866660098121, 0.7448209577224162, 0.8077250244589677, 0.4254645351989046, 0.18821103798156924, 0.834828789093044, 0.010161752678862657, 0.932672371563232, 0.0025626739858252146, 0.31105876388482523, 0.9896237493853334, 0.9784578144135792, 0.34538641282293714, 0.5566278514963338, 0.9387083569566761, 0.08085833180887414, 0.1766372894063155, 0.7306442803865707, 0.21856381825283078, 0.9837976573764479, 0.35021098045489285, 0.238740352707009, 0.5240772002341829, 0.7116383602930043, 0.7861881112237322, 0.6629642222831407, 0.46506130281016234, 0.09066914762821421, 0.3888845808866649, 0.19628722818868427, 0.9871961385279713, 0.20504639317148698, 0.8528265141339012, 0.9926010729506202, 0.2215686898936261, 0.44284172924297616, 0.45341048624997315, 0.6228330862744844, 0.9153029004139825, 0.8852140495961042, 0.20134622555631188, 0.6139262219396837, 0.9820304614458683, 0.5112030029308969, 0.14226658117820112, 0.4924853156715747, 0.6867308050564731, 0.7717458356459538, 0.2833717755304891, 0.3378354315618708, 0.604218729083199, 0.13168735129710318, 0.8078483924953729, 0.39310191456886123, 0.8959029330438014, 0.8765062622831602, 0.8084051073485089, 0.1989209389802673, 0.12452717076357189], [0.6389272709951754, 0.9413323314590839, 0.6392682442556196, 0.3747564334170669, 0.5610491777675694, 0.3677375136856096, 0.6539718062171969, 0.6285203926978007, 0.5631279416110686, 0.18950519311441782, 0.7226698238454713, 0.5652110899881859, 0.3792926731019707, 0.029594200095853784, 0.09399677346324997, 0.8535795809670471, 0.5307822159792509, 0.03289671258906823, 0.28834787661294137, 0.9224076912780182, 0.42111215543273117, 0.6217460955199156, 0.5840074278960433, 0.3359889115026239, 0.07308412921826535, 0.015926798519617646, 0.33326952586846514, 0.6612086577290672, 0.027444339287311825, 0.07610808388148904, 0.2001590547797084, 0.23236950700950454, 0.2860597957358797, 0.5655149654876299, 0.3716213996992688, 0.7987541104359092, 0.04290000624539958, 0.4648803189964196, 0.46894435702453685, 0.33744906524652585, 0.43347740872170704, 0.5375944861877426, 0.8545079594662517, 0.7318851233857124, 0.08376365709845546, 0.08740863136776555, 0.6069295445577177, 0.5047941141255023, 0.869766638397423, 0.48124520264386306, 0.564429601362776, 0.8798299053693893, 0.5357997346075069, 0.8580643375265533, 0.3464444716730323, 0.006886678355234377, 0.30530796145266137, 0.30266077166140337, 0.9970749689070376, 0.13711644351912156, 0.6728784945829647, 0.04774777371460448, 0.382511935312022, 0.10964130524720017, 0.7065378935177645, 0.3030434070330994, 0.1706391857404591, 0.5039343241986278, 0.6432202812149216, 0.4056816565095903, 0.5715674655432016, 0.5739705187395138, 0.1521471773171892, 0.5520750872252749, 0.8380021197693478, 0.31311938582365184, 0.41432742769572184, 0.8681468762606518, 0.9338785126727056, 0.9526850842398418, 0.9566992856115509, 0.6337531601181717, 0.1198263501164829, 0.36912369101788867, 0.9251018533396869, 0.012333178755327912, 0.628859550281964, 0.7111794364925131, 0.9523258915283581], [0.08255942296955898, 0.8364406404009156, 0.6443597653879414, 0.618876343638427, 0.21690113732047345, 0.5424362023228411, 0.26532261027544757, 0.9165123575981962, 0.10818484233328651, 0.5279545430955032, 0.7406435520839232, 0.09290488776997552, 0.4268406861816698, 0.534445016547474, 0.5078470067153872, 0.837186932354647, 0.22618694038636233, 0.2749739208646602, 0.04124588447155242, 0.500941070589734, 0.638393423573852, 0.44645482971654205, 0.3221218720779543, 0.8060727703795892, 0.26771156744793867, 0.1294089732740381, 0.8928705572179015, 0.6426155112565274, 0.6477105785525474, 0.8719736177933894, 0.07511232017599778, 0.5578247570964093, 0.4336062233005, 0.5204551035483137, 0.5734323923141249, 0.4165770949494264, 0.46113142617425407, 0.34593531268113453, 0.880560050833618, 0.3674867389817813, 0.9678445346813193, 0.6906914123994115, 0.6164771301538566, 0.6410061189901073, 0.8833562326916368, 0.33620228656437356, 0.10339538586492647, 0.7514800088700307, 0.468360439971496, 0.8566120048830741, 0.8903489139643902, 0.2333772787005245, 0.6245684885117978, 0.8619105274508512, 0.65117545784051, 0.8695910526742259, 0.5955684853763866, 0.7641191092905754, 0.5022010708718065, 0.3711771933961687, 0.7602477686656227, 0.1589550274440913, 0.2206737846936151, 0.22454116104030653, 0.6491502450666584, 0.32554646385551866, 0.33552877503857814, 0.7407249088243756, 0.47770538637969995, 0.18885362763505043, 0.2963936339948595, 0.9175194891467573, 0.44117580258211364, 0.6368607209246854, 0.9287685275332186, 0.5108162786522749, 0.664113783933174, 0.5267359669735451, 0.5099162636570373, 0.48203671127749037, 0.22663926227034403, 0.8477521447490141, 0.6056736643160574, 0.9586180747459554, 0.5508540613810617, 0.5628828822056122, 0.030267822093533847, 0.2037835742643762, 0.8108518754004513], [0.21155243148657088, 0.6644654413792157, 0.33965411099121623, 0.8365859427675942, 0.5373295049026847, 0.4024289490255798, 0.637869826327398, 0.9787821318651106, 0.7671253125558877, 0.29084406432070864, 0.9374444360848144, 0.9233485335459986, 0.5647031067561276, 0.6258798647167488, 0.07173599696811461, 0.41460635803007795, 0.41365136373067035, 0.5910338588908807, 0.24932420981706693, 0.40647130050038516, 0.7369275040233074, 0.13132870516155892, 0.11823856777036057, 0.4922020372138822, 0.9356193149323445, 0.11074745284010834, 0.43431582101487864, 0.6126840979202538, 0.6528075486723843, 0.25384824497903413, 0.8155441197535044, 0.790228464004852, 0.006367849032681838, 0.6752885017908047, 0.07837191806408605, 0.643734462809796, 0.3089919539956698, 0.14268334077559175, 0.02333344249943803, 0.7913721713376612, 0.08503723198525148, 0.07083620394498613, 0.7338731257419842, 0.1361828146017685, 0.9237501364773881, 0.6071192131696413, 0.8940648492257888, 0.7516744846094192, 0.8798201247105508, 0.8050025832709191, 0.27851867477676695, 0.2216857312014402, 0.0317009294224162, 0.042357505725324596, 0.6880672564703674, 0.07649047704924539, 0.445234972369588, 0.07490951795444634, 0.03519617887552828, 0.05313114132620944, 0.458584248512257, 0.9617791982512968, 0.38567069521071384, 0.7378487045440475, 0.8770164693045296, 0.02593481620046134, 0.03379814231224998, 0.732484308700405, 0.6956833048882093, 0.8143272631056954, 0.10773567391588301, 0.5798689061752423, 0.1399314535230094, 0.09381427773014528, 0.8842924777588432, 0.47722707027690126, 0.315319779227365, 0.060897362651439635, 0.41308962201032196, 0.04221961025837295, 0.6702500049536841, 0.48658929188546296, 0.6174217789408062, 0.17947304802249198, 0.09401047021059583, 0.2052479762273307, 0.24539766891550652, 0.5241059501745857, 0.8182553351268695], [0.31452367682044724, 0.5868325600853366, 0.7287101135309413, 0.239834371051856, 0.7976352842569927, 0.3393975307939674, 0.6588920760598261, 0.6574173422067107, 0.9970389925241413, 0.48112019186097765, 0.6370673008292129, 0.1108771586905265, 0.8472267110432655, 0.1191264383096039, 0.07065159598283166, 0.6279527100509459, 0.1227099784746688, 0.6278848691531841, 0.5855895690384797, 0.8706582106527907, 0.12306059454601048, 0.7150710824982769, 0.15727289237075426, 0.08716276836493586, 0.029410421565433054, 0.23171440762738837, 0.806725612167363, 0.5645227665347009, 0.9346790648093313, 0.2981045743463927, 0.2106855152681092, 0.3541377434117331, 0.47825877290253316, 0.4740634750569691, 0.3593085788483745, 0.15205549213801173, 0.8831152012438578, 0.9607932116402454, 0.0629186994222124, 0.13818701668580347, 0.8478539135787282, 0.7164013323558655, 0.7691986503155324, 0.7617286299576547, 0.24386934817106232, 0.6601724276501543, 0.2844291522130691, 0.2776012394821613, 0.009473490202790313, 0.47490264651986136, 0.34173778505361707, 0.49871538648134517, 0.8055420771484197, 0.4948261689799439, 0.32893443560628466, 0.883597675636965, 0.2448830396084355, 0.3233109350588036, 0.9065310563755257, 0.06466770870175764, 0.033173445828154624, 0.7081075780693497, 0.523696031755392, 0.8961886474949768, 0.979508039015024, 0.6751973456272038, 0.435988321736673, 0.8769871617593884, 0.6364685692723667, 0.09363382743434279, 0.7961923138191327, 0.1222145421574733, 0.6127258374010938, 0.9601000470634415, 0.9823769517667279, 0.8852544880429071, 0.948838665324486, 0.33370414393860937, 0.3020680396183294, 0.47290775836012033, 0.9778842489357462, 0.40655350675003166, 0.704488918384738, 0.0463995689293113, 0.8618107612833837, 0.0068906318791801535, 0.648591178524924, 0.10276738086828707, 0.18319787678899602], [0.47067966180364806, 0.17335125746842184, 0.07744775396161985, 0.38252180008427694, 0.8197924346522685, 0.5483008120586852, 0.4686804265263619, 0.1539866771428755, 0.22153786593390468, 0.8734083259320837, 0.8468800559832983, 0.8573704870424338, 0.5978843491460601, 0.6573706267275655, 0.34923933852218114, 0.0008623054519518725, 0.13770399142325407, 0.5793767377834176, 0.08626785297252415, 0.5236962403785748, 0.6529960402692727, 0.8689956701803011, 0.8408283752829668, 0.09139908738275904, 0.06216875404817823, 0.42522144925254746, 0.07464216917141231, 0.9816717387998705, 0.3339039787628718, 0.5259962217760854, 0.6269149030568393, 0.3586305593047865, 0.3164548143546416, 0.2888286815708798, 0.21500262949077364, 0.7051242756258971, 0.33111254570009396, 0.34608436684274035, 0.5883664242973607, 0.5741621593481716, 0.29640008630010795, 0.8873432809066879, 0.8236596603663815, 0.6876688395980347, 0.259368990423799, 0.6431969923436753, 0.07243000762121932, 0.6758695316450778, 0.8088707558248815, 0.024833311085503684, 0.4346719629376975, 0.150073901699334, 0.5565799714601368, 0.8017668605985727, 0.15563580163293, 0.9972349970914597, 0.27259923221911586, 0.8974658780894798, 0.633770460507187, 0.9810796821898161, 0.2252420548245001, 0.17514053822361864, 0.18095045285782607, 0.48873493669559886, 0.3732840421783872, 0.8396550758913048, 0.12459361518904422, 0.007402020256916386, 0.8218382845226191, 0.26107450726579695, 0.08332859261851666, 0.2401961546656689, 0.3140416098097739, 0.5323311545795972, 0.3307553851597447, 0.3302694108996672, 0.39839160401049456, 0.852778519438578, 0.6198753149565817, 0.32871497788692616, 0.30032665294347427, 0.9645704505396206, 0.7221962344527919, 0.5529777935580016, 0.48195672168247394, 0.2909584318362054, 0.10684095787299486, 0.524251873582422, 0.9042033499231357], [0.6786718890894536, 0.9360848893226597, 0.9195942174229267, 0.9050438058077476, 0.3866620452477443, 0.13861966688885707, 0.9726013467704148, 0.7445330862698136, 0.27990222957385114, 0.7272471222199449, 0.12912938656509332, 0.3392570590442723, 0.7105490778899618, 0.3244856667953624, 0.37235193213945106, 0.13114728092464212, 0.7306220734742386, 0.7472235920523959, 0.8272559031730156, 0.527401859281813, 0.6555094148512521, 0.15174980727739606, 0.15293729784513466, 0.7702024077837781, 0.10228670774693349, 0.9252585619911088, 0.5038493657510967, 0.5508450364623523, 0.32010384418714755, 0.004402347541819784, 0.45309743837515404, 0.20076517918388548, 0.42737555872594246, 0.061618716493492265, 0.9060111071829697, 0.5652648124552704, 0.42795194792807545, 0.4074923483602284, 0.9572720595873383, 0.02821005538264565, 0.9029660440189707, 0.45383740614750223, 0.09664408982394113, 0.375284572184006, 0.46023832786950225, 0.9026842364635288, 0.3673434254224319, 0.499854549940266, 0.7362197820026027, 0.7863011694766673, 0.7645168153710346, 0.5777389978030208, 0.5603642813182397, 0.8192211912911636, 0.07789770693030273, 0.9678697382355035, 0.9717305532827434, 0.7763002527111937, 0.44842663909597247, 0.6089530116193439, 0.24856797278371823, 0.5860977337761667, 0.5208146859613425, 0.04921325089951356, 0.6035307221768036, 0.11252946449835854, 0.6220921750329035, 0.7738425149465435, 0.4997925100819619, 0.5388794970026483, 0.5121084503931655, 0.829673460867087, 0.5447132288725038, 0.7576693171978315, 0.19969417070203554, 0.530010989009563, 0.9765117295842283, 0.1589841293623515, 0.5476260654218397, 0.6697235959644398, 0.7312887799501441, 0.7845009504534269, 0.3414972796381559, 0.8969270020049198, 0.5149079772937352, 0.2137781750411043, 0.5011275223966584, 0.8196612107551579, 0.2706041484235385], [0.4689308044364561, 0.1592556256794917, 0.9643780737731674, 0.8580466528549477, 0.4024694598433667, 0.2997172313428942, 0.3694937298956771, 0.3609730208757731, 0.4728834605823844, 0.12405069235498734, 0.15240143704170372, 0.05845121167210077, 0.33082653064261236, 0.07218041893047822, 0.5432172732382614, 0.5212810087061834, 0.8303126006156486, 0.37160056670780117, 0.06491011686162085, 0.5454536669473815, 0.9744187952138066, 0.06384529087785062, 0.08009384803027564, 0.2579340056331765, 0.15778212329070784, 0.7473197508644865, 0.3814228680429942, 0.4037678696565862, 0.10699822396335412, 0.46017934267500493, 0.47218106196198695, 0.9084659025086295, 0.0482039177742738, 0.34210296411122376, 0.656743812274937, 0.16210293032809675, 0.9420638115007246, 0.8442764596373619, 0.5864495420660558, 0.2917875934454687, 0.18755631468287493, 0.8613719731543936, 0.335756163400315, 0.9325148962280047, 0.136283745590831, 0.15622701986306387, 0.923266141274925, 0.3141061820873364, 0.1624860259090396, 0.9309266785428646, 0.7234357672281464, 0.3011736723147692, 0.41713642589039035, 0.673700575588811, 0.21945262242070307, 0.1894773421690913, 0.15872241329670522, 0.8219109989134571, 0.6541281097306036, 0.2682821213100599, 0.7620821086425906, 0.37059333063585864, 0.2884303240782722, 0.5939508418841956, 0.33525732803729824, 0.7739505071057788, 0.5018983644136475, 0.7980893918864033, 0.09443284072662816, 0.9860760173155696, 0.40858388106463794, 0.4864780749413562, 0.05549379398971632, 0.9675349098349951, 0.8312538123960729, 0.9548965995550719, 0.49128007981505384, 0.2628928097691403, 0.42613298539832756, 0.47688039931279014, 0.7988326140612175, 0.6048712486505857, 0.7222594145085502, 0.6277470546093541, 0.6396106581578065, 0.9110284011325437, 0.269015304289253, 0.2727367221229253, 0.5623917387689411], [0.06207368181253137, 0.8370436179713142, 0.48312662621517455, 0.0839684303328534, 0.3639542295946939, 0.8817848525065376, 0.19561607709505346, 0.0662299775784333, 0.026098488002490816, 0.7012680411405539, 0.11488462152887191, 0.24128554302387284, 0.08409165212711567, 0.6787143743621306, 0.9846325375618924, 0.2481236616907121, 0.9928643140488921, 0.6772794691295502, 0.8553512498972905, 0.9256497792829562, 0.7073198188707865, 0.3318958767790757, 0.5954477983896375, 0.43015925766395346, 0.592542146167197, 0.17017805771774097, 0.7782793303043051, 0.3201161904824189, 0.44258424081202874, 0.7854559700230879, 0.9359021933216592, 0.9113528684167422, 0.8432766294881009, 0.47003159489589186, 0.7014247262828015, 0.042331700768487246, 0.12133463830875357, 0.9377589119360252, 0.7859357872647528, 0.09077601742499608, 0.28227710718203747, 0.8407391173602563, 0.7585466079656884, 0.7512028631590524, 0.6635000556842259, 0.1556965080293603, 0.6570864005007412, 0.12503681134054612, 0.6406152452206803, 0.6758482002012092, 0.2306561977184285, 0.5733566011535653, 0.38058493346790967, 0.26442980252537407, 0.3490119286653077, 0.41276017230650675, 0.15880067232865602, 0.36882219630712876, 0.6872329559258853, 0.49133252565317753, 0.4087221443656218, 0.917179959188718, 0.4696648068807755, 0.20992187909599902, 0.5662947885325013, 0.7248048371865745, 0.09568829255460676, 0.2990779691560773, 0.22757222573079716, 0.22777103393428888, 0.7499322249421724, 0.8210241633365614, 0.41862562824831406, 0.11645864659695715, 0.3505090447148935, 0.5938006331878736, 0.6978305974531012, 0.006354086984557306, 0.853434599853247, 0.013336680791795952, 0.37654952636626493, 0.8291228964229043, 0.9505215175314558, 0.22473069862537642, 0.9794342044228075, 0.3153700314639908, 0.9796838334254855, 0.6497144205834879, 0.9586031718526422], [0.6881935059123235, 0.2857992287935922, 0.5392420101962055, 0.8350066987074207, 0.7303004418850774, 0.023353583485674845, 0.5008778991669215, 0.900666519677886, 0.09414888188276216, 0.9255305518592748, 0.2848651437705376, 0.9879988994837561, 0.04729513792236273, 0.978503916808745, 0.015854454121602246, 0.20754984606004256, 0.23798773629771486, 0.08786809693491282, 0.9332995422524655, 0.018706575442957396, 0.06962141094729002, 0.36166499182372236, 0.008747905466303885, 0.26157266302878435, 0.1894090099739213, 0.15179911421151782, 0.783614566688397, 0.27873509980652156, 0.8942961067519903, 0.6488329622419126, 0.9238515205030657, 0.40394892913301306, 0.3823929411589585, 0.34674416515745066, 0.1893219592695965, 0.8873464401764113, 0.6473529835381948, 0.6221172446037629, 0.2769379220583347, 0.8548147184985623, 0.07642509329234703, 0.24400219828391945, 0.1365173035023176, 0.09774337974630865, 0.002519332902520044, 0.9619829586467429, 0.40208809594872985, 0.41680666846505543, 0.34117535843219127, 0.8054346306887744, 0.2485595047314203, 0.2977778844154042, 0.13200108624991602, 0.9145154250826253, 0.202247386723575, 0.12441930234588239, 0.2973504492587933, 0.9958047433961651, 0.592781407959969, 0.12826703732226752, 0.8744820929414956, 0.5003084093962786, 0.08936914210658387, 0.9140146055759077, 0.3371323815458802, 0.6315068362695981, 0.8016436873511674, 0.9816054913540524, 0.8697230111665605, 0.5542056159981029, 0.3292414709704321, 0.7063512806867938, 0.9452308170656275, 0.6181952723414077, 0.008232380034881137, 0.7877212770537909, 0.4641297034186822, 0.26164905457919063, 0.7006945817854182, 0.5797628767348308, 0.6057958412465118, 0.9206111305371159, 0.6727209067362293, 0.34076973015576284, 0.11367771698835705, 0.5665426015965426, 0.9101063026701217, 0.6988045760298637, 0.3446407165432771], [0.13209898449907387, 0.8591820721439712, 0.23264769274951536, 0.5494409431494077, 0.5056577790849632, 0.6096995082660097, 0.2025865081587821, 0.853929482299894, 0.8129492820384435, 0.9643914894118122, 0.3818545628207023, 0.12610097526987218, 0.7187353948510398, 0.2529644734248725, 0.023835280293614813, 0.4047845950868322, 0.5857883176509316, 0.5625227193030454, 0.806067884599265, 0.5643153409091569, 0.18134193667665643, 0.7863930918450893, 0.3795569175888398, 0.8181221544064358, 0.7218523321677016, 0.6086041201529591, 0.09938267198501893, 0.04730470566524447, 0.8247083110800993, 0.29238549038863704, 0.881480162244677, 0.6091740589947264, 0.017565110142120033, 0.7911592205277027, 0.3098739932463861, 0.3412705809617139, 0.16608373852504266, 0.3554281772417399, 0.6544349564591172, 0.7583142794769326, 0.11625386291804274, 0.7134549473592855, 0.7956625306550962, 0.5735391733840018, 0.7619424221804528, 0.8340549029344104, 0.1875444575435773, 0.8125981788926016, 0.15659298178971914, 0.8508970393773135, 0.662651718809134, 0.8264293659400063, 0.44654931593845604, 0.4192470099308526, 0.15204053565388387, 0.5882697893583749, 0.4345750278109809, 0.09850760819608229, 0.14091628310360893, 0.7308356532091398, 0.04632373619085439, 0.04166825094847926, 0.5657733359686105, 0.3565686197171115, 0.29199348598331254, 0.9308198084512485, 0.4164861445655177, 0.37436957003707994, 0.9299614066098547, 0.921072815762624, 0.7844264358582574, 0.7815715867233785, 0.6693043174998956, 0.15659082325122564, 0.4420305345052975, 0.0999317462754773, 0.6361892417304719, 0.6741873029627578, 0.014161401778511773, 0.09920296136152107, 0.012898324994366939, 0.14255823490573805, 0.7807655092348627, 0.7867100013334126, 0.5897416519021162, 0.8881221961877112, 0.6319432163259534, 0.1721146831114031, 0.41851313338925467], [0.252434453523269, 0.7954220007575719, 0.8355626764439885, 0.472234139407964, 0.6243517262861522, 0.2694438440278515, 0.22903198902248845, 0.2329227844025229, 0.4284079854798485, 0.7465560532095887, 0.09597258880634019, 0.7236160891180348, 0.21615813747321178, 0.6724723642222807, 0.47745135678609396, 0.6557756126170944, 0.3904095435752697, 0.7005613666038595, 0.8814535629884822, 0.039361788348419524, 0.9422486006540367, 0.962916636550417, 0.21863719656006708, 0.6357381020664425, 0.5153123402372074, 0.676126376145128, 0.39515279131402314, 0.5473514030285309, 0.9694287069353724, 0.9484295289314618, 0.41797358508676674, 0.9658662276951205, 0.4924340260368536, 0.8321526647001873, 0.49333131871191827, 0.7515903231088801, 0.5889097698041315, 0.07469728882495463, 0.8187710393543329, 0.9323377450462531, 0.5034100862931311, 0.13780069607074752, 0.09805047864948602, 0.9569741916403658, 0.13336495550183802, 0.9674891285115923, 0.9150695648196562, 0.8002684616879204, 0.45998303248397776, 0.11646282258026686, 0.7043419294537379, 0.0883526216937085, 0.8332662676730971, 0.2989902681300709, 0.26682296377521264, 0.09847431947023522, 0.4394968160391255, 0.12484257685664446, 0.9149785171857033, 0.03831032073295826, 0.5310997515792331, 0.8930414369602175, 0.6057140973109642, 0.010091579897061553, 0.1530969089899501, 0.18236002754178693, 0.0756023381039953, 0.03800954438108184, 0.24286716129106078, 0.8970595508914099, 0.8377174607490453, 0.8054043198615143, 0.13623945495272394, 0.9372329803014297, 0.5888848274317262, 0.4782811177940697, 0.4703474640139015, 0.11152381012300239, 0.4116058870595396, 0.5828729233648039, 0.7743832826218837, 0.1068337021296405, 0.642621764358944, 0.5805774051680093, 0.15770075438202258, 0.7200736226978128, 0.6331195416745554, 0.12076014677465885, 0.8012667732753368], [0.3365304409413027, 0.14392071131485873, 0.12616880058186652, 0.666261463179179, 0.03505173305806475, 0.3004406422081958, 0.38081838352397623, 0.1607126336238035, 0.6644508088707728, 0.6254815644618223, 0.25987632159794005, 0.860800691094763, 0.24161663852075144, 0.6818716422089769, 0.6671936932908322, 0.7859869701286273, 0.6457634227357135, 0.6869864401335857, 0.08364116390953724, 0.8150746246640079, 0.16768394402251363, 0.34754921454825827, 0.530339486773835, 0.7231598125733801, 0.8609144927072642, 0.861006275303955, 0.2285713439913789, 0.6149726401368069, 0.01231398005621731, 0.5848894472840563, 0.06666740403261784, 0.8555982328339365, 0.5493449144437244, 0.6468223884622942, 0.3543093886065287, 0.939562402685706, 0.31421190219994155, 0.7888209364987551, 0.49440375004131176, 0.9744077854852387, 0.4116150312957748, 0.8738671332681629, 0.6072721498136605, 0.265388333850899, 0.45738093947055025, 0.8256869616748419, 0.721085705756952, 0.4334084699929295, 0.949615133534841, 0.8996870116215431, 0.05708484345585452, 0.9340081600429128, 0.28832551488773006, 0.6248405658001157, 0.8435635323087313, 0.20511058206857868, 0.716625093817508, 0.22897390129677253, 0.5645161303557658, 0.42595583213969546, 0.03701500453747719, 0.5307593691044159, 0.5195193731283735, 0.411774200850194, 0.1782469096509215, 0.45708152591613327, 0.11635087267063904, 0.5711953681512103, 0.9896163469392834, 0.9976788198241433, 0.09676599801320906, 0.5667969209758633, 0.580860296104861, 0.07621649464152747, 0.09739288026583415, 0.8121563283708785, 0.35775963032242775, 0.3166762519764812, 0.7933510251288189, 0.7836940475846617, 0.11283645662143171, 0.36044471007854206, 0.7869946351089331, 0.16788304635785745, 0.15686120338363319, 0.7503466843720341, 0.9572808773901921, 0.14746514419999013, 0.5770532353582984], [0.2628669137226328, 0.6800081978417578, 0.7763517715941253, 0.7040279533266568, 0.9819123431096654, 0.09225562353590078, 0.5990469726496388, 0.2670846305332927, 0.263353053451049, 0.9395011953221185, 0.5322945870243897, 0.0589637046567032, 0.468547952134055, 0.9522856257983144, 0.030736065609641372, 0.8756846833625386, 0.1886567122929469, 0.4774289970121488, 0.7739990749060096, 0.3363101899556781, 0.28779697864287856, 0.7070104123105668, 0.8067172081181191, 0.7781826035958227, 0.6474314781575093, 0.9078622496031485, 0.4801069557527373, 0.9078743526535095, 0.34512708056788166, 0.4195813497896367, 0.03681337410864649, 0.5764867502894847, 0.30069837869921434, 0.9084613389176335, 0.7956112020642767, 0.30553339074168706, 0.20141412465624087, 0.28873922835925225, 0.3449993384569592, 0.6820545947527211, 0.8414726585769976, 0.7879661940194789, 0.9387231118352586, 0.6600690572106689, 0.18604849147094826, 0.4287595767638829, 0.8543788305160122, 0.12364207418956907, 0.07961084884529279, 0.38768769773713496, 0.22181532469329268, 0.14144861257542207, 0.28619475443157427, 0.6716525736906024, 0.7843257799407813, 0.4491035960424977, 0.3346705241987816, 0.5974685341952795, 0.45283699364588725, 0.4220947184215712, 0.15180502856632938, 0.5673552337213482, 0.5119161650056073, 0.7233069508567747, 0.33884138819917364, 0.31447243117989676, 0.09133140139763496, 0.6605414226609609, 0.5979576526860947, 0.38775896329475223, 0.41695940271811827, 0.8776631385742134, 0.20592362713950774, 0.9264905713893674, 0.8640614257380739, 0.6212957819374371, 0.9072545517931139, 0.7639222058637363, 0.7384163186100242, 0.686828110286536, 0.43140415405941845, 0.050303317272339165, 0.70465667242147, 0.16170969626367715, 0.6804595984353261, 0.7652531390124648, 0.06525003870293067, 0.08078080463573456, 0.9939968163746431], [0.28925355045426215, 0.06424132386427284, 0.20616183122343967, 0.7816931071024372, 0.8074493422619707, 0.3621851668734921, 0.12295169097359893, 0.3912305406024943, 0.7615932837818259, 0.1399689312498814, 0.6951196087564081, 0.2816763595883942, 0.16432500200984756, 0.6523296713772749, 0.6916097411651497, 0.16299325652745356, 0.82612895879277, 0.17809753786872473, 0.06354368226310836, 0.22661991272975035, 0.2564473022178476, 0.618757986316576, 0.619442050292151, 0.02893192533307576, 0.1583965632411125, 0.6178281405949388, 0.8095611348905557, 0.5855393783667587, 0.778913273147202, 0.47771125364057077, 0.5203470033334937, 0.30355020340616623, 0.5914302193871241, 0.0895391065491048, 0.862816774443246, 0.43052691880988825, 0.23609350322699452, 0.2583102677628425, 0.5592309517182706, 0.8318790237127104, 0.530895227361225, 0.5638096814327156, 0.03669074062006872, 0.06547077387612998, 0.07708838979653321, 0.7714174232265827, 0.7907373573522265, 0.2383972676440831, 0.178592916500802, 0.25434579898609033, 0.42131916303663675, 0.6808163894318169, 0.5732246057845333, 0.17050380415576616, 0.014066851686452275, 0.46013944891235314, 0.8792921741527701, 0.31349188804739414, 0.5359769659141723, 0.8642526699289402, 0.9389017821798217, 0.9848904822309308, 0.8112546769860313, 0.883510372121539, 0.14889645462031809, 0.9245955182044697, 0.6002791381279725, 0.7301237728969817, 0.6955917132795392, 0.5194955454241297, 0.3027461293815653, 0.22876447842362357, 0.7995609860063836, 0.34832197614495475, 0.8527448115207769, 0.14108493219773277, 0.5317164958111085, 0.5524996124804241, 0.3896645448686268, 0.9389473017472979, 0.5352665439868651, 0.21197779142504647, 0.27908812145721207, 0.3333916622546378, 0.1910709427101388, 0.605190710384604, 0.30264038335795884, 0.2778559161160814, 0.04900078995727486], [0.43574902525568604, 0.6045458446877167, 0.4514933371599622, 0.2793260540272785, 0.747203930100166, 0.44187238758336544, 0.48658535472718467, 0.7552044515698407, 0.4671669484407136, 0.7555546613366457, 0.5805601479048851, 0.6178598809365065, 0.6027729493886048, 0.327879102489257, 0.09279270184573019, 0.8819452818108663, 0.4396717532116259, 0.1849731596440649, 0.7410614050988614, 0.5597379105323653, 0.6340777878044821, 0.3252266687553933, 0.8118980414448913, 0.7216343079074736, 0.4711830539978159, 0.7784894231871892, 0.5134205219662721, 0.876601086690635, 0.7723178752283386, 0.6689948433327629, 0.021785867509779844, 0.1970817002299743, 0.5947523991946674, 0.3465184446630891, 0.2983911097566109, 0.568543438925438, 0.9657677316583253, 0.7893712022462439, 0.12663885633788108, 0.31345558877044444, 0.3584616329209809, 0.2884447917517644, 0.0835277168778975, 0.8547518502808011, 0.7859027061063103, 0.37254275226433176, 0.8767353431485406, 0.4910859048508104, 0.258058419111198, 0.20232573367659112, 0.16526056194598748, 0.46266128478816093, 0.3383860165626956, 0.6709203519149725, 0.5831460623419354, 0.45102193264919166, 0.5538623235881542, 0.3788436997415008, 0.9574885409898504, 0.9322074667963394, 0.6019351616344683, 0.9080539403016465, 0.1592817290291464, 0.9922539643929387, 0.2967755234887638, 0.27913134705028064, 0.5948772256531719, 0.0008083411521653261, 0.7757946827071842, 0.9095775291386413, 0.9196114739426864, 0.048072922971673204, 0.7112035782992928, 0.4468453982822268, 0.9707321557711286, 0.06540959554748194, 0.5805809872584886, 0.15539722025539937, 0.1454863001837161, 0.5115441869887117, 0.4287395743068756, 0.9406682239184411, 0.13005618084781934, 0.41468399809243306, 0.06718483652098994, 0.8923108417349503, 0.8689125131011822, 0.7437890570408032, 0.07670140153317773], [0.17727609970821168, 0.8334906729220842, 0.9095411010418225, 0.9989993205488631, 0.8970673646738692, 0.9706151197498212, 0.36224895171769245, 0.06386860153020857, 0.3765501211402166, 0.5127614373724284, 0.6790970699499885, 0.35099810162420486, 0.5445470674240748, 0.6949533528850375, 0.3325705568801385, 0.673817073015557, 0.8574232404210357, 0.5148512869314688, 0.4614615729429873, 0.006461436033273871, 0.17730864223353215, 0.5298121562524614, 0.7443282425637429, 0.08445082750201549, 0.12787719990991098, 0.23343292094080825, 0.5453080731033213, 0.015557237611109609, 0.38856707603804186, 0.35965042538090064, 0.4602432927015214, 0.48620353874069555, 0.5581778640170965, 0.3842359155409306, 0.9454547767720698, 0.3045732600981722, 0.8705569094267467, 0.3126924998022015, 0.7144963614725265, 0.7487091802372875, 0.9955157207596517, 0.3563941605926443, 0.07490918716826378, 0.7376690149041435, 0.5749310419810628, 0.32751927791555047, 0.21433838541116623, 0.9247420141297441, 0.3658476065215407, 0.47297054857194976, 0.10120009015345088, 0.7259350245246728, 0.15641400766250058, 0.22646443523924498, 0.6170923682502435, 0.6516860245950115, 0.4517582251163975, 0.5978015203116485, 0.97614764069387, 0.5432997863547578, 0.15712319430447685, 0.9714898227462948, 0.9106421728406239, 0.2901615044685556, 0.168052727027177, 0.8793932411362089, 0.06326058056157169, 0.8537828374365928, 0.4902475861306109, 0.38125492747973044, 0.2879272115167014, 0.2922557432370688, 0.9515492249023736, 0.3718996900247503, 0.2949768596024892, 0.1345470991043315, 0.1907648420186704, 0.3885001669344983, 0.2274679423613427, 0.0982774917151975, 0.8086524432962293, 0.9322907942988367, 0.9328392380977308, 0.7557774798893258, 0.6604105183086245, 0.3809819996352827, 0.9709068518687244, 0.37650147645524534, 0.8797040920511114], [0.3374861951438002, 0.23895713604512125, 0.7636954114817881, 0.17069531636662882, 0.3239420115018271, 0.9427477990400132, 0.4422692278131559, 0.6751235877757975, 0.35721829429012875, 0.6607823478540582, 0.6066094441418117, 0.16069355882759961, 0.3155686217327227, 0.4282035760934877, 0.7440854218738434, 0.24756429928532175, 0.6368293656517561, 0.6500061637667601, 0.73738115479139, 0.4378558931611207, 0.1333888133406973, 0.083398454816349, 0.2942558456034323, 0.31236844385939067, 0.20145379332314706, 0.8172510605807186, 0.24532422587559533, 0.9426701949582232, 0.7184260630654474, 0.08630650148674224, 0.6980936568086683, 0.3272329018792953, 0.30421169249766944, 0.8400335725521699, 0.6198063878953485, 0.8800094859782545, 0.19286215671388296, 0.9496512145936116, 0.6339870271686606, 0.5293556331945974, 0.6847459079232665, 0.0962152746701076, 0.6552257199945852, 0.32258580282124094, 0.14655179589893386, 0.16236613614450468, 0.3404328168093178, 0.8166473000392613, 0.2916503153958676, 0.9488626022554322, 0.9739398976992226, 0.9094936102304864, 0.340023053952743, 0.94927219472813, 0.7267603986926592, 0.15628411247280294, 0.7475547921201052, 0.9399124825418499, 0.09698395996076581, 0.9145300396194145, 0.6339331263883672, 0.9675565968494892, 0.3206029370501551, 0.003166775954895229, 0.5404208717506693, 0.8315024722627524, 0.3620885932042901, 0.19793631960936253, 0.6485782161383014, 0.06340753030234714, 0.4956408115278429, 0.5320670000272544, 0.6928944401977462, 0.8803839979711626, 0.26018003978773385, 0.9102643386748459, 0.7606784395716172, 0.21725220622711627, 0.7474164923073636, 0.8330909115361319, 0.38865037775179223, 0.7667293106712022, 0.19306549176661825, 0.41765610894772787, 0.4710495079612296, 0.1028967437320033, 0.1584697649298814, 0.08877602239920124, 0.43590187744717535], [0.8767798213150556, 0.7402905667550858, 0.681306101740437, 0.45065658488245486, 0.29062266706645923, 0.25345308417702306, 0.5514550566838811, 0.050190830522200414, 0.6460828894200424, 0.4868561826554825, 0.6445670394232889, 0.6030793678640611, 0.12425288063298534, 0.5870736752995857, 0.7504915669108805, 0.857217141989458, 0.886399109749027, 0.73140847977964, 0.004355311919113536, 0.20082932783358676, 0.39874613261339775, 0.5277875449404482, 0.7706425292248501, 0.7333149708195558, 0.08849558569157134, 0.7774724139089288, 0.19941096470972342, 0.43011320340660275, 0.6273527438389366, 0.7582296018784709, 0.9359218397944371, 0.48558766313110713, 0.05653466484295455, 0.573400732470097, 0.2292209281937908, 0.5658234010687759, 0.9716498895982173, 0.49894186042903665, 0.10903302922427116, 0.8266268629008727, 0.37722986164420347, 0.3428323104762473, 0.7446267589158959, 0.676502180398083, 0.6284160920823388, 0.8366088543555177, 0.4677177812732274, 0.6878998796824863, 0.5881670594614951, 0.12887120402044916, 0.49163764349433203, 0.295448703226619, 0.39262225145758767, 0.055047028497218875, 0.5065894965475476, 0.03892530571241937, 0.4433745689449372, 0.013606256136755146, 0.23893928459993152, 0.5397617115469945, 0.9416213348165522, 0.26701976446649867, 0.5297643400630333, 0.8821548405540685, 0.7749631695054328, 0.8402111923158895, 0.8158704598841227, 0.3300327414339921, 0.5532401323196249, 0.7051564871403732, 0.031775888730803614, 0.5256188013035926, 0.6474340951478574, 0.5373558789590714, 0.13714001534131304, 0.9999461597012564, 0.7545674518995963, 0.4071213476402833, 0.9821514131471437, 0.7619012877326233, 0.8106598394262263, 0.9979272406273922, 0.6964585112705692, 0.768183408123943, 0.5813731710495215, 0.7186930256322168, 0.6939490557676479, 0.1387120591335621, 0.537550224711139], [0.6445267688097679, 0.8672318584760279, 0.8646549500636769, 0.9447065826977449, 0.4396910422025644, 0.12719443711839973, 0.3889560414140969, 0.7900208639238427, 0.38379717065047336, 0.29470235282675294, 0.9685774236842468, 0.4113824947780007, 0.7256674380240695, 0.20588979190570844, 0.12531341276787156, 0.9888888364126407, 0.22757110893205545, 0.5923649144365112, 0.4049496237147986, 0.02622332756735002, 0.9646759996382085, 0.1381470385373892, 0.44089317261975747, 0.8506643131506442, 0.5214999604550182, 0.8358401369270844, 0.7362415989795644, 0.16888530251638223, 0.6760134441021778, 0.750761387398107, 0.762255679252731, 0.42315044074915453, 0.6039542803412107, 0.6914317856649209, 0.3410657284177464, 0.49439785288254146, 0.31062517287686875, 0.7641897846061854, 0.15882467110189835, 0.25461812138645523, 0.1649740754263762, 0.32906630179382335, 0.8191950654724666, 0.10078421637221235, 0.6725932529649279, 0.43655797085094505, 0.7731848255190357, 0.4266365556786753, 0.7764350436442461, 0.1856309546777276, 0.5756129982360815, 0.6620362929019004, 0.45524765498782394, 0.7659963178584408, 0.7012867386661666, 0.3990619769083322, 0.8227663914526152, 0.34235016534230367, 0.06510863728271021, 0.15439296766472377, 0.784525279227048, 0.9559773120575443, 0.83447702856797, 0.9228418033030726, 0.9316061664358751, 0.03728079226619874, 0.6827174982486444, 0.4871366356377369, 0.11539113871143225, 0.9605588318883541, 0.9211948580523726, 0.19964158936951482, 0.6725241523627675, 0.8891428024156611, 0.5862134792264311, 0.15238451067579106, 0.6667993012848721, 0.2646517026228957, 0.29246873720442257, 0.7652960582905014, 0.7669365352317316, 0.8488436944381353, 0.4143112056576901, 0.41269252932455447, 0.4044873326789723, 0.7367872066776237, 0.533409343040186, 0.8025802768205182, 0.8716147428499752], [0.4943242446049688, 0.48432463154898464, 0.894306037931377, 0.5929400017303887, 0.993488556457265, 0.25412301194639053, 0.5338947403339935, 0.10149158761464816, 0.5465568298420754, 0.36489333949654446, 0.014492587800809975, 0.5184978981072311, 0.9573761178937794, 0.6009984081899306, 0.47586151303144275, 0.6895080533128322, 0.03741734173259437, 0.169449375838306, 0.8780432296688463, 0.7798756734482564, 0.5922621453717599, 0.4149584751201749, 0.28557761486659083, 0.6219498152372738, 0.6814612917668595, 0.9065478083881379, 0.6629710783560083, 0.9702562688615158, 0.7411156572094194, 0.06481642943346688, 0.2429278386374104, 0.810134256627632, 0.883018510472257, 0.9982663002827877, 0.7650746951208215, 0.5717539684562033, 0.45339206137437116, 0.4513006342713908, 0.322638212940788, 0.28205972671018287, 0.47239713995703403, 0.7671413305150901, 0.9698633275181329, 0.08930287769997469, 0.4842708268715852, 0.6234315173124023, 0.8926791195921748, 0.9306764359495514, 0.715071664588506, 0.8392137316419902, 0.03426875567348109, 0.48825703386718855, 0.9182125164109367, 0.2106689914414296, 0.8699989152985291, 0.48764285668468366, 0.31944639691099164, 0.545841659517332, 0.7615997785482863, 0.8644133417482424, 0.8753757956803, 0.2401758478758581, 0.8711982874893084, 0.6680744860936942, 0.36684508535992566, 0.6315585172384744, 0.776232551177921, 0.03771131207438849, 0.5038616060220826, 0.10416047607666301, 0.5331552365726495, 0.7653980279933758, 0.029780132088968125, 0.6390305735052513, 0.21487559545862867, 0.2341656816406642, 0.40237821010610386, 0.03626356900791883, 0.4907588394323359, 0.10231116048239208, 0.5998601052635217, 0.4507828007926462, 0.7032876715524603, 0.4902195477218523, 0.8888403952550855, 0.48862859843840145, 0.6103631374700578, 0.38856856040573506, 0.5787301452046386], [0.1255517109014449, 0.38807620655807773, 0.4792100205969232, 0.4920099112140399, 0.22963690355205768, 0.15722522486588186, 0.6732686865178659, 0.1846418622053051, 0.19831295127875137, 0.666398054304459, 0.12023358531193684, 0.6776015744728352, 0.3072493029007951, 0.26272599818249676, 0.26987190713184805, 0.9351237850616615, 0.9403666911885091, 0.1918576402539568, 0.06165005725905903, 0.459390421915977, 0.9317338085250116, 0.9271636416096445, 0.8518646221630052, 0.6488786673790444, 0.4441428110127338, 0.11787622260255148, 0.8615756628312252, 0.19579015386452048, 0.0901574934037187, 0.4911526179487221, 0.2908841957498327, 0.296969964157506, 0.39553881447686645, 0.07681712611428759, 0.016249680322145466, 0.24230361605910877, 0.003523194689287412, 0.8599036252423059, 0.44985906886188354, 0.4970261616869798, 0.8347263178835761, 0.874352585235325, 0.9326540446460811, 0.7669945664938829, 0.5596114809752317, 0.5909784421036192, 0.7221543367652734, 0.5977027857541861, 0.07395480924420206, 0.293643942164745, 0.9899190054165836, 0.20758287674568754, 0.21646735134589468, 0.493926470822445, 0.45695685253462803, 0.6886927978441875, 0.7907337270558611, 0.36118488809350136, 0.2747325420954888, 0.9682305053679313, 0.2061986641755469, 0.09862249616225882, 0.29447970121525746, 0.1563446222979984, 0.7142444142885579, 0.27901224623904364, 0.3348413404475089, 0.024717533032736938, 0.11517121085110049, 0.8270771931011848, 0.4816199894867438, 0.8279510656350074, 0.31858555678488465, 0.26715290470317865, 0.5101839705194834, 0.03176894180005829, 0.5522684780508881, 0.9277942399032957, 0.13060249098821186, 0.8223309292381051, 0.6235324029595669, 0.6152635728504807, 0.9946889355011076, 0.1457281229719064, 0.24438717315657998, 0.8676150467071082, 0.7053145017225485, 0.3869872686855318, 0.897154769826219]] bot1_bias_layer_one = [[0.5282374042863404, 0.8007323313652918, 0.6907877265641761, 0.7245762443884515, 0.9843443673819136, 0.6485807543265106, 0.05225336900731414, 0.7383205257600947, 0.44856317241224886, 0.1045379682319707, 0.4406046877449542, 0.7102555123655883, 0.5113748061203466, 0.7980383728641556, 0.7395317014801107, 0.4852792793358126, 0.532919138233343, 0.6144706525422695, 0.2513549201706653, 0.07432586269244412, 0.5396421667617102, 0.3169536751317228, 0.5428484104184691, 0.9688976580762136, 0.7635073206168332, 0.15879638473458735, 0.11226710166385523, 0.9783586343995047, 0.5151033400253183, 0.5308787843709262, 0.45693851611062375, 0.2416143595829653, 0.8723438111695375, 0.33898908394449656, 0.05106482052347239, 0.5167887209236562, 0.9719542083704084, 0.04173490365739163, 0.6783250191205238, 0.4648055056755612], [0.6437198038545422, 0.9917483405613948, 0.9281071623730037, 0.6724020868769381, 0.05226172818274122, 0.9610646556933303, 0.5883123806872438, 0.37723748829314974, 0.9026655940006579, 0.19869106648298018, 0.5224525606903694, 0.3269723346297789, 0.6065718326066825, 0.8664309788120428, 0.4596969520025904, 0.6693091453985626, 0.44706467657131266, 0.042578354912096716, 0.6793630721861424, 0.9508389093533054, 0.16833181611158543, 0.9003269359860947, 0.09473809854534154, 0.7384733052252871, 0.9068056428150388, 0.7653873677385669, 0.530961741180609, 0.3684465885277163, 0.8200391498140044, 0.37327128207942295, 0.9346049514955589, 0.5060598588731101, 0.5858120121551168, 0.94398552598559, 0.4451865301523843, 0.47504351902179176, 0.18015790305053403, 0.4684873184531432, 0.8104417932468928, 0.5364346775097965], [0.52472855349079, 0.9024087499726638, 0.48768699338800214, 0.6194022520988656, 0.0886858567996448, 0.4251991201600297, 0.9676568969098656, 0.6236867925826434, 0.6497055086913761, 0.9470896351789123, 0.580707420788774, 0.11867039941167934, 0.06585504858295244, 0.3386008383780995, 0.8336328993477536, 0.5490554648734383, 0.10219550406059441, 0.3407714324326281, 0.5457743932998534, 0.6030409385129596, 0.8523951575344998, 0.7980544349637834, 0.12283711245320716, 0.2396100195804558, 0.2011669733979633, 0.3776310487760113, 0.20838060076746678, 0.42585579675696617, 0.6532378478211758, 0.10675484361511434, 0.2815539917103992, 0.8346075537823006, 0.5049572820293564, 0.2568064165955368, 0.8276430468717176, 0.7814683755632481, 0.7567069054045219, 0.5779602546719758, 0.8812140586620885, 0.8596189261135361], [0.7576053372348847, 0.6125376117266595, 0.711214814163607, 0.438262380865984, 0.002532049659931923, 0.46699682515498264, 0.7320108935369988, 0.7223678494951178, 0.9385723744004828, 0.7704360638196736, 0.14482429069671143, 0.7085486171015449, 0.5750370011639848, 0.8647881444376616, 0.7685729826622748, 0.46741999196907336, 0.45906943218340124, 0.10391558768455611, 0.3055394992408642, 0.9492448037825001, 0.8605846701607707, 0.7326884430360666, 0.7486569222785744, 0.2627444904294036, 0.2541474295119921, 0.9751838893258497, 0.6493093022436812, 0.6916064980126243, 0.8365902337434984, 0.9439581642244835, 0.18124811522241757, 0.19995624825715086, 0.08114158081115563, 0.7232554675847003, 0.19476399735316652, 0.6809064207223642, 0.3314219102095959, 0.9715475930640679, 0.0940605184279707, 0.6188046043001112], [0.44162688789419013, 0.6998956352998441, 0.03886034505219915, 0.08042530853277341, 0.5408707506513485, 0.8039354835951812, 0.16526429023422962, 0.14891270751651442, 0.7112086276723384, 0.5495776914487421, 0.9228467695461018, 0.726505190685584, 0.12596778171151723, 0.8193009044015871, 0.4476944659951484, 0.015734995207615454, 0.8118308443406469, 0.18888316536655514, 0.11639297036877028, 0.5710320533749121, 0.3950524792648278, 0.714501934591881, 0.5051223069133127, 0.8642394770952276, 0.32464133092718217, 0.41661400446049235, 0.43610062314642173, 0.7710716996006635, 0.884527978627645, 0.5340829211489462, 0.709077171747681, 0.9302925427195408, 0.18178976444676587, 0.0018836523882554967, 0.9232174375276231, 0.5738487349949958, 0.2525981870883497, 0.14273696256940116, 0.4368103839200922, 0.40238189583397943], [0.10979419742424834, 0.05284721682087057, 0.8483677726825901, 0.6959499137322643, 0.07273865149706793, 0.4406796944089445, 0.5579798845228036, 0.5334095793527182, 0.3839110614450588, 0.30772608893522757, 0.4712646179926183, 0.0674866808694915, 0.9751361941588671, 0.3232761761100279, 0.8071647971365754, 0.24686603484159697, 0.01625619206634421, 0.7033952605561047, 0.7334279862389642, 0.47995270868865025, 0.508359413935169, 0.923428883082407, 0.4430556315049017, 0.4721717555910293, 0.6146816191698786, 0.13215916430522012, 0.4964023995385246, 0.8603867936291556, 0.4502701083463472, 0.26807433681778825, 0.6283170187201215, 0.5828260727173091, 0.3244542658112781, 0.8467638288756998, 0.6939280369159224, 0.21158516487071177, 0.7305394182014601, 0.34546288343323883, 0.22898529662142186, 0.4995186946165374], [0.7863750442130348, 0.46288832192932106, 0.8537304142124101, 0.06314868574013988, 0.1265890231498985, 0.9262667962639739, 0.38075087314419864, 0.8900846496736299, 0.23680988145309745, 0.008327542089045181, 0.7926834875107507, 0.9729041429678242, 0.06452539310565608, 0.5725170363511132, 0.4178235693235982, 0.7285572327055083, 0.5590531949941934, 0.9821548780032038, 0.7416867582006693, 0.9538455850546536, 0.38044262337190315, 0.7741033647765257, 0.4721328246804548, 0.9032310636301526, 0.6270670595070585, 0.950869492640897, 0.8263027653951777, 0.3329194493735198, 0.6337304769254406, 0.6759456662452645, 0.04595534402854662, 0.9102832864534441, 0.5857548307211281, 0.8175705058753707, 0.18745098366725443, 0.3517310137524525, 0.7776900680514854, 0.6684817389807713, 0.19233427520676272, 0.0862631251737872], [0.3029998500846066, 0.28935410322744937, 0.6218554486907973, 0.8420387073112087, 0.3505590207331256, 0.17059716888909038, 0.7929155849924996, 0.9301922687399469, 0.20904218564994226, 0.9053271423091368, 0.6559874824815429, 0.06825261778794134, 0.6982263083236689, 0.2444967667513155, 0.5049436444722383, 0.7339695457170737, 0.4982474626344098, 0.9639522828469195, 0.7295931853467219, 0.7492534761642515, 0.5257603259007675, 0.3525551958088887, 0.5796558730253563, 0.6177609808548299, 0.4435892068291156, 0.23588527138492033, 0.7308777534403581, 0.8912550212262936, 0.022121991638857086, 0.437885081588575, 0.0352709012239486, 0.3120209685298869, 0.9981275679919468, 0.014428328242256816, 0.9619488252724584, 0.1093546538599861, 0.6459844100065254, 0.027118754513430265, 0.07749672145525588, 0.10494186154011342], [0.36155509396613605, 0.7890087454782185, 0.5837834202625904, 0.2873696204357541, 0.01366896918030669, 0.8508083024690711, 0.2784936795590105, 0.9915823878507602, 0.13074738597706737, 0.09287053720482552, 0.07886646503368144, 0.7879075929008182, 0.25778460032148975, 0.8930425817728, 0.17727874522524334, 0.8888395867633827, 0.5861103110625878, 0.3729198408913216, 0.7422271081745749, 0.4347682889210617, 0.1989063241235577, 0.10141300611033444, 0.6416262228473784, 0.5971824695812258, 0.8669910911990809, 0.4438532034619552, 0.9775182100303129, 0.6987519060348957, 0.6335108638588863, 0.6335173639601613, 0.316177468115288, 0.8330519838304269, 0.38277838557150556, 0.888467179418893, 0.7364649940682547, 0.7337703880045546, 0.22087647689863776, 0.6671205398428391, 0.031240188370789013, 0.3693172635829167], [0.6080245103627565, 0.43829971692554126, 0.6652537781376434, 0.2541920121088903, 0.10402190152963131, 0.54799408646527, 0.26335677910183064, 0.9977211514021288, 0.9803891733486586, 0.6672690889483182, 0.3579486509803098, 0.8523772918608504, 0.5574217978194949, 0.18355678412309684, 0.11928526227430791, 0.11807880340623966, 0.4681081843045445, 0.663464813852211, 0.06599013486464511, 0.13273089089611323, 0.6124027637943724, 0.27642149450004494, 0.11244713217945279, 0.7633545590364574, 0.7476551733669871, 0.7624934118869393, 0.4575439334050335, 0.5449333841975237, 0.3051569233713072, 0.5724802086284331, 0.15178932301229442, 0.9908985128517098, 0.7614575923560923, 0.7611619968225237, 0.14688852620523685, 0.6960447028120814, 0.9575489842581474, 0.7435570302606918, 0.64255160878343, 0.5743406211691952], [0.4764187029750734, 0.8902797936988391, 0.42532216446139515, 0.27850980697787353, 0.30782112649039706, 0.32354677966530676, 0.36358544796330583, 0.41973788170505333, 0.08007962552492698, 0.42023356776709386, 0.5751497733677049, 0.907121621350938, 0.04188683347397504, 0.8232567319152595, 0.5315234415371232, 0.9412576211741531, 0.6593546086274757, 0.12797962260500506, 0.3628084962043221, 0.8600602667280222, 0.05656713402354441, 0.17786144196159537, 0.15917565808614353, 0.2931384381900478, 0.5712176257770376, 0.17061948594165333, 0.0045293149545670985, 0.45372353647457697, 0.5942497448869575, 0.5508022368338262, 0.717405676941688, 0.553223974562584, 0.551214718595, 0.8290552239101374, 0.8217797841427029, 0.47232307990221345, 0.8713066744437719, 0.5741029635053125, 0.6135659946901764, 0.1601602233765036], [0.5555195122024822, 0.11357151494849604, 0.6622829791786821, 0.527922144132917, 0.3916339412409443, 0.8684470240881991, 0.4354279966432101, 0.9317537327465877, 0.022391398190218403, 0.0847930813884854, 0.9490765810050635, 0.7456401249072926, 0.4892834195804754, 0.1902281369702058, 0.3231248476450297, 0.41250222374461365, 0.35177940068122326, 0.7987941354215241, 0.9642817417507571, 0.4351958176256788, 0.5520971122607368, 0.2662548234259856, 0.8757242147245973, 0.9174896203229823, 0.2479328412424252, 0.32595614020756947, 0.9886582270575998, 0.7114536280313782, 0.9290490999801969, 0.6160931332873637, 0.23223965033374183, 0.7493464976567716, 0.10285473871270889, 0.572432700855567, 0.8979438200123571, 0.3874618873794474, 0.38963995381753525, 0.27810813022614467, 0.2611508075621607, 0.4695642237482581], [0.09180406550313858, 0.9536432174254263, 0.331040669738237, 0.6526941835329422, 0.787370730209742, 0.4829072896362061, 0.3585516391079998, 0.8322727985864191, 0.9889645453372817, 0.15610306564099552, 0.9269410101433467, 0.7115477005925924, 0.7798198948674565, 0.2030614883944566, 0.7335814432599502, 0.9409385022063694, 0.7934233401124346, 0.17892920164157822, 0.7961286406762232, 0.38517112347482796, 0.743322406587928, 0.997000220800002, 0.16975984779004605, 0.44586506009283033, 0.3939817924540088, 0.8600888895880838, 0.13034366830347122, 0.4605835930937182, 0.21301339556803978, 0.12101687181599785, 0.6520233105014817, 0.8524109887793991, 0.581419881968457, 0.9503454548611743, 0.4724778246143172, 0.16748236756985224, 0.27086595647044587, 0.44166024230288015, 0.9100043316802258, 0.0025598283245876763], [0.036558366047447666, 0.951206863987329, 0.9276141267525767, 0.3407273112650998, 0.6402211741430154, 0.9298329099066687, 0.968353438969897, 0.8066551594096047, 0.7355451061363726, 0.18334736029708598, 0.3338819401034293, 0.3818947888756733, 0.3613621726262606, 0.09478204262897583, 0.08099784972759583, 0.12685727576246153, 0.08487369107940923, 0.9213647389791035, 0.6308133056393888, 0.2346759753327755, 0.26122527528271255, 0.3841398501841776, 0.9850088052502715, 0.40725611395547345, 0.8883515724118635, 0.10884958404106093, 0.49480167881260884, 0.2352287770921404, 0.31317729880243816, 0.6143280019507399, 0.3884607030124161, 0.8942290968801521, 0.08553382227640416, 0.07337409101915504, 0.2688612320963977, 0.3607967443802065, 0.7033981798202761, 0.9910104825604094, 0.47967595444395295, 0.07860053489887253], [0.9303694579474419, 0.65743537419524, 0.7573694174157902, 0.7900219771081194, 0.1311417990627205, 0.9017480092548321, 0.5224913881975612, 0.7805039530248696, 0.7037842690897504, 0.30243906629153716, 0.28773577358934355, 0.05515307290967464, 0.9855774357437966, 0.33319096066125775, 0.9973384883110036, 0.216727588241736, 0.9155129310029899, 0.6187685516410545, 0.7318469791973959, 0.01715984711946983, 0.4137628687836644, 0.40308731451070745, 0.9812720014417943, 0.3656736970678067, 0.7214171379352884, 0.4716830000042188, 0.3211026740213274, 0.37168268228411516, 0.24686502570160984, 0.9610048147120761, 0.31841395752072355, 0.7835617777536383, 0.4448211776237857, 0.5714326976983406, 0.30413597113583946, 0.46410791001417906, 0.7923844953662684, 0.39829548448009544, 0.7621499266965927, 0.5895525642943074], [0.5354456543140124, 0.7864646022812039, 0.986074919569088, 0.24366178501603253, 0.2838301619167105, 0.7938178697934669, 0.6063597923135704, 0.5604931570758807, 0.3091556838211519, 0.5331551041213544, 0.9642073999421401, 0.4124303185465632, 6.597819755049805e-05, 0.3846666717051227, 0.7614829078417563, 0.72557274976776, 0.21171693212164844, 0.7240133290820134, 0.1035186020998915, 0.8847814429509909, 0.24589923991797025, 0.8787268424296528, 0.9078422079491352, 0.12363931745585499, 0.42290050261952516, 0.10289176362902974, 0.9855556004300402, 0.6681638983299176, 0.7850906005278752, 0.9348934354519969, 0.6683301507451773, 0.5799549041919367, 0.4147211970428566, 0.4077616817198809, 0.939507173043615, 0.8516548803839927, 0.04822527152475575, 0.25040144120938723, 0.43300441526149325, 0.2718545965539435], [0.2886080571305464, 0.30259788346816285, 0.076927863313757, 0.6306793798933725, 0.3544977491245779, 0.7200545241810984, 0.3322555232634017, 0.5820797134542185, 0.12819724606371896, 0.2085289613857222, 0.9153705147982248, 0.1980206421111591, 0.7167259943349726, 0.9060539891306533, 0.3411130363785718, 0.10889784494761778, 0.5946134531396255, 0.9138561197049507, 0.6277954269229936, 0.48711815767818345, 0.4056593201670996, 0.8687956069662421, 0.5479504856054183, 0.6212018368461979, 0.06397172738870105, 0.04321739724030771, 0.22331199321696749, 0.752262414127651, 0.43178358536656025, 0.5075651362340445, 0.9031734925577821, 0.6441717384100485, 0.4246729178433052, 0.5741317542561614, 0.3759000600915483, 0.2543479237898948, 0.7398516864127815, 0.4319967575012372, 0.39178692880669774, 0.27018338356642746], [0.5914013802315883, 0.6966491903129953, 0.07909452092844493, 0.6429034801984461, 0.9158200498480357, 0.0457436844148964, 0.9535880986111993, 0.4036599920042603, 0.18734118570808422, 0.6052169240025779, 0.28289308248262734, 0.10043434110546012, 0.802539146842573, 0.07840856036303812, 0.04705899829589266, 0.754350070699537, 0.5224955294551503, 0.7139893428925421, 0.7341100101980763, 0.26359559179104186, 0.9680002028940262, 0.9898362748996594, 0.517795116815029, 0.530873926733039, 0.878253113362021, 0.8688823110355398, 0.6579797442071422, 0.3218990980575054, 0.3323887429834148, 0.6403553590148504, 0.8571367940398008, 0.23613465917089926, 0.9174486436898553, 0.9908927409219584, 0.45879222744231984, 0.5196651622602689, 0.903469725173193, 0.49697350058909384, 0.8090351664344424, 0.139899810413314], [0.2846962055427015, 0.12426022521901836, 0.958037733933284, 0.19645877687914148, 0.2500137159327618, 0.7775206440650362, 0.9550576011867677, 0.9753031549903538, 0.9843008005671541, 0.3579081003591803, 0.4952922599338746, 0.5168579182896426, 0.45274437268262446, 0.08947521381042667, 0.04613750388234927, 0.8782912020281504, 0.8190374546262154, 0.4875105014280313, 0.33169840558772967, 0.5317439332225594, 0.5094573843406561, 0.21940706809292365, 0.5128067969500457, 0.17441193212644246, 0.9165330896716449, 0.8067865223983669, 0.004976185692947999, 0.48186896489544206, 0.5446905397383867, 0.7273618398382723, 0.8490724329540034, 0.06281007577452324, 0.4176711873281648, 0.46531258647600493, 0.9536683841064754, 0.5320865965126607, 0.136556634909616, 0.7169702056794217, 0.8671784388553111, 0.39039123458058533], [0.11476735258921233, 0.16288624665118012, 0.07439842486356629, 0.9312333182744784, 0.025043159082211996, 0.6087385989144453, 0.18746019460359142, 0.2337589730196129, 0.6498620955665207, 0.6937234756676556, 0.4201521944936212, 0.7624725157028637, 0.13087320511585354, 0.2958778211440005, 0.35793365089052587, 0.5021550510189444, 0.04689537306515246, 0.45296987606291417, 0.7414119184375603, 0.8985357768030755, 0.9265572575706214, 0.5498323448886893, 0.229855635734454, 0.44862522998434384, 0.6088363070654847, 0.5164757571958161, 0.8747180432725382, 0.4412998428476709, 0.49674006310481267, 0.4201449375139855, 0.32191300817304414, 0.899295582238282, 0.6037374993989044, 0.5962933218180466, 0.03992835379537196, 0.3424514642094869, 0.5881582586793377, 0.5066137184538121, 0.420566137276128, 0.6204102890700302], [0.1717774816612111, 0.26473858207990064, 0.48492922227567203, 0.5221120664912278, 0.3603718065838797, 0.20561780260995555, 0.8825006852534271, 0.622586390910986, 0.15410013541518686, 0.9518884531639028, 0.5186162560662777, 0.25286378413545785, 0.07047597279543438, 0.966860485378446, 0.05402969201071395, 0.5704821671561654, 0.32415336643857806, 0.07344583430575746, 0.98382391416645, 0.4494723972669201, 0.14536968663951078, 0.9789692762169377, 0.45168736487074346, 0.2551290123037706, 0.8338071891369979, 0.19441054300789617, 0.7690854088802564, 0.3483773469451519, 0.2425143385652354, 0.007192724569955122, 0.6083091936227473, 0.32113866483604625, 0.8547169405083923, 0.9235791422469641, 0.48265128318364603, 0.7653980807738866, 0.4750875187846131, 0.531586337703901, 0.7521268909082224, 0.2607437953857553], [0.7520478560248436, 0.312252331671078, 0.557997534302579, 0.34713764955486004, 0.21411598485948347, 0.3282857229317512, 0.058232589975318994, 0.5857369263558264, 0.13761322734933812, 0.23850503763875053, 0.6491275179309179, 0.9143946836453878, 0.371049420591799, 0.04956242794051302, 0.03756142576283039, 0.19119286968911775, 0.6829784746098002, 0.6347720571655239, 0.27569685339371175, 0.2542531569148935, 0.6257528734151947, 0.012152318349204494, 0.9993719361662287, 0.0818473678533419, 0.061531103272058796, 0.899033158083912, 0.6791561506446193, 0.13113033409338137, 0.1661920563209095, 0.77441512401131, 0.7895019057822719, 0.8754692398836217, 0.815893950124527, 0.9890152250482848, 0.4084098012286115, 0.2226868918557593, 0.7544219382392489, 0.9206763667218736, 0.5361125022229081, 0.3862230275327899], [0.9664333575302647, 0.5123902273704258, 0.7900684764904468, 0.800033855557901, 0.49999356632525116, 0.968166288476215, 0.6240184591017016, 0.24172033801322335, 0.7029539248550747, 0.0523082850408374, 0.61411894421687, 0.773414910420878, 0.49797074095556937, 0.4918039247155015, 0.1352050764751267, 0.4158968299116136, 0.47942360661799166, 0.22938830875666394, 0.08145131824753826, 0.027559746466286783, 0.11930130417676721, 0.05745974729272463, 0.137905999691463, 0.3293023317618169, 0.19589697571966713, 0.33158682300629805, 0.25566404826090494, 0.41860740413134667, 0.45093765827491405, 0.6496998154230602, 0.06313804377969079, 0.8797429039361524, 0.36611492573517057, 0.7326092345284815, 0.8736804351434507, 0.22164681334595282, 0.6588868573412098, 0.9513250845403904, 0.171872516558346, 0.35232246589562344], [0.23846783912034097, 0.31289668878103727, 0.7109227249639721, 0.4413695022638833, 0.557869219656795, 0.09359174080895927, 0.8357215559543906, 0.8948289435908282, 0.9110908255495519, 0.9708069583632613, 0.7458860051379627, 0.0018037864133964021, 0.8770997098244465, 0.26176689649040263, 0.8295348541462196, 0.652023922600753, 0.015408423924661685, 0.826836800533934, 0.11948154517583998, 0.5895346638938812, 0.4306862191148738, 0.9716258605407303, 0.4029785008988722, 0.5370424890059847, 0.4020896423681467, 0.3075135619075021, 0.5548955555880424, 0.16078652060660015, 0.27738424637450965, 0.40315295518363414, 0.3894951227919209, 0.24554299747516162, 0.9333168720435372, 0.47067990687720107, 0.7024537209229025, 0.032718660149192225, 0.5729706706828684, 0.0966191442994565, 0.9853468462448844, 0.9422981403373298], [0.22681951660164024, 0.899257064349061, 0.36945067144191834, 0.3599809967991987, 0.5994287422981949, 0.47626655089359327, 0.23449042427639322, 0.23532588557235, 0.8035832642729512, 0.7315227892786735, 0.05686259464413412, 0.35870388410382237, 0.5356546508625858, 0.8561593522502731, 0.5179672915669524, 0.7512737497719101, 0.5272922735118873, 0.009344807741574424, 0.8292447410706214, 0.21955158394112906, 0.05240102877191688, 0.14671759440080023, 0.5041968577242806, 0.301573346379019, 0.028208699628502254, 0.8165421853226893, 0.8859013220406766, 0.04456043864975734, 0.042784838735421715, 0.2913070943948318, 0.19080249283614625, 0.7447629652627382, 0.05790061472251051, 0.8816807061017713, 0.42447437891187567, 0.3084264255015091, 0.5077190380502947, 0.7235180575626023, 0.8419390990488687, 0.4736272967045032], [0.3755987118040701, 0.66461704368007, 0.7770254505871378, 0.9056865086751943, 0.6993533255708103, 0.3493005532367971, 0.7035252106600669, 0.2160927646130456, 0.05606404830518652, 0.3428858958928237, 0.562421109360729, 0.21965738312702332, 0.30140712200990494, 0.15844531757771085, 0.05918852199857072, 0.4486925449387188, 0.22592048999157288, 0.7366910075323855, 0.5737185527521312, 0.23770403147010233, 0.2795070771623991, 0.7413341485903104, 0.775021668923174, 0.6188673858909581, 0.2589389696660095, 0.966634843962226, 0.5557742119511939, 0.06499762647172036, 0.9807822337246135, 0.711612921552711, 0.46017354301203894, 0.8567683385989687, 0.5185814425439282, 0.8689536612314087, 0.20069179175255292, 0.3637828734187334, 0.9817146633198706, 0.8537909496585927, 0.3616953587572328, 0.082581331311947], [0.3276162757821931, 0.8988997903702403, 0.38957251331140696, 0.7855881355356018, 0.009528863902416584, 0.02185332796084516, 0.9278117924557476, 0.25171302195676637, 0.7194104326526312, 0.28805752198030354, 0.2991785034276856, 0.9187860988136197, 0.8848164068170141, 0.22916360993333296, 0.34410968814241893, 0.9182843050747854, 0.08005953188407922, 0.9115983207764008, 0.6307708854292958, 0.8747519894017676, 0.07413030323548075, 0.81547861186985, 0.4817437745677233, 0.11796156970797089, 0.38832198230455794, 0.511320007824598, 0.7643658098517029, 0.4427674284528115, 0.7567280017362101, 0.23943709358790277, 0.5060911513316845, 0.9950357229848774, 0.13411288048136738, 0.3790139610939026, 0.9608477331140743, 0.1400489002660067, 0.5779774394417428, 0.21675595226670397, 0.9177115321128427, 0.19215939539691174], [0.7214191166388125, 0.32624555571369807, 0.48718053291358865, 0.1192852555337981, 0.368322386097127, 0.3698720746048365, 0.9772381302662888, 0.5685286317768721, 0.5219300129883295, 0.1599262917282288, 0.2760643308850298, 0.11679980417596347, 0.797398970551561, 0.007963206844745607, 0.2574767880725808, 0.20443195265753256, 0.9833616236220033, 0.5145576315349922, 0.043953560466303054, 0.23447722206211608, 0.6961966169439321, 0.6860177441330073, 0.2773153300311213, 0.7353530454694565, 0.08196548715625596, 0.2870045467358201, 0.884845076329907, 0.18897951546562253, 0.07698167440070869, 0.014235458277937485, 0.7578213640318767, 0.5124120129427492, 0.8453804291970074, 0.22423284163830637, 0.6429172510199457, 0.52951200561552, 0.2465641488902004, 0.6315677302987114, 0.977078390714113, 0.5942344352020806], [0.24172637811844888, 0.2971198366594141, 0.200651829863974, 0.3578813996454957, 0.9433322658786207, 0.5297006465577169, 0.09743859154822909, 0.5126912904860422, 0.05731539979502365, 0.405458882731057, 0.45964544480763725, 0.9665306219673531, 0.14714513531056583, 0.8251134408199273, 0.41677689625386505, 0.5351812115895918, 0.33383121662055937, 0.1993387756573366, 0.4270954202283761, 0.4340962966385311, 0.9695886606493639, 0.13498984858663843, 0.9819603543040618, 0.6223774736821508, 0.08737059135924541, 0.6147209842014804, 0.6720066661491462, 0.8641768343268659, 0.18723729595755834, 0.6470069536539051, 0.40177828033778595, 0.7401416628192257, 0.5271107447016355, 0.0755363353150712, 0.1484019885619563, 0.7035475214713459, 0.4332391789290432, 0.41647107711993736, 0.8369694462258492, 0.6694648529036997], [0.9949963398759567, 0.526264605802731, 0.638205861591911, 0.7772492828572212, 0.19963097848751576, 0.13358073331704357, 0.2754203702208603, 0.8769979732183413, 0.18113264790809347, 0.48198726846262196, 0.018347739117808848, 0.8964030245872391, 0.807719520872237, 0.8064335822845045, 0.6780468104811597, 0.46662722184802763, 0.3455400698350152, 0.03989269647596194, 0.918802834448473, 0.5039305254428137, 0.2444785184561049, 0.5008581887256347, 0.697091228823128, 0.6073491482101635, 0.6360928584324486, 0.8993022517913076, 0.028596726828495678, 0.21087216985749913, 0.5631203056361146, 0.1118239349713015, 0.46332782729130717, 0.17596194000510157, 0.6801457545188768, 0.757189289254151, 0.16556053860149744, 0.4123162769842771, 0.11372413038359053, 0.04673501857469231, 0.41911661517150167, 0.1334776199627361], [0.6092513586494025, 0.15725496181233856, 0.12590405324393983, 0.8275978169453394, 0.12723618801915448, 0.2443186709013282, 0.8011111833507533, 0.44101893082522714, 0.20496208047338627, 0.5624568412615738, 0.03974601131234945, 0.8679611356389516, 0.12326755414754587, 0.2705375230886987, 0.2606909973374183, 0.32934953014874624, 0.9222457235717407, 0.22523593534970454, 0.8590681808150307, 0.052832857299696556, 0.8166277528992428, 0.44683894316579487, 0.14956445644838456, 0.9783668889554349, 0.6169311092327765, 0.30214466797503314, 0.8175548079439096, 0.8433094405396716, 0.4596458568805649, 0.5458012341791739, 0.17159902830542473, 0.4415966187108019, 0.2772388553321268, 0.6619085527181116, 0.3945388842400118, 0.1455108223300403, 0.2674387810023967, 0.7037717079350307, 0.9889624965974706, 0.5167371634724124], [0.6774713845899429, 0.836896279265669, 0.24332278759118375, 0.5137791515230906, 0.6331956023382421, 0.9103038026834508, 0.6645765228981031, 0.3240858757045769, 0.9885647102469566, 0.3360352203028767, 0.051678916830688815, 0.42648907660681434, 0.8370922622003686, 0.756105319186261, 0.5945134531650385, 0.3393560699340892, 0.1959632741186872, 0.24468647112005637, 0.6327840151303724, 0.22668913321695272, 0.7801918749855855, 0.37316243160516605, 0.5077829430848748, 0.4687132144890598, 0.07351193586319393, 0.6897812060434317, 0.04722587514665311, 0.3568764548993437, 0.5758836032246245, 0.646762587734918, 0.27235341246362943, 0.5138033800079471, 0.9154328465635224, 0.2436478715901218, 0.14193769206520113, 0.44963018615547123, 0.6803434665689992, 0.6407284856514383, 0.6318764300786878, 0.5896609348575889], [0.17190718544188544, 0.8200454611905432, 0.1993937280347129, 0.8821580322727778, 0.8997395496809604, 0.3938076328356347, 0.003614089067500492, 0.6354634233416467, 0.17450617850385952, 0.13396283326084135, 0.9689312101837568, 0.3444336256365036, 0.1686822657944721, 0.17549665563102268, 0.7113706987241372, 0.6571131805404757, 0.9871503649929292, 0.18664123660606968, 0.885213629884068, 0.7886413531972399, 0.06121842284399315, 0.14300558258300788, 0.008752543428108939, 0.5156928636280925, 0.9537719058957079, 0.2617530691594806, 0.8130665801129765, 0.038314662122827525, 0.46740508971376526, 0.9316862588492979, 0.8415856875281552, 0.9993831936512184, 0.8781826620536864, 0.4775981225325241, 0.7135597088164792, 0.6687118221542102, 0.5049557053677877, 0.9631236299654812, 0.40293483636555827, 0.6761874554356204], [0.6467098319655639, 0.7032693710996192, 0.3626720460037317, 0.21484914163563051, 0.9184407924141559, 0.04655203444525513, 0.40474601616681893, 0.08361713168467322, 0.32100330232098473, 0.053794286601089536, 0.9336608279095288, 0.7490547445758277, 0.48619431918097455, 0.11488497431468248, 0.32718206450621945, 0.716903030856084, 0.13270395093268272, 0.23241621473798268, 0.06524351349798829, 0.5253699395755614, 0.5853115694068752, 0.48020890470975275, 0.4238352423880869, 0.5397353448255269, 0.6971755227475235, 0.7339655833669806, 0.8290657543717893, 0.4486886263549539, 0.10839516181327946, 0.06801368741633884, 0.08291877452300678, 0.24865989370148045, 0.2556938262187817, 0.10578296375965801, 0.3549477146134723, 0.5240823917031383, 0.8376458932619352, 0.3728757477169974, 0.38220238937975326, 0.06141731767602432], [0.9832108722362318, 0.3779293910941709, 0.6804952458388146, 0.22987586644208402, 0.7561438754243436, 0.5932177308952423, 0.9047003041419597, 0.24551344102110506, 0.554994851412291, 0.6190356695362655, 0.598911337181588, 0.018779164142332272, 0.1618921967973358, 0.3791512543341613, 0.355759289370573, 0.37896057076122547, 0.1127444287809719, 0.9522948036052805, 0.28438664547490855, 0.21441035011263698, 0.5114081424534971, 0.16545962073676623, 0.8738162897276447, 0.30582733314629884, 0.9658758260763181, 0.1762622383329694, 0.46294028288763844, 0.16626039549465232, 0.4211349676411442, 0.500051149073675, 0.6066239970392665, 0.3291447280262204, 0.8920203992973339, 0.551870312045204, 0.30870701448300486, 0.9834734806861527, 0.26894806614222244, 0.11859975216670493, 0.5284550820741946, 0.6748735043198242], [0.6450377201188152, 0.43053091965050816, 0.1783586589988927, 0.572208374170269, 0.6873689611862636, 0.5734817589756572, 0.04753144630176187, 0.7213787328550061, 0.5075439384079886, 0.9949468929464709, 0.17917568889717195, 0.754177489933067, 0.5027232407266575, 0.25953137631224177, 0.5964403010970668, 0.8007994025985303, 0.011799513308295317, 0.052912302080494134, 0.6809640196248827, 0.09691295868510108, 0.8017324667233471, 0.4349730933411128, 0.006911115725534711, 0.962759978209515, 0.7596278045615403, 0.9398228983488089, 0.027011814239984333, 0.0771530920049095, 0.08194366748763282, 0.9352315011098186, 0.8932821877495932, 0.8986656492600367, 0.7083726407081292, 0.2389968715686901, 0.5378362083427726, 0.33320187842727345, 0.40192317526152255, 0.17441673468465857, 0.740129287739041, 0.7901442537455176], [0.326738205170362, 0.756767749791562, 0.5971516499831208, 0.30144150927132773, 0.6989608712244655, 0.9467264470886341, 0.2488718174918133, 0.7391040650197364, 0.15237075338203498, 0.12335143473812482, 0.43200558236773445, 0.6733909976606801, 0.7491889353791865, 0.6997029267001967, 0.8834734516946482, 0.1761433852731069, 0.8798777157910298, 0.4759319615950359, 0.8397700343014783, 0.4625806286716255, 0.16990842485037427, 0.08750558017552823, 0.4671984565853913, 0.8582779384199715, 0.8365578386383689, 0.8143775726467016, 0.8544966498608376, 0.793507692369757, 0.2038359429843275, 0.15037688051220288, 0.11188175119932275, 0.7529853531833388, 0.2140638554980525, 0.4754210559078519, 0.4843798203268166, 0.9280878710519552, 0.39730113768041786, 0.4406359868480413, 0.11810038112617716, 0.09797530086865547], [0.42556042866446486, 0.16295823727634107, 0.06500778162778476, 0.7349568914232298, 0.8398850589172584, 0.7122572793373432, 0.8739470440463255, 0.854048167301086, 0.5082312937552903, 0.0988943628886697, 0.17447857432369196, 0.5925573539619443, 0.8176331325049689, 0.7886222959732644, 0.9011212677325275, 0.8670420145782344, 0.7309403995800507, 0.01886803046228891, 0.13003163925578032, 0.37761202149015605, 0.4668333006075892, 0.4728837915826314, 0.2623931245891815, 0.8924176472313725, 0.07417071919518936, 0.1480276689267298, 0.030231902806799993, 0.38169501360464175, 0.6130840668969509, 0.908970623539551, 0.5979567214343731, 0.054960560490365906, 0.9841408022496942, 0.5503587798406868, 0.884039783905665, 0.47096115652367887, 0.21919154027116738, 0.8885688280474321, 0.7685753079343106, 0.05446351657257387], [0.040387576356510135, 0.7088319397054356, 0.5546803196014922, 0.7259687271460956, 0.145798537456581, 0.8663027253397662, 0.7060734969393972, 0.7969049341528956, 0.08740561967412064, 0.8970452770304629, 0.07199266846390195, 0.8287134808850785, 0.9172819906766946, 0.24221141593830775, 0.8977853779219266, 0.8245526701232444, 0.9422293414335923, 0.49770387797453475, 0.9268496521362725, 0.730233268190579, 0.002832310611083466, 0.038864116182108166, 0.7439010463081545, 0.6517251724150827, 0.8971633950577387, 0.5870857916999253, 0.9970510910386452, 0.14841021616715167, 0.4420806738733257, 0.7955286522568907, 0.8215336036945504, 0.3027349450210822, 0.0006501426374789787, 0.4293479133740381, 0.7692358030405718, 0.5388509437467256, 0.6422792584520928, 0.8092022551254392, 0.5609122911438457, 0.22962585968656413], [0.9094301989801878, 0.6575456138981004, 0.16621313574782914, 0.5244120109615658, 0.2466152489447384, 0.7759345488290827, 0.9567060923852674, 0.752666572512363, 0.22254428498944245, 0.5891802990129962, 0.9576975179279983, 0.04661219141758777, 0.3894482628512198, 0.1271024118432016, 0.07844469656176634, 0.4235581749007732, 0.2510009963894956, 0.125801432681511, 0.37445668181383196, 0.4136430995565231, 0.9818039595145034, 0.5032619116331586, 0.4886268541569613, 0.4899593262299302, 0.4729100916932426, 0.8489041773026731, 0.589274481222488, 0.46055284632374305, 0.4239938032848132, 0.9972725461111954, 0.18246524288079313, 0.7575566100897623, 0.36305758358030926, 0.17897471369948026, 0.23505159968216105, 0.031007448035939134, 0.6249636786788976, 0.8268153833927993, 0.8653406398342298, 0.20695297511958155]] bot1_wieght_layer_two = [[0.6665196860661599, 0.8481771583763376, 0.07726852187332567, 0.4076612936474281, 0.6801241739839177, 0.4324281764916259, 0.7920573029749063, 0.6695824126739598, 0.72764202717719, 0.4368907605055562, 0.41199851138955057, 0.11754338749703352, 0.7738687592679276, 0.609948012752974, 0.03513613880809463, 0.17718900138840188, 0.15461800832273598, 0.47335210240169945, 0.5451749096558407, 0.8571399278899893, 0.44234065019440916, 0.5034124018610292, 0.6485375506365091, 0.29807522225215677, 0.6185066351700109, 0.4399443001408194, 0.6524525398896217, 0.05908370670791474, 0.838627440395335, 0.44389665587170635, 0.19585031506596629, 0.5798226877447776, 0.09987698920293919, 0.83762487110238, 0.03580907507283504, 0.6626698671401646, 0.8227294257347237, 0.6476394607448163, 0.1842460082505356, 0.283328775331815], [0.40474277047501694, 0.16076412725654188, 0.7544121673074636, 0.6326962892406167, 0.042119598518534196, 0.3857272114276967, 0.07155701631767009, 0.26859468502899253, 0.5618450092167772, 0.3150077028332705, 0.5505491333727801, 0.5525090345223052, 0.15486593588460018, 0.7187076375507572, 0.578286305979075, 0.039136238696212744, 0.37214214832366765, 0.9104394173049062, 0.21272251730263536, 0.6850966406946472, 0.1727992844699897, 0.7264144467310562, 0.6248258758405187, 0.5190696285679706, 0.7978152687257978, 0.2085750271609954, 0.2685009900743477, 0.6207406914304479, 0.7982580008166668, 0.7376779368426966, 0.12124910277652978, 0.3581777100684088, 0.2950345840466353, 0.5883659490676034, 0.7999840802144952, 0.6600945516982931, 0.9779803784894753, 0.28867112267931105, 0.7233348134283624, 0.9516280205956392], [0.8788429575256413, 0.6240909157340729, 0.257633661887153, 0.27280193755175974, 0.2039022146429348, 0.31783074347048634, 0.7779101424887137, 0.3612162628590171, 0.7454135013554919, 0.17651720039512242, 0.8686225519736198, 0.5901063553605768, 0.5285329921421419, 0.02100423354493497, 0.734047385167553, 0.3134283435734887, 0.6379264939876061, 0.6377947255249657, 0.020085114466928844, 0.2619126215910974, 0.33949872266376435, 0.9727486460033935, 0.912485107076961, 0.0023396680349867527, 0.8688175837431675, 0.8152045658724784, 0.9975323840260591, 0.9135289122196727, 0.9036528227658676, 0.15803776373710088, 0.6283100805726034, 0.6488323197518102, 0.14497917405561056, 0.85374944567469, 0.27545303859866643, 0.48470972071058305, 0.8883695941370073, 0.8523079985026628, 0.742611149255975, 0.22363803423337725], [0.5785837830860099, 0.7432914907370645, 0.13018676467746992, 0.5223142443725408, 0.7195189279531476, 0.772640792421348, 0.14327621964512316, 0.6878829043185156, 0.055148280727183474, 0.8676040054543029, 0.48642135136869813, 0.30302851629800986, 0.9228633066490742, 0.667418229322695, 0.4777650552484912, 0.31537473096370805, 0.7700808697761502, 0.7960825672157771, 0.07249937731173295, 0.29899721239280774, 0.22179935581659127, 0.22273872676775142, 0.8764042515281045, 0.4366391448529726, 0.5478426436326207, 0.8314815849605053, 0.7549992548812183, 0.10936866387806565, 0.00910480845136652, 0.8084386256361511, 0.8166844640961154, 0.7313462564948571, 0.9959804810391605, 0.379523919185773, 0.6995967653492718, 0.8556104883245215, 0.9650033347051147, 0.18733000156715507, 0.4266888620654947, 0.07133812296022024], [0.7875953823075772, 0.048326692977263, 0.6878467941077652, 0.7531952401170053, 0.1558136040327478, 0.24307431692944004, 0.36153377164447553, 0.5487397481159532, 0.2755151330503123, 0.9266893099869177, 0.14615611701269082, 0.3560843408398615, 0.436443462902138, 0.7102764507205671, 0.18129364036624473, 0.38322340811115996, 0.15569544999933282, 0.15621497631267722, 0.55678174104075, 0.3401026392668376, 0.679928790269094, 0.08653086603130078, 0.6006734337150899, 0.9215754829197332, 0.3043813432254693, 0.5622410331187045, 0.09614694997099149, 0.4764624730311171, 0.7345611971372603, 0.5108499127618724, 0.654746711987487, 0.5557444311516856, 0.6852308206138262, 0.6543865122015662, 0.629658940606578, 0.044031977277485757, 0.7088084836606233, 0.06107386886067778, 0.04794948328013904, 0.0012119198186545388], [0.9873189624796332, 0.27669438975668836, 0.2966661605787152, 0.4139209966023878, 0.7497354718500084, 0.7542696882524106, 0.00047323287009148896, 0.28730378667067424, 0.7002811162039493, 0.8911910805889037, 0.7721344980447392, 0.47105119592884437, 0.373075838742169, 0.6032608233856785, 0.2139192273308207, 0.9319543355860133, 0.7269956643405344, 0.4034038337286081, 0.2585252420078713, 0.30834958635077747, 0.7334934229247756, 0.3310362628624629, 0.3757338129837905, 0.5376537254283258, 0.10018251675931056, 0.5596408768846562, 0.5148348651496074, 0.21777504252094781, 0.7054121319095489, 0.5984424196600101, 0.7603507020760363, 0.6434851532447466, 0.7793360816630102, 0.6791377750819247, 0.8874939483155643, 0.020297431321990134, 0.7877588152594723, 0.6825344779265455, 0.441631266772038, 0.7799358378043548], [0.14948070809461733, 0.6977752887489436, 0.5634986541181175, 0.38736488579116424, 0.1796681809180415, 0.18478666703628643, 0.9620236762440904, 0.4964269350799757, 0.6930587049586162, 0.708399807879856, 0.5134398465585625, 0.21393537446142608, 0.2602216489930229, 0.6837769252814112, 0.48595998832884835, 0.7237548539290024, 0.5536057526377521, 0.9142678952472156, 0.6407298133232981, 0.584126792744114, 0.4820710811205783, 0.3504942970905538, 0.6883168343596142, 0.8462933225924858, 0.4180247400964584, 0.5665180278641676, 0.8897732971718966, 0.8364818856148337, 0.7265938868603569, 0.5112350504417468, 0.03991181239209585, 0.072054980230297, 0.29923288318823416, 0.26160244227878526, 0.7902954979262191, 0.6789474159144181, 0.05402719615844953, 0.01288405023914263, 0.9858435071632456, 0.49550313163016246], [0.6814128052540557, 0.6857591462474116, 0.17342028359449235, 0.05198456664141582, 0.09253968414262181, 0.6361262726691442, 0.6310776794858192, 0.8264686540690918, 0.15536853521783067, 0.11365547163341394, 0.8741173383962068, 0.6431090470198938, 0.34886604214094474, 0.5841128943565191, 0.1306826318025598, 0.4755713452380752, 0.8934737037194166, 0.14880757216831608, 0.34448841790338536, 0.5426574181929463, 0.45282331001343046, 0.34496344066027285, 0.8355456308073075, 0.6467171865039304, 0.9828190934106459, 0.25020939133138687, 0.17359383174806498, 0.6414283048549022, 0.47943336037935724, 0.7910623150001057, 0.0836370290846139, 0.6806298932145972, 0.6162814930918981, 0.04744051039144781, 0.8151539617310978, 0.3762036323742327, 0.7318338145244138, 0.19441096162641314, 0.9256087655217963, 0.7843727099817441]] bot1_bias_layer_two = [0.9406758857641467, 0.2126300180227927, 0.331421320987095, 0.6544606649999443, 0.2590151001820765, 0.08833035527361466, 0.4011952057788569, 0.44027479425504645, 0.42029806024477445, 0.5533297661090261, 0.3002221256295219, 0.7862574899592699, 0.3823932166902484, 0.06760529143192306, 0.8904817529085136, 0.2574363071108112, 0.9442652930673417, 0.8638464662536666, 0.9976792804834141, 0.08161112639543766, 0.8274457390637798, 0.06122431173779852, 0.30150861649483907, 0.9149791640899687, 0.6020251233163026, 0.39163356768437085, 0.3071120702029102, 0.9926591632450795, 0.308554239450762, 0.05802603153354935, 0.8493015772384627, 0.9817798648175765, 0.8871207805059099, 0.5548975481126734, 0.3695821803629423, 0.11344073506325347, 0.6326004241760085, 0.18922738053612775, 0.8335478543097846, 0.873969649479351] bot1_wieght_layer_three = [0.7706324920831208, 0.4063910281084029, 0.2674792952177699, 0.43250967613182023, 0.612819122412578, 0.5903832494962349, 0.32915418215488546, 0.7434764512130551, 0.3377554418516807, 0.04299585439686038, 0.7203935879359235, 0.10166762979556576, 0.32301210307652384, 0.1252640719699869, 0.7500335966851666, 0.7566998032956905, 0.7678225469600396, 0.10952170159380425, 0.9805573962843176, 0.5779722827213246, 0.5908026476984574, 0.8924849290572959, 0.17075043196157114, 0.12926979033332275, 0.9819466259288311, 0.32978141701528274, 0.9651996134918539, 0.8438254105458438, 0.5511668691700664, 0.08296071500756907, 0.31100584604157344, 0.7878835121381841, 0.8410458785821329, 0.8566297235828838, 0.5073891786969, 0.7462087871999677, 0.8550172205512508, 0.15640742681071018, 0.19677970287277002, 0.5522731191600392] bot1_bias_layer_three = [0.6469845616746536, 0.8286284260749673, 0.6801201252488618, 0.17433357165597319, 0.18834517979902088, 0.7638133663899956, 0.19825026476233243, 0.5542303268791007] bot1_fitness = 61.10234434690874 bot1_num = 1
12,577.888889
72,250
0.850514
11,168
113,201
8.61918
0.49991
0.000312
0.000467
0
0
0
0
0
0
0
0
0.893455
0.049417
113,201
8
72,251
14,150.125
0.001087
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
1c3c36f80c202066ee6e4861d511ce5139939c29
7,701
py
Python
dahua.py
d34db33f-1007/asleep_scanner
7fe03adad8335ce306ae2b7b933d8142205bd8c3
[ "Apache-2.0" ]
46
2020-04-15T12:03:24.000Z
2022-03-22T04:39:16.000Z
dahua.py
S0Ulle33/asleep_scanner
7fe03adad8335ce306ae2b7b933d8142205bd8c3
[ "Apache-2.0" ]
9
2020-06-14T19:51:04.000Z
2022-03-08T12:25:04.000Z
dahua.py
S0Ulle33/asleep_scanner
7fe03adad8335ce306ae2b7b933d8142205bd8c3
[ "Apache-2.0" ]
31
2020-06-15T09:35:17.000Z
2022-03-28T22:54:02.000Z
#!/usr/bin/env python3 # -*- coding:utf-8 -*- import logging import re import socket import struct import time from enum import Enum #import telegram #from wrapt_timeout_decorator import * LOGIN_TEMPLATE = b'\xa0\x00\x00\x60%b\x00\x00\x00%b%b%b%b\x04\x01\x00\x00\x00\x00\xa1\xaa%b&&%b\x00Random:%b\r\n\r\n' GET_SERIAL = b'\xa4\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ b'\x00\x00\x00\x00\x00\x00\x00' GET_CHANNELS = b'\xa8\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ b'\x00\x00\x00\x00\x00\x00\x00\x00' GET_PTZ = b'\xa4\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ b'\x00\x00\x00\x00\x00\x00\x00\x00' GET_SOUND = b'\xa4\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ b'\x00\x00\x00\x00\x00\x00\x00\x00' GET_SNAPSHOT = b'\x11\x00\x00\x00(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ b'\x00\x00\x00\n\x00\x00\x00%b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ b'\x00\x00%b\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' JPEG_GARBAGE1 = b'\x0a%b\x00\x00\x0a\x00\x00\x00' JPEG_GARBAGE2 = b'\xbc\x00\x00\x00\x00\x80\x00\x00%b' # Ускорение / Perfomance TIMEOUT = 11 logging.basicConfig(level=logging.INFO, format='[%(asctime)s] [%(levelname)s] %(message)s') class Status(Enum): SUCCESS = 0 BLOCKED = 2 NONE = -1 class DahuaController: __slots__ = ('model', 'ip', 'port', 'login', 'password', 'channels_count', 'status', 'sound', '_socket') def __init__(self, ip=None, port=None, login=None, password=None): self.model = '' self.ip = ip self.port = port self.login = login self.password = password self.channels_count = -1 self.status = Status.NONE self.sound = None self._socket = None if (ip and port) and (login and password): self.auth(login, password) def auth(self, login, password): self._socket = socket.create_connection((self.ip, self.port), TIMEOUT) self._socket.send(LOGIN_TEMPLATE % (struct.pack('b', 24 + len(login) + len(password)), login.encode('ascii'), (8 - len(login)) * b'\x00', password.encode('ascii'), (8 - len(password)) * b'\x00', login.encode('ascii'), password.encode('ascii'), str(int(time.time())).encode('ascii'))) data = self._socket.recv(128) if len(data) >= 10: if data[8] == 1 and data[9] == 4: self.status = Status.BLOCKED elif data[8] == 0: self.login = login self.password = password self.status = Status.SUCCESS else: self.status = Status.NONE if self.status is Status.SUCCESS: self._socket.send(GET_PTZ) self.model = self.receive_msg().split(b'\x00')[0].decode('ascii') self.get_sound_info() self.get_ptz_info() self.get_channels_count() def get_sound_info(self): self._socket.send(GET_SOUND) get_soundInfo = self.receive_msg() self.sound = get_soundInfo.split(b'\x00')[0].decode('ascii') # bot = telegram.Bot(token="", request=telegram.utils.request.Request(connect_timeout=20, read_timeout=20)) # chat_id = bot.get_updates()[-1].message.chat_id # bot.send_message(chat_id='635172118', text=self.model + " : " + self.sound, timeout=120) return self.sound def get_ptz_info(self): succ = '-PTZ-Sound-Mic' ptz_data = { 'DH-SD42212T-HN', 'CCTV-Camera-DH-SD50230U-HN', 'CCTV-Camera-DH-SD59220T-HN', 'DH-SD59220T-HN', 'CP-UNC-CS10L1W', 'DHI-HCVR4104C-S3', 'DHI-HCVR4104HS-S2', 'DHI-HCVR4108HS-S2', 'DHI-iDVR5116H-F', 'DHI-NVR4104H', 'DHI-NVR4104HS-P-4KS2', 'DHI-NVR4104-P', 'DHI-NVR4104_P', 'DHI-NVR4104-P-4KS2', 'DHI-NVR4104_W', 'DH-IPC-A35N', 'DH-IPC-A46P', 'DH-IPC-AW12W', 'DH-IPC-AW12WN', 'DH-IPC-AW12WP', 'DH-IPC-K15', 'DH-IPC-K15P', 'DH-IPC-KW12WP', 'DH-SD22204T-GN', 'DH-SD22204T-GN-W', 'DH-SD22204TN-GN', 'DH-SD29204T-GN-W', 'DH-SD-32D203S-HN', 'DH-SD42212T-HN', 'DH-SD42212TN-HN', 'DH-SD50120S-HN', 'DH-SD50220T-HN', 'DH-SD59120T-HN', 'DH-SD59120TN-HN', 'DH-SD59131UN-HNI', 'DH-SD59220SN-HN', 'DH-SD59220T-HN', 'DH-SD59220TN-HN', 'DH-SD59225U-HNI', 'DH-SD59230S-HN', 'DH-SD59230T-HN', 'DH-SD59230U-HNI', 'DH-SD59430U-HN', 'DH-SD59430U-HNI', 'DH-SD6582A-HN', 'DH-SD6C120T-HN', 'DH-SD-6C1220S-HN', 'DH-SD6C220S-HN', 'DH-SD6C220T-HN', 'DH-SD6C230S-HN', 'DVR-HF-A', 'IP2M-841B', 'IP2M-841B-UK', 'IP2M-841W-UK', 'IPC-A15', 'IPC-A35', 'IPC-A7', 'IP Camera', 'IPC-AW12W', 'IPC-HDBW1000E-W', 'IP', 'PTZ', 'IPC', 'IPC-HDBW1320E-W', 'IPC-HDPW4200F-WPT', 'IPC-HDPW4221F-W', 'IPC-HFW1000S-W', 'IPC-HFW1320S-W', 'IPC-HFW1435S-W', 'IPC-HFW2325S-W', 'IPC-HFW4431E-S', 'IPC-HFW5200E-Z12', 'IPC-K100W', 'IPC-K15', 'IPC-K200W', 'IPC-KW100W', 'IPC-KW10W', 'IPC-KW12W', 'IPD-IZ22204T-GN', 'IPM-721S', 'IP PTZ Dome', 'PTZ Dome', 'IPPTZ-EL2L12X-MINI-I', 'LTV-ISDNI3-SDM2', 'MDVR_MEUED', 'RVi-IPC11W', 'SD59120T-HN', 'SD59220TN-HN', 'SD6982A-HN', 'SDQCN8029Z', 'ST-712-IP-PRO-D', 'VTO2111D', 'XS-IPCV026-3W'} test_sound = re.findall('Dahua.Device.Record.General', self.sound) # self._socket.send(GET_PTZ) # get_ptzInfo = self.receive_msg() # self.model = get_ptzInfo.split(b'\x00')[0].decode('ascii') if self.model in ptz_data: self.model = self.model + succ return self.model elif test_sound: #print(test_sound) DEBUG self.model = self.model + "-Sound-Mic" return self.model else: self.model = "unknown" return self.model def get_channels_count(self): self._socket.send(GET_CHANNELS) channels = self.receive_msg() self.channels_count = channels.count(b'&&') + 1 return self.channels_count def receive_msg(self): header = self._socket.recv(32) try: length = struct.unpack('<H', header[4:6])[0] except struct.error: raise struct.error data = self._socket.recv(length) return data # @timeout(15) # (wrapt_timeout_decorator) TODO: play with timer def get_snapshot(self, channel_id): channel_id = struct.pack('B', channel_id) self._socket.send(GET_SNAPSHOT % (channel_id, channel_id)) self._socket.settimeout(4) data = self.receive_msg_2(channel_id) self._socket.settimeout(TIMEOUT) return data def receive_msg_2(self, c_id): garbage = JPEG_GARBAGE1 % c_id garbage2 = JPEG_GARBAGE2 % c_id data = b'' i = 0 while True: # i != 30 buf = self._socket.recv(1460) if not buf: break if i == 0: buf = buf[32:] data += buf if b'\xff\xd9' in data: break i += 1 while garbage in data: t_start = data.find(garbage) t_end = t_start + len(garbage) t_start -= 24 trash = data[t_start:t_end] data = data.replace(trash, b'') while garbage2 in data: t_start = data.find(garbage2) t_end = t_start + 32 trash = data[t_start:t_end] data = data.replace(trash, b'') return data
48.13125
1,572
0.595507
1,137
7,701
3.937555
0.245383
0.241233
0.309582
0.353808
0.232969
0.198347
0.167746
0.14809
0.14742
0.130668
0
0.145826
0.231528
7,701
159
1,573
48.433962
0.610679
0.080509
0
0.179688
0
0.0625
0.335834
0.14591
0
0
0
0.006289
0
1
0.0625
false
0.085938
0.046875
0
0.21875
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
1c3e06d700fd8d978fa4cb832a94077e2ac73f9e
184
py
Python
fog/cli/reporting/__init__.py
Yomguithereal/fog
0b2defd7c413b55766c4368e17e1238dfc3c8b81
[ "MIT" ]
17
2018-04-26T15:37:45.000Z
2021-05-18T05:58:10.000Z
fog/cli/reporting/__init__.py
Yomguithereal/fog
0b2defd7c413b55766c4368e17e1238dfc3c8b81
[ "MIT" ]
29
2018-04-27T14:54:20.000Z
2021-05-27T15:30:14.000Z
fog/cli/reporting/__init__.py
Yomguithereal/fog
0b2defd7c413b55766c4368e17e1238dfc3c8b81
[ "MIT" ]
1
2019-11-27T18:14:49.000Z
2019-11-27T18:14:49.000Z
from fog.cli.reporting.html import print_html_report from fog.cli.reporting.toml import print_toml_report RENDERERS = { 'html': print_html_report, 'toml': print_toml_report }
23
52
0.777174
27
184
5
0.37037
0.103704
0.148148
0.281481
0
0
0
0
0
0
0
0
0.13587
184
7
53
26.285714
0.849057
0
0
0
0
0
0.043478
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.666667
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
1
0
5
1c4e047b950a47b59a41dbd7f5f173913c4ed4b9
695
py
Python
scripts/vocabulary_meta.py
flarebyte/bubblegum-ui-preview-tag
89a1eb5218bce82afd70d34929d9c2735cefbb3e
[ "BSD-3-Clause" ]
null
null
null
scripts/vocabulary_meta.py
flarebyte/bubblegum-ui-preview-tag
89a1eb5218bce82afd70d34929d9c2735cefbb3e
[ "BSD-3-Clause" ]
null
null
null
scripts/vocabulary_meta.py
flarebyte/bubblegum-ui-preview-tag
89a1eb5218bce82afd70d34929d9c2735cefbb3e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python import sys import csv from string import Template enumerations = { 'selected-appearance': [ 'ui:selected-appearance/ordered-list/decimal' , 'ui:selected-appearance/ordered-list/alphabetic/upper' , 'ui:selected-appearance/ordered-list/alphabetic/lower' , 'ui:selected-appearance/ordered-list/roman/upper' , 'ui:selected-appearance/ordered-list/roman/lower' , 'ui:selected-appearance/ordered-list/greek/lower' , 'ui:selected-appearance/bulleted-list' , 'ui:selected-appearance/todo-list/checked' , 'ui:selected-appearance/todo-list/unchecked' , 'ui:selected-appearance/feature/checked' ] }
34.75
64
0.683453
77
695
6.168831
0.337662
0.416842
0.421053
0.341053
0.614737
0.431579
0
0
0
0
0
0
0.178417
695
20
65
34.75
0.831874
0.023022
0
0
0
0
0.681885
0.653903
0
0
0
0
0
1
0
false
0
0.176471
0
0.176471
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
1c79f749520373ae51368a31a25273009a44a944
1,080
py
Python
alpyro_msgs/control_msgs/pointheadactionfeedback.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
1
2020-12-13T13:07:10.000Z
2020-12-13T13:07:10.000Z
alpyro_msgs/control_msgs/pointheadactionfeedback.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
null
null
null
alpyro_msgs/control_msgs/pointheadactionfeedback.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
null
null
null
from typing import Final from alpyro_msgs import RosMessage from alpyro_msgs.actionlib_msgs.goalstatus import GoalStatus from alpyro_msgs.control_msgs.pointheadfeedback import PointHeadFeedback from alpyro_msgs.std_msgs.header import Header class PointHeadActionFeedback(RosMessage): __msg_typ__ = "control_msgs/PointHeadActionFeedback" __msg_def__ = "c3RkX21zZ3MvSGVhZGVyIGhlYWRlcgogIHVpbnQzMiBzZXEKICB0aW1lIHN0YW1wCiAgc3RyaW5nIGZyYW1lX2lkCmFjdGlvbmxpYl9tc2dzL0dvYWxTdGF0dXMgc3RhdHVzCiAgdWludDggUEVORElORz0wCiAgdWludDggQUNUSVZFPTEKICB1aW50OCBQUkVFTVBURUQ9MgogIHVpbnQ4IFNVQ0NFRURFRD0zCiAgdWludDggQUJPUlRFRD00CiAgdWludDggUkVKRUNURUQ9NQogIHVpbnQ4IFBSRUVNUFRJTkc9NgogIHVpbnQ4IFJFQ0FMTElORz03CiAgdWludDggUkVDQUxMRUQ9OAogIHVpbnQ4IExPU1Q9OQogIGFjdGlvbmxpYl9tc2dzL0dvYWxJRCBnb2FsX2lkCiAgICB0aW1lIHN0YW1wCiAgICBzdHJpbmcgaWQKICB1aW50OCBzdGF0dXMKICBzdHJpbmcgdGV4dApjb250cm9sX21zZ3MvUG9pbnRIZWFkRmVlZGJhY2sgZmVlZGJhY2sKICBmbG9hdDY0IHBvaW50aW5nX2FuZ2xlX2Vycm9yCgo=" __md5_sum__ = "33c9244957176bbba97dd641119e8460" header: Header status: GoalStatus feedback: PointHeadFeedback
67.5
618
0.930556
53
1,080
18.528302
0.45283
0.040733
0.057026
0
0
0
0
0
0
0
0
0.093385
0.048148
1,080
15
619
72
0.861868
0
0
0
0
0
0.618519
0.618519
0
1
0
0
0
1
0
false
0
0.416667
0
1
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
1
0
0
0
0
5
1c88cb3ca4b61d6584d8d0527c04ef41a8314675
36
py
Python
flex_imzML/__init__.py
sekro/flex_imzML_msi
d6423e32cc0263e751bd8aadf1bbf0ae9821b8f1
[ "MIT" ]
null
null
null
flex_imzML/__init__.py
sekro/flex_imzML_msi
d6423e32cc0263e751bd8aadf1bbf0ae9821b8f1
[ "MIT" ]
null
null
null
flex_imzML/__init__.py
sekro/flex_imzML_msi
d6423e32cc0263e751bd8aadf1bbf0ae9821b8f1
[ "MIT" ]
null
null
null
from .reader import flexImzMLHandler
36
36
0.888889
4
36
8
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
36
1
36
36
0.969697
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
98dbcea52aa48533788e521b2b4173f57db56482
13,975
py
Python
TestScripts/GraphGenerator.py
BDEvan5/SuperSafety
73edd8d8b191e291a6f369043698b8763887a1f7
[ "Apache-2.0" ]
null
null
null
TestScripts/GraphGenerator.py
BDEvan5/SuperSafety
73edd8d8b191e291a6f369043698b8763887a1f7
[ "Apache-2.0" ]
null
null
null
TestScripts/GraphGenerator.py
BDEvan5/SuperSafety
73edd8d8b191e291a6f369043698b8763887a1f7
[ "Apache-2.0" ]
null
null
null
import enum from turtle import width import numpy as np import matplotlib.pyplot as plt import csv import matplotlib def turn_on_pgf(): matplotlib.use("pgf") matplotlib.rcParams.update({ "pgf.texsystem": "pdflatex", 'font.family': 'serif', 'text.usetex': True, 'pgf.rcfonts': False, }) def moving_average(data, period): ret = np.convolve(data, np.ones(period), 'same') / period # for i in range(period): # t = np.mean # t = np.convolve(data, np.ones(i+1), 'valid') / (i+1) # ret[i] = t[0] # ret[-i-1] = t[-1] return ret def generate_training_graph(): # agent = "Baseline_304" agent = "Baseline_309" path = f"Data/Vehicles/{agent}/training_data.csv" # data = np.load(path, allow_pickle=True) with open(path) as file: reader = csv.reader(file, quoting = csv.QUOTE_NONNUMERIC) rewards = [] for lines in reader: if lines[1] == 0: break rewards.append(lines) data = np.array(rewards)[:, 1] # data = np.array(reward) plt.figure(1, figsize=(3.6, 3.2)) plt.plot(data, color='darkblue') avg = moving_average(data, 20) plt.plot(avg, color='red', linewidth=2) plt.xlabel('Episode Number') plt.ylabel('Reward') plt.gca().set_aspect(10) plt.grid(b=True) plt.tight_layout() plt.savefig(f"Data/Vehicles/{agent}/baseline_training.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/baseline_training.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Vehicles/{agent}/baseline_training.pgf", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/baseline_training.pgf", bbox_inches='tight', pad_inches=0.1) def generate_kernel_graph(): agent = "KernelSSS_100" path = f"Data/Vehicles/{agent}/training_data.csv" # data = np.load(path, allow_pickle=True) with open(path) as file: reader = csv.reader(file, quoting = csv.QUOTE_NONNUMERIC) rewards = [] for lines in reader: if lines[1] == 0: break rewards.append(lines) data = np.array(rewards)[:, 1] # data = np.array(reward) plt.figure(1, figsize=(3.6, 3.2)) plt.plot(data, '.', color='darkblue', markersize=12) plt.plot(data, color='red', linewidth=2) # avg = moving_average(data, 20) # plt.plot(avg, color='red', linewidth=2) plt.xlabel('Episode Number') plt.ylabel('Reward') plt.gca().set_aspect(0.01) plt.grid(b=True) plt.tight_layout() plt.savefig(f"Data/Vehicles/{agent}/kernel_training.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/kernel_training.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Vehicles/{agent}/kernel_training.pgf", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/kernel_training.pgf", bbox_inches='tight', pad_inches=0.1) # plt.show() def generate_kernel_graph_step(): agent = "KernelSSS_1_porto" path = f"Data/Vehicles/{agent}/step_data.csv" # data = np.load(path, allow_pickle=True) with open(path) as file: reader = csv.reader(file, quoting = csv.QUOTE_NONNUMERIC) rewards = [] for lines in reader: if lines[1] == 0: break rewards.append(lines) data = np.array(rewards)[:, 1] # data = np.array(reward) # new_data = moving_average(data, 10) d = np.zeros(2500) d[:len(data)] = data n = 20 d = d.reshape((-1, n)) new_data = np.cumsum(d, axis=1)[:, -1] xs = np.linspace(0, 2500, int(2500/n)) d2 = moving_average(new_data, 10) plt.figure(1, figsize=(3.6, 3.2)) # plt.plot(data, '.', color='red', markersize=2) plt.plot(xs, new_data, color='darkblue', linewidth=2) plt.plot(xs, d2, color='red', linewidth=2) # avg = moving_average(data, 20) # plt.plot(avg, color='red', linewidth=2) plt.xlabel('Step Number') plt.ylabel('Reward') # plt.gca().set_aspect(0.01) plt.grid(b=True) plt.tight_layout() plt.savefig(f"Data/Vehicles/{agent}/kernel_step_training.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/kernel_step_training.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Vehicles/{agent}/kernel_step_training.pgf", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/kernel_step_training.pgf", bbox_inches='tight', pad_inches=0.1) # plt.show() def generate_baseline_graph_step(): agent = "Baseline_1_columbia_small" path = f"Data/Vehicles/{agent}/step_data.csv" # data = np.load(path, allow_pickle=True) with open(path) as file: reader = csv.reader(file, quoting = csv.QUOTE_NONNUMERIC) rewards = [] for lines in reader: if lines[1] == 0: break rewards.append(lines) data = np.array(rewards)[:, 1] # data = np.array(reward) # new_data = moving_average(data, 10) # d = np.zeros(15300) # d[:len(data)] = data # n = 50 # d = d.reshape((-1, n)) # new_data = np.cumsum(d, axis=1)[:, -1] # xs = np.linspace(0, 15300, int(15300/n)) new_data = np.cumsum(data) + 120 * np.ones_like(data) xs = np.linspace(0, len(data), len(data)) d2 = moving_average(new_data, 10) plt.figure(1, figsize=(3.6, 3.2)) # plt.plot(data, '.', color='red', markersize=2) plt.plot(xs, new_data, color='darkblue', linewidth=2) plt.plot(xs, d2, color='red', linewidth=2) # avg = moving_average(data, 20) # plt.plot(avg, color='red', linewidth=2) plt.xlabel('Step Number') plt.ylabel('Reward') # plt.gca().set_aspect(0.01) plt.grid(b=True) plt.tight_layout() plt.savefig(f"Data/Vehicles/{agent}/kernel_step_training.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/kernel_step_training.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Vehicles/{agent}/kernel_step_training.pgf", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/kernel_step_training.pgf", bbox_inches='tight', pad_inches=0.1) # plt.show() def generate_kernel_graph_step_zoom(): agent = "KernelSSS_1_porto" path = f"Data/Vehicles/{agent}/step_data.csv" # data = np.load(path, allow_pickle=True) with open(path) as file: reader = csv.reader(file, quoting = csv.QUOTE_NONNUMERIC) rewards = [] for lines in reader: if lines[1] == 0: break rewards.append(lines) data = np.array(rewards)[:, 1] # data = np.array(reward) new_data = moving_average(data, 10) plt.figure(1, figsize=(3.6, 3.2)) plt.plot(data, '.', color='red', markersize=2) plt.plot(new_data, color='darkblue', linewidth=2) # avg = moving_average(data, 20) # plt.plot(avg, color='red', linewidth=2) plt.xlabel('Step Number') plt.ylabel('Reward') plt.ylim([-0.046, -0.03]) # plt.gca().set_aspect(0.01) plt.grid(b=True) plt.tight_layout() plt.savefig(f"Data/Vehicles/{agent}/kernel_stepZoom_training.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/kernel_stepZoom_training.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Vehicles/{agent}/kernel_stepZoom_training.pgf", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/kernel_stepZoom_training.pgf", bbox_inches='tight', pad_inches=0.1) # plt.show() def generate_laptime_graph(): agent = "KernelSSS_100" path = f"Data/Vehicles/{agent}/{agent}_laptime_list.csv" # data = np.load(path, allow_pickle=True) with open(path) as file: reader = csv.reader(file, quoting = csv.QUOTE_NONNUMERIC) rewards = [] for lines in reader: if lines[1] == 0: break rewards.append(lines) data = np.array(rewards)[:, 1] # data = np.array(reward) plt.figure(1, figsize=(3.6, 3.2)) plt.plot(data, '.', color='darkblue', markersize=12) plt.plot(data, color='red', linewidth=2) # avg = moving_average(data, 20) # plt.plot(avg, color='red', linewidth=2) plt.xlabel('Episode Number') plt.ylabel('Lap Time (s)') plt.gca().set_aspect(2) plt.grid(b=True) plt.tight_layout() plt.savefig(f"Data/Vehicles/{agent}/kernel_laptime.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Vehicles/{agent}/kernel_laptime.pgf", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/kernel_laptime.png", bbox_inches='tight', pad_inches=0.1) plt.savefig(f"Data/Graphs/kernel_laptime.pgf", bbox_inches='tight', pad_inches=0.1) # plt.show() from matplotlib.ticker import MultipleLocator def generate_dynamics_blocks(): dynamics = np.load(f"Data/Dynamics/viab_dyns.npy") print(f"Dynamics Loaded: {dynamics.shape}") ds = np.linspace(-0.4, 0.4, 9) for mode in range(9): dyns = dynamics[30, mode, :, 1, :] print(f"Dynamics Loaded: {dyns.shape}") print(dyns) angles = np.linspace(-np.pi, np.pi, 41) a = [angles[i] for i in dyns[:, 2]] spacing = 2.5 minorLocator = MultipleLocator(spacing) plt.figure(1, figsize=(1.9, 1.9)) plt.clf() plt.ylim([-2, 28]) plt.gca().xaxis.set_minor_locator(minorLocator) plt.grid(b=True, ls='--', which='both') plt.plot(dyns[:, 0], dyns[:, 1], '.', color='darkblue', markersize=10) plt.plot(0, 0, '.', color='red', markersize=10) l = 2 plt.arrow(0, 0, 0, l, head_width=0.24, head_length=0.5, fc='red', ec='red', width=0.06) dx = np.cos(a) * l dy = np.sin(a) * l for i in range(9): plt.arrow(dyns[i, 0], dyns[i, 1], dx[i], dy[i], head_width=0.24, head_length=0.5, width=0.06, fc='darkblue', ec='darkblue') # plt.title(f"Speed: {2}, Steering: {ds[mode]}") # plt.gca().set_aspect(0.25) # plt.xlabel('Position - dx') # plt.ylabel('Position - dy') plt.tight_layout() plt.savefig("Data/Modes/mode_" + str(mode) + ".png", bbox_inches='tight', pad_inches=0.0) plt.savefig("Data/Modes/mode_" + str(mode) + ".pgf", bbox_inches='tight', pad_inches=0.0) import matplotlib.patches as patches def generate_dynamics_obs_blocks(): dynamics = np.load(f"Data/Dynamics/viab_dyns.npy") print(f"Dynamics Loaded: {dynamics.shape}") obsx = [2.5, 8] obsy = [20, 30] ds = np.linspace(-0.4, 0.4, 9) for mode in range(9): dyns = dynamics[30, mode, :, 1, :] print(f"Dynamics Loaded: {dyns.shape}") print(dyns) angles = np.linspace(-np.pi, np.pi, 41) a = [angles[i] for i in dyns[:, 2]] spacing = 2.5 minorLocator = MultipleLocator(spacing) l = 2 plt.figure(1, figsize=(1.9, 1.9)) plt.clf() plt.ylim([-2, 28]) plt.gca().xaxis.set_minor_locator(minorLocator) plt.grid(b=True, ls='--', which='both') # plt.plot(dyns[:, 0], dyns[:, 1], '.', color='darkblue', markersize=10) plt.plot(0, 0, '.', color='darkblue', markersize=10) plt.arrow(0, 0, 0, l, head_width=0.24, head_length=0.5, fc='darkblue', ec='darkblue', width=0.06) rect = patches.Rectangle((2.5, 20), 6, 10, linewidth=1, facecolor="grey", edgecolor='black') plt.gca().add_patch(rect) dx = np.cos(a) * l dy = np.sin(a) * l for i in range(9): x, y = dyns[i, 0], dyns[i, 1] if x > 2.5: plt.plot(dyns[i, 0], dyns[i, 1], 'X', color='red', markersize=7) plt.arrow(dyns[i, 0], dyns[i, 1], dx[i], dy[i], head_width=0.24, head_length=0.5, width=0.06, fc='red', ec='red') else: plt.plot(dyns[i, 0], dyns[i, 1], '.', color='green', markersize=10) plt.arrow(dyns[i, 0], dyns[i, 1], dx[i], dy[i], head_width=0.24, head_length=0.5, width=0.06, fc='green', ec='green') plt.tight_layout() plt.savefig("Data/Modes/mode_obs_" + str(mode) + ".png", bbox_inches='tight', pad_inches=0.0) plt.savefig("Data/Modes/mode_obs_" + str(mode) + ".pgf", bbox_inches='tight', pad_inches=0.0) # plt.show() from PIL import Image def assemble_modes_picture(): modes = [0, 4] y1 = 160 x1 = 80 size = 250 b = 25 b2 = size+b*3 i_size = size*2 + b*4 i_size2 = size + b*2 img = np.zeros((i_size2, i_size, 4), dtype=np.uint8) pts = [[b, b], [b, b2]] for i, n in enumerate(modes): img_no = Image.open(f"Data/Modes/mode_{n}.png") img_n = np.asarray_chkfinite(img_no) img_crop = img_n[y1:y1+size, x1:x1+size] img[pts[i][0]:pts[i][0]+size, pts[i][1]:pts[i][1]+size] = img_crop img = Image.fromarray(img) # img.show() img.save(f"Data/Modes/modes_assem.png") def build_repeat_barplot(): path = f"Data/Results/Data_repeat.csv" # data = np.load(path, allow_pickle=True) with open(path) as file: reader = csv.reader(file, quoting = csv.QUOTE_ALL) # reader = csv.reader(file, quoting = csv.QUOTE_NONNUMERIC) rewards = [] for lines in reader: if lines[1] == 0: break rewards.append(lines) data = np.array(rewards) new_data = np.zeros_like(data, dtype=np.float) for i, entry in enumerate(data): for j, col in enumerate(entry): try: f = float(col) new_data[i, j] = f except: pass print(data) print(new_data) turn_on_pgf() # generate_laptime_graph() # generate_kernel_graph() # generate_training_graph() # generate_dynamics_blocks() # build_repeat_barplot() # generate_dynamics_obs_blocks() # generate_kernel_graph_step() # generate_kernel_graph_step_zoom() generate_baseline_graph_step()
33.513189
135
0.607227
2,077
13,975
3.961964
0.117959
0.021266
0.051039
0.061247
0.790619
0.772512
0.768623
0.768623
0.753919
0.745899
0
0.038334
0.225331
13,975
417
136
33.513189
0.721781
0.135385
0
0.556777
0
0
0.175707
0.110566
0
0
0
0
0
1
0.043956
false
0.003663
0.032967
0
0.080586
0.029304
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c7006fadd6cd8b0b5418ef3092cd27e5b7c2abce
915
py
Python
stubs/ev3_pybricks_v1_0_0/umqtt/robust.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/ev3_pybricks_v1_0_0/umqtt/robust.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/ev3_pybricks_v1_0_0/umqtt/robust.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
""" Module: 'umqtt.robust' on LEGO EV3 v1.0.0 """ # MCU: sysname=ev3, nodename=ev3, release=('v1.0.0',), version=('0.0.0',), machine=ev3 # Stubber: 1.3.2 - updated from typing import Any class MQTTClient: """""" DEBUG = None DELAY = 2 def _recv_len(self, *argv) -> Any: pass def _send_str(self, *argv) -> Any: pass def check_msg(self, *argv) -> Any: pass def connect(self, *argv) -> Any: pass def delay(self, *argv) -> Any: pass def disconnect(self, *argv) -> Any: pass def log(self, *argv) -> Any: pass def ping(self, *argv) -> Any: pass publish = None reconnect = None def set_callback(self, *argv) -> Any: pass def set_last_will(self, *argv) -> Any: pass def subscribe(self, *argv) -> Any: pass wait_msg = None simple = None utime = None
16.339286
86
0.539891
122
915
3.97541
0.42623
0.181443
0.249485
0.340206
0.334021
0
0
0
0
0
0
0.027113
0.314754
915
55
87
16.636364
0.746411
0.16612
0
0.354839
0
0
0
0
0
0
0
0
0
1
0.354839
false
0.354839
0.032258
0
0.580645
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
c70ac54e6e8f98e7ac0a9655936c42b3136007e0
210
py
Python
sameO&N.py
Zo3i/codewarsPy
6a148a21a953ceeb3b9c6433100f727e1d3e4b71
[ "Apache-2.0" ]
null
null
null
sameO&N.py
Zo3i/codewarsPy
6a148a21a953ceeb3b9c6433100f727e1d3e4b71
[ "Apache-2.0" ]
null
null
null
sameO&N.py
Zo3i/codewarsPy
6a148a21a953ceeb3b9c6433100f727e1d3e4b71
[ "Apache-2.0" ]
null
null
null
def xo(s): return len(s.lower().replace('x', '')) == len(s.lower().replace('o', '')) print(xo('xo')) #############大佬的最佳实践 # def xo(s): # s = s.lower() # return s.count('x') == s.count('o')
23.333333
78
0.452381
31
210
3.064516
0.387097
0.189474
0.126316
0.336842
0
0
0
0
0
0
0
0
0.204762
210
9
79
23.333333
0.568862
0.361905
0
0
0
0
0.036036
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
0.666667
0.333333
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
c71b0101d4fb0e1595a63c3dd09b0d16ec838e8a
199
py
Python
src/budget/admin.py
psrajoria/python_web_testing
e09e8a0de5866d70277985be589c05215c583498
[ "MIT" ]
null
null
null
src/budget/admin.py
psrajoria/python_web_testing
e09e8a0de5866d70277985be589c05215c583498
[ "MIT" ]
null
null
null
src/budget/admin.py
psrajoria/python_web_testing
e09e8a0de5866d70277985be589c05215c583498
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Project, Expense, Category admin.site.register(Project) admin.site.register(Expense) admin.site.register(Category)
22.111111
46
0.809045
27
199
5.962963
0.481481
0.167702
0.31677
0
0
0
0
0
0
0
0
0
0.100503
199
8
47
24.875
0.899441
0.130653
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
c7498163169ed2650fd10c585f6b90b79f21eee5
37
py
Python
null_bot_api/models/testers/__init__.py
lordralinc/null_bot_api
334b46d48669c7b6c95f27f23b3e7a81a897df2e
[ "MIT" ]
1
2021-08-03T15:28:57.000Z
2021-08-03T15:28:57.000Z
null_bot_api/models/testers/__init__.py
lordralinc/null_bot_api
334b46d48669c7b6c95f27f23b3e7a81a897df2e
[ "MIT" ]
null
null
null
null_bot_api/models/testers/__init__.py
lordralinc/null_bot_api
334b46d48669c7b6c95f27f23b3e7a81a897df2e
[ "MIT" ]
null
null
null
from .get_info import TestersGetInfo
18.5
36
0.864865
5
37
6.2
1
0
0
0
0
0
0
0
0
0
0
0
0.108108
37
1
37
37
0.939394
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
c769a8a4d249e0d922f6a8bbef9145aa55b92b98
211
py
Python
webcrawler/utils/async.py
mrafayaleem/simple-crawler
673dc41915bb70b22b1a50d5256c45efd361c2d5
[ "MIT" ]
27
2016-03-08T11:43:24.000Z
2021-03-10T11:51:58.000Z
webcrawler/utils/async.py
mrafayaleem/simple-crawler
673dc41915bb70b22b1a50d5256c45efd361c2d5
[ "MIT" ]
null
null
null
webcrawler/utils/async.py
mrafayaleem/simple-crawler
673dc41915bb70b22b1a50d5256c45efd361c2d5
[ "MIT" ]
1
2022-02-11T05:55:13.000Z
2022-02-11T05:55:13.000Z
import workerpool class SimpleCrawlJob(workerpool.Job): def __init__(self, target, kwargs): self.target = target self.kwargs = kwargs def run(self): self.target(**self.kwargs)
19.181818
39
0.649289
24
211
5.541667
0.458333
0.225564
0.240602
0
0
0
0
0
0
0
0
0
0.246446
211
10
40
21.1
0.836478
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0
0.571429
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
c7c9d1f2b7774b3bbdfe023aaf3bb6c52621c623
38,096
py
Python
hypixel/hypixel.py
HypixelBot/bot
672e17c5bbd37b0e7e54581b679051b7e59575d2
[ "MIT" ]
10
2020-06-06T13:57:46.000Z
2021-11-08T09:27:42.000Z
hypixel/hypixel.py
HypixelBot/Bot
672e17c5bbd37b0e7e54581b679051b7e59575d2
[ "MIT" ]
7
2020-06-06T14:04:05.000Z
2020-07-05T04:05:37.000Z
hypixel/hypixel.py
HypixelBot/bot
672e17c5bbd37b0e7e54581b679051b7e59575d2
[ "MIT" ]
14
2020-06-09T17:12:52.000Z
2021-07-21T23:24:30.000Z
import asyncio import logging import re from cogs.utils.checks import * from cogs.utils.mojang import * log = logging.getLogger(__name__) def list_factory(data): items = [] for i in data: items.append(i[0]) return items class Hypixel(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def description(self, ctx, *, text): """Sets up a description which is shown on the hypixel command.""" if not (await self.bot.is_owner(ctx.author)): user = await self.bot.pool.fetchrow('select * from donators where userid=$1', ctx.author.id) if not user: return await ctx.send("You don\'t seem to qualify to use this command.\nThis feature is limited to donors only.") if len(text)>150: return await ctx.send('Oops, that description looks bigger than what I can handle. (Max. 150)') await self.bot.pool.execute("""with upsert as (update donators set phrase=$2 where userid=$1 returning *) insert into donators (userid, phrase) select $1, $2 where not exists (select * from upsert)""", ctx.author.id, text) await ctx.send(f'Your description has successfully been set to "{text}"') @commands.group(invoke_without_command = True, name = 'hypixel', aliases=['h'], case_insensitive=True) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cHypixel(self, ctx, *, user:str = ''): """Type `[p]help hypixel` for more information about the command. Use hypixel [gamemode] [user] to get game specific stats""" return await ctx.invoke(self.bot.get_command("HiddenHypixel"), user) ### Bedwars ### @cHypixel.group(name ='bedwars', aliases = ['bw', 'bedw', 'bwars'], invoke_without_command=True, case_insensitive=True) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cBedwars(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenBedwars"), user) @cBedwars.command(name='compare', aliases = ["c"]) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cBedwarsCompare(self, ctx, user1=None, user2=None): return await ctx.invoke(self.bot.get_command("HiddenBedwarsCompare"), user1, user2) ### The Pit ### @cHypixel.group(name ='pit', invoke_without_command=True) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPit(self, ctx, user:str=''): return await ctx.invoke(self.bot.get_command("HiddenPit"), user) @cPit.command(name='contracts') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitContracts(self, ctx, user:str=''): return await ctx.invoke(self.bot.get_command("HiddenPitContract"), user) @cPit.command(name='lastkills') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitKills(self, ctx, user:str=''): return await ctx.invoke(self.bot.get_command("HiddenPitKills"), user) @cPit.command(name='position') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitPosition(self, ctx, user:str=''): return await ctx.invoke(self.bot.get_command("HiddenPitPosition"), user) @cPit.command(name='progress') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitProgress(self, ctx, user:str=''): return await ctx.invoke(self.bot.get_command("HiddenPitProgress"), user) @cPit.group(name='top') async def cPitTop(self, ctx): """Shows the leaderboard for the specified game""" if ctx.invoked_subcommand is None: return await ctx.send_help(ctx.command) @cPitTop.command(name='exp') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopExp(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopExp")) @cPitTop.command(name='gold') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopCash(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopCash")) @cPitTop.command(name='playtime') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopPlaytime(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopPlaytime")) @cPitTop.command(name='kills') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopKills(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopKills")) @cPitTop.command(name='renown') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopRenown(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopRenown")) @cPitTop.command(name='clicks') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopClicks(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopClicks")) @cPitTop.command(name='messages') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopMessages(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopMessages")) @cPitTop.command(name='contracts') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopContracts(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopContracts")) @cPitTop.command(name='bounty') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopBounty(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopBounty")) @cPitTop.command(name='deaths') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopDeaths(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopDeaths")) @cPitTop.command(name='streak') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def cPitTopStreak(self, ctx): return await ctx.invoke(self.bot.get_command("HiddenPitTopStreak")) ### Murder Mystery ### @cHypixel.command(name ='murdermystery', aliases = ['mm', 'murderm', 'mmystery']) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_mmystery(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenMurderMystery"), user) ### Arcade ### @cHypixel.command(name ='arcade') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_arcade(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenArcade"), user) ### Blitz Survival Games ### @cHypixel.command(name ='blitz', aliases = ['survivalgames', 'hungergames', 'bsg']) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_blitz(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenBlitz"), user) ### Cops And Crims ### @cHypixel.command(name ='copsandcrims', aliases = ['cc', 'copsncrims', 'cvc']) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_copsncrims(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenCopsAndCrims"), user) ### Crazy Walls ### @cHypixel.command(name ='crazywalls', aliases = ['cw']) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_crazywalls(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenCrazyWalls"), user) ### Mega Walls ### @cHypixel.command(name ='megawalls', aliases = ['mw']) async def _hypixel_megawalls(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenMegaWalls"), user) ### The Walls ### @cHypixel.command(name ='walls') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_walls(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenWalls"), user) ### SkyClash ### # @cHypixel.command(name ='skyclash', aliases=['sc']) # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # async def _hypixel_skyclash(self, ctx, user:str = ''): # return await ctx.invoke(self.bot.get_command("HiddenSkyClash"), user) ### SkyWars ### @cHypixel.command(name ='skywars', aliases = ['sw', 'skyw', 'swars'], no_pm = True) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_skywars(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenSkyWars"), user) ### Smash Heroes ### @cHypixel.command(name ='smashheroes', aliases=['sh']) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) @commands.is_owner() async def _hypixel_smashheroes(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenSmashHeroes"), user) ### Speed UHC ### @cHypixel.command(name ='speeduhc', aliases=['suhc']) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_speeduhc(self, ctx, user:str = ''): return await ctx.invoke(self.bot.get_command("HiddenSpeedUHC"), user) ### UHC ### @cHypixel.command(name ='uhc') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_uhc(self, ctx, user:str=''): return await ctx.invoke(self.bot.get_command("HiddenUHC"), user) ### Duels ### @cHypixel.command(name ='duels') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_duels(self, ctx, user:str=''): return await ctx.invoke(self.bot.get_command("HiddenDuels"), user) ### Paintball ### @cHypixel.command(name='paintball') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_paintball(self, ctx, user: str = ''): return await ctx.invoke(self.bot.get_command("HiddenPaintball"), user) ### Quake ### @cHypixel.command(name='quake') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_quake(self, ctx, user: str = ''): return await ctx.invoke(self.bot.get_command("HiddenQuake"), user) ### VampireZ ### @cHypixel.command(name='vampirez') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_vampirez(self, ctx, user: str = ''): return await ctx.invoke(self.bot.get_command("HiddenVampireZ"), user) ### BuildBattle ### @cHypixel.command(name='buildbattle') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_buildbattle(self, ctx, user: str = ''): return await ctx.invoke(self.bot.get_command("HiddenBuildBattle"), user) ### TnT Games ### @cHypixel.command(name='tntgames') @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def _hypixel_tntgames(self, ctx, user: str = ''): return await ctx.invoke(self.bot.get_command("HiddenTnTGames"), user) ### Verify ### @commands.command(name='verify') @commands.cooldown(rate = 1, per = 10, type = commands.BucketType.user) async def _verify(self, ctx, *, InGameName:str=None): """Verifies your Minecraft account so you don't need to enter your username to check your stats""" return await ctx.invoke(self.bot.get_command("HiddenVerify"), InGameName) @commands.command(name='unverify') @commands.cooldown(rate = 1, per = 10, type = commands.BucketType.user) async def _unverify(self, ctx): """Unverifies your Minecraft account.""" return await ctx.invoke(self.bot.get_command("HiddenUnerify")) # @commands.group('leaderboard', invoke_without_command = True, aliases=['lb'], case_insensitive=True) # @has_voted() # async def _leaderboard(self, ctx): # """Shows the leaderboard for the specified game""" # if ctx.invoked_subcommand is None: return await ctx.send_help(ctx.command) # # @_leaderboard.group('bedwars', invoke_without_command=True, aliases=['bw'], case_insensitive=True) # @has_voted() # async def bw_lb(self, ctx): # if ctx.invoked_subcommand is None: return await ctx.send_help(ctx.command) # # @bw_lb.command('level', aliases=['lvl']) # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # @has_voted() # async def bw_lb_level(self, ctx): # """Returns Bedwars Level Leaderboard""" # start = datetime.datetime.now() # permissions = ctx.channel.permissions_for(ctx.me) # if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') # if not permissions.embed_links: return await ctx.send('Bot does not have embed links permission.') # if not permissions.add_reactions: return await ctx.send('Bot does not have add reactions permission.') # if not permissions.read_message_history: return await ctx.send('Bot does not have permissions to read message history.') # leaderboard = hypixel.Leaderboards().Bedwars() # leaders = hypixel.GetUsers(leaderboard.bedwars_level()['leaders']) # top = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # em = discord.Embed(title='Bedwars Level Leaderboard') # em.description = top # message = await ctx.send(embed = em) # for i, leader in enumerate(leaders): # start = datetime.datetime.now() # try: # player = self.bot.hypixel.Player(leader) # stats = round(float(player.getBedwarsLevel())) # except: stats = 'Non' # leaders[i] = f'{leader} - {stats}' # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # time_taken = (datetime.datetime.now() - start).total_seconds() # if time_taken > 0.5: await message.edit(content=None, embed = em) # await message.edit(content=None, embed=em) # time_taken = datetime.datetime.now() - start # logging.info(f'{ctx.message.content} - {time_taken.total_seconds()}s [{ctx.message.author.id}]') # # @bw_lb.command('wins') # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # @has_voted() # async def bw_lb_wins(self, ctx, default:str = 'overall'): # """Returns Bedwars Wins Leaderboard. Modes: overall/weekly""" # start = datetime.datetime.now() # permissions = ctx.channel.permissions_for(ctx.me) # if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') # if not permissions.embed_links: return await ctx.send('Bot does not have embed links permission.') # if not permissions.add_reactions: return await ctx.send('Bot does not have add reactions permission.') # if not permissions.read_message_history: return await ctx.send('Bot does not have permissions to read message history.') # leaderboard = hypixel.Leaderboards().Bedwars() # if default == 'weekly': # leaders = hypixel.GetUsers(leaderboard.wins_1()['leaders']) # default = 'Weekly' # else: # leaders = hypixel.GetUsers(leaderboard.wins()['leaders']) # default = 'Overall' # top = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # em = discord.Embed(title=f'Bedwars {default} Wins Leaderboard') # em.description = top # message = await ctx.send(embed = em) # for i, leader in enumerate(leaders): # start = datetime.datetime.now() # try: # player = self.bot.hypixel.Player(leader) # stats = f"{player.JSON['stats']['Bedwars']['wins_bedwars']:,}" # except: stats = 'Non' # leaders[i] = f'{leader} - {stats}' # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # time_taken = (datetime.datetime.now() - start).total_seconds() # if time_taken > 0.5: await message.edit(content=None, embed = em) # await message.edit(content=None, embed=em) # time_taken = datetime.datetime.now() - start # logging.info(f'{ctx.message.content} - {time_taken.total_seconds()}s [{ctx.message.author.id}]') # # @bw_lb.command('kills') # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # @has_voted() # async def bw_lb_kills(self, ctx, default:str = 'overall'): # """Returns Bedwars Final Kills Leaderboard. Modes: overall/weekly""" # start = datetime.datetime.now() # permissions = ctx.channel.permissions_for(ctx.me) # if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') # if not permissions.embed_links: return await ctx.send('Bot does not have embed links permission.') # if not permissions.add_reactions: return await ctx.send('Bot does not have add reactions permission.') # if not permissions.read_message_history: return await ctx.send('Bot does not have permissions to read message history.') # leaderboard = hypixel.Leaderboards().Bedwars() # if default == 'weekly': # leaders = hypixel.GetUsers(leaderboard.final_kills_1()['leaders']) # default = 'Weekly' # else: # leaders = hypixel.GetUsers(leaderboard.final_kills()['leaders']) # default = 'Overall' # top = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # em = discord.Embed(title=f'Bedwars {default} Final Kills Leaderboard') # em.description = top # message = await ctx.send(embed = em) # for i, leader in enumerate(leaders): # start = datetime.datetime.now() # try: # player = self.bot.hypixel.Player(leader) # stats = f"{player.JSON['stats']['Bedwars']['final_kills_bedwars']:,}" # except: stats = 'Non' # leaders[i] = f'{leader} - {stats}' # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # time_taken = (datetime.datetime.now() - start).total_seconds() # if time_taken > 0.5: await message.edit(content=None, embed = em) # await message.edit(content=None, embed=em) # time_taken = datetime.datetime.now() - start # logging.info(f'{ctx.message.content} - {time_taken.total_seconds()}s [{ctx.message.author.id}]') # # @_leaderboard.group('skywars', invoke_without_command=True, aliases=['sw'], case_insensitive=True) # @has_voted() # async def sw_lb(self, ctx): # if ctx.invoked_subcommand is None: return await self.bot.formatter.format_help_for(ctx, ctx.command) # # @sw_lb.command('ratings') # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # @has_voted() # async def sw_lb_ratings(self, ctx): # """Returns Skywars Ratings Leaderboard""" # start = datetime.datetime.now() # permissions = ctx.channel.permissions_for(ctx.me) # if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') # if not permissions.embed_links: return await ctx.send('Bot does not have embed links permission.') # if not permissions.add_reactions: return await ctx.send('Bot does not have add reactions permission.') # if not permissions.read_message_history: return await ctx.send('Bot does not have permissions to read message history.') # leaderboard = hypixel.Leaderboards().Skywars() # leaders = hypixel.GetUsers(leaderboard.skywars_rating_a()['leaders']) # top = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # em = discord.Embed(title=f'Skywars Overall Ratings Leaderboard') # em.description = top # message = await ctx.send(embed = em) # # for i, leader in enumerate(leaders): # # start = datetime.datetime.now() # # player = self.bot.hypixel.Player(leader) # # bwwins = player.JSON['stats']['SkyWars']['final_kills_bedwars'] # Ratings # # leaders[i] = f'{leader} - {bwwins:,}' # # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # # time_taken = (datetime.datetime.now() - start).total_seconds() # # if time_taken > 0.5: await message.edit(content=None, embed = em) # # await message.edit(content=None, embed=em) # time_taken = datetime.datetime.now() - start # logging.info(f'{ctx.message.content} - {time_taken.total_seconds()}s [{ctx.message.author.id}]') # # @sw_lb.command('wins') # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # @has_voted() # async def sw_lb_wins(self, ctx): # """Returns Skywars Wins Leaderboard""" # start = datetime.datetime.now() # permissions = ctx.channel.permissions_for(ctx.me) # if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') # if not permissions.embed_links: return await ctx.send('Bot does not have embed links permission.') # if not permissions.add_reactions: return await ctx.send('Bot does not have add reactions permission.') # if not permissions.read_message_history: return await ctx.send('Bot does not have permissions to read message history.') # leaderboard = hypixel.Leaderboards().Skywars() # leaders = hypixel.GetUsers(leaderboard.wins()['leaders']) # top = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # em = discord.Embed(title=f'Skywars Overall Wins Leaderboard') # em.description = top # message = await ctx.send(embed = em) # for i, leader in enumerate(leaders): # start = datetime.datetime.now() # try: # player = self.bot.hypixel.Player(leader) # stats = f"{player.JSON['stats']['SkyWars']['wins']:,}" # except: stats = 'Non' # leaders[i] = f'{leader} - {stats}' # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # time_taken = (datetime.datetime.now() - start).total_seconds() # if time_taken > 0.5: await message.edit(content=None, embed = em) # await message.edit(content=None, embed=em) # time_taken = datetime.datetime.now() - start # logging.info(f'{ctx.message.content} - {time_taken.total_seconds()}s [{ctx.message.author.id}]') # # @sw_lb.command('kills') # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # @has_voted() # async def sw_lb_kills(self, ctx, default:str = 'overall'): # """Returns Skywars Kills Leaderboard. Modes: overall/monthly/weekly""" # start = datetime.datetime.now() # permissions = ctx.channel.permissions_for(ctx.me) # if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') # if not permissions.embed_links: return await ctx.send('Bot does not have embed links permission.') # if not permissions.add_reactions: return await ctx.send('Bot does not have add reactions permission.') # if not permissions.read_message_history: return await ctx.send('Bot does not have permissions to read message history.') # leaderboard = hypixel.Leaderboards().Skywars() # if default == 'weekly': # leaders = hypixel.GetUsers(leaderboard.kills_weekly_1()['leaders']) # default = 'Weekly' # elif default == 'monthly': # leaders = hypixel.GetUsers(leaderboard.kills_monthly_2()['leaders']) # default = 'Monthly' # else: # leaders = hypixel.GetUsers(leaderboard.kills()['leaders']) # default = 'Overall' # em = discord.Embed(title=f'Skywars {default} Wins Leaderboard') # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # message = await ctx.send(embed = em) # for i, leader in enumerate(leaders): # start = datetime.datetime.now() # try: # player = self.bot.hypixel.Player(leader) # stats = f"{player.JSON['stats']['SkyWars']['kills']:,}" # except: stats = 'Non' # leaders[i] = f'{leader} - {stats}' # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # time_taken = (datetime.datetime.now() - start).total_seconds() # if time_taken > 0.5: await message.edit(content=None, embed = em) # await message.edit(content=None, embed=em) # time_taken = datetime.datetime.now() - start # logging.info(f'{ctx.message.content} - {time_taken.total_seconds()}s [{ctx.message.author.id}]') # # @_leaderboard.group('walls', invoke_without_command=True, case_insensitive=True) # @has_voted() # async def walls_lb(self, ctx): # if ctx.invoked_subcommand is None: return await self.bot.formatter.format_help_for(ctx, ctx.command) # # @walls_lb.command('kills') # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # @has_voted() # async def walls_lb_kills(self, ctx, default:str = 'overall'): # """Returns Walls Kills Leaderboard. Modes: overall/monthly/weekly""" # start = datetime.datetime.now() # permissions = ctx.channel.permissions_for(ctx.me) # if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') # if not permissions.embed_links: return await ctx.send('Bot does not have embed links permission.') # if not permissions.add_reactions: return await ctx.send('Bot does not have add reactions permission.') # if not permissions.read_message_history: return await ctx.send('Bot does not have permissions to read message history.') # leaderboard = hypixel.Leaderboards().Walls() # if default.lower() == 'weekly': # table = leaderboard.weekly_kills() # leaders = hypixel.GetUsers(table['leaders']) # default = 'Weekly' # elif default.lower() == 'monthly': # table = leaderboard.monthly_kills() # leaders = hypixel.GetUsers(table['leaders']) # default = 'Monthly' # else: # table = leaderboard.kills() # leaders = hypixel.GetUsers(table['leaders']) # default = 'Overall' # em = discord.Embed(title=f'Walls {default} Kills Leaderboard') # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # message = await ctx.send(embed = em) # for i, leader in enumerate(leaders): # start = datetime.datetime.now() # try: # player = self.bot.hypixel.Player(leader) # stats = f"{player.JSON['stats']['Walls'][table['path']]:,}" # except: # stats = 'Non' # leaders[i] = f'{leader} - {stats}' # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # time_taken = (datetime.datetime.now() - start).total_seconds() # if time_taken > 0.5: await message.edit(content=None, embed = em) # await message.edit(content=None, embed=em) # time_taken = datetime.datetime.now() - start # logging.info(f'{ctx.message.content} - {time_taken.total_seconds()}s [{ctx.message.author.id}]') # # @_leaderboard.group('murdermystery', invoke_without_command=True, aliases=['mm'], case_insensitive=True) # @has_voted() # async def mm_lb(self, ctx): # if ctx.invoked_subcommand is None: return await self.bot.formatter.format_help_for(ctx, ctx.command) # # @mm_lb.command('wins') # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # @has_voted() # async def mm_lb_wins(self, ctx, default:str = 'overall'): # """Returns Murder Mystery Kills Leaderboard. Modes: overall/weekly""" # start = datetime.datetime.now() # permissions = ctx.channel.permissions_for(ctx.me) # if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') # if not permissions.embed_links: return await ctx.send('Bot does not have embed links permission.') # if not permissions.add_reactions: return await ctx.send('Bot does not have add reactions permission.') # if not permissions.read_message_history: return await ctx.send('Bot does not have permissions to read message history.') # leaderboard = hypixel.Leaderboards().MurderMystery() # if default == 'weekly': # leaders = hypixel.GetUsers(leaderboard.wins_1()['leaders']) # default = 'Weekly' # else: # leaders = hypixel.GetUsers(leaderboard.wins()['leaders']) # default = 'Overall' # em = discord.Embed(title=f'MurderMystery {default} Wins Leaderboard') # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # message = await ctx.send(embed = em) # for i, leader in enumerate(leaders): # start = datetime.datetime.now() # try: # player = self.bot.hypixel.Player(leader) # stats = f"{player.JSON['stats']['MurderMystery']['wins']:,}" # except: stats = 'Non' # leaders[i] = f'{leader} - {stats}' # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # time_taken = (datetime.datetime.now() - start).total_seconds() # if time_taken > 0.5: await message.edit(content=None, embed = em) # await message.edit(content=None, embed=em) # time_taken = datetime.datetime.now() - start # logging.info(f'{ctx.message.content} - {time_taken.total_seconds()}s [{ctx.message.author.id}]') # # @mm_lb.command('kills') # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # @has_voted() # async def mm_lb_kills(self, ctx, default:str = 'overall'): # """Returns Murder Mystery Kills Leaderboard. Modes: overall/weekly""" # start = datetime.datetime.now() # permissions = ctx.channel.permissions_for(ctx.me) # if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') # if not permissions.embed_links: return await ctx.send('Bot does not have embed links permission.') # if not permissions.add_reactions: return await ctx.send('Bot does not have add reactions permission.') # if not permissions.read_message_history: return await ctx.send('Bot does not have permissions to read message history.') # leaderboard = hypixel.Leaderboards().MurderMystery() # if default == 'weekly': # leaders = hypixel.GetUsers(leaderboard.kills_1()['leaders']) # default = 'Weekly' # else: # leaders = hypixel.GetUsers(leaderboard.kills()['leaders']) # default = 'Overall' # em = discord.Embed(title=f'MurderMystery {default} Kills Leaderboard') # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # message = await ctx.send(embed = em) # for i, leader in enumerate(leaders): # start = datetime.datetime.now() # try: # player = self.bot.hypixel.Player(leader) # stats = f"{player.JSON['stats']['MurderMystery']['kills']:,}" # except: stats = 'Non' # leaders[i] = f'{leader} - {stats}' # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # time_taken = (datetime.datetime.now() - start).total_seconds() # if time_taken > 0.5: await message.edit(content=None, embed = em) # await message.edit(content=None, embed=em) # time_taken = datetime.datetime.now() - start # logging.info(f'{ctx.message.content} - {time_taken.total_seconds()}s [{ctx.message.author.id}]') # # @mm_lb.command('murderkills', aliases=['mkills']) # @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) # @has_voted() # async def mm_lb_mkills(self, ctx, default:str = 'overall'): # """Returns Murder Mystery Kills Leaderboard. Modes: overall/weekly""" # start = datetime.datetime.now() # permissions = ctx.channel.permissions_for(ctx.me) # if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') # if not permissions.embed_links: return await ctx.send('Bot does not have embed links permission.') # if not permissions.add_reactions: return await ctx.send('Bot does not have add reactions permission.') # if not permissions.read_message_history: return await ctx.send('Bot does not have permissions to read message history.') # leaderboard = hypixel.Leaderboards().MurderMystery() # if default == 'weekly': # leaders = hypixel.GetUsers(leaderboard.murderer_kills_1()['leaders']) # default = 'Weekly' # else: # leaders = hypixel.GetUsers(leaderboard.murderer_kills()['leaders']) # default = 'Overall' # em = discord.Embed(title=f'MurderMystery {default} Murderer Kills Leaderboard') # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # message = await ctx.send(embed = em) # for i, leader in enumerate(leaders): # start = datetime.datetime.now() # try: # player = self.bot.hypixel.Player(leader) # stats = f"{player.JSON['stats']['MurderMystery']['kills_as_murderer']:,}" # except: stats = 'Non' # leaders[i] = f'{leader} - {stats}' # em.description = '\n'.join([f'{i+1}. {escape(m)}' for i, m in enumerate(leaders)]) # time_taken = (datetime.datetime.now() - start).total_seconds() # if time_taken > 0.5: await message.edit(content=None, embed = em) # await message.edit(content=None, embed=em) # time_taken = datetime.datetime.now() - start # logging.info(f'{ctx.message.content} - {time_taken.total_seconds()}s [{ctx.message.author.id}]') ### Guild ### @commands.command() @has_voted() @commands.cooldown(rate=1, per=30, type=commands.BucketType.user) async def guild(self, ctx, *, search: str=''): """Shows Members of a guild. You can get a guild from its name or player name Notice: Guild names are case sensitive!""" return await ctx.invoke(self.bot.get_command("HiddenGuild"), search) ### Session ### @commands.command('session') @has_voted() @commands.cooldown(rate = 1, per = 5, type = commands.BucketType.user) async def _session(self, ctx, user:str = ''): """Information about player's current session""" return await ctx.invoke(self.bot.get_command("HiddenSession"), user) @commands.command('user', hidden=True) @commands.is_owner() async def _user(self, ctx, *, member:discord.User = None): tickYes = "<:tickYes:315009125694177281>" tickNo = "<:tickNo:315009174163685377>" permissions = ctx.channel.permissions_for(ctx.me) if not permissions.send_messages: return await ctx.author.send(f'The bot doesn\'t have permissions to send messages in <#{ctx.channel.id}>') if not member: member = ctx.author data = await ctx.bot.pool.fetch(f"select * from hypixel where userID={member.id}") voted = await ctx.bot.pool.fetch(f'select * from votes where userID={member.id} and active is TRUE') blacklist = await ctx.bot.pool.fetch(f"select * from blacklist where userID={member.id}") em = discord.Embed(color=discord.Color.blue(), title=f'{member} | {member.id}') logging.info(data) if data: ign = await Mojang(self.bot.session).getUser(uuid=data[0]['useruuid']) else: ign = "To set your Minecraft account use `verify`" info = { "owner": f"**Bot Owner**: {tickYes}\n" if member.id == self.bot.owner_id else '', "minecraft": f"**Minecraft**: {ign}", "voted": f"**Voted**: {tickYes if voted else tickNo}", "verified": f"**Verified**: {tickYes if data else tickNo}", "blacklisted": f"**Blacklisted**: {blacklist[0]['reason'] if blacklist else tickNo}" } em.description = f'​\n{info["minecraft"]}\n\n' \ f'{info["owner"]}' \ f'{info["voted"]}\n' \ f'{info["verified"]}\n' \ f'{info["blacklisted"]}' await ctx.send(embed=em) async def clear_cache(self): await self.bot.wait_until_ready() while True: await asyncio.sleep(3600) self.bot.hypixel.cleanCache() def setup(bot): h = Hypixel(bot) loop = asyncio.get_event_loop() loop.create_task(h.clear_cache()) bot.add_cog(h)
53.430575
156
0.636681
4,746
38,096
5.038137
0.083017
0.034127
0.050939
0.043913
0.774455
0.762954
0.757768
0.740998
0.720547
0.717034
0
0.006954
0.214826
38,096
712
157
53.505618
0.792424
0.568537
0
0.193833
0
0.017621
0.1354
0.009657
0
0
0
0
0
1
0.013216
false
0
0.022026
0
0.220264
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c7d32d9de7b3b3e0c630bbc18caa61a0d609753b
91
py
Python
aioa2squery/command/server.py
insurgency/aioa2squery
b578f93e13646776691169e10b9c8955c1fd7712
[ "MIT" ]
4
2019-10-09T10:39:56.000Z
2022-01-14T09:17:59.000Z
aioa2squery/command/server.py
insurgency/aioa2squery
b578f93e13646776691169e10b9c8955c1fd7712
[ "MIT" ]
217
2019-10-22T21:23:19.000Z
2021-12-19T23:39:06.000Z
aioa2squery/command/server.py
insurgency/aioa2squery
b578f93e13646776691169e10b9c8955c1fd7712
[ "MIT" ]
null
null
null
from asyncio import AbstractEventLoop async def serve(loop: AbstractEventLoop): pass
15.166667
41
0.791209
10
91
7.2
0.9
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
42
18.2
0.947368
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.333333
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
0
1
1
1
0
0
0
0
5
1bf0fe49dc450577d5723d7eeab0e722a496773f
386
py
Python
unit_testing/test_utils.py
valosekj/spinalcordtoolbox
266bfc88d6eb6e96a2c2f1ec88c2e185c6f88e09
[ "MIT" ]
1
2020-05-17T00:39:47.000Z
2020-05-17T00:39:47.000Z
unit_testing/test_utils.py
valosekj/spinalcordtoolbox
266bfc88d6eb6e96a2c2f1ec88c2e185c6f88e09
[ "MIT" ]
null
null
null
unit_testing/test_utils.py
valosekj/spinalcordtoolbox
266bfc88d6eb6e96a2c2f1ec88c2e185c6f88e09
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 # pytest unit tests for utils from __future__ import print_function, absolute_import, division from spinalcordtoolbox import utils def test_parse_num_list_inv(): assert utils.parse_num_list_inv([1, 2, 3, 5, 6, 9]) == '1:3;5:6;9' assert utils.parse_num_list_inv([3, 2, 1, 5]) == '1:3;5' assert utils.parse_num_list_inv([]) == ''
27.571429
70
0.694301
66
386
3.772727
0.5
0.128514
0.192771
0.240964
0.313253
0.313253
0
0
0
0
0
0.058282
0.15544
386
13
71
29.692308
0.705521
0.170984
0
0
0
0
0.044164
0
0
0
0
0
0.5
1
0.166667
true
0
0.333333
0
0.5
0.166667
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
1
0
0
0
0
5
401e5d5e83054d89d9330e769e6841c70321454c
77
py
Python
backend/app/views/__init__.py
Edinburgh-Genome-Foundry/DnaWeaver-online
fafa87dffce68a801652e2f14b1dfdd4da5a476e
[ "MIT" ]
1
2018-07-30T20:09:07.000Z
2018-07-30T20:09:07.000Z
backend/app/views/__init__.py
Edinburgh-Genome-Foundry/DnaWeaver-online
fafa87dffce68a801652e2f14b1dfdd4da5a476e
[ "MIT" ]
7
2020-01-15T19:42:03.000Z
2022-03-02T03:56:11.000Z
backend/app/views/__init__.py
Edinburgh-Genome-Foundry/DnaWeaver-online
fafa87dffce68a801652e2f14b1dfdd4da5a476e
[ "MIT" ]
null
null
null
from .base import PollJobView from .generic_solver import GenericSolverView
19.25
45
0.857143
9
77
7.222222
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.116883
77
3
46
25.666667
0.955882
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
404c5928c0b8a19d256b1eac811af27cbbcf1da6
45
py
Python
zwave_js_server/__init__.py
Petro31/zwave-js-server-python
ed766f054d2ef2f6a6fa01fa431484da12d05eca
[ "Apache-2.0" ]
53
2021-01-09T18:47:34.000Z
2022-03-16T21:54:41.000Z
zwave_js_server/__init__.py
Petro31/zwave-js-server-python
ed766f054d2ef2f6a6fa01fa431484da12d05eca
[ "Apache-2.0" ]
130
2021-01-06T21:34:46.000Z
2022-03-29T18:44:14.000Z
zwave_js_server/__init__.py
Petro31/zwave-js-server-python
ed766f054d2ef2f6a6fa01fa431484da12d05eca
[ "Apache-2.0" ]
17
2021-01-07T21:55:29.000Z
2022-03-29T08:08:50.000Z
"""Provide a package for zwave-js-server."""
22.5
44
0.688889
7
45
4.428571
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
45
1
45
45
0.775
0.844444
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
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
40a8da1a58d2fae41c5c922daf418f35c82793ec
112
py
Python
models/__init__.py
frankinwi/haq
ae02900001cc2bc3fcbd0d2ece7c04d4f4af4ca5
[ "Apache-2.0" ]
161
2019-12-10T16:41:48.000Z
2022-03-30T02:56:52.000Z
models/__init__.py
frankinwi/haq
ae02900001cc2bc3fcbd0d2ece7c04d4f4af4ca5
[ "Apache-2.0" ]
16
2019-12-23T05:07:29.000Z
2022-03-12T05:13:36.000Z
models/__init__.py
frankinwi/haq
ae02900001cc2bc3fcbd0d2ece7c04d4f4af4ca5
[ "Apache-2.0" ]
49
2020-01-07T01:53:21.000Z
2022-03-04T07:47:42.000Z
# import customized models here from .mobilenet import * from .mobilenetv2 import * from .mobilenetv3 import *
18.666667
31
0.776786
13
112
6.692308
0.615385
0.229885
0
0
0
0
0
0
0
0
0
0.021277
0.160714
112
5
32
22.4
0.904255
0.258929
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
40a94c9542f23fb1735176e4ea60e32accf762de
237
py
Python
htmlparser/utils/get_linked_scripts_url.py
weblit/html-parser
9fa9cc97ff1a747fd742397ad6b2d65d10aeba50
[ "MIT" ]
null
null
null
htmlparser/utils/get_linked_scripts_url.py
weblit/html-parser
9fa9cc97ff1a747fd742397ad6b2d65d10aeba50
[ "MIT" ]
3
2022-01-12T14:51:20.000Z
2022-02-01T05:14:39.000Z
htmlparser/utils/get_linked_scripts_url.py
weblit/html-parser
9fa9cc97ff1a747fd742397ad6b2d65d10aeba50
[ "MIT" ]
null
null
null
import re from utils.get_raw_html import get_raw_html_from_url def get_linked_scripts_url(url: str) -> str: html = get_raw_html_from_url(url) linked_scripts = re.findall(r'<script .*></script>', html) return linked_scripts
26.333333
62
0.751055
39
237
4.179487
0.410256
0.110429
0.184049
0.171779
0.208589
0
0
0
0
0
0
0
0.147679
237
9
63
26.333333
0.806931
0
0
0
0
0
0.084034
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
40ac5e0d2b5fab6ea66f0a123c9e85709ffb388c
158
py
Python
tests/web_platform/css_grid_1/placement/test_grid_layout_grid_span.py
jonboland/colosseum
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
[ "BSD-3-Clause" ]
71
2015-04-13T09:44:14.000Z
2019-03-24T01:03:02.000Z
tests/web_platform/css_grid_1/placement/test_grid_layout_grid_span.py
jonboland/colosseum
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
[ "BSD-3-Clause" ]
35
2019-05-06T15:26:09.000Z
2022-03-28T06:30:33.000Z
tests/web_platform/css_grid_1/placement/test_grid_layout_grid_span.py
jonboland/colosseum
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
[ "BSD-3-Clause" ]
139
2015-05-30T18:37:43.000Z
2019-03-27T17:14:05.000Z
from tests.utils import W3CTestCase class TestGridLayoutGridSpan(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'grid-layout-grid-span'))
26.333333
76
0.797468
18
158
6.722222
0.777778
0
0
0
0
0
0
0
0
0
0
0.020833
0.088608
158
5
77
31.6
0.819444
0
0
0
0
0
0.132911
0.132911
0
0
0
0
0
1
0
true
0
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
0
1
0
1
0
1
0
0
5
40b67002ebc3d6f47483f692012cc4fb105c33ed
1,240
py
Python
plugins/SerpentMiniMetroGamePlugin/files/api/context.py
jarulsamy/mini-metro
79d3f3645f45f2d3331d2385f106aa7cb1f4cc5c
[ "MIT" ]
25
2018-10-20T17:09:49.000Z
2022-03-15T12:10:44.000Z
plugins/SerpentMiniMetroGamePlugin/files/api/context.py
jarulsamy/mini-metro
79d3f3645f45f2d3331d2385f106aa7cb1f4cc5c
[ "MIT" ]
9
2020-01-28T22:29:35.000Z
2022-03-11T23:26:15.000Z
plugins/SerpentMiniMetroGamePlugin/files/api/context.py
jarulsamy/mini-metro
79d3f3645f45f2d3331d2385f106aa7cb1f4cc5c
[ "MIT" ]
1
2020-05-04T01:52:37.000Z
2020-05-04T01:52:37.000Z
class Context(object): @staticmethod def click(x, y, new_context, ctrl): ctrl.move(x=x, y=y) ctrl.click() return new_context class MainMenu(Context): @classmethod def click_play(cls, ctrl): return cls.click(x=270, y=210, new_context=LevelMenu, ctrl=ctrl) class LevelMenu(Context): @classmethod def click_play(cls, ctrl): return cls.click(x=750, y=500, new_context=GamePlay, ctrl=ctrl) @classmethod def click_mode(cls, ctrl): return cls.click(x=750, y=540, new_context=ModeMenu, ctrl=ctrl) class ModeMenu(Context): @classmethod def click_normal(cls, ctrl): return cls.click(x=400, y=180, new_context=cls, ctrl=ctrl) @classmethod def click_extreme(cls, ctrl): return cls.click(x=400, y=220, new_context=cls, ctrl=ctrl) @classmethod def click_endless(cls, ctrl): return cls.click(x=400, y=260, new_context=cls, ctrl=ctrl) @classmethod def click_creative(cls, ctrl): return cls.click(x=400, y=300, new_context=cls, ctrl=ctrl) @classmethod def click_return(cls, ctrl): return cls.click(x=30, y=20, new_context=LevelMenu, ctrl=ctrl) class GamePlay(Context): pass
22.545455
72
0.654839
179
1,240
4.435754
0.206704
0.105793
0.191436
0.161209
0.643577
0.609572
0.501259
0.501259
0.130982
0.130982
0
0.047767
0.223387
1,240
54
73
22.962963
0.776739
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.257143
false
0.028571
0
0.228571
0.657143
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
40e297d4019457373250dc9f0df42c7c3fe1c74f
141
py
Python
jp.atcoder/abc082/abc082_b/31155948.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc082/abc082_b/31155948.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc082/abc082_b/31155948.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
def main() -> None: print("Yes" if sorted(input()) < sorted(input(), reverse=1) else "No") if __name__ == "__main__": main()
20.142857
75
0.560284
18
141
3.944444
0.722222
0.309859
0
0
0
0
0
0
0
0
0
0.009259
0.234043
141
6
76
23.5
0.648148
0
0
0
0
0
0.096296
0
0
0
0
0
0
1
0.25
true
0
0
0
0.25
0.25
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
0
0
0
0
0
5
40f43cd1a4fae590d681efcea53a3eeeadf64b63
123
py
Python
flacon/__init__.py
iksaif/flacon
9434bd9071977cf3ec74259469306a01e03fcdc2
[ "Apache-2.0" ]
2
2019-05-16T09:38:18.000Z
2020-06-11T15:21:33.000Z
flacon/__init__.py
iksaif/flacon
9434bd9071977cf3ec74259469306a01e03fcdc2
[ "Apache-2.0" ]
1
2019-08-26T15:08:40.000Z
2019-08-26T15:08:40.000Z
flacon/__init__.py
iksaif/flacon
9434bd9071977cf3ec74259469306a01e03fcdc2
[ "Apache-2.0" ]
1
2019-07-16T15:07:34.000Z
2019-07-16T15:07:34.000Z
"""Flacon entry point.""" from __future__ import absolute_import from flacon import flacon # Ewww Flacon = flacon.Flacon
15.375
38
0.772358
16
123
5.625
0.5
0.266667
0
0
0
0
0
0
0
0
0
0
0.146341
123
7
39
17.571429
0.857143
0.203252
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
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
0
0
0
1
0
1
0
0
5
dc0f7612c28772c61ff5fd3fd63cd5ff77fd8d43
121
py
Python
revision/admin.py
amineadmane/AutoCare
f4339cdc2d78c985b77b7b1cc469bae67728086b
[ "MIT" ]
null
null
null
revision/admin.py
amineadmane/AutoCare
f4339cdc2d78c985b77b7b1cc469bae67728086b
[ "MIT" ]
null
null
null
revision/admin.py
amineadmane/AutoCare
f4339cdc2d78c985b77b7b1cc469bae67728086b
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Revision # Register your models here. admin.site.register(Revision)
24.2
32
0.818182
17
121
5.823529
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.115702
121
4
33
30.25
0.925234
0.214876
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
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
0
1
0
1
0
1
0
0
5
dc1392f9e7ecd116e5672f6c1df067b00e9dffad
71
py
Python
src/__main__.py
gabfl/pg-batch
95f224826bd807bb2ce2af82f9e1c0272b8cd970
[ "MIT" ]
12
2019-01-24T16:13:28.000Z
2022-02-08T16:01:21.000Z
src/__main__.py
gabfl/pg-batch
95f224826bd807bb2ce2af82f9e1c0272b8cd970
[ "MIT" ]
9
2017-11-02T12:24:50.000Z
2022-01-30T05:08:50.000Z
src/__main__.py
gabfl/pg-batch
95f224826bd807bb2ce2af82f9e1c0272b8cd970
[ "MIT" ]
3
2018-07-16T18:36:02.000Z
2020-08-10T02:56:45.000Z
from . import pg_batch if __name__ == '__main__': pg_batch.main()
14.2
26
0.676056
10
71
3.8
0.7
0.368421
0
0
0
0
0
0
0
0
0
0
0.197183
71
4
27
17.75
0.666667
0
0
0
0
0
0.112676
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
90a0ae0fffa59b13eff1b2f7fda672233d28ea32
151
py
Python
pipeline/source/__init__.py
Sakuya9461/darklight
041d24d4102f804f1def1736686d84d96ad95c73
[ "Apache-2.0" ]
42
2019-03-31T13:43:41.000Z
2022-01-29T16:39:08.000Z
pipeline/source/__init__.py
Sakuya9461/darklight
041d24d4102f804f1def1736686d84d96ad95c73
[ "Apache-2.0" ]
17
2019-03-31T12:56:33.000Z
2022-03-11T23:44:17.000Z
pipeline/source/__init__.py
Sakuya9461/darklight
041d24d4102f804f1def1736686d84d96ad95c73
[ "Apache-2.0" ]
10
2019-04-01T01:41:46.000Z
2021-09-20T10:22:02.000Z
from pipeline.source.bitcoin import BitcoinPipeline from pipeline.source.email import EmailPipeline __all__ = [ BitcoinPipeline, EmailPipeline, ]
21.571429
51
0.81457
15
151
7.933333
0.6
0.201681
0.302521
0
0
0
0
0
0
0
0
0
0.125828
151
6
52
25.166667
0.901515
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
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
0
0
1
0
0
0
0
5
90d9b6b546bbfa59d489399d76af4bc1ba3992d4
49
py
Python
Python3/basico/loopWhileEx1.py
arthursiq5/programacao-progressiva
2ec91602a6f37c93b99e6a92239045cd1c4cef6b
[ "MIT" ]
null
null
null
Python3/basico/loopWhileEx1.py
arthursiq5/programacao-progressiva
2ec91602a6f37c93b99e6a92239045cd1c4cef6b
[ "MIT" ]
null
null
null
Python3/basico/loopWhileEx1.py
arthursiq5/programacao-progressiva
2ec91602a6f37c93b99e6a92239045cd1c4cef6b
[ "MIT" ]
null
null
null
i = 10 while i >= 0: print(i) i = i - 1
8.166667
13
0.387755
10
49
1.9
0.6
0.210526
0
0
0
0
0
0
0
0
0
0.148148
0.44898
49
5
14
9.8
0.555556
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
1
1
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
0
0
0
0
0
0
0
5
90f7612735cc0ab3da1556633c82b89952f193e4
106
py
Python
search-github/__init__.py
CelebradoJonathan/search-github
5283b39f7026da21a6383a44142cd87ce73da7f1
[ "MIT" ]
null
null
null
search-github/__init__.py
CelebradoJonathan/search-github
5283b39f7026da21a6383a44142cd87ce73da7f1
[ "MIT" ]
null
null
null
search-github/__init__.py
CelebradoJonathan/search-github
5283b39f7026da21a6383a44142cd87ce73da7f1
[ "MIT" ]
null
null
null
from listdir_pkg.listdir import * name = "listdir" def test(): return "listdir is installed, nice."
15.142857
40
0.698113
14
106
5.214286
0.785714
0
0
0
0
0
0
0
0
0
0
0
0.188679
106
6
41
17.666667
0.848837
0
0
0
0
0
0.320755
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
90ffab8a2d848c0f7b2e98afaa825938b6969a9e
87
py
Python
nglview/theme/__init__.py
i386uk/nglview
39e207e474ef85feb0e4928d02d2d68428435b15
[ "MIT" ]
null
null
null
nglview/theme/__init__.py
i386uk/nglview
39e207e474ef85feb0e4928d02d2d68428435b15
[ "MIT" ]
null
null
null
nglview/theme/__init__.py
i386uk/nglview
39e207e474ef85feb0e4928d02d2d68428435b15
[ "MIT" ]
1
2021-11-19T02:03:46.000Z
2021-11-19T02:03:46.000Z
from __future__ import absolute_import from .theme import oceans16, _get_theme, reset
21.75
46
0.83908
12
87
5.5
0.666667
0
0
0
0
0
0
0
0
0
0
0.026316
0.126437
87
3
47
29
0.842105
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
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
5
290b87b4fca3ade1b5d3f1d38ba2123dc2dd565c
104
py
Python
startup_scripts/startup_script_utils/__init__.py
systempal/netbox-docker
e251da2e232bd9170232a20652fb0f3714ef8a4d
[ "Apache-2.0" ]
691
2019-01-31T13:59:03.000Z
2022-03-30T00:38:52.000Z
startup_scripts/startup_script_utils/__init__.py
systempal/netbox-docker
e251da2e232bd9170232a20652fb0f3714ef8a4d
[ "Apache-2.0" ]
305
2019-02-20T13:59:43.000Z
2022-03-20T16:17:31.000Z
startup_scripts/startup_script_utils/__init__.py
systempal/netbox-docker
e251da2e232bd9170232a20652fb0f3714ef8a4d
[ "Apache-2.0" ]
435
2019-01-31T15:48:11.000Z
2022-03-29T01:29:24.000Z
from .custom_fields import pop_custom_fields, set_custom_fields_values from .load_yaml import load_yaml
34.666667
70
0.884615
17
104
4.941176
0.529412
0.428571
0
0
0
0
0
0
0
0
0
0
0.086538
104
2
71
52
0.884211
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
293e9f524bb941dd6b68a3294f0330e5336f3722
120
py
Python
itdagene/app/stands/admin.py
itdagene-ntnu/itdagene
b972cd3d803debccebbc33641397a39834b8d69a
[ "MIT" ]
9
2018-10-17T20:58:09.000Z
2021-12-16T16:16:45.000Z
itdagene/app/stands/admin.py
itdagene-ntnu/itdagene
b972cd3d803debccebbc33641397a39834b8d69a
[ "MIT" ]
177
2018-10-27T18:15:56.000Z
2022-03-28T04:29:06.000Z
itdagene/app/stands/admin.py
itdagene-ntnu/itdagene
b972cd3d803debccebbc33641397a39834b8d69a
[ "MIT" ]
null
null
null
from django.contrib import admin from itdagene.app.stands.models import DigitalStand admin.site.register(DigitalStand)
24
51
0.85
16
120
6.375
0.75
0
0
0
0
0
0
0
0
0
0
0
0.083333
120
4
52
30
0.927273
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
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
0
1
0
1
0
1
0
0
5
29721b9291df599d520e65402bd996626daec65b
177
py
Python
tools/mo/openvino/tools/mo/__main__.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
1
2021-10-21T03:04:16.000Z
2021-10-21T03:04:16.000Z
tools/mo/openvino/tools/mo/__main__.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
58
2020-11-06T12:13:45.000Z
2022-03-28T13:20:11.000Z
tools/mo/openvino/tools/mo/__main__.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
2
2021-07-14T07:40:50.000Z
2021-07-27T01:40:03.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from openvino.tools.mo.subprocess_main import subprocess_main subprocess_main(framework=None)
29.5
61
0.824859
25
177
5.72
0.84
0.293706
0
0
0
0
0
0
0
0
0
0.061728
0.084746
177
5
62
35.4
0.820988
0.435028
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
461daa5a5675e49b7a3987bdba874e68fdfac389
529
py
Python
sdk/python/pulumi_azure_native/streamanalytics/v20170401preview/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/streamanalytics/v20170401preview/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/streamanalytics/v20170401preview/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from ... import _utilities import typing # Export this package's modules as members: from ._enums import * from .function import * from .get_function import * from .get_input import * from .get_output import * from .get_streaming_job import * from .input import * from .output import * from .streaming_job import * from ._inputs import * from . import outputs
27.842105
80
0.73913
79
529
4.835443
0.556962
0.26178
0.136126
0.109948
0
0
0
0
0
0
0
0.002278
0.170132
529
18
81
29.388889
0.867882
0.383743
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
4623e9457ecc1e5867bed2a327e77cba4fda9e03
44
py
Python
main.py
serdarquenchless/my-second_repo
9ec82ed9f02876eff88bd356b71fe59a6556a0c2
[ "MIT" ]
null
null
null
main.py
serdarquenchless/my-second_repo
9ec82ed9f02876eff88bd356b71fe59a6556a0c2
[ "MIT" ]
null
null
null
main.py
serdarquenchless/my-second_repo
9ec82ed9f02876eff88bd356b71fe59a6556a0c2
[ "MIT" ]
null
null
null
print("Hello World!") print("By the World")
14.666667
21
0.681818
7
44
4.285714
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.113636
44
2
22
22
0.769231
0
0
0
0
0
0.545455
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
4682c0e46fcfbb202ad07258553f68a0b422db99
231
py
Python
strongr/clouddomain/handler/impl/cloud/mockcloud/listdeployedvmshandler.py
bigr-erasmusmc/StrongR
48573e170771a251f629f2d13dba7173f010a38c
[ "Apache-2.0" ]
null
null
null
strongr/clouddomain/handler/impl/cloud/mockcloud/listdeployedvmshandler.py
bigr-erasmusmc/StrongR
48573e170771a251f629f2d13dba7173f010a38c
[ "Apache-2.0" ]
null
null
null
strongr/clouddomain/handler/impl/cloud/mockcloud/listdeployedvmshandler.py
bigr-erasmusmc/StrongR
48573e170771a251f629f2d13dba7173f010a38c
[ "Apache-2.0" ]
null
null
null
from strongr.clouddomain.handler.abstract.cloud import AbstractListDeployedVmsHandler class ListDeployedVmsHandler(AbstractListDeployedVmsHandler): def __call__(self, command): return {'up': ['localhost'], 'down': []}
38.5
85
0.770563
19
231
9.157895
0.947368
0
0
0
0
0
0
0
0
0
0
0
0.116883
231
5
86
46.2
0.852941
0
0
0
0
0
0.064935
0
0
0
0
0
0
1
0.25
false
0
0.25
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
0
0
0
1
1
0
0
5
d3d69168a927610239335d1b46a4e0afe4b0e6b0
38,135
py
Python
python/ray/dataframe/test/test_dataframe.py
cathywu/ray
8e333977e0991738558f4c8bb737da5fb29df0c6
[ "Apache-2.0" ]
2
2017-12-19T08:18:51.000Z
2018-01-19T02:42:28.000Z
python/ray/dataframe/test/test_dataframe.py
cathywu/ray
8e333977e0991738558f4c8bb737da5fb29df0c6
[ "Apache-2.0" ]
5
2018-01-04T22:54:34.000Z
2018-02-06T23:48:20.000Z
python/ray/dataframe/test/test_dataframe.py
cathywu/ray
8e333977e0991738558f4c8bb737da5fb29df0c6
[ "Apache-2.0" ]
3
2018-01-04T21:18:42.000Z
2019-01-20T05:34:33.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import pytest import numpy as np import pandas as pd import ray import ray.dataframe as rdf @pytest.fixture def ray_df_equals_pandas(ray_df, pandas_df): return rdf.to_pandas(ray_df).sort_index().equals(pandas_df.sort_index()) @pytest.fixture def test_roundtrip(ray_df, pandas_df): assert(ray_df_equals_pandas(ray_df, pandas_df)) @pytest.fixture def test_index(ray_df, pandas_df): assert(ray_df.index.equals(pandas_df.index)) @pytest.fixture def test_size(ray_df, pandas_df): assert(ray_df.size == pandas_df.size) @pytest.fixture def test_ndim(ray_df, pandas_df): assert(ray_df.ndim == pandas_df.ndim) @pytest.fixture def test_ftypes(ray_df, pandas_df): assert(ray_df.ftypes.equals(pandas_df.ftypes)) @pytest.fixture def test_values(ray_df, pandas_df): assert(np.array_equal(ray_df.values, pandas_df.values)) @pytest.fixture def test_axes(ray_df, pandas_df): for ray_axis, pd_axis in zip(ray_df.axes, pandas_df.axes): assert (np.array_equal(ray_axis, pd_axis)) @pytest.fixture def test_shape(ray_df, pandas_df): assert(ray_df.shape == pandas_df.shape) @pytest.fixture def test_add_prefix(ray_df, pandas_df): test_prefix = "TEST" new_ray_df = ray_df.add_prefix(test_prefix) new_pandas_df = pandas_df.add_prefix(test_prefix) assert(new_ray_df.columns.equals(new_pandas_df.columns)) @pytest.fixture def test_add_suffix(ray_df, pandas_df): test_suffix = "TEST" new_ray_df = ray_df.add_suffix(test_suffix) new_pandas_df = pandas_df.add_suffix(test_suffix) assert(new_ray_df.columns.equals(new_pandas_df.columns)) @pytest.fixture def test_applymap(ray_df, pandas_df, testfunc): new_ray_df = ray_df.applymap(testfunc) new_pandas_df = pandas_df.applymap(testfunc) assert(ray_df_equals_pandas(new_ray_df, new_pandas_df)) @pytest.fixture def test_copy(ray_df): new_ray_df = ray_df.copy() assert(new_ray_df is not ray_df) assert(new_ray_df._df == ray_df._df) @pytest.fixture def test_sum(ray_df, pandas_df): assert(ray_df_equals_pandas(ray_df.sum(), pandas_df.sum())) @pytest.fixture def test_abs(ray_df, pandas_df): assert(ray_df_equals_pandas(ray_df.abs(), pandas_df.abs())) @pytest.fixture def test_keys(ray_df, pandas_df): assert(ray_df.keys().equals(pandas_df.keys())) @pytest.fixture def test_transpose(ray_df, pandas_df): assert(ray_df_equals_pandas(ray_df.T, pandas_df.T)) assert(ray_df_equals_pandas(ray_df.transpose(), pandas_df.transpose())) @pytest.fixture def test_get(ray_df, pandas_df, key): assert(ray_df.get(key).equals(pandas_df.get(key))) assert ray_df.get( key, default='default').equals( pandas_df.get(key, default='default')) @pytest.fixture def test_get_dtype_counts(ray_df, pandas_df): assert(ray_df.get_dtype_counts().equals(pandas_df.get_dtype_counts())) @pytest.fixture def test_get_ftype_counts(ray_df, pandas_df): assert(ray_df.get_ftype_counts().equals(pandas_df.get_ftype_counts())) @pytest.fixture def create_test_dataframe(): df = pd.DataFrame({'col1': [0, 1, 2, 3], 'col2': [4, 5, 6, 7], 'col3': [8, 9, 10, 11], 'col4': [12, 13, 14, 15], 'col5': [0, 0, 0, 0]}) return rdf.from_pandas(df, 2) def test_int_dataframe(): ray.init() pandas_df = pd.DataFrame({'col1': [0, 1, 2, 3], 'col2': [4, 5, 6, 7], 'col3': [8, 9, 10, 11], 'col4': [12, 13, 14, 15], 'col5': [0, 0, 0, 0]}) ray_df = rdf.from_pandas(pandas_df, 2) testfuncs = [lambda x: x + 1, lambda x: str(x), lambda x: x * x, lambda x: x, lambda x: False] keys = ['col1', 'col2', 'col3', 'col4'] test_roundtrip(ray_df, pandas_df) test_index(ray_df, pandas_df) test_size(ray_df, pandas_df) test_ndim(ray_df, pandas_df) test_ftypes(ray_df, pandas_df) test_values(ray_df, pandas_df) test_axes(ray_df, pandas_df) test_shape(ray_df, pandas_df) test_add_prefix(ray_df, pandas_df) test_add_suffix(ray_df, pandas_df) for testfunc in testfuncs: test_applymap(ray_df, pandas_df, testfunc) test_copy(ray_df) test_sum(ray_df, pandas_df) test_abs(ray_df, pandas_df) test_keys(ray_df, pandas_df) test_transpose(ray_df, pandas_df) test_round(ray_df, pandas_df) test_all(ray_df, pandas_df) test_any(ray_df, pandas_df) test___getitem__(ray_df, pandas_df) test___delitem__(ray_df, pandas_df) test___copy__(ray_df, pandas_df) test___deepcopy__(ray_df, pandas_df) test_bool(ray_df, pandas_df) test_count(ray_df, pandas_df) test_head(ray_df, pandas_df) test_tail(ray_df, pandas_df) test_idxmax(ray_df, pandas_df) test_idxmin(ray_df, pandas_df) test_pop(ray_df, pandas_df) for key in keys: test_get(ray_df, pandas_df, key) test_get_dtype_counts(ray_df, pandas_df) test_get_ftype_counts(ray_df, pandas_df) def test_float_dataframe(): pandas_df = pd.DataFrame({'col1': [0.0, 1.0, 2.0, 3.0], 'col2': [4.0, 5.0, 6.0, 7.0], 'col3': [8.0, 9.0, 10.0, 11.0], 'col4': [12.0, 13.0, 14.0, 15.0], 'col5': [0.0, 0.0, 0.0, 0.0]}) ray_df = rdf.from_pandas(pandas_df, 2) testfuncs = [lambda x: x + 1, lambda x: str(x), lambda x: x * x, lambda x: x, lambda x: False] keys = ['col1', 'col2', 'col3', 'col4'] test_roundtrip(ray_df, pandas_df) test_index(ray_df, pandas_df) test_size(ray_df, pandas_df) test_ndim(ray_df, pandas_df) test_ftypes(ray_df, pandas_df) test_values(ray_df, pandas_df) test_axes(ray_df, pandas_df) test_shape(ray_df, pandas_df) test_add_prefix(ray_df, pandas_df) test_add_suffix(ray_df, pandas_df) for testfunc in testfuncs: test_applymap(ray_df, pandas_df, testfunc) test_copy(ray_df) test_sum(ray_df, pandas_df) test_abs(ray_df, pandas_df) test_keys(ray_df, pandas_df) test_transpose(ray_df, pandas_df) test_round(ray_df, pandas_df) test_all(ray_df, pandas_df) test_any(ray_df, pandas_df) test___getitem__(ray_df, pandas_df) test___delitem__(ray_df, pandas_df) test___copy__(ray_df, pandas_df) test___deepcopy__(ray_df, pandas_df) test_bool(ray_df, pandas_df) test_count(ray_df, pandas_df) test_head(ray_df, pandas_df) test_tail(ray_df, pandas_df) test_idxmax(ray_df, pandas_df) test_idxmin(ray_df, pandas_df) test_pop(ray_df, pandas_df) for key in keys: test_get(ray_df, pandas_df, key) test_get_dtype_counts(ray_df, pandas_df) test_get_ftype_counts(ray_df, pandas_df) def test_mixed_dtype_dataframe(): pandas_df = pd.DataFrame({ 'col1': [1, 2, 3, 4], 'col2': [4, 5, 6, 7], 'col3': [8.0, 9.4, 10.1, 11.3], 'col4': ['a', 'b', 'c', 'd']}) ray_df = rdf.from_pandas(pandas_df, 2) testfuncs = [lambda x: x + x, lambda x: str(x), lambda x: x, lambda x: False] keys = ['col1', 'col2', 'col3', 'col4'] test_roundtrip(ray_df, pandas_df) test_index(ray_df, pandas_df) test_size(ray_df, pandas_df) test_ndim(ray_df, pandas_df) test_ftypes(ray_df, pandas_df) test_values(ray_df, pandas_df) test_axes(ray_df, pandas_df) test_shape(ray_df, pandas_df) test_add_prefix(ray_df, pandas_df) test_add_suffix(ray_df, pandas_df) for testfunc in testfuncs: test_applymap(ray_df, pandas_df, testfunc) test_copy(ray_df) test_sum(ray_df, pandas_df) test_keys(ray_df, pandas_df) test_transpose(ray_df, pandas_df) for key in keys: test_get(ray_df, pandas_df, key) test_get_dtype_counts(ray_df, pandas_df) test_get_ftype_counts(ray_df, pandas_df) def test_add(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.add(None) def test_agg(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.agg(None) def test_aggregate(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.aggregate(None) def test_align(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.align(None) @pytest.fixture def test_all(ray_df, pd_df): assert pd_df.all().equals(ray_df.all()) assert pd_df.all(axis=1).equals(ray_df.all(axis=1)) @pytest.fixture def test_any(ray_df, pd_df): assert pd_df.any().equals(ray_df.any()) assert pd_df.any(axis=1).equals(ray_df.any(axis=1)) def test_append(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.append(None) def test_apply(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.apply(None) def test_as_blocks(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.as_blocks() def test_as_matrix(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.as_matrix() def test_asfreq(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.asfreq(None) def test_asof(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.asof(None) def test_assign(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.assign() def test_astype(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.astype(None) def test_at_time(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.at_time(None) def test_between_time(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.between_time(None, None) def test_bfill(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.between_time(None, None) @pytest.fixture def test_bool(ray_df, pd_df): with pytest.raises(ValueError): ray_df.bool() pd_df.bool() single_bool_pd_df = pd.DataFrame([True]) single_bool_ray_df = rdf.from_pandas(single_bool_pd_df, 1) assert single_bool_pd_df.bool() == single_bool_ray_df.bool() def test_boxplot(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.boxplot() def test_clip(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.clip() def test_clip_lower(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.clip_lower(None) def test_clip_upper(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.clip_upper(None) def test_combine(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.combine(None, None) def test_combine_first(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.combine_first(None) def test_compound(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.compound() def test_consolidate(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.consolidate() def test_convert_objects(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.convert_objects() def test_corr(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.corr() def test_corrwith(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.corrwith(None) @pytest.fixture def test_count(ray_df, pd_df): assert ray_df.count().equals(pd_df.count()) assert ray_df.count(axis=1).equals(pd_df.count(axis=1)) def test_cov(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.cov() def test_cummax(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.cummax() def test_cummin(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.cummin() def test_cumprod(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.cumprod() def test_cumsum(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.cumsum() def test_describe(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.describe() def test_diff(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.diff() def test_div(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.div(None) def test_divide(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.divide(None) def test_dot(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.dot(None) def test_drop(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.drop() def test_drop_duplicates(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.drop_duplicates() def test_duplicated(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.duplicated() def test_eq(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.eq(None) def test_equals(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.equals(None) def test_eval(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.eval(None) def test_ewm(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.ewm() def test_expanding(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.expanding() def test_ffill(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.ffill() def test_fillna(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.fillna() def test_filter(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.filter() def test_first(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.first(None) def test_first_valid_index(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.first_valid_index() def test_floordiv(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.floordiv(None) def test_from_csv(): with pytest.raises(NotImplementedError): rdf.DataFrame.from_csv(None) def test_from_dict(): with pytest.raises(NotImplementedError): rdf.DataFrame.from_dict(None) def test_from_items(): with pytest.raises(NotImplementedError): rdf.DataFrame.from_items(None) def test_from_records(): with pytest.raises(NotImplementedError): rdf.DataFrame.from_records(None) def test_ge(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.ge(None) def test_get_value(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.get_value(None, None) def test_get_values(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.get_values() def test_gt(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.gt(None) @pytest.fixture def test_head(ray_df, pandas_df): ray_df_equals_pandas(ray_df.head(), pandas_df.head()) def test_hist(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.hist(None) @pytest.fixture def test_idxmax(ray_df, pandas_df): assert \ ray_df.idxmax().sort_index().equals(pandas_df.idxmax().sort_index()) @pytest.fixture def test_idxmin(ray_df, pandas_df): assert \ ray_df.idxmin().sort_index().equals(pandas_df.idxmin().sort_index()) def test_infer_objects(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.infer_objects() def test_info(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.info() def test_insert(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.insert(None, None, None) def test_interpolate(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.interpolate() def test_items(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.items() def test_iteritems(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.iteritems() def test_iterrows(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.iterrows() def test_itertuples(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.itertuples() def test_join(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.join(None) def test_kurt(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.kurt() def test_kurtosis(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.kurtosis() def test_last(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.last(None) def test_last_valid_index(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.last_valid_index() def test_le(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.le(None) def test_lookup(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.lookup(None, None) def test_lt(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.lt(None) def test_mad(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.mad() def test_mask(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.mask(None) def test_max(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.max() def test_mean(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.mean() def test_median(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.median() def test_melt(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.melt() def test_memory_usage(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.memory_usage() def test_merge(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.merge(None) def test_min(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.min() def test_mod(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.mod(None) def test_mode(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.mode() def test_mul(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.mul(None) def test_multiply(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.multiply(None) def test_ne(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.ne(None) def test_nlargest(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.nlargest(None, None) def test_notna(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.notna() def test_notnull(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.notnull() def test_nsmallest(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.nsmallest(None, None) def test_nunique(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.nunique() def test_pct_change(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.pct_change() def test_pipe(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.pipe(None) def test_pivot(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.pivot() def test_pivot_table(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.pivot_table() def test_plot(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.plot() @pytest.fixture def test_pop(ray_df, pandas_df): temp_ray_df = ray_df._map_partitions(lambda df: df) temp_pandas_df = pandas_df.copy() ray_popped = temp_ray_df.pop('col2') pandas_popped = temp_pandas_df.pop('col2') assert ray_popped.sort_index().equals(pandas_popped.sort_index()) ray_df_equals_pandas(temp_ray_df, temp_pandas_df) def test_pow(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.pow(None) def test_prod(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.prod() def test_product(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.product() def test_quantile(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.quantile() def test_query(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.query(None) def test_radd(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.radd(None) def test_rank(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rank() def test_rdiv(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rdiv(None) def test_reindex(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.reindex() def test_reindex_axis(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.reindex_axis(None) def test_reindex_like(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.reindex_like(None) def test_rename(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rename() def test_rename_axis(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rename_axis(None) def test_reorder_levels(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.reorder_levels(None) def test_replace(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.replace() def test_resample(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.resample(None) def test_reset_index(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.reset_index() def test_rfloordiv(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rfloordiv(None) def test_rmod(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rmod(None) def test_rmul(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rmul(None) def test_rolling(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rolling(None) @pytest.fixture def test_round(ray_df, pd_df): assert ray_df_equals_pandas(ray_df.round(), pd_df.round()) assert ray_df_equals_pandas(ray_df.round(1), pd_df.round(1)) def test_rpow(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rpow(None) def test_rsub(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rsub(None) def test_rtruediv(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.rtruediv(None) def test_sample(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.sample() def test_select(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.select(None) def test_select_dtypes(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.select_dtypes() def test_sem(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.sem() def test_set_axis(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.set_axis(None) def test_set_index(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.set_index(None) def test_set_value(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.set_value(None, None, None) def test_shift(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.shift() def test_skew(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.skew() def test_slice_shift(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.slice_shift() def test_sort_index(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.sort_index() def test_sort_values(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.sort_values(None) def test_sortlevel(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.sortlevel() def test_squeeze(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.squeeze() def test_stack(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.stack() def test_std(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.std() def test_sub(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.sub(None) def test_subtract(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.subtract(None) def test_swapaxes(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.swapaxes(None, None) def test_swaplevel(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.swaplevel() @pytest.fixture def test_tail(ray_df, pandas_df): ray_df_equals_pandas(ray_df.tail(), pandas_df.tail()) def test_take(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.take(None) def test_to_clipboard(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_clipboard() def test_to_csv(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_csv() def test_to_dense(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_dense() def test_to_dict(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_dict() def test_to_excel(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_excel(None) def test_to_feather(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_feather(None) def test_to_gbq(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_gbq(None, None) def test_to_hdf(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_hdf(None, None) def test_to_html(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_html() def test_to_json(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_json() def test_to_latex(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_latex() def test_to_msgpack(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_msgpack() def test_to_panel(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_panel() def test_to_parquet(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_parquet(None) def test_to_period(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_period() def test_to_pickle(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_pickle(None) def test_to_records(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_records() def test_to_sparse(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_sparse() def test_to_sql(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_sql(None, None) def test_to_stata(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_stata(None) def test_to_string(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_string() def test_to_timestamp(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_timestamp() def test_to_xarray(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.to_xarray() def test_transform(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.transform(None) def test_truediv(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.truediv(None) def test_truncate(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.truncate() def test_tshift(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.tshift() def test_tz_convert(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.tz_convert(None) def test_tz_localize(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.tz_localize(None) def test_unstack(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.unstack() def test_update(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.update(None) def test_var(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.var() def test_where(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.where(None) def test_xs(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.xs(None) @pytest.fixture def test___getitem__(ray_df, pd_df): ray_col = ray_df.__getitem__('col1') assert isinstance(ray_col, pd.Series) pd_col = pd_df['col1'] assert pd_col.equals(ray_col) def test___setitem__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__setitem__(None, None) def test___len__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__len__() def test___unicode__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__unicode__() def test___neg__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__neg__() def test___invert__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__invert__() def test___hash__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__hash__() def test___iter__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__iter__() def test___contains__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__contains__(None) def test___nonzero__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__nonzero__() def test___bool__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__bool__() def test___abs__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__abs__() def test___round__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__round__() def test___array__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__array__() def test___array_wrap__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__array_wrap__(None) def test___getstate__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__getstate__() def test___setstate__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__setstate__(None) @pytest.fixture def test___delitem__(ray_df, pd_df): ray_df = ray_df.copy() pd_df = pd_df.copy() ray_df.__delitem__('col1') pd_df.__delitem__('col1') ray_df_equals_pandas(ray_df, pd_df) def test___finalize__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__finalize__(None) @pytest.fixture def test___copy__(ray_df, pd_df): ray_df_copy, pd_df_copy = ray_df.__copy__(), pd_df.__copy__() assert ray_df_equals_pandas(ray_df_copy, pd_df_copy) @pytest.fixture def test___deepcopy__(ray_df, pd_df): ray_df_copy, pd_df_copy = ray_df.__deepcopy__(), pd_df.__deepcopy__() assert ray_df_equals_pandas(ray_df_copy, pd_df_copy) def test_blocks(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.blocks def test_style(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.style def test_iat(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.iat() def test___rsub__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__rsub__(None, None, None) def test_loc(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.loc() def test_is_copy(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.is_copy def test___itruediv__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__itruediv__() def test___div__(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.__div__(None) def test_at(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.at() def test_ix(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.ix() def test_iloc(): ray_df = create_test_dataframe() with pytest.raises(NotImplementedError): ray_df.iloc()
20.70304
76
0.688921
5,064
38,135
4.78594
0.061019
0.124402
0.136656
0.297491
0.771497
0.734156
0.712535
0.684354
0.677752
0.675029
0
0.005553
0.206713
38,135
1,841
77
20.714286
0.795584
0
0
0.517921
0
0
0.004563
0
0
0
0
0
0.03405
1
0.218638
false
0
0.007168
0.000896
0.227599
0.000896
0
0
0
null
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
d3e6055578b7db5e0bbf773b47861e841b51fbb7
167
py
Python
wdae/wdae/datasets_api/admin.py
iossifovlab/gpf
e556243d29666179dbcb72859845b4d6c011af2b
[ "MIT" ]
null
null
null
wdae/wdae/datasets_api/admin.py
iossifovlab/gpf
e556243d29666179dbcb72859845b4d6c011af2b
[ "MIT" ]
82
2019-07-22T11:44:23.000Z
2022-01-13T15:27:33.000Z
wdae/wdae/datasets_api/admin.py
iossifovlab/gpf
e556243d29666179dbcb72859845b4d6c011af2b
[ "MIT" ]
null
null
null
from datasets_api.models import Dataset from django.contrib import admin from guardian.admin import GuardedModelAdmin admin.site.register(Dataset, GuardedModelAdmin)
27.833333
47
0.862275
21
167
6.809524
0.619048
0
0
0
0
0
0
0
0
0
0
0
0.08982
167
5
48
33.4
0.940789
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
d3e9272f27ecd8d55f6aabea7b8ceb946fc07f90
64
py
Python
src/simple_ray_tracing.py
mnichol3/acoustics_sandbox
a4ce90b484f75c366752ea12e97d2acb22ea059b
[ "MIT" ]
null
null
null
src/simple_ray_tracing.py
mnichol3/acoustics_sandbox
a4ce90b484f75c366752ea12e97d2acb22ea059b
[ "MIT" ]
null
null
null
src/simple_ray_tracing.py
mnichol3/acoustics_sandbox
a4ce90b484f75c366752ea12e97d2acb22ea059b
[ "MIT" ]
null
null
null
""" A simple acoustic ray tracing model. """ import numpy as np
12.8
36
0.703125
10
64
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.1875
64
4
37
16
0.865385
0.5625
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
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
0
1
0
1
0
1
0
0
5
d3e995acfb359366732599c28f4d62d14efbc889
91
py
Python
wic/__init__.py
hacki11/wic
da7aa917e1da937e1c73d4c7fde3760986387e3d
[ "Apache-2.0" ]
null
null
null
wic/__init__.py
hacki11/wic
da7aa917e1da937e1c73d4c7fde3760986387e3d
[ "Apache-2.0" ]
null
null
null
wic/__init__.py
hacki11/wic
da7aa917e1da937e1c73d4c7fde3760986387e3d
[ "Apache-2.0" ]
null
null
null
from .workspace import * from .files import * from .options import * from .Config import *
18.2
24
0.736264
12
91
5.583333
0.5
0.447761
0
0
0
0
0
0
0
0
0
0
0.175824
91
4
25
22.75
0.893333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
31107869ae687d5a76f261e9b17e7d5e0bd24f53
34
py
Python
insomniac/__main__.py
shifenis/Insomniac
7c9d572b83c29049bc3075073be5549fe821a739
[ "MIT" ]
533
2020-06-01T10:40:11.000Z
2022-03-29T17:05:50.000Z
insomniac/__main__.py
shifenis/Insomniac
7c9d572b83c29049bc3075073be5549fe821a739
[ "MIT" ]
399
2020-06-01T22:01:55.000Z
2022-03-29T20:39:29.000Z
insomniac/__main__.py
shifenis/Insomniac
7c9d572b83c29049bc3075073be5549fe821a739
[ "MIT" ]
166
2020-06-01T21:51:52.000Z
2022-03-12T14:14:44.000Z
import insomniac insomniac.run()
8.5
16
0.794118
4
34
6.75
0.75
0
0
0
0
0
0
0
0
0
0
0
0.117647
34
3
17
11.333333
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
312dece8cb9be1b01cb234cd62cc05791bdf9b91
115
py
Python
wsgi.py
Eddyjim/BB-BaseTool
39fd41cc503b7c31886426b8b017c5f9acfe5072
[ "MIT" ]
null
null
null
wsgi.py
Eddyjim/BB-BaseTool
39fd41cc503b7c31886426b8b017c5f9acfe5072
[ "MIT" ]
2
2022-03-16T01:34:51.000Z
2022-03-16T01:34:56.000Z
wsgi.py
Eddyjim/BB-BaseTool
39fd41cc503b7c31886426b8b017c5f9acfe5072
[ "MIT" ]
null
null
null
""" wsgi -------------------------------------------- """ from app import create_app application = create_app()
11.5
44
0.417391
9
115
5.111111
0.666667
0.391304
0
0
0
0
0
0
0
0
0
0
0.121739
115
9
45
12.777778
0.455446
0.426087
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
0
0
1
0
0
0
0
5
31455873df8e68d183fe483099b63613d3da119f
45
py
Python
stones/exceptions.py
croqaz/stones
1b57a44ccc8adbbcb777a363ba7d7d51dcc0b20f
[ "MIT" ]
4
2019-11-15T09:39:56.000Z
2022-01-17T07:44:04.000Z
stones/exceptions.py
croqaz/stones
1b57a44ccc8adbbcb777a363ba7d7d51dcc0b20f
[ "MIT" ]
3
2017-11-19T21:11:55.000Z
2022-01-07T10:33:45.000Z
stones/exceptions.py
croqaz/stones
1b57a44ccc8adbbcb777a363ba7d7d51dcc0b20f
[ "MIT" ]
1
2022-03-11T19:23:55.000Z
2022-03-11T19:23:55.000Z
class EncoderException(Exception): pass
11.25
34
0.755556
4
45
8.5
1
0
0
0
0
0
0
0
0
0
0
0
0.177778
45
3
35
15
0.918919
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
315b43ec185f5041e7b7ce3897b8225adb018380
31
py
Python
jaineel.py
dhyeyshah28/Python_93
e64a5dcdf1e0be401a35eb09bcd3b8dbe1d9e723
[ "Apache-2.0" ]
1
2019-10-14T16:25:19.000Z
2019-10-14T16:25:19.000Z
jaineel.py
dhyeyshah28/Python_93
e64a5dcdf1e0be401a35eb09bcd3b8dbe1d9e723
[ "Apache-2.0" ]
1
2019-10-14T16:15:02.000Z
2019-10-14T16:17:48.000Z
jaineel.py
dhyeyshah28/Python_93
e64a5dcdf1e0be401a35eb09bcd3b8dbe1d9e723
[ "Apache-2.0" ]
2
2019-10-14T15:08:58.000Z
2019-10-14T15:11:26.000Z
prini("jurani") print("purani")
15.5
15
0.709677
4
31
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.032258
31
2
16
15.5
0.733333
0
0
0
0
0
0.375
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
315f84609576d4ca87a45d55b2641050b00a4db2
118
py
Python
9X9.py
LH3525/github
9484ffcd123978523e8c2368ffa64646b84b3449
[ "MIT" ]
null
null
null
9X9.py
LH3525/github
9484ffcd123978523e8c2368ffa64646b84b3449
[ "MIT" ]
null
null
null
9X9.py
LH3525/github
9484ffcd123978523e8c2368ffa64646b84b3449
[ "MIT" ]
null
null
null
for i in range(1,10): for j in range(1,i+1): print('{}*{} = {}''\t'.format(i,j,i*j),end = '') print()
23.6
56
0.440678
22
118
2.363636
0.5
0.269231
0.307692
0
0
0
0
0
0
0
0
0.056818
0.254237
118
4
57
29.5
0.534091
0
0
0
0
0
0.101695
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
3160a7c6a575cda334c8c5f85c494937b2a881b7
88
py
Python
acq4/devices/AxoPatch200/__init__.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
47
2015-01-05T16:18:10.000Z
2022-03-16T13:09:30.000Z
acq4/devices/AxoPatch200/__init__.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
48
2015-04-19T16:51:41.000Z
2022-03-31T14:48:16.000Z
acq4/devices/AxoPatch200/__init__.py
sensapex/acq4
9561ba73caff42c609bd02270527858433862ad8
[ "MIT" ]
32
2015-01-15T14:11:49.000Z
2021-07-15T13:44:52.000Z
#!/usr/bin/env python from __future__ import print_function from .AxoPatch200 import *
17.6
37
0.795455
12
88
5.416667
0.833333
0
0
0
0
0
0
0
0
0
0
0.038961
0.125
88
4
38
22
0.805195
0.227273
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.5
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
0
1
0
1
0
0
1
0
5
318598864bdbb0e53636858ad8656ed34590ccd2
42
py
Python
Python/LearningCode/007_Project_XMLParser/test.py
FontaineGuo/PathOfLearning
a5af03af6dcea409375276b53a397f014a4de231
[ "MIT" ]
null
null
null
Python/LearningCode/007_Project_XMLParser/test.py
FontaineGuo/PathOfLearning
a5af03af6dcea409375276b53a397f014a4de231
[ "MIT" ]
null
null
null
Python/LearningCode/007_Project_XMLParser/test.py
FontaineGuo/PathOfLearning
a5af03af6dcea409375276b53a397f014a4de231
[ "MIT" ]
null
null
null
a = 1 b = 2, print(type(a)) print(type(b))
10.5
14
0.571429
10
42
2.4
0.6
0.75
0
0
0
0
0
0
0
0
0
0.057143
0.166667
42
4
15
10.5
0.628571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
0
0
0
0
0
1
0
5
31a9eda5c1ca5940ef9878e64dc8afed9c0865ea
249,811
py
Python
sdk/python/pulumi_azure_native/media/v20180330preview/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/media/v20180330preview/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/media/v20180330preview/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * __all__ = [ 'AacAudioResponse', 'AkamaiAccessControlResponse', 'AkamaiSignatureHeaderAuthenticationKeyResponse', 'AudioAnalyzerPresetResponse', 'AudioOverlayResponse', 'AudioResponse', 'BuiltInStandardEncoderPresetResponse', 'CbcsDrmConfigurationResponse', 'CencDrmConfigurationResponse', 'CommonEncryptionCbcsResponse', 'CommonEncryptionCencResponse', 'ContentKeyPolicyClearKeyConfigurationResponse', 'ContentKeyPolicyFairPlayConfigurationResponse', 'ContentKeyPolicyOpenRestrictionResponse', 'ContentKeyPolicyOptionResponse', 'ContentKeyPolicyPlayReadyConfigurationResponse', 'ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeaderResponse', 'ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifierResponse', 'ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionResponse', 'ContentKeyPolicyPlayReadyLicenseResponse', 'ContentKeyPolicyPlayReadyPlayRightResponse', 'ContentKeyPolicyRsaTokenKeyResponse', 'ContentKeyPolicySymmetricTokenKeyResponse', 'ContentKeyPolicyTokenClaimResponse', 'ContentKeyPolicyTokenRestrictionResponse', 'ContentKeyPolicyUnknownConfigurationResponse', 'ContentKeyPolicyUnknownRestrictionResponse', 'ContentKeyPolicyWidevineConfigurationResponse', 'ContentKeyPolicyX509CertificateTokenKeyResponse', 'CopyAudioResponse', 'CopyVideoResponse', 'CrossSiteAccessPoliciesResponse', 'DefaultKeyResponse', 'DeinterlaceResponse', 'EnabledProtocolsResponse', 'EnvelopeEncryptionResponse', 'FiltersResponse', 'H264LayerResponse', 'H264VideoResponse', 'HlsResponse', 'IPAccessControlResponse', 'IPRangeResponse', 'ImageFormatResponse', 'ImageResponse', 'JobErrorDetailResponse', 'JobErrorResponse', 'JobInputAssetResponse', 'JobInputClipResponse', 'JobInputHttpResponse', 'JobInputsResponse', 'JobOutputAssetResponse', 'JpgFormatResponse', 'JpgImageResponse', 'JpgLayerResponse', 'LiveEventEncodingResponse', 'LiveEventEndpointResponse', 'LiveEventInputResponse', 'LiveEventPreviewAccessControlResponse', 'LiveEventPreviewResponse', 'Mp4FormatResponse', 'MultiBitrateFormatResponse', 'NoEncryptionResponse', 'OutputFileResponse', 'PngFormatResponse', 'PngImageResponse', 'PngLayerResponse', 'RectangleResponse', 'StandardEncoderPresetResponse', 'StorageAccountResponse', 'StreamingEndpointAccessControlResponse', 'StreamingLocatorContentKeyResponse', 'StreamingLocatorUserDefinedContentKeyResponse', 'StreamingPathResponse', 'StreamingPolicyContentKeyResponse', 'StreamingPolicyContentKeysResponse', 'StreamingPolicyFairPlayConfigurationResponse', 'StreamingPolicyPlayReadyConfigurationResponse', 'StreamingPolicyWidevineConfigurationResponse', 'TrackPropertyConditionResponse', 'TrackSelectionResponse', 'TransformOutputResponse', 'TransportStreamFormatResponse', 'VideoAnalyzerPresetResponse', 'VideoOverlayResponse', 'VideoResponse', ] @pulumi.output_type class AacAudioResponse(dict): """ Describes Advanced Audio Codec (AAC) audio encoding settings. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "samplingRate": suggest = "sampling_rate" if suggest: pulumi.log.warn(f"Key '{key}' not found in AacAudioResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: AacAudioResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: AacAudioResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, bitrate: Optional[int] = None, channels: Optional[int] = None, label: Optional[str] = None, profile: Optional[str] = None, sampling_rate: Optional[int] = None): """ Describes Advanced Audio Codec (AAC) audio encoding settings. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.AacAudio'. :param int bitrate: The bitrate, in bits per second, of the output encoded audio. :param int channels: The number of channels in the audio. :param str label: An optional label for the codec. The label can be used to control muxing behavior. :param str profile: The encoding profile to be used when encoding audio with AAC. :param int sampling_rate: The sampling rate to use for encoding in hertz. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.AacAudio') if bitrate is not None: pulumi.set(__self__, "bitrate", bitrate) if channels is not None: pulumi.set(__self__, "channels", channels) if label is not None: pulumi.set(__self__, "label", label) if profile is not None: pulumi.set(__self__, "profile", profile) if sampling_rate is not None: pulumi.set(__self__, "sampling_rate", sampling_rate) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.AacAudio'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def bitrate(self) -> Optional[int]: """ The bitrate, in bits per second, of the output encoded audio. """ return pulumi.get(self, "bitrate") @property @pulumi.getter def channels(self) -> Optional[int]: """ The number of channels in the audio. """ return pulumi.get(self, "channels") @property @pulumi.getter def label(self) -> Optional[str]: """ An optional label for the codec. The label can be used to control muxing behavior. """ return pulumi.get(self, "label") @property @pulumi.getter def profile(self) -> Optional[str]: """ The encoding profile to be used when encoding audio with AAC. """ return pulumi.get(self, "profile") @property @pulumi.getter(name="samplingRate") def sampling_rate(self) -> Optional[int]: """ The sampling rate to use for encoding in hertz. """ return pulumi.get(self, "sampling_rate") @pulumi.output_type class AkamaiAccessControlResponse(dict): """ Akamai access control """ @staticmethod def __key_warning(key: str): suggest = None if key == "akamaiSignatureHeaderAuthenticationKeyList": suggest = "akamai_signature_header_authentication_key_list" if suggest: pulumi.log.warn(f"Key '{key}' not found in AkamaiAccessControlResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: AkamaiAccessControlResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: AkamaiAccessControlResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, akamai_signature_header_authentication_key_list: Optional[Sequence['outputs.AkamaiSignatureHeaderAuthenticationKeyResponse']] = None): """ Akamai access control :param Sequence['AkamaiSignatureHeaderAuthenticationKeyResponse'] akamai_signature_header_authentication_key_list: authentication key list """ if akamai_signature_header_authentication_key_list is not None: pulumi.set(__self__, "akamai_signature_header_authentication_key_list", akamai_signature_header_authentication_key_list) @property @pulumi.getter(name="akamaiSignatureHeaderAuthenticationKeyList") def akamai_signature_header_authentication_key_list(self) -> Optional[Sequence['outputs.AkamaiSignatureHeaderAuthenticationKeyResponse']]: """ authentication key list """ return pulumi.get(self, "akamai_signature_header_authentication_key_list") @pulumi.output_type class AkamaiSignatureHeaderAuthenticationKeyResponse(dict): """ Akamai Signature Header authentication key. """ @staticmethod def __key_warning(key: str): suggest = None if key == "base64Key": suggest = "base64_key" if suggest: pulumi.log.warn(f"Key '{key}' not found in AkamaiSignatureHeaderAuthenticationKeyResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: AkamaiSignatureHeaderAuthenticationKeyResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: AkamaiSignatureHeaderAuthenticationKeyResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, base64_key: Optional[str] = None, expiration: Optional[str] = None, identifier: Optional[str] = None): """ Akamai Signature Header authentication key. :param str base64_key: authentication key :param str expiration: The exact time the authentication key. :param str identifier: identifier of the key """ if base64_key is not None: pulumi.set(__self__, "base64_key", base64_key) if expiration is not None: pulumi.set(__self__, "expiration", expiration) if identifier is not None: pulumi.set(__self__, "identifier", identifier) @property @pulumi.getter(name="base64Key") def base64_key(self) -> Optional[str]: """ authentication key """ return pulumi.get(self, "base64_key") @property @pulumi.getter def expiration(self) -> Optional[str]: """ The exact time the authentication key. """ return pulumi.get(self, "expiration") @property @pulumi.getter def identifier(self) -> Optional[str]: """ identifier of the key """ return pulumi.get(self, "identifier") @pulumi.output_type class AudioAnalyzerPresetResponse(dict): """ The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including speech transcription. Currently, the preset supports processing of content with a single audio track. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "audioLanguage": suggest = "audio_language" if suggest: pulumi.log.warn(f"Key '{key}' not found in AudioAnalyzerPresetResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: AudioAnalyzerPresetResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: AudioAnalyzerPresetResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, audio_language: Optional[str] = None): """ The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including speech transcription. Currently, the preset supports processing of content with a single audio track. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.AudioAnalyzerPreset'. :param str audio_language: The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN'. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.AudioAnalyzerPreset') if audio_language is not None: pulumi.set(__self__, "audio_language", audio_language) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.AudioAnalyzerPreset'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="audioLanguage") def audio_language(self) -> Optional[str]: """ The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN'. """ return pulumi.get(self, "audio_language") @pulumi.output_type class AudioOverlayResponse(dict): """ Describes the properties of an audio overlay. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "audioGainLevel": suggest = "audio_gain_level" elif key == "fadeInDuration": suggest = "fade_in_duration" elif key == "fadeOutDuration": suggest = "fade_out_duration" elif key == "inputLabel": suggest = "input_label" if suggest: pulumi.log.warn(f"Key '{key}' not found in AudioOverlayResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: AudioOverlayResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: AudioOverlayResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, audio_gain_level: Optional[float] = None, end: Optional[str] = None, fade_in_duration: Optional[str] = None, fade_out_duration: Optional[str] = None, input_label: Optional[str] = None, start: Optional[str] = None): """ Describes the properties of an audio overlay. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.AudioOverlay'. :param float audio_gain_level: The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. :param str end: The position in the input video at which the overlay ends. The value should be in ISO 8601 duration format. For example, PT30S to end the overlay at 30 seconds in to the input video. If not specified the overlay will be applied until the end of the input video if inputLoop is true. Else, if inputLoop is false, then overlay will last as long as the duration of the overlay media. :param str fade_in_duration: The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as PT0S). :param str fade_out_duration: The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as PT0S). :param str input_label: The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video file formats. :param str start: The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds in to the input video. If not specified the overlay starts from the beginning of the input video. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.AudioOverlay') if audio_gain_level is not None: pulumi.set(__self__, "audio_gain_level", audio_gain_level) if end is not None: pulumi.set(__self__, "end", end) if fade_in_duration is not None: pulumi.set(__self__, "fade_in_duration", fade_in_duration) if fade_out_duration is not None: pulumi.set(__self__, "fade_out_duration", fade_out_duration) if input_label is not None: pulumi.set(__self__, "input_label", input_label) if start is not None: pulumi.set(__self__, "start", start) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.AudioOverlay'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="audioGainLevel") def audio_gain_level(self) -> Optional[float]: """ The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. """ return pulumi.get(self, "audio_gain_level") @property @pulumi.getter def end(self) -> Optional[str]: """ The position in the input video at which the overlay ends. The value should be in ISO 8601 duration format. For example, PT30S to end the overlay at 30 seconds in to the input video. If not specified the overlay will be applied until the end of the input video if inputLoop is true. Else, if inputLoop is false, then overlay will last as long as the duration of the overlay media. """ return pulumi.get(self, "end") @property @pulumi.getter(name="fadeInDuration") def fade_in_duration(self) -> Optional[str]: """ The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as PT0S). """ return pulumi.get(self, "fade_in_duration") @property @pulumi.getter(name="fadeOutDuration") def fade_out_duration(self) -> Optional[str]: """ The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as PT0S). """ return pulumi.get(self, "fade_out_duration") @property @pulumi.getter(name="inputLabel") def input_label(self) -> Optional[str]: """ The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video file formats. """ return pulumi.get(self, "input_label") @property @pulumi.getter def start(self) -> Optional[str]: """ The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds in to the input video. If not specified the overlay starts from the beginning of the input video. """ return pulumi.get(self, "start") @pulumi.output_type class AudioResponse(dict): """ Defines the common properties for all audio codecs. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "samplingRate": suggest = "sampling_rate" if suggest: pulumi.log.warn(f"Key '{key}' not found in AudioResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: AudioResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: AudioResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, bitrate: Optional[int] = None, channels: Optional[int] = None, label: Optional[str] = None, sampling_rate: Optional[int] = None): """ Defines the common properties for all audio codecs. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.Audio'. :param int bitrate: The bitrate, in bits per second, of the output encoded audio. :param int channels: The number of channels in the audio. :param str label: An optional label for the codec. The label can be used to control muxing behavior. :param int sampling_rate: The sampling rate to use for encoding in hertz. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.Audio') if bitrate is not None: pulumi.set(__self__, "bitrate", bitrate) if channels is not None: pulumi.set(__self__, "channels", channels) if label is not None: pulumi.set(__self__, "label", label) if sampling_rate is not None: pulumi.set(__self__, "sampling_rate", sampling_rate) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.Audio'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def bitrate(self) -> Optional[int]: """ The bitrate, in bits per second, of the output encoded audio. """ return pulumi.get(self, "bitrate") @property @pulumi.getter def channels(self) -> Optional[int]: """ The number of channels in the audio. """ return pulumi.get(self, "channels") @property @pulumi.getter def label(self) -> Optional[str]: """ An optional label for the codec. The label can be used to control muxing behavior. """ return pulumi.get(self, "label") @property @pulumi.getter(name="samplingRate") def sampling_rate(self) -> Optional[int]: """ The sampling rate to use for encoding in hertz. """ return pulumi.get(self, "sampling_rate") @pulumi.output_type class BuiltInStandardEncoderPresetResponse(dict): """ Describes a built-in preset for encoding the input video with the Standard Encoder. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "presetName": suggest = "preset_name" if suggest: pulumi.log.warn(f"Key '{key}' not found in BuiltInStandardEncoderPresetResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: BuiltInStandardEncoderPresetResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: BuiltInStandardEncoderPresetResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, preset_name: str): """ Describes a built-in preset for encoding the input video with the Standard Encoder. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.BuiltInStandardEncoderPreset'. :param str preset_name: The built-in preset to be used for encoding videos. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.BuiltInStandardEncoderPreset') pulumi.set(__self__, "preset_name", preset_name) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.BuiltInStandardEncoderPreset'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="presetName") def preset_name(self) -> str: """ The built-in preset to be used for encoding videos. """ return pulumi.get(self, "preset_name") @pulumi.output_type class CbcsDrmConfigurationResponse(dict): """ Class to specify drm configurations of CommonEncryptionCbcs scheme in Streaming Policy """ @staticmethod def __key_warning(key: str): suggest = None if key == "fairPlay": suggest = "fair_play" elif key == "playReady": suggest = "play_ready" if suggest: pulumi.log.warn(f"Key '{key}' not found in CbcsDrmConfigurationResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: CbcsDrmConfigurationResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: CbcsDrmConfigurationResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, fair_play: Optional['outputs.StreamingPolicyFairPlayConfigurationResponse'] = None, play_ready: Optional['outputs.StreamingPolicyPlayReadyConfigurationResponse'] = None, widevine: Optional['outputs.StreamingPolicyWidevineConfigurationResponse'] = None): """ Class to specify drm configurations of CommonEncryptionCbcs scheme in Streaming Policy :param 'StreamingPolicyFairPlayConfigurationResponse' fair_play: Fairplay configurations :param 'StreamingPolicyPlayReadyConfigurationResponse' play_ready: PlayReady configurations :param 'StreamingPolicyWidevineConfigurationResponse' widevine: Widevine configurations """ if fair_play is not None: pulumi.set(__self__, "fair_play", fair_play) if play_ready is not None: pulumi.set(__self__, "play_ready", play_ready) if widevine is not None: pulumi.set(__self__, "widevine", widevine) @property @pulumi.getter(name="fairPlay") def fair_play(self) -> Optional['outputs.StreamingPolicyFairPlayConfigurationResponse']: """ Fairplay configurations """ return pulumi.get(self, "fair_play") @property @pulumi.getter(name="playReady") def play_ready(self) -> Optional['outputs.StreamingPolicyPlayReadyConfigurationResponse']: """ PlayReady configurations """ return pulumi.get(self, "play_ready") @property @pulumi.getter def widevine(self) -> Optional['outputs.StreamingPolicyWidevineConfigurationResponse']: """ Widevine configurations """ return pulumi.get(self, "widevine") @pulumi.output_type class CencDrmConfigurationResponse(dict): """ Class to specify drm configurations of CommonEncryptionCenc scheme in Streaming Policy """ @staticmethod def __key_warning(key: str): suggest = None if key == "playReady": suggest = "play_ready" if suggest: pulumi.log.warn(f"Key '{key}' not found in CencDrmConfigurationResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: CencDrmConfigurationResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: CencDrmConfigurationResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, play_ready: Optional['outputs.StreamingPolicyPlayReadyConfigurationResponse'] = None, widevine: Optional['outputs.StreamingPolicyWidevineConfigurationResponse'] = None): """ Class to specify drm configurations of CommonEncryptionCenc scheme in Streaming Policy :param 'StreamingPolicyPlayReadyConfigurationResponse' play_ready: PlayReady configurations :param 'StreamingPolicyWidevineConfigurationResponse' widevine: Widevine configurations """ if play_ready is not None: pulumi.set(__self__, "play_ready", play_ready) if widevine is not None: pulumi.set(__self__, "widevine", widevine) @property @pulumi.getter(name="playReady") def play_ready(self) -> Optional['outputs.StreamingPolicyPlayReadyConfigurationResponse']: """ PlayReady configurations """ return pulumi.get(self, "play_ready") @property @pulumi.getter def widevine(self) -> Optional['outputs.StreamingPolicyWidevineConfigurationResponse']: """ Widevine configurations """ return pulumi.get(self, "widevine") @pulumi.output_type class CommonEncryptionCbcsResponse(dict): """ Class for CommonEncryptionCbcs encryption scheme """ @staticmethod def __key_warning(key: str): suggest = None if key == "clearTracks": suggest = "clear_tracks" elif key == "contentKeys": suggest = "content_keys" elif key == "enabledProtocols": suggest = "enabled_protocols" if suggest: pulumi.log.warn(f"Key '{key}' not found in CommonEncryptionCbcsResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: CommonEncryptionCbcsResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: CommonEncryptionCbcsResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, clear_tracks: Optional[Sequence['outputs.TrackSelectionResponse']] = None, content_keys: Optional['outputs.StreamingPolicyContentKeysResponse'] = None, drm: Optional['outputs.CbcsDrmConfigurationResponse'] = None, enabled_protocols: Optional['outputs.EnabledProtocolsResponse'] = None): """ Class for CommonEncryptionCbcs encryption scheme :param Sequence['TrackSelectionResponse'] clear_tracks: Representing which tracks should not be encrypted :param 'StreamingPolicyContentKeysResponse' content_keys: Representing default content key for each encryption scheme and separate content keys for specific tracks :param 'CbcsDrmConfigurationResponse' drm: Configuration of DRMs for current encryption scheme :param 'EnabledProtocolsResponse' enabled_protocols: Representing supported protocols """ if clear_tracks is not None: pulumi.set(__self__, "clear_tracks", clear_tracks) if content_keys is not None: pulumi.set(__self__, "content_keys", content_keys) if drm is not None: pulumi.set(__self__, "drm", drm) if enabled_protocols is not None: pulumi.set(__self__, "enabled_protocols", enabled_protocols) @property @pulumi.getter(name="clearTracks") def clear_tracks(self) -> Optional[Sequence['outputs.TrackSelectionResponse']]: """ Representing which tracks should not be encrypted """ return pulumi.get(self, "clear_tracks") @property @pulumi.getter(name="contentKeys") def content_keys(self) -> Optional['outputs.StreamingPolicyContentKeysResponse']: """ Representing default content key for each encryption scheme and separate content keys for specific tracks """ return pulumi.get(self, "content_keys") @property @pulumi.getter def drm(self) -> Optional['outputs.CbcsDrmConfigurationResponse']: """ Configuration of DRMs for current encryption scheme """ return pulumi.get(self, "drm") @property @pulumi.getter(name="enabledProtocols") def enabled_protocols(self) -> Optional['outputs.EnabledProtocolsResponse']: """ Representing supported protocols """ return pulumi.get(self, "enabled_protocols") @pulumi.output_type class CommonEncryptionCencResponse(dict): """ Class for envelope encryption scheme """ @staticmethod def __key_warning(key: str): suggest = None if key == "clearTracks": suggest = "clear_tracks" elif key == "contentKeys": suggest = "content_keys" elif key == "enabledProtocols": suggest = "enabled_protocols" if suggest: pulumi.log.warn(f"Key '{key}' not found in CommonEncryptionCencResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: CommonEncryptionCencResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: CommonEncryptionCencResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, clear_tracks: Optional[Sequence['outputs.TrackSelectionResponse']] = None, content_keys: Optional['outputs.StreamingPolicyContentKeysResponse'] = None, drm: Optional['outputs.CencDrmConfigurationResponse'] = None, enabled_protocols: Optional['outputs.EnabledProtocolsResponse'] = None): """ Class for envelope encryption scheme :param Sequence['TrackSelectionResponse'] clear_tracks: Representing which tracks should not be encrypted :param 'StreamingPolicyContentKeysResponse' content_keys: Representing default content key for each encryption scheme and separate content keys for specific tracks :param 'CencDrmConfigurationResponse' drm: Configuration of DRMs for CommonEncryptionCenc encryption scheme :param 'EnabledProtocolsResponse' enabled_protocols: Representing supported protocols """ if clear_tracks is not None: pulumi.set(__self__, "clear_tracks", clear_tracks) if content_keys is not None: pulumi.set(__self__, "content_keys", content_keys) if drm is not None: pulumi.set(__self__, "drm", drm) if enabled_protocols is not None: pulumi.set(__self__, "enabled_protocols", enabled_protocols) @property @pulumi.getter(name="clearTracks") def clear_tracks(self) -> Optional[Sequence['outputs.TrackSelectionResponse']]: """ Representing which tracks should not be encrypted """ return pulumi.get(self, "clear_tracks") @property @pulumi.getter(name="contentKeys") def content_keys(self) -> Optional['outputs.StreamingPolicyContentKeysResponse']: """ Representing default content key for each encryption scheme and separate content keys for specific tracks """ return pulumi.get(self, "content_keys") @property @pulumi.getter def drm(self) -> Optional['outputs.CencDrmConfigurationResponse']: """ Configuration of DRMs for CommonEncryptionCenc encryption scheme """ return pulumi.get(self, "drm") @property @pulumi.getter(name="enabledProtocols") def enabled_protocols(self) -> Optional['outputs.EnabledProtocolsResponse']: """ Representing supported protocols """ return pulumi.get(self, "enabled_protocols") @pulumi.output_type class ContentKeyPolicyClearKeyConfigurationResponse(dict): """ Represents a configuration for non-DRM keys. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyClearKeyConfigurationResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyClearKeyConfigurationResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyClearKeyConfigurationResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str): """ Represents a configuration for non-DRM keys. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration'. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration') @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration'. """ return pulumi.get(self, "odata_type") @pulumi.output_type class ContentKeyPolicyFairPlayConfigurationResponse(dict): """ Specifies a configuration for FairPlay licenses. """ @staticmethod def __key_warning(key: str): suggest = None if key == "fairPlayPfx": suggest = "fair_play_pfx" elif key == "fairPlayPfxPassword": suggest = "fair_play_pfx_password" elif key == "odataType": suggest = "odata_type" elif key == "rentalAndLeaseKeyType": suggest = "rental_and_lease_key_type" elif key == "rentalDuration": suggest = "rental_duration" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyFairPlayConfigurationResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyFairPlayConfigurationResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyFairPlayConfigurationResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, ask: str, fair_play_pfx: str, fair_play_pfx_password: str, odata_type: str, rental_and_lease_key_type: str, rental_duration: float): """ Specifies a configuration for FairPlay licenses. :param str ask: The key that must be used as FairPlay ASk. :param str fair_play_pfx: The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key). :param str fair_play_pfx_password: The password encrypting FairPlay certificate in PKCS 12 (pfx) format. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration'. :param str rental_and_lease_key_type: The rental and lease key type. :param float rental_duration: The rental duration. Must be greater than or equal to 0. """ pulumi.set(__self__, "ask", ask) pulumi.set(__self__, "fair_play_pfx", fair_play_pfx) pulumi.set(__self__, "fair_play_pfx_password", fair_play_pfx_password) pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration') pulumi.set(__self__, "rental_and_lease_key_type", rental_and_lease_key_type) pulumi.set(__self__, "rental_duration", rental_duration) @property @pulumi.getter def ask(self) -> str: """ The key that must be used as FairPlay ASk. """ return pulumi.get(self, "ask") @property @pulumi.getter(name="fairPlayPfx") def fair_play_pfx(self) -> str: """ The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key). """ return pulumi.get(self, "fair_play_pfx") @property @pulumi.getter(name="fairPlayPfxPassword") def fair_play_pfx_password(self) -> str: """ The password encrypting FairPlay certificate in PKCS 12 (pfx) format. """ return pulumi.get(self, "fair_play_pfx_password") @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="rentalAndLeaseKeyType") def rental_and_lease_key_type(self) -> str: """ The rental and lease key type. """ return pulumi.get(self, "rental_and_lease_key_type") @property @pulumi.getter(name="rentalDuration") def rental_duration(self) -> float: """ The rental duration. Must be greater than or equal to 0. """ return pulumi.get(self, "rental_duration") @pulumi.output_type class ContentKeyPolicyOpenRestrictionResponse(dict): """ Represents an open restriction. License or key will be delivered on every request. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyOpenRestrictionResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyOpenRestrictionResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyOpenRestrictionResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str): """ Represents an open restriction. License or key will be delivered on every request. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyOpenRestriction'. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyOpenRestriction') @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyOpenRestriction'. """ return pulumi.get(self, "odata_type") @pulumi.output_type class ContentKeyPolicyOptionResponse(dict): """ Represents a policy option. """ @staticmethod def __key_warning(key: str): suggest = None if key == "policyOptionId": suggest = "policy_option_id" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyOptionResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyOptionResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyOptionResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, configuration: Any, policy_option_id: str, restriction: Any, name: Optional[str] = None): """ Represents a policy option. :param Union['ContentKeyPolicyClearKeyConfigurationResponse', 'ContentKeyPolicyFairPlayConfigurationResponse', 'ContentKeyPolicyPlayReadyConfigurationResponse', 'ContentKeyPolicyUnknownConfigurationResponse', 'ContentKeyPolicyWidevineConfigurationResponse'] configuration: The key delivery configuration. :param str policy_option_id: The legacy Policy Option ID. :param Union['ContentKeyPolicyOpenRestrictionResponse', 'ContentKeyPolicyTokenRestrictionResponse', 'ContentKeyPolicyUnknownRestrictionResponse'] restriction: The requirements that must be met to deliver keys with this configuration :param str name: The Policy Option description. """ pulumi.set(__self__, "configuration", configuration) pulumi.set(__self__, "policy_option_id", policy_option_id) pulumi.set(__self__, "restriction", restriction) if name is not None: pulumi.set(__self__, "name", name) @property @pulumi.getter def configuration(self) -> Any: """ The key delivery configuration. """ return pulumi.get(self, "configuration") @property @pulumi.getter(name="policyOptionId") def policy_option_id(self) -> str: """ The legacy Policy Option ID. """ return pulumi.get(self, "policy_option_id") @property @pulumi.getter def restriction(self) -> Any: """ The requirements that must be met to deliver keys with this configuration """ return pulumi.get(self, "restriction") @property @pulumi.getter def name(self) -> Optional[str]: """ The Policy Option description. """ return pulumi.get(self, "name") @pulumi.output_type class ContentKeyPolicyPlayReadyConfigurationResponse(dict): """ Specifies a configuration for PlayReady licenses. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "responseCustomData": suggest = "response_custom_data" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyPlayReadyConfigurationResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyPlayReadyConfigurationResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyPlayReadyConfigurationResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, licenses: Sequence['outputs.ContentKeyPolicyPlayReadyLicenseResponse'], odata_type: str, response_custom_data: Optional[str] = None): """ Specifies a configuration for PlayReady licenses. :param Sequence['ContentKeyPolicyPlayReadyLicenseResponse'] licenses: The PlayReady licenses. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration'. :param str response_custom_data: The custom response data. """ pulumi.set(__self__, "licenses", licenses) pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration') if response_custom_data is not None: pulumi.set(__self__, "response_custom_data", response_custom_data) @property @pulumi.getter def licenses(self) -> Sequence['outputs.ContentKeyPolicyPlayReadyLicenseResponse']: """ The PlayReady licenses. """ return pulumi.get(self, "licenses") @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="responseCustomData") def response_custom_data(self) -> Optional[str]: """ The custom response data. """ return pulumi.get(self, "response_custom_data") @pulumi.output_type class ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeaderResponse(dict): """ Specifies that the content key ID is in the PlayReady header. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeaderResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeaderResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeaderResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str): """ Specifies that the content key ID is in the PlayReady header. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader'. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader') @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader'. """ return pulumi.get(self, "odata_type") @pulumi.output_type class ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifierResponse(dict): """ Specifies that the content key ID is specified in the PlayReady configuration. """ @staticmethod def __key_warning(key: str): suggest = None if key == "keyId": suggest = "key_id" elif key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifierResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifierResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifierResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, key_id: str, odata_type: str): """ Specifies that the content key ID is specified in the PlayReady configuration. :param str key_id: The content key ID. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier'. """ pulumi.set(__self__, "key_id", key_id) pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier') @property @pulumi.getter(name="keyId") def key_id(self) -> str: """ The content key ID. """ return pulumi.get(self, "key_id") @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier'. """ return pulumi.get(self, "odata_type") @pulumi.output_type class ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionResponse(dict): """ Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady Compliance Rules. """ @staticmethod def __key_warning(key: str): suggest = None if key == "bestEffort": suggest = "best_effort" elif key == "configurationData": suggest = "configuration_data" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, best_effort: bool, configuration_data: int): """ Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady Compliance Rules. :param bool best_effort: Indicates whether this restriction is enforced on a Best Effort basis. :param int configuration_data: Configures the restriction control bits. Must be between 0 and 3 inclusive. """ pulumi.set(__self__, "best_effort", best_effort) pulumi.set(__self__, "configuration_data", configuration_data) @property @pulumi.getter(name="bestEffort") def best_effort(self) -> bool: """ Indicates whether this restriction is enforced on a Best Effort basis. """ return pulumi.get(self, "best_effort") @property @pulumi.getter(name="configurationData") def configuration_data(self) -> int: """ Configures the restriction control bits. Must be between 0 and 3 inclusive. """ return pulumi.get(self, "configuration_data") @pulumi.output_type class ContentKeyPolicyPlayReadyLicenseResponse(dict): """ The PlayReady license """ @staticmethod def __key_warning(key: str): suggest = None if key == "allowTestDevices": suggest = "allow_test_devices" elif key == "contentKeyLocation": suggest = "content_key_location" elif key == "contentType": suggest = "content_type" elif key == "licenseType": suggest = "license_type" elif key == "beginDate": suggest = "begin_date" elif key == "expirationDate": suggest = "expiration_date" elif key == "gracePeriod": suggest = "grace_period" elif key == "playRight": suggest = "play_right" elif key == "relativeBeginDate": suggest = "relative_begin_date" elif key == "relativeExpirationDate": suggest = "relative_expiration_date" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyPlayReadyLicenseResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyPlayReadyLicenseResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyPlayReadyLicenseResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, allow_test_devices: bool, content_key_location: Any, content_type: str, license_type: str, begin_date: Optional[str] = None, expiration_date: Optional[str] = None, grace_period: Optional[str] = None, play_right: Optional['outputs.ContentKeyPolicyPlayReadyPlayRightResponse'] = None, relative_begin_date: Optional[str] = None, relative_expiration_date: Optional[str] = None): """ The PlayReady license :param bool allow_test_devices: A flag indicating whether test devices can use the license. :param Union['ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeaderResponse', 'ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifierResponse'] content_key_location: The content key location. :param str content_type: The PlayReady content type. :param str license_type: The license type. :param str begin_date: The begin date of license :param str expiration_date: The expiration date of license. :param str grace_period: The grace period of license. :param 'ContentKeyPolicyPlayReadyPlayRightResponse' play_right: The license PlayRight :param str relative_begin_date: The relative begin date of license. :param str relative_expiration_date: The relative expiration date of license. """ pulumi.set(__self__, "allow_test_devices", allow_test_devices) pulumi.set(__self__, "content_key_location", content_key_location) pulumi.set(__self__, "content_type", content_type) pulumi.set(__self__, "license_type", license_type) if begin_date is not None: pulumi.set(__self__, "begin_date", begin_date) if expiration_date is not None: pulumi.set(__self__, "expiration_date", expiration_date) if grace_period is not None: pulumi.set(__self__, "grace_period", grace_period) if play_right is not None: pulumi.set(__self__, "play_right", play_right) if relative_begin_date is not None: pulumi.set(__self__, "relative_begin_date", relative_begin_date) if relative_expiration_date is not None: pulumi.set(__self__, "relative_expiration_date", relative_expiration_date) @property @pulumi.getter(name="allowTestDevices") def allow_test_devices(self) -> bool: """ A flag indicating whether test devices can use the license. """ return pulumi.get(self, "allow_test_devices") @property @pulumi.getter(name="contentKeyLocation") def content_key_location(self) -> Any: """ The content key location. """ return pulumi.get(self, "content_key_location") @property @pulumi.getter(name="contentType") def content_type(self) -> str: """ The PlayReady content type. """ return pulumi.get(self, "content_type") @property @pulumi.getter(name="licenseType") def license_type(self) -> str: """ The license type. """ return pulumi.get(self, "license_type") @property @pulumi.getter(name="beginDate") def begin_date(self) -> Optional[str]: """ The begin date of license """ return pulumi.get(self, "begin_date") @property @pulumi.getter(name="expirationDate") def expiration_date(self) -> Optional[str]: """ The expiration date of license. """ return pulumi.get(self, "expiration_date") @property @pulumi.getter(name="gracePeriod") def grace_period(self) -> Optional[str]: """ The grace period of license. """ return pulumi.get(self, "grace_period") @property @pulumi.getter(name="playRight") def play_right(self) -> Optional['outputs.ContentKeyPolicyPlayReadyPlayRightResponse']: """ The license PlayRight """ return pulumi.get(self, "play_right") @property @pulumi.getter(name="relativeBeginDate") def relative_begin_date(self) -> Optional[str]: """ The relative begin date of license. """ return pulumi.get(self, "relative_begin_date") @property @pulumi.getter(name="relativeExpirationDate") def relative_expiration_date(self) -> Optional[str]: """ The relative expiration date of license. """ return pulumi.get(self, "relative_expiration_date") @pulumi.output_type class ContentKeyPolicyPlayReadyPlayRightResponse(dict): """ Configures the Play Right in the PlayReady license. """ @staticmethod def __key_warning(key: str): suggest = None if key == "allowPassingVideoContentToUnknownOutput": suggest = "allow_passing_video_content_to_unknown_output" elif key == "digitalVideoOnlyContentRestriction": suggest = "digital_video_only_content_restriction" elif key == "imageConstraintForAnalogComponentVideoRestriction": suggest = "image_constraint_for_analog_component_video_restriction" elif key == "imageConstraintForAnalogComputerMonitorRestriction": suggest = "image_constraint_for_analog_computer_monitor_restriction" elif key == "agcAndColorStripeRestriction": suggest = "agc_and_color_stripe_restriction" elif key == "analogVideoOpl": suggest = "analog_video_opl" elif key == "compressedDigitalAudioOpl": suggest = "compressed_digital_audio_opl" elif key == "compressedDigitalVideoOpl": suggest = "compressed_digital_video_opl" elif key == "explicitAnalogTelevisionOutputRestriction": suggest = "explicit_analog_television_output_restriction" elif key == "firstPlayExpiration": suggest = "first_play_expiration" elif key == "scmsRestriction": suggest = "scms_restriction" elif key == "uncompressedDigitalAudioOpl": suggest = "uncompressed_digital_audio_opl" elif key == "uncompressedDigitalVideoOpl": suggest = "uncompressed_digital_video_opl" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyPlayReadyPlayRightResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyPlayReadyPlayRightResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyPlayReadyPlayRightResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, allow_passing_video_content_to_unknown_output: str, digital_video_only_content_restriction: bool, image_constraint_for_analog_component_video_restriction: bool, image_constraint_for_analog_computer_monitor_restriction: bool, agc_and_color_stripe_restriction: Optional[int] = None, analog_video_opl: Optional[int] = None, compressed_digital_audio_opl: Optional[int] = None, compressed_digital_video_opl: Optional[int] = None, explicit_analog_television_output_restriction: Optional['outputs.ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionResponse'] = None, first_play_expiration: Optional[str] = None, scms_restriction: Optional[int] = None, uncompressed_digital_audio_opl: Optional[int] = None, uncompressed_digital_video_opl: Optional[int] = None): """ Configures the Play Right in the PlayReady license. :param str allow_passing_video_content_to_unknown_output: Configures Unknown output handling settings of the license. :param bool digital_video_only_content_restriction: Enables the Image Constraint For Analog Component Video Restriction in the license. :param bool image_constraint_for_analog_component_video_restriction: Enables the Image Constraint For Analog Component Video Restriction in the license. :param bool image_constraint_for_analog_computer_monitor_restriction: Enables the Image Constraint For Analog Component Video Restriction in the license. :param int agc_and_color_stripe_restriction: Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive. :param int analog_video_opl: Specifies the output protection level for compressed digital audio. :param int compressed_digital_audio_opl: Specifies the output protection level for compressed digital audio. :param int compressed_digital_video_opl: Specifies the output protection level for compressed digital video. :param 'ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionResponse' explicit_analog_television_output_restriction: Configures the Explicit Analog Television Output Restriction in the license. Configuration data must be between 0 and 3 inclusive. :param str first_play_expiration: The amount of time that the license is valid after the license is first used to play content. :param int scms_restriction: Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive. :param int uncompressed_digital_audio_opl: Specifies the output protection level for uncompressed digital audio. :param int uncompressed_digital_video_opl: Specifies the output protection level for uncompressed digital video. """ pulumi.set(__self__, "allow_passing_video_content_to_unknown_output", allow_passing_video_content_to_unknown_output) pulumi.set(__self__, "digital_video_only_content_restriction", digital_video_only_content_restriction) pulumi.set(__self__, "image_constraint_for_analog_component_video_restriction", image_constraint_for_analog_component_video_restriction) pulumi.set(__self__, "image_constraint_for_analog_computer_monitor_restriction", image_constraint_for_analog_computer_monitor_restriction) if agc_and_color_stripe_restriction is not None: pulumi.set(__self__, "agc_and_color_stripe_restriction", agc_and_color_stripe_restriction) if analog_video_opl is not None: pulumi.set(__self__, "analog_video_opl", analog_video_opl) if compressed_digital_audio_opl is not None: pulumi.set(__self__, "compressed_digital_audio_opl", compressed_digital_audio_opl) if compressed_digital_video_opl is not None: pulumi.set(__self__, "compressed_digital_video_opl", compressed_digital_video_opl) if explicit_analog_television_output_restriction is not None: pulumi.set(__self__, "explicit_analog_television_output_restriction", explicit_analog_television_output_restriction) if first_play_expiration is not None: pulumi.set(__self__, "first_play_expiration", first_play_expiration) if scms_restriction is not None: pulumi.set(__self__, "scms_restriction", scms_restriction) if uncompressed_digital_audio_opl is not None: pulumi.set(__self__, "uncompressed_digital_audio_opl", uncompressed_digital_audio_opl) if uncompressed_digital_video_opl is not None: pulumi.set(__self__, "uncompressed_digital_video_opl", uncompressed_digital_video_opl) @property @pulumi.getter(name="allowPassingVideoContentToUnknownOutput") def allow_passing_video_content_to_unknown_output(self) -> str: """ Configures Unknown output handling settings of the license. """ return pulumi.get(self, "allow_passing_video_content_to_unknown_output") @property @pulumi.getter(name="digitalVideoOnlyContentRestriction") def digital_video_only_content_restriction(self) -> bool: """ Enables the Image Constraint For Analog Component Video Restriction in the license. """ return pulumi.get(self, "digital_video_only_content_restriction") @property @pulumi.getter(name="imageConstraintForAnalogComponentVideoRestriction") def image_constraint_for_analog_component_video_restriction(self) -> bool: """ Enables the Image Constraint For Analog Component Video Restriction in the license. """ return pulumi.get(self, "image_constraint_for_analog_component_video_restriction") @property @pulumi.getter(name="imageConstraintForAnalogComputerMonitorRestriction") def image_constraint_for_analog_computer_monitor_restriction(self) -> bool: """ Enables the Image Constraint For Analog Component Video Restriction in the license. """ return pulumi.get(self, "image_constraint_for_analog_computer_monitor_restriction") @property @pulumi.getter(name="agcAndColorStripeRestriction") def agc_and_color_stripe_restriction(self) -> Optional[int]: """ Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive. """ return pulumi.get(self, "agc_and_color_stripe_restriction") @property @pulumi.getter(name="analogVideoOpl") def analog_video_opl(self) -> Optional[int]: """ Specifies the output protection level for compressed digital audio. """ return pulumi.get(self, "analog_video_opl") @property @pulumi.getter(name="compressedDigitalAudioOpl") def compressed_digital_audio_opl(self) -> Optional[int]: """ Specifies the output protection level for compressed digital audio. """ return pulumi.get(self, "compressed_digital_audio_opl") @property @pulumi.getter(name="compressedDigitalVideoOpl") def compressed_digital_video_opl(self) -> Optional[int]: """ Specifies the output protection level for compressed digital video. """ return pulumi.get(self, "compressed_digital_video_opl") @property @pulumi.getter(name="explicitAnalogTelevisionOutputRestriction") def explicit_analog_television_output_restriction(self) -> Optional['outputs.ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestrictionResponse']: """ Configures the Explicit Analog Television Output Restriction in the license. Configuration data must be between 0 and 3 inclusive. """ return pulumi.get(self, "explicit_analog_television_output_restriction") @property @pulumi.getter(name="firstPlayExpiration") def first_play_expiration(self) -> Optional[str]: """ The amount of time that the license is valid after the license is first used to play content. """ return pulumi.get(self, "first_play_expiration") @property @pulumi.getter(name="scmsRestriction") def scms_restriction(self) -> Optional[int]: """ Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive. """ return pulumi.get(self, "scms_restriction") @property @pulumi.getter(name="uncompressedDigitalAudioOpl") def uncompressed_digital_audio_opl(self) -> Optional[int]: """ Specifies the output protection level for uncompressed digital audio. """ return pulumi.get(self, "uncompressed_digital_audio_opl") @property @pulumi.getter(name="uncompressedDigitalVideoOpl") def uncompressed_digital_video_opl(self) -> Optional[int]: """ Specifies the output protection level for uncompressed digital video. """ return pulumi.get(self, "uncompressed_digital_video_opl") @pulumi.output_type class ContentKeyPolicyRsaTokenKeyResponse(dict): """ Specifies a RSA key for token validation """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyRsaTokenKeyResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyRsaTokenKeyResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyRsaTokenKeyResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, exponent: str, modulus: str, odata_type: str): """ Specifies a RSA key for token validation :param str exponent: The RSA Parameter exponent :param str modulus: The RSA Parameter modulus :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyRsaTokenKey'. """ pulumi.set(__self__, "exponent", exponent) pulumi.set(__self__, "modulus", modulus) pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyRsaTokenKey') @property @pulumi.getter def exponent(self) -> str: """ The RSA Parameter exponent """ return pulumi.get(self, "exponent") @property @pulumi.getter def modulus(self) -> str: """ The RSA Parameter modulus """ return pulumi.get(self, "modulus") @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyRsaTokenKey'. """ return pulumi.get(self, "odata_type") @pulumi.output_type class ContentKeyPolicySymmetricTokenKeyResponse(dict): """ Specifies a symmetric key for token validation. """ @staticmethod def __key_warning(key: str): suggest = None if key == "keyValue": suggest = "key_value" elif key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicySymmetricTokenKeyResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicySymmetricTokenKeyResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicySymmetricTokenKeyResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, key_value: str, odata_type: str): """ Specifies a symmetric key for token validation. :param str key_value: The key value of the key :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicySymmetricTokenKey'. """ pulumi.set(__self__, "key_value", key_value) pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicySymmetricTokenKey') @property @pulumi.getter(name="keyValue") def key_value(self) -> str: """ The key value of the key """ return pulumi.get(self, "key_value") @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicySymmetricTokenKey'. """ return pulumi.get(self, "odata_type") @pulumi.output_type class ContentKeyPolicyTokenClaimResponse(dict): """ Represents a token claim. """ @staticmethod def __key_warning(key: str): suggest = None if key == "claimType": suggest = "claim_type" elif key == "claimValue": suggest = "claim_value" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyTokenClaimResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyTokenClaimResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyTokenClaimResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, claim_type: Optional[str] = None, claim_value: Optional[str] = None): """ Represents a token claim. :param str claim_type: Token claim type. :param str claim_value: Token claim value. """ if claim_type is not None: pulumi.set(__self__, "claim_type", claim_type) if claim_value is not None: pulumi.set(__self__, "claim_value", claim_value) @property @pulumi.getter(name="claimType") def claim_type(self) -> Optional[str]: """ Token claim type. """ return pulumi.get(self, "claim_type") @property @pulumi.getter(name="claimValue") def claim_value(self) -> Optional[str]: """ Token claim value. """ return pulumi.get(self, "claim_value") @pulumi.output_type class ContentKeyPolicyTokenRestrictionResponse(dict): """ Represents a token restriction. Provided token must match these requirements for successful license or key delivery. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "primaryVerificationKey": suggest = "primary_verification_key" elif key == "restrictionTokenType": suggest = "restriction_token_type" elif key == "alternateVerificationKeys": suggest = "alternate_verification_keys" elif key == "openIdConnectDiscoveryDocument": suggest = "open_id_connect_discovery_document" elif key == "requiredClaims": suggest = "required_claims" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyTokenRestrictionResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyTokenRestrictionResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyTokenRestrictionResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, audience: str, issuer: str, odata_type: str, primary_verification_key: Any, restriction_token_type: str, alternate_verification_keys: Optional[Sequence[Any]] = None, open_id_connect_discovery_document: Optional[str] = None, required_claims: Optional[Sequence['outputs.ContentKeyPolicyTokenClaimResponse']] = None): """ Represents a token restriction. Provided token must match these requirements for successful license or key delivery. :param str audience: The audience for the token. :param str issuer: The token issuer. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyTokenRestriction'. :param Union['ContentKeyPolicyRsaTokenKeyResponse', 'ContentKeyPolicySymmetricTokenKeyResponse', 'ContentKeyPolicyX509CertificateTokenKeyResponse'] primary_verification_key: The primary verification key. :param str restriction_token_type: The type of token. :param Sequence[Union['ContentKeyPolicyRsaTokenKeyResponse', 'ContentKeyPolicySymmetricTokenKeyResponse', 'ContentKeyPolicyX509CertificateTokenKeyResponse']] alternate_verification_keys: A list of alternative verification keys. :param str open_id_connect_discovery_document: The OpenID connect discovery document. :param Sequence['ContentKeyPolicyTokenClaimResponse'] required_claims: A list of required token claims. """ pulumi.set(__self__, "audience", audience) pulumi.set(__self__, "issuer", issuer) pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyTokenRestriction') pulumi.set(__self__, "primary_verification_key", primary_verification_key) pulumi.set(__self__, "restriction_token_type", restriction_token_type) if alternate_verification_keys is not None: pulumi.set(__self__, "alternate_verification_keys", alternate_verification_keys) if open_id_connect_discovery_document is not None: pulumi.set(__self__, "open_id_connect_discovery_document", open_id_connect_discovery_document) if required_claims is not None: pulumi.set(__self__, "required_claims", required_claims) @property @pulumi.getter def audience(self) -> str: """ The audience for the token. """ return pulumi.get(self, "audience") @property @pulumi.getter def issuer(self) -> str: """ The token issuer. """ return pulumi.get(self, "issuer") @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyTokenRestriction'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="primaryVerificationKey") def primary_verification_key(self) -> Any: """ The primary verification key. """ return pulumi.get(self, "primary_verification_key") @property @pulumi.getter(name="restrictionTokenType") def restriction_token_type(self) -> str: """ The type of token. """ return pulumi.get(self, "restriction_token_type") @property @pulumi.getter(name="alternateVerificationKeys") def alternate_verification_keys(self) -> Optional[Sequence[Any]]: """ A list of alternative verification keys. """ return pulumi.get(self, "alternate_verification_keys") @property @pulumi.getter(name="openIdConnectDiscoveryDocument") def open_id_connect_discovery_document(self) -> Optional[str]: """ The OpenID connect discovery document. """ return pulumi.get(self, "open_id_connect_discovery_document") @property @pulumi.getter(name="requiredClaims") def required_claims(self) -> Optional[Sequence['outputs.ContentKeyPolicyTokenClaimResponse']]: """ A list of required token claims. """ return pulumi.get(self, "required_claims") @pulumi.output_type class ContentKeyPolicyUnknownConfigurationResponse(dict): """ Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyUnknownConfigurationResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyUnknownConfigurationResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyUnknownConfigurationResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str): """ Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyUnknownConfiguration'. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyUnknownConfiguration') @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyUnknownConfiguration'. """ return pulumi.get(self, "odata_type") @pulumi.output_type class ContentKeyPolicyUnknownRestrictionResponse(dict): """ Represents a ContentKeyPolicyRestriction that is unavailable in the current API version. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyUnknownRestrictionResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyUnknownRestrictionResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyUnknownRestrictionResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str): """ Represents a ContentKeyPolicyRestriction that is unavailable in the current API version. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyUnknownRestriction'. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyUnknownRestriction') @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyUnknownRestriction'. """ return pulumi.get(self, "odata_type") @pulumi.output_type class ContentKeyPolicyWidevineConfigurationResponse(dict): """ Specifies a configuration for Widevine licenses. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "widevineTemplate": suggest = "widevine_template" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyWidevineConfigurationResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyWidevineConfigurationResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyWidevineConfigurationResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, widevine_template: str): """ Specifies a configuration for Widevine licenses. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyWidevineConfiguration'. :param str widevine_template: The Widevine template. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyWidevineConfiguration') pulumi.set(__self__, "widevine_template", widevine_template) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyWidevineConfiguration'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="widevineTemplate") def widevine_template(self) -> str: """ The Widevine template. """ return pulumi.get(self, "widevine_template") @pulumi.output_type class ContentKeyPolicyX509CertificateTokenKeyResponse(dict): """ Specifies a certificate for token validation. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "rawBody": suggest = "raw_body" if suggest: pulumi.log.warn(f"Key '{key}' not found in ContentKeyPolicyX509CertificateTokenKeyResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ContentKeyPolicyX509CertificateTokenKeyResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ContentKeyPolicyX509CertificateTokenKeyResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, raw_body: str): """ Specifies a certificate for token validation. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey'. :param str raw_body: The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET) """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey') pulumi.set(__self__, "raw_body", raw_body) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="rawBody") def raw_body(self) -> str: """ The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET) """ return pulumi.get(self, "raw_body") @pulumi.output_type class CopyAudioResponse(dict): """ A codec flag, which tells the encoder to copy the input audio bitstream. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in CopyAudioResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: CopyAudioResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: CopyAudioResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, label: Optional[str] = None): """ A codec flag, which tells the encoder to copy the input audio bitstream. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.CopyAudio'. :param str label: An optional label for the codec. The label can be used to control muxing behavior. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.CopyAudio') if label is not None: pulumi.set(__self__, "label", label) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.CopyAudio'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def label(self) -> Optional[str]: """ An optional label for the codec. The label can be used to control muxing behavior. """ return pulumi.get(self, "label") @pulumi.output_type class CopyVideoResponse(dict): """ A codec flag, which tells the encoder to copy the input video bitstream without re-encoding. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in CopyVideoResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: CopyVideoResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: CopyVideoResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, label: Optional[str] = None): """ A codec flag, which tells the encoder to copy the input video bitstream without re-encoding. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.CopyVideo'. :param str label: An optional label for the codec. The label can be used to control muxing behavior. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.CopyVideo') if label is not None: pulumi.set(__self__, "label", label) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.CopyVideo'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def label(self) -> Optional[str]: """ An optional label for the codec. The label can be used to control muxing behavior. """ return pulumi.get(self, "label") @pulumi.output_type class CrossSiteAccessPoliciesResponse(dict): """ The client access policy. """ @staticmethod def __key_warning(key: str): suggest = None if key == "clientAccessPolicy": suggest = "client_access_policy" elif key == "crossDomainPolicy": suggest = "cross_domain_policy" if suggest: pulumi.log.warn(f"Key '{key}' not found in CrossSiteAccessPoliciesResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: CrossSiteAccessPoliciesResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: CrossSiteAccessPoliciesResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, client_access_policy: Optional[str] = None, cross_domain_policy: Optional[str] = None): """ The client access policy. :param str client_access_policy: The content of clientaccesspolicy.xml used by Silverlight. :param str cross_domain_policy: The content of crossdomain.xml used by Silverlight. """ if client_access_policy is not None: pulumi.set(__self__, "client_access_policy", client_access_policy) if cross_domain_policy is not None: pulumi.set(__self__, "cross_domain_policy", cross_domain_policy) @property @pulumi.getter(name="clientAccessPolicy") def client_access_policy(self) -> Optional[str]: """ The content of clientaccesspolicy.xml used by Silverlight. """ return pulumi.get(self, "client_access_policy") @property @pulumi.getter(name="crossDomainPolicy") def cross_domain_policy(self) -> Optional[str]: """ The content of crossdomain.xml used by Silverlight. """ return pulumi.get(self, "cross_domain_policy") @pulumi.output_type class DefaultKeyResponse(dict): """ Class to specify properties of default content key for each encryption scheme """ @staticmethod def __key_warning(key: str): suggest = None if key == "policyName": suggest = "policy_name" if suggest: pulumi.log.warn(f"Key '{key}' not found in DefaultKeyResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: DefaultKeyResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: DefaultKeyResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, label: Optional[str] = None, policy_name: Optional[str] = None): """ Class to specify properties of default content key for each encryption scheme :param str label: Label can be used to specify Content Key when creating Streaming Locator :param str policy_name: Policy used by Default Key """ if label is not None: pulumi.set(__self__, "label", label) if policy_name is not None: pulumi.set(__self__, "policy_name", policy_name) @property @pulumi.getter def label(self) -> Optional[str]: """ Label can be used to specify Content Key when creating Streaming Locator """ return pulumi.get(self, "label") @property @pulumi.getter(name="policyName") def policy_name(self) -> Optional[str]: """ Policy used by Default Key """ return pulumi.get(self, "policy_name") @pulumi.output_type class DeinterlaceResponse(dict): """ Describes the de-interlacing settings. """ def __init__(__self__, *, mode: Optional[str] = None, parity: Optional[str] = None): """ Describes the de-interlacing settings. :param str mode: The deinterlacing mode. Defaults to AutoPixelAdaptive. :param str parity: The field parity for de-interlacing, defaults to Auto. """ if mode is not None: pulumi.set(__self__, "mode", mode) if parity is not None: pulumi.set(__self__, "parity", parity) @property @pulumi.getter def mode(self) -> Optional[str]: """ The deinterlacing mode. Defaults to AutoPixelAdaptive. """ return pulumi.get(self, "mode") @property @pulumi.getter def parity(self) -> Optional[str]: """ The field parity for de-interlacing, defaults to Auto. """ return pulumi.get(self, "parity") @pulumi.output_type class EnabledProtocolsResponse(dict): """ Class to specify which protocols are enabled """ @staticmethod def __key_warning(key: str): suggest = None if key == "smoothStreaming": suggest = "smooth_streaming" if suggest: pulumi.log.warn(f"Key '{key}' not found in EnabledProtocolsResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: EnabledProtocolsResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: EnabledProtocolsResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, dash: bool, download: bool, hls: bool, smooth_streaming: bool): """ Class to specify which protocols are enabled :param bool dash: Enable Dash protocol or not :param bool download: Enable Download protocol or not :param bool hls: Enable Hls protocol or not :param bool smooth_streaming: Enable SmoothStreaming protocol or not """ pulumi.set(__self__, "dash", dash) pulumi.set(__self__, "download", download) pulumi.set(__self__, "hls", hls) pulumi.set(__self__, "smooth_streaming", smooth_streaming) @property @pulumi.getter def dash(self) -> bool: """ Enable Dash protocol or not """ return pulumi.get(self, "dash") @property @pulumi.getter def download(self) -> bool: """ Enable Download protocol or not """ return pulumi.get(self, "download") @property @pulumi.getter def hls(self) -> bool: """ Enable Hls protocol or not """ return pulumi.get(self, "hls") @property @pulumi.getter(name="smoothStreaming") def smooth_streaming(self) -> bool: """ Enable SmoothStreaming protocol or not """ return pulumi.get(self, "smooth_streaming") @pulumi.output_type class EnvelopeEncryptionResponse(dict): """ Class for EnvelopeEncryption encryption scheme """ @staticmethod def __key_warning(key: str): suggest = None if key == "clearTracks": suggest = "clear_tracks" elif key == "contentKeys": suggest = "content_keys" elif key == "customLicenseAcquisitionUrlTemplate": suggest = "custom_license_acquisition_url_template" elif key == "enabledProtocols": suggest = "enabled_protocols" if suggest: pulumi.log.warn(f"Key '{key}' not found in EnvelopeEncryptionResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: EnvelopeEncryptionResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: EnvelopeEncryptionResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, clear_tracks: Optional[Sequence['outputs.TrackSelectionResponse']] = None, content_keys: Optional['outputs.StreamingPolicyContentKeysResponse'] = None, custom_license_acquisition_url_template: Optional[str] = None, enabled_protocols: Optional['outputs.EnabledProtocolsResponse'] = None): """ Class for EnvelopeEncryption encryption scheme :param Sequence['TrackSelectionResponse'] clear_tracks: Representing which tracks should not be encrypted :param 'StreamingPolicyContentKeysResponse' content_keys: Representing default content key for each encryption scheme and separate content keys for specific tracks :param str custom_license_acquisition_url_template: LicenseAcquisitionUrlTemplate is used to point to user specified service to delivery content keys :param 'EnabledProtocolsResponse' enabled_protocols: Representing supported protocols """ if clear_tracks is not None: pulumi.set(__self__, "clear_tracks", clear_tracks) if content_keys is not None: pulumi.set(__self__, "content_keys", content_keys) if custom_license_acquisition_url_template is not None: pulumi.set(__self__, "custom_license_acquisition_url_template", custom_license_acquisition_url_template) if enabled_protocols is not None: pulumi.set(__self__, "enabled_protocols", enabled_protocols) @property @pulumi.getter(name="clearTracks") def clear_tracks(self) -> Optional[Sequence['outputs.TrackSelectionResponse']]: """ Representing which tracks should not be encrypted """ return pulumi.get(self, "clear_tracks") @property @pulumi.getter(name="contentKeys") def content_keys(self) -> Optional['outputs.StreamingPolicyContentKeysResponse']: """ Representing default content key for each encryption scheme and separate content keys for specific tracks """ return pulumi.get(self, "content_keys") @property @pulumi.getter(name="customLicenseAcquisitionUrlTemplate") def custom_license_acquisition_url_template(self) -> Optional[str]: """ LicenseAcquisitionUrlTemplate is used to point to user specified service to delivery content keys """ return pulumi.get(self, "custom_license_acquisition_url_template") @property @pulumi.getter(name="enabledProtocols") def enabled_protocols(self) -> Optional['outputs.EnabledProtocolsResponse']: """ Representing supported protocols """ return pulumi.get(self, "enabled_protocols") @pulumi.output_type class FiltersResponse(dict): """ Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be applied to the input media before encoding. """ def __init__(__self__, *, crop: Optional['outputs.RectangleResponse'] = None, deinterlace: Optional['outputs.DeinterlaceResponse'] = None, overlays: Optional[Sequence[Any]] = None, rotation: Optional[str] = None): """ Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be applied to the input media before encoding. :param 'RectangleResponse' crop: The parameters for the rectangular window with which to crop the input video. :param 'DeinterlaceResponse' deinterlace: The de-interlacing settings. :param Sequence[Union['AudioOverlayResponse', 'VideoOverlayResponse']] overlays: The properties of overlays to be applied to the input video. These could be audio, image or video overlays. :param str rotation: The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto """ if crop is not None: pulumi.set(__self__, "crop", crop) if deinterlace is not None: pulumi.set(__self__, "deinterlace", deinterlace) if overlays is not None: pulumi.set(__self__, "overlays", overlays) if rotation is not None: pulumi.set(__self__, "rotation", rotation) @property @pulumi.getter def crop(self) -> Optional['outputs.RectangleResponse']: """ The parameters for the rectangular window with which to crop the input video. """ return pulumi.get(self, "crop") @property @pulumi.getter def deinterlace(self) -> Optional['outputs.DeinterlaceResponse']: """ The de-interlacing settings. """ return pulumi.get(self, "deinterlace") @property @pulumi.getter def overlays(self) -> Optional[Sequence[Any]]: """ The properties of overlays to be applied to the input video. These could be audio, image or video overlays. """ return pulumi.get(self, "overlays") @property @pulumi.getter def rotation(self) -> Optional[str]: """ The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto """ return pulumi.get(self, "rotation") @pulumi.output_type class H264LayerResponse(dict): """ Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video codec. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "adaptiveBFrame": suggest = "adaptive_b_frame" elif key == "bFrames": suggest = "b_frames" elif key == "bufferWindow": suggest = "buffer_window" elif key == "entropyMode": suggest = "entropy_mode" elif key == "frameRate": suggest = "frame_rate" elif key == "maxBitrate": suggest = "max_bitrate" elif key == "referenceFrames": suggest = "reference_frames" if suggest: pulumi.log.warn(f"Key '{key}' not found in H264LayerResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: H264LayerResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: H264LayerResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, adaptive_b_frame: Optional[bool] = None, b_frames: Optional[int] = None, bitrate: Optional[int] = None, buffer_window: Optional[str] = None, entropy_mode: Optional[str] = None, frame_rate: Optional[str] = None, height: Optional[str] = None, label: Optional[str] = None, level: Optional[str] = None, max_bitrate: Optional[int] = None, profile: Optional[str] = None, reference_frames: Optional[int] = None, slices: Optional[int] = None, width: Optional[str] = None): """ Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video codec. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.H264Layer'. :param bool adaptive_b_frame: Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use. :param int b_frames: The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number based on the video profile and level. :param int bitrate: The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field. :param str buffer_window: The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S). :param str entropy_mode: The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level. :param str frame_rate: The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video. :param str height: The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. :param str label: The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. :param str level: Which level of the H.264 standard should be used when encoding this layer. The value can be Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. :param int max_bitrate: The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate. :param str profile: Which profile of the H.264 standard should be used when encoding this layer. Default is Auto. :param int reference_frames: The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting. :param int slices: The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame. :param str width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.H264Layer') if adaptive_b_frame is not None: pulumi.set(__self__, "adaptive_b_frame", adaptive_b_frame) if b_frames is not None: pulumi.set(__self__, "b_frames", b_frames) if bitrate is not None: pulumi.set(__self__, "bitrate", bitrate) if buffer_window is not None: pulumi.set(__self__, "buffer_window", buffer_window) if entropy_mode is not None: pulumi.set(__self__, "entropy_mode", entropy_mode) if frame_rate is not None: pulumi.set(__self__, "frame_rate", frame_rate) if height is not None: pulumi.set(__self__, "height", height) if label is not None: pulumi.set(__self__, "label", label) if level is not None: pulumi.set(__self__, "level", level) if max_bitrate is not None: pulumi.set(__self__, "max_bitrate", max_bitrate) if profile is not None: pulumi.set(__self__, "profile", profile) if reference_frames is not None: pulumi.set(__self__, "reference_frames", reference_frames) if slices is not None: pulumi.set(__self__, "slices", slices) if width is not None: pulumi.set(__self__, "width", width) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.H264Layer'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="adaptiveBFrame") def adaptive_b_frame(self) -> Optional[bool]: """ Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use. """ return pulumi.get(self, "adaptive_b_frame") @property @pulumi.getter(name="bFrames") def b_frames(self) -> Optional[int]: """ The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number based on the video profile and level. """ return pulumi.get(self, "b_frames") @property @pulumi.getter def bitrate(self) -> Optional[int]: """ The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field. """ return pulumi.get(self, "bitrate") @property @pulumi.getter(name="bufferWindow") def buffer_window(self) -> Optional[str]: """ The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S). """ return pulumi.get(self, "buffer_window") @property @pulumi.getter(name="entropyMode") def entropy_mode(self) -> Optional[str]: """ The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level. """ return pulumi.get(self, "entropy_mode") @property @pulumi.getter(name="frameRate") def frame_rate(self) -> Optional[str]: """ The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video. """ return pulumi.get(self, "frame_rate") @property @pulumi.getter def height(self) -> Optional[str]: """ The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. """ return pulumi.get(self, "height") @property @pulumi.getter def label(self) -> Optional[str]: """ The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. """ return pulumi.get(self, "label") @property @pulumi.getter def level(self) -> Optional[str]: """ Which level of the H.264 standard should be used when encoding this layer. The value can be Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. """ return pulumi.get(self, "level") @property @pulumi.getter(name="maxBitrate") def max_bitrate(self) -> Optional[int]: """ The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate. """ return pulumi.get(self, "max_bitrate") @property @pulumi.getter def profile(self) -> Optional[str]: """ Which profile of the H.264 standard should be used when encoding this layer. Default is Auto. """ return pulumi.get(self, "profile") @property @pulumi.getter(name="referenceFrames") def reference_frames(self) -> Optional[int]: """ The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting. """ return pulumi.get(self, "reference_frames") @property @pulumi.getter def slices(self) -> Optional[int]: """ The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame. """ return pulumi.get(self, "slices") @property @pulumi.getter def width(self) -> Optional[str]: """ The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. """ return pulumi.get(self, "width") @pulumi.output_type class H264VideoResponse(dict): """ Describes all the properties for encoding a video with the H.264 codec. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "keyFrameInterval": suggest = "key_frame_interval" elif key == "sceneChangeDetection": suggest = "scene_change_detection" elif key == "stretchMode": suggest = "stretch_mode" if suggest: pulumi.log.warn(f"Key '{key}' not found in H264VideoResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: H264VideoResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: H264VideoResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, complexity: Optional[str] = None, key_frame_interval: Optional[str] = None, label: Optional[str] = None, layers: Optional[Sequence['outputs.H264LayerResponse']] = None, scene_change_detection: Optional[bool] = None, stretch_mode: Optional[str] = None): """ Describes all the properties for encoding a video with the H.264 codec. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.H264Video'. :param str complexity: Tells the encoder how to choose its encoding settings. The default value is Balanced. :param str key_frame_interval: The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). :param str label: An optional label for the codec. The label can be used to control muxing behavior. :param Sequence['H264LayerResponse'] layers: The collection of output H.264 layers to be produced by the encoder. :param bool scene_change_detection: Whether or not the encoder should insert key frames at scene changes. If not specified, the default is false. This flag should be set to true only when the encoder is being configured to produce a single output video. :param str stretch_mode: The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.H264Video') if complexity is not None: pulumi.set(__self__, "complexity", complexity) if key_frame_interval is not None: pulumi.set(__self__, "key_frame_interval", key_frame_interval) if label is not None: pulumi.set(__self__, "label", label) if layers is not None: pulumi.set(__self__, "layers", layers) if scene_change_detection is not None: pulumi.set(__self__, "scene_change_detection", scene_change_detection) if stretch_mode is not None: pulumi.set(__self__, "stretch_mode", stretch_mode) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.H264Video'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def complexity(self) -> Optional[str]: """ Tells the encoder how to choose its encoding settings. The default value is Balanced. """ return pulumi.get(self, "complexity") @property @pulumi.getter(name="keyFrameInterval") def key_frame_interval(self) -> Optional[str]: """ The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). """ return pulumi.get(self, "key_frame_interval") @property @pulumi.getter def label(self) -> Optional[str]: """ An optional label for the codec. The label can be used to control muxing behavior. """ return pulumi.get(self, "label") @property @pulumi.getter def layers(self) -> Optional[Sequence['outputs.H264LayerResponse']]: """ The collection of output H.264 layers to be produced by the encoder. """ return pulumi.get(self, "layers") @property @pulumi.getter(name="sceneChangeDetection") def scene_change_detection(self) -> Optional[bool]: """ Whether or not the encoder should insert key frames at scene changes. If not specified, the default is false. This flag should be set to true only when the encoder is being configured to produce a single output video. """ return pulumi.get(self, "scene_change_detection") @property @pulumi.getter(name="stretchMode") def stretch_mode(self) -> Optional[str]: """ The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize """ return pulumi.get(self, "stretch_mode") @pulumi.output_type class HlsResponse(dict): """ The HLS configuration. """ @staticmethod def __key_warning(key: str): suggest = None if key == "fragmentsPerTsSegment": suggest = "fragments_per_ts_segment" if suggest: pulumi.log.warn(f"Key '{key}' not found in HlsResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: HlsResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: HlsResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, fragments_per_ts_segment: Optional[int] = None): """ The HLS configuration. :param int fragments_per_ts_segment: The amount of fragments per HTTP Live Streaming (HLS) segment. """ if fragments_per_ts_segment is not None: pulumi.set(__self__, "fragments_per_ts_segment", fragments_per_ts_segment) @property @pulumi.getter(name="fragmentsPerTsSegment") def fragments_per_ts_segment(self) -> Optional[int]: """ The amount of fragments per HTTP Live Streaming (HLS) segment. """ return pulumi.get(self, "fragments_per_ts_segment") @pulumi.output_type class IPAccessControlResponse(dict): """ The IP access control. """ def __init__(__self__, *, allow: Optional[Sequence['outputs.IPRangeResponse']] = None): """ The IP access control. :param Sequence['IPRangeResponse'] allow: The IP allow list. """ if allow is not None: pulumi.set(__self__, "allow", allow) @property @pulumi.getter def allow(self) -> Optional[Sequence['outputs.IPRangeResponse']]: """ The IP allow list. """ return pulumi.get(self, "allow") @pulumi.output_type class IPRangeResponse(dict): """ The IP address range in the CIDR scheme. """ @staticmethod def __key_warning(key: str): suggest = None if key == "subnetPrefixLength": suggest = "subnet_prefix_length" if suggest: pulumi.log.warn(f"Key '{key}' not found in IPRangeResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: IPRangeResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: IPRangeResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, address: Optional[str] = None, name: Optional[str] = None, subnet_prefix_length: Optional[int] = None): """ The IP address range in the CIDR scheme. :param str address: The IP address. :param str name: The friendly name for the IP address range. :param int subnet_prefix_length: The subnet mask prefix length (see CIDR notation). """ if address is not None: pulumi.set(__self__, "address", address) if name is not None: pulumi.set(__self__, "name", name) if subnet_prefix_length is not None: pulumi.set(__self__, "subnet_prefix_length", subnet_prefix_length) @property @pulumi.getter def address(self) -> Optional[str]: """ The IP address. """ return pulumi.get(self, "address") @property @pulumi.getter def name(self) -> Optional[str]: """ The friendly name for the IP address range. """ return pulumi.get(self, "name") @property @pulumi.getter(name="subnetPrefixLength") def subnet_prefix_length(self) -> Optional[int]: """ The subnet mask prefix length (see CIDR notation). """ return pulumi.get(self, "subnet_prefix_length") @pulumi.output_type class ImageFormatResponse(dict): """ Describes the properties for an output image file. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "filenamePattern": suggest = "filename_pattern" if suggest: pulumi.log.warn(f"Key '{key}' not found in ImageFormatResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ImageFormatResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ImageFormatResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, filename_pattern: Optional[str] = None): """ Describes the properties for an output image file. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.ImageFormat'. :param str filename_pattern: The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.ImageFormat') if filename_pattern is not None: pulumi.set(__self__, "filename_pattern", filename_pattern) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.ImageFormat'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="filenamePattern") def filename_pattern(self) -> Optional[str]: """ The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. """ return pulumi.get(self, "filename_pattern") @pulumi.output_type class ImageResponse(dict): """ Describes the basic properties for generating thumbnails from the input video """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "keyFrameInterval": suggest = "key_frame_interval" elif key == "stretchMode": suggest = "stretch_mode" if suggest: pulumi.log.warn(f"Key '{key}' not found in ImageResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: ImageResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ImageResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, key_frame_interval: Optional[str] = None, label: Optional[str] = None, range: Optional[str] = None, start: Optional[str] = None, step: Optional[str] = None, stretch_mode: Optional[str] = None): """ Describes the basic properties for generating thumbnails from the input video :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.Image'. :param str key_frame_interval: The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). :param str label: An optional label for the codec. The label can be used to control muxing behavior. :param str range: The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). :param str start: The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. :param str step: The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). :param str stretch_mode: The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.Image') if key_frame_interval is not None: pulumi.set(__self__, "key_frame_interval", key_frame_interval) if label is not None: pulumi.set(__self__, "label", label) if range is not None: pulumi.set(__self__, "range", range) if start is not None: pulumi.set(__self__, "start", start) if step is not None: pulumi.set(__self__, "step", step) if stretch_mode is not None: pulumi.set(__self__, "stretch_mode", stretch_mode) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.Image'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="keyFrameInterval") def key_frame_interval(self) -> Optional[str]: """ The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). """ return pulumi.get(self, "key_frame_interval") @property @pulumi.getter def label(self) -> Optional[str]: """ An optional label for the codec. The label can be used to control muxing behavior. """ return pulumi.get(self, "label") @property @pulumi.getter def range(self) -> Optional[str]: """ The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). """ return pulumi.get(self, "range") @property @pulumi.getter def start(self) -> Optional[str]: """ The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. """ return pulumi.get(self, "start") @property @pulumi.getter def step(self) -> Optional[str]: """ The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). """ return pulumi.get(self, "step") @property @pulumi.getter(name="stretchMode") def stretch_mode(self) -> Optional[str]: """ The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize """ return pulumi.get(self, "stretch_mode") @pulumi.output_type class JobErrorDetailResponse(dict): """ Details of JobOutput errors. """ def __init__(__self__, *, code: str, message: str): """ Details of JobOutput errors. :param str code: Code describing the error detail. :param str message: A human-readable representation of the error. """ pulumi.set(__self__, "code", code) pulumi.set(__self__, "message", message) @property @pulumi.getter def code(self) -> str: """ Code describing the error detail. """ return pulumi.get(self, "code") @property @pulumi.getter def message(self) -> str: """ A human-readable representation of the error. """ return pulumi.get(self, "message") @pulumi.output_type class JobErrorResponse(dict): """ Details of JobOutput errors. """ def __init__(__self__, *, category: str, code: str, details: Sequence['outputs.JobErrorDetailResponse'], message: str, retry: str): """ Details of JobOutput errors. :param str category: Helps with categorization of errors. :param str code: Error code describing the error. :param Sequence['JobErrorDetailResponse'] details: An array of details about specific errors that led to this reported error. :param str message: A human-readable language-dependent representation of the error. :param str retry: Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. """ pulumi.set(__self__, "category", category) pulumi.set(__self__, "code", code) pulumi.set(__self__, "details", details) pulumi.set(__self__, "message", message) pulumi.set(__self__, "retry", retry) @property @pulumi.getter def category(self) -> str: """ Helps with categorization of errors. """ return pulumi.get(self, "category") @property @pulumi.getter def code(self) -> str: """ Error code describing the error. """ return pulumi.get(self, "code") @property @pulumi.getter def details(self) -> Sequence['outputs.JobErrorDetailResponse']: """ An array of details about specific errors that led to this reported error. """ return pulumi.get(self, "details") @property @pulumi.getter def message(self) -> str: """ A human-readable language-dependent representation of the error. """ return pulumi.get(self, "message") @property @pulumi.getter def retry(self) -> str: """ Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. """ return pulumi.get(self, "retry") @pulumi.output_type class JobInputAssetResponse(dict): """ Represents an Asset for input into a Job. """ @staticmethod def __key_warning(key: str): suggest = None if key == "assetName": suggest = "asset_name" elif key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in JobInputAssetResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: JobInputAssetResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: JobInputAssetResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, asset_name: str, odata_type: str, files: Optional[Sequence[str]] = None, label: Optional[str] = None): """ Represents an Asset for input into a Job. :param str asset_name: The name of the input Asset. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.JobInputAsset'. :param Sequence[str] files: List of files. Required for JobInputHttp. :param str label: A label that is assigned to a JobInput, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. """ pulumi.set(__self__, "asset_name", asset_name) pulumi.set(__self__, "odata_type", '#Microsoft.Media.JobInputAsset') if files is not None: pulumi.set(__self__, "files", files) if label is not None: pulumi.set(__self__, "label", label) @property @pulumi.getter(name="assetName") def asset_name(self) -> str: """ The name of the input Asset. """ return pulumi.get(self, "asset_name") @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.JobInputAsset'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def files(self) -> Optional[Sequence[str]]: """ List of files. Required for JobInputHttp. """ return pulumi.get(self, "files") @property @pulumi.getter def label(self) -> Optional[str]: """ A label that is assigned to a JobInput, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. """ return pulumi.get(self, "label") @pulumi.output_type class JobInputClipResponse(dict): """ Represents input files for a Job. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in JobInputClipResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: JobInputClipResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: JobInputClipResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, files: Optional[Sequence[str]] = None, label: Optional[str] = None): """ Represents input files for a Job. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.JobInputClip'. :param Sequence[str] files: List of files. Required for JobInputHttp. :param str label: A label that is assigned to a JobInput, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.JobInputClip') if files is not None: pulumi.set(__self__, "files", files) if label is not None: pulumi.set(__self__, "label", label) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.JobInputClip'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def files(self) -> Optional[Sequence[str]]: """ List of files. Required for JobInputHttp. """ return pulumi.get(self, "files") @property @pulumi.getter def label(self) -> Optional[str]: """ A label that is assigned to a JobInput, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. """ return pulumi.get(self, "label") @pulumi.output_type class JobInputHttpResponse(dict): """ Represents HTTPS job input. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "baseUri": suggest = "base_uri" if suggest: pulumi.log.warn(f"Key '{key}' not found in JobInputHttpResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: JobInputHttpResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: JobInputHttpResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, base_uri: Optional[str] = None, files: Optional[Sequence[str]] = None, label: Optional[str] = None): """ Represents HTTPS job input. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.JobInputHttp'. :param str base_uri: Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided file list is assumed to be fully qualified uris. :param Sequence[str] files: List of files. Required for JobInputHttp. :param str label: A label that is assigned to a JobInput, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.JobInputHttp') if base_uri is not None: pulumi.set(__self__, "base_uri", base_uri) if files is not None: pulumi.set(__self__, "files", files) if label is not None: pulumi.set(__self__, "label", label) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.JobInputHttp'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="baseUri") def base_uri(self) -> Optional[str]: """ Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided file list is assumed to be fully qualified uris. """ return pulumi.get(self, "base_uri") @property @pulumi.getter def files(self) -> Optional[Sequence[str]]: """ List of files. Required for JobInputHttp. """ return pulumi.get(self, "files") @property @pulumi.getter def label(self) -> Optional[str]: """ A label that is assigned to a JobInput, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. """ return pulumi.get(self, "label") @pulumi.output_type class JobInputsResponse(dict): """ Describes a list of inputs to a Job. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in JobInputsResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: JobInputsResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: JobInputsResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, inputs: Optional[Sequence[Any]] = None, label: Optional[str] = None): """ Describes a list of inputs to a Job. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.JobInputs'. :param Sequence[Union['JobInputAssetResponse', 'JobInputClipResponse', 'JobInputHttpResponse', 'JobInputsResponse']] inputs: List of inputs to a Job. :param str label: A label that is assigned to a JobInput, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.JobInputs') if inputs is not None: pulumi.set(__self__, "inputs", inputs) if label is not None: pulumi.set(__self__, "label", label) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.JobInputs'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def inputs(self) -> Optional[Sequence[Any]]: """ List of inputs to a Job. """ return pulumi.get(self, "inputs") @property @pulumi.getter def label(self) -> Optional[str]: """ A label that is assigned to a JobInput, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. """ return pulumi.get(self, "label") @pulumi.output_type class JobOutputAssetResponse(dict): """ Represents an Asset used as a JobOutput. """ @staticmethod def __key_warning(key: str): suggest = None if key == "assetName": suggest = "asset_name" elif key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in JobOutputAssetResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: JobOutputAssetResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: JobOutputAssetResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, asset_name: str, error: 'outputs.JobErrorResponse', odata_type: str, progress: int, state: str): """ Represents an Asset used as a JobOutput. :param str asset_name: The name of the output Asset. :param 'JobErrorResponse' error: If the JobOutput is in the Error state, it contains the details of the error. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.JobOutputAsset'. :param int progress: If the JobOutput is in a Processing state, this contains the job completion percentage. The value is an estimate and not intended to be used to predict job completion times. To determine if the JobOutput is complete, use the State property. :param str state: Describes the state of the JobOutput. """ pulumi.set(__self__, "asset_name", asset_name) pulumi.set(__self__, "error", error) pulumi.set(__self__, "odata_type", '#Microsoft.Media.JobOutputAsset') pulumi.set(__self__, "progress", progress) pulumi.set(__self__, "state", state) @property @pulumi.getter(name="assetName") def asset_name(self) -> str: """ The name of the output Asset. """ return pulumi.get(self, "asset_name") @property @pulumi.getter def error(self) -> 'outputs.JobErrorResponse': """ If the JobOutput is in the Error state, it contains the details of the error. """ return pulumi.get(self, "error") @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.JobOutputAsset'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def progress(self) -> int: """ If the JobOutput is in a Processing state, this contains the job completion percentage. The value is an estimate and not intended to be used to predict job completion times. To determine if the JobOutput is complete, use the State property. """ return pulumi.get(self, "progress") @property @pulumi.getter def state(self) -> str: """ Describes the state of the JobOutput. """ return pulumi.get(self, "state") @pulumi.output_type class JpgFormatResponse(dict): """ Describes the settings for producing JPEG thumbnails. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "filenamePattern": suggest = "filename_pattern" if suggest: pulumi.log.warn(f"Key '{key}' not found in JpgFormatResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: JpgFormatResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: JpgFormatResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, filename_pattern: Optional[str] = None): """ Describes the settings for producing JPEG thumbnails. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.JpgFormat'. :param str filename_pattern: The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.JpgFormat') if filename_pattern is not None: pulumi.set(__self__, "filename_pattern", filename_pattern) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.JpgFormat'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="filenamePattern") def filename_pattern(self) -> Optional[str]: """ The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. """ return pulumi.get(self, "filename_pattern") @pulumi.output_type class JpgImageResponse(dict): """ Describes the properties for producing a series of JPEG images from the input video. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "keyFrameInterval": suggest = "key_frame_interval" elif key == "stretchMode": suggest = "stretch_mode" if suggest: pulumi.log.warn(f"Key '{key}' not found in JpgImageResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: JpgImageResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: JpgImageResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, key_frame_interval: Optional[str] = None, label: Optional[str] = None, layers: Optional[Sequence['outputs.JpgLayerResponse']] = None, range: Optional[str] = None, start: Optional[str] = None, step: Optional[str] = None, stretch_mode: Optional[str] = None): """ Describes the properties for producing a series of JPEG images from the input video. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.JpgImage'. :param str key_frame_interval: The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). :param str label: An optional label for the codec. The label can be used to control muxing behavior. :param Sequence['JpgLayerResponse'] layers: A collection of output JPEG image layers to be produced by the encoder. :param str range: The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). :param str start: The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. :param str step: The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). :param str stretch_mode: The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.JpgImage') if key_frame_interval is not None: pulumi.set(__self__, "key_frame_interval", key_frame_interval) if label is not None: pulumi.set(__self__, "label", label) if layers is not None: pulumi.set(__self__, "layers", layers) if range is not None: pulumi.set(__self__, "range", range) if start is not None: pulumi.set(__self__, "start", start) if step is not None: pulumi.set(__self__, "step", step) if stretch_mode is not None: pulumi.set(__self__, "stretch_mode", stretch_mode) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.JpgImage'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="keyFrameInterval") def key_frame_interval(self) -> Optional[str]: """ The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). """ return pulumi.get(self, "key_frame_interval") @property @pulumi.getter def label(self) -> Optional[str]: """ An optional label for the codec. The label can be used to control muxing behavior. """ return pulumi.get(self, "label") @property @pulumi.getter def layers(self) -> Optional[Sequence['outputs.JpgLayerResponse']]: """ A collection of output JPEG image layers to be produced by the encoder. """ return pulumi.get(self, "layers") @property @pulumi.getter def range(self) -> Optional[str]: """ The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). """ return pulumi.get(self, "range") @property @pulumi.getter def start(self) -> Optional[str]: """ The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. """ return pulumi.get(self, "start") @property @pulumi.getter def step(self) -> Optional[str]: """ The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). """ return pulumi.get(self, "step") @property @pulumi.getter(name="stretchMode") def stretch_mode(self) -> Optional[str]: """ The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize """ return pulumi.get(self, "stretch_mode") @pulumi.output_type class JpgLayerResponse(dict): """ Describes the settings to produce a JPEG image from the input video. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in JpgLayerResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: JpgLayerResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: JpgLayerResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, height: Optional[str] = None, label: Optional[str] = None, quality: Optional[int] = None, width: Optional[str] = None): """ Describes the settings to produce a JPEG image from the input video. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.JpgLayer'. :param str height: The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. :param str label: The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. :param int quality: The compression quality of the JPEG output. Range is from 0-100 and the default is 70. :param str width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.JpgLayer') if height is not None: pulumi.set(__self__, "height", height) if label is not None: pulumi.set(__self__, "label", label) if quality is not None: pulumi.set(__self__, "quality", quality) if width is not None: pulumi.set(__self__, "width", width) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.JpgLayer'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def height(self) -> Optional[str]: """ The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. """ return pulumi.get(self, "height") @property @pulumi.getter def label(self) -> Optional[str]: """ The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. """ return pulumi.get(self, "label") @property @pulumi.getter def quality(self) -> Optional[int]: """ The compression quality of the JPEG output. Range is from 0-100 and the default is 70. """ return pulumi.get(self, "quality") @property @pulumi.getter def width(self) -> Optional[str]: """ The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. """ return pulumi.get(self, "width") @pulumi.output_type class LiveEventEncodingResponse(dict): """ The Live Event encoding. """ @staticmethod def __key_warning(key: str): suggest = None if key == "encodingType": suggest = "encoding_type" elif key == "presetName": suggest = "preset_name" if suggest: pulumi.log.warn(f"Key '{key}' not found in LiveEventEncodingResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: LiveEventEncodingResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: LiveEventEncodingResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, encoding_type: Optional[str] = None, preset_name: Optional[str] = None): """ The Live Event encoding. :param str encoding_type: The encoding type for Live Event. :param str preset_name: The encoding preset name. """ if encoding_type is not None: pulumi.set(__self__, "encoding_type", encoding_type) if preset_name is not None: pulumi.set(__self__, "preset_name", preset_name) @property @pulumi.getter(name="encodingType") def encoding_type(self) -> Optional[str]: """ The encoding type for Live Event. """ return pulumi.get(self, "encoding_type") @property @pulumi.getter(name="presetName") def preset_name(self) -> Optional[str]: """ The encoding preset name. """ return pulumi.get(self, "preset_name") @pulumi.output_type class LiveEventEndpointResponse(dict): """ The Live Event endpoint. """ def __init__(__self__, *, protocol: Optional[str] = None, url: Optional[str] = None): """ The Live Event endpoint. :param str protocol: The endpoint protocol. :param str url: The endpoint URL. """ if protocol is not None: pulumi.set(__self__, "protocol", protocol) if url is not None: pulumi.set(__self__, "url", url) @property @pulumi.getter def protocol(self) -> Optional[str]: """ The endpoint protocol. """ return pulumi.get(self, "protocol") @property @pulumi.getter def url(self) -> Optional[str]: """ The endpoint URL. """ return pulumi.get(self, "url") @pulumi.output_type class LiveEventInputResponse(dict): """ The Live Event input. """ @staticmethod def __key_warning(key: str): suggest = None if key == "streamingProtocol": suggest = "streaming_protocol" elif key == "accessToken": suggest = "access_token" elif key == "keyFrameIntervalDuration": suggest = "key_frame_interval_duration" if suggest: pulumi.log.warn(f"Key '{key}' not found in LiveEventInputResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: LiveEventInputResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: LiveEventInputResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, streaming_protocol: str, access_token: Optional[str] = None, endpoints: Optional[Sequence['outputs.LiveEventEndpointResponse']] = None, key_frame_interval_duration: Optional[str] = None): """ The Live Event input. :param str streaming_protocol: The streaming protocol for the Live Event. :param str access_token: The access token. :param Sequence['LiveEventEndpointResponse'] endpoints: The input endpoints for the Live Event. :param str key_frame_interval_duration: ISO 8601 timespan duration of the key frame interval duration. """ pulumi.set(__self__, "streaming_protocol", streaming_protocol) if access_token is not None: pulumi.set(__self__, "access_token", access_token) if endpoints is not None: pulumi.set(__self__, "endpoints", endpoints) if key_frame_interval_duration is not None: pulumi.set(__self__, "key_frame_interval_duration", key_frame_interval_duration) @property @pulumi.getter(name="streamingProtocol") def streaming_protocol(self) -> str: """ The streaming protocol for the Live Event. """ return pulumi.get(self, "streaming_protocol") @property @pulumi.getter(name="accessToken") def access_token(self) -> Optional[str]: """ The access token. """ return pulumi.get(self, "access_token") @property @pulumi.getter def endpoints(self) -> Optional[Sequence['outputs.LiveEventEndpointResponse']]: """ The input endpoints for the Live Event. """ return pulumi.get(self, "endpoints") @property @pulumi.getter(name="keyFrameIntervalDuration") def key_frame_interval_duration(self) -> Optional[str]: """ ISO 8601 timespan duration of the key frame interval duration. """ return pulumi.get(self, "key_frame_interval_duration") @pulumi.output_type class LiveEventPreviewAccessControlResponse(dict): """ The IP access control for Live Event preview. """ def __init__(__self__, *, ip: Optional['outputs.IPAccessControlResponse'] = None): """ The IP access control for Live Event preview. :param 'IPAccessControlResponse' ip: The IP access control properties. """ if ip is not None: pulumi.set(__self__, "ip", ip) @property @pulumi.getter def ip(self) -> Optional['outputs.IPAccessControlResponse']: """ The IP access control properties. """ return pulumi.get(self, "ip") @pulumi.output_type class LiveEventPreviewResponse(dict): """ The Live Event preview. """ @staticmethod def __key_warning(key: str): suggest = None if key == "accessControl": suggest = "access_control" elif key == "previewLocator": suggest = "preview_locator" elif key == "streamingPolicyName": suggest = "streaming_policy_name" if suggest: pulumi.log.warn(f"Key '{key}' not found in LiveEventPreviewResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: LiveEventPreviewResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: LiveEventPreviewResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, access_control: Optional['outputs.LiveEventPreviewAccessControlResponse'] = None, endpoints: Optional[Sequence['outputs.LiveEventEndpointResponse']] = None, preview_locator: Optional[str] = None, streaming_policy_name: Optional[str] = None): """ The Live Event preview. :param 'LiveEventPreviewAccessControlResponse' access_control: The access control for LiveEvent preview. :param Sequence['LiveEventEndpointResponse'] endpoints: The endpoints for preview. :param str preview_locator: The preview locator Guid. :param str streaming_policy_name: The name of streaming policy used for LiveEvent preview """ if access_control is not None: pulumi.set(__self__, "access_control", access_control) if endpoints is not None: pulumi.set(__self__, "endpoints", endpoints) if preview_locator is not None: pulumi.set(__self__, "preview_locator", preview_locator) if streaming_policy_name is not None: pulumi.set(__self__, "streaming_policy_name", streaming_policy_name) @property @pulumi.getter(name="accessControl") def access_control(self) -> Optional['outputs.LiveEventPreviewAccessControlResponse']: """ The access control for LiveEvent preview. """ return pulumi.get(self, "access_control") @property @pulumi.getter def endpoints(self) -> Optional[Sequence['outputs.LiveEventEndpointResponse']]: """ The endpoints for preview. """ return pulumi.get(self, "endpoints") @property @pulumi.getter(name="previewLocator") def preview_locator(self) -> Optional[str]: """ The preview locator Guid. """ return pulumi.get(self, "preview_locator") @property @pulumi.getter(name="streamingPolicyName") def streaming_policy_name(self) -> Optional[str]: """ The name of streaming policy used for LiveEvent preview """ return pulumi.get(self, "streaming_policy_name") @pulumi.output_type class Mp4FormatResponse(dict): """ Describes the properties for an output ISO MP4 file. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "filenamePattern": suggest = "filename_pattern" elif key == "outputFiles": suggest = "output_files" if suggest: pulumi.log.warn(f"Key '{key}' not found in Mp4FormatResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: Mp4FormatResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: Mp4FormatResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, filename_pattern: Optional[str] = None, output_files: Optional[Sequence['outputs.OutputFileResponse']] = None): """ Describes the properties for an output ISO MP4 file. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.Mp4Format'. :param str filename_pattern: The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. :param Sequence['OutputFileResponse'] output_files: The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.Mp4Format') if filename_pattern is not None: pulumi.set(__self__, "filename_pattern", filename_pattern) if output_files is not None: pulumi.set(__self__, "output_files", output_files) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.Mp4Format'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="filenamePattern") def filename_pattern(self) -> Optional[str]: """ The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. """ return pulumi.get(self, "filename_pattern") @property @pulumi.getter(name="outputFiles") def output_files(self) -> Optional[Sequence['outputs.OutputFileResponse']]: """ The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . """ return pulumi.get(self, "output_files") @pulumi.output_type class MultiBitrateFormatResponse(dict): """ Describes the properties for producing a collection of GOP aligned multi-bitrate files. The default behavior is to produce one output file for each video layer which is muxed together with all the audios. The exact output files produced can be controlled by specifying the outputFiles collection. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "filenamePattern": suggest = "filename_pattern" elif key == "outputFiles": suggest = "output_files" if suggest: pulumi.log.warn(f"Key '{key}' not found in MultiBitrateFormatResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: MultiBitrateFormatResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: MultiBitrateFormatResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, filename_pattern: Optional[str] = None, output_files: Optional[Sequence['outputs.OutputFileResponse']] = None): """ Describes the properties for producing a collection of GOP aligned multi-bitrate files. The default behavior is to produce one output file for each video layer which is muxed together with all the audios. The exact output files produced can be controlled by specifying the outputFiles collection. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.MultiBitrateFormat'. :param str filename_pattern: The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. :param Sequence['OutputFileResponse'] output_files: The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.MultiBitrateFormat') if filename_pattern is not None: pulumi.set(__self__, "filename_pattern", filename_pattern) if output_files is not None: pulumi.set(__self__, "output_files", output_files) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.MultiBitrateFormat'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="filenamePattern") def filename_pattern(self) -> Optional[str]: """ The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. """ return pulumi.get(self, "filename_pattern") @property @pulumi.getter(name="outputFiles") def output_files(self) -> Optional[Sequence['outputs.OutputFileResponse']]: """ The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . """ return pulumi.get(self, "output_files") @pulumi.output_type class NoEncryptionResponse(dict): """ Class for NoEncryption scheme """ @staticmethod def __key_warning(key: str): suggest = None if key == "enabledProtocols": suggest = "enabled_protocols" if suggest: pulumi.log.warn(f"Key '{key}' not found in NoEncryptionResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: NoEncryptionResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: NoEncryptionResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, enabled_protocols: Optional['outputs.EnabledProtocolsResponse'] = None): """ Class for NoEncryption scheme :param 'EnabledProtocolsResponse' enabled_protocols: Representing supported protocols """ if enabled_protocols is not None: pulumi.set(__self__, "enabled_protocols", enabled_protocols) @property @pulumi.getter(name="enabledProtocols") def enabled_protocols(self) -> Optional['outputs.EnabledProtocolsResponse']: """ Representing supported protocols """ return pulumi.get(self, "enabled_protocols") @pulumi.output_type class OutputFileResponse(dict): """ Represents an output file produced. """ def __init__(__self__, *, labels: Optional[Sequence[str]] = None): """ Represents an output file produced. :param Sequence[str] labels: The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels v1 and v2, and one audio layer with label a1, then an array like '[v1, a1]' tells the encoder to produce an output file with the video track represented by v1 and the audio track represented by a1. """ if labels is not None: pulumi.set(__self__, "labels", labels) @property @pulumi.getter def labels(self) -> Optional[Sequence[str]]: """ The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels v1 and v2, and one audio layer with label a1, then an array like '[v1, a1]' tells the encoder to produce an output file with the video track represented by v1 and the audio track represented by a1. """ return pulumi.get(self, "labels") @pulumi.output_type class PngFormatResponse(dict): """ Describes the settings for producing PNG thumbnails. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "filenamePattern": suggest = "filename_pattern" if suggest: pulumi.log.warn(f"Key '{key}' not found in PngFormatResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: PngFormatResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: PngFormatResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, filename_pattern: Optional[str] = None): """ Describes the settings for producing PNG thumbnails. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.PngFormat'. :param str filename_pattern: The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.PngFormat') if filename_pattern is not None: pulumi.set(__self__, "filename_pattern", filename_pattern) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.PngFormat'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="filenamePattern") def filename_pattern(self) -> Optional[str]: """ The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. """ return pulumi.get(self, "filename_pattern") @pulumi.output_type class PngImageResponse(dict): """ Describes the properties for producing a series of PNG images from the input video. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "keyFrameInterval": suggest = "key_frame_interval" elif key == "stretchMode": suggest = "stretch_mode" if suggest: pulumi.log.warn(f"Key '{key}' not found in PngImageResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: PngImageResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: PngImageResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, key_frame_interval: Optional[str] = None, label: Optional[str] = None, layers: Optional[Sequence['outputs.PngLayerResponse']] = None, range: Optional[str] = None, start: Optional[str] = None, step: Optional[str] = None, stretch_mode: Optional[str] = None): """ Describes the properties for producing a series of PNG images from the input video. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.PngImage'. :param str key_frame_interval: The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). :param str label: An optional label for the codec. The label can be used to control muxing behavior. :param Sequence['PngLayerResponse'] layers: A collection of output PNG image layers to be produced by the encoder. :param str range: The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). :param str start: The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. :param str step: The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). :param str stretch_mode: The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.PngImage') if key_frame_interval is not None: pulumi.set(__self__, "key_frame_interval", key_frame_interval) if label is not None: pulumi.set(__self__, "label", label) if layers is not None: pulumi.set(__self__, "layers", layers) if range is not None: pulumi.set(__self__, "range", range) if start is not None: pulumi.set(__self__, "start", start) if step is not None: pulumi.set(__self__, "step", step) if stretch_mode is not None: pulumi.set(__self__, "stretch_mode", stretch_mode) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.PngImage'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="keyFrameInterval") def key_frame_interval(self) -> Optional[str]: """ The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). """ return pulumi.get(self, "key_frame_interval") @property @pulumi.getter def label(self) -> Optional[str]: """ An optional label for the codec. The label can be used to control muxing behavior. """ return pulumi.get(self, "label") @property @pulumi.getter def layers(self) -> Optional[Sequence['outputs.PngLayerResponse']]: """ A collection of output PNG image layers to be produced by the encoder. """ return pulumi.get(self, "layers") @property @pulumi.getter def range(self) -> Optional[str]: """ The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). """ return pulumi.get(self, "range") @property @pulumi.getter def start(self) -> Optional[str]: """ The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. """ return pulumi.get(self, "start") @property @pulumi.getter def step(self) -> Optional[str]: """ The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). """ return pulumi.get(self, "step") @property @pulumi.getter(name="stretchMode") def stretch_mode(self) -> Optional[str]: """ The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize """ return pulumi.get(self, "stretch_mode") @pulumi.output_type class PngLayerResponse(dict): """ Describes the settings to produce a PNG image from the input video. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in PngLayerResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: PngLayerResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: PngLayerResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, height: Optional[str] = None, label: Optional[str] = None, width: Optional[str] = None): """ Describes the settings to produce a PNG image from the input video. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.PngLayer'. :param str height: The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. :param str label: The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. :param str width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.PngLayer') if height is not None: pulumi.set(__self__, "height", height) if label is not None: pulumi.set(__self__, "label", label) if width is not None: pulumi.set(__self__, "width", width) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.PngLayer'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def height(self) -> Optional[str]: """ The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. """ return pulumi.get(self, "height") @property @pulumi.getter def label(self) -> Optional[str]: """ The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. """ return pulumi.get(self, "label") @property @pulumi.getter def width(self) -> Optional[str]: """ The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. """ return pulumi.get(self, "width") @pulumi.output_type class RectangleResponse(dict): """ Describes the properties of a rectangular window applied to the input media before processing it. """ def __init__(__self__, *, height: Optional[str] = None, left: Optional[str] = None, top: Optional[str] = None, width: Optional[str] = None): """ Describes the properties of a rectangular window applied to the input media before processing it. :param str height: The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). :param str left: The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). :param str top: The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). :param str width: The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). """ if height is not None: pulumi.set(__self__, "height", height) if left is not None: pulumi.set(__self__, "left", left) if top is not None: pulumi.set(__self__, "top", top) if width is not None: pulumi.set(__self__, "width", width) @property @pulumi.getter def height(self) -> Optional[str]: """ The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). """ return pulumi.get(self, "height") @property @pulumi.getter def left(self) -> Optional[str]: """ The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). """ return pulumi.get(self, "left") @property @pulumi.getter def top(self) -> Optional[str]: """ The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). """ return pulumi.get(self, "top") @property @pulumi.getter def width(self) -> Optional[str]: """ The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). """ return pulumi.get(self, "width") @pulumi.output_type class StandardEncoderPresetResponse(dict): """ Describes all the settings to be used when encoding the input video with the Standard Encoder. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" if suggest: pulumi.log.warn(f"Key '{key}' not found in StandardEncoderPresetResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: StandardEncoderPresetResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: StandardEncoderPresetResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, codecs: Optional[Sequence[Any]] = None, filters: Optional['outputs.FiltersResponse'] = None, formats: Optional[Sequence[Any]] = None): """ Describes all the settings to be used when encoding the input video with the Standard Encoder. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.StandardEncoderPreset'. :param Sequence[Union['AacAudioResponse', 'AudioResponse', 'CopyAudioResponse', 'CopyVideoResponse', 'H264VideoResponse', 'ImageResponse', 'JpgImageResponse', 'PngImageResponse', 'VideoResponse']] codecs: The list of codecs to be used when encoding the input video. :param 'FiltersResponse' filters: One or more filtering operations that are applied to the input media before encoding. :param Sequence[Union['ImageFormatResponse', 'JpgFormatResponse', 'Mp4FormatResponse', 'MultiBitrateFormatResponse', 'PngFormatResponse', 'TransportStreamFormatResponse']] formats: The list of outputs to be produced by the encoder. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.StandardEncoderPreset') if codecs is not None: pulumi.set(__self__, "codecs", codecs) if filters is not None: pulumi.set(__self__, "filters", filters) if formats is not None: pulumi.set(__self__, "formats", formats) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.StandardEncoderPreset'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter def codecs(self) -> Optional[Sequence[Any]]: """ The list of codecs to be used when encoding the input video. """ return pulumi.get(self, "codecs") @property @pulumi.getter def filters(self) -> Optional['outputs.FiltersResponse']: """ One or more filtering operations that are applied to the input media before encoding. """ return pulumi.get(self, "filters") @property @pulumi.getter def formats(self) -> Optional[Sequence[Any]]: """ The list of outputs to be produced by the encoder. """ return pulumi.get(self, "formats") @pulumi.output_type class StorageAccountResponse(dict): """ The storage account details. """ def __init__(__self__, *, type: str, id: Optional[str] = None): """ The storage account details. :param str type: The type of the storage account. :param str id: The ID of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage account must be a Standard Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts can be added as secondary storage accounts. """ pulumi.set(__self__, "type", type) if id is not None: pulumi.set(__self__, "id", id) @property @pulumi.getter def type(self) -> str: """ The type of the storage account. """ return pulumi.get(self, "type") @property @pulumi.getter def id(self) -> Optional[str]: """ The ID of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage account must be a Standard Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts can be added as secondary storage accounts. """ return pulumi.get(self, "id") @pulumi.output_type class StreamingEndpointAccessControlResponse(dict): """ StreamingEndpoint access control definition. """ def __init__(__self__, *, akamai: Optional['outputs.AkamaiAccessControlResponse'] = None, ip: Optional['outputs.IPAccessControlResponse'] = None): """ StreamingEndpoint access control definition. :param 'AkamaiAccessControlResponse' akamai: The access control of Akamai :param 'IPAccessControlResponse' ip: The IP access control of the StreamingEndpoint. """ if akamai is not None: pulumi.set(__self__, "akamai", akamai) if ip is not None: pulumi.set(__self__, "ip", ip) @property @pulumi.getter def akamai(self) -> Optional['outputs.AkamaiAccessControlResponse']: """ The access control of Akamai """ return pulumi.get(self, "akamai") @property @pulumi.getter def ip(self) -> Optional['outputs.IPAccessControlResponse']: """ The IP access control of the StreamingEndpoint. """ return pulumi.get(self, "ip") @pulumi.output_type class StreamingLocatorContentKeyResponse(dict): """ Class for content key in Streaming Locator """ def __init__(__self__, *, id: str, type: str, label: Optional[str] = None, policy_name: Optional[str] = None, tracks: Optional[Sequence['outputs.TrackSelectionResponse']] = None, value: Optional[str] = None): """ Class for content key in Streaming Locator :param str id: ID of Content Key :param str type: Encryption type of Content Key :param str label: Label of Content Key :param str policy_name: ContentKeyPolicy used by Content Key :param Sequence['TrackSelectionResponse'] tracks: Tracks which use this Content Key :param str value: Value of Content Key """ pulumi.set(__self__, "id", id) pulumi.set(__self__, "type", type) if label is not None: pulumi.set(__self__, "label", label) if policy_name is not None: pulumi.set(__self__, "policy_name", policy_name) if tracks is not None: pulumi.set(__self__, "tracks", tracks) if value is not None: pulumi.set(__self__, "value", value) @property @pulumi.getter def id(self) -> str: """ ID of Content Key """ return pulumi.get(self, "id") @property @pulumi.getter def type(self) -> str: """ Encryption type of Content Key """ return pulumi.get(self, "type") @property @pulumi.getter def label(self) -> Optional[str]: """ Label of Content Key """ return pulumi.get(self, "label") @property @pulumi.getter(name="policyName") def policy_name(self) -> Optional[str]: """ ContentKeyPolicy used by Content Key """ return pulumi.get(self, "policy_name") @property @pulumi.getter def tracks(self) -> Optional[Sequence['outputs.TrackSelectionResponse']]: """ Tracks which use this Content Key """ return pulumi.get(self, "tracks") @property @pulumi.getter def value(self) -> Optional[str]: """ Value of Content Key """ return pulumi.get(self, "value") @pulumi.output_type class StreamingLocatorUserDefinedContentKeyResponse(dict): """ Describes the properties of a user-defined content key in the Streaming Locator """ def __init__(__self__, *, id: str, label: Optional[str] = None, value: Optional[str] = None): """ Describes the properties of a user-defined content key in the Streaming Locator :param str id: ID of Content Key :param str label: The Content Key description :param str value: The Content Key secret """ pulumi.set(__self__, "id", id) if label is not None: pulumi.set(__self__, "label", label) if value is not None: pulumi.set(__self__, "value", value) @property @pulumi.getter def id(self) -> str: """ ID of Content Key """ return pulumi.get(self, "id") @property @pulumi.getter def label(self) -> Optional[str]: """ The Content Key description """ return pulumi.get(self, "label") @property @pulumi.getter def value(self) -> Optional[str]: """ The Content Key secret """ return pulumi.get(self, "value") @pulumi.output_type class StreamingPathResponse(dict): """ Class of paths for streaming """ def __init__(__self__, *, encryption_scheme: str, streaming_protocol: str, paths: Optional[Sequence[str]] = None): """ Class of paths for streaming :param str encryption_scheme: Encryption scheme :param str streaming_protocol: Streaming protocol :param Sequence[str] paths: Streaming paths for each protocol and encryptionScheme pair """ pulumi.set(__self__, "encryption_scheme", encryption_scheme) pulumi.set(__self__, "streaming_protocol", streaming_protocol) if paths is not None: pulumi.set(__self__, "paths", paths) @property @pulumi.getter(name="encryptionScheme") def encryption_scheme(self) -> str: """ Encryption scheme """ return pulumi.get(self, "encryption_scheme") @property @pulumi.getter(name="streamingProtocol") def streaming_protocol(self) -> str: """ Streaming protocol """ return pulumi.get(self, "streaming_protocol") @property @pulumi.getter def paths(self) -> Optional[Sequence[str]]: """ Streaming paths for each protocol and encryptionScheme pair """ return pulumi.get(self, "paths") @pulumi.output_type class StreamingPolicyContentKeyResponse(dict): """ Class to specify properties of content key """ @staticmethod def __key_warning(key: str): suggest = None if key == "policyName": suggest = "policy_name" if suggest: pulumi.log.warn(f"Key '{key}' not found in StreamingPolicyContentKeyResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: StreamingPolicyContentKeyResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: StreamingPolicyContentKeyResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, label: Optional[str] = None, policy_name: Optional[str] = None, tracks: Optional[Sequence['outputs.TrackSelectionResponse']] = None): """ Class to specify properties of content key :param str label: Label can be used to specify Content Key when creating Streaming Locator :param str policy_name: Policy used by Content Key :param Sequence['TrackSelectionResponse'] tracks: Tracks which use this content key """ if label is not None: pulumi.set(__self__, "label", label) if policy_name is not None: pulumi.set(__self__, "policy_name", policy_name) if tracks is not None: pulumi.set(__self__, "tracks", tracks) @property @pulumi.getter def label(self) -> Optional[str]: """ Label can be used to specify Content Key when creating Streaming Locator """ return pulumi.get(self, "label") @property @pulumi.getter(name="policyName") def policy_name(self) -> Optional[str]: """ Policy used by Content Key """ return pulumi.get(self, "policy_name") @property @pulumi.getter def tracks(self) -> Optional[Sequence['outputs.TrackSelectionResponse']]: """ Tracks which use this content key """ return pulumi.get(self, "tracks") @pulumi.output_type class StreamingPolicyContentKeysResponse(dict): """ Class to specify properties of all content keys in Streaming Policy """ @staticmethod def __key_warning(key: str): suggest = None if key == "defaultKey": suggest = "default_key" elif key == "keyToTrackMappings": suggest = "key_to_track_mappings" if suggest: pulumi.log.warn(f"Key '{key}' not found in StreamingPolicyContentKeysResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: StreamingPolicyContentKeysResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: StreamingPolicyContentKeysResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, default_key: Optional['outputs.DefaultKeyResponse'] = None, key_to_track_mappings: Optional[Sequence['outputs.StreamingPolicyContentKeyResponse']] = None): """ Class to specify properties of all content keys in Streaming Policy :param 'DefaultKeyResponse' default_key: Default content key for an encryption scheme :param Sequence['StreamingPolicyContentKeyResponse'] key_to_track_mappings: Representing tracks needs separate content key """ if default_key is not None: pulumi.set(__self__, "default_key", default_key) if key_to_track_mappings is not None: pulumi.set(__self__, "key_to_track_mappings", key_to_track_mappings) @property @pulumi.getter(name="defaultKey") def default_key(self) -> Optional['outputs.DefaultKeyResponse']: """ Default content key for an encryption scheme """ return pulumi.get(self, "default_key") @property @pulumi.getter(name="keyToTrackMappings") def key_to_track_mappings(self) -> Optional[Sequence['outputs.StreamingPolicyContentKeyResponse']]: """ Representing tracks needs separate content key """ return pulumi.get(self, "key_to_track_mappings") @pulumi.output_type class StreamingPolicyFairPlayConfigurationResponse(dict): """ Class to specify configurations of FairPlay in Streaming Policy """ @staticmethod def __key_warning(key: str): suggest = None if key == "allowPersistentLicense": suggest = "allow_persistent_license" elif key == "customLicenseAcquisitionUrlTemplate": suggest = "custom_license_acquisition_url_template" if suggest: pulumi.log.warn(f"Key '{key}' not found in StreamingPolicyFairPlayConfigurationResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: StreamingPolicyFairPlayConfigurationResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: StreamingPolicyFairPlayConfigurationResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, allow_persistent_license: bool, custom_license_acquisition_url_template: Optional[str] = None): """ Class to specify configurations of FairPlay in Streaming Policy :param bool allow_persistent_license: All license to be persistent or not :param str custom_license_acquisition_url_template: The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys. """ pulumi.set(__self__, "allow_persistent_license", allow_persistent_license) if custom_license_acquisition_url_template is not None: pulumi.set(__self__, "custom_license_acquisition_url_template", custom_license_acquisition_url_template) @property @pulumi.getter(name="allowPersistentLicense") def allow_persistent_license(self) -> bool: """ All license to be persistent or not """ return pulumi.get(self, "allow_persistent_license") @property @pulumi.getter(name="customLicenseAcquisitionUrlTemplate") def custom_license_acquisition_url_template(self) -> Optional[str]: """ The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys. """ return pulumi.get(self, "custom_license_acquisition_url_template") @pulumi.output_type class StreamingPolicyPlayReadyConfigurationResponse(dict): """ Class to specify configurations of PlayReady in Streaming Policy """ @staticmethod def __key_warning(key: str): suggest = None if key == "customLicenseAcquisitionUrlTemplate": suggest = "custom_license_acquisition_url_template" elif key == "playReadyCustomAttributes": suggest = "play_ready_custom_attributes" if suggest: pulumi.log.warn(f"Key '{key}' not found in StreamingPolicyPlayReadyConfigurationResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: StreamingPolicyPlayReadyConfigurationResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: StreamingPolicyPlayReadyConfigurationResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, custom_license_acquisition_url_template: Optional[str] = None, play_ready_custom_attributes: Optional[str] = None): """ Class to specify configurations of PlayReady in Streaming Policy :param str custom_license_acquisition_url_template: The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys. :param str play_ready_custom_attributes: Custom attributes for PlayReady """ if custom_license_acquisition_url_template is not None: pulumi.set(__self__, "custom_license_acquisition_url_template", custom_license_acquisition_url_template) if play_ready_custom_attributes is not None: pulumi.set(__self__, "play_ready_custom_attributes", play_ready_custom_attributes) @property @pulumi.getter(name="customLicenseAcquisitionUrlTemplate") def custom_license_acquisition_url_template(self) -> Optional[str]: """ The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys. """ return pulumi.get(self, "custom_license_acquisition_url_template") @property @pulumi.getter(name="playReadyCustomAttributes") def play_ready_custom_attributes(self) -> Optional[str]: """ Custom attributes for PlayReady """ return pulumi.get(self, "play_ready_custom_attributes") @pulumi.output_type class StreamingPolicyWidevineConfigurationResponse(dict): """ Class to specify configurations of Widevine in Streaming Policy """ @staticmethod def __key_warning(key: str): suggest = None if key == "customLicenseAcquisitionUrlTemplate": suggest = "custom_license_acquisition_url_template" if suggest: pulumi.log.warn(f"Key '{key}' not found in StreamingPolicyWidevineConfigurationResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: StreamingPolicyWidevineConfigurationResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: StreamingPolicyWidevineConfigurationResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, custom_license_acquisition_url_template: Optional[str] = None): """ Class to specify configurations of Widevine in Streaming Policy :param str custom_license_acquisition_url_template: The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys. """ if custom_license_acquisition_url_template is not None: pulumi.set(__self__, "custom_license_acquisition_url_template", custom_license_acquisition_url_template) @property @pulumi.getter(name="customLicenseAcquisitionUrlTemplate") def custom_license_acquisition_url_template(self) -> Optional[str]: """ The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys. """ return pulumi.get(self, "custom_license_acquisition_url_template") @pulumi.output_type class TrackPropertyConditionResponse(dict): """ Class to specify one track property condition """ def __init__(__self__, *, operation: str, property: str, value: Optional[str] = None): """ Class to specify one track property condition :param str operation: Track property condition operation :param str property: Track property type :param str value: Track property value """ pulumi.set(__self__, "operation", operation) pulumi.set(__self__, "property", property) if value is not None: pulumi.set(__self__, "value", value) @property @pulumi.getter def operation(self) -> str: """ Track property condition operation """ return pulumi.get(self, "operation") @property @pulumi.getter def value(self) -> Optional[str]: """ Track property value """ return pulumi.get(self, "value") @property @pulumi.getter def property(self) -> str: """ Track property type """ return pulumi.get(self, "property") @pulumi.output_type class TrackSelectionResponse(dict): """ Class to select a track """ @staticmethod def __key_warning(key: str): suggest = None if key == "trackSelections": suggest = "track_selections" if suggest: pulumi.log.warn(f"Key '{key}' not found in TrackSelectionResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: TrackSelectionResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: TrackSelectionResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, track_selections: Optional[Sequence['outputs.TrackPropertyConditionResponse']] = None): """ Class to select a track :param Sequence['TrackPropertyConditionResponse'] track_selections: TrackSelections is a track property condition list which can specify track(s) """ if track_selections is not None: pulumi.set(__self__, "track_selections", track_selections) @property @pulumi.getter(name="trackSelections") def track_selections(self) -> Optional[Sequence['outputs.TrackPropertyConditionResponse']]: """ TrackSelections is a track property condition list which can specify track(s) """ return pulumi.get(self, "track_selections") @pulumi.output_type class TransformOutputResponse(dict): """ Describes the properties of a TransformOutput, which are the rules to be applied while generating the desired output. """ @staticmethod def __key_warning(key: str): suggest = None if key == "onError": suggest = "on_error" elif key == "relativePriority": suggest = "relative_priority" if suggest: pulumi.log.warn(f"Key '{key}' not found in TransformOutputResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: TransformOutputResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: TransformOutputResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, preset: Any, on_error: Optional[str] = None, relative_priority: Optional[str] = None): """ Describes the properties of a TransformOutput, which are the rules to be applied while generating the desired output. :param Union['AudioAnalyzerPresetResponse', 'BuiltInStandardEncoderPresetResponse', 'StandardEncoderPresetResponse', 'VideoAnalyzerPresetResponse'] preset: Preset that describes the operations that will be used to modify, transcode, or extract insights from the source file to generate the output. :param str on_error: A Transform can define more than one outputs. This property defines what the service should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The default is stop. :param str relative_priority: Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for processing TransformOutputs. The default priority is Normal. """ pulumi.set(__self__, "preset", preset) if on_error is not None: pulumi.set(__self__, "on_error", on_error) if relative_priority is not None: pulumi.set(__self__, "relative_priority", relative_priority) @property @pulumi.getter def preset(self) -> Any: """ Preset that describes the operations that will be used to modify, transcode, or extract insights from the source file to generate the output. """ return pulumi.get(self, "preset") @property @pulumi.getter(name="onError") def on_error(self) -> Optional[str]: """ A Transform can define more than one outputs. This property defines what the service should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The default is stop. """ return pulumi.get(self, "on_error") @property @pulumi.getter(name="relativePriority") def relative_priority(self) -> Optional[str]: """ Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for processing TransformOutputs. The default priority is Normal. """ return pulumi.get(self, "relative_priority") @pulumi.output_type class TransportStreamFormatResponse(dict): """ Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s). """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "filenamePattern": suggest = "filename_pattern" elif key == "outputFiles": suggest = "output_files" if suggest: pulumi.log.warn(f"Key '{key}' not found in TransportStreamFormatResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: TransportStreamFormatResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: TransportStreamFormatResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, filename_pattern: Optional[str] = None, output_files: Optional[Sequence['outputs.OutputFileResponse']] = None): """ Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s). :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.TransportStreamFormat'. :param str filename_pattern: The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. :param Sequence['OutputFileResponse'] output_files: The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.TransportStreamFormat') if filename_pattern is not None: pulumi.set(__self__, "filename_pattern", filename_pattern) if output_files is not None: pulumi.set(__self__, "output_files", output_files) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.TransportStreamFormat'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="filenamePattern") def filename_pattern(self) -> Optional[str]: """ The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. """ return pulumi.get(self, "filename_pattern") @property @pulumi.getter(name="outputFiles") def output_files(self) -> Optional[Sequence['outputs.OutputFileResponse']]: """ The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . """ return pulumi.get(self, "output_files") @pulumi.output_type class VideoAnalyzerPresetResponse(dict): """ A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format file. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "audioInsightsOnly": suggest = "audio_insights_only" elif key == "audioLanguage": suggest = "audio_language" if suggest: pulumi.log.warn(f"Key '{key}' not found in VideoAnalyzerPresetResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: VideoAnalyzerPresetResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: VideoAnalyzerPresetResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, audio_insights_only: Optional[bool] = None, audio_language: Optional[str] = None): """ A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format file. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.VideoAnalyzerPreset'. :param bool audio_insights_only: Whether to only extract audio insights when processing a video file. :param str audio_language: The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN'. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.VideoAnalyzerPreset') if audio_insights_only is not None: pulumi.set(__self__, "audio_insights_only", audio_insights_only) if audio_language is not None: pulumi.set(__self__, "audio_language", audio_language) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.VideoAnalyzerPreset'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="audioInsightsOnly") def audio_insights_only(self) -> Optional[bool]: """ Whether to only extract audio insights when processing a video file. """ return pulumi.get(self, "audio_insights_only") @property @pulumi.getter(name="audioLanguage") def audio_language(self) -> Optional[str]: """ The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN'. """ return pulumi.get(self, "audio_language") @pulumi.output_type class VideoOverlayResponse(dict): """ Describes the properties of a video overlay. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "audioGainLevel": suggest = "audio_gain_level" elif key == "cropRectangle": suggest = "crop_rectangle" elif key == "fadeInDuration": suggest = "fade_in_duration" elif key == "fadeOutDuration": suggest = "fade_out_duration" elif key == "inputLabel": suggest = "input_label" if suggest: pulumi.log.warn(f"Key '{key}' not found in VideoOverlayResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: VideoOverlayResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: VideoOverlayResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, audio_gain_level: Optional[float] = None, crop_rectangle: Optional['outputs.RectangleResponse'] = None, end: Optional[str] = None, fade_in_duration: Optional[str] = None, fade_out_duration: Optional[str] = None, input_label: Optional[str] = None, opacity: Optional[float] = None, position: Optional['outputs.RectangleResponse'] = None, start: Optional[str] = None): """ Describes the properties of a video overlay. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.VideoOverlay'. :param float audio_gain_level: The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. :param 'RectangleResponse' crop_rectangle: An optional rectangular window used to crop the overlay image or video. :param str end: The position in the input video at which the overlay ends. The value should be in ISO 8601 duration format. For example, PT30S to end the overlay at 30 seconds in to the input video. If not specified the overlay will be applied until the end of the input video if inputLoop is true. Else, if inputLoop is false, then overlay will last as long as the duration of the overlay media. :param str fade_in_duration: The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as PT0S). :param str fade_out_duration: The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as PT0S). :param str input_label: The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video file formats. :param float opacity: The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. :param 'RectangleResponse' position: The location in the input video where the overlay is applied. :param str start: The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds in to the input video. If not specified the overlay starts from the beginning of the input video. """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.VideoOverlay') if audio_gain_level is not None: pulumi.set(__self__, "audio_gain_level", audio_gain_level) if crop_rectangle is not None: pulumi.set(__self__, "crop_rectangle", crop_rectangle) if end is not None: pulumi.set(__self__, "end", end) if fade_in_duration is not None: pulumi.set(__self__, "fade_in_duration", fade_in_duration) if fade_out_duration is not None: pulumi.set(__self__, "fade_out_duration", fade_out_duration) if input_label is not None: pulumi.set(__self__, "input_label", input_label) if opacity is not None: pulumi.set(__self__, "opacity", opacity) if position is not None: pulumi.set(__self__, "position", position) if start is not None: pulumi.set(__self__, "start", start) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.VideoOverlay'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="audioGainLevel") def audio_gain_level(self) -> Optional[float]: """ The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. """ return pulumi.get(self, "audio_gain_level") @property @pulumi.getter(name="cropRectangle") def crop_rectangle(self) -> Optional['outputs.RectangleResponse']: """ An optional rectangular window used to crop the overlay image or video. """ return pulumi.get(self, "crop_rectangle") @property @pulumi.getter def end(self) -> Optional[str]: """ The position in the input video at which the overlay ends. The value should be in ISO 8601 duration format. For example, PT30S to end the overlay at 30 seconds in to the input video. If not specified the overlay will be applied until the end of the input video if inputLoop is true. Else, if inputLoop is false, then overlay will last as long as the duration of the overlay media. """ return pulumi.get(self, "end") @property @pulumi.getter(name="fadeInDuration") def fade_in_duration(self) -> Optional[str]: """ The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as PT0S). """ return pulumi.get(self, "fade_in_duration") @property @pulumi.getter(name="fadeOutDuration") def fade_out_duration(self) -> Optional[str]: """ The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as PT0S). """ return pulumi.get(self, "fade_out_duration") @property @pulumi.getter(name="inputLabel") def input_label(self) -> Optional[str]: """ The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video file formats. """ return pulumi.get(self, "input_label") @property @pulumi.getter def opacity(self) -> Optional[float]: """ The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. """ return pulumi.get(self, "opacity") @property @pulumi.getter def position(self) -> Optional['outputs.RectangleResponse']: """ The location in the input video where the overlay is applied. """ return pulumi.get(self, "position") @property @pulumi.getter def start(self) -> Optional[str]: """ The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds in to the input video. If not specified the overlay starts from the beginning of the input video. """ return pulumi.get(self, "start") @pulumi.output_type class VideoResponse(dict): """ Describes the basic properties for encoding the input video. """ @staticmethod def __key_warning(key: str): suggest = None if key == "odataType": suggest = "odata_type" elif key == "keyFrameInterval": suggest = "key_frame_interval" elif key == "stretchMode": suggest = "stretch_mode" if suggest: pulumi.log.warn(f"Key '{key}' not found in VideoResponse. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: VideoResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: VideoResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, key_frame_interval: Optional[str] = None, label: Optional[str] = None, stretch_mode: Optional[str] = None): """ Describes the basic properties for encoding the input video. :param str odata_type: The discriminator for derived types. Expected value is '#Microsoft.Media.Video'. :param str key_frame_interval: The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). :param str label: An optional label for the codec. The label can be used to control muxing behavior. :param str stretch_mode: The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize """ pulumi.set(__self__, "odata_type", '#Microsoft.Media.Video') if key_frame_interval is not None: pulumi.set(__self__, "key_frame_interval", key_frame_interval) if label is not None: pulumi.set(__self__, "label", label) if stretch_mode is not None: pulumi.set(__self__, "stretch_mode", stretch_mode) @property @pulumi.getter(name="odataType") def odata_type(self) -> str: """ The discriminator for derived types. Expected value is '#Microsoft.Media.Video'. """ return pulumi.get(self, "odata_type") @property @pulumi.getter(name="keyFrameInterval") def key_frame_interval(self) -> Optional[str]: """ The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). """ return pulumi.get(self, "key_frame_interval") @property @pulumi.getter def label(self) -> Optional[str]: """ An optional label for the codec. The label can be used to control muxing behavior. """ return pulumi.get(self, "label") @property @pulumi.getter(name="stretchMode") def stretch_mode(self) -> Optional[str]: """ The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize """ return pulumi.get(self, "stretch_mode")
41.725572
561
0.654131
28,881
249,811
5.479658
0.033274
0.016277
0.024479
0.035777
0.801887
0.767494
0.742945
0.687858
0.669457
0.653572
0
0.004581
0.255541
249,811
5,986
562
41.732543
0.846387
0.339677
0
0.677887
1
0.020313
0.198918
0.085119
0
0
0
0
0
1
0.172084
false
0.004063
0.002031
0
0.325885
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
31cf7c51de5c34f8ad2c78eb594fc6b7ad2bf188
117
py
Python
RandomGenerator/RandomInts/RandomWithSeed.py
Parikshit-njit/Calculator-is601
929317871afec437fa9a903d9fe46dcb66da5d60
[ "MIT" ]
1
2021-07-07T22:49:49.000Z
2021-07-07T22:49:49.000Z
RandomGenerator/RandomInts/RandomWithSeed.py
Parikshit-njit/Calculator-is601
929317871afec437fa9a903d9fe46dcb66da5d60
[ "MIT" ]
null
null
null
RandomGenerator/RandomInts/RandomWithSeed.py
Parikshit-njit/Calculator-is601
929317871afec437fa9a903d9fe46dcb66da5d60
[ "MIT" ]
null
null
null
import random def random_with_seed(start, stop, seed): random.seed(seed) return random.randint(start, stop)
19.5
40
0.735043
17
117
4.941176
0.529412
0.214286
0
0
0
0
0
0
0
0
0
0
0.162393
117
6
41
19.5
0.857143
0
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
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
0
0
1
0
0
5
9efdd08ed5cfc87c2814c4d3c796a8a67fdd7c26
36
py
Python
tests/__init__.py
brucetony/aop2db
117e60d2e0a356c7944b33b26ddc64a9a952162c
[ "MIT" ]
null
null
null
tests/__init__.py
brucetony/aop2db
117e60d2e0a356c7944b33b26ddc64a9a952162c
[ "MIT" ]
null
null
null
tests/__init__.py
brucetony/aop2db
117e60d2e0a356c7944b33b26ddc64a9a952162c
[ "MIT" ]
null
null
null
"""Unit test package for aop2db."""
18
35
0.666667
5
36
4.8
1
0
0
0
0
0
0
0
0
0
0
0.032258
0.138889
36
1
36
36
0.741935
0.805556
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
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
73001d14fe9e31346f5d7f4bdd9fd9d4528eb6e8
53
py
Python
utils/models/hyperdensenet/__init__.py
bhklab/ptl-oar-segmentation
354c3ee7f042a025f74e210a7b8462beac9b727d
[ "Apache-2.0" ]
3
2022-01-18T19:25:46.000Z
2022-02-05T18:53:24.000Z
utils/models/hyperdensenet/__init__.py
bhklab/ptl-oar-segmentation
354c3ee7f042a025f74e210a7b8462beac9b727d
[ "Apache-2.0" ]
null
null
null
utils/models/hyperdensenet/__init__.py
bhklab/ptl-oar-segmentation
354c3ee7f042a025f74e210a7b8462beac9b727d
[ "Apache-2.0" ]
null
null
null
from .model import HyperDenseNet, HyperDenseNet_2Mod
26.5
52
0.867925
6
53
7.5
0.833333
0
0
0
0
0
0
0
0
0
0
0.020833
0.09434
53
1
53
53
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
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
5
731b70d4ddde8e6698e601ad8397f77c88576792
1,127
py
Python
python/test/test_authorizations_api.py
openlattice/api-clients
1d5be9861785b295089b732f37464e31bf80c8ca
[ "Apache-2.0" ]
null
null
null
python/test/test_authorizations_api.py
openlattice/api-clients
1d5be9861785b295089b732f37464e31bf80c8ca
[ "Apache-2.0" ]
1
2021-01-20T00:20:01.000Z
2021-01-20T00:20:01.000Z
python/test/test_authorizations_api.py
openlattice/api-clients
1d5be9861785b295089b732f37464e31bf80c8ca
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ OpenLattice API OpenLattice API # noqa: E501 The version of the OpenAPI document: 0.0.1 Contact: support@openlattice.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import openlattice from openlattice.api.authorizations_api import AuthorizationsApi # noqa: E501 from openlattice.rest import ApiException class TestAuthorizationsApi(unittest.TestCase): """AuthorizationsApi unit test stubs""" def setUp(self): self.api = openlattice.api.authorizations_api.AuthorizationsApi() # noqa: E501 def tearDown(self): pass def test_check_authorizations(self): """Test case for check_authorizations Check authorizations # noqa: E501 """ pass def test_get_accessible_objects(self): """Test case for get_accessible_objects Returns paged results for all authorized objects of specified objectType, that the current user has specified permission for. # noqa: E501 """ pass if __name__ == '__main__': unittest.main()
23
147
0.700089
128
1,127
5.984375
0.492188
0.052219
0.044386
0.08094
0
0
0
0
0
0
0
0.021739
0.22449
1,127
48
148
23.479167
0.854691
0.433008
0
0.1875
1
0
0.014286
0
0
0
0
0
0
1
0.25
false
0.1875
0.3125
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
1
1
0
1
0
0
5
732f4d20a3f9f11a89754d2c0b2cc6670ad1967c
64
py
Python
womail/__init__.py
lee233/dailysign
a6b3e3bf4315f2213a1b0bda521abf261245b3e0
[ "MIT" ]
68
2021-05-12T18:32:46.000Z
2021-12-06T07:00:52.000Z
womail/__init__.py
lee233/dailysign
a6b3e3bf4315f2213a1b0bda521abf261245b3e0
[ "MIT" ]
null
null
null
womail/__init__.py
lee233/dailysign
a6b3e3bf4315f2213a1b0bda521abf261245b3e0
[ "MIT" ]
37
2021-05-12T04:37:26.000Z
2022-03-29T09:16:07.000Z
# -*- coding: utf-8 -*- from womail.womail import WoMailCheckIn
21.333333
39
0.703125
8
64
5.625
0.875
0
0
0
0
0
0
0
0
0
0
0.018182
0.140625
64
2
40
32
0.8
0.328125
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
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
0
1
0
1
0
1
0
0
5
7df81bb4df4818c11109e2497926fde422691b53
75
py
Python
models/link.py
dainiuskreivenas/rbs
1d371963ccd64976b3f0603dead891f51996cfb1
[ "MIT" ]
1
2021-10-04T17:44:04.000Z
2021-10-04T17:44:04.000Z
models/link.py
dainiuskreivenas/rbs
1d371963ccd64976b3f0603dead891f51996cfb1
[ "MIT" ]
12
2019-07-16T08:31:50.000Z
2019-11-19T17:58:53.000Z
models/link.py
dainiuskreivenas/rbs
1d371963ccd64976b3f0603dead891f51996cfb1
[ "MIT" ]
null
null
null
class Link: def __init__(self, caIndex): self.caIndex = caIndex
25
32
0.653333
9
75
5
0.666667
0.488889
0
0
0
0
0
0
0
0
0
0
0.253333
75
3
33
25
0.803571
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
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
0
0
0
0
1
0
0
5
b41a8b7d0fea151ac016c75b72255f38ea98e593
113
py
Python
piconumpy/test_purepy_array.py
pyhandle/piconumpy
ee2907c15c3a2142d0d15b4c1708baba6f15a8ce
[ "BSD-3-Clause" ]
10
2021-04-03T05:59:52.000Z
2021-11-30T06:36:29.000Z
piconumpy/test_purepy_array.py
pyhandle/piconumpy
ee2907c15c3a2142d0d15b4c1708baba6f15a8ce
[ "BSD-3-Clause" ]
4
2020-12-09T10:17:17.000Z
2021-11-27T14:25:23.000Z
piconumpy/test_purepy_array.py
pyhandle/piconumpy
ee2907c15c3a2142d0d15b4c1708baba6f15a8ce
[ "BSD-3-Clause" ]
1
2021-07-19T14:01:33.000Z
2021-07-19T14:01:33.000Z
from .test_cpython_capi import Tests as _Tests class Tests(_Tests): from . import purepy_array as piconumpy
22.6
46
0.787611
17
113
4.941176
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.168142
113
4
47
28.25
0.893617
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
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
0
1
0
1
0
1
0
0
5
b4220df65e973efc71ff87b770592fe64650c682
123
py
Python
Section21_Strategy/Practice/AbstractDiscriminantStrategy.py
enriqueescobar-askida/Kinito.Python
e4c5521e771c4de0ceaf81776a4a61f7de01edb4
[ "MIT" ]
1
2020-10-20T07:41:51.000Z
2020-10-20T07:41:51.000Z
Section21_Strategy/Practice/AbstractDiscriminantStrategy.py
enriqueescobar-askida/Kinito.Python
e4c5521e771c4de0ceaf81776a4a61f7de01edb4
[ "MIT" ]
null
null
null
Section21_Strategy/Practice/AbstractDiscriminantStrategy.py
enriqueescobar-askida/Kinito.Python
e4c5521e771c4de0ceaf81776a4a61f7de01edb4
[ "MIT" ]
null
null
null
from abc import ABC class AbstractDiscriminantStrategy(ABC): def calculate_discriminant(self, a, b, c): pass
17.571429
46
0.715447
15
123
5.8
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.211382
123
6
47
20.5
0.896907
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
b43664f902a9ebdd31d1c1ebe6eb201d4732bfc2
194
py
Python
Lesson_1/1.3_Lab.py
gabistein/warden_introcs
fbc8de1d937b94951369929deb2f2a0b285e47f2
[ "MIT" ]
null
null
null
Lesson_1/1.3_Lab.py
gabistein/warden_introcs
fbc8de1d937b94951369929deb2f2a0b285e47f2
[ "MIT" ]
null
null
null
Lesson_1/1.3_Lab.py
gabistein/warden_introcs
fbc8de1d937b94951369929deb2f2a0b285e47f2
[ "MIT" ]
null
null
null
#Four Fours #Zero print("Zero is ", 44-44) # One print("One is ", 4/4 * 4/4) # Two print("Two is ", (4*4)/(4+4) ) # Three print("Three is ", (4 + 4 + 4)/4) # Four print("Four is ", (4-4)/4 + 4)
17.636364
33
0.525773
40
194
2.55
0.25
0.235294
0.235294
0.196078
0.235294
0
0
0
0
0
0
0.12987
0.206186
194
11
34
17.636364
0.532468
0.175258
0
0
0
0
0.251613
0
0
0
0
0
0
1
0
true
0
0
0
0
1
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5