body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
05446ab8c39ac298fb49537b1db7fd79b46ccacfc3901b0ebb214a72c1199b33
def update_aps_command(client: MsClient, args: dict): 'Updating Analytics Platform System\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' setting_name = args.get('setting_name') auto_provision = args.get('auto_provision') setting = client.update_aps(setting_name, auto_p...
Updating Analytics Platform System Args: client: args (dict): usually demisto.args()
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
update_aps_command
jon-athon/content
799
python
def update_aps_command(client: MsClient, args: dict): 'Updating Analytics Platform System\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' setting_name = args.get('setting_name') auto_provision = args.get('auto_provision') setting = client.update_aps(setting_name, auto_p...
def update_aps_command(client: MsClient, args: dict): 'Updating Analytics Platform System\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' setting_name = args.get('setting_name') auto_provision = args.get('auto_provision') setting = client.update_aps(setting_name, auto_p...
111fdac04f066f652dcf91bce284b5315e0aaf1bc3bf9c87cf565b2024bfd005
def list_aps_command(client: MsClient): 'List all Analytics Platform System\n\n ' settings = client.list_aps().get('value') outputs = [] for setting in settings: outputs.append({'Name': setting.get('name'), 'AutoProvision': (setting.get('properties').get('autoProvision') if (setting.get('prop...
List all Analytics Platform System
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_aps_command
jon-athon/content
799
python
def list_aps_command(client: MsClient): '\n\n ' settings = client.list_aps().get('value') outputs = [] for setting in settings: outputs.append({'Name': setting.get('name'), 'AutoProvision': (setting.get('properties').get('autoProvision') if (setting.get('properties') and setting.get('properti...
def list_aps_command(client: MsClient): '\n\n ' settings = client.list_aps().get('value') outputs = [] for setting in settings: outputs.append({'Name': setting.get('name'), 'AutoProvision': (setting.get('properties').get('autoProvision') if (setting.get('properties') and setting.get('properti...
4e34428813b7a3ca2de28a153b99b4cf154af627539d85675a04571a8ca850c5
def get_aps_command(client: MsClient, args: dict): 'Get given Analytics Platform System setting\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' setting_name = args.get('setting_name') setting = client.get_aps(setting_name) outputs = [{'Name': setting.get('name'), 'AutoP...
Get given Analytics Platform System setting Args: client: args (dict): usually demisto.args()
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
get_aps_command
jon-athon/content
799
python
def get_aps_command(client: MsClient, args: dict): 'Get given Analytics Platform System setting\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' setting_name = args.get('setting_name') setting = client.get_aps(setting_name) outputs = [{'Name': setting.get('name'), 'AutoP...
def get_aps_command(client: MsClient, args: dict): 'Get given Analytics Platform System setting\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' setting_name = args.get('setting_name') setting = client.get_aps(setting_name) outputs = [{'Name': setting.get('name'), 'AutoP...
46f3de8b1a3d0f390cade2b2d58b2180efba7f04094a5bb53bad0e019c27fc41
def list_ipp_command(client: MsClient, args: dict): 'Listing all Internet Presence Provider\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' management_group = args.get('management_group') policies = client.list_ipp(management_group).get('value') outputs = list() if ...
Listing all Internet Presence Provider Args: client: args (dict): usually demisto.args()
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_ipp_command
jon-athon/content
799
python
def list_ipp_command(client: MsClient, args: dict): 'Listing all Internet Presence Provider\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' management_group = args.get('management_group') policies = client.list_ipp(management_group).get('value') outputs = list() if ...
def list_ipp_command(client: MsClient, args: dict): 'Listing all Internet Presence Provider\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' management_group = args.get('management_group') policies = client.list_ipp(management_group).get('value') outputs = list() if ...
0ae0ad0b69fdb2e67978babfbc6a4ea3735a9cf2381546bc92c5402b7611f5f7
def get_ipp_command(client: MsClient, args: dict): 'Getting Internet Presence Provider information\n Args:\n client:\n args (dict): usually demisto.args()\n ' policy_name = args.get('policy_name') management_group = args.get('management_group') policy = client.get_ipp(policy_name, ma...
Getting Internet Presence Provider information Args: client: args (dict): usually demisto.args()
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
get_ipp_command
jon-athon/content
799
python
def get_ipp_command(client: MsClient, args: dict): 'Getting Internet Presence Provider information\n Args:\n client:\n args (dict): usually demisto.args()\n ' policy_name = args.get('policy_name') management_group = args.get('management_group') policy = client.get_ipp(policy_name, ma...
def get_ipp_command(client: MsClient, args: dict): 'Getting Internet Presence Provider information\n Args:\n client:\n args (dict): usually demisto.args()\n ' policy_name = args.get('policy_name') management_group = args.get('management_group') policy = client.get_ipp(policy_name, ma...
7302bad45ef2162e69df8921ae5b37414318208c830d4026a0a8f3da4534cd18
def list_jit_command(client: MsClient, args: dict): 'Lists all Just-in-time Virtual Machines\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' asc_location = args.get('asc_location') resource_group_name = args.get('resource_group_name') policies = client.list_jit(asc_loca...
Lists all Just-in-time Virtual Machines Args: client: args (dict): usually demisto.args()
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_jit_command
jon-athon/content
799
python
def list_jit_command(client: MsClient, args: dict): 'Lists all Just-in-time Virtual Machines\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' asc_location = args.get('asc_location') resource_group_name = args.get('resource_group_name') policies = client.list_jit(asc_loca...
def list_jit_command(client: MsClient, args: dict): 'Lists all Just-in-time Virtual Machines\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' asc_location = args.get('asc_location') resource_group_name = args.get('resource_group_name') policies = client.list_jit(asc_loca...
c1e9d5c358d86ddd4174e2e771c31cf1b60442e9cfa0d58ff35ecb619c42639d
def get_jit_command(client: MsClient, args: dict): 'Getting given Just-in-time machine\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' policy_name = args.get('policy_name') asc_location = args.get('asc_location') resource_group_name = args.get('resource_group_name') ...
Getting given Just-in-time machine Args: client: args (dict): usually demisto.args()
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
get_jit_command
jon-athon/content
799
python
def get_jit_command(client: MsClient, args: dict): 'Getting given Just-in-time machine\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' policy_name = args.get('policy_name') asc_location = args.get('asc_location') resource_group_name = args.get('resource_group_name') ...
def get_jit_command(client: MsClient, args: dict): 'Getting given Just-in-time machine\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' policy_name = args.get('policy_name') asc_location = args.get('asc_location') resource_group_name = args.get('resource_group_name') ...
d42c804f136b1b441f5a52aa9a92b280fee191e9c1e94a0b6f2d1aac6cda2425
def delete_jit_command(client: MsClient, args: dict): 'Deletes a Just-in-time machine\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' asc_location = args.get('asc_location') resource_group_name = args.get('resource_group_name') policy_name = args.get('policy_name') ...
Deletes a Just-in-time machine Args: client: args (dict): usually demisto.args()
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
delete_jit_command
jon-athon/content
799
python
def delete_jit_command(client: MsClient, args: dict): 'Deletes a Just-in-time machine\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' asc_location = args.get('asc_location') resource_group_name = args.get('resource_group_name') policy_name = args.get('policy_name') ...
def delete_jit_command(client: MsClient, args: dict): 'Deletes a Just-in-time machine\n\n Args:\n client:\n args (dict): usually demisto.args()\n ' asc_location = args.get('asc_location') resource_group_name = args.get('resource_group_name') policy_name = args.get('policy_name') ...
faf5fb56c4b2f5414e939ee292f7eb6d172d5ea90303655a707d10d9f1ec01c5
def list_sc_storage_command(client: MsClient): 'Listing all Security Center Storages\n\n ' accounts = client.list_sc_storage().get('value') outputs = list() for account in accounts: account_id_array = account.get('id', str()).split('/') resource_group_name = account_id_array[(account_...
Listing all Security Center Storages
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_sc_storage_command
jon-athon/content
799
python
def list_sc_storage_command(client: MsClient): '\n\n ' accounts = client.list_sc_storage().get('value') outputs = list() for account in accounts: account_id_array = account.get('id', str()).split('/') resource_group_name = account_id_array[(account_id_array.index('resourceGroups') + 1...
def list_sc_storage_command(client: MsClient): '\n\n ' accounts = client.list_sc_storage().get('value') outputs = list() for account in accounts: account_id_array = account.get('id', str()).split('/') resource_group_name = account_id_array[(account_id_array.index('resourceGroups') + 1...
5a9e0821a1a3f35b97642d15cd6423f78b81026638515eda00164f749b6eb374
def list_sc_subscriptions_command(client: MsClient): 'Listing Subscriptions for this application\n\n ' subscriptions = client.list_sc_subscriptions().get('value') outputs = list() for sub in subscriptions: outputs.append({'Name': sub.get('displayName'), 'State': sub.get('state'), 'ID': sub.ge...
Listing Subscriptions for this application
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_sc_subscriptions_command
jon-athon/content
799
python
def list_sc_subscriptions_command(client: MsClient): '\n\n ' subscriptions = client.list_sc_subscriptions().get('value') outputs = list() for sub in subscriptions: outputs.append({'Name': sub.get('displayName'), 'State': sub.get('state'), 'ID': sub.get('id')}) md = tableToMarkdown('Azure ...
def list_sc_subscriptions_command(client: MsClient): '\n\n ' subscriptions = client.list_sc_subscriptions().get('value') outputs = list() for sub in subscriptions: outputs.append({'Name': sub.get('displayName'), 'State': sub.get('state'), 'ID': sub.get('id')}) md = tableToMarkdown('Azure ...
bdbf76a6b7daec7409f9a11abc14050a2dc8e5e80fb2ab9ff7472a31ff7ba596
def test_module(client: MsClient): '\n Performs basic GET request to check if the API is reachable and authentication is successful.\n Returns ok if successful.\n ' if client.subscription_id: client.list_locations() else: client.list_sc_subscriptions() demisto.results('...
Performs basic GET request to check if the API is reachable and authentication is successful. Returns ok if successful.
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
test_module
jon-athon/content
799
python
def test_module(client: MsClient): '\n Performs basic GET request to check if the API is reachable and authentication is successful.\n Returns ok if successful.\n ' if client.subscription_id: client.list_locations() else: client.list_sc_subscriptions() demisto.results('...
def test_module(client: MsClient): '\n Performs basic GET request to check if the API is reachable and authentication is successful.\n Returns ok if successful.\n ' if client.subscription_id: client.list_locations() else: client.list_sc_subscriptions() demisto.results('...
db5205f05b3861eef4308b8ea26c8f9c8b89014b3c2b920ec1ac101a7fc66ca2
def get_alert(self, resource_group_name, asc_location, alert_id): '\n Args:\n resource_group_name (str): ResourceGroupName\n asc_location (str): Azure Security Center location\n alert_id (str): Alert ID\n\n Returns:\n response body (dict)\n\n ' cm...
Args: resource_group_name (str): ResourceGroupName asc_location (str): Azure Security Center location alert_id (str): Alert ID Returns: response body (dict)
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
get_alert
jon-athon/content
799
python
def get_alert(self, resource_group_name, asc_location, alert_id): '\n Args:\n resource_group_name (str): ResourceGroupName\n asc_location (str): Azure Security Center location\n alert_id (str): Alert ID\n\n Returns:\n response body (dict)\n\n ' cm...
def get_alert(self, resource_group_name, asc_location, alert_id): '\n Args:\n resource_group_name (str): ResourceGroupName\n asc_location (str): Azure Security Center location\n alert_id (str): Alert ID\n\n Returns:\n response body (dict)\n\n ' cm...
972e7dd535a129d69f6539587a11a8dbd713937d6ff6c4b37ae3f4220d8a516e
def list_alerts(self, resource_group_name, asc_location, filter_query, select_query, expand_query): 'Listing alerts\n\n Args:\n resource_group_name (str): ResourceGroupName\n asc_location (str): Azure Security Center location\n filter_query (str): what to filter\n ...
Listing alerts Args: resource_group_name (str): ResourceGroupName asc_location (str): Azure Security Center location filter_query (str): what to filter select_query (str): what to select expand_query (str): what to expand Returns: dict: contains response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_alerts
jon-athon/content
799
python
def list_alerts(self, resource_group_name, asc_location, filter_query, select_query, expand_query): 'Listing alerts\n\n Args:\n resource_group_name (str): ResourceGroupName\n asc_location (str): Azure Security Center location\n filter_query (str): what to filter\n ...
def list_alerts(self, resource_group_name, asc_location, filter_query, select_query, expand_query): 'Listing alerts\n\n Args:\n resource_group_name (str): ResourceGroupName\n asc_location (str): Azure Security Center location\n filter_query (str): what to filter\n ...
3cef72acaac214e1e17ec6ad48e348e8368613cfaf59ec2a1c1af0c27750e8a9
def update_alert(self, resource_group_name, asc_location, alert_id, alert_update_action_type): '\n Args:\n resource_group_name (str): Resource Name Group\n asc_location (str): Azure Security Center Location\n alert_id (str): Alert ID\n alert_update_action_type (str...
Args: resource_group_name (str): Resource Name Group asc_location (str): Azure Security Center Location alert_id (str): Alert ID alert_update_action_type (str): What update type need to update Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
update_alert
jon-athon/content
799
python
def update_alert(self, resource_group_name, asc_location, alert_id, alert_update_action_type): '\n Args:\n resource_group_name (str): Resource Name Group\n asc_location (str): Azure Security Center Location\n alert_id (str): Alert ID\n alert_update_action_type (str...
def update_alert(self, resource_group_name, asc_location, alert_id, alert_update_action_type): '\n Args:\n resource_group_name (str): Resource Name Group\n asc_location (str): Azure Security Center Location\n alert_id (str): Alert ID\n alert_update_action_type (str...
b4a549df9f531f8ab9c7c7b4d34d671ad0868b3d6ef04780249a1eb356d37296
def list_locations(self): '\n Returns:\n dict: response body\n ' cmd_url = '/providers/Microsoft.Security/locations' params = {'api-version': LOCATION_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cmd_url, params=params)
Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_locations
jon-athon/content
799
python
def list_locations(self): '\n Returns:\n dict: response body\n ' cmd_url = '/providers/Microsoft.Security/locations' params = {'api-version': LOCATION_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cmd_url, params=params)
def list_locations(self): '\n Returns:\n dict: response body\n ' cmd_url = '/providers/Microsoft.Security/locations' params = {'api-version': LOCATION_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cmd_url, params=params)<|docstring|>Returns: dict: ...
e8be491aa475e42a62c0cd5db1efcb11f708d6a48195e2533f4d4a14799dfe71
def update_atp(self, resource_group_name, storage_account, setting_name, is_enabled): '\n Args:\n resource_group_name (str): Resource Group Name\n storage_account (str): Storange Account\n setting_name (str): Setting Name\n is_enabled (str): true/false\n\n ...
Args: resource_group_name (str): Resource Group Name storage_account (str): Storange Account setting_name (str): Setting Name is_enabled (str): true/false Returns: dict: respones body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
update_atp
jon-athon/content
799
python
def update_atp(self, resource_group_name, storage_account, setting_name, is_enabled): '\n Args:\n resource_group_name (str): Resource Group Name\n storage_account (str): Storange Account\n setting_name (str): Setting Name\n is_enabled (str): true/false\n\n ...
def update_atp(self, resource_group_name, storage_account, setting_name, is_enabled): '\n Args:\n resource_group_name (str): Resource Group Name\n storage_account (str): Storange Account\n setting_name (str): Setting Name\n is_enabled (str): true/false\n\n ...
65652fe841fb55f40ece6f4ce3480964d2178397f89782bc9f3a05c2da6605cb
def get_atp(self, resource_group_name, storage_account, setting_name): '\n Args:\n resource_group_name (str): Resource Group Name\n storage_account (str): Storange Account\n setting_name (str): Setting Name\n\n Returns:\n\n ' cmd_url = f'/resourceGroups/{re...
Args: resource_group_name (str): Resource Group Name storage_account (str): Storange Account setting_name (str): Setting Name Returns:
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
get_atp
jon-athon/content
799
python
def get_atp(self, resource_group_name, storage_account, setting_name): '\n Args:\n resource_group_name (str): Resource Group Name\n storage_account (str): Storange Account\n setting_name (str): Setting Name\n\n Returns:\n\n ' cmd_url = f'/resourceGroups/{re...
def get_atp(self, resource_group_name, storage_account, setting_name): '\n Args:\n resource_group_name (str): Resource Group Name\n storage_account (str): Storange Account\n setting_name (str): Setting Name\n\n Returns:\n\n ' cmd_url = f'/resourceGroups/{re...
2613da096a521f737f8e9e0b543c50301acd736877eb9af2697042f37177022b
def update_aps(self, setting_name, auto_provision): '\n Args:\n setting_name (str): Setting name\n auto_provision (str): Auto provision setting (On/Off)\n\n Returns:\n dict: response body\n ' cmd_url = f'/providers/Microsoft.Security/autoProvisioningSettings...
Args: setting_name (str): Setting name auto_provision (str): Auto provision setting (On/Off) Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
update_aps
jon-athon/content
799
python
def update_aps(self, setting_name, auto_provision): '\n Args:\n setting_name (str): Setting name\n auto_provision (str): Auto provision setting (On/Off)\n\n Returns:\n dict: response body\n ' cmd_url = f'/providers/Microsoft.Security/autoProvisioningSettings...
def update_aps(self, setting_name, auto_provision): '\n Args:\n setting_name (str): Setting name\n auto_provision (str): Auto provision setting (On/Off)\n\n Returns:\n dict: response body\n ' cmd_url = f'/providers/Microsoft.Security/autoProvisioningSettings...
df86078c75e199804266bfab2ed7b39c321d9bf14c09e440b09a7e3867389266
def list_aps(self): '\n Returns:\n dict: response body\n ' cmd_url = '/providers/Microsoft.Security/autoProvisioningSettings' params = {'api-version': APS_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cmd_url, params=params)
Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_aps
jon-athon/content
799
python
def list_aps(self): '\n Returns:\n dict: response body\n ' cmd_url = '/providers/Microsoft.Security/autoProvisioningSettings' params = {'api-version': APS_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cmd_url, params=params)
def list_aps(self): '\n Returns:\n dict: response body\n ' cmd_url = '/providers/Microsoft.Security/autoProvisioningSettings' params = {'api-version': APS_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cmd_url, params=params)<|docstring|>Returns: di...
efe009ab7299d797a14c741b679167bed51324c6b160e58d98bd0deaf38f3615
def get_aps(self, setting_name): '\n Args:\n setting_name: Setting name\n\n Returns:\n dict: response body\n ' cmd_url = f'/providers/Microsoft.Security/autoProvisioningSettings/{setting_name}' params = {'api-version': APS_API_VERSION} return self.ms_client.htt...
Args: setting_name: Setting name Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
get_aps
jon-athon/content
799
python
def get_aps(self, setting_name): '\n Args:\n setting_name: Setting name\n\n Returns:\n dict: response body\n ' cmd_url = f'/providers/Microsoft.Security/autoProvisioningSettings/{setting_name}' params = {'api-version': APS_API_VERSION} return self.ms_client.htt...
def get_aps(self, setting_name): '\n Args:\n setting_name: Setting name\n\n Returns:\n dict: response body\n ' cmd_url = f'/providers/Microsoft.Security/autoProvisioningSettings/{setting_name}' params = {'api-version': APS_API_VERSION} return self.ms_client.htt...
f58c649b9c147f58527eb16dbab1efe6fd73cbc1bffd4a08f64567ba7185bb20
def list_ipp(self, management_group=None): '\n Args:\n management_group: Managment group to pull (if needed)\n\n Returns:\n dict: response body\n\n ' params = {'api-version': IPP_API_VERSION} cmd_url = '/providers/Microsoft.Security/informationProtectionPolicies' ...
Args: management_group: Managment group to pull (if needed) Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_ipp
jon-athon/content
799
python
def list_ipp(self, management_group=None): '\n Args:\n management_group: Managment group to pull (if needed)\n\n Returns:\n dict: response body\n\n ' params = {'api-version': IPP_API_VERSION} cmd_url = '/providers/Microsoft.Security/informationProtectionPolicies' ...
def list_ipp(self, management_group=None): '\n Args:\n management_group: Managment group to pull (if needed)\n\n Returns:\n dict: response body\n\n ' params = {'api-version': IPP_API_VERSION} cmd_url = '/providers/Microsoft.Security/informationProtectionPolicies' ...
528d92be823fb9018c777fbc169dba90aa161fd0373f7f2f1043b9cf5b1a20b9
def get_ipp(self, policy_name, management_group): '\n Args:\n policy_name (str): Policy name\n management_group (str): Managment group\n\n Returns:\n dict: respone body\n ' params = {'api-version': IPP_API_VERSION} cmd_url = f'/providers/Microsoft.Securi...
Args: policy_name (str): Policy name management_group (str): Managment group Returns: dict: respone body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
get_ipp
jon-athon/content
799
python
def get_ipp(self, policy_name, management_group): '\n Args:\n policy_name (str): Policy name\n management_group (str): Managment group\n\n Returns:\n dict: respone body\n ' params = {'api-version': IPP_API_VERSION} cmd_url = f'/providers/Microsoft.Securi...
def get_ipp(self, policy_name, management_group): '\n Args:\n policy_name (str): Policy name\n management_group (str): Managment group\n\n Returns:\n dict: respone body\n ' params = {'api-version': IPP_API_VERSION} cmd_url = f'/providers/Microsoft.Securi...
cab8ca5a5043f0dbd040a3c144f2be14bcc5803ef99dd875fe207f0a7df5626c
def list_jit(self, asc_location, resource_group_name): '\n Args:\n asc_location: Machine location\n resource_group_name: Resource group name\n\n Returns:\n dict: response body\n ' params = {'api-version': JIT_API_VERSION} cmd_url = (f'/resourceGroups/{re...
Args: asc_location: Machine location resource_group_name: Resource group name Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_jit
jon-athon/content
799
python
def list_jit(self, asc_location, resource_group_name): '\n Args:\n asc_location: Machine location\n resource_group_name: Resource group name\n\n Returns:\n dict: response body\n ' params = {'api-version': JIT_API_VERSION} cmd_url = (f'/resourceGroups/{re...
def list_jit(self, asc_location, resource_group_name): '\n Args:\n asc_location: Machine location\n resource_group_name: Resource group name\n\n Returns:\n dict: response body\n ' params = {'api-version': JIT_API_VERSION} cmd_url = (f'/resourceGroups/{re...
025dec5eca7465daba44115f82010111981f6cdac0566181c2c8d921cf7ba2d5
def get_jit(self, policy_name, asc_location, resource_group_name): '\n Args:\n policy_name: Policy name\n asc_location: Machine location\n resource_group_name: Resource name group\n\n Returns:\n dict: response body\n ' cmd_url = f'/resourceGroups/...
Args: policy_name: Policy name asc_location: Machine location resource_group_name: Resource name group Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
get_jit
jon-athon/content
799
python
def get_jit(self, policy_name, asc_location, resource_group_name): '\n Args:\n policy_name: Policy name\n asc_location: Machine location\n resource_group_name: Resource name group\n\n Returns:\n dict: response body\n ' cmd_url = f'/resourceGroups/...
def get_jit(self, policy_name, asc_location, resource_group_name): '\n Args:\n policy_name: Policy name\n asc_location: Machine location\n resource_group_name: Resource name group\n\n Returns:\n dict: response body\n ' cmd_url = f'/resourceGroups/...
cdb2f699e04fc11f9a0ea2f25a7a3be5273f9b5097dffda0aa3e580de5f63f2b
def initiate_jit(self, resource_group_name, asc_location, policy_name, vm_id, port, source_address, duration): 'Starting new Just-in-time machine\n\n Args:\n resource_group_name: Resource group name\n asc_location: Machine location\n policy_name: Policy name\n vm_i...
Starting new Just-in-time machine Args: resource_group_name: Resource group name asc_location: Machine location policy_name: Policy name vm_id: Virtual Machine ID port: ports to be used source_address: Source address duration: Time in Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
initiate_jit
jon-athon/content
799
python
def initiate_jit(self, resource_group_name, asc_location, policy_name, vm_id, port, source_address, duration): 'Starting new Just-in-time machine\n\n Args:\n resource_group_name: Resource group name\n asc_location: Machine location\n policy_name: Policy name\n vm_i...
def initiate_jit(self, resource_group_name, asc_location, policy_name, vm_id, port, source_address, duration): 'Starting new Just-in-time machine\n\n Args:\n resource_group_name: Resource group name\n asc_location: Machine location\n policy_name: Policy name\n vm_i...
e0e2c7c7562cdc72cfc46890e26245577b1de1a97e734cdee9a4e99ba0ab0214
def delete_jit(self, asc_location, resource_group_name, policy_name): '\n Args:\n asc_location: Machine location\n resource_group_name: Resource group name\n policy_name: Policy name\n ' cmd_url = f'/resourceGroups/{resource_group_name}/providers/Microsoft.Security...
Args: asc_location: Machine location resource_group_name: Resource group name policy_name: Policy name
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
delete_jit
jon-athon/content
799
python
def delete_jit(self, asc_location, resource_group_name, policy_name): '\n Args:\n asc_location: Machine location\n resource_group_name: Resource group name\n policy_name: Policy name\n ' cmd_url = f'/resourceGroups/{resource_group_name}/providers/Microsoft.Security...
def delete_jit(self, asc_location, resource_group_name, policy_name): '\n Args:\n asc_location: Machine location\n resource_group_name: Resource group name\n policy_name: Policy name\n ' cmd_url = f'/resourceGroups/{resource_group_name}/providers/Microsoft.Security...
e793f492b96a9a841985f58495d94d120b7ddf19adcbe66542b3728790321eb6
def list_sc_storage(self): '\n Returns:\n dict: response body\n\n ' cmd_url = '/providers/Microsoft.Storage/storageAccounts' params = {'api-version': STORAGE_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cmd_url, params=params)
Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_sc_storage
jon-athon/content
799
python
def list_sc_storage(self): '\n Returns:\n dict: response body\n\n ' cmd_url = '/providers/Microsoft.Storage/storageAccounts' params = {'api-version': STORAGE_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cmd_url, params=params)
def list_sc_storage(self): '\n Returns:\n dict: response body\n\n ' cmd_url = '/providers/Microsoft.Storage/storageAccounts' params = {'api-version': STORAGE_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cmd_url, params=params)<|docstring|>Returns: ...
0ecf14d992ec4fc16fb83342968d8774623fb13d0e3164337911768850c09e35
def list_sc_subscriptions(self): '\n Returns:\n dict: response body\n\n ' full_url = f'{self.server}/subscriptions' params = {'api-version': SUBSCRIPTION_API_VERSION} return self.ms_client.http_request(method='GET', full_url=full_url, url_suffix='', params=params)
Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
list_sc_subscriptions
jon-athon/content
799
python
def list_sc_subscriptions(self): '\n Returns:\n dict: response body\n\n ' full_url = f'{self.server}/subscriptions' params = {'api-version': SUBSCRIPTION_API_VERSION} return self.ms_client.http_request(method='GET', full_url=full_url, url_suffix=, params=params)
def list_sc_subscriptions(self): '\n Returns:\n dict: response body\n\n ' full_url = f'{self.server}/subscriptions' params = {'api-version': SUBSCRIPTION_API_VERSION} return self.ms_client.http_request(method='GET', full_url=full_url, url_suffix=, params=params)<|docstring|>Retu...
6813de439192ce389e088604782b947c41dbe5b6df73a8618c39507e3e376f5d
def get_secure_scores(self, secure_score_name): '\n Returns:\n dict: response body\n\n ' cmd_url = f'/providers/Microsoft.Security/secureScores/{secure_score_name}' params = {'api-version': SECURE_STORES_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cm...
Returns: dict: response body
Packs/AzureSecurityCenter/Integrations/AzureSecurityCenter_v2/AzureSecurityCenter_v2.py
get_secure_scores
jon-athon/content
799
python
def get_secure_scores(self, secure_score_name): '\n Returns:\n dict: response body\n\n ' cmd_url = f'/providers/Microsoft.Security/secureScores/{secure_score_name}' params = {'api-version': SECURE_STORES_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cm...
def get_secure_scores(self, secure_score_name): '\n Returns:\n dict: response body\n\n ' cmd_url = f'/providers/Microsoft.Security/secureScores/{secure_score_name}' params = {'api-version': SECURE_STORES_API_VERSION} return self.ms_client.http_request(method='GET', url_suffix=cm...
238955b3c02b7ef48ed06dd0ff9c1ca127c6aa29f3ddcbacd24d13bd6545c046
@property def src_dim(self) -> Tuple[(Tuple[(int, int)], Tuple[(int, int)])]: 'x and y ranges of source.' return self._src_dim
x and y ranges of source.
model_and_simulate/utilities/coordinate_mapper.py
src_dim
tomtuamnuq/model_and_simulate
1
python
@property def src_dim(self) -> Tuple[(Tuple[(int, int)], Tuple[(int, int)])]: return self._src_dim
@property def src_dim(self) -> Tuple[(Tuple[(int, int)], Tuple[(int, int)])]: return self._src_dim<|docstring|>x and y ranges of source.<|endoftext|>
a1faf3d1d4f40d0b7dbbbdf1d29514f9f333eb9fa02ff67b71a15d26bbc4bc53
@src_dim.setter def src_dim(self, src_dim: Tuple[(Tuple[(int, int)], Tuple[(int, int)])]) -> None: 'Setter for src_dim.' self._src_dim = src_dim self._scale_matrix = self._calc_scale_matrix()
Setter for src_dim.
model_and_simulate/utilities/coordinate_mapper.py
src_dim
tomtuamnuq/model_and_simulate
1
python
@src_dim.setter def src_dim(self, src_dim: Tuple[(Tuple[(int, int)], Tuple[(int, int)])]) -> None: self._src_dim = src_dim self._scale_matrix = self._calc_scale_matrix()
@src_dim.setter def src_dim(self, src_dim: Tuple[(Tuple[(int, int)], Tuple[(int, int)])]) -> None: self._src_dim = src_dim self._scale_matrix = self._calc_scale_matrix()<|docstring|>Setter for src_dim.<|endoftext|>
1801aaf7c5e2c91f32a919c593e1f23b49119129459c2991796ed28eff28f27f
@property def dst_dim(self) -> Tuple[(Tuple[(int, int)], Tuple[(int, int)])]: 'x and y ranges of destination.' return self._dst_dim
x and y ranges of destination.
model_and_simulate/utilities/coordinate_mapper.py
dst_dim
tomtuamnuq/model_and_simulate
1
python
@property def dst_dim(self) -> Tuple[(Tuple[(int, int)], Tuple[(int, int)])]: return self._dst_dim
@property def dst_dim(self) -> Tuple[(Tuple[(int, int)], Tuple[(int, int)])]: return self._dst_dim<|docstring|>x and y ranges of destination.<|endoftext|>
1b7daed7a5c220944bd515f785afdd929d1b580251df64bf51822377dcd61536
@dst_dim.setter def dst_dim(self, dst_dim: Tuple[(Tuple[(int, int)], Tuple[(int, int)])]) -> None: 'Setter for dst_dim.' self._dst_dim = dst_dim self._scale_matrix = self._calc_scale_matrix()
Setter for dst_dim.
model_and_simulate/utilities/coordinate_mapper.py
dst_dim
tomtuamnuq/model_and_simulate
1
python
@dst_dim.setter def dst_dim(self, dst_dim: Tuple[(Tuple[(int, int)], Tuple[(int, int)])]) -> None: self._dst_dim = dst_dim self._scale_matrix = self._calc_scale_matrix()
@dst_dim.setter def dst_dim(self, dst_dim: Tuple[(Tuple[(int, int)], Tuple[(int, int)])]) -> None: self._dst_dim = dst_dim self._scale_matrix = self._calc_scale_matrix()<|docstring|>Setter for dst_dim.<|endoftext|>
241d1d3778c9f35d688fa5c66f8cf3a9aab31f074530197249b56e135e7810d5
def map_coordinates(self, pos_sim: np.ndarray) -> np.ndarray: 'Maps source coordinates to destination coordinates.' return np.matmul(pos_sim, self._scale_matrix)
Maps source coordinates to destination coordinates.
model_and_simulate/utilities/coordinate_mapper.py
map_coordinates
tomtuamnuq/model_and_simulate
1
python
def map_coordinates(self, pos_sim: np.ndarray) -> np.ndarray: return np.matmul(pos_sim, self._scale_matrix)
def map_coordinates(self, pos_sim: np.ndarray) -> np.ndarray: return np.matmul(pos_sim, self._scale_matrix)<|docstring|>Maps source coordinates to destination coordinates.<|endoftext|>
6d0bb5c3a3d54c2a98832a641169df376558cdcf14177102fc070f1628bb088f
def scale_size_x(self, size_sim: float) -> float: 'Scales the given size to the visualization.' length_sim = np.asarray([size_sim, 0]) return self.map_coordinates(length_sim)[0]
Scales the given size to the visualization.
model_and_simulate/utilities/coordinate_mapper.py
scale_size_x
tomtuamnuq/model_and_simulate
1
python
def scale_size_x(self, size_sim: float) -> float: length_sim = np.asarray([size_sim, 0]) return self.map_coordinates(length_sim)[0]
def scale_size_x(self, size_sim: float) -> float: length_sim = np.asarray([size_sim, 0]) return self.map_coordinates(length_sim)[0]<|docstring|>Scales the given size to the visualization.<|endoftext|>
3cbc78ae161302d88eab401c9a44925f5e59da727addacfdcf93d048f9c41611
def image_chunk(self, images, n): 'Yield successive n-sized chunks from l.' return [images[i:(i + n)] for i in range(0, len(images), n)]
Yield successive n-sized chunks from l.
face_recognition/identifier.py
image_chunk
Skarlso/kube-cluster-sample
40
python
def image_chunk(self, images, n): return [images[i:(i + n)] for i in range(0, len(images), n)]
def image_chunk(self, images, n): return [images[i:(i + n)] for i in range(0, len(images), n)]<|docstring|>Yield successive n-sized chunks from l.<|endoftext|>
8bda91141870037d9dc219374e983ca238b6a9feb214f95ff2eaaf6eff984722
def request_payment(user_id, message, options): 'Note that amount is a integer which specifies the amount of cents in the transaction\n Smooch will default to the currency specified in your account settings.' if (not valid_args(user_id, message, options)): logging.warning('request payment called with...
Note that amount is a integer which specifies the amount of cents in the transaction Smooch will default to the currency specified in your account settings.
smooch/conversations.py
request_payment
devinmcgloin/smooch
3
python
def request_payment(user_id, message, options): 'Note that amount is a integer which specifies the amount of cents in the transaction\n Smooch will default to the currency specified in your account settings.' if (not valid_args(user_id, message, options)): logging.warning('request payment called with...
def request_payment(user_id, message, options): 'Note that amount is a integer which specifies the amount of cents in the transaction\n Smooch will default to the currency specified in your account settings.' if (not valid_args(user_id, message, options)): logging.warning('request payment called with...
f04cecf125c2ed373bcf89ef572d53c49c30d7df909453e2c90a7107ef27541b
def send_links(user_id, message, options): 'Sends a series of links. The options field is a dictionary in which the keys are\n descriptions and values uris' if (not valid_args(user_id, message, options)): logging.warning('send links called with invalid args user_id={} message={} options={}'.format(us...
Sends a series of links. The options field is a dictionary in which the keys are descriptions and values uris
smooch/conversations.py
send_links
devinmcgloin/smooch
3
python
def send_links(user_id, message, options): 'Sends a series of links. The options field is a dictionary in which the keys are\n descriptions and values uris' if (not valid_args(user_id, message, options)): logging.warning('send links called with invalid args user_id={} message={} options={}'.format(us...
def send_links(user_id, message, options): 'Sends a series of links. The options field is a dictionary in which the keys are\n descriptions and values uris' if (not valid_args(user_id, message, options)): logging.warning('send links called with invalid args user_id={} message={} options={}'.format(us...
0e5b5de46919bce7affd0a3b7ab34b3bfcdabfd177a33992366b195a3100fa7d
def send_postbacks(user_id, message, options): 'Sends a series of options that you can listen for on your webhook. The options field is a dictionary in which the keys are\n descriptions and values the postback payload. You need to set up a webhook to listen for the postback.' if (not valid_args(user_id, mess...
Sends a series of options that you can listen for on your webhook. The options field is a dictionary in which the keys are descriptions and values the postback payload. You need to set up a webhook to listen for the postback.
smooch/conversations.py
send_postbacks
devinmcgloin/smooch
3
python
def send_postbacks(user_id, message, options): 'Sends a series of options that you can listen for on your webhook. The options field is a dictionary in which the keys are\n descriptions and values the postback payload. You need to set up a webhook to listen for the postback.' if (not valid_args(user_id, mess...
def send_postbacks(user_id, message, options): 'Sends a series of options that you can listen for on your webhook. The options field is a dictionary in which the keys are\n descriptions and values the postback payload. You need to set up a webhook to listen for the postback.' if (not valid_args(user_id, mess...
8d007bedb19c10fa230ab95dd96f01c4afb13e503986f9130a24b0ffcb89c5f8
def send_buttons(user_id, message, options): 'Options is a list of tuples in which the first element is the type of the button,\n second the short text, and third the result for the specified type.' if (not valid_args(user_id, message, options)): logging.warning('send buttons called with invalid args...
Options is a list of tuples in which the first element is the type of the button, second the short text, and third the result for the specified type.
smooch/conversations.py
send_buttons
devinmcgloin/smooch
3
python
def send_buttons(user_id, message, options): 'Options is a list of tuples in which the first element is the type of the button,\n second the short text, and third the result for the specified type.' if (not valid_args(user_id, message, options)): logging.warning('send buttons called with invalid args...
def send_buttons(user_id, message, options): 'Options is a list of tuples in which the first element is the type of the button,\n second the short text, and third the result for the specified type.' if (not valid_args(user_id, message, options)): logging.warning('send buttons called with invalid args...
92a30c01e44b74234f84e7a1fb180f7c06134953ef6b6d46bd4601c075a5d0f5
def train(num_timesteps, seed, model_path=None): '\n Train PPO1 model for the Humanoid environment, for testing purposes\n\n :param num_timesteps: (int) The total number of samples\n :param seed: (int) The initial seed for training\n :param model_path: (str) path to the model\n ' env_id = 'Humano...
Train PPO1 model for the Humanoid environment, for testing purposes :param num_timesteps: (int) The total number of samples :param seed: (int) The initial seed for training :param model_path: (str) path to the model
stable_baselines/ppo1/run_humanoid.py
train
ashigirl96/stable-baselines
49
python
def train(num_timesteps, seed, model_path=None): '\n Train PPO1 model for the Humanoid environment, for testing purposes\n\n :param num_timesteps: (int) The total number of samples\n :param seed: (int) The initial seed for training\n :param model_path: (str) path to the model\n ' env_id = 'Humano...
def train(num_timesteps, seed, model_path=None): '\n Train PPO1 model for the Humanoid environment, for testing purposes\n\n :param num_timesteps: (int) The total number of samples\n :param seed: (int) The initial seed for training\n :param model_path: (str) path to the model\n ' env_id = 'Humano...
c3000f6d1bf5bc33685781f1faef30f55dc33804e9ab19cbb061a1683a58efe0
def main(): '\n Runs the test\n ' logger.configure() parser = mujoco_arg_parser() parser.add_argument('--model-path', default=os.path.join(logger.get_dir(), 'humanoid_policy')) parser.set_defaults(num_timesteps=int(20000000.0)) args = parser.parse_args() if (not args.play): tra...
Runs the test
stable_baselines/ppo1/run_humanoid.py
main
ashigirl96/stable-baselines
49
python
def main(): '\n \n ' logger.configure() parser = mujoco_arg_parser() parser.add_argument('--model-path', default=os.path.join(logger.get_dir(), 'humanoid_policy')) parser.set_defaults(num_timesteps=int(20000000.0)) args = parser.parse_args() if (not args.play): train(num_timest...
def main(): '\n \n ' logger.configure() parser = mujoco_arg_parser() parser.add_argument('--model-path', default=os.path.join(logger.get_dir(), 'humanoid_policy')) parser.set_defaults(num_timesteps=int(20000000.0)) args = parser.parse_args() if (not args.play): train(num_timest...
42ebe704e9802e27908db5276684cbde0c5326108908a2d9da752327292dc920
def magnitude_to_count_rate(magnitudes, band='fuv'): " Convert (flat) input magnitudes to count rates\n\t\n\tParameters\n\t----------\n\tmagnitudes : float array\n\t\tArray of magnitudes in ABmag units\n\t\t\n\tband : string\n\t\tWhich UVEX band to use, options are 'nuv' and 'fuv'\n\t\tDefaults to 'fuv'\n\t\t\n\tRe...
Convert (flat) input magnitudes to count rates Parameters ---------- magnitudes : float array Array of magnitudes in ABmag units band : string Which UVEX band to use, options are 'nuv' and 'fuv' Defaults to 'fuv' Returns ------- count_rate : float array Array of count ...
cmost_hdr.py
magnitude_to_count_rate
hpearnshaw/cmost-analysis
0
python
def magnitude_to_count_rate(magnitudes, band='fuv'): " Convert (flat) input magnitudes to count rates\n\t\n\tParameters\n\t----------\n\tmagnitudes : float array\n\t\tArray of magnitudes in ABmag units\n\t\t\n\tband : string\n\t\tWhich UVEX band to use, options are 'nuv' and 'fuv'\n\t\tDefaults to 'fuv'\n\t\t\n\tRe...
def magnitude_to_count_rate(magnitudes, band='fuv'): " Convert (flat) input magnitudes to count rates\n\t\n\tParameters\n\t----------\n\tmagnitudes : float array\n\t\tArray of magnitudes in ABmag units\n\t\t\n\tband : string\n\t\tWhich UVEX band to use, options are 'nuv' and 'fuv'\n\t\tDefaults to 'fuv'\n\t\t\n\tRe...
e2b2a4c4091fed85f022e575d82a74a9395a332cdb880cf9ec5c336280d6d839
def count_rate_to_electron_rate(count_rate): " Calculates the number of measured electrons for given count rate and exposure time\n\t\n\tParameters\n\t----------\n\tcount_rate : float array\n\t\tArray of count rates in photons per second\n\t\t\n\texp_time: float\n\t\tExposure time in seconds\n\t\t\n\tgain_mode : st...
Calculates the number of measured electrons for given count rate and exposure time Parameters ---------- count_rate : float array Array of count rates in photons per second exp_time: float Exposure time in seconds gain_mode : string Which detector gain mode to use, options are...
cmost_hdr.py
count_rate_to_electron_rate
hpearnshaw/cmost-analysis
0
python
def count_rate_to_electron_rate(count_rate): " Calculates the number of measured electrons for given count rate and exposure time\n\t\n\tParameters\n\t----------\n\tcount_rate : float array\n\t\tArray of count rates in photons per second\n\t\t\n\texp_time: float\n\t\tExposure time in seconds\n\t\t\n\tgain_mode : st...
def count_rate_to_electron_rate(count_rate): " Calculates the number of measured electrons for given count rate and exposure time\n\t\n\tParameters\n\t----------\n\tcount_rate : float array\n\t\tArray of count rates in photons per second\n\t\t\n\texp_time: float\n\t\tExposure time in seconds\n\t\t\n\tgain_mode : st...
75b4647220a98a61a646ddc2ae563ff33132dc5989f64a1f12723f013733aa71
def count_rate_to_electrons(count_rate, exp_time, gain_mode='high'): " Calculates the number of measured electrons for given count rate and exposure time\n\tIncorporates dark current and saturation, but otherwise returns ideal number of electrons (no noise/quantization)\n\t\n\tParameters\n\t----------\n\tcount_rate...
Calculates the number of measured electrons for given count rate and exposure time Incorporates dark current and saturation, but otherwise returns ideal number of electrons (no noise/quantization) Parameters ---------- count_rate : float array Array of count rates in photons per second exp_time: float...
cmost_hdr.py
count_rate_to_electrons
hpearnshaw/cmost-analysis
0
python
def count_rate_to_electrons(count_rate, exp_time, gain_mode='high'): " Calculates the number of measured electrons for given count rate and exposure time\n\tIncorporates dark current and saturation, but otherwise returns ideal number of electrons (no noise/quantization)\n\t\n\tParameters\n\t----------\n\tcount_rate...
def count_rate_to_electrons(count_rate, exp_time, gain_mode='high'): " Calculates the number of measured electrons for given count rate and exposure time\n\tIncorporates dark current and saturation, but otherwise returns ideal number of electrons (no noise/quantization)\n\t\n\tParameters\n\t----------\n\tcount_rate...
f0ffa9b6a7b3c29de2c7f1f272234ca25be15099d242b654b100f18c9a927140
def get_signal(count_rate, exp_times, gain_mode='high'): " Runs count_rate_to_electrons then converts to detector signal\n\t\n\tParameters\n\t----------\n\tcount_rate : float array\n\t\tArray of count rates in photons per second\n\t\t\n\texp_times: float array\n\t\tExposure time in seconds\n\t\t\n\tgain_mode : stri...
Runs count_rate_to_electrons then converts to detector signal Parameters ---------- count_rate : float array Array of count rates in photons per second exp_times: float array Exposure time in seconds gain_mode : string Which detector gain mode to use, options are 'low' and 'hi...
cmost_hdr.py
get_signal
hpearnshaw/cmost-analysis
0
python
def get_signal(count_rate, exp_times, gain_mode='high'): " Runs count_rate_to_electrons then converts to detector signal\n\t\n\tParameters\n\t----------\n\tcount_rate : float array\n\t\tArray of count rates in photons per second\n\t\t\n\texp_times: float array\n\t\tExposure time in seconds\n\t\t\n\tgain_mode : stri...
def get_signal(count_rate, exp_times, gain_mode='high'): " Runs count_rate_to_electrons then converts to detector signal\n\t\n\tParameters\n\t----------\n\tcount_rate : float array\n\t\tArray of count rates in photons per second\n\t\t\n\texp_times: float array\n\t\tExposure time in seconds\n\t\t\n\tgain_mode : stri...
2a75318c7b3027698d8a97ea5c49b20857b6f3ce71411e57ad07d4b5ee5b9959
def get_snr(count_rate, exp_times, band='fuv', gain_mode='high'): " Calculate SNR for given count rates and exposure times\n\t\n\tParameters\n\t----------\n\tcount_rate : float array\n\t\tArray of count rates in photons per second\n\t\t\n\texp_times: float array\n\t\tArray of exposure times in seconds\n\t\t\n\tband...
Calculate SNR for given count rates and exposure times Parameters ---------- count_rate : float array Array of count rates in photons per second exp_times: float array Array of exposure times in seconds band : string Which UVEX band to use, options are 'nuv' and 'fuv' ...
cmost_hdr.py
get_snr
hpearnshaw/cmost-analysis
0
python
def get_snr(count_rate, exp_times, band='fuv', gain_mode='high'): " Calculate SNR for given count rates and exposure times\n\t\n\tParameters\n\t----------\n\tcount_rate : float array\n\t\tArray of count rates in photons per second\n\t\t\n\texp_times: float array\n\t\tArray of exposure times in seconds\n\t\t\n\tband...
def get_snr(count_rate, exp_times, band='fuv', gain_mode='high'): " Calculate SNR for given count rates and exposure times\n\t\n\tParameters\n\t----------\n\tcount_rate : float array\n\t\tArray of count rates in photons per second\n\t\t\n\texp_times: float array\n\t\tArray of exposure times in seconds\n\t\t\n\tband...
37b708c34013630125279389ce863e173fb87e9e3ea9f0dce6e74661fba0995a
def perform_hdr_simple(pixels, saturated, exp_times): ' Simple HDR algorithm to iterate through exposure times and select pixels from as long an exposure as possible\n\t\n\tParameters\n\t----------\n\tpixels : 2-D float array\n\t\tArray of pixel values (could be signal or SNR) to be selected\n\t\tSecond dimension m...
Simple HDR algorithm to iterate through exposure times and select pixels from as long an exposure as possible Parameters ---------- pixels : 2-D float array Array of pixel values (could be signal or SNR) to be selected Second dimension must be same length as exp_times saturated: bool array ...
cmost_hdr.py
perform_hdr_simple
hpearnshaw/cmost-analysis
0
python
def perform_hdr_simple(pixels, saturated, exp_times): ' Simple HDR algorithm to iterate through exposure times and select pixels from as long an exposure as possible\n\t\n\tParameters\n\t----------\n\tpixels : 2-D float array\n\t\tArray of pixel values (could be signal or SNR) to be selected\n\t\tSecond dimension m...
def perform_hdr_simple(pixels, saturated, exp_times): ' Simple HDR algorithm to iterate through exposure times and select pixels from as long an exposure as possible\n\t\n\tParameters\n\t----------\n\tpixels : 2-D float array\n\t\tArray of pixel values (could be signal or SNR) to be selected\n\t\tSecond dimension m...
259131b1b362565ae6d79836961783b49136cebcfff4a15f41dc029c6673374d
def create_image(im_frame_size, exp_time, sources=[], band='fuv', gain_mode='high'): ' Creates an image from an exposure, with given sources\n \n Parameters\n ----------\n im_frame_size : int\n Size of the resulting image in pixels\n \n exp_time: float\n Exposure time in seco...
Creates an image from an exposure, with given sources Parameters ---------- im_frame_size : int Size of the resulting image in pixels exp_time: float Exposure time in seconds sources: QTable object QTable of sources in format (x_pos, y_pos, count_rate) x_pos and y_pos are floats, fraction...
cmost_hdr.py
create_image
hpearnshaw/cmost-analysis
0
python
def create_image(im_frame_size, exp_time, sources=[], band='fuv', gain_mode='high'): ' Creates an image from an exposure, with given sources\n \n Parameters\n ----------\n im_frame_size : int\n Size of the resulting image in pixels\n \n exp_time: float\n Exposure time in seco...
def create_image(im_frame_size, exp_time, sources=[], band='fuv', gain_mode='high'): ' Creates an image from an exposure, with given sources\n \n Parameters\n ----------\n im_frame_size : int\n Size of the resulting image in pixels\n \n exp_time: float\n Exposure time in seco...
a46164b7aa459ad9123a72315c1e609329d3b60411b807aa01da1c2f2c263041
def fetch(url: str) -> str: 'Fetch URL.\n\n Parameters\n ----------\n url\n URL.\n\n Raises\n ------\n :code:`CommunicationError`\n If the HTTP request is unsuccessful.\n\n Returns\n -------\n :code:`str`\n Body.\n ' res = req.get(url, allow_redirects=False) ...
Fetch URL. Parameters ---------- url URL. Raises ------ :code:`CommunicationError` If the HTTP request is unsuccessful. Returns ------- :code:`str` Body.
lyrics_classifier/collect_data/scrap/__init__.py
fetch
OliverSieweke/lyrics-classifier
0
python
def fetch(url: str) -> str: 'Fetch URL.\n\n Parameters\n ----------\n url\n URL.\n\n Raises\n ------\n :code:`CommunicationError`\n If the HTTP request is unsuccessful.\n\n Returns\n -------\n :code:`str`\n Body.\n ' res = req.get(url, allow_redirects=False) ...
def fetch(url: str) -> str: 'Fetch URL.\n\n Parameters\n ----------\n url\n URL.\n\n Raises\n ------\n :code:`CommunicationError`\n If the HTTP request is unsuccessful.\n\n Returns\n -------\n :code:`str`\n Body.\n ' res = req.get(url, allow_redirects=False) ...
476551df544ac895c45f67eea7f88c1d858c31cf404a77c0dd2ff4953b2da625
def retrieve_artists_html_pages(force: bool=False) -> None: 'Retrieve and save artist HTML pages from `lyrics.com`.\n\n Parameters\n ----------\n force\n Overwrite HTML pages that have already been retrieved.\n\n Returns\n -------\n :code:`None`\n ' print_table('ARTISTS HTML PAGES') ...
Retrieve and save artist HTML pages from `lyrics.com`. Parameters ---------- force Overwrite HTML pages that have already been retrieved. Returns ------- :code:`None`
lyrics_classifier/collect_data/scrap/__init__.py
retrieve_artists_html_pages
OliverSieweke/lyrics-classifier
0
python
def retrieve_artists_html_pages(force: bool=False) -> None: 'Retrieve and save artist HTML pages from `lyrics.com`.\n\n Parameters\n ----------\n force\n Overwrite HTML pages that have already been retrieved.\n\n Returns\n -------\n :code:`None`\n ' print_table('ARTISTS HTML PAGES') ...
def retrieve_artists_html_pages(force: bool=False) -> None: 'Retrieve and save artist HTML pages from `lyrics.com`.\n\n Parameters\n ----------\n force\n Overwrite HTML pages that have already been retrieved.\n\n Returns\n -------\n :code:`None`\n ' print_table('ARTISTS HTML PAGES') ...
0af52c180a7a906952b2258bbfb9cc59fa1eba73042a405f84caf793099d8b92
def retrieve_songs_html_pages(force: bool=False) -> None: 'Retrieve and save song HTML pages from `lyrics.com`.\n\n Parameters\n ----------\n force\n Overwrite HTML pages that have already been retrieved.\n\n Returns\n -------\n :code:`None`\n ' print_table('SONGS HTML PAGES') wi...
Retrieve and save song HTML pages from `lyrics.com`. Parameters ---------- force Overwrite HTML pages that have already been retrieved. Returns ------- :code:`None`
lyrics_classifier/collect_data/scrap/__init__.py
retrieve_songs_html_pages
OliverSieweke/lyrics-classifier
0
python
def retrieve_songs_html_pages(force: bool=False) -> None: 'Retrieve and save song HTML pages from `lyrics.com`.\n\n Parameters\n ----------\n force\n Overwrite HTML pages that have already been retrieved.\n\n Returns\n -------\n :code:`None`\n ' print_table('SONGS HTML PAGES') wi...
def retrieve_songs_html_pages(force: bool=False) -> None: 'Retrieve and save song HTML pages from `lyrics.com`.\n\n Parameters\n ----------\n force\n Overwrite HTML pages that have already been retrieved.\n\n Returns\n -------\n :code:`None`\n ' print_table('SONGS HTML PAGES') wi...
31093aa79ba906aca9a4d2868b3d91efc1658acc49b208db16eb642a6c720351
def make_name_from_str(string, max_size=100): ' Return a name that is capitalized and without spaces ' return ''.join((('%s%s' % (w[0].upper(), w[1:])) for w in string.split()))[:max_size]
Return a name that is capitalized and without spaces
macho_symbols.py
make_name_from_str
bambu/binaryninja-machosymbols
7
python
def make_name_from_str(string, max_size=100): ' ' return .join((('%s%s' % (w[0].upper(), w[1:])) for w in string.split()))[:max_size]
def make_name_from_str(string, max_size=100): ' ' return .join((('%s%s' % (w[0].upper(), w[1:])) for w in string.split()))[:max_size]<|docstring|>Return a name that is capitalized and without spaces<|endoftext|>
8f1826ba32a1240ce483d3aa6d666beb4266753dfe96184252793cd3ec249d1f
def generate_selrefs(view): ' Create symbols for entries in __objc_selrefs section ' if (view.view_type != 'Mach-O'): return selrefs = view.sections.get('__objc_selrefs', None) if (not selrefs): return initialize_idc(view) size = view.arch.address_size view.begin_undo_actions...
Create symbols for entries in __objc_selrefs section
macho_symbols.py
generate_selrefs
bambu/binaryninja-machosymbols
7
python
def generate_selrefs(view): ' ' if (view.view_type != 'Mach-O'): return selrefs = view.sections.get('__objc_selrefs', None) if (not selrefs): return initialize_idc(view) size = view.arch.address_size view.begin_undo_actions() for address in xrange(selrefs.start, selrefs....
def generate_selrefs(view): ' ' if (view.view_type != 'Mach-O'): return selrefs = view.sections.get('__objc_selrefs', None) if (not selrefs): return initialize_idc(view) size = view.arch.address_size view.begin_undo_actions() for address in xrange(selrefs.start, selrefs....
a87bd21960b1c1dc6fff7683f09b6b747459208baf9b01545a687fbcc6ac11ab
def generate_bind_symbols(view): ' Generate bind symbols using dyldinfo command ' if (view.view_type != 'Mach-O'): return if (sys.platform != 'darwin'): return raw_view = view.get_view_of_type('Raw') with NamedTemporaryFile() as data_file: data_file.write(raw_view.read(0, len...
Generate bind symbols using dyldinfo command
macho_symbols.py
generate_bind_symbols
bambu/binaryninja-machosymbols
7
python
def generate_bind_symbols(view): ' ' if (view.view_type != 'Mach-O'): return if (sys.platform != 'darwin'): return raw_view = view.get_view_of_type('Raw') with NamedTemporaryFile() as data_file: data_file.write(raw_view.read(0, len(raw_view))) data_file.flush() ...
def generate_bind_symbols(view): ' ' if (view.view_type != 'Mach-O'): return if (sys.platform != 'darwin'): return raw_view = view.get_view_of_type('Raw') with NamedTemporaryFile() as data_file: data_file.write(raw_view.read(0, len(raw_view))) data_file.flush() ...
1ed2eb898e4db45e8d6cddfb6004d92d3f259d6c091067316613f72ff765ca4c
def generate_function_names(view): ' Generate symbols for Objective-C functions ' if (view.view_type != 'Mach-O'): return ptr_size = view.arch.address_size if (ptr_size != 8): return try: class_list = view.sections['__objc_classlist'] data_section = view.sections['__o...
Generate symbols for Objective-C functions
macho_symbols.py
generate_function_names
bambu/binaryninja-machosymbols
7
python
def generate_function_names(view): ' ' if (view.view_type != 'Mach-O'): return ptr_size = view.arch.address_size if (ptr_size != 8): return try: class_list = view.sections['__objc_classlist'] data_section = view.sections['__objc_data'] const_section = view.se...
def generate_function_names(view): ' ' if (view.view_type != 'Mach-O'): return ptr_size = view.arch.address_size if (ptr_size != 8): return try: class_list = view.sections['__objc_classlist'] data_section = view.sections['__objc_data'] const_section = view.se...
032ffd50d08e7b9ead5a69372d98bee6d9cf3af779911d3e0c3a43132f1babb2
def get_methods(class_ro, content, section_base): ' Retrieve objc2_meth from read only class ' if (class_ro.base_meths == 0): raise StopIteration offset = ((class_ro.base_meths + 8) - section_base) num_methods = struct.unpack_from('<I', content, (offset - 4))[0] for offset in xrange(offset, ...
Retrieve objc2_meth from read only class
macho_symbols.py
get_methods
bambu/binaryninja-machosymbols
7
python
def get_methods(class_ro, content, section_base): ' ' if (class_ro.base_meths == 0): raise StopIteration offset = ((class_ro.base_meths + 8) - section_base) num_methods = struct.unpack_from('<I', content, (offset - 4))[0] for offset in xrange(offset, (offset + (num_methods * 24)), 24): ...
def get_methods(class_ro, content, section_base): ' ' if (class_ro.base_meths == 0): raise StopIteration offset = ((class_ro.base_meths + 8) - section_base) num_methods = struct.unpack_from('<I', content, (offset - 4))[0] for offset in xrange(offset, (offset + (num_methods * 24)), 24): ...
56640c97da74c307e6535e56814b2895597731e1543da6044af5bd18896ed60a
def norm_control_plex(peptides, sample_cols, pooled_col, standard_vals): ' Normalises per peptide according to control channel. Returns df with updated sample cols and removes control channel' pooled_factor = pd.merge(pd.DataFrame(peptides[pooled_col]), pd.DataFrame(standard_vals), left_index=True, right_index=...
Normalises per peptide according to control channel. Returns df with updated sample cols and removes control channel
src/lysate_urea_denaturation/preprocessing/2_peptide_normalisation.py
norm_control_plex
dezeraecox-manuscripts/COX_Proteome-stability
0
python
def norm_control_plex(peptides, sample_cols, pooled_col, standard_vals): ' ' pooled_factor = pd.merge(pd.DataFrame(peptides[pooled_col]), pd.DataFrame(standard_vals), left_index=True, right_index=True) pooled_factor['pooled_factor'] = (pooled_factor.iloc[(:, 0)] / pooled_factor.iloc[(:, 1)]) peptides[sa...
def norm_control_plex(peptides, sample_cols, pooled_col, standard_vals): ' ' pooled_factor = pd.merge(pd.DataFrame(peptides[pooled_col]), pd.DataFrame(standard_vals), left_index=True, right_index=True) pooled_factor['pooled_factor'] = (pooled_factor.iloc[(:, 0)] / pooled_factor.iloc[(:, 1)]) peptides[sa...
3f25e522bb9a4f6b106a5ea464091f75bed12cf1774b7517dd917da99f210d9b
def cys_noncys_filter(peptides): ' Assigns cys_rank, then separates cys and noncys peptides.\n Collects only peptides from proteins that have at least one cys and one non-cys peptide' peptides['cys_rank'] = [(1 if ('C' in sequence) else 0) for sequence in peptides['Sequence']] cys_peptides = peptides[(pe...
Assigns cys_rank, then separates cys and noncys peptides. Collects only peptides from proteins that have at least one cys and one non-cys peptide
src/lysate_urea_denaturation/preprocessing/2_peptide_normalisation.py
cys_noncys_filter
dezeraecox-manuscripts/COX_Proteome-stability
0
python
def cys_noncys_filter(peptides): ' Assigns cys_rank, then separates cys and noncys peptides.\n Collects only peptides from proteins that have at least one cys and one non-cys peptide' peptides['cys_rank'] = [(1 if ('C' in sequence) else 0) for sequence in peptides['Sequence']] cys_peptides = peptides[(pe...
def cys_noncys_filter(peptides): ' Assigns cys_rank, then separates cys and noncys peptides.\n Collects only peptides from proteins that have at least one cys and one non-cys peptide' peptides['cys_rank'] = [(1 if ('C' in sequence) else 0) for sequence in peptides['Sequence']] cys_peptides = peptides[(pe...
ce509e9715fdb4d15391df18ec0bbc80659a568e4d8fdc91a2a943ca079ab6b1
def noncys_ci_calculator(noncys_peptides, sample_cols): 'Calculates relevant info per protein from noncys peptides, including overall mean, SD\n and the per-channel mean (used for cys/noncys calculation)' noncys_cis = {} for (protein, df) in noncys_peptides.groupby(['Proteins']): values = df[samp...
Calculates relevant info per protein from noncys peptides, including overall mean, SD and the per-channel mean (used for cys/noncys calculation)
src/lysate_urea_denaturation/preprocessing/2_peptide_normalisation.py
noncys_ci_calculator
dezeraecox-manuscripts/COX_Proteome-stability
0
python
def noncys_ci_calculator(noncys_peptides, sample_cols): 'Calculates relevant info per protein from noncys peptides, including overall mean, SD\n and the per-channel mean (used for cys/noncys calculation)' noncys_cis = {} for (protein, df) in noncys_peptides.groupby(['Proteins']): values = df[samp...
def noncys_ci_calculator(noncys_peptides, sample_cols): 'Calculates relevant info per protein from noncys peptides, including overall mean, SD\n and the per-channel mean (used for cys/noncys calculation)' noncys_cis = {} for (protein, df) in noncys_peptides.groupby(['Proteins']): values = df[samp...
fde5929b3250dc0b348e09e3e40bb69d0b967ee4538d1133039491080b5f4b56
def cys_ratio(cys_peptides, noncys_cis, sample_cols): 'Calculates cys/noncys ratio per cys peptide, using the noncys per protein mean' norm_cys = [] for (protein, df) in cys_peptides.groupby('Proteins'): data = df.copy() noncys_vals = noncys_cis[protein]['noncys_means'] data[sample_c...
Calculates cys/noncys ratio per cys peptide, using the noncys per protein mean
src/lysate_urea_denaturation/preprocessing/2_peptide_normalisation.py
cys_ratio
dezeraecox-manuscripts/COX_Proteome-stability
0
python
def cys_ratio(cys_peptides, noncys_cis, sample_cols): norm_cys = [] for (protein, df) in cys_peptides.groupby('Proteins'): data = df.copy() noncys_vals = noncys_cis[protein]['noncys_means'] data[sample_cols] = (data[sample_cols] / noncys_vals) norm_cys.append(data) cys_n...
def cys_ratio(cys_peptides, noncys_cis, sample_cols): norm_cys = [] for (protein, df) in cys_peptides.groupby('Proteins'): data = df.copy() noncys_vals = noncys_cis[protein]['noncys_means'] data[sample_cols] = (data[sample_cols] / noncys_vals) norm_cys.append(data) cys_n...
59a486d5f7094afee2da238895d4ee71c5fc4af6048e1b222e39114f53b69953
def med_normalise(peptides, control_plex): 'Calculates correction factor from median of column 1, then normalises all other channels to this factor' medians = peptides.median() control_factor = (medians[control_plex] / medians) peptides = (peptides * control_factor) return peptides
Calculates correction factor from median of column 1, then normalises all other channels to this factor
src/lysate_urea_denaturation/preprocessing/2_peptide_normalisation.py
med_normalise
dezeraecox-manuscripts/COX_Proteome-stability
0
python
def med_normalise(peptides, control_plex): medians = peptides.median() control_factor = (medians[control_plex] / medians) peptides = (peptides * control_factor) return peptides
def med_normalise(peptides, control_plex): medians = peptides.median() control_factor = (medians[control_plex] / medians) peptides = (peptides * control_factor) return peptides<|docstring|>Calculates correction factor from median of column 1, then normalises all other channels to this factor<|endof...
ddd0b631320f72eb50641bb65234cea542155fb17648185ae5193c019a8fb5e9
def __init__(__self__, *, resource_group_name: pulumi.Input[str], location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None): '\n The set of arguments for constructing a DdosProtectionPlan resource.\n :param...
The set of arguments for constructing a DdosProtectionPlan resource. :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the resource. Changing this forces a new resource to be created. :param pulumi.Input[str] location: Specifies the supported Azure location where the resour...
sdk/python/pulumi_azure/network/ddos_protection_plan.py
__init__
roderik/pulumi-azure
109
python
def __init__(__self__, *, resource_group_name: pulumi.Input[str], location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None): '\n The set of arguments for constructing a DdosProtectionPlan resource.\n :param...
def __init__(__self__, *, resource_group_name: pulumi.Input[str], location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None): '\n The set of arguments for constructing a DdosProtectionPlan resource.\n :param...
f259476452552cbf4e714fa5e37de9f8a0d7c9ae5d3724b3d8fb7a15e1bbd3e7
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> pulumi.Input[str]: '\n The name of the resource group in which to create the resource. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'resource_group_name')
The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
resource_group_name
roderik/pulumi-azure
109
python
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'resource_group_name')
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'resource_group_name')<|docstring|>The name of the resource group in which to create the resource. Changing this forces a new resource to be created.<|endoftext|>
ad8a652ff9d0726c92def5fbab71b25e061c211d2abed4991b1273a0bc2e9f34
@property @pulumi.getter def location(self) -> Optional[pulumi.Input[str]]: '\n Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'location')
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
location
roderik/pulumi-azure
109
python
@property @pulumi.getter def location(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'location')
@property @pulumi.getter def location(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'location')<|docstring|>Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.<|endoftext|>
ecfd1cf4bf95a05b677588deec59ab77242107d4f999e4707dcc1d1706ce4709
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'name')
Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
name
roderik/pulumi-azure
109
python
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.<|endoftext|>
7d63086a7be36b11b91b236bf8134d7d088ef0a882d1aa87c623ee81094b634c
@property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n A mapping of tags to assign to the resource.\n ' return pulumi.get(self, 'tags')
A mapping of tags to assign to the resource.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
tags
roderik/pulumi-azure
109
python
@property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n \n ' return pulumi.get(self, 'tags')
@property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n \n ' return pulumi.get(self, 'tags')<|docstring|>A mapping of tags to assign to the resource.<|endoftext|>
28382be8ddb01b863a64e938237e5553e3186a0249e167d8a879403177cf6827
def __init__(__self__, *, location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, virtual_network_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "...
Input properties used for looking up and filtering DdosProtectionPlan resources. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the Network DDoS Protection Plan. ...
sdk/python/pulumi_azure/network/ddos_protection_plan.py
__init__
roderik/pulumi-azure
109
python
def __init__(__self__, *, location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, virtual_network_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "...
def __init__(__self__, *, location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, virtual_network_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "...
ad8a652ff9d0726c92def5fbab71b25e061c211d2abed4991b1273a0bc2e9f34
@property @pulumi.getter def location(self) -> Optional[pulumi.Input[str]]: '\n Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'location')
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
location
roderik/pulumi-azure
109
python
@property @pulumi.getter def location(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'location')
@property @pulumi.getter def location(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'location')<|docstring|>Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.<|endoftext|>
ecfd1cf4bf95a05b677588deec59ab77242107d4f999e4707dcc1d1706ce4709
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'name')
Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
name
roderik/pulumi-azure
109
python
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.<|endoftext|>
640bb4e6b7a349a2471bc0fcae3b8f2e26c706a99707c36bc5ef9acce42975da
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> Optional[pulumi.Input[str]]: '\n The name of the resource group in which to create the resource. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'resource_group_name')
The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
resource_group_name
roderik/pulumi-azure
109
python
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'resource_group_name')
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'resource_group_name')<|docstring|>The name of the resource group in which to create the resource. Changing this forces a new resource to be created.<|e...
7d63086a7be36b11b91b236bf8134d7d088ef0a882d1aa87c623ee81094b634c
@property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n A mapping of tags to assign to the resource.\n ' return pulumi.get(self, 'tags')
A mapping of tags to assign to the resource.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
tags
roderik/pulumi-azure
109
python
@property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n \n ' return pulumi.get(self, 'tags')
@property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n \n ' return pulumi.get(self, 'tags')<|docstring|>A mapping of tags to assign to the resource.<|endoftext|>
789782c2d662c08c8edf1935eb10afdae935d8af21725fabe14fcdfa400ec9ee
@property @pulumi.getter(name='virtualNetworkIds') def virtual_network_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: "\n A list of Virtual Network ID's associated with the DDoS Protection Plan.\n " return pulumi.get(self, 'virtual_network_ids')
A list of Virtual Network ID's associated with the DDoS Protection Plan.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
virtual_network_ids
roderik/pulumi-azure
109
python
@property @pulumi.getter(name='virtualNetworkIds') def virtual_network_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: "\n \n " return pulumi.get(self, 'virtual_network_ids')
@property @pulumi.getter(name='virtualNetworkIds') def virtual_network_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: "\n \n " return pulumi.get(self, 'virtual_network_ids')<|docstring|>A list of Virtual Network ID's associated with the DDoS Protection Plan.<|endoftext|>
be15b444cbc4b4a4d8ecce8ccdd0354f5eba31c92418dfa91cf4993c1c3a2a30
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, __props__=Non...
Manages an AzureNetwork DDoS Protection Plan. > **NOTE** Azure only allows `one` DDoS Protection Plan per region. ## Example Usage ```python import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_ddos_protection_plan = azu...
sdk/python/pulumi_azure/network/ddos_protection_plan.py
__init__
roderik/pulumi-azure
109
python
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, __props__=Non...
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, __props__=Non...
bd9fff97c0b484b8bf3893b4ac7407264c26d5afbbd488bed76b6f9ad4291240
@overload def __init__(__self__, resource_name: str, args: DdosProtectionPlanArgs, opts: Optional[pulumi.ResourceOptions]=None): '\n Manages an AzureNetwork DDoS Protection Plan.\n\n > **NOTE** Azure only allows `one` DDoS Protection Plan per region.\n\n ## Example Usage\n\n ```python\n ...
Manages an AzureNetwork DDoS Protection Plan. > **NOTE** Azure only allows `one` DDoS Protection Plan per region. ## Example Usage ```python import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_ddos_protection_plan = azu...
sdk/python/pulumi_azure/network/ddos_protection_plan.py
__init__
roderik/pulumi-azure
109
python
@overload def __init__(__self__, resource_name: str, args: DdosProtectionPlanArgs, opts: Optional[pulumi.ResourceOptions]=None): '\n Manages an AzureNetwork DDoS Protection Plan.\n\n > **NOTE** Azure only allows `one` DDoS Protection Plan per region.\n\n ## Example Usage\n\n ```python\n ...
@overload def __init__(__self__, resource_name: str, args: DdosProtectionPlanArgs, opts: Optional[pulumi.ResourceOptions]=None): '\n Manages an AzureNetwork DDoS Protection Plan.\n\n > **NOTE** Azure only allows `one` DDoS Protection Plan per region.\n\n ## Example Usage\n\n ```python\n ...
bb38593457340d0a1be4ca352f0d39998daff25d3a051848989f4f5839f2e345
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, v...
Get an existing DdosProtectionPlan resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: ...
sdk/python/pulumi_azure/network/ddos_protection_plan.py
get
roderik/pulumi-azure
109
python
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, v...
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, location: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, v...
514ba529b37d7f4ed9f120d65b90462549f6b3f5eb861273167c202adf235f61
@property @pulumi.getter def location(self) -> pulumi.Output[str]: '\n Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'location')
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
location
roderik/pulumi-azure
109
python
@property @pulumi.getter def location(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'location')
@property @pulumi.getter def location(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'location')<|docstring|>Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.<|endoftext|>
20ca61afc1e0bdfe6a20b7b678b16bf81856c54d1e03ff3a5f83542246eab74c
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'name')
Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
name
roderik/pulumi-azure
109
python
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.<|endoftext|>
c4ae00a83a1ef8019b283a5d0f0372b7d695c9f55820ec7f3808779adfe2f705
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> pulumi.Output[str]: '\n The name of the resource group in which to create the resource. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'resource_group_name')
The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
resource_group_name
roderik/pulumi-azure
109
python
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'resource_group_name')
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'resource_group_name')<|docstring|>The name of the resource group in which to create the resource. Changing this forces a new resource to be created.<|endoftext|...
d710b2d80e877037bcb55e54af0bd4d337ed646462b9750c99caaedfa82fb62d
@property @pulumi.getter def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n A mapping of tags to assign to the resource.\n ' return pulumi.get(self, 'tags')
A mapping of tags to assign to the resource.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
tags
roderik/pulumi-azure
109
python
@property @pulumi.getter def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n \n ' return pulumi.get(self, 'tags')
@property @pulumi.getter def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n \n ' return pulumi.get(self, 'tags')<|docstring|>A mapping of tags to assign to the resource.<|endoftext|>
872b3e90507c87256dabce73773dca414fea6b84f18617ad712f6f5d297c8376
@property @pulumi.getter(name='virtualNetworkIds') def virtual_network_ids(self) -> pulumi.Output[Sequence[str]]: "\n A list of Virtual Network ID's associated with the DDoS Protection Plan.\n " return pulumi.get(self, 'virtual_network_ids')
A list of Virtual Network ID's associated with the DDoS Protection Plan.
sdk/python/pulumi_azure/network/ddos_protection_plan.py
virtual_network_ids
roderik/pulumi-azure
109
python
@property @pulumi.getter(name='virtualNetworkIds') def virtual_network_ids(self) -> pulumi.Output[Sequence[str]]: "\n \n " return pulumi.get(self, 'virtual_network_ids')
@property @pulumi.getter(name='virtualNetworkIds') def virtual_network_ids(self) -> pulumi.Output[Sequence[str]]: "\n \n " return pulumi.get(self, 'virtual_network_ids')<|docstring|>A list of Virtual Network ID's associated with the DDoS Protection Plan.<|endoftext|>
c554d0e72b0fba1a9b55dc2803adb9307a55848a006a683ce48219a0eac06c95
def reverse(x): 'Reverse a letter' return x[::(- 1)]
Reverse a letter
NEW/one.py
reverse
Aneesh540/python-projects
5
python
def reverse(x): return x[::(- 1)]
def reverse(x): return x[::(- 1)]<|docstring|>Reverse a letter<|endoftext|>
4ec4bf5e3e265e556d7f64218b813109b983af3a343872412e6b468fd0820597
def key_len(x): 'Sorting a list by their length' return sorted(x, key=len)
Sorting a list by their length
NEW/one.py
key_len
Aneesh540/python-projects
5
python
def key_len(x): return sorted(x, key=len)
def key_len(x): return sorted(x, key=len)<|docstring|>Sorting a list by their length<|endoftext|>
23c5eee46f8b4ae6c31760c5050fc0978a61a2208483c247418e265f3cde1453
def key_reverse(x): 'Sorting a list by reverse spelling here reverse() f(x) is defined by us\n and key should be a function without execution' return sorted(x, key=reverse)
Sorting a list by reverse spelling here reverse() f(x) is defined by us and key should be a function without execution
NEW/one.py
key_reverse
Aneesh540/python-projects
5
python
def key_reverse(x): 'Sorting a list by reverse spelling here reverse() f(x) is defined by us\n and key should be a function without execution' return sorted(x, key=reverse)
def key_reverse(x): 'Sorting a list by reverse spelling here reverse() f(x) is defined by us\n and key should be a function without execution' return sorted(x, key=reverse)<|docstring|>Sorting a list by reverse spelling here reverse() f(x) is defined by us and key should be a function without execution<|endo...
3c73c4ef4e30d275126e46f49471ae9366e31e5d6d1bdea75c329a49f7f70abb
def sprint_addr(addr): ' binary ip addr -> string ' if (not len(addr)): return '' return str(ipaddress.ip_address(addr))
binary ip addr -> string
openr/py/openr/utils/ipnetwork.py
sprint_addr
arshanh/openr
1
python
def sprint_addr(addr): ' ' if (not len(addr)): return return str(ipaddress.ip_address(addr))
def sprint_addr(addr): ' ' if (not len(addr)): return return str(ipaddress.ip_address(addr))<|docstring|>binary ip addr -> string<|endoftext|>
3f7a1c973faae2beab7e4473f371aba6cb0a6df7a2716b65e2e93eb4233b43f8
def sprint_prefix(prefix): '\n :param prefix: network_types.IpPrefix representing an CIDR network\n\n :returns: string representation of prefix (CIDR network)\n :rtype: str or unicode\n ' return '{}/{}'.format(sprint_addr(prefix.prefixAddress.addr), prefix.prefixLength)
:param prefix: network_types.IpPrefix representing an CIDR network :returns: string representation of prefix (CIDR network) :rtype: str or unicode
openr/py/openr/utils/ipnetwork.py
sprint_prefix
arshanh/openr
1
python
def sprint_prefix(prefix): '\n :param prefix: network_types.IpPrefix representing an CIDR network\n\n :returns: string representation of prefix (CIDR network)\n :rtype: str or unicode\n ' return '{}/{}'.format(sprint_addr(prefix.prefixAddress.addr), prefix.prefixLength)
def sprint_prefix(prefix): '\n :param prefix: network_types.IpPrefix representing an CIDR network\n\n :returns: string representation of prefix (CIDR network)\n :rtype: str or unicode\n ' return '{}/{}'.format(sprint_addr(prefix.prefixAddress.addr), prefix.prefixLength)<|docstring|>:param prefix: ne...
47e88b6a5648e0017bbfd2943874bf2e216e0dfe672abc4039e66c96bbb65434
def ip_str_to_addr(addr_str: str, if_index: str=None) -> network_types.BinaryAddress: '\n :param addr_str: ip address in string representation\n\n :returns: thrift struct BinaryAddress\n :rtype: network_types.BinaryAddress\n ' try: addr = socket.inet_pton(socket.AF_INET, addr_str) bi...
:param addr_str: ip address in string representation :returns: thrift struct BinaryAddress :rtype: network_types.BinaryAddress
openr/py/openr/utils/ipnetwork.py
ip_str_to_addr
arshanh/openr
1
python
def ip_str_to_addr(addr_str: str, if_index: str=None) -> network_types.BinaryAddress: '\n :param addr_str: ip address in string representation\n\n :returns: thrift struct BinaryAddress\n :rtype: network_types.BinaryAddress\n ' try: addr = socket.inet_pton(socket.AF_INET, addr_str) bi...
def ip_str_to_addr(addr_str: str, if_index: str=None) -> network_types.BinaryAddress: '\n :param addr_str: ip address in string representation\n\n :returns: thrift struct BinaryAddress\n :rtype: network_types.BinaryAddress\n ' try: addr = socket.inet_pton(socket.AF_INET, addr_str) bi...
090767cf9e26fb545a1a57a33d330dd7c078b5dec2746c388ba1615225075f16
def ip_str_to_prefix(prefix_str: str) -> network_types.IpPrefix: '\n :param prefix_str: string representing a prefix (CIDR network)\n\n :returns: thrift struct IpPrefix\n :rtype: network_types.IpPrefix\n ' (ip_str, ip_len_str) = prefix_str.split('/') return network_types.IpPrefix(prefixAddress=i...
:param prefix_str: string representing a prefix (CIDR network) :returns: thrift struct IpPrefix :rtype: network_types.IpPrefix
openr/py/openr/utils/ipnetwork.py
ip_str_to_prefix
arshanh/openr
1
python
def ip_str_to_prefix(prefix_str: str) -> network_types.IpPrefix: '\n :param prefix_str: string representing a prefix (CIDR network)\n\n :returns: thrift struct IpPrefix\n :rtype: network_types.IpPrefix\n ' (ip_str, ip_len_str) = prefix_str.split('/') return network_types.IpPrefix(prefixAddress=i...
def ip_str_to_prefix(prefix_str: str) -> network_types.IpPrefix: '\n :param prefix_str: string representing a prefix (CIDR network)\n\n :returns: thrift struct IpPrefix\n :rtype: network_types.IpPrefix\n ' (ip_str, ip_len_str) = prefix_str.split('/') return network_types.IpPrefix(prefixAddress=i...
aada42d8939e449604384e00ffa1547398a7fce826d367717cef62788b603ecf
def ip_nexthop_to_nexthop_thrift(ip_addr: str, if_index: str, weight: int=0, metric: int=0) -> network_types.NextHopThrift: '\n :param ip_addr: Next hop IP address\n :param if_index: Next hop interface index\n :param weight: Next hop weigth\n :param metric: Cost associated with next hop\n ' binar...
:param ip_addr: Next hop IP address :param if_index: Next hop interface index :param weight: Next hop weigth :param metric: Cost associated with next hop
openr/py/openr/utils/ipnetwork.py
ip_nexthop_to_nexthop_thrift
arshanh/openr
1
python
def ip_nexthop_to_nexthop_thrift(ip_addr: str, if_index: str, weight: int=0, metric: int=0) -> network_types.NextHopThrift: '\n :param ip_addr: Next hop IP address\n :param if_index: Next hop interface index\n :param weight: Next hop weigth\n :param metric: Cost associated with next hop\n ' binar...
def ip_nexthop_to_nexthop_thrift(ip_addr: str, if_index: str, weight: int=0, metric: int=0) -> network_types.NextHopThrift: '\n :param ip_addr: Next hop IP address\n :param if_index: Next hop interface index\n :param weight: Next hop weigth\n :param metric: Cost associated with next hop\n ' binar...
cd01090a100b799f06b04bb351ad9d1cbaf1e307fd42ea28b18ba0c53994ead9
def ip_to_unicast_route(ip_prefix: str, nexthops: List[network_types.NextHopThrift]) -> network_types.UnicastRoute: '\n :param ip_prefix: IP prefix\n :param nexthops: List of next hops\n ' return network_types.UnicastRoute(dest=ip_str_to_prefix(ip_prefix), nextHops=nexthops)
:param ip_prefix: IP prefix :param nexthops: List of next hops
openr/py/openr/utils/ipnetwork.py
ip_to_unicast_route
arshanh/openr
1
python
def ip_to_unicast_route(ip_prefix: str, nexthops: List[network_types.NextHopThrift]) -> network_types.UnicastRoute: '\n :param ip_prefix: IP prefix\n :param nexthops: List of next hops\n ' return network_types.UnicastRoute(dest=ip_str_to_prefix(ip_prefix), nextHops=nexthops)
def ip_to_unicast_route(ip_prefix: str, nexthops: List[network_types.NextHopThrift]) -> network_types.UnicastRoute: '\n :param ip_prefix: IP prefix\n :param nexthops: List of next hops\n ' return network_types.UnicastRoute(dest=ip_str_to_prefix(ip_prefix), nextHops=nexthops)<|docstring|>:param ip_prefi...
e94ad3df0bfde76a1e1c86d6ef1a0ecbbd25d0dfb4eb091e62782619dec70ea8
def mpls_to_mpls_route(label: int, nexthops: List[network_types.NextHopThrift]) -> network_types.UnicastRoute: '\n :param label: MPLS label\n :param nexthops: List of nexthops\n ' return network_types.MplsRoute(topLabel=label, nextHops=nexthops)
:param label: MPLS label :param nexthops: List of nexthops
openr/py/openr/utils/ipnetwork.py
mpls_to_mpls_route
arshanh/openr
1
python
def mpls_to_mpls_route(label: int, nexthops: List[network_types.NextHopThrift]) -> network_types.UnicastRoute: '\n :param label: MPLS label\n :param nexthops: List of nexthops\n ' return network_types.MplsRoute(topLabel=label, nextHops=nexthops)
def mpls_to_mpls_route(label: int, nexthops: List[network_types.NextHopThrift]) -> network_types.UnicastRoute: '\n :param label: MPLS label\n :param nexthops: List of nexthops\n ' return network_types.MplsRoute(topLabel=label, nextHops=nexthops)<|docstring|>:param label: MPLS label :param nexthops: Lis...
d5688c8ac46ca89975a945c413f3c675394b76e2e84855f70ff3c9740d46641e
def mpls_nexthop_to_nexthop_thrift(ip_addr: str, if_index: str, weight: int=0, metric: int=0, label: Optional[List[int]]=None, action: network_types.MplsActionCode=network_types.MplsActionCode.PHP) -> network_types.NextHopThrift: '\n :param label: label(s) for PUSH, SWAP action\n :param action: label action P...
:param label: label(s) for PUSH, SWAP action :param action: label action PUSH, POP, SWAP :param ip_addr: Next hop IP address :param if_index: Next hop interface index :param weight: Next hop weigth :param metric: Cost associated with next hop
openr/py/openr/utils/ipnetwork.py
mpls_nexthop_to_nexthop_thrift
arshanh/openr
1
python
def mpls_nexthop_to_nexthop_thrift(ip_addr: str, if_index: str, weight: int=0, metric: int=0, label: Optional[List[int]]=None, action: network_types.MplsActionCode=network_types.MplsActionCode.PHP) -> network_types.NextHopThrift: '\n :param label: label(s) for PUSH, SWAP action\n :param action: label action P...
def mpls_nexthop_to_nexthop_thrift(ip_addr: str, if_index: str, weight: int=0, metric: int=0, label: Optional[List[int]]=None, action: network_types.MplsActionCode=network_types.MplsActionCode.PHP) -> network_types.NextHopThrift: '\n :param label: label(s) for PUSH, SWAP action\n :param action: label action P...
c66154265cecec6feaee1e5587fe629372b8808f3a15f1e2ae10df68c87a0386
def routes_to_route_db(node: str, unicast_routes: Optional[List[network_types.UnicastRoute]]=None, mpls_routes: Optional[List[network_types.MplsRoute]]=None) -> fib_types.RouteDatabase: '\n :param node: node name\n :param unicast_routes: list of unicast IP routes\n :param mpls_routes: list of MPLS routes\n...
:param node: node name :param unicast_routes: list of unicast IP routes :param mpls_routes: list of MPLS routes
openr/py/openr/utils/ipnetwork.py
routes_to_route_db
arshanh/openr
1
python
def routes_to_route_db(node: str, unicast_routes: Optional[List[network_types.UnicastRoute]]=None, mpls_routes: Optional[List[network_types.MplsRoute]]=None) -> fib_types.RouteDatabase: '\n :param node: node name\n :param unicast_routes: list of unicast IP routes\n :param mpls_routes: list of MPLS routes\n...
def routes_to_route_db(node: str, unicast_routes: Optional[List[network_types.UnicastRoute]]=None, mpls_routes: Optional[List[network_types.MplsRoute]]=None) -> fib_types.RouteDatabase: '\n :param node: node name\n :param unicast_routes: list of unicast IP routes\n :param mpls_routes: list of MPLS routes\n...
4bac570766012b8eb532b1d890df86b748e7d12e7324bcc07e95506b2702dd9d
def sprint_prefix_type(prefix_type): '\n :param prefix: network_types.PrefixType\n ' return network_types.PrefixType._VALUES_TO_NAMES.get(prefix_type, None)
:param prefix: network_types.PrefixType
openr/py/openr/utils/ipnetwork.py
sprint_prefix_type
arshanh/openr
1
python
def sprint_prefix_type(prefix_type): '\n \n ' return network_types.PrefixType._VALUES_TO_NAMES.get(prefix_type, None)
def sprint_prefix_type(prefix_type): '\n \n ' return network_types.PrefixType._VALUES_TO_NAMES.get(prefix_type, None)<|docstring|>:param prefix: network_types.PrefixType<|endoftext|>
1e3db949585e00098a0e01c74cd5b59bcc96e00e2df7d8fc3100df53758715c8
def sprint_prefix_forwarding_type(forwarding_type): '\n :param forwarding_type: lsdb_types.PrefixForwardingType\n ' return lsdb_types.PrefixForwardingType._VALUES_TO_NAMES.get(forwarding_type)
:param forwarding_type: lsdb_types.PrefixForwardingType
openr/py/openr/utils/ipnetwork.py
sprint_prefix_forwarding_type
arshanh/openr
1
python
def sprint_prefix_forwarding_type(forwarding_type): '\n \n ' return lsdb_types.PrefixForwardingType._VALUES_TO_NAMES.get(forwarding_type)
def sprint_prefix_forwarding_type(forwarding_type): '\n \n ' return lsdb_types.PrefixForwardingType._VALUES_TO_NAMES.get(forwarding_type)<|docstring|>:param forwarding_type: lsdb_types.PrefixForwardingType<|endoftext|>
0dc861cf47933d1f68c158abcbd79bdd225f9c8d0d748052a583b59bd8ef1782
def sprint_prefix_forwarding_algorithm(forwarding_algo: lsdb_types.PrefixForwardingAlgorithm) -> str: '\n :param forwarding_algorithm: lsdb_types.PrefixForwardingAlgorithm\n ' return lsdb_types.PrefixForwardingAlgorithm._VALUES_TO_NAMES.get(forwarding_algo)
:param forwarding_algorithm: lsdb_types.PrefixForwardingAlgorithm
openr/py/openr/utils/ipnetwork.py
sprint_prefix_forwarding_algorithm
arshanh/openr
1
python
def sprint_prefix_forwarding_algorithm(forwarding_algo: lsdb_types.PrefixForwardingAlgorithm) -> str: '\n \n ' return lsdb_types.PrefixForwardingAlgorithm._VALUES_TO_NAMES.get(forwarding_algo)
def sprint_prefix_forwarding_algorithm(forwarding_algo: lsdb_types.PrefixForwardingAlgorithm) -> str: '\n \n ' return lsdb_types.PrefixForwardingAlgorithm._VALUES_TO_NAMES.get(forwarding_algo)<|docstring|>:param forwarding_algorithm: lsdb_types.PrefixForwardingAlgorithm<|endoftext|>
9de0baa031777d6cc09570cbac19678001e0a49d7bc1fdb50e816d83b43fe223
def sprint_prefix_is_ephemeral(prefix_entry: lsdb_types.PrefixEntry) -> str: '\n :param prefix_entry: lsdb_types.PrefixEntry\n ' return (str(prefix_entry.ephemeral) if (prefix_entry.ephemeral is not None) else 'False')
:param prefix_entry: lsdb_types.PrefixEntry
openr/py/openr/utils/ipnetwork.py
sprint_prefix_is_ephemeral
arshanh/openr
1
python
def sprint_prefix_is_ephemeral(prefix_entry: lsdb_types.PrefixEntry) -> str: '\n \n ' return (str(prefix_entry.ephemeral) if (prefix_entry.ephemeral is not None) else 'False')
def sprint_prefix_is_ephemeral(prefix_entry: lsdb_types.PrefixEntry) -> str: '\n \n ' return (str(prefix_entry.ephemeral) if (prefix_entry.ephemeral is not None) else 'False')<|docstring|>:param prefix_entry: lsdb_types.PrefixEntry<|endoftext|>
4a62551528976ba95582bd2add5545fa46b23f77faab938930a5e7bc9a1817dd
def ip_version(addr): ' return ip addr version\n ' return ipaddress.ip_address(addr).version
return ip addr version
openr/py/openr/utils/ipnetwork.py
ip_version
arshanh/openr
1
python
def ip_version(addr): ' \n ' return ipaddress.ip_address(addr).version
def ip_version(addr): ' \n ' return ipaddress.ip_address(addr).version<|docstring|>return ip addr version<|endoftext|>
5cd03823d63fcb6e7850460623b88ad86e0f33cee6c8cd28f8944b3db4b1a8c7
def is_same_subnet(addr1, addr2, subnet): '\n Check whether two given addresses belong to the same subnet\n ' if (ipaddress.ip_network((addr1, subnet), strict=False) == ipaddress.ip_network((addr2, subnet), strict=False)): return True return False
Check whether two given addresses belong to the same subnet
openr/py/openr/utils/ipnetwork.py
is_same_subnet
arshanh/openr
1
python
def is_same_subnet(addr1, addr2, subnet): '\n \n ' if (ipaddress.ip_network((addr1, subnet), strict=False) == ipaddress.ip_network((addr2, subnet), strict=False)): return True return False
def is_same_subnet(addr1, addr2, subnet): '\n \n ' if (ipaddress.ip_network((addr1, subnet), strict=False) == ipaddress.ip_network((addr2, subnet), strict=False)): return True return False<|docstring|>Check whether two given addresses belong to the same subnet<|endoftext|>
6dceb4eab4a7f335dc590ff672ac3713cdcbf80638973be56e65ba39c4ebcc96
def is_link_local(addr): '\n Check whether given addr is link local or not\n ' return ipaddress.ip_network(addr).is_link_local
Check whether given addr is link local or not
openr/py/openr/utils/ipnetwork.py
is_link_local
arshanh/openr
1
python
def is_link_local(addr): '\n \n ' return ipaddress.ip_network(addr).is_link_local
def is_link_local(addr): '\n \n ' return ipaddress.ip_network(addr).is_link_local<|docstring|>Check whether given addr is link local or not<|endoftext|>