|
Connected Home over IP
672cf7684
|
#include <core/CHIPConfig.h>
Go to the source code of this file.
Macros | |
| #define | CHIP_DEVICE_CONFIG_CHIP_TASK_NAME "CHIP" |
| CHIP_DEVICE_CONFIG_CHIP_TASK_NAME. More... | |
| #define | CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 4096 |
| CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE. More... | |
| #define | CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY 1 |
| CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY. More... | |
| #define | CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 100 |
| CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING 0 |
| CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING. More... | |
| #define | CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH 1 |
| CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH. More... | |
| #define | CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "TEST_VENDOR" |
| CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME. More... | |
| #define | CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 9050 |
| CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID. More... | |
| #define | CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "TEST_PRODUCT" |
| CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME. More... | |
| #define | CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 65279 |
| CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID. More... | |
| #define | CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION_STRING "TEST_VERSION" |
| CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION_STRING. More... | |
| #define | CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION 1 |
| CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION. More... | |
| #define | CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING "prerelease" |
| CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING. More... | |
| #define | CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION 1 |
| CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION. More... | |
| #define | CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" |
| CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER. More... | |
| #define | CHIP_DEVICE_CONFIG_USER_SELECTED_MODE_TIMEOUT_SEC 30 |
| CHIP_DEVICE_CONFIG_USER_SELECTED_MODE_TIMEOUT_SEC. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 |
| CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION. More... | |
| #define | CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL 5000 |
| CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL. More... | |
| #define | CHIP_DEVICE_CONFIG_MAX_SCAN_NETWORKS_RESULTS 10 |
| CHIP_DEVICE_CONFIG_MAX_SCAN_NETWORKS_RESULTS. More... | |
| #define | CHIP_DEVICE_CONFIG_WIFI_SCAN_COMPLETION_TIMEOUT 10000 |
| CHIP_DEVICE_CONFIG_WIFI_SCAN_COMPLETION_TIMEOUT. More... | |
| #define | CHIP_DEVICE_CONFIG_WIFI_CONNECTIVITY_TIMEOUT 30000 |
| CHIP_DEVICE_CONFIG_WIFI_CONNECTIVITY_TIMEOUT. More... | |
| #define | CHIP_DEVICE_CONFIG_LWIP_WIFI_STATION_IF_NAME "wl" |
| CHIP_DEVICE_CONFIG_LWIP_WIFI_STATION_IF_NAME. More... | |
| #define | CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME "wlan0" |
| CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 1 |
| CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP. More... | |
| #define | CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX "CHIP-" |
| CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX. More... | |
| #define | CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL 1 |
| CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL. More... | |
| #define | CHIP_DEVICE_CONFIG_WIFI_AP_MAX_STATIONS 4 |
| CHIP_DEVICE_CONFIG_WIFI_AP_MAX_STATIONS. More... | |
| #define | CHIP_DEVICE_CONFIG_WIFI_AP_BEACON_INTERVAL 100 |
| CHIP_DEVICE_CONFIG_WIFI_AP_BEACON_INTERVAL. More... | |
| #define | CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT 120000 |
| CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT. More... | |
| #define | CHIP_DEVICE_CONFIG_LWIP_WIFI_AP_IF_NAME "ap" |
| CHIP_DEVICE_CONFIG_LWIP_WIFI_AP_IF_NAME. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0 |
| CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE. More... | |
| #define | CHIP_DEVICE_CONFIG_CHIPOBLE_SINGLE_CONNECTION 1 |
| CHIP_DEVICE_CONFIG_SINGLE_CHIPOBLE_CONNECTION. More... | |
| #define | CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED 0 |
| CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED. More... | |
| #define | CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART 1 |
| CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART 1 |
| CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART. More... | |
| #define | CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX "CHIP-" |
| CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX. More... | |
| #define | CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN 32 |
| CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN. More... | |
| #define | CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX 96 |
| CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX. More... | |
| #define | CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN 240 |
| CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN. More... | |
| #define | CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX 1920 |
| CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX. More... | |
| #define | CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME 30000 |
| CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME. More... | |
| #define | CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000) |
| CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 |
| CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC. More... | |
| #define | CHIP_DEVICE_CONFIG_CHIP_TIME_SERVICE_ENDPOINT_ID 0x18B4300200000005ULL |
| CHIP_DEVICE_CONFIG_CHIP_TIME_SERVICE_ENDPOINT_ID. More... | |
| #define | CHIP_DEVICE_CONFIG_DEFAULT_TIME_SYNC_INTERVAL 180 |
| CHIP_DEVICE_CONFIG_DEFAULT_TIME_SYNC_INTERVAL. More... | |
| #define | CHIP_DEVICE_CONFIG_TIME_SYNC_TIMEOUT 10000 |
| CHIP_DEVICE_CONFIG_TIME_SYNC_TIMEOUT. More... | |
| #define | CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_ENDPOINT_ID 0x18B4300200000010ULL |
| CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_ENDPOINT_ID. More... | |
| #define | CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_CONNECTIVITY_TIMEOUT 10000 |
| CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_CONNECTIVITY_TIMEOUT. More... | |
| #define | CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_REQUEST_TIMEOUT 10000 |
| CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_REQUEST_TIMEOUT. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_JUST_IN_TIME_PROVISIONING 0 |
| CHIP_DEVICE_CONFIG_ENABLE_JUST_IN_TIME_PROVISIONING. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_MDNS 0 |
| CHIP_DEVICE_CONFIG_ENABLE_MDNS. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 0 |
| CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_THREAD 0 |
| CHIP_DEVICE_CONFIG_ENABLE_THREAD. More... | |
| #define | CHIP_DEVICE_CONFIG_THREAD_FTD 1 |
| CHIP_DEVICE_CONFIG_THREAD_FTD. More... | |
| #define | CHIP_DEVICE_CONFIG_THREAD_TASK_NAME "THREAD" |
| CHIP_DEVICE_CONFIG_THREAD_TASK_NAME. More... | |
| #define | CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE 8192 |
| CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE. More... | |
| #define | CHIP_DEVICE_CONFIG_THREAD_TASK_PRIORITY 2 |
| CHIP_DEVICE_CONFIG_THREAD_TASK_PRIORITY. More... | |
| #define | CHIP_DEVICE_CONFIG_LWIP_THREAD_IF_NAME "th" |
| CHIP_DEVICE_CONFIG_LWIP_THREAD_IF_NAME. More... | |
| #define | CHIP_DEVICE_CONFIG_THREAD_IF_MTU 1280 |
| CHIP_DEVICE_CONFIG_THREAD_IF_MTU. More... | |
| #define | CHIP_DEVICE_CONFIG_DEFAULT_THREAD_NETWORK_NAME_PREFIX "CHIP-PAN-" |
| CHIP_DEVICE_CONFIG_DEFAULT_THREAD_NETWORK_NAME_PREFIX. More... | |
| #define | CHIP_DEVICE_CONFIG_THREAD_CONNECTIVITY_TIMEOUT 30000 |
| CHIP_DEVICE_CONFIG_THREAD_CONNECTIVITY_TIMEOUT. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_TRAIT_MANAGER 0 |
| CHIP_DEVICE_CONFIG_ENABLE_TRAIT_MANAGER. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 0 |
| CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY (0) |
| Enable automatically uploading Wi-Fi telemetry via trait on an interval. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY (0) |
| Enable automatically uploading minimal Thread telemetry and topology via trait on an interval. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL (0) |
| Enable automatically uploading all Thread telemetry and topology via trait on an interval. This is suitable for products that have router capability. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_NETWORK_TELEMETRY (CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY || CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY) |
| #define | CHIP_DEVICE_CONFIG_DEFAULT_TELEMETRY_INTERVAL_MS 90000 |
| This sets the default interval at which network telemetry events will be logged to chip buffers. This can be overwritten at runtime with a trait. More... | |
| #define | CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE (1024) |
| A size, in bytes, of the individual critical event logging buffer. Note: the critical event buffer must exist. More... | |
| #define | CHIP_DEVICE_CONFIG_EVENT_LOGGING_PROD_BUFFER_SIZE (512) |
| A size, in bytes, of the individual production event logging buffer. Note: the production event buffer must exist. More... | |
| #define | CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE (512) |
| A size, in bytes, of the individual info event logging buffer. Note: set to 0 to disable info event buffer and all support for the info level events. More... | |
| #define | CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (256) |
| A size, in bytes, of the individual debug event logging buffer. Note: set to 0 to disable debug event buffer and all support for the debug level events. More... | |
| #define | CHIP_DEVICE_CONFIG_EVENT_ID_COUNTER_EPOCH (0x10000) |
| The event id counter persisted storage epoch. More... | |
| #define | CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_CRIT_EIDC_KEY "crit-eidc" |
| The critical event id counter (eidc) persisted storage key. More... | |
| #define | CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_PROD_EIDC_KEY "prod-eidc" |
| The production event id counter (eidc) persisted storage key. More... | |
| #define | CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_INFO_EIDC_KEY "info-eidc" |
| The info event id counter (eidc) persisted storage key. More... | |
| #define | CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_DEBUG_EIDC_KEY "debug-eidc" |
| The debug event id counter (eidc) persisted storage key. More... | |
| #define | CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER 1 |
| CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER. More... | |
| #define | CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_URI_LEN 128 |
| CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_URI_LEN. More... | |
| #define | CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_ENDPOINT_ID 0x18B4300200000002ULL |
| CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_ENDPOINT_ID. More... | |
| #define | CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_ENDPOINT_ID 0x18B4300200000013ULL |
| CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_ENDPOINT_ID. More... | |
| #define | CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_RESPONSE_TIMEOUT 10000 |
| CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_RESPONSE_TIMEOUT. More... | |
| #define | CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_RESPONSE_TIMEOUT 10000 |
| CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_RESPONSE_TIMEOUT. More... | |
| #define | CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_RETRIES 5 |
| CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_RETRIES. More... | |
| #define | CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_WAIT_TIME_INTERVAL_MS 1 * 60 * 60 * 1000 |
| CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_WAIT_TIME_INTERVAL_MS. More... | |
| #define | CHIP_DEVICE_CONFIG_SWU_MIN_WAIT_TIME_INTERVAL_PERCENT_PER_STEP 50 |
| If default software update retry policy is used, specify the minimum wait time as a percentage of the max wait interval for that step. More... | |
| #define | CHIP_DEVICE_CONFIG_SWU_WAIT_TIME_MULTIPLIER_MS 1 * 60 * 1000 |
| If default software update retry policy is used, specify the multiplier that multiplies the result of a Fibonacci computation based on a specific index to provide a max wait time for a step. More... | |
| #define | CHIP_DEVICE_CONFIG_SWU_BDX_BLOCK_SIZE 1024 |
| CHIP_DEVICE_CONFIG_SWU_BDX_BLOCK_SIZE. More... | |
| #define | CHIP_DEVICE_CONFIG_FIRWMARE_BUILD_DATE __DATE__ |
| CHIP_DEVICE_CONFIG_FIRWMARE_BUILD_DATE. More... | |
| #define | CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME __TIME__ |
| CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME. More... | |
Defines compile-time configuration values for the chip Device Layer.
| #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME 30000 |
CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME.
The amount of time in miliseconds after which BLE advertisement should be switched from the fast advertising to the slow advertising, counting from the moment of advertisement commencement.
Defaults to 30000 (30 seconds).
| #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000) |
CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT.
The amount of time in miliseconds after which BLE advertisement should be disabled, counting from the moment of advertisement commencement.
Defaults to 9000000 (15 minutes).
| #define CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX "CHIP-" |
CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX.
A prefix string used in forming the BLE device name. The remainder of the name consists of the final two bytes of the device's chip node id in hex.
NOTE: The device layer limits the total length of a device name to 16 characters. However, due to other data sent in CHIPoBLE advertise packets, the device name may need to be shorter.
| #define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX 96 |
CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX.
The maximum interval (in units of 0.625ms) at which the device will send BLE advertisements while in fast advertising mode. The maximum interval should be greater and not equal to the CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN.
Defaults to 96 (60 ms).
| #define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN 32 |
CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN.
The minimum interval (in units of 0.625ms) at which the device will send BLE advertisements while in fast advertising mode. The minimum interval should be less and not equal to the CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX.
Defaults to 32 (20 ms).
| #define CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX 1920 |
CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX.
The maximum interval (in units of 0.625ms) at which the device will send BLE advertisements while in slow advertising mode. The maximum interval should be greater and not equal to the CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN.
Defaults to 1920 (1200 ms).
| #define CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN 240 |
CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN.
The minimum interval (in units of 0.625ms) at which the device will send BLE advertisements while in slow advertising mode. The minimum interval should be greater and not equal to the CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX.
Defaults to 240 (150 ms).
| #define CHIP_DEVICE_CONFIG_CHIP_TASK_NAME "CHIP" |
CHIP_DEVICE_CONFIG_CHIP_TASK_NAME.
The name of the chip task.
| #define CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY 1 |
CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY.
The priority of the chip task.
| #define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 4096 |
CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE.
The size (in bytes) of the chip task stack.
| #define CHIP_DEVICE_CONFIG_CHIP_TIME_SERVICE_ENDPOINT_ID 0x18B4300200000005ULL |
CHIP_DEVICE_CONFIG_CHIP_TIME_SERVICE_ENDPOINT_ID.
Specifies the service endpoint id of the chip Time Sync service to be used to synchronize time.
This value is only meaningful if CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC has been enabled.
| #define CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED 0 |
CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED.
Automatically disable CHIPoBLE advertising when the device transitions to a fully provisioned state.
| #define CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART 1 |
CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART.
Enable CHIPoBLE advertising start automatically after device power-up.
CHIP's device may start advertising automatically only if its all primary device functions are within a CHIP network. Device providing unrelated to CHIP functionalities should not start advertising automatically after power-up.
TODO: Default value should be changed to 0, after all platforms will implement enabling advertisement in their own way.
| #define CHIP_DEVICE_CONFIG_CHIPOBLE_SINGLE_CONNECTION 1 |
CHIP_DEVICE_CONFIG_SINGLE_CHIPOBLE_CONNECTION.
Limit support for chip-over-BLE (CHIPoBLE) to a single connection. When set, CHIPoBLE advertisements will stop while a CHIPoBLE connection is active.
| #define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION 1 |
CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION.
The default product revision number assigned to the device or product by the device vendor.
Product revisions are specific to a particular device vendor and product id, and typically correspond to a revision of the physical device, a change to its packaging, and/or a change to its marketing presentation. This value is generally not incremented for device software revisions.
This is a default value which is used when a product revision has not been stored in device persistent storage (e.g. by a factory provisioning process).
| #define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION_STRING "TEST_VERSION" |
CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION_STRING.
Human readable string identifying version of the product assigned by the device vendor.
| #define CHIP_DEVICE_CONFIG_DEFAULT_TELEMETRY_INTERVAL_MS 90000 |
This sets the default interval at which network telemetry events will be logged to chip buffers. This can be overwritten at runtime with a trait.
| #define CHIP_DEVICE_CONFIG_DEFAULT_THREAD_NETWORK_NAME_PREFIX "CHIP-PAN-" |
CHIP_DEVICE_CONFIG_DEFAULT_THREAD_NETWORK_NAME_PREFIX.
A prefix string to be used when forming a default Thread network name.
| #define CHIP_DEVICE_CONFIG_DEFAULT_TIME_SYNC_INTERVAL 180 |
CHIP_DEVICE_CONFIG_DEFAULT_TIME_SYNC_INTERVAL.
Specifies the minimum interval (in seconds) at which the device should synchronize its real time clock with the configured chip Time Sync server.
This value is only meaningful if CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC has been enabled.
| #define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION 1 |
CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION.
A monothonic number identifying the firmware revision running on the device.
| #define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING "prerelease" |
CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING.
A string identifying the firmware revision running on the device.
| #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 65279 |
CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID.
The unique id assigned by the device vendor to identify the product or device type. This number is scoped to the device vendor id.
| #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "TEST_PRODUCT" |
CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME.
Human readable name of the device model.
| #define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 9050 |
CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID.
The CHIP-assigned vendor id for the organization responsible for producing the device.
| #define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "TEST_VENDOR" |
CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME.
Human readable vendor name for the organization responsible for producing the device.
| #define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 |
CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC.
Enables synchronizing the device's real time clock with a remote chip Time service using the chip Time Sync protocol.
| #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0 |
CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE.
Enable support for chip-over-BLE (CHIPoBLE).
| #define CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING 0 |
CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING.
Enable the device factory provisioning feature.
The factory provisioning feature allows factory or developer-supplied provisioning information to be injected into a device at boot time and automatically stored in persistent storage.
| #define CHIP_DEVICE_CONFIG_ENABLE_JUST_IN_TIME_PROVISIONING 0 |
CHIP_DEVICE_CONFIG_ENABLE_JUST_IN_TIME_PROVISIONING.
Enable just-in-time provisioning functionality in the chip Device Layer.
When enabled, device creates and uses its ephemeral operational credentials:
Then, device uses these credentials to authenticate and communicate to other chip nodes.
| #define CHIP_DEVICE_CONFIG_ENABLE_MDNS 0 |
CHIP_DEVICE_CONFIG_ENABLE_MDNS.
Enable support to use MDNS for service advertising and discovery in CHIP.
| #define CHIP_DEVICE_CONFIG_ENABLE_NETWORK_TELEMETRY (CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY || CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY) |
| #define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART 1 |
CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART.
Enable opening pairing window automatically after device power-up.
| #define CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER 1 |
CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER.
Enable or disable the chip Software Update Manager.
| #define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 0 |
CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY.
Enables the use of a hard-coded default chip device id and credentials if no device id is found in chip NV storage. The value specifies which of 10 identities, numbered 1 through 10, is to be used. A value of 0 disables use of a default identity.
This option is for testing only and should be disabled in production releases.
| #define CHIP_DEVICE_CONFIG_ENABLE_THREAD 0 |
CHIP_DEVICE_CONFIG_ENABLE_THREAD.
Enable support for Thread in the chip Device Layer.
| #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 0 |
CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT.
Enable support to DNS-SD SRP client usage for service advertising and discovery in CHIP.
| #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY (0) |
Enable automatically uploading minimal Thread telemetry and topology via trait on an interval.
| #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL (0) |
Enable automatically uploading all Thread telemetry and topology via trait on an interval. This is suitable for products that have router capability.
| #define CHIP_DEVICE_CONFIG_ENABLE_TRAIT_MANAGER 0 |
CHIP_DEVICE_CONFIG_ENABLE_TRAIT_MANAGER.
Enable or disable the chip Trait Manager.
NOTE: The Trait Manager is an experimental feature of the chip Device Layer.
| #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 1 |
CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP.
Enable support for a WiFi AP interface.
| #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 |
CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION.
Enable support for a WiFi station interface.
| #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY (0) |
Enable automatically uploading Wi-Fi telemetry via trait on an interval.
| #define CHIP_DEVICE_CONFIG_EVENT_ID_COUNTER_EPOCH (0x10000) |
The event id counter persisted storage epoch.
| #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE (1024) |
A size, in bytes, of the individual critical event logging buffer. Note: the critical event buffer must exist.
| #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (256) |
A size, in bytes, of the individual debug event logging buffer. Note: set to 0 to disable debug event buffer and all support for the debug level events.
| #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE (512) |
A size, in bytes, of the individual info event logging buffer. Note: set to 0 to disable info event buffer and all support for the info level events.
| #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_PROD_BUFFER_SIZE (512) |
A size, in bytes, of the individual production event logging buffer. Note: the production event buffer must exist.
| #define CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_ENDPOINT_ID 0x18B4300200000013ULL |
CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_ENDPOINT_ID.
Specifies the service endpoint id of the chip File Download service. When a device attempts file download over BDX, this is the endpoint to which it will send its BDX request.
| #define CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_RESPONSE_TIMEOUT 10000 |
CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_RESPONSE_TIMEOUT.
Specifies the maximum amount of time (in milliseconds) to wait for a response from a chip File Download service.
| #define CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME __TIME__ |
CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME.
Specifies the time of the build. Useful for deterministic builds.
| #define CHIP_DEVICE_CONFIG_FIRWMARE_BUILD_DATE __DATE__ |
CHIP_DEVICE_CONFIG_FIRWMARE_BUILD_DATE.
Specifies the date of the build. Useful for deterministic builds.
| #define CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH 1 |
CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH.
Compute and log a hash of the device's provisioning data on boot.
The generated hash value confirms to the form described in the CHIP: Factory Provisioning Specification.
| #define CHIP_DEVICE_CONFIG_LWIP_THREAD_IF_NAME "th" |
CHIP_DEVICE_CONFIG_LWIP_THREAD_IF_NAME.
Name of the Thread interface on LwIP-based platforms.
| #define CHIP_DEVICE_CONFIG_LWIP_WIFI_AP_IF_NAME "ap" |
CHIP_DEVICE_CONFIG_LWIP_WIFI_AP_IF_NAME.
Name of the WiFi AP interface on LwIP-based platforms.
| #define CHIP_DEVICE_CONFIG_LWIP_WIFI_STATION_IF_NAME "wl" |
CHIP_DEVICE_CONFIG_LWIP_WIFI_STATION_IF_NAME.
Name of the WiFi station interface on LwIP-based platforms.
| #define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 100 |
CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE.
The maximum number of events that can be held in the chip Platform event queue.
| #define CHIP_DEVICE_CONFIG_MAX_SCAN_NETWORKS_RESULTS 10 |
CHIP_DEVICE_CONFIG_MAX_SCAN_NETWORKS_RESULTS.
The maximum number of networks to return as a result of a NetworkProvisioning:ScanNetworks request.
| #define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_CRIT_EIDC_KEY "crit-eidc" |
The critical event id counter (eidc) persisted storage key.
| #define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_DEBUG_EIDC_KEY "debug-eidc" |
The debug event id counter (eidc) persisted storage key.
| #define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_INFO_EIDC_KEY "info-eidc" |
The info event id counter (eidc) persisted storage key.
| #define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_PROD_EIDC_KEY "prod-eidc" |
The production event id counter (eidc) persisted storage key.
| #define CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_CONNECTIVITY_TIMEOUT 10000 |
CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_CONNECTIVITY_TIMEOUT.
The maximum amount of time (in milliseconds) to wait for service connectivity during the device service provisioning step. More specifically, this is the maximum amount of time the device will wait for connectivity to be established with the service at the point where the device waiting to send a Pair Device to Account request to the Service Provisioning service.
| #define CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_ENDPOINT_ID 0x18B4300200000010ULL |
CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_ENDPOINT_ID.
Specifies the service endpoint id of the chip Service Provisioning service. When a device undergoes service provisioning, this is the endpoint to which it will send its Pair Device to Account request.
| #define CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_REQUEST_TIMEOUT 10000 |
CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_REQUEST_TIMEOUT.
Specifies the maximum amount of time (in milliseconds) to wait for a response from the Service Provisioning service.
| #define CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_ENDPOINT_ID 0x18B4300200000002ULL |
CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_ENDPOINT_ID.
Specifies the service endpoint id of the chip Software Update service. When a device attempts software update, this is the endpoint to which it will send its Software Update Query request.
| #define CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_RETRIES 5 |
CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_RETRIES.
Specifies the maximum number of times a failed software is retried.
| #define CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_WAIT_TIME_INTERVAL_MS 1 * 60 * 60 * 1000 |
CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_WAIT_TIME_INTERVAL_MS.
If scheduled software update check is disabled & default retry policy is used, specify the max wait time interval to be used (in milliseconds)
| #define CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_RESPONSE_TIMEOUT 10000 |
CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_RESPONSE_TIMEOUT.
Specifies the maximum amount of time (in milliseconds) to wait for a response from a chip Software Update service.
| #define CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_URI_LEN 128 |
CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_URI_LEN.
Specifies the size in bytes of the buffer that stores the URI
| #define CHIP_DEVICE_CONFIG_SWU_BDX_BLOCK_SIZE 1024 |
CHIP_DEVICE_CONFIG_SWU_BDX_BLOCK_SIZE.
Specifies the block size to be used during software download over BDX.
| #define CHIP_DEVICE_CONFIG_SWU_MIN_WAIT_TIME_INTERVAL_PERCENT_PER_STEP 50 |
If default software update retry policy is used, specify the minimum wait time as a percentage of the max wait interval for that step.
| #define CHIP_DEVICE_CONFIG_SWU_WAIT_TIME_MULTIPLIER_MS 1 * 60 * 1000 |
If default software update retry policy is used, specify the multiplier that multiplies the result of a Fibonacci computation based on a specific index to provide a max wait time for a step.
| #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" |
CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER.
Enables the use of a hard-coded default serial number if none is found in Chip NV storage.
| #define CHIP_DEVICE_CONFIG_THREAD_CONNECTIVITY_TIMEOUT 30000 |
CHIP_DEVICE_CONFIG_THREAD_CONNECTIVITY_TIMEOUT.
The amount of time (in milliseconds) to wait for connectivity with a Thread mesh to be established on during a Network Provisioning TestConnectivity operation.
| #define CHIP_DEVICE_CONFIG_THREAD_FTD 1 |
CHIP_DEVICE_CONFIG_THREAD_FTD.
Enable Full Thread Device features
| #define CHIP_DEVICE_CONFIG_THREAD_IF_MTU 1280 |
CHIP_DEVICE_CONFIG_THREAD_IF_MTU.
Default MTU for Thread interface
| #define CHIP_DEVICE_CONFIG_THREAD_TASK_NAME "THREAD" |
CHIP_DEVICE_CONFIG_THREAD_TASK_NAME.
The name of the Thread task.
| #define CHIP_DEVICE_CONFIG_THREAD_TASK_PRIORITY 2 |
CHIP_DEVICE_CONFIG_THREAD_TASK_PRIORITY.
The priority of the OpenThread task.
| #define CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE 8192 |
CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE.
The size (in bytes) of the OpenThread task stack.
| #define CHIP_DEVICE_CONFIG_TIME_SYNC_TIMEOUT 10000 |
CHIP_DEVICE_CONFIG_TIME_SYNC_TIMEOUT.
Specifies the maximum amount of time (in milliseconds) to wait for a response from a chip Time Sync server.
This value is only meaningful if CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC has been enabled.
| #define CHIP_DEVICE_CONFIG_USER_SELECTED_MODE_TIMEOUT_SEC 30 |
CHIP_DEVICE_CONFIG_USER_SELECTED_MODE_TIMEOUT_SEC.
The default amount of time (in whole seconds) that the device will remain in "user selected" mode. User selected mode is typically initiated by a button press, or other direct interaction by a user. While in user selected mode, the device will respond to Device Identify Requests that have the UserSelectedMode flag set.
| #define CHIP_DEVICE_CONFIG_WIFI_AP_BEACON_INTERVAL 100 |
CHIP_DEVICE_CONFIG_WIFI_AP_BEACON_INTERVAL.
The beacon interval (in milliseconds) for the WiFi soft-AP.
| #define CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL 1 |
CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL.
The WiFi channel number to be used by the soft-AP.
| #define CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT 120000 |
CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT.
The amount of time (in milliseconds) after which the chip platform will deactivate the soft-AP if it has been idle.
| #define CHIP_DEVICE_CONFIG_WIFI_AP_MAX_STATIONS 4 |
CHIP_DEVICE_CONFIG_WIFI_AP_MAX_STATIONS.
The maximum number of stations allowed to connect to the soft-AP.
| #define CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX "CHIP-" |
CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX.
A prefix string used in forming the WiFi soft-AP SSID. The remainder of the SSID consists of the final two bytes of the device's primary WiFi MAC address in hex.
| #define CHIP_DEVICE_CONFIG_WIFI_CONNECTIVITY_TIMEOUT 30000 |
CHIP_DEVICE_CONFIG_WIFI_CONNECTIVITY_TIMEOUT.
The amount of time (in milliseconds) to wait for Internet connectivity to be established on the device's WiFi station interface during a Network Provisioning TestConnectivity operation.
| #define CHIP_DEVICE_CONFIG_WIFI_SCAN_COMPLETION_TIMEOUT 10000 |
CHIP_DEVICE_CONFIG_WIFI_SCAN_COMPLETION_TIMEOUT.
The amount of time (in milliseconds) after which the chip platform will timeout a WiFi scan operation that hasn't completed. A value of 0 will disable the timeout logic.
| #define CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME "wlan0" |
CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME.
Name of the WiFi station interface
| #define CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL 5000 |
CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL.
The interval at which the chip platform will attempt to reconnect to the configured WiFi network (in milliseconds).


Elastic Load Balancing V1 Policy
The ElasticLoadBalancing policy type is an embedded property of the AWS::ElasticLoadBalancing::LoadBalancer resource. You
associate policies with a listener by
referencing a policy's name in the listener's PolicyNames
property.
Syntax
JSON
{ "Attributes" : [ { "Name" :
String
, "Value" :String
},...
], "InstancePorts" : [String, ...
], "LoadBalancerPorts" : [String, ...
], "PolicyName" :String
, "PolicyType" :String
}
YAML
Attributes: - "Name" :
String
"Value" :String
InstancePorts: -String
LoadBalancerPorts: -String
PolicyName:String
PolicyType:String
Properties
Attributes
-
The attributes for this policy. If you don't need to specify any policy attributes, specify an empty list (
[]
).Required: Yes
Type: List of JSON name-value pairs.
InstancePorts
-
The instance ports for the policy. These are the ports associated with the back-end server.
Required: No
Type: List of String values
LoadBalancerPorts
-
The load balancer ports for the policy.
Required: Only for some policies.
Type: List of String values
PolicyName
-
A name for this policy that is unique to the load balancer.
Required: Yes
Type: String
PolicyType
-
The name of the policy type for this policy. This must be one of the types reported by the Elastic Load Balancing DescribeLoadBalancerPolicyTypes action.
Required: Yes
Type: String
Examples
This example shows a snippet of the policies section of a load balancer listener.
"Policies" : [ { "PolicyName" : "MySSLNegotiationPolicy", "PolicyType" : "SSLNegotiationPolicyType", "Attributes" : [ { "Name" : "Protocol-TLSv1", "Value" : "true" }, { "Name" : "Protocol-SSLv3", "Value" : "false" }, { "Name" : "DHE-RSA-AES256-SHA", "Value" : "true" } ] }, { "PolicyName" : "MyAppCookieStickinessPolicy", "PolicyType" : "AppCookieStickinessPolicyType", "Attributes" : [ { "Name" : "CookieName", "Value" : "MyCookie"} ] }, { "PolicyName" : "MyPublicKeyPolicy", "PolicyType" : "PublicKeyPolicyType", "Attributes" : [ { "Name" : "PublicKey", "Value" : { "Fn::Join" : [ "\n", [ "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDh/51Aohx5VrpmlfGHZCzciMBa", "fkHve+MQYYJcxmNUKMdsWnz9WtVfKxxWUU7Cfor4lorYmENGCG8FWqCoLDMFs7pN", "yGEtpsrlKhzZWtgY1d7eGrUrBil03bI90E2KW0j4qAwGYAC8xixOkNClicojeEz4", "f4rr3sUf+ZBSsuMEuwIDAQAB" ] ] } } ] }, { "PolicyName" : "MyBackendServerAuthenticationPolicy", "PolicyType" : "BackendServerAuthenticationPolicyType", "Attributes" : [ { "Name" : "PublicKeyPolicyName", "Value" : "MyPublicKeyPolicy" } ], "InstancePorts" : [ "8443" ] } ]
This example shows a snippet of the policies section of a Classic Load Balancer using proxy protocol.
"Policies" : [{ "PolicyName" : "EnableProxyProtocol", "PolicyType" : "ProxyProtocolPolicyType", "Attributes" : [{ "Name" : "ProxyProtocol", "Value" : "true" }], "InstancePorts" : [{"Ref" : "WebServerPort"}] }]
In the following snippet, the load balancer uses a predefined security policy. These predefined policies are provided by Elastic Load Balancing. For more information, see SSL Security Policies in the User Guide for Classic Load Balancers.
"Policies" : [{ "PolicyName" : "ELBSecurityPolicyName", "PolicyType" : "SSLNegotiationPolicyType", "Attributes" : [{ "Name" : "Reference-Security-Policy", "Value" : "ELBSecurityPolicy-2014-10" }] }]


Sasha's First Web Page
Loads of words!
Cute Pug
Best Links Ever
For alternative fashion and lifestyle
For handmade original design goodies
For cheap, often vegan, cooking


imast
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
All Relationships
Diagrams
By default only columns that are primary keys, foreign keys or indexes are shown.
Compact
Large


Strategies for containers in order to customize comparison (heaps, sorting) behavior towards elements.


Design¶
This is the main design document, which is primarily aimed at developers
Overview¶
The web interface initiates a WebSocket connection when started in order to drive the main UI. The web server is run as a separate process from the action server, which executes workflows. This means that continuous connectivity is not required to keep workflows running. Once the interface has highlighted which rows of which worktables need to be run, no further input via the web is required, and the user can close their browser and come back later.
Data Model¶
Worktable are stored on the disk as zipped files, which always contain the following:
- A Common Workflow Language (CWL) file detailing the workflow
- A Yaml file providing a row template
- The table data
In addition, each Worktable may store any number of files, typically the individual steps of the workflow (as CWL files) and the program(s) that are to be invoked by the workflow. Data must only be stored inside the table itself, not in any auxilary files inside the worktable package.


{include file='$url1' /} {include file='$url2' /} {include file='../application/home/view/index1/show3.html' /} {include file='index1/show3' /} {include file='../application/demo/view/index/show4.html' /} {include file='demo/index/show4' /}


Properties:
| Name | Type | Description |
|---|---|---|
baseUrl |
string | base url for all resource calls. |
actionsDefaults |
Object.<Action> | map of default definitions for actions.
e.g. |
interceptors |
Array.<HttpInterceptor> | use method
|
- Source:
Members
interceptors :Array
Array containing service factories for all synchronous or asynchronous processing of requests or responses.
Array containing service factories for all synchronous or asynchronous processing of requests or responses.
Type:
- Array
- Source:
Methods
$get()
The service instance apiResource.
The service instance apiResource. A resource factory that creates Resource objects.
- Source:
Returns:
ResourceFactory
actionsDefaults(actionsopt) → {Object}
Getter/Setter.
Getter/Setter. Defaults options per action name.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
actions |
Object |
<optional> |
- Source:
Returns:
if actions
is defined returns apiResourceProvider
for chaining;
otherwise returns the actions defaults.
- Type
- Object
baseUrl(urlopt) → {string|Object}
Getter/Setter.
Getter/Setter. Configure base url to be used for requests.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
url |
string |
<optional> |
- Source:
Returns:
if value
is a string, returns apiResourceProvider
for chaining.
otherwise, returns current baseUrl
value.
- Type
- string | Object
pushInterceptor() → {Object}
Push interceptors
.Push interceptors
Parameters:
| Type | Attributes | Description |
|---|---|---|
| string | function |
<repeatable> |
interceptors |
| Array | interceptors |
- Source:
Returns:
apiResourceProvider
for chaining.
- Type
- Object


About We Care
Let the worry fly and serenity pave in!
In the world of social media, there are innumerable opinions circulating the
Internet targeting people based on sexuality, career, background, etc.  Statistics have shown that
young users of social media have a substantially high rate of reported depression (13 to
66 %). Platforms like Twitter are being maliciously utilized to spread hatred and bigotry.
To make ourselves more aware and to tackle depression amongst youngsters, we
have come up with the idea of “We Care - Let the worry fly and serenity pave in”, a
website aimed at reducing stress levels. It includes a feature of sentiment analysis that
allows users to analyze hashtags trending on Twitter. We plan to extract 2500 tweets using
the Twitter Developer APIs and train them using the Naive Bayes Algorithm to categorize
tweets into positive, negative, and neutral. The modules used would include sklearn,
tweepy, numpy, pandas, regex, and matplotlib. We believe that this will ensure that the
safety, inclusion, and respect of all communities is not compromised.


{% include head.html %}
Home
About
Writeups
Events
{{ site.author.name }}
{{ site.tagline }}
{% include social_links.html %}
{{ content }}
{% include foot.html %}


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import views.html.helpers._ @import views.view_application.helpers.SubViewTemplateHelper._ @import views.view_application.helpers.ViewApplicationType @(heading: String, headingId: String, href: String = "#", sectionName: Option[String] = None)(content: Html, preContent: Option[Html] = None, postContent: Option[Html] = None)(implicit viewApplicationType: ViewApplicationType, request:Request[AnyContent], messages : Messages) @headerType = { @viewApplicationType match { case views.view_application.helpers.OneViewMode =>{


gdal_proximity.py
Produces a raster proximity map.
Synopsis
gdal_proximity.py <srcfile> <dstfile> [-srcband n] [-dstband n]
[-of format] [-co name=value]*
[-ot Byte/UInt16/UInt32/Float32/etc]
[-values n,n,n] [-distunits PIXEL/GEO]
[-maxdist n] [-nodata n] [-use_input_nodata YES/NO]
[-fixed-buf-val n]
Description
The gdal_proximity.py script generates a raster proximity map indicating the distance from the center of each pixel to the center of the nearest pixel identified as a target pixel. Target pixels are those in the source raster for which the raster pixel value is in the set of target pixel values.
- <srcfile>
The source raster file used to identify target pixels.
- <dstfile>
The destination raster file to which the proximity map will be written. It may be a pre-existing file of the same size as srcfile. If it does not exist it will be created.
- -srcband <n>
Identifies the band in the source file to use (default is 1).
- -dstband <n>
Identifies the band in the destination file to use (default is 1).
- -of <format>
Select the output format. Starting with GDAL 2.3, if not specified, the format is guessed from the extension (previously was GTiff). Use the short format name.
- -co <NAME=VALUE>
Many formats have one or more optional creation options that can be used to control particulars about the file created. For instance, the GeoTIFF driver supports creation options to control compression, and whether the file should be tiled.
The creation options available vary by format driver, and some simple formats have no creation options at all. A list of options supported for a format can be listed with the --formats command line option but the documentation for the format is the definitive source of information on driver creation options. See Raster drivers format specific documentation for legal creation options for each format.
- -ot <type>
Specify a data type supported by the driver, which may be one of the following:
Byte
,UInt16
,Int16
,UInt32
,Int32
,Float32
(default), orFloat64
.
- -values <n>,<n>,<n>
A list of target pixel values in the source image to be considered target pixels. If not specified, all non-zero pixels will be considered target pixels.
- -distunits PIXEL|GEO
Indicate whether distances generated should be in pixel or georeferenced coordinates (default PIXEL).
- -maxdist <n>
The maximum distance to be generated. The nodata value will be used for pixels beyond this distance. If a nodata value is not provided, the output band will be queried for its nodata value. If the output band does not have a nodata value, then the value 65535 will be used. Distance is interpreted in pixels unless -distunits GEO is specified.
- -nodata <n>
Specify a nodata value to use for the destination proximity raster.
- -use_input_nodata YES/NO
Indicate whether nodata pixels in the input raster should be nodata in the output raster (default NO).
- -fixed-buf-val <n>
Specify a value to be applied to all pixels that are within the -maxdist of target pixels (including the target pixels) instead of a distance value.


This package implements building a digest and emitting the digest
as hex-encoded, or base64 encoded string.
Usage
Use the static library-lik class Digest
, or
the bean-like class DigestActionCommand
.
References
@see org.huberb.digestnb.Digest
@see org.huberb.digestnb.DigestActionCommand


We're sorry but website doesn't work properly without JavaScript enabled. Please enable it to continue.


Introduction
This document gives coding conventions for the Python code comprising the
standard library in the main Python distribution. Please see the
companion informational PEP describing style guidelines for the C code in
the C implementation of Python[1].
This document was adapted from Guido's original Python Style Guide
essay[2], with some additions from Barry's style guide[5]. Where there's
conflict, Guido's style rules for the purposes of this PEP. This PEP may
still be incomplete (in fact, it may never be finished <wink>).
A Foolish Consistency is the Hobgoblin of Little Minds
One of Guido's key insights is that code is read much more often than it
is written. The guidelines provided here are intended to improve the
readability of code and make it consistent across the wide spectrum of
Python code. As PEP 20 [6] says, "Readability counts".
A style guide is about consistency. Consistency with this style guide is
important. Consistency within a project is more important. Consistency
within one module or function is most important.
But most importantly: know when to be inconsistent -- sometimes the style
guide just doesn't apply. When in doubt, use your best judgment. Look
at other examples and decide what looks best. And don't hesitate to ask!
Two good reasons to break a particular rule:
(1) When applying the rule would make the code less readable, even for
someone who is used to reading code that follows the rules.
(2) To be consistent with surrounding code that also breaks it (maybe for
historic reasons) -- although this is also an opportunity to clean up
someone else's mess (in true XP style).
Code lay-out
Indentation
Use 4 spaces per indentation level.
For really old code that you don't want to mess up, you can continue to
use 8-space tabs.
Tabs or Spaces?
Never mix tabs and spaces.
The most popular way of indenting Python is with spaces only. The
second-most popular way is with tabs only. Code indented with a mixture
of tabs and spaces should be converted to using spaces exclusively. When
invoking the Python command line interpreter with the -t option, it issues
warnings about code that illegally mixes tabs and spaces. When using -tt
these warnings become errors. These options are highly recommended!
For new projects, spaces-only are strongly recommended over tabs. Most
editors have features that make this easy to do.
Maximum Line Length
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to have
several windows side-by-side. The default wrapping on such devices
disrupts the visual structure of the code, making it more difficult to
understand. Therefore, please limit all lines to a maximum of 79
characters. For flowing long blocks of text (docstrings or comments),
limiting the length to 72 characters is recommended.
The preferred way of wrapping long lines is by using Python's implied line
continuation inside parentheses, brackets and braces. If necessary, you
can add an extra pair of parentheses around an expression, but sometimes
using a backslash looks better. Make sure to indent the continued line
appropriately. The preferred place to break around a binary operator is
*after* the operator, not before it. Some examples:
class Rectangle(Blob):
def __init__(self, width, height,
color='black', emphasis=None, highlight=0):
if width == 0 and height == 0 and \
color == 'red' and emphasis == 'strong' or \
highlight > 100:
raise ValueError("sorry, you lose")
if width == 0 and height == 0 and (color == 'red' or
emphasis is None):
raise ValueError("I don't think so -- values are %s, %s" %
(width, height))
Blob.__init__(self, width, height,
color, emphasis, highlight)
Blank Lines
Separate top-level function and class definitions with two blank lines.
Method definitions inside a class are separated by a single blank line.
Extra blank lines may be used (sparingly) to separate groups of related
functions. Blank lines may be omitted between a bunch of related
one-liners (e.g. a set of dummy implementations).
Use blank lines in functions, sparingly, to indicate logical sections.
Python accepts the control-L (i.e. ^L) form feed character as whitespace;
Many tools treat these characters as page separators, so you may use them
to separate pages of related sections of your file.
Encodings (PEP 263)
Code in the core Python distribution should aways use the ASCII or
Latin-1 encoding (a.k.a. ISO-8859-1). For Python 3.0 and beyond,
UTF-8 is preferred over Latin-1, see PEP 3120.
Files using ASCII (or UTF-8, for Python 3.0) should not have a
coding cookie. Latin-1 (or UTF-8) should only be used when a
comment or docstring needs to mention an author name that requires
Latin-1; otherwise, using \x, \u or \U escapes is the preferred
way to include non-ASCII data in string literals.
For Python 3.0 and beyond, the following policy is prescribed for
the standard library (see PEP 3131): All identifiers in the Python
standard library MUST use ASCII-only identifiers, and SHOULD use
English words wherever feasible (in many cases, abbreviations and
technical terms are used which aren't English). In addition,
string literals and comments must also be in ASCII. The only
exceptions are (a) test cases testing the non-ASCII features, and
(b) names of authors. Authors whose names are not based on the
latin alphabet MUST provide a latin transliteration of their
names.
Open source projects with a global audience are encouraged to
adopt a similar policy.
Imports
- Imports should usually be on separate lines, e.g.:
Yes: import os
import sys
No: import sys, os
it's okay to say this though:
from subprocess import Popen, PIPE
- Imports are always put at the top of the file, just after any module
comments and docstrings, and before module globals and constants.
Imports should be grouped in the following order:
1. standard library imports
2. related third party imports
3. local application/library specific imports
You should put a blank line between each group of imports.
Put any relevant __all__ specification after the imports.
- Relative imports for intra-package imports are highly discouraged.
Always use the absolute package path for all imports.
Even now that PEP 328 [7] is fully implemented in Python 2.5,
its style of explicit relative imports is actively discouraged;
absolute imports are more portable and usually more readable.
- When importing a class from a class-containing module, it's usually okay
to spell this
from myclass import MyClass
from foo.bar.yourclass import YourClass
If this spelling causes local name clashes, then spell them
import myclass
import foo.bar.yourclass
and use "myclass.MyClass" and "foo.bar.yourclass.YourClass"
Whitespace in Expressions and Statements
Pet Peeves
Avoid extraneous whitespace in the following situations:
- Immediately inside parentheses, brackets or braces.
Yes: spam(ham[1], {eggs: 2})
No: spam( ham[ 1 ], { eggs: 2 } )
- Immediately before a comma, semicolon, or colon:
Yes: if x == 4: print x, y; x, y = y, x
No: if x == 4 : print x , y ; x , y = y , x
- Immediately before the open parenthesis that starts the argument
list of a function call:
Yes: spam(1)
No: spam (1)
- Immediately before the open parenthesis that starts an indexing or
slicing:
Yes: dict['key'] = list[index]
No: dict ['key'] = list [index]
- More than one space around an assignment (or other) operator to
align it with another.
Yes:
x = 1
y = 2
long_variable = 3
No:
x = 1
y = 2
long_variable = 3
Other Recommendations
- Always surround these binary operators with a single space on
either side: assignment (=), augmented assignment (+=, -= etc.),
comparisons (==, <, >, !=, <>, <=, >=, in, not in, is, is not),
Booleans (and, or, not).
- Use spaces around arithmetic operators:
Yes:
i = i + 1
submitted += 1
x = x * 2 - 1
hypot2 = x * x + y * y
c = (a + b) * (a - b)
No:
i=i+1
submitted +=1
x = x*2 - 1
hypot2 = x*x + y*y
c = (a+b) * (a-b)
- Don't use spaces around the '=' sign when used to indicate a
keyword argument or a default parameter value.
Yes:
def complex(real, imag=0.0):
return magic(r=real, i=imag)
No:
def complex(real, imag = 0.0):
return magic(r = real, i = imag)
- Compound statements (multiple statements on the same line) are
generally discouraged.
Yes:
if foo == 'blah':
do_blah_thing()
do_one()
do_two()
do_three()
Rather not:
if foo == 'blah': do_blah_thing()
do_one(); do_two(); do_three()
- While sometimes it's okay to put an if/for/while with a small
body on the same line, never do this for multi-clause
statements. Also avoid folding such long lines!
Rather not:
if foo == 'blah': do_blah_thing()
for x in lst: total += x
while t < 10: t = delay()
Definitely not:
if foo == 'blah': do_blah_thing()
else: do_non_blah_thing()
try: something()
finally: cleanup()
do_one(); do_two(); do_three(long, argument,
list, like, this)
if foo == 'blah': one(); two(); three()
Comments
Comments that contradict the code are worse than no comments. Always make
a priority of keeping the comments up-to-date when the code changes!
Comments should be complete sentences. If a comment is a phrase or
sentence, its first word should be capitalized, unless it is an identifier
that begins with a lower case letter (never alter the case of
identifiers!).
If a comment is short, the period at the end can be omitted. Block
comments generally consist of one or more paragraphs built out of complete
sentences, and each sentence should end in a period.
You should use two spaces after a sentence-ending period.
When writing English, Strunk and White apply.
Python coders from non-English speaking countries: please write
your comments in English, unless you are 120% sure that the code
will never be read by people who don't speak your language.
Block Comments
Block comments generally apply to some (or all) code that follows them,
and are indented to the same level as that code. Each line of a block
comment starts with a # and a single space (unless it is indented text
inside the comment).

Inline Comments
Use inline comments sparingly.
An inline comment is a comment on the same line as a statement. Inline
comments should be separated by at least two spaces from the statement.
They should start with a # and a single space.
Inline comments are unnecessary and in fact distracting if they state
the obvious. Don't do this:
x = x + 1 # Increment x
But sometimes, this is useful:
x = x + 1 # Compensate for border
Documentation Strings
Conventions for writing good documentation strings (a.k.a. "docstrings")
are immortalized in PEP 257 [3].
- Write docstrings for all public modules, functions, classes, and
methods. Docstrings are not necessary for non-public methods, but you
should have a comment that describes what the method does. This comment
should appear after the "def" line.
- PEP 257 describes good docstring conventions. Note that most
importantly, the """ that ends a multiline docstring should be on a line
by itself, and preferably preceded by a blank line, e.g.:
"""Return a foobang
Optional plotz says to frobnicate the bizbaz first.
"""
- For one liner docstrings, it's okay to keep the closing """ on the same
line.
Version Bookkeeping
If you have to have Subversion, CVS, or RCS crud in your source file, do
it as follows.
__version__ = "$Revision: 63990 $"
# $Source$
These lines should be included after the module's docstring, before any
other code, separated by a blank line above and below.
Naming Conventions
The naming conventions of Python's library are a bit of a mess, so we'll
never get this completely consistent -- nevertheless, here are the
currently recommended naming standards. New modules and packages
(including third party frameworks) should be written to these standards,
but where an existing library has a different style, internal consistency
is preferred.
Descriptive: Naming Styles
There are a lot of different naming styles. It helps to be able to
recognize what naming style is being used, independently from what they
are used for.
The following naming styles are commonly distinguished:
- b (single lowercase letter)
- B (single uppercase letter)
- lowercase
- lower_case_with_underscores
- UPPERCASE
- UPPER_CASE_WITH_UNDERSCORES
- CapitalizedWords (or CapWords, or CamelCase -- so named because
of the bumpy look of its letters[4]). This is also sometimes known as
StudlyCaps.
Note: When using abbreviations in CapWords, capitalize all the letters
of the abbreviation. Thus HTTPServerError is better than
HttpServerError.
- mixedCase (differs from CapitalizedWords by initial lowercase
character!)
- Capitalized_Words_With_Underscores (ugly!)
There's also the style of using a short unique prefix to group related
names together. This is not used much in Python, but it is mentioned for
completeness. For example, the os.stat() function returns a tuple whose
items traditionally have names like st_mode, st_size, st_mtime and so on.
(This is done to emphasize the correspondence with the fields of the
POSIX system call struct, which helps programmers familiar with that.)
The X11 library uses a leading X for all its public functions. In Python,
this style is generally deemed unnecessary because attribute and method
names are prefixed with an object, and function names are prefixed with a
module name.
In addition, the following special forms using leading or trailing
underscores are recognized (these can generally be combined with any case
convention):
- _single_leading_underscore: weak "internal use" indicator. E.g. "from M
import *" does not import objects whose name starts with an underscore.
- single_trailing_underscore_: used by convention to avoid conflicts with
Python keyword, e.g.
Tkinter.Toplevel(master, class_='ClassName')
- __double_leading_underscore: when naming a class attribute, invokes name
mangling (inside class FooBar, __boo becomes _FooBar__boo; see below).
- __double_leading_and_trailing_underscore__: "magic" objects or
attributes that live in user-controlled namespaces. E.g. __init__,
__import__ or __file__. Never invent such names; only use them
as documented.
Prescriptive: Naming Conventions
Names to Avoid
Never use the characters `l' (lowercase letter el), `O' (uppercase
letter oh), or `I' (uppercase letter eye) as single character variable
names.
In some fonts, these characters are indistinguishable from the numerals
one and zero. When tempted to use `l', use `L' instead.
Package and Module Names
Modules should have short, all-lowercase names. Underscores can be used
in the module name if it improves readability. Python packages should
also have short, all-lowercase names, although the use of underscores is
discouraged.
Since module names are mapped to file names, and some file systems are
case insensitive and truncate long names, it is important that module
names be chosen to be fairly short -- this won't be a problem on Unix,
but it may be a problem when the code is transported to older Mac or
Windows versions, or DOS.
When an extension module written in C or C++ has an accompanying Python
module that provides a higher level (e.g. more object oriented)
interface, the C/C++ module has a leading underscore (e.g. _socket).
Class Names
Almost without exception, class names use the CapWords convention.
Classes for internal use have a leading underscore in addition.
Exception Names
Because exceptions should be classes, the class naming convention
applies here. However, you should use the suffix "Error" on your
exception names (if the exception actually is an error).
Global Variable Names
(Let's hope that these variables are meant for use inside one module
only.) The conventions are about the same as those for functions.
Modules that are designed for use via "from M import *" should use the
__all__ mechanism to prevent exporting globals, or use the older
convention of prefixing such globals with an underscore (which you might
want to do to indicate these globals are "module non-public").
Function Names
Function names should be lowercase, with words separated by underscores
as necessary to improve readability.
mixedCase is allowed only in contexts where that's already the
prevailing style (e.g. threading.py), to retain backwards compatibility.
Function and method arguments
Always use 'self' for the first argument to instance methods.
Always use 'cls' for the first argument to class methods.
If a function argument's name clashes with a reserved keyword, it is
generally better to append a single trailing underscore rather than use
an abbreviation or spelling corruption. Thus "print_" is better than
"prnt". (Perhaps better is to avoid such clashes by using a synonym.)
Method Names and Instance Variables
Use the function naming rules: lowercase with words separated by
underscores as necessary to improve readability.
Use one leading underscore only for non-public methods and instance
variables.
To avoid name clashes with subclasses, use two leading underscores to
invoke Python's name mangling rules.
Python mangles these names with the class name: if class Foo has an
attribute named __a, it cannot be accessed by Foo.__a. (An insistent
user could still gain access by calling Foo._Foo__a.) Generally, double
leading underscores should be used only to avoid name conflicts with
attributes in classes designed to be subclassed.
Note: there is some controversy about the use of __names (see below).
Designing for inheritance
Always decide whether a class's methods and instance variables
(collectively: "attributes") should be public or non-public. If in
doubt, choose non-public; it's easier to make it public later than to
make a public attribute non-public.
Public attributes are those that you expect unrelated clients of your
class to use, with your commitment to avoid backward incompatible
changes. Non-public attributes are those that are not intended to be
used by third parties; you make no guarantees that non-public attributes
won't change or even be removed.
We don't use the term "private" here, since no attribute is really
private in Python (without a generally unnecessary amount of work).
Another category of attributes are those that are part of the "subclass
API" (often called "protected" in other languages). Some classes are
designed to be inherited from, either to extend or modify aspects of the
class's behavior. When designing such a class, take care to make
explicit decisions about which attributes are public, which are part of
the subclass API, and which are truly only to be used by your base
class.
With this in mind, here are the Pythonic guidelines:
- Public attributes should have no leading underscores.
- If your public attribute name collides with a reserved keyword, append
a single trailing underscore to your attribute name. This is
preferable to an abbreviation or corrupted spelling. (However,
notwithstanding this rule, 'cls' is the preferred spelling for any
variable or argument which is known to be a class, especially the
first argument to a class method.)
Note 1: See the argument name recommendation above for class methods.
- For simple public data attributes, it is best to expose just the
attribute name, without complicated accessor/mutator methods. Keep in
mind that Python provides an easy path to future enhancement, should
you find that a simple data attribute needs to grow functional
behavior. In that case, use properties to hide functional
implementation behind simple data attribute access syntax.
Note 1: Properties only work on new-style classes.
Note 2: Try to keep the functional behavior side-effect free, although
side-effects such as caching are generally fine.
Note 3: Avoid using properties for computationally expensive
operations; the attribute notation makes the caller believe
that access is (relatively) cheap.
- If your class is intended to be subclassed, and you have attributes
that you do not want subclasses to use, consider naming them with
double leading underscores and no trailing underscores. This invokes
Python's name mangling algorithm, where the name of the class is
mangled into the attribute name. This helps avoid attribute name
collisions should subclasses inadvertently contain attributes with the
same name.
Note 1: Note that only the simple class name is used in the mangled
name, so if a subclass chooses both the same class name and attribute
name, you can still get name collisions.
Note 2: Name mangling can make certain uses, such as debugging and
__getattr__(), less convenient. However the name mangling algorithm
is well documented and easy to perform manually.
Note 3: Not everyone likes name mangling. Try to balance the
need to avoid accidental name clashes with potential use by
advanced callers.
Programming Recommendations
- Code should be written in a way that does not disadvantage other
implementations of Python (PyPy, Jython, IronPython, Pyrex, Psyco,
and such).
For example, do not rely on CPython's efficient implementation of
in-place string concatenation for statements in the form a+=b or a=a+b.
Those statements run more slowly in Jython. In performance sensitive
parts of the library, the ''.join() form should be used instead. This
will ensure that concatenation occurs in linear time across various
implementations.
- Comparisons to singletons like None should always be done with
'is' or 'is not', never the equality operators.
Also, beware of writing "if x" when you really mean "if x is not None"
-- e.g. when testing whether a variable or argument that defaults to
None was set to some other value. The other value might have a type
(such as a container) that could be false in a boolean context!
- Use class-based exceptions.
String exceptions in new code are forbidden, because this language
feature is being removed in Python 2.6.
Modules or packages should define their own domain-specific base
exception class, which should be subclassed from the built-in Exception
class. Always include a class docstring. E.g.:
class MessageError(Exception):
"""Base class for errors in the email package."""
Class naming conventions apply here, although you should add the suffix
"Error" to your exception classes, if the exception is an error.
Non-error exceptions need no special suffix.
- When raising an exception, use "raise ValueError('message')" instead of
the older form "raise ValueError, 'message'".
The paren-using form is preferred because when the exception arguments
are long or include string formatting, you don't need to use line
continuation characters thanks to the containing parentheses. The older
form will be removed in Python 3000.
- When catching exceptions, mention specific exceptions
whenever possible instead of using a bare 'except:' clause.
For example, use:
try:
import platform_specific_module
except ImportError:
platform_specific_module = None
A bare 'except:' clause will catch SystemExit and KeyboardInterrupt
exceptions, making it harder to interrupt a program with Control-C,
and can disguise other problems. If you want to catch all
exceptions that signal program errors, use 'except Exception:'.
A good rule of thumb is to limit use of bare 'except' clauses to two
cases:
1) If the exception handler will be printing out or logging
the traceback; at least the user will be aware that an
error has occurred.
2) If the code needs to do some cleanup work, but then lets
the exception propagate upwards with 'raise'.
'try...finally' is a better way to handle this case.
- Additionally, for all try/except clauses, limit the 'try' clause
to the absolute minimum amount of code necessary. Again, this
avoids masking bugs.
Yes:
try:
value = collection[key]
except KeyError:
return key_not_found(key)
else:
return handle_value(value)
No:
try:
# Too broad!
return handle_value(collection[key])
except KeyError:
# Will also catch KeyError raised by handle_value()
return key_not_found(key)
- Use string methods instead of the string module.
String methods are always much faster and share the same API with
unicode strings. Override this rule if backward compatibility with
Pythons older than 2.0 is required.
- Use ''.startswith() and ''.endswith() instead of string slicing to check
for prefixes or suffixes.
startswith() and endswith() are cleaner and less error prone. For
example:
Yes: if foo.startswith('bar'):
No: if foo[:3] == 'bar':
The exception is if your code must work with Python 1.5.2 (but let's
hope not!).
- Object type comparisons should always use isinstance() instead
of comparing types directly.
 In Python 2.3, str and unicode have a common base
class, basestring, so you can do:
if isinstance(obj, basestring):
In Python 2.2, the types module has the StringTypes type defined for
that purpose, e.g.:
from types import StringTypes
if isinstance(obj, StringTypes):
In Python 2.0 and 2.1, you should do:
from types import StringType, UnicodeType
if isinstance(obj, StringType) or \
isinstance(obj, UnicodeType) :
- For sequences, (strings, lists, tuples), use the fact that empty
sequences are false.
Yes: if not seq:
if seq:
No: if len(seq)
if not len(seq)
- Don't write string literals that rely on significant trailing
whitespace. Such trailing whitespace is visually indistinguishable and
some editors (or more recently, reindent.py) will trim them.
- Don't compare boolean values to True or False using ==
Yes: if greeting:
No: if greeting == True:
Worse: if greeting is True:
References
[1] PEP 7, Style Guide for C Code, van Rossum
[2] http://www.python.org/doc/essays/styleguide.html
[3] PEP 257, Docstring Conventions, Goodger, van Rossum
[4] http://www.wikipedia.com/wiki/CamelCase
[5] Barry's GNU Mailman style guide
http://barry.warsaw.us/software/STYLEGUIDE.txt
[6] PEP 20, The Zen of Python
[7] PEP 328, Imports: Multi-Line and Absolute/Relative
Copyright
This document has been placed in the public domain.


Will create several result groups from the given keys. Series will be aggregated on a per-group basis.
{"a": 1, "b": 2}
and {"b": 3, "c": 4}
, and a groupBy
of ["a", "b"]
the returned result groups would be [{"a": 1, "b": 2}, {"a": null, "b": 3}]
.


Class Practice Tasks - Tech Karo Web Development Course 2020
By: Bhagia Sheri
Team Denali
Submitted Practice Tasks:
Practice#1 - Button Task
Practice#2 - Country Flags Task
Practice#3 - The Flower Studio Task
Practice#4 - Tech Karo Circle Page
Practice#5 - Book Panda Page
Practice#6 - Responsive Web Design (RWD) Page
Practice#7 - Learn Mathematics Page Using Tailwind CSS
Practice#8 - Blog Page
Practice#9 - Image Gallery Using Bootstrap
Practice#10 - Landing Page Using Bootstrap
Practice#11 - JavaScript Challenge
Practice#13 - Dynamic To-do List


{% extends 'enrolment-base.html' %} {% block sub_header %}{# prevent the subheader from showing on form pages #}{% endblock %} {% block formarea %}
Please try again.


Please wait while the Multiverse Client downloads the latest updates
Initial status
Bytes:
/
Files:
/


Gateway
BOT
19-Feb-19 12:58 AM
[telegram] <TonyStarkBR> Is that possible in the mobile (Android) version? (re @Lennart: You can then add coin btc (and maaany others))
[telegram] <TonyStarkBR> Like the aforementioned TPS... Komodo can already handle 20k TPS (this is 13x what Ripple can do!) (re @aiflord777: Like what ?)
(edited)
[telegram] <TonyStarkBR> Like having a game running in the blockchain... (re @aiflord777: Like what ?)
[telegram] <TonyStarkBR> Without slowing things down like ETH Cryptokitties...
[telegram] <TonyStarkBR> Or making fees skyrocket... (re @TonyStarkBR: Without slowing things down like ETH Cryptokitties...)
[telegram] <aiflord777> That’s irrelevant, nobody is using this high capacity and blockchains are not made to have high throughput (re @TonyStarkBR: Like the aforementioned TPS... Komodo can already handle 20k TPS (this is 13x what Ripple can do!))
(edited)
[telegram] <aiflord777> What game ? (re @TonyStarkBR: Like having a game running in the blockchain...)
[telegram] <aiflord777> Point of blockchain is to avoid double spending . That’s it
[telegram] <TonyStarkBR> Well, if BTC used this technology, no one would talking about huge fees and the Lighting Network would never see the light if day...
But their choices are mostly political, and I won't delve into it here!
Btw, tell Komodo's devs that "blockchain are not made to have high throughput"...
They've already did it, and are aiming to 1M TPS (verified, not some vaporware) (re @aiflord777: That’s irrelevant, nobody is using this high capacity and blockchains are not made to have high throughput)
[telegram] <TonyStarkBR> It's in early alpha stages, it's a proof of concept, mostly...
Rogue is the name! (re @aiflord777: What game ?)
[telegram] <aiflord777> Dude , you don’t know what you’re saying at all . (re @TonyStarkBR: Well, if BTC used this technology, no one would talking about huge fees and the Lighting Network would never see the light if day...
But their choices are mostly political, and I won't delve into it here!
Btw, tell Komodo's devs that "blockchain are not made to have high throughput"...
They've already did it, and are aiming to 1M TPS (verified, not some vaporware))
[telegram] <aiflord777> You’re literally a clueless bag holder
[telegram] <TonyStarkBR> (re @aiflord777: You’re literally a clueless bag holder)
[telegram] <TonyStarkBR> Straw man! I give up!
[telegram] <aiflord777> Show me this 1 million TPS throughput
[telegram] <TonyStarkBR> Won't enter into a pointless argument
[telegram] <aiflord777> Do you even understand what that means ?
[telegram] <TonyStarkBR> IT'S UNDER DEVELOPMENT! it hasn't happened yet! (re @aiflord777: Show me this 1 million TPS throughput)
[telegram] <TonyStarkBR> Go tell this to Komodo's devs (re @aiflord777: Do you even understand what that means ?)
(edited)
[telegram] <aiflord777> You just said “verified , not vapor ware “
[telegram] <aiflord777> When people say “throughput” they usually are referring to capacity which isn’t the same as speed
[telegram] <TonyStarkBR> It WILL be, when it happens!
What has already happened is the 20k TPS mark (re @aiflord777: You just said “verified , not vapor ware “)
[telegram] <aiflord777> Show me the 20k TPS mark
[telegram] <TonyStarkBR> I'm talking about transactions per second, that was mentioned in their report (re @aiflord777: When people say “throughput” they usually are referring to capacity which isn’t the same as speed)
[telegram] <aiflord777> Show me (re @TonyStarkBR: I'm talking about transactions per second, that was mentioned in their report)
[telegram] <dsteve26> Thank you (re @polycryptoblog: Komodo has already solved problems other projects haven’t even started to tackle and offers these solutions to other projects which expands its sphere of influence.)
[telegram] <TonyStarkBR> If you're too lazy to Google it (and arrogant, also), I'll get it for you (re @aiflord777: Show me the 20k TPS mark)
[telegram] <aiflord777> Give me an example where it was used
[telegram] <aiflord777> So you believe everything that you read on a report ? (re @TonyStarkBR: If you're too lazy to Google it (and arrogant, also), I'll get it for you)
(edited)
[telegram] <aiflord777> Why are you linking me to this ?
[telegram] <TonyStarkBR> You asked "show me" (re @aiflord777: Why are you linking me to this ?)


LogIn and SignUp
Home /
LogIn and SignUp
LogIn
Email *
Password
Captcha Code
Show Password
Remember me
Lost your password?
Login
Registration
Email *
Password *
Confirm Password *
Full Name
Captcha Code
Sign Up!


This is test this is text this is text at the top.
This is the sticky thingy that is really cool.
This is test this is text this is text at the bottom.


Kanakamala case: NIA court finds six guilty
Sentence to be pronounced tomorrow
by Special CorrespondentThe special court for National Investigation Agency (NIA) cases here on Monday found six accused guilty in the Kanakamala Islamic State (IS) module case.
The NIA’s case was that the accused had allegedly declared allegiance to the terror outfit IS and hammered out plans to launch terror strikes across Kerala and neighbouring States.
Those convicted by the NIA court are Manseed Muhmood, alias Omar Al Hindi of Thalassery, Swalih Mohammed of Chelad, Rashid Ali of Coimbatore, Ramshad of Kuttiyadi, and Safvan and Moinuddin.
However, the court acquitted Jasim N.K., granting him the benefit of doubt.
The accused were found guilty under various sections of the Unlawful Activities Prevention Act (UAPA), including offences for associating with a terrorist organisation, raising funds, and holding camps for the terrorist outfit. They were also found guilty under Section 120(B) (criminal conspiracy) of the Indian Penal Code.
The sentence will be pronounced on Wednesday.
The Kanakamala case came to light in October 2016 when the NIA raided a clandestine meeting held by members of an IS-inspired terror module at Kanakamala in Kannur district and took the participants into custody.
Attack plan
Further investigation revealed that the accused were planning to attack foreigners, especially Jews, visiting Vattakkanal, near Kodaikanal, prominent political leaders, and an event of the Jamaat-e-Islami in Kochi.
They had also allegedly conspired to attack high court judges, senior police officers, rationalists, and Muslims belonging to the Ahmadiyya sect, with the intention of committing terror acts in India, to be claimed by the IS.
Sajeer, another accused in the case, was reportedly shot dead in Afghanistan.


Blockchain based IP management
Immutable records track your project contribution
Use resolutions to take collectively take decisions about your project


Preparation time
less than 30 mins
Cooking time
less than 10 mins
Serves
Serves 4
These mackerel fillets are seasoned with a blend of spices and served with a fiery salad and a cool gazpacho.
To make the gazpacho, blend all the ingredients in a food processor until smooth.
For the salad, preheat the oven to 200C/180C Fan/Gas 6.
Drizzle a little olive oil and sea salt on the bread and bake on a tray for 10 minutes or until a little golden and crisp.
Combine the tomatoes, red onion, peppers, parsley, extra virgin olive oil and pomegranate molasses with a little salt and pepper.
Heat a small frying pan and add the fennel and cumin seeds and cook until the start to release their oils. Place into a pestle and mortar and grind.
Heat the sunflower oil in a large frying pan over a medium to high heat. Season the flesh side of the mackerel with salt, the ground fennel, cumin and pul biber. Press the seasoning in. Cook the fish skin-side down in the frying pan for 2 minutes or until the skin is golden-brown and crisp. Turn over and cook for 1 minute or until the fish is just done.
For the Turskish chilli butter, heat the butter in a pan until foaming then add the chilli flakes, cook until the butter browns. Keep warm.
Just before serving dip some bread into the gazpacho. Place two slices of bread on the serving plate then pile the vegetables, serving ingredients and fish on top, pour over the chilli butter and serve.


MatisseContext
public class MatisseContext
The context object that schedules and executes image loading requests.
This is the central class coordinating image loading, creating and caching. It also takes care of request coalescing, so that multiple requests for the same image only need to do the download and creation once.
Caching
Caching in Matisse is done on two levels: fast and slow.
The fast cache is read/written directly on the main thread and therefore
must retrieve and store images fast (as the name indicates). This is
usually implemented using some kind of in-memory cache (like NSCache
).
The default Matisse instance uses the MemoryImageCache
for this if not
explicitely configured.
The second level is the slow cache. This cache will only be accessed from the sync
queue which is in the background. The slow cache may take more time to retrieve
cache images, and will often involve file IO. The default Matisse instance uses the
DiskImageCache
for this if not explicitely configured.
You provide the fast and slow cache in the initializer as classes implementing
ImageCache
. You may disable one or both chaches by passing nil
instead of
a cache object.
Request Handling
When an image request is submitted, the context first tries to find a matching
image in the slow cache, and if this fails the fast cache. If that fails, it
tries to find a currently executed request that is equivalent to the submitted
request. If such a request is found then the result of the running request will
be used for this request too. In case no such request can be found then the
contexts ImageRequestHandler
is asked to fullfill the image request. The result
is then cached if possible and returned for all equivalent requests.
If you want to customize downloading or image creation behavior, pass a custom
ImageRequestHandler
instance when creating the context.
-
Create a custom matisse context with the given caches and request handler.
You only need to create a custom
MatisseContext
if you want to create your own DSL object. If you want to configure the main DSL object you can do so directly using class methods on the DSL class (see the respective class documentation for Swift/Objective-C).Declaration
Swift
public convenience init(fastCache: ImageCache?, slowCache: ImageCache?, requestHandler: ImageRequestHandler)
Parameters
fastCache
The cache to use as fast cache (on the main thread). Pass
nil
to disable the fast cache.slowCache
The cache to use as slow cache (in the background). Pass
nil
to disable the slow cache.requestHandler
The
ImageRequestHandler
that is used to resolveImageRequest
s
-
Executes the given
ImageRequest
and returns the result asynchronously.First the request is attempted to resolve using the fast cache on the main thread. If an image is found, it’s returned from this method and the completion Block is called asynchronously. If this cache misses or no fast cache is set,
nil
is returned and the request will be tried to resolve in the background.First in the background, the slow cache is checked for a match. If successful, the completion block is called with the result. If that fails too, the request is passed to a queue that manages equivalent requests such that the work of downloading and creating the image only needs to be done once. If no equivalent request is already being resolved, then this request is resovled using the
ImageRequestHandler
. The result of this operation is reported using the completion block.Note
This method must be called from the main thread
Declaration
Swift
@discardableResult public func execute(request: ImageRequest, completion: @escaping (UIImage?, NSError?) -> Void) -> UIImage?
Parameters
request
The image request to resolve.
completion
The completion handler that will be called with the result. This block is always called asynchronously, even if the request was resolved using the fast cache.
Return Value
If the request could be resolved using the fast cache, this returns the resolved image. Otherwise
nil
is returned.


template<typename T, size_t N>
void
fill_missing(const std::array col_names, fill_policy policy, const std::array values = { }, int limit = -1);
|
It fills all the "missing values" with the given values, and/or using the given method
(See fill_policy above). Missing is determined by being NaN for types that have NaN.
For types without NaN (e.g. string), default value is considered missing value
|
T: Type of the column(s) in col_names array
N: Size of col_names and values array
col_names: An array of names specifying the columns to fill.
policy: Specifies the method to use to fill the missing values.
For example; forward fill, values, etc.
values: If the policy is "values", use these values to fill the missing
holes. Each value corresponds to the same index in the
col_names array.
limit: Specifies how many values to fill. Default is -1 meaning fill all missing values.
|


|
ActiveTcl User Guide
|
||
Tcl_RecordAndEval - save command on history list before evaluating
#include <tcl.h>
int
Tcl_RecordAndEval(interp, cmd, flags)
Tcl_RecordAndEval is invoked to record a command as an event on the history list and then execute it using Tcl_Eval (or Tcl_GlobalEval if the TCL_EVAL_GLOBAL bit is set in flags). It returns a completion code such as TCL_OK just like Tcl_Eval and it leaves information in the interpreter's result. If you don't want the command recorded on the history list then you should invoke Tcl_Eval instead of Tcl_RecordAndEval. Normally Tcl_RecordAndEval is only called with top-level commands typed by the user, since the purpose of history is to allow the user to re-issue recently-invoked commands. If the flags argument contains the TCL_NO_EVAL bit then the command is recorded without being evaluated.
Note that Tcl_RecordAndEval has been largely replaced by the object-based procedure Tcl_RecordAndEvalObj. That object-based procedure records and optionally executes a command held in a Tcl object instead of a string.
command, event, execute, history, interpreter, record
Copyright © 1989-1993 The Regents of the University of California. Copyright © 1994-1997 Sun Microsystems, Inc. Copyright © 1995-1997 Roger E. Critchlow Jr.


Check your details
| Where do you live? | In a property I own |
Change this |
| Are you a joint tenant? | No | Change this |
| Your address | 1 Street, Place, County, NE1234 | Change this |
| Do you pay rent? | Yes | Change this |
| How often do you pay your rent? | Weekly | Change this |
| Rent per week | £90 | Change this |
| Does your rent include any of the following? | No | Change this |
| Do you pay for any of the following where you live? | No | Change this |
| Do you pay Council Tax? | Yes | Change this |
| How often do you pay your council tax? | Monthly | Change this |
| Do you pay ground rent? | No | Change this |
| Do you have a loan to adapt your home for the special needs of a disabled person? | No | Change this |
| Does anyone else live in your home with you? | No | Change this |


Create a resource by creating a file in the resources folder. You can copy either example_resource.php or index_resource.php.
Create a method in your new resource named the same as the HTTP method you want it to handle. For example, if you look at the example_resource.php file, you'll see a method called GET. This method responds to an HTTP GET request to a relative url /example/ (NOTE: you can specify the representation with file extensions like .html, .xml, .json, .js, or even .phtml for partial HTML). If you want to handle the HTTP POST method, then create a method called POST.
Your methods will almost always look like this:
function GET(){
/* logic here */
$this->title = "An example using Chinchilla, A RESTful framework in PHP";
$this->output = view::render("example/index", $this);
return layout::render("default", $this);
}
The static view::render method will look in views/example/ for a file called index.html. The framework determines the file type (eg. html, xml, json, rss, atom, etc.) based on the url. If the url is /example.html, view::render will return the views/example/index.html file to the resource's $output property.
layout::render will get layouts/default.html, which echo's the resources $output property.
You'll also notice a themes folder in the file hierarchy. This folder contains themes that you might want to use for your site. There's a "default" theme in the code base now. The theme can be set in the theme_controller class. If the "views" folder hierarchy is defined in a theme folder within the themes folder, the framework will look there first to find any views. The view facility is how the framework implements the Representational part of REST. You can represent the data in any way by creating a view for it, according to the file type you specify. For instance, if I want a .doc representation, create view files appended with .doc. Check out the example resource and views to see what I mean.


get_weekly_flu_report.Rd
The CDC publishes a weekly
influenza report detailing high-level flu activity per-state. They also
publish a data file (see References
) of historical report readings.
This function reads that XML file and produces a long data_frame
with the historical surveillance readings.
This function provides similar data to get_state_data
but without
the reporting source metadata and a limit on the historical flu information.
get_weekly_flu_report()
tbl_df
(also classed with cdcweeklyreport
) with six
columns: year
, week_number
, state
, color
,
label
, subtitle
https://www.cdc.gov/flu/weekly/flureport.xml
# NOT RUN { wfr <- get_weekly_flu_report() # }


Openssl can encrypt and decrypt files. Sometimes these have the .enc extension
openssl enc -ciphers list all ciphers available to openssl
openssl <file> -d -salt -md md5 -in <.enc> -out <file> -k <pass> use openssl to decrypt a file
<file> to decrypt
-d: decrypt
-salt: salted
-md: hash
-in: encrypted file
-out: decrypted file output
-k: password to decrypt file with
potentially useful script https://github.com/glv2/bruteforce-salted-openssl
Can provide candidates for passwords from a file. Downside is you still have to loop through algos to try and actually decrypt


I am a new programmer but I'm learning fast thanks to Epicodus. Check out what I've accomplished in just three days below.
Ahh, Hello World! A critical juncture in all aspiring programmers' lives. This project is sure to wow potential employers, so I've made sure to present it first.
This project was a basic exercise in HTML that helped us get comfortable with git.
Though our preferences differed quite a bit, Qianqian and I had a great time discussing and laying out our very favorite things.
This project focused on basic HTML, most notably the img element.
They aren't with us today, but my two dogs Cocoa and Maggie are missed deeply. Their sibling rivalry will be forever unmatched.
This HTML project centered images, lists, and creatimg Github Pages.
Shirley and I created an inviting webpage for her dog Wiley's esteemed resort including six whole pages of great content.
This project was focused on linking multiple HTML pages and using consistent CSS styling across them.
Tim and I created this colorful webpage as an ode to one of our favorite travel destinations, Yellowstone National Park. Beware the bears!
This project was our first foray into Bootstrap, which helped us take our CSS chops to a new level
We may have missed the mark slightly, but Tim and I were proud of this effort to re-create Wikipedia's signature design. Turns out Wikipedia wasn't built in a day.
This project was the culmination of our CSS and Bootstrap knowledge, including grids, sidebars, and more.
Presented in descending order of proficiency:
Presented in descending order of interest:


Its important to note that the call we made in the previous page wont actually return anything as we did not use our API key.
Let's modify it so that we'll get an actual response:
Notice now we are using our public key (For the purpose of this guide, we are displaying our key. In reality never do this!) and we
have appended it to the endpoint. This will give us a result like this:
The result from calling the API will be in JSON format, but here we've parsed it into a JavaScript object. The comics endpoint returns all the comics
in Marvel's library. If I had included the full result, we would have had to scroll down for ages to get to the bottom.
Besides the Comics endpoint, Marvel offers five other resource types using the API. They are:
Each of these resources have the same base endpoint: https://gateway.marvel.com/v1/public/
. For the rest of this guide, we will focus on the Characters resource.
We still haven't done anything with this API. So, let's change that. Let's look up a hero.
Here's the format of the URL we can build to look one up: https://gateway.marvel.com/v1/public/characters?name=hero-name&apikey=publicKey
Once we receive the response, here is how we can access their bio (if they have one): response.data.results["0"].description;
Let's try it out! Look up Spider-man:


Vokter is a high-performance, scalable web service that uses Quartz Scheduler, DiffMatchPatch and MongoDB to provide web-page monitoring, triggering notifications when specified keywords were either added or removed from a web document.
This service implements a information retrieval system that fetches, indexes and performs queries over web documents on a periodic basis. Difference detection is implemented by comparing occurrences between two snapshots of the same document. Additionally, it supports multi-language stop-word filtering to ignore changes in common grammatical conjunctions or articles, and stemming to detect changes in lexically derived words.
Watch for content changes in a document
POST vokter/v1/subscribe
Payload:
{
"documentUrl": "http://www.example.com", // the page to be watched (mandatory field)
"clientUrl": "http://your.site/client-rest-api", // the client web service that will receive detected differences (mandatory field)
"keywords": // the keywords to watch for (mandatory field)
[
"argus", // looks for changes with this word (and lexical variants if stemming is enabled)
"argus panoptes" // looks for changes with this exact phrase (and lexical variants if stemming is enabled)
],
"interval": 600, // the elapsed duration (in seconds) between page checks (optional field, defaults to 600)
"ignoreAdded": false, // if 'true', ignore events where the keyword was added to the page (optional field, defaults to 'false')
"ignoreRemoved": false // if 'true', ignore events where the keyword was removed from the page (optional field, defaults to 'false')
}
Note that a subscribe request is uniquely identified by both its document URL and its client URL. This means that the same client can subscribe and receive notifications of multiple documents simultaneously, and the same document can be watched by multiple clients.
Manually cancel a watch job
POST vokter/v1/cancel
Payload:
{
"documentUrl": "http://www.example.com", // the page that was being watched (mandatory field)
"clientUrl": "http://your.site/client-rest-api" // the client web service (mandatory field)
}
Both of the calls above return the following JSON body:
{
"code": "0" // a number that uniquely identifies this error type (0 when the request was successful)
"message": "" // reason for the error (empty when the request was successful)
}
The error code is useful to convert received responses into custom error messages displayed to the user in the client app.
The following list shows all possible responses:
| Status Code | Body 'code' | Body 'message' |
|---|---|---|
| 200 | 0 | |
| 400 | 1 | The provided document URL is invalid. |
| 400 | 2 | The provided client URL is invalid. |
| 400 | 3 | You need to provide at least one valid keyword. |
| 400 | 4 | At least one difference action ('added' or 'removed') must not be ignored. |
| 409 | 5 | The request conflicts with a currently active watch job, since the provided document URL is already being watched and notified to the provided client URL. |
| 404 | 7 | The specified job to cancel does not exist. |
Notifications are REST requests, sent as POSTs, to the provided client URL at any time. The client URL should be implemented to accept the two requests below.
When detected differences are matched with keywords, Vokter sends notifications to the provided client URL with the following JSON body:
{
"status": "ok",
"url": "http://www.example.com",
"diffs": [
{
"action": "added",
"keyword": "argus",
"snippet": "In the 5th century and later, Argus' wakeful alertness ..."
},
{
"action": "removed",
"keyword": "argus",
"snippet": "... sacrifice of Argus liberated Io and allowed ..."
}
]
}
Vokter is capable of managing a high number of concurrent watch jobs, and is implemented to save resources and free up database and memory space whenever possible. To this effect, Vokter automatically expires jobs when it fails to fetch a web document after 10 consecutive tries. When that happens, the following JSON body is sent:
{
"status": "timeout",
"url": "http://www.example.com",
"diffs": []
}
Copyright 2015 Eduardo Duarte
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.


Ai For Healthcare
Hi this is Machine Learning app which predicts whether the patient has Diabetes or Not!
Enter the values for diabetis prediction
.
Predict Dibetis
{{ prediction_text }}