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 |
|---|---|---|---|---|---|---|---|---|---|
62bab643c46b986a53bb5287e1cfb008cb137483535dae57e520b0c9aa4c1647 | def __init__(self, company, username, password, base_url=None):
'\n Initializes the connection using a company, username and password with API access\n\n :param company: Company\n :param username: Username\n :param password: Password\n :param base_url: Base URL if you have it alre... | Initializes the connection using a company, username and password with API access
:param company: Company
:param username: Username
:param password: Password
:param base_url: Base URL if you have it already. Without it, init method will fetch it when you initialize the
connection. | eloqua/eloqua.py | __init__ | jnorton2/Eloqua | 1 | python | def __init__(self, company, username, password, base_url=None):
'\n Initializes the connection using a company, username and password with API access\n\n :param company: Company\n :param username: Username\n :param password: Password\n :param base_url: Base URL if you have it alre... | def __init__(self, company, username, password, base_url=None):
'\n Initializes the connection using a company, username and password with API access\n\n :param company: Company\n :param username: Username\n :param password: Password\n :param base_url: Base URL if you have it alre... |
7246cf12993be90533b96f9899b32a9ecc4c174f7d3844206f318f7ffc01af08 | @staticmethod
def get_base_url(auth, login_url=DEFAULT_LOGIN_URL):
'\n Gets the base_url if there is none defined\n\n :param auth: Authentication object\n :param login_url: Login url to use. Default is provided in paths.py\n :return: Returns the base url of the instance\n '
re... | Gets the base_url if there is none defined
:param auth: Authentication object
:param login_url: Login url to use. Default is provided in paths.py
:return: Returns the base url of the instance | eloqua/eloqua.py | get_base_url | jnorton2/Eloqua | 1 | python | @staticmethod
def get_base_url(auth, login_url=DEFAULT_LOGIN_URL):
'\n Gets the base_url if there is none defined\n\n :param auth: Authentication object\n :param login_url: Login url to use. Default is provided in paths.py\n :return: Returns the base url of the instance\n '
re... | @staticmethod
def get_base_url(auth, login_url=DEFAULT_LOGIN_URL):
'\n Gets the base_url if there is none defined\n\n :param auth: Authentication object\n :param login_url: Login url to use. Default is provided in paths.py\n :return: Returns the base url of the instance\n '
re... |
b2d3f0522913a4108a0d0d57a466a66a8216c4e56115d0d674a06f05161a2d2b | def request(self, path, http_method, data=None):
'\n Does a raw eloqua request given a path and payload.\n\n :param path: API path. Ex: "/api/REST/2.0/assets/forms"\n :param http_method: Method to use. Ex: "POST", "GET", "PUT". Case does not matter\n :param data: Data to use in the reque... | Does a raw eloqua request given a path and payload.
:param path: API path. Ex: "/api/REST/2.0/assets/forms"
:param http_method: Method to use. Ex: "POST", "GET", "PUT". Case does not matter
:param data: Data to use in the request, parameters for get request, json for post
:return: Returns the HTTP Response object fro... | eloqua/eloqua.py | request | jnorton2/Eloqua | 1 | python | def request(self, path, http_method, data=None):
'\n Does a raw eloqua request given a path and payload.\n\n :param path: API path. Ex: "/api/REST/2.0/assets/forms"\n :param http_method: Method to use. Ex: "POST", "GET", "PUT". Case does not matter\n :param data: Data to use in the reque... | def request(self, path, http_method, data=None):
'\n Does a raw eloqua request given a path and payload.\n\n :param path: API path. Ex: "/api/REST/2.0/assets/forms"\n :param http_method: Method to use. Ex: "POST", "GET", "PUT". Case does not matter\n :param data: Data to use in the reque... |
0a26e6529159c6116da720d8deecf3de9e8dba84aa8b19e3562f21f211dfa55a | def generate_custom_object_code(self, custom_object_name=None, custom_object_id=None, class_name=None):
'\n Generates the custom object class code given the name or id of the custom object and an optional class name\n\n :param custom_object_name: Name of the custom object to search for\n :param... | Generates the custom object class code given the name or id of the custom object and an optional class name
:param custom_object_name: Name of the custom object to search for
:param custom_object_id: Id of the custom object
:param class_name: (optional) class name. Default will be the custom object name
:return: code... | eloqua/eloqua.py | generate_custom_object_code | jnorton2/Eloqua | 1 | python | def generate_custom_object_code(self, custom_object_name=None, custom_object_id=None, class_name=None):
'\n Generates the custom object class code given the name or id of the custom object and an optional class name\n\n :param custom_object_name: Name of the custom object to search for\n :param... | def generate_custom_object_code(self, custom_object_name=None, custom_object_id=None, class_name=None):
'\n Generates the custom object class code given the name or id of the custom object and an optional class name\n\n :param custom_object_name: Name of the custom object to search for\n :param... |
8a3a5df92a88b02b253c44241cc76dc0e01103297c99dfe27fff6f346be1698a | @classmethod
def _generate_custom_object_class_code(cls, eloqua_response, class_name=None):
'\n Generates the custom object class code given a custom object and a class name\n :param eloqua_response: Json response from eloqua for the custom object\n :param class_name: (optional) class name\n\n ... | Generates the custom object class code given a custom object and a class name
:param eloqua_response: Json response from eloqua for the custom object
:param class_name: (optional) class name
:return: the code for a python class for the Custom Object | eloqua/eloqua.py | _generate_custom_object_class_code | jnorton2/Eloqua | 1 | python | @classmethod
def _generate_custom_object_class_code(cls, eloqua_response, class_name=None):
'\n Generates the custom object class code given a custom object and a class name\n :param eloqua_response: Json response from eloqua for the custom object\n :param class_name: (optional) class name\n\n ... | @classmethod
def _generate_custom_object_class_code(cls, eloqua_response, class_name=None):
'\n Generates the custom object class code given a custom object and a class name\n :param eloqua_response: Json response from eloqua for the custom object\n :param class_name: (optional) class name\n\n ... |
5f4581951262f9bd3df9732ff467ac037a18dfc4becfa16e5843771c3739b889 | def get_custom_object_data(self, customObjectModel, record_id=None, query_params=None):
'\n Fetches CDO records from eloqua provided a description of that data object. Can fetch 1 record if record id\n is provided.\n :param customObjectModel: CustomObjectModel for the object to be fetched (REQU... | Fetches CDO records from eloqua provided a description of that data object. Can fetch 1 record if record id
is provided.
:param customObjectModel: CustomObjectModel for the object to be fetched (REQUIRED)
:param record_id: single record id for single requests
:param query_params: parameters included in a multi search r... | eloqua/eloqua.py | get_custom_object_data | jnorton2/Eloqua | 1 | python | def get_custom_object_data(self, customObjectModel, record_id=None, query_params=None):
'\n Fetches CDO records from eloqua provided a description of that data object. Can fetch 1 record if record id\n is provided.\n :param customObjectModel: CustomObjectModel for the object to be fetched (REQU... | def get_custom_object_data(self, customObjectModel, record_id=None, query_params=None):
'\n Fetches CDO records from eloqua provided a description of that data object. Can fetch 1 record if record id\n is provided.\n :param customObjectModel: CustomObjectModel for the object to be fetched (REQU... |
f0abe58fe1afb1aeb5ae06e1a7faa250d5d61dab17f14b07e3d2f38aea92d7d0 | def get(self, objectClass, data_id, params={}):
'\n Gets the object from eloqua using the objectClass as the type of object and the data id as the instance\n Includes the params in the request\n\n :param objectClass: An Asset class, CustomObjectModel etc\n :param data_id: Id string "501"... | Gets the object from eloqua using the objectClass as the type of object and the data id as the instance
Includes the params in the request
:param objectClass: An Asset class, CustomObjectModel etc
:param data_id: Id string "501" for example
:param params: (optional) additional parameters for the API request
:return: ... | eloqua/eloqua.py | get | jnorton2/Eloqua | 1 | python | def get(self, objectClass, data_id, params={}):
'\n Gets the object from eloqua using the objectClass as the type of object and the data id as the instance\n Includes the params in the request\n\n :param objectClass: An Asset class, CustomObjectModel etc\n :param data_id: Id string "501"... | def get(self, objectClass, data_id, params={}):
'\n Gets the object from eloqua using the objectClass as the type of object and the data id as the instance\n Includes the params in the request\n\n :param objectClass: An Asset class, CustomObjectModel etc\n :param data_id: Id string "501"... |
fc977a9a1513c27eb67f55d22a337443d94067586f2468b6ca0026557f8b9eed | def get_list(self, objectClass, params=None):
'\n Gets a list of Assets using the provided parameters for the API request\n\n :param objectClass: An Asset class, CustomObjectModel etc\n :param params: (optional) additional parameters for the API request\n\n :return: A DataResponse object... | Gets a list of Assets using the provided parameters for the API request
:param objectClass: An Asset class, CustomObjectModel etc
:param params: (optional) additional parameters for the API request
:return: A DataResponse object | eloqua/eloqua.py | get_list | jnorton2/Eloqua | 1 | python | def get_list(self, objectClass, params=None):
'\n Gets a list of Assets using the provided parameters for the API request\n\n :param objectClass: An Asset class, CustomObjectModel etc\n :param params: (optional) additional parameters for the API request\n\n :return: A DataResponse object... | def get_list(self, objectClass, params=None):
'\n Gets a list of Assets using the provided parameters for the API request\n\n :param objectClass: An Asset class, CustomObjectModel etc\n :param params: (optional) additional parameters for the API request\n\n :return: A DataResponse object... |
7f2dc8401cc199f0c437c72ebf0d22cce297f956a84426ca2f4a50d48f95da7a | def update(self, eloqua_object):
'\n Updates an eloqua object\n\n :param eloqua_object: An instance of an Asset class or data object\n\n :return: Returns the response from eloqua\n '
if isinstance(eloqua_object, Asset):
resp = self.request(eloqua_object.update_path.format(id=... | Updates an eloqua object
:param eloqua_object: An instance of an Asset class or data object
:return: Returns the response from eloqua | eloqua/eloqua.py | update | jnorton2/Eloqua | 1 | python | def update(self, eloqua_object):
'\n Updates an eloqua object\n\n :param eloqua_object: An instance of an Asset class or data object\n\n :return: Returns the response from eloqua\n '
if isinstance(eloqua_object, Asset):
resp = self.request(eloqua_object.update_path.format(id=... | def update(self, eloqua_object):
'\n Updates an eloqua object\n\n :param eloqua_object: An instance of an Asset class or data object\n\n :return: Returns the response from eloqua\n '
if isinstance(eloqua_object, Asset):
resp = self.request(eloqua_object.update_path.format(id=... |
5e97279d7a4375c44fe105566997eb199265d4593080738d7fb5e4f041aeb66d | def delete(self, eloqua_object):
'\n Deletes an eloqua object\n\n :param eloqua_object: An instance of an Asset class\n\n :return: Returns the response from eloqua\n '
if isinstance(eloqua_object, Asset):
resp = self.request(eloqua_object.delete_path.format(id=eloqua_object.i... | Deletes an eloqua object
:param eloqua_object: An instance of an Asset class
:return: Returns the response from eloqua | eloqua/eloqua.py | delete | jnorton2/Eloqua | 1 | python | def delete(self, eloqua_object):
'\n Deletes an eloqua object\n\n :param eloqua_object: An instance of an Asset class\n\n :return: Returns the response from eloqua\n '
if isinstance(eloqua_object, Asset):
resp = self.request(eloqua_object.delete_path.format(id=eloqua_object.i... | def delete(self, eloqua_object):
'\n Deletes an eloqua object\n\n :param eloqua_object: An instance of an Asset class\n\n :return: Returns the response from eloqua\n '
if isinstance(eloqua_object, Asset):
resp = self.request(eloqua_object.delete_path.format(id=eloqua_object.i... |
cec265c6e57c63aa07f7487dfda5d0543dcab2f2506ae2464fc0841cc7937e28 | def create(self, eloqua_object):
'\n Creates an eloqua object\n\n :param eloqua_object: An instance of an Eloqua Object like CustomObjectModel or Asset etc\n\n :return: Returns the response from eloqua\n '
if isinstance(eloqua_object, Asset):
resp = self.request(eloqua_object... | Creates an eloqua object
:param eloqua_object: An instance of an Eloqua Object like CustomObjectModel or Asset etc
:return: Returns the response from eloqua | eloqua/eloqua.py | create | jnorton2/Eloqua | 1 | python | def create(self, eloqua_object):
'\n Creates an eloqua object\n\n :param eloqua_object: An instance of an Eloqua Object like CustomObjectModel or Asset etc\n\n :return: Returns the response from eloqua\n '
if isinstance(eloqua_object, Asset):
resp = self.request(eloqua_object... | def create(self, eloqua_object):
'\n Creates an eloqua object\n\n :param eloqua_object: An instance of an Eloqua Object like CustomObjectModel or Asset etc\n\n :return: Returns the response from eloqua\n '
if isinstance(eloqua_object, Asset):
resp = self.request(eloqua_object... |
8bfee89938ee91891492da4df292bf927a9272fd0f655f30f932eb51372cf3b7 | def get(self):
'Retrieve (and optionally filter) projects.\n ---\n operationId: get_entries\n parameters:\n - name: search\n in: query\n type: string\n description: string to search for in `title`, `description`, and `autho... | Retrieve (and optionally filter) projects.
---
operationId: get_entries
parameters:
- name: search
in: query
type: string
description: string to search for in `title`, `description`, and `authors` using a MongoEngine/MongoDB text index. Provide a space-s... | mpcontribs-api/mpcontribs/api/projects/views.py | get | josuav1/MPContribs | 1 | python | def get(self):
'Retrieve (and optionally filter) projects.\n ---\n operationId: get_entries\n parameters:\n - name: search\n in: query\n type: string\n description: string to search for in `title`, `description`, and `autho... | def get(self):
'Retrieve (and optionally filter) projects.\n ---\n operationId: get_entries\n parameters:\n - name: search\n in: query\n type: string\n description: string to search for in `title`, `description`, and `autho... |
819f85d35fdbaa7e9736515be96a16f4ee4762e2c6deb5ce979a547eb9eefa11 | def post(self):
"Create a new project.\n Only MP staff can submit a new/non-existing project (or use POST\n endpoints in general). The staff member's email address will be set as\n the first readWrite entry in the permissions dict.\n "
return NotImplemented() | Create a new project.
Only MP staff can submit a new/non-existing project (or use POST
endpoints in general). The staff member's email address will be set as
the first readWrite entry in the permissions dict. | mpcontribs-api/mpcontribs/api/projects/views.py | post | josuav1/MPContribs | 1 | python | def post(self):
"Create a new project.\n Only MP staff can submit a new/non-existing project (or use POST\n endpoints in general). The staff member's email address will be set as\n the first readWrite entry in the permissions dict.\n "
return NotImplemented() | def post(self):
"Create a new project.\n Only MP staff can submit a new/non-existing project (or use POST\n endpoints in general). The staff member's email address will be set as\n the first readWrite entry in the permissions dict.\n "
return NotImplemented()<|docstring|>Create a new... |
a59afaba97ed09b1b69d1f6c5f6b570b775dd7f3374db2b18f3f9437d5d5b5ba | def get(self, project):
'Retrieve provenance info for a single project.\n ---\n operationId: get_entry\n parameters:\n - name: project\n in: path\n type: string\n pattern: \'^[a-zA-Z0-9_]{3,30}$\'\n required: true\n des... | Retrieve provenance info for a single project.
---
operationId: get_entry
parameters:
- name: project
in: path
type: string
pattern: '^[a-zA-Z0-9_]{3,30}$'
required: true
description: project name/slug
- name: mask
in: query
type: array
items:
type: stri... | mpcontribs-api/mpcontribs/api/projects/views.py | get | josuav1/MPContribs | 1 | python | def get(self, project):
'Retrieve provenance info for a single project.\n ---\n operationId: get_entry\n parameters:\n - name: project\n in: path\n type: string\n pattern: \'^[a-zA-Z0-9_]{3,30}$\'\n required: true\n des... | def get(self, project):
'Retrieve provenance info for a single project.\n ---\n operationId: get_entry\n parameters:\n - name: project\n in: path\n type: string\n pattern: \'^[a-zA-Z0-9_]{3,30}$\'\n required: true\n des... |
4436e2d33af2bfd0d9b94ceb6e2bcdad6437539951f3dbb4ee781ac8116791a1 | def put(self, project):
"Replace a project's provenance entry"
return NotImplemented() | Replace a project's provenance entry | mpcontribs-api/mpcontribs/api/projects/views.py | put | josuav1/MPContribs | 1 | python | def put(self, project):
return NotImplemented() | def put(self, project):
return NotImplemented()<|docstring|>Replace a project's provenance entry<|endoftext|> |
3b24601146f02ad9541c6fec8af7cd9558e3043e6d2c69247c8156b0ffdb0b7e | def patch(self, project):
"Partially update a project's provenance entry"
return NotImplemented()
schema = self.Schema(dump_only=('id', 'project'))
schema.opts.model_build_obj = False
payload = schema.load(request.json, partial=True)
if payload.errors:
return payload.errors
if ('urls... | Partially update a project's provenance entry | mpcontribs-api/mpcontribs/api/projects/views.py | patch | josuav1/MPContribs | 1 | python | def patch(self, project):
return NotImplemented()
schema = self.Schema(dump_only=('id', 'project'))
schema.opts.model_build_obj = False
payload = schema.load(request.json, partial=True)
if payload.errors:
return payload.errors
if ('urls' in payload.data):
urls = payload.data... | def patch(self, project):
return NotImplemented()
schema = self.Schema(dump_only=('id', 'project'))
schema.opts.model_build_obj = False
payload = schema.load(request.json, partial=True)
if payload.errors:
return payload.errors
if ('urls' in payload.data):
urls = payload.data... |
b8ebe5172ded3bba1b5468b14f6538a49e866e1edb1ed045dd02e258a04ee940 | def delete(self, project):
"Delete a project's provenance entry"
return NotImplemented() | Delete a project's provenance entry | mpcontribs-api/mpcontribs/api/projects/views.py | delete | josuav1/MPContribs | 1 | python | def delete(self, project):
return NotImplemented() | def delete(self, project):
return NotImplemented()<|docstring|>Delete a project's provenance entry<|endoftext|> |
cd21ca0060fffb40892c46dfda11ef91e1859cf0aa07462c020c566658b4f53a | def get(self, project):
"Retrieve a table of contributions for a project.\n ---\n operationId: get_table\n parameters:\n - name: project\n in: path\n type: string\n pattern: '^[a-zA-Z0-9_]{3,30}$'\n required: true\n des... | Retrieve a table of contributions for a project.
---
operationId: get_table
parameters:
- name: project
in: path
type: string
pattern: '^[a-zA-Z0-9_]{3,30}$'
required: true
description: project name/slug
- name: columns
in: query
type: array
items:
type:... | mpcontribs-api/mpcontribs/api/projects/views.py | get | josuav1/MPContribs | 1 | python | def get(self, project):
"Retrieve a table of contributions for a project.\n ---\n operationId: get_table\n parameters:\n - name: project\n in: path\n type: string\n pattern: '^[a-zA-Z0-9_]{3,30}$'\n required: true\n des... | def get(self, project):
"Retrieve a table of contributions for a project.\n ---\n operationId: get_table\n parameters:\n - name: project\n in: path\n type: string\n pattern: '^[a-zA-Z0-9_]{3,30}$'\n required: true\n des... |
35d6c957582aa4a49093249f029453c4ae7f74fc4a6244e0a4ab7e05edbfdf26 | def get(self, project):
"Retrieve overview graph for a project.\n ---\n operationId: get_graph\n parameters:\n - name: project\n in: path\n type: string\n pattern: '^[a-zA-Z0-9_]{3,30}$'\n required: true\n description: ... | Retrieve overview graph for a project.
---
operationId: get_graph
parameters:
- name: project
in: path
type: string
pattern: '^[a-zA-Z0-9_]{3,30}$'
required: true
description: project name/slug
- name: columns
in: query
type: array
items:
type: string
... | mpcontribs-api/mpcontribs/api/projects/views.py | get | josuav1/MPContribs | 1 | python | def get(self, project):
"Retrieve overview graph for a project.\n ---\n operationId: get_graph\n parameters:\n - name: project\n in: path\n type: string\n pattern: '^[a-zA-Z0-9_]{3,30}$'\n required: true\n description: ... | def get(self, project):
"Retrieve overview graph for a project.\n ---\n operationId: get_graph\n parameters:\n - name: project\n in: path\n type: string\n pattern: '^[a-zA-Z0-9_]{3,30}$'\n required: true\n description: ... |
98c2f21bd4d105ee5cef9bde36a88980e5426a7c867cc9cb1940aafaf54a9285 | def predict(self, src, src_len, label_encoder: 'LabelEncoder', override_src: Optional[List[str]]=None) -> torch.Tensor:
' Predicts value for a given tensor\n\n :param src: tensor(batch size x sentence_length)\n :param src_len: tensor(batch size)\n :param label_encoder: Encoder\n :return:... | Predicts value for a given tensor
:param src: tensor(batch size x sentence_length)
:param src_len: tensor(batch size)
:param label_encoder: Encoder
:return: Reversed Batch | boudams/model/linear.py | predict | matgille/boudams | 5 | python | def predict(self, src, src_len, label_encoder: 'LabelEncoder', override_src: Optional[List[str]]=None) -> torch.Tensor:
' Predicts value for a given tensor\n\n :param src: tensor(batch size x sentence_length)\n :param src_len: tensor(batch size)\n :param label_encoder: Encoder\n :return:... | def predict(self, src, src_len, label_encoder: 'LabelEncoder', override_src: Optional[List[str]]=None) -> torch.Tensor:
' Predicts value for a given tensor\n\n :param src: tensor(batch size x sentence_length)\n :param src_len: tensor(batch size)\n :param label_encoder: Encoder\n :return:... |
5d9248a56e6e4e3d73b5e6d2b7f076ce402ce4def1c4a31064cba9e31bb5369f | def gradient(self, src, src_len, trg=None, scorer: 'Scorer'=None, criterion=None, evaluate: bool=False, **kwargs):
'\n\n :param src: tensor(batch size x sentence length)\n :param src_len: tensor(batch_size)\n :param trg: tensor(batch_size x output_length)\n :param scorer: Scorer\n ... | :param src: tensor(batch size x sentence length)
:param src_len: tensor(batch_size)
:param trg: tensor(batch_size x output_length)
:param scorer: Scorer
:param criterion: Loss System
:param evaluate: Whether we are in eval mode
:param kwargs:
:return: tensor(batch_size x output_length) | boudams/model/linear.py | gradient | matgille/boudams | 5 | python | def gradient(self, src, src_len, trg=None, scorer: 'Scorer'=None, criterion=None, evaluate: bool=False, **kwargs):
'\n\n :param src: tensor(batch size x sentence length)\n :param src_len: tensor(batch_size)\n :param trg: tensor(batch_size x output_length)\n :param scorer: Scorer\n ... | def gradient(self, src, src_len, trg=None, scorer: 'Scorer'=None, criterion=None, evaluate: bool=False, **kwargs):
'\n\n :param src: tensor(batch size x sentence length)\n :param src_len: tensor(batch_size)\n :param trg: tensor(batch_size x output_length)\n :param scorer: Scorer\n ... |
34ff0c70a9a96da973793a408bfbb4ae82e506d13bb3cc6b7850e045fcb7269f | def get_loss(self, preds, truths):
'\n\n :param preds:\n :param truths:\n :return:\n '
return F.cross_entropy(preds.view((- 1), len(self.label_encoder)), truths.view((- 1)), weight=self.nll_weight, reduction='mean', ignore_index=self.label_encoder.get_pad()) | :param preds:
:param truths:
:return: | boudams/model/linear.py | get_loss | matgille/boudams | 5 | python | def get_loss(self, preds, truths):
'\n\n :param preds:\n :param truths:\n :return:\n '
return F.cross_entropy(preds.view((- 1), len(self.label_encoder)), truths.view((- 1)), weight=self.nll_weight, reduction='mean', ignore_index=self.label_encoder.get_pad()) | def get_loss(self, preds, truths):
'\n\n :param preds:\n :param truths:\n :return:\n '
return F.cross_entropy(preds.view((- 1), len(self.label_encoder)), truths.view((- 1)), weight=self.nll_weight, reduction='mean', ignore_index=self.label_encoder.get_pad())<|docstring|>:param preds:... |
5c2bb564f717aeb4efb3b67094491bdde152188a37f3ead86ce3176e75842e09 | def guess_mimetype(resource_path):
'\n Guesses the mimetype of a given resource.\n\n Args:\n resource_path: the path to a given resource.\n Returns:\n The mimetype string.\n '
mime = mimetypes.guess_type(resource_path)[0]
if (mime is None):
return 'application/octet-stream'... | Guesses the mimetype of a given resource.
Args:
resource_path: the path to a given resource.
Returns:
The mimetype string. | api/api/routes/autogen.py | guess_mimetype | nnamon/picoCTF-Platform-2 | 10 | python | def guess_mimetype(resource_path):
'\n Guesses the mimetype of a given resource.\n\n Args:\n resource_path: the path to a given resource.\n Returns:\n The mimetype string.\n '
mime = mimetypes.guess_type(resource_path)[0]
if (mime is None):
return 'application/octet-stream'... | def guess_mimetype(resource_path):
'\n Guesses the mimetype of a given resource.\n\n Args:\n resource_path: the path to a given resource.\n Returns:\n The mimetype string.\n '
mime = mimetypes.guess_type(resource_path)[0]
if (mime is None):
return 'application/octet-stream'... |
92162a73cb9ea38e5ed6b374ac679022ff8d850b038062ca1e4e026a1a35fbc0 | def check_for_setup_error(self):
'Verify that the volume for our folder exists.\n\n :raise: :py:exc:`LookupError`\n '
(pool_name, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%s' % pool_name)
if (not self.nef.get(url)):
raise LookupError((_('Pool %s does not exi... | Verify that the volume for our folder exists.
:raise: :py:exc:`LookupError` | cinder/volume/drivers/nexenta/ns5/nfs.py | check_for_setup_error | pengMK/cinder | 11 | python | def check_for_setup_error(self):
'Verify that the volume for our folder exists.\n\n :raise: :py:exc:`LookupError`\n '
(pool_name, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%s' % pool_name)
if (not self.nef.get(url)):
raise LookupError((_('Pool %s does not exi... | def check_for_setup_error(self):
'Verify that the volume for our folder exists.\n\n :raise: :py:exc:`LookupError`\n '
(pool_name, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%s' % pool_name)
if (not self.nef.get(url)):
raise LookupError((_('Pool %s does not exi... |
f9a468e80bf307352ff3717443e9a0ac06e3f41617fd1ff7d7783ae1a60b56b1 | def initialize_connection(self, volume, connector):
'Allow connection to connector and return connection info.\n\n :param volume: volume reference\n :param connector: connector reference\n '
data = {'export': volume['provider_location'], 'name': 'volume'}
if (volume['provider_location']... | Allow connection to connector and return connection info.
:param volume: volume reference
:param connector: connector reference | cinder/volume/drivers/nexenta/ns5/nfs.py | initialize_connection | pengMK/cinder | 11 | python | def initialize_connection(self, volume, connector):
'Allow connection to connector and return connection info.\n\n :param volume: volume reference\n :param connector: connector reference\n '
data = {'export': volume['provider_location'], 'name': 'volume'}
if (volume['provider_location']... | def initialize_connection(self, volume, connector):
'Allow connection to connector and return connection info.\n\n :param volume: volume reference\n :param connector: connector reference\n '
data = {'export': volume['provider_location'], 'name': 'volume'}
if (volume['provider_location']... |
1f8caf70d2a9af7c6312b758dc8acb7c0cefa7862bb12bff09f059a9455e0639 | def create_volume(self, volume):
'Creates a volume.\n\n :param volume: volume reference\n :returns: provider_location update dict for database\n '
self._do_create_volume(volume)
return {'provider_location': volume['provider_location']} | Creates a volume.
:param volume: volume reference
:returns: provider_location update dict for database | cinder/volume/drivers/nexenta/ns5/nfs.py | create_volume | pengMK/cinder | 11 | python | def create_volume(self, volume):
'Creates a volume.\n\n :param volume: volume reference\n :returns: provider_location update dict for database\n '
self._do_create_volume(volume)
return {'provider_location': volume['provider_location']} | def create_volume(self, volume):
'Creates a volume.\n\n :param volume: volume reference\n :returns: provider_location update dict for database\n '
self._do_create_volume(volume)
return {'provider_location': volume['provider_location']}<|docstring|>Creates a volume.
:param volume: volum... |
10abfbc824ce7f3569a1690107c6be7b3eb0f4f3377e7e30580e67e42faca8a4 | def delete_volume(self, volume):
'Deletes a logical volume.\n\n :param volume: volume reference\n '
(pool, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%(pool)s/filesystems/%(fs)s' % {'pool': pool, 'fs': '%2F'.join([fs, volume['name']])})
origin = self.nef.get(url).get(... | Deletes a logical volume.
:param volume: volume reference | cinder/volume/drivers/nexenta/ns5/nfs.py | delete_volume | pengMK/cinder | 11 | python | def delete_volume(self, volume):
'Deletes a logical volume.\n\n :param volume: volume reference\n '
(pool, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%(pool)s/filesystems/%(fs)s' % {'pool': pool, 'fs': '%2F'.join([fs, volume['name']])})
origin = self.nef.get(url).get(... | def delete_volume(self, volume):
'Deletes a logical volume.\n\n :param volume: volume reference\n '
(pool, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%(pool)s/filesystems/%(fs)s' % {'pool': pool, 'fs': '%2F'.join([fs, volume['name']])})
origin = self.nef.get(url).get(... |
e2b45903a525868d42b3b424b6aa92e02f023f6fc47e297ceb8c0fbc7580f760 | def create_snapshot(self, snapshot):
'Creates a snapshot.\n\n :param snapshot: snapshot reference\n '
volume = self._get_snapshot_volume(snapshot)
(pool, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%(pool)s/filesystems/%(fs)s/snapshots' % {'pool': pool, 'fs': '%2F'.joi... | Creates a snapshot.
:param snapshot: snapshot reference | cinder/volume/drivers/nexenta/ns5/nfs.py | create_snapshot | pengMK/cinder | 11 | python | def create_snapshot(self, snapshot):
'Creates a snapshot.\n\n :param snapshot: snapshot reference\n '
volume = self._get_snapshot_volume(snapshot)
(pool, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%(pool)s/filesystems/%(fs)s/snapshots' % {'pool': pool, 'fs': '%2F'.joi... | def create_snapshot(self, snapshot):
'Creates a snapshot.\n\n :param snapshot: snapshot reference\n '
volume = self._get_snapshot_volume(snapshot)
(pool, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%(pool)s/filesystems/%(fs)s/snapshots' % {'pool': pool, 'fs': '%2F'.joi... |
a3dbecdad05fc07782f58e5527bcc30bc606c09798a9661dbede38dbabc00565 | def delete_snapshot(self, snapshot):
'Deletes a snapshot.\n\n :param snapshot: snapshot reference\n '
volume = self._get_snapshot_volume(snapshot)
(pool, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%(pool)s/filesystems/%(fs)s/snapshots/%(snap)s' % {'pool': pool, 'fs': ... | Deletes a snapshot.
:param snapshot: snapshot reference | cinder/volume/drivers/nexenta/ns5/nfs.py | delete_snapshot | pengMK/cinder | 11 | python | def delete_snapshot(self, snapshot):
'Deletes a snapshot.\n\n :param snapshot: snapshot reference\n '
volume = self._get_snapshot_volume(snapshot)
(pool, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%(pool)s/filesystems/%(fs)s/snapshots/%(snap)s' % {'pool': pool, 'fs': ... | def delete_snapshot(self, snapshot):
'Deletes a snapshot.\n\n :param snapshot: snapshot reference\n '
volume = self._get_snapshot_volume(snapshot)
(pool, fs) = self._get_share_datasets(self.share)
url = ('storage/pools/%(pool)s/filesystems/%(fs)s/snapshots/%(snap)s' % {'pool': pool, 'fs': ... |
d2997d0e81f0f745010f6b23c6920d253ceab843f514a96ef08099ba4fc6f11e | def create_volume_from_snapshot(self, volume, snapshot):
"Create new volume from other's snapshot on appliance.\n\n :param volume: reference of volume to be created\n :param snapshot: reference of source snapshot\n "
snapshot_vol = self._get_snapshot_volume(snapshot)
volume['provider_lo... | Create new volume from other's snapshot on appliance.
:param volume: reference of volume to be created
:param snapshot: reference of source snapshot | cinder/volume/drivers/nexenta/ns5/nfs.py | create_volume_from_snapshot | pengMK/cinder | 11 | python | def create_volume_from_snapshot(self, volume, snapshot):
"Create new volume from other's snapshot on appliance.\n\n :param volume: reference of volume to be created\n :param snapshot: reference of source snapshot\n "
snapshot_vol = self._get_snapshot_volume(snapshot)
volume['provider_lo... | def create_volume_from_snapshot(self, volume, snapshot):
"Create new volume from other's snapshot on appliance.\n\n :param volume: reference of volume to be created\n :param snapshot: reference of source snapshot\n "
snapshot_vol = self._get_snapshot_volume(snapshot)
volume['provider_lo... |
b96da1f7888c23a1d67bf3741203fb374ff0f65ebfb437107e5fd5cf29cf1d4b | def create_cloned_volume(self, volume, src_vref):
'Creates a clone of the specified volume.\n\n :param volume: new volume reference\n :param src_vref: source volume reference\n '
LOG.info(_LI('Creating clone of volume: %s'), src_vref['id'])
snapshot = {'volume_name': src_vref['name'], '... | Creates a clone of the specified volume.
:param volume: new volume reference
:param src_vref: source volume reference | cinder/volume/drivers/nexenta/ns5/nfs.py | create_cloned_volume | pengMK/cinder | 11 | python | def create_cloned_volume(self, volume, src_vref):
'Creates a clone of the specified volume.\n\n :param volume: new volume reference\n :param src_vref: source volume reference\n '
LOG.info(_LI('Creating clone of volume: %s'), src_vref['id'])
snapshot = {'volume_name': src_vref['name'], '... | def create_cloned_volume(self, volume, src_vref):
'Creates a clone of the specified volume.\n\n :param volume: new volume reference\n :param src_vref: source volume reference\n '
LOG.info(_LI('Creating clone of volume: %s'), src_vref['id'])
snapshot = {'volume_name': src_vref['name'], '... |
6b1d139a86f71b838765094637c86ff39b10fbfbb269617ff1289d05ccbb283e | def local_path(self, volume):
'Get volume path (mounted locally fs path) for given volume.\n\n :param volume: volume reference\n '
nfs_share = volume['provider_location']
return os.path.join(self._get_mount_point_for_share(nfs_share), 'volume') | Get volume path (mounted locally fs path) for given volume.
:param volume: volume reference | cinder/volume/drivers/nexenta/ns5/nfs.py | local_path | pengMK/cinder | 11 | python | def local_path(self, volume):
'Get volume path (mounted locally fs path) for given volume.\n\n :param volume: volume reference\n '
nfs_share = volume['provider_location']
return os.path.join(self._get_mount_point_for_share(nfs_share), 'volume') | def local_path(self, volume):
'Get volume path (mounted locally fs path) for given volume.\n\n :param volume: volume reference\n '
nfs_share = volume['provider_location']
return os.path.join(self._get_mount_point_for_share(nfs_share), 'volume')<|docstring|>Get volume path (mounted locally fs p... |
80d9e52166def49f325e96f263885742d9295aa35cdb21f42aa92d569d2aa342 | def _get_mount_point_for_share(self, nfs_share):
'Returns path to mount point NFS share.\n\n :param nfs_share: example 172.18.194.100:/var/nfs\n '
nfs_share = nfs_share.encode('utf-8')
return os.path.join(self.configuration.nexenta_mount_point_base, hashlib.md5(nfs_share).hexdigest()) | Returns path to mount point NFS share.
:param nfs_share: example 172.18.194.100:/var/nfs | cinder/volume/drivers/nexenta/ns5/nfs.py | _get_mount_point_for_share | pengMK/cinder | 11 | python | def _get_mount_point_for_share(self, nfs_share):
'Returns path to mount point NFS share.\n\n :param nfs_share: example 172.18.194.100:/var/nfs\n '
nfs_share = nfs_share.encode('utf-8')
return os.path.join(self.configuration.nexenta_mount_point_base, hashlib.md5(nfs_share).hexdigest()) | def _get_mount_point_for_share(self, nfs_share):
'Returns path to mount point NFS share.\n\n :param nfs_share: example 172.18.194.100:/var/nfs\n '
nfs_share = nfs_share.encode('utf-8')
return os.path.join(self.configuration.nexenta_mount_point_base, hashlib.md5(nfs_share).hexdigest())<|docstri... |
85e15414305d299fef026307247159d4611de238be2b98d1a372f9b193cb85dc | def _share_folder(self, path, filesystem):
'Share NFS filesystem on NexentaStor Appliance.\n\n :param nef: nef object\n :param path: path to parent filesystem\n :param filesystem: filesystem that needs to be shared\n '
pool = self.share.split('/')[0]
LOG.debug('Creating ACL for f... | Share NFS filesystem on NexentaStor Appliance.
:param nef: nef object
:param path: path to parent filesystem
:param filesystem: filesystem that needs to be shared | cinder/volume/drivers/nexenta/ns5/nfs.py | _share_folder | pengMK/cinder | 11 | python | def _share_folder(self, path, filesystem):
'Share NFS filesystem on NexentaStor Appliance.\n\n :param nef: nef object\n :param path: path to parent filesystem\n :param filesystem: filesystem that needs to be shared\n '
pool = self.share.split('/')[0]
LOG.debug('Creating ACL for f... | def _share_folder(self, path, filesystem):
'Share NFS filesystem on NexentaStor Appliance.\n\n :param nef: nef object\n :param path: path to parent filesystem\n :param filesystem: filesystem that needs to be shared\n '
pool = self.share.split('/')[0]
LOG.debug('Creating ACL for f... |
13045a6685a62da62851106cb46d3f6b9ecaccc6872f5133c04622236890c858 | def _get_capacity_info(self, path):
'Calculate available space on the NFS share.\n\n :param path: example pool/nfs\n '
(pool, fs) = self._get_share_datasets(path)
url = ('storage/pools/%s/filesystems/%s' % (pool, fs))
data = self.nef.get(url)
total = utils.str2size(data['bytesAvailable... | Calculate available space on the NFS share.
:param path: example pool/nfs | cinder/volume/drivers/nexenta/ns5/nfs.py | _get_capacity_info | pengMK/cinder | 11 | python | def _get_capacity_info(self, path):
'Calculate available space on the NFS share.\n\n :param path: example pool/nfs\n '
(pool, fs) = self._get_share_datasets(path)
url = ('storage/pools/%s/filesystems/%s' % (pool, fs))
data = self.nef.get(url)
total = utils.str2size(data['bytesAvailable... | def _get_capacity_info(self, path):
'Calculate available space on the NFS share.\n\n :param path: example pool/nfs\n '
(pool, fs) = self._get_share_datasets(path)
url = ('storage/pools/%s/filesystems/%s' % (pool, fs))
data = self.nef.get(url)
total = utils.str2size(data['bytesAvailable... |
02f333902d6470ced27c288bc6ef0cebdc322dedc18ac0849fb039946602fa7e | def _get_clone_snapshot_name(self, volume):
'Return name for snapshot that will be used to clone the volume.'
return ('cinder-clone-snapshot-%(id)s' % volume) | Return name for snapshot that will be used to clone the volume. | cinder/volume/drivers/nexenta/ns5/nfs.py | _get_clone_snapshot_name | pengMK/cinder | 11 | python | def _get_clone_snapshot_name(self, volume):
return ('cinder-clone-snapshot-%(id)s' % volume) | def _get_clone_snapshot_name(self, volume):
return ('cinder-clone-snapshot-%(id)s' % volume)<|docstring|>Return name for snapshot that will be used to clone the volume.<|endoftext|> |
cee8b6e45cc645997ba60282ffcaa6ebf0b26f3797c0dd8002b726e4993430c3 | def _is_clone_snapshot_name(self, snapshot):
'Check if snapshot is created for cloning.'
name = snapshot.split('@')[(- 1)]
return name.startswith('cinder-clone-snapshot-') | Check if snapshot is created for cloning. | cinder/volume/drivers/nexenta/ns5/nfs.py | _is_clone_snapshot_name | pengMK/cinder | 11 | python | def _is_clone_snapshot_name(self, snapshot):
name = snapshot.split('@')[(- 1)]
return name.startswith('cinder-clone-snapshot-') | def _is_clone_snapshot_name(self, snapshot):
name = snapshot.split('@')[(- 1)]
return name.startswith('cinder-clone-snapshot-')<|docstring|>Check if snapshot is created for cloning.<|endoftext|> |
7c99a5a8d22d949e442c8cbe641c768084cf1a5564e9994bdd70309a85b17c10 | def _update_volume_stats(self):
'Retrieve stats info for NexentaStor appliance.'
LOG.debug('Updating volume stats')
share = ':/'.join([self.nef_host, self.share])
(total, free, allocated) = self._get_capacity_info(self.share)
total_space = utils.str2gib_size(total)
free_space = utils.str2gib_siz... | Retrieve stats info for NexentaStor appliance. | cinder/volume/drivers/nexenta/ns5/nfs.py | _update_volume_stats | pengMK/cinder | 11 | python | def _update_volume_stats(self):
LOG.debug('Updating volume stats')
share = ':/'.join([self.nef_host, self.share])
(total, free, allocated) = self._get_capacity_info(self.share)
total_space = utils.str2gib_size(total)
free_space = utils.str2gib_size(free)
location_info = ('%(driver)s:%(share... | def _update_volume_stats(self):
LOG.debug('Updating volume stats')
share = ':/'.join([self.nef_host, self.share])
(total, free, allocated) = self._get_capacity_info(self.share)
total_space = utils.str2gib_size(total)
free_space = utils.str2gib_size(free)
location_info = ('%(driver)s:%(share... |
73d14d688b3769a54a167cc520a79b9af52ee9ca016af7f84f4aebd3e4f0198e | def __init__(self, params):
"! Sets up the ODE solver\n @param params dict, the parameters used in the ODE solver\n\n <code>params['ode']</code> -- callable f: rhs=f(t,x,arg1), must provide\n\n <code>params['args']=None</code> -- the argment that will be used to call f\n\n <code>params['... | ! Sets up the ODE solver
@param params dict, the parameters used in the ODE solver
<code>params['ode']</code> -- callable f: rhs=f(t,x,arg1), must provide
<code>params['args']=None</code> -- the argment that will be used to call f
<code>params['rtol']=1e-7</code> -- relative tolerance
<code>params['type']='dopri5'<... | pyoculus/integrators/rk_integrator.py | __init__ | mbkumar/pyoculus | 4 | python | def __init__(self, params):
"! Sets up the ODE solver\n @param params dict, the parameters used in the ODE solver\n\n <code>params['ode']</code> -- callable f: rhs=f(t,x,arg1), must provide\n\n <code>params['args']=None</code> -- the argment that will be used to call f\n\n <code>params['... | def __init__(self, params):
"! Sets up the ODE solver\n @param params dict, the parameters used in the ODE solver\n\n <code>params['ode']</code> -- callable f: rhs=f(t,x,arg1), must provide\n\n <code>params['args']=None</code> -- the argment that will be used to call f\n\n <code>params['... |
cd44af5468ae7302edbaa0e5f871a40902a078e69edad96e028473deb01ba3a9 | def set_initial_value(self, t, x):
'! Sets up the initial value for the ODE solver\n @param t the start of time\n @param x the start of coordinates\n '
self.integrator.set_initial_value(x, t).set_f_params(self._params['args'])
try:
testoutput = self.rhs(t, x, self.args)
exce... | ! Sets up the initial value for the ODE solver
@param t the start of time
@param x the start of coordinates | pyoculus/integrators/rk_integrator.py | set_initial_value | mbkumar/pyoculus | 4 | python | def set_initial_value(self, t, x):
'! Sets up the initial value for the ODE solver\n @param t the start of time\n @param x the start of coordinates\n '
self.integrator.set_initial_value(x, t).set_f_params(self._params['args'])
try:
testoutput = self.rhs(t, x, self.args)
exce... | def set_initial_value(self, t, x):
'! Sets up the initial value for the ODE solver\n @param t the start of time\n @param x the start of coordinates\n '
self.integrator.set_initial_value(x, t).set_f_params(self._params['args'])
try:
testoutput = self.rhs(t, x, self.args)
exce... |
b57152dbae4d31f801797167918009a07444dee375cd025b68b4cd22a4d6e8bf | def integrate(self, tend):
'! Integrates the ODE until `tend`\n @param tend the target end time\n @returns the new value of x\n '
x_new = self.integrator.integrate(tend)
if (not self.integrator.successful()):
raise Exception('Integration failed')
self.x = x_new
self.t = ... | ! Integrates the ODE until `tend`
@param tend the target end time
@returns the new value of x | pyoculus/integrators/rk_integrator.py | integrate | mbkumar/pyoculus | 4 | python | def integrate(self, tend):
'! Integrates the ODE until `tend`\n @param tend the target end time\n @returns the new value of x\n '
x_new = self.integrator.integrate(tend)
if (not self.integrator.successful()):
raise Exception('Integration failed')
self.x = x_new
self.t = ... | def integrate(self, tend):
'! Integrates the ODE until `tend`\n @param tend the target end time\n @returns the new value of x\n '
x_new = self.integrator.integrate(tend)
if (not self.integrator.successful()):
raise Exception('Integration failed')
self.x = x_new
self.t = ... |
bfda70bd387b83b823912f6b7b6bc79e604a7cec910379ee41d6fa7d19a88b8b | def copy(self):
'! Returns a copy of self, to use if want to compute in parallel\n @returns a copy of self\n '
return RKIntegrator(self._params) | ! Returns a copy of self, to use if want to compute in parallel
@returns a copy of self | pyoculus/integrators/rk_integrator.py | copy | mbkumar/pyoculus | 4 | python | def copy(self):
'! Returns a copy of self, to use if want to compute in parallel\n @returns a copy of self\n '
return RKIntegrator(self._params) | def copy(self):
'! Returns a copy of self, to use if want to compute in parallel\n @returns a copy of self\n '
return RKIntegrator(self._params)<|docstring|>! Returns a copy of self, to use if want to compute in parallel
@returns a copy of self<|endoftext|> |
faeea7c3fc128c2968f00ee4c84015628041bbeccf55638588b4bff18088084c | def get_queryset(self):
'retrieves the posts for the authenticated user'
return self.queryset.filter(user=self.request.user) | retrieves the posts for the authenticated user | app/timeline/views.py | get_queryset | redwanc12/Timeline-REST-API | 1 | python | def get_queryset(self):
return self.queryset.filter(user=self.request.user) | def get_queryset(self):
return self.queryset.filter(user=self.request.user)<|docstring|>retrieves the posts for the authenticated user<|endoftext|> |
0f6310a384d9a217f534471dbc4388b8f7a6589267af795b62715031a7b8dee9 | def perform_create(self, serializer):
'create a new recipe'
serializer.save(user=self.request.user) | create a new recipe | app/timeline/views.py | perform_create | redwanc12/Timeline-REST-API | 1 | python | def perform_create(self, serializer):
serializer.save(user=self.request.user) | def perform_create(self, serializer):
serializer.save(user=self.request.user)<|docstring|>create a new recipe<|endoftext|> |
273f31fec029cfab34ddf1384248543a80d1e5085ceeacaab424ce649db576aa | @action(methods=['POST'], detail=True, url_path='upload-image')
def upload_image(self, request, pk=None):
'upload an image to a post'
post = self.get_object()
serializer = self.get_serializer(post, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.... | upload an image to a post | app/timeline/views.py | upload_image | redwanc12/Timeline-REST-API | 1 | python | @action(methods=['POST'], detail=True, url_path='upload-image')
def upload_image(self, request, pk=None):
post = self.get_object()
serializer = self.get_serializer(post, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data, status=status.HTTP_20... | @action(methods=['POST'], detail=True, url_path='upload-image')
def upload_image(self, request, pk=None):
post = self.get_object()
serializer = self.get_serializer(post, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data, status=status.HTTP_20... |
fef64caad0947a44e4068be90fafd9b3db401806effec2ca24bab6df7268a7a2 | def set_from_config(self, config: PasswortButtonStrings):
'Setzt die Strings des Widgets auf die des dictionary'
self.setToolTip(config.whats_this)
self.setWhatsThis(config.whats_this)
pass | Setzt die Strings des Widgets auf die des dictionary | PasswortFenster/__PasswortEingabeWidget/__PasswortShowButton.py | set_from_config | heureka-code/PasswortFenster | 1 | python | def set_from_config(self, config: PasswortButtonStrings):
self.setToolTip(config.whats_this)
self.setWhatsThis(config.whats_this)
pass | def set_from_config(self, config: PasswortButtonStrings):
self.setToolTip(config.whats_this)
self.setWhatsThis(config.whats_this)
pass<|docstring|>Setzt die Strings des Widgets auf die des dictionary<|endoftext|> |
0ff867319b3c2aadfa5c91b7a6faebf1d4139db9fef443a4827f7e377be86a82 | def __state_changed(self):
'Wird ausgeführt, wenn der Button seinen Status durch klicken verändert und Prüft, ob das zugehörige Passwort angezeigt werden soll'
if self.isChecked():
self.__passwort_eingabe.passwort_anzeigen()
else:
self.__passwort_eingabe.passwort_verstecken()
pass | Wird ausgeführt, wenn der Button seinen Status durch klicken verändert und Prüft, ob das zugehörige Passwort angezeigt werden soll | PasswortFenster/__PasswortEingabeWidget/__PasswortShowButton.py | __state_changed | heureka-code/PasswortFenster | 1 | python | def __state_changed(self):
if self.isChecked():
self.__passwort_eingabe.passwort_anzeigen()
else:
self.__passwort_eingabe.passwort_verstecken()
pass | def __state_changed(self):
if self.isChecked():
self.__passwort_eingabe.passwort_anzeigen()
else:
self.__passwort_eingabe.passwort_verstecken()
pass<|docstring|>Wird ausgeführt, wenn der Button seinen Status durch klicken verändert und Prüft, ob das zugehörige Passwort angezeigt werden ... |
3c9724d136a6ca91fee13b5175f34679a913b8036562545f401491520c555a3a | @mod.export()
def get_trt_logger():
'\n Get the global TensorRT logger created by Polygraphy.\n\n Returns:\n trt.Logger: The TensorRT logger.\n '
global TRT_LOGGER
if (TRT_LOGGER is None):
TRT_LOGGER = trt.Logger()
return TRT_LOGGER | Get the global TensorRT logger created by Polygraphy.
Returns:
trt.Logger: The TensorRT logger. | tools/Polygraphy/polygraphy/backend/trt/util.py | get_trt_logger | tobigue/TensorRT | 5,249 | python | @mod.export()
def get_trt_logger():
'\n Get the global TensorRT logger created by Polygraphy.\n\n Returns:\n trt.Logger: The TensorRT logger.\n '
global TRT_LOGGER
if (TRT_LOGGER is None):
TRT_LOGGER = trt.Logger()
return TRT_LOGGER | @mod.export()
def get_trt_logger():
'\n Get the global TensorRT logger created by Polygraphy.\n\n Returns:\n trt.Logger: The TensorRT logger.\n '
global TRT_LOGGER
if (TRT_LOGGER is None):
TRT_LOGGER = trt.Logger()
return TRT_LOGGER<|docstring|>Get the global TensorRT logger crea... |
232429c7772cbb730074e7165eca7456f702b2baa1f3056fe56aeec1ba7a5a88 | def str_from_network(network, mode='full'):
'\n Converts a TensorRT network to a human-readable representation\n\n Args:\n network (trt.INetworkDefinition): The network.\n mode (str): Controls what is displayed for each layer. Choices: ["none", "basic", "attrs", "full"]\n\n Returns:\n ... | Converts a TensorRT network to a human-readable representation
Args:
network (trt.INetworkDefinition): The network.
mode (str): Controls what is displayed for each layer. Choices: ["none", "basic", "attrs", "full"]
Returns:
str | tools/Polygraphy/polygraphy/backend/trt/util.py | str_from_network | tobigue/TensorRT | 5,249 | python | def str_from_network(network, mode='full'):
'\n Converts a TensorRT network to a human-readable representation\n\n Args:\n network (trt.INetworkDefinition): The network.\n mode (str): Controls what is displayed for each layer. Choices: ["none", "basic", "attrs", "full"]\n\n Returns:\n ... | def str_from_network(network, mode='full'):
'\n Converts a TensorRT network to a human-readable representation\n\n Args:\n network (trt.INetworkDefinition): The network.\n mode (str): Controls what is displayed for each layer. Choices: ["none", "basic", "attrs", "full"]\n\n Returns:\n ... |
bca98105146cd1861acaf06af3eae0953bbb81900ff4e52b53ecc8922c4593be | def mark_outputs(network, outputs):
'\n Mark the specified outputs as network outputs.\n\n Args:\n network (trt.INetworkDefinition): The network in which to mark outputs.\n outputs (Sequence[str]): The names of tensors to mark as outputs.\n '
outputs = set(outputs)
all_outputs = []
... | Mark the specified outputs as network outputs.
Args:
network (trt.INetworkDefinition): The network in which to mark outputs.
outputs (Sequence[str]): The names of tensors to mark as outputs. | tools/Polygraphy/polygraphy/backend/trt/util.py | mark_outputs | tobigue/TensorRT | 5,249 | python | def mark_outputs(network, outputs):
'\n Mark the specified outputs as network outputs.\n\n Args:\n network (trt.INetworkDefinition): The network in which to mark outputs.\n outputs (Sequence[str]): The names of tensors to mark as outputs.\n '
outputs = set(outputs)
all_outputs = []
... | def mark_outputs(network, outputs):
'\n Mark the specified outputs as network outputs.\n\n Args:\n network (trt.INetworkDefinition): The network in which to mark outputs.\n outputs (Sequence[str]): The names of tensors to mark as outputs.\n '
outputs = set(outputs)
all_outputs = []
... |
7d074c1da37e40270da4a768aa17641c3c8ba3347643cc648ff829cd703583e3 | def get_input_metadata_from_profile(profile, network):
'\n Returns metadata about the inputs based on the OPT values set in a profile.\n\n Args:\n profile (trt.IOptimizationProfile):\n The profile from which to retrieve input metada.\n network (trt.INetworkDefinition):\n ... | Returns metadata about the inputs based on the OPT values set in a profile.
Args:
profile (trt.IOptimizationProfile):
The profile from which to retrieve input metada.
network (trt.INetworkDefinition):
The network the profile applies to.
Returns:
TensorMetadata:
A mappin... | tools/Polygraphy/polygraphy/backend/trt/util.py | get_input_metadata_from_profile | tobigue/TensorRT | 5,249 | python | def get_input_metadata_from_profile(profile, network):
'\n Returns metadata about the inputs based on the OPT values set in a profile.\n\n Args:\n profile (trt.IOptimizationProfile):\n The profile from which to retrieve input metada.\n network (trt.INetworkDefinition):\n ... | def get_input_metadata_from_profile(profile, network):
'\n Returns metadata about the inputs based on the OPT values set in a profile.\n\n Args:\n profile (trt.IOptimizationProfile):\n The profile from which to retrieve input metada.\n network (trt.INetworkDefinition):\n ... |
130b6c8de78af4567a932e076a64475cfa69465acacd98106cea4bf638d8dfe7 | def get_active_profile_bindings(context):
'\n Gets the start and end binding indices for the active optimization profile.\n\n Args:\n engine (trt.ICudaEngine): The engine in question.\n context (trt.IExecutionContext): The context where the profile is currently set.\n\n Returns:\n Tupl... | Gets the start and end binding indices for the active optimization profile.
Args:
engine (trt.ICudaEngine): The engine in question.
context (trt.IExecutionContext): The context where the profile is currently set.
Returns:
Tuple[int, int]: The start and end bindings indices, in that order | tools/Polygraphy/polygraphy/backend/trt/util.py | get_active_profile_bindings | tobigue/TensorRT | 5,249 | python | def get_active_profile_bindings(context):
'\n Gets the start and end binding indices for the active optimization profile.\n\n Args:\n engine (trt.ICudaEngine): The engine in question.\n context (trt.IExecutionContext): The context where the profile is currently set.\n\n Returns:\n Tupl... | def get_active_profile_bindings(context):
'\n Gets the start and end binding indices for the active optimization profile.\n\n Args:\n engine (trt.ICudaEngine): The engine in question.\n context (trt.IExecutionContext): The context where the profile is currently set.\n\n Returns:\n Tupl... |
3f85afa90d657e3462103609f6f0223038963aa4f9ea676e769da1345e5a6f7b | def create_dirs(fname):
"Create (output) directories if they don't exist\n "
fname = os.path.dirname(os.path.abspath(fname))
if (not os.path.exists(fname)):
os.makedirs(fname) | Create (output) directories if they don't exist | nlpplngen/generate.py | create_dirs | nlppln/nlppln-gen | 0 | python | def create_dirs(fname):
"\n "
fname = os.path.dirname(os.path.abspath(fname))
if (not os.path.exists(fname)):
os.makedirs(fname) | def create_dirs(fname):
"\n "
fname = os.path.dirname(os.path.abspath(fname))
if (not os.path.exists(fname)):
os.makedirs(fname)<|docstring|>Create (output) directories if they don't exist<|endoftext|> |
78315286fa0294eaa570f3d3727691645dd01691cbfa62faf14824c179e60fde | def to_bool(v):
"Convert 'y' to True and 'n' to False or raise an error."
if (v == 'y'):
return True
elif (v == 'n'):
return False
raise ValueError('Invalid input "{}" (only "y" or "n" are allowed)'.format(v)) | Convert 'y' to True and 'n' to False or raise an error. | nlpplngen/generate.py | to_bool | nlppln/nlppln-gen | 0 | python | def to_bool(v):
if (v == 'y'):
return True
elif (v == 'n'):
return False
raise ValueError('Invalid input "{}" (only "y" or "n" are allowed)'.format(v)) | def to_bool(v):
if (v == 'y'):
return True
elif (v == 'n'):
return False
raise ValueError('Invalid input "{}" (only "y" or "n" are allowed)'.format(v))<|docstring|>Convert 'y' to True and 'n' to False or raise an error.<|endoftext|> |
2ecf2ab077f4a284e22b3faf4185488deb80658f6fd5afc994e1a2ae86e61a3c | @click.command()
def command():
'Generate a cwl file that specifies an nlppln processing step.\n '
script = click.prompt('Generate python command?', default='y', type=click.Choice(['y', 'n']))
script = to_bool(script)
test = click.prompt('Generate test file?', default='y', type=click.Choice(['y', 'n'... | Generate a cwl file that specifies an nlppln processing step. | nlpplngen/generate.py | command | nlppln/nlppln-gen | 0 | python | @click.command()
def command():
'\n '
script = click.prompt('Generate python command?', default='y', type=click.Choice(['y', 'n']))
script = to_bool(script)
test = click.prompt('Generate test file?', default='y', type=click.Choice(['y', 'n']))
test = to_bool(test)
step = click.prompt('Generat... | @click.command()
def command():
'\n '
script = click.prompt('Generate python command?', default='y', type=click.Choice(['y', 'n']))
script = to_bool(script)
test = click.prompt('Generate test file?', default='y', type=click.Choice(['y', 'n']))
test = to_bool(test)
step = click.prompt('Generat... |
c3f7b52cd6ea1526cdb0b2d00a74d4f91c544bc9ad61a9b8b1d5662a3a8bc1ff | def pick(image_rgb: np.ndarray, count: int=1) -> Optional[List[str]]:
'\n Pick major colors from image\n '
if (not is_positive_int(count)):
return None
image_height = image_rgb.shape[0]
image_width = image_rgb.shape[1]
image_size = (image_height * image_width)
rgb_ndarray = image_r... | Pick major colors from image | majocol/color.py | pick | suzukey/majocol | 1 | python | def pick(image_rgb: np.ndarray, count: int=1) -> Optional[List[str]]:
'\n \n '
if (not is_positive_int(count)):
return None
image_height = image_rgb.shape[0]
image_width = image_rgb.shape[1]
image_size = (image_height * image_width)
rgb_ndarray = image_rgb.reshape(image_size, 3)
... | def pick(image_rgb: np.ndarray, count: int=1) -> Optional[List[str]]:
'\n \n '
if (not is_positive_int(count)):
return None
image_height = image_rgb.shape[0]
image_width = image_rgb.shape[1]
image_size = (image_height * image_width)
rgb_ndarray = image_rgb.reshape(image_size, 3)
... |
5c241fe2efe98ee43b97cb39494c8dc9e90b1c694fad4d2cf330008fb772a06e | def test_constructor(self):
'\n Can a MarkdownExporter be constructed?\n '
MarkdownExporter() | Can a MarkdownExporter be constructed? | nbconvert/exporters/tests/test_markdown.py | test_constructor | skizunov/nbconvert | 1,367 | python | def test_constructor(self):
'\n \n '
MarkdownExporter() | def test_constructor(self):
'\n \n '
MarkdownExporter()<|docstring|>Can a MarkdownExporter be constructed?<|endoftext|> |
aa41c2918af8486e491a875d1966fe3416ab2466e93d35f48e3f1fed2bcb9a9d | def test_export(self):
'\n Can a MarkdownExporter export something?\n '
(output, resources) = MarkdownExporter().from_filename(self._get_notebook())
assert (len(output) > 0) | Can a MarkdownExporter export something? | nbconvert/exporters/tests/test_markdown.py | test_export | skizunov/nbconvert | 1,367 | python | def test_export(self):
'\n \n '
(output, resources) = MarkdownExporter().from_filename(self._get_notebook())
assert (len(output) > 0) | def test_export(self):
'\n \n '
(output, resources) = MarkdownExporter().from_filename(self._get_notebook())
assert (len(output) > 0)<|docstring|>Can a MarkdownExporter export something?<|endoftext|> |
c00956174c888169898c161343dac598487db343f32a99fffa54d3a9a72e689b | def construct(self, x):
'construct'
x0_ = self.aspp1(x)
x0 = self.aspp1_bn(x0_)
x1_ = self.aspp2(x)
x1 = self.aspp2_bn(x1_)
x2_ = self.aspp3(x)
x2 = self.aspp3_bn(x2_)
x3_ = self.aspp4(x)
x3 = self.aspp4_bn(x3_)
x4_0 = self.global_pooling(x, ((- 2), (- 1)))
x4_1 = self.aspp5(... | construct | research/cv/Auto-DeepLab/src/core/aspp.py | construct | ZhimaoLin/models | 77 | python | def (self, x):
x0_ = self.aspp1(x)
x0 = self.aspp1_bn(x0_)
x1_ = self.aspp2(x)
x1 = self.aspp2_bn(x1_)
x2_ = self.aspp3(x)
x2 = self.aspp3_bn(x2_)
x3_ = self.aspp4(x)
x3 = self.aspp4_bn(x3_)
x4_0 = self.global_pooling(x, ((- 2), (- 1)))
x4_1 = self.aspp5(x4_0)
x4_2 = sel... | def (self, x):
x0_ = self.aspp1(x)
x0 = self.aspp1_bn(x0_)
x1_ = self.aspp2(x)
x1 = self.aspp2_bn(x1_)
x2_ = self.aspp3(x)
x2 = self.aspp3_bn(x2_)
x3_ = self.aspp4(x)
x3 = self.aspp4_bn(x3_)
x4_0 = self.global_pooling(x, ((- 2), (- 1)))
x4_1 = self.aspp5(x4_0)
x4_2 = sel... |
1014e0b04c1579ba71bbf39f918d539baf87b600ddf98fa9ad3a5e34fbc287ca | def createDatabase(store):
'\n Initialize the given Store for use as a Mantissa webserver.\n '
Mantissa().installSite(store, u'')
ws = store.findUnique(WebSite)
ws.portNumber = 8088
ws.securePortNumber = 6443
ws.certificateFile = 'path/to/cert.pem'
certPath = store.dbdir.child('path').... | Initialize the given Store for use as a Mantissa webserver. | xmantissa/test/historic/stub_website3to4.py | createDatabase | jonathanj/mantissa | 6 | python | def createDatabase(store):
'\n \n '
Mantissa().installSite(store, u)
ws = store.findUnique(WebSite)
ws.portNumber = 8088
ws.securePortNumber = 6443
ws.certificateFile = 'path/to/cert.pem'
certPath = store.dbdir.child('path').child('to').child('cert.pem')
certPath.parent().makedirs(... | def createDatabase(store):
'\n \n '
Mantissa().installSite(store, u)
ws = store.findUnique(WebSite)
ws.portNumber = 8088
ws.securePortNumber = 6443
ws.certificateFile = 'path/to/cert.pem'
certPath = store.dbdir.child('path').child('to').child('cert.pem')
certPath.parent().makedirs(... |
206b461e7a672d97f51bc49560b5615664e0437bd5a35212f44e60541a933574 | def test_wrong_gremlin_endpoint():
'Tests that an HTTP error is returned by the API if the Gremlin endpoint\n is not valid.'
conn_app = create_app()
conn_app.app.testing = False
conn_app.app.debug = False
conn_app.app.config['GREMLIN_ENDPOINT'] = 'ws://invalid-host:8182/gremlin'
with conn_app... | Tests that an HTTP error is returned by the API if the Gremlin endpoint
is not valid. | tests/test_api.py | test_wrong_gremlin_endpoint | jroimartin/graph-asset-inventory-api | 1 | python | def test_wrong_gremlin_endpoint():
'Tests that an HTTP error is returned by the API if the Gremlin endpoint\n is not valid.'
conn_app = create_app()
conn_app.app.testing = False
conn_app.app.debug = False
conn_app.app.config['GREMLIN_ENDPOINT'] = 'ws://invalid-host:8182/gremlin'
with conn_app... | def test_wrong_gremlin_endpoint():
'Tests that an HTTP error is returned by the API if the Gremlin endpoint\n is not valid.'
conn_app = create_app()
conn_app.app.testing = False
conn_app.app.debug = False
conn_app.app.config['GREMLIN_ENDPOINT'] = 'ws://invalid-host:8182/gremlin'
with conn_app... |
2882ce929bdd434eb7050875413b0c475ebda9e7c2239b69bf30eff74f5645be | def test_datetime_validation(flask_cli):
'Tests the validation of date-time fields.'
asset_req = {'type': 'type0', 'identifier': 'identifier0', 'timestamp': '1234', 'expiration': '2021-07-07T01:00:00+00:00'}
resp = flask_cli.post('/v1/assets', data=json.dumps(asset_req), content_type='application/json')
... | Tests the validation of date-time fields. | tests/test_api.py | test_datetime_validation | jroimartin/graph-asset-inventory-api | 1 | python | def test_datetime_validation(flask_cli):
asset_req = {'type': 'type0', 'identifier': 'identifier0', 'timestamp': '1234', 'expiration': '2021-07-07T01:00:00+00:00'}
resp = flask_cli.post('/v1/assets', data=json.dumps(asset_req), content_type='application/json')
assert (resp.status_code == 400)
asset... | def test_datetime_validation(flask_cli):
asset_req = {'type': 'type0', 'identifier': 'identifier0', 'timestamp': '1234', 'expiration': '2021-07-07T01:00:00+00:00'}
resp = flask_cli.post('/v1/assets', data=json.dumps(asset_req), content_type='application/json')
assert (resp.status_code == 400)
asset... |
7eb28d38495192819a4d59388bf5ad6e20ed75617fa1d6ebb39bb2e4cc7e88f5 | def test_datetime_rfc3339_parsing(flask_cli):
'Tests rfc3339 parsing.'
asset_req = {'type': 'type0', 'identifier': 'identifier0', 'timestamp': '2021-07-01T01:00:00Z', 'expiration': '2021-07-07T03:00:00+02:00'}
resp = flask_cli.post('/v1/assets', data=json.dumps(asset_req), content_type='application/json')
... | Tests rfc3339 parsing. | tests/test_api.py | test_datetime_rfc3339_parsing | jroimartin/graph-asset-inventory-api | 1 | python | def test_datetime_rfc3339_parsing(flask_cli):
asset_req = {'type': 'type0', 'identifier': 'identifier0', 'timestamp': '2021-07-01T01:00:00Z', 'expiration': '2021-07-07T03:00:00+02:00'}
resp = flask_cli.post('/v1/assets', data=json.dumps(asset_req), content_type='application/json')
resp_data = json.load... | def test_datetime_rfc3339_parsing(flask_cli):
asset_req = {'type': 'type0', 'identifier': 'identifier0', 'timestamp': '2021-07-01T01:00:00Z', 'expiration': '2021-07-07T03:00:00+02:00'}
resp = flask_cli.post('/v1/assets', data=json.dumps(asset_req), content_type='application/json')
resp_data = json.load... |
90c0bca9a6d58c75c74aea540cc23444a4833f1de6c9a95815bd0398232de9cd | def test_datetime_timezone(flask_cli):
'Tests if gremlin returns the expected timezone for datetime\n properties.'
asset_req = {'type': 'type0', 'identifier': 'identifier0', 'timestamp': '2021-07-01T05:00:00+04:00', 'expiration': '2021-07-07T01:00:00+00:00'}
resp = flask_cli.post('/v1/assets', data=json.... | Tests if gremlin returns the expected timezone for datetime
properties. | tests/test_api.py | test_datetime_timezone | jroimartin/graph-asset-inventory-api | 1 | python | def test_datetime_timezone(flask_cli):
'Tests if gremlin returns the expected timezone for datetime\n properties.'
asset_req = {'type': 'type0', 'identifier': 'identifier0', 'timestamp': '2021-07-01T05:00:00+04:00', 'expiration': '2021-07-07T01:00:00+00:00'}
resp = flask_cli.post('/v1/assets', data=json.... | def test_datetime_timezone(flask_cli):
'Tests if gremlin returns the expected timezone for datetime\n properties.'
asset_req = {'type': 'type0', 'identifier': 'identifier0', 'timestamp': '2021-07-01T05:00:00+04:00', 'expiration': '2021-07-07T01:00:00+00:00'}
resp = flask_cli.post('/v1/assets', data=json.... |
12b01f50d3b18400f2f40393111bfbe998d4f900c52289c355671d0fd8cfc360 | def __init__(self, id=None, console_identifier=None, disabled=None, email=None, gcp_pubsub=None, jira=None, last_error=None, modified=None, name=None, notes=None, owner=None, pagerduty=None, policy=None, previous_name=None, security_advisor=None, security_center=None, security_hub=None, service_now=None, slack=None, we... | ApiAlertProfile - a model defined in OpenAPI | openapi_client/models/api_alert_profile.py | __init__ | hi-artem/twistlock-py | 0 | python | def __init__(self, id=None, console_identifier=None, disabled=None, email=None, gcp_pubsub=None, jira=None, last_error=None, modified=None, name=None, notes=None, owner=None, pagerduty=None, policy=None, previous_name=None, security_advisor=None, security_center=None, security_hub=None, service_now=None, slack=None, we... | def __init__(self, id=None, console_identifier=None, disabled=None, email=None, gcp_pubsub=None, jira=None, last_error=None, modified=None, name=None, notes=None, owner=None, pagerduty=None, policy=None, previous_name=None, security_advisor=None, security_center=None, security_hub=None, service_now=None, slack=None, we... |
0fbb95c22b2f4e68f22d45bc8b0787a982913c36ba2ba6b698512d335483bbf5 | @property
def id(self):
'Gets the id of this ApiAlertProfile. # noqa: E501\n\n ID is the alert profile ID. # noqa: E501\n\n :return: The id of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._id | Gets the id of this ApiAlertProfile. # noqa: E501
ID is the alert profile ID. # noqa: E501
:return: The id of this ApiAlertProfile. # noqa: E501
:rtype: str | openapi_client/models/api_alert_profile.py | id | hi-artem/twistlock-py | 0 | python | @property
def id(self):
'Gets the id of this ApiAlertProfile. # noqa: E501\n\n ID is the alert profile ID. # noqa: E501\n\n :return: The id of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._id | @property
def id(self):
'Gets the id of this ApiAlertProfile. # noqa: E501\n\n ID is the alert profile ID. # noqa: E501\n\n :return: The id of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._id<|docstring|>Gets the id of this ApiAlertProfile. # noqa: E501
ID i... |
da775c6e3ff6f694a9b76c5466abb3670c70bc9d0ae5d8d7721018fe2ba52ba9 | @id.setter
def id(self, id):
'Sets the id of this ApiAlertProfile.\n\n ID is the alert profile ID. # noqa: E501\n\n :param id: The id of this ApiAlertProfile. # noqa: E501\n :type id: str\n '
self._id = id | Sets the id of this ApiAlertProfile.
ID is the alert profile ID. # noqa: E501
:param id: The id of this ApiAlertProfile. # noqa: E501
:type id: str | openapi_client/models/api_alert_profile.py | id | hi-artem/twistlock-py | 0 | python | @id.setter
def id(self, id):
'Sets the id of this ApiAlertProfile.\n\n ID is the alert profile ID. # noqa: E501\n\n :param id: The id of this ApiAlertProfile. # noqa: E501\n :type id: str\n '
self._id = id | @id.setter
def id(self, id):
'Sets the id of this ApiAlertProfile.\n\n ID is the alert profile ID. # noqa: E501\n\n :param id: The id of this ApiAlertProfile. # noqa: E501\n :type id: str\n '
self._id = id<|docstring|>Sets the id of this ApiAlertProfile.
ID is the alert profile I... |
72d663030fc3450fc23be967909c052955c283e1e8b706e6e9d82b90d9450410 | @property
def console_identifier(self):
'Gets the console_identifier of this ApiAlertProfile. # noqa: E501\n\n ConsoleIdentifier is the console identifier. # noqa: E501\n\n :return: The console_identifier of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._consol... | Gets the console_identifier of this ApiAlertProfile. # noqa: E501
ConsoleIdentifier is the console identifier. # noqa: E501
:return: The console_identifier of this ApiAlertProfile. # noqa: E501
:rtype: str | openapi_client/models/api_alert_profile.py | console_identifier | hi-artem/twistlock-py | 0 | python | @property
def console_identifier(self):
'Gets the console_identifier of this ApiAlertProfile. # noqa: E501\n\n ConsoleIdentifier is the console identifier. # noqa: E501\n\n :return: The console_identifier of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._consol... | @property
def console_identifier(self):
'Gets the console_identifier of this ApiAlertProfile. # noqa: E501\n\n ConsoleIdentifier is the console identifier. # noqa: E501\n\n :return: The console_identifier of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._consol... |
e2e46521fb21d27517c63901250fd0cb660799e1baad9e2363ea7d550cfd1a71 | @console_identifier.setter
def console_identifier(self, console_identifier):
'Sets the console_identifier of this ApiAlertProfile.\n\n ConsoleIdentifier is the console identifier. # noqa: E501\n\n :param console_identifier: The console_identifier of this ApiAlertProfile. # noqa: E501\n :type... | Sets the console_identifier of this ApiAlertProfile.
ConsoleIdentifier is the console identifier. # noqa: E501
:param console_identifier: The console_identifier of this ApiAlertProfile. # noqa: E501
:type console_identifier: str | openapi_client/models/api_alert_profile.py | console_identifier | hi-artem/twistlock-py | 0 | python | @console_identifier.setter
def console_identifier(self, console_identifier):
'Sets the console_identifier of this ApiAlertProfile.\n\n ConsoleIdentifier is the console identifier. # noqa: E501\n\n :param console_identifier: The console_identifier of this ApiAlertProfile. # noqa: E501\n :type... | @console_identifier.setter
def console_identifier(self, console_identifier):
'Sets the console_identifier of this ApiAlertProfile.\n\n ConsoleIdentifier is the console identifier. # noqa: E501\n\n :param console_identifier: The console_identifier of this ApiAlertProfile. # noqa: E501\n :type... |
c1f19f9ea06ccaa7ff8d94d0c90ae9ca5ff6ac9900c56a1863d6d6f4827f7342 | @property
def disabled(self):
'Gets the disabled of this ApiAlertProfile. # noqa: E501\n\n Indicates if the rule is currently disabled (true) or not (false). # noqa: E501\n\n :return: The disabled of this ApiAlertProfile. # noqa: E501\n :rtype: bool\n '
return self._disabled | Gets the disabled of this ApiAlertProfile. # noqa: E501
Indicates if the rule is currently disabled (true) or not (false). # noqa: E501
:return: The disabled of this ApiAlertProfile. # noqa: E501
:rtype: bool | openapi_client/models/api_alert_profile.py | disabled | hi-artem/twistlock-py | 0 | python | @property
def disabled(self):
'Gets the disabled of this ApiAlertProfile. # noqa: E501\n\n Indicates if the rule is currently disabled (true) or not (false). # noqa: E501\n\n :return: The disabled of this ApiAlertProfile. # noqa: E501\n :rtype: bool\n '
return self._disabled | @property
def disabled(self):
'Gets the disabled of this ApiAlertProfile. # noqa: E501\n\n Indicates if the rule is currently disabled (true) or not (false). # noqa: E501\n\n :return: The disabled of this ApiAlertProfile. # noqa: E501\n :rtype: bool\n '
return self._disabled<|doc... |
4ddb7e7b4cbaeeef86b08e0da030216e21bcc70a1bd79a5fa9610ef3b1073ea9 | @disabled.setter
def disabled(self, disabled):
'Sets the disabled of this ApiAlertProfile.\n\n Indicates if the rule is currently disabled (true) or not (false). # noqa: E501\n\n :param disabled: The disabled of this ApiAlertProfile. # noqa: E501\n :type disabled: bool\n '
self._d... | Sets the disabled of this ApiAlertProfile.
Indicates if the rule is currently disabled (true) or not (false). # noqa: E501
:param disabled: The disabled of this ApiAlertProfile. # noqa: E501
:type disabled: bool | openapi_client/models/api_alert_profile.py | disabled | hi-artem/twistlock-py | 0 | python | @disabled.setter
def disabled(self, disabled):
'Sets the disabled of this ApiAlertProfile.\n\n Indicates if the rule is currently disabled (true) or not (false). # noqa: E501\n\n :param disabled: The disabled of this ApiAlertProfile. # noqa: E501\n :type disabled: bool\n '
self._d... | @disabled.setter
def disabled(self, disabled):
'Sets the disabled of this ApiAlertProfile.\n\n Indicates if the rule is currently disabled (true) or not (false). # noqa: E501\n\n :param disabled: The disabled of this ApiAlertProfile. # noqa: E501\n :type disabled: bool\n '
self._d... |
d2492aa46545c82fb7c8fb77caf06e0e9c7c669a3cff6698b05809166cda2bec | @property
def email(self):
'Gets the email of this ApiAlertProfile. # noqa: E501\n\n\n :return: The email of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileEmailSettings\n '
return self._email | Gets the email of this ApiAlertProfile. # noqa: E501
:return: The email of this ApiAlertProfile. # noqa: E501
:rtype: ApiAlertProfileEmailSettings | openapi_client/models/api_alert_profile.py | email | hi-artem/twistlock-py | 0 | python | @property
def email(self):
'Gets the email of this ApiAlertProfile. # noqa: E501\n\n\n :return: The email of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileEmailSettings\n '
return self._email | @property
def email(self):
'Gets the email of this ApiAlertProfile. # noqa: E501\n\n\n :return: The email of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileEmailSettings\n '
return self._email<|docstring|>Gets the email of this ApiAlertProfile. # noqa: E501
:return: The em... |
2a63a886273db29b43b17b9677ddebca045e3bcf5664b1349b2e36d177b3be2e | @email.setter
def email(self, email):
'Sets the email of this ApiAlertProfile.\n\n\n :param email: The email of this ApiAlertProfile. # noqa: E501\n :type email: ApiAlertProfileEmailSettings\n '
self._email = email | Sets the email of this ApiAlertProfile.
:param email: The email of this ApiAlertProfile. # noqa: E501
:type email: ApiAlertProfileEmailSettings | openapi_client/models/api_alert_profile.py | email | hi-artem/twistlock-py | 0 | python | @email.setter
def email(self, email):
'Sets the email of this ApiAlertProfile.\n\n\n :param email: The email of this ApiAlertProfile. # noqa: E501\n :type email: ApiAlertProfileEmailSettings\n '
self._email = email | @email.setter
def email(self, email):
'Sets the email of this ApiAlertProfile.\n\n\n :param email: The email of this ApiAlertProfile. # noqa: E501\n :type email: ApiAlertProfileEmailSettings\n '
self._email = email<|docstring|>Sets the email of this ApiAlertProfile.
:param email: The ema... |
f91cb1041bde448d149c0004d518a95b7ef4906e51622fc9a63a4c3521af121c | @property
def gcp_pubsub(self):
'Gets the gcp_pubsub of this ApiAlertProfile. # noqa: E501\n\n\n :return: The gcp_pubsub of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileGcpPubsubSettings\n '
return self._gcp_pubsub | Gets the gcp_pubsub of this ApiAlertProfile. # noqa: E501
:return: The gcp_pubsub of this ApiAlertProfile. # noqa: E501
:rtype: ApiAlertProfileGcpPubsubSettings | openapi_client/models/api_alert_profile.py | gcp_pubsub | hi-artem/twistlock-py | 0 | python | @property
def gcp_pubsub(self):
'Gets the gcp_pubsub of this ApiAlertProfile. # noqa: E501\n\n\n :return: The gcp_pubsub of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileGcpPubsubSettings\n '
return self._gcp_pubsub | @property
def gcp_pubsub(self):
'Gets the gcp_pubsub of this ApiAlertProfile. # noqa: E501\n\n\n :return: The gcp_pubsub of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileGcpPubsubSettings\n '
return self._gcp_pubsub<|docstring|>Gets the gcp_pubsub of this ApiAlertProfile. #... |
40d746d0ceebe4d28525394022c884198887afe401f5d0255efef2e6a66f2b11 | @gcp_pubsub.setter
def gcp_pubsub(self, gcp_pubsub):
'Sets the gcp_pubsub of this ApiAlertProfile.\n\n\n :param gcp_pubsub: The gcp_pubsub of this ApiAlertProfile. # noqa: E501\n :type gcp_pubsub: ApiAlertProfileGcpPubsubSettings\n '
self._gcp_pubsub = gcp_pubsub | Sets the gcp_pubsub of this ApiAlertProfile.
:param gcp_pubsub: The gcp_pubsub of this ApiAlertProfile. # noqa: E501
:type gcp_pubsub: ApiAlertProfileGcpPubsubSettings | openapi_client/models/api_alert_profile.py | gcp_pubsub | hi-artem/twistlock-py | 0 | python | @gcp_pubsub.setter
def gcp_pubsub(self, gcp_pubsub):
'Sets the gcp_pubsub of this ApiAlertProfile.\n\n\n :param gcp_pubsub: The gcp_pubsub of this ApiAlertProfile. # noqa: E501\n :type gcp_pubsub: ApiAlertProfileGcpPubsubSettings\n '
self._gcp_pubsub = gcp_pubsub | @gcp_pubsub.setter
def gcp_pubsub(self, gcp_pubsub):
'Sets the gcp_pubsub of this ApiAlertProfile.\n\n\n :param gcp_pubsub: The gcp_pubsub of this ApiAlertProfile. # noqa: E501\n :type gcp_pubsub: ApiAlertProfileGcpPubsubSettings\n '
self._gcp_pubsub = gcp_pubsub<|docstring|>Sets the gcp_p... |
a24d2bd7131f7560fa152c564e4dd40351c36d5827975a51ad2f861b76af6ad7 | @property
def jira(self):
'Gets the jira of this ApiAlertProfile. # noqa: E501\n\n\n :return: The jira of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileJIRASettings\n '
return self._jira | Gets the jira of this ApiAlertProfile. # noqa: E501
:return: The jira of this ApiAlertProfile. # noqa: E501
:rtype: ApiAlertProfileJIRASettings | openapi_client/models/api_alert_profile.py | jira | hi-artem/twistlock-py | 0 | python | @property
def jira(self):
'Gets the jira of this ApiAlertProfile. # noqa: E501\n\n\n :return: The jira of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileJIRASettings\n '
return self._jira | @property
def jira(self):
'Gets the jira of this ApiAlertProfile. # noqa: E501\n\n\n :return: The jira of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileJIRASettings\n '
return self._jira<|docstring|>Gets the jira of this ApiAlertProfile. # noqa: E501
:return: The jira of ... |
bc58c1e0c1d1b51dc9a0eb5f76d97c030d504b23b9800f7e3aed59bb2332e3cd | @jira.setter
def jira(self, jira):
'Sets the jira of this ApiAlertProfile.\n\n\n :param jira: The jira of this ApiAlertProfile. # noqa: E501\n :type jira: ApiAlertProfileJIRASettings\n '
self._jira = jira | Sets the jira of this ApiAlertProfile.
:param jira: The jira of this ApiAlertProfile. # noqa: E501
:type jira: ApiAlertProfileJIRASettings | openapi_client/models/api_alert_profile.py | jira | hi-artem/twistlock-py | 0 | python | @jira.setter
def jira(self, jira):
'Sets the jira of this ApiAlertProfile.\n\n\n :param jira: The jira of this ApiAlertProfile. # noqa: E501\n :type jira: ApiAlertProfileJIRASettings\n '
self._jira = jira | @jira.setter
def jira(self, jira):
'Sets the jira of this ApiAlertProfile.\n\n\n :param jira: The jira of this ApiAlertProfile. # noqa: E501\n :type jira: ApiAlertProfileJIRASettings\n '
self._jira = jira<|docstring|>Sets the jira of this ApiAlertProfile.
:param jira: The jira of this Ap... |
0f8a1f09b83699f25e0baf89900e75e527642fd39a2f73dc4fe4b17a8f93519c | @property
def last_error(self):
'Gets the last_error of this ApiAlertProfile. # noqa: E501\n\n LastError represents the last error when sending the profile. # noqa: E501\n\n :return: The last_error of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._last_error | Gets the last_error of this ApiAlertProfile. # noqa: E501
LastError represents the last error when sending the profile. # noqa: E501
:return: The last_error of this ApiAlertProfile. # noqa: E501
:rtype: str | openapi_client/models/api_alert_profile.py | last_error | hi-artem/twistlock-py | 0 | python | @property
def last_error(self):
'Gets the last_error of this ApiAlertProfile. # noqa: E501\n\n LastError represents the last error when sending the profile. # noqa: E501\n\n :return: The last_error of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._last_error | @property
def last_error(self):
'Gets the last_error of this ApiAlertProfile. # noqa: E501\n\n LastError represents the last error when sending the profile. # noqa: E501\n\n :return: The last_error of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._last_error<|d... |
b1cff5b8150e6165c9b8ec6d18af23dfd4f1fa1dad3a0392ec1ecf99cb641c38 | @last_error.setter
def last_error(self, last_error):
'Sets the last_error of this ApiAlertProfile.\n\n LastError represents the last error when sending the profile. # noqa: E501\n\n :param last_error: The last_error of this ApiAlertProfile. # noqa: E501\n :type last_error: str\n '
... | Sets the last_error of this ApiAlertProfile.
LastError represents the last error when sending the profile. # noqa: E501
:param last_error: The last_error of this ApiAlertProfile. # noqa: E501
:type last_error: str | openapi_client/models/api_alert_profile.py | last_error | hi-artem/twistlock-py | 0 | python | @last_error.setter
def last_error(self, last_error):
'Sets the last_error of this ApiAlertProfile.\n\n LastError represents the last error when sending the profile. # noqa: E501\n\n :param last_error: The last_error of this ApiAlertProfile. # noqa: E501\n :type last_error: str\n '
... | @last_error.setter
def last_error(self, last_error):
'Sets the last_error of this ApiAlertProfile.\n\n LastError represents the last error when sending the profile. # noqa: E501\n\n :param last_error: The last_error of this ApiAlertProfile. # noqa: E501\n :type last_error: str\n '
... |
f9054d5cbd035ea1d08bcc6a5c48573597dc4de0b0c86333c69d8bf73fb07a72 | @property
def modified(self):
'Gets the modified of this ApiAlertProfile. # noqa: E501\n\n Datetime when the rule was last modified. # noqa: E501\n\n :return: The modified of this ApiAlertProfile. # noqa: E501\n :rtype: datetime\n '
return self._modified | Gets the modified of this ApiAlertProfile. # noqa: E501
Datetime when the rule was last modified. # noqa: E501
:return: The modified of this ApiAlertProfile. # noqa: E501
:rtype: datetime | openapi_client/models/api_alert_profile.py | modified | hi-artem/twistlock-py | 0 | python | @property
def modified(self):
'Gets the modified of this ApiAlertProfile. # noqa: E501\n\n Datetime when the rule was last modified. # noqa: E501\n\n :return: The modified of this ApiAlertProfile. # noqa: E501\n :rtype: datetime\n '
return self._modified | @property
def modified(self):
'Gets the modified of this ApiAlertProfile. # noqa: E501\n\n Datetime when the rule was last modified. # noqa: E501\n\n :return: The modified of this ApiAlertProfile. # noqa: E501\n :rtype: datetime\n '
return self._modified<|docstring|>Gets the modi... |
960bce39b44166a23d440083c95bdf066c257f7a1c1ed8e7f09e71e51b3bda9b | @modified.setter
def modified(self, modified):
'Sets the modified of this ApiAlertProfile.\n\n Datetime when the rule was last modified. # noqa: E501\n\n :param modified: The modified of this ApiAlertProfile. # noqa: E501\n :type modified: datetime\n '
self._modified = modified | Sets the modified of this ApiAlertProfile.
Datetime when the rule was last modified. # noqa: E501
:param modified: The modified of this ApiAlertProfile. # noqa: E501
:type modified: datetime | openapi_client/models/api_alert_profile.py | modified | hi-artem/twistlock-py | 0 | python | @modified.setter
def modified(self, modified):
'Sets the modified of this ApiAlertProfile.\n\n Datetime when the rule was last modified. # noqa: E501\n\n :param modified: The modified of this ApiAlertProfile. # noqa: E501\n :type modified: datetime\n '
self._modified = modified | @modified.setter
def modified(self, modified):
'Sets the modified of this ApiAlertProfile.\n\n Datetime when the rule was last modified. # noqa: E501\n\n :param modified: The modified of this ApiAlertProfile. # noqa: E501\n :type modified: datetime\n '
self._modified = modified<|d... |
a3cf84bac69801b2e90f29a362e7e57994bb2cc62f19d9e36540e3e172697a51 | @property
def name(self):
'Gets the name of this ApiAlertProfile. # noqa: E501\n\n Name of the rule. # noqa: E501\n\n :return: The name of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._name | Gets the name of this ApiAlertProfile. # noqa: E501
Name of the rule. # noqa: E501
:return: The name of this ApiAlertProfile. # noqa: E501
:rtype: str | openapi_client/models/api_alert_profile.py | name | hi-artem/twistlock-py | 0 | python | @property
def name(self):
'Gets the name of this ApiAlertProfile. # noqa: E501\n\n Name of the rule. # noqa: E501\n\n :return: The name of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._name | @property
def name(self):
'Gets the name of this ApiAlertProfile. # noqa: E501\n\n Name of the rule. # noqa: E501\n\n :return: The name of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._name<|docstring|>Gets the name of this ApiAlertProfile. # noqa: E501
Name... |
0daab1ea1ec08d50f60d682310a0f2019cc645e57c242777355a6219cca1eb81 | @name.setter
def name(self, name):
'Sets the name of this ApiAlertProfile.\n\n Name of the rule. # noqa: E501\n\n :param name: The name of this ApiAlertProfile. # noqa: E501\n :type name: str\n '
self._name = name | Sets the name of this ApiAlertProfile.
Name of the rule. # noqa: E501
:param name: The name of this ApiAlertProfile. # noqa: E501
:type name: str | openapi_client/models/api_alert_profile.py | name | hi-artem/twistlock-py | 0 | python | @name.setter
def name(self, name):
'Sets the name of this ApiAlertProfile.\n\n Name of the rule. # noqa: E501\n\n :param name: The name of this ApiAlertProfile. # noqa: E501\n :type name: str\n '
self._name = name | @name.setter
def name(self, name):
'Sets the name of this ApiAlertProfile.\n\n Name of the rule. # noqa: E501\n\n :param name: The name of this ApiAlertProfile. # noqa: E501\n :type name: str\n '
self._name = name<|docstring|>Sets the name of this ApiAlertProfile.
Name of the rul... |
d896f7e97d21360e9722b683df0c677e3537539e7930d1f50ff7ae45502a6223 | @property
def notes(self):
'Gets the notes of this ApiAlertProfile. # noqa: E501\n\n Free-form text. # noqa: E501\n\n :return: The notes of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._notes | Gets the notes of this ApiAlertProfile. # noqa: E501
Free-form text. # noqa: E501
:return: The notes of this ApiAlertProfile. # noqa: E501
:rtype: str | openapi_client/models/api_alert_profile.py | notes | hi-artem/twistlock-py | 0 | python | @property
def notes(self):
'Gets the notes of this ApiAlertProfile. # noqa: E501\n\n Free-form text. # noqa: E501\n\n :return: The notes of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._notes | @property
def notes(self):
'Gets the notes of this ApiAlertProfile. # noqa: E501\n\n Free-form text. # noqa: E501\n\n :return: The notes of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._notes<|docstring|>Gets the notes of this ApiAlertProfile. # noqa: E501
F... |
edf4908cfe8e9d5a38899ed7f64a8c6c42a9037686f13caadd81d6abbb90f14c | @notes.setter
def notes(self, notes):
'Sets the notes of this ApiAlertProfile.\n\n Free-form text. # noqa: E501\n\n :param notes: The notes of this ApiAlertProfile. # noqa: E501\n :type notes: str\n '
self._notes = notes | Sets the notes of this ApiAlertProfile.
Free-form text. # noqa: E501
:param notes: The notes of this ApiAlertProfile. # noqa: E501
:type notes: str | openapi_client/models/api_alert_profile.py | notes | hi-artem/twistlock-py | 0 | python | @notes.setter
def notes(self, notes):
'Sets the notes of this ApiAlertProfile.\n\n Free-form text. # noqa: E501\n\n :param notes: The notes of this ApiAlertProfile. # noqa: E501\n :type notes: str\n '
self._notes = notes | @notes.setter
def notes(self, notes):
'Sets the notes of this ApiAlertProfile.\n\n Free-form text. # noqa: E501\n\n :param notes: The notes of this ApiAlertProfile. # noqa: E501\n :type notes: str\n '
self._notes = notes<|docstring|>Sets the notes of this ApiAlertProfile.
Free-fo... |
7f7dc2029f69bbb0bb83fc69fdd0674ea7e3e9b26ba110f879a9c7e7ba02bc66 | @property
def owner(self):
'Gets the owner of this ApiAlertProfile. # noqa: E501\n\n User who created or last modified the rule. # noqa: E501\n\n :return: The owner of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._owner | Gets the owner of this ApiAlertProfile. # noqa: E501
User who created or last modified the rule. # noqa: E501
:return: The owner of this ApiAlertProfile. # noqa: E501
:rtype: str | openapi_client/models/api_alert_profile.py | owner | hi-artem/twistlock-py | 0 | python | @property
def owner(self):
'Gets the owner of this ApiAlertProfile. # noqa: E501\n\n User who created or last modified the rule. # noqa: E501\n\n :return: The owner of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._owner | @property
def owner(self):
'Gets the owner of this ApiAlertProfile. # noqa: E501\n\n User who created or last modified the rule. # noqa: E501\n\n :return: The owner of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._owner<|docstring|>Gets the owner of this ApiAl... |
3ea564f08ba0c066a96a37d4c016069c790d43bbfb637ab456b9a39f8f5b8d54 | @owner.setter
def owner(self, owner):
'Sets the owner of this ApiAlertProfile.\n\n User who created or last modified the rule. # noqa: E501\n\n :param owner: The owner of this ApiAlertProfile. # noqa: E501\n :type owner: str\n '
self._owner = owner | Sets the owner of this ApiAlertProfile.
User who created or last modified the rule. # noqa: E501
:param owner: The owner of this ApiAlertProfile. # noqa: E501
:type owner: str | openapi_client/models/api_alert_profile.py | owner | hi-artem/twistlock-py | 0 | python | @owner.setter
def owner(self, owner):
'Sets the owner of this ApiAlertProfile.\n\n User who created or last modified the rule. # noqa: E501\n\n :param owner: The owner of this ApiAlertProfile. # noqa: E501\n :type owner: str\n '
self._owner = owner | @owner.setter
def owner(self, owner):
'Sets the owner of this ApiAlertProfile.\n\n User who created or last modified the rule. # noqa: E501\n\n :param owner: The owner of this ApiAlertProfile. # noqa: E501\n :type owner: str\n '
self._owner = owner<|docstring|>Sets the owner of th... |
d26e8e4d935a0bae35635344b803faace94b5c66f8b870ce5cf8285762d13784 | @property
def pagerduty(self):
'Gets the pagerduty of this ApiAlertProfile. # noqa: E501\n\n\n :return: The pagerduty of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfilePagerDutySettings\n '
return self._pagerduty | Gets the pagerduty of this ApiAlertProfile. # noqa: E501
:return: The pagerduty of this ApiAlertProfile. # noqa: E501
:rtype: ApiAlertProfilePagerDutySettings | openapi_client/models/api_alert_profile.py | pagerduty | hi-artem/twistlock-py | 0 | python | @property
def pagerduty(self):
'Gets the pagerduty of this ApiAlertProfile. # noqa: E501\n\n\n :return: The pagerduty of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfilePagerDutySettings\n '
return self._pagerduty | @property
def pagerduty(self):
'Gets the pagerduty of this ApiAlertProfile. # noqa: E501\n\n\n :return: The pagerduty of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfilePagerDutySettings\n '
return self._pagerduty<|docstring|>Gets the pagerduty of this ApiAlertProfile. # noqa... |
46db4ef437917492c3232b3d7f11d96bfed526a8ef08e4db36d2ed6cb5d9d81c | @pagerduty.setter
def pagerduty(self, pagerduty):
'Sets the pagerduty of this ApiAlertProfile.\n\n\n :param pagerduty: The pagerduty of this ApiAlertProfile. # noqa: E501\n :type pagerduty: ApiAlertProfilePagerDutySettings\n '
self._pagerduty = pagerduty | Sets the pagerduty of this ApiAlertProfile.
:param pagerduty: The pagerduty of this ApiAlertProfile. # noqa: E501
:type pagerduty: ApiAlertProfilePagerDutySettings | openapi_client/models/api_alert_profile.py | pagerduty | hi-artem/twistlock-py | 0 | python | @pagerduty.setter
def pagerduty(self, pagerduty):
'Sets the pagerduty of this ApiAlertProfile.\n\n\n :param pagerduty: The pagerduty of this ApiAlertProfile. # noqa: E501\n :type pagerduty: ApiAlertProfilePagerDutySettings\n '
self._pagerduty = pagerduty | @pagerduty.setter
def pagerduty(self, pagerduty):
'Sets the pagerduty of this ApiAlertProfile.\n\n\n :param pagerduty: The pagerduty of this ApiAlertProfile. # noqa: E501\n :type pagerduty: ApiAlertProfilePagerDutySettings\n '
self._pagerduty = pagerduty<|docstring|>Sets the pagerduty of t... |
ec283b789bb5971aad11b4f2b32df9b42df7605ea2de6797db6386f3e4088037 | @property
def policy(self):
'Gets the policy of this ApiAlertProfile. # noqa: E501\n\n Policy contains the mapping between alert type to the applied alert rules. # noqa: E501\n\n :return: The policy of this ApiAlertProfile. # noqa: E501\n :rtype: dict(str, ApiAlertRule)\n '
retur... | Gets the policy of this ApiAlertProfile. # noqa: E501
Policy contains the mapping between alert type to the applied alert rules. # noqa: E501
:return: The policy of this ApiAlertProfile. # noqa: E501
:rtype: dict(str, ApiAlertRule) | openapi_client/models/api_alert_profile.py | policy | hi-artem/twistlock-py | 0 | python | @property
def policy(self):
'Gets the policy of this ApiAlertProfile. # noqa: E501\n\n Policy contains the mapping between alert type to the applied alert rules. # noqa: E501\n\n :return: The policy of this ApiAlertProfile. # noqa: E501\n :rtype: dict(str, ApiAlertRule)\n '
retur... | @property
def policy(self):
'Gets the policy of this ApiAlertProfile. # noqa: E501\n\n Policy contains the mapping between alert type to the applied alert rules. # noqa: E501\n\n :return: The policy of this ApiAlertProfile. # noqa: E501\n :rtype: dict(str, ApiAlertRule)\n '
retur... |
53a77420ba4dfa8293b719648d25ed5016b11f003706b1a8caaef61913476dcc | @policy.setter
def policy(self, policy):
'Sets the policy of this ApiAlertProfile.\n\n Policy contains the mapping between alert type to the applied alert rules. # noqa: E501\n\n :param policy: The policy of this ApiAlertProfile. # noqa: E501\n :type policy: dict(str, ApiAlertRule)\n ... | Sets the policy of this ApiAlertProfile.
Policy contains the mapping between alert type to the applied alert rules. # noqa: E501
:param policy: The policy of this ApiAlertProfile. # noqa: E501
:type policy: dict(str, ApiAlertRule) | openapi_client/models/api_alert_profile.py | policy | hi-artem/twistlock-py | 0 | python | @policy.setter
def policy(self, policy):
'Sets the policy of this ApiAlertProfile.\n\n Policy contains the mapping between alert type to the applied alert rules. # noqa: E501\n\n :param policy: The policy of this ApiAlertProfile. # noqa: E501\n :type policy: dict(str, ApiAlertRule)\n ... | @policy.setter
def policy(self, policy):
'Sets the policy of this ApiAlertProfile.\n\n Policy contains the mapping between alert type to the applied alert rules. # noqa: E501\n\n :param policy: The policy of this ApiAlertProfile. # noqa: E501\n :type policy: dict(str, ApiAlertRule)\n ... |
1e9706614e3eb62b783c4c472a1369819ec594111c83f3a53955ffd0a867b0ca | @property
def previous_name(self):
'Gets the previous_name of this ApiAlertProfile. # noqa: E501\n\n Previous name of the rule. Required for rule renaming. # noqa: E501\n\n :return: The previous_name of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._previous_na... | Gets the previous_name of this ApiAlertProfile. # noqa: E501
Previous name of the rule. Required for rule renaming. # noqa: E501
:return: The previous_name of this ApiAlertProfile. # noqa: E501
:rtype: str | openapi_client/models/api_alert_profile.py | previous_name | hi-artem/twistlock-py | 0 | python | @property
def previous_name(self):
'Gets the previous_name of this ApiAlertProfile. # noqa: E501\n\n Previous name of the rule. Required for rule renaming. # noqa: E501\n\n :return: The previous_name of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._previous_na... | @property
def previous_name(self):
'Gets the previous_name of this ApiAlertProfile. # noqa: E501\n\n Previous name of the rule. Required for rule renaming. # noqa: E501\n\n :return: The previous_name of this ApiAlertProfile. # noqa: E501\n :rtype: str\n '
return self._previous_na... |
8ca1322c3a3d25d1e0e8d74ab4a821b7e9ef3f3098011152873b3aa1ed984fac | @previous_name.setter
def previous_name(self, previous_name):
'Sets the previous_name of this ApiAlertProfile.\n\n Previous name of the rule. Required for rule renaming. # noqa: E501\n\n :param previous_name: The previous_name of this ApiAlertProfile. # noqa: E501\n :type previous_name: str\... | Sets the previous_name of this ApiAlertProfile.
Previous name of the rule. Required for rule renaming. # noqa: E501
:param previous_name: The previous_name of this ApiAlertProfile. # noqa: E501
:type previous_name: str | openapi_client/models/api_alert_profile.py | previous_name | hi-artem/twistlock-py | 0 | python | @previous_name.setter
def previous_name(self, previous_name):
'Sets the previous_name of this ApiAlertProfile.\n\n Previous name of the rule. Required for rule renaming. # noqa: E501\n\n :param previous_name: The previous_name of this ApiAlertProfile. # noqa: E501\n :type previous_name: str\... | @previous_name.setter
def previous_name(self, previous_name):
'Sets the previous_name of this ApiAlertProfile.\n\n Previous name of the rule. Required for rule renaming. # noqa: E501\n\n :param previous_name: The previous_name of this ApiAlertProfile. # noqa: E501\n :type previous_name: str\... |
f77d159f6d63fe468e79a8922e386e7b58d56df36dde3d2547c8403f1be5886f | @property
def security_advisor(self):
'Gets the security_advisor of this ApiAlertProfile. # noqa: E501\n\n\n :return: The security_advisor of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileSecurityAdvisor\n '
return self._security_advisor | Gets the security_advisor of this ApiAlertProfile. # noqa: E501
:return: The security_advisor of this ApiAlertProfile. # noqa: E501
:rtype: ApiAlertProfileSecurityAdvisor | openapi_client/models/api_alert_profile.py | security_advisor | hi-artem/twistlock-py | 0 | python | @property
def security_advisor(self):
'Gets the security_advisor of this ApiAlertProfile. # noqa: E501\n\n\n :return: The security_advisor of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileSecurityAdvisor\n '
return self._security_advisor | @property
def security_advisor(self):
'Gets the security_advisor of this ApiAlertProfile. # noqa: E501\n\n\n :return: The security_advisor of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileSecurityAdvisor\n '
return self._security_advisor<|docstring|>Gets the security_advisor... |
61b0dd38c49b450d6693e40755287f39b777ffb6a314f05e8c66dbb3b7f3dc82 | @security_advisor.setter
def security_advisor(self, security_advisor):
'Sets the security_advisor of this ApiAlertProfile.\n\n\n :param security_advisor: The security_advisor of this ApiAlertProfile. # noqa: E501\n :type security_advisor: ApiAlertProfileSecurityAdvisor\n '
self._security_a... | Sets the security_advisor of this ApiAlertProfile.
:param security_advisor: The security_advisor of this ApiAlertProfile. # noqa: E501
:type security_advisor: ApiAlertProfileSecurityAdvisor | openapi_client/models/api_alert_profile.py | security_advisor | hi-artem/twistlock-py | 0 | python | @security_advisor.setter
def security_advisor(self, security_advisor):
'Sets the security_advisor of this ApiAlertProfile.\n\n\n :param security_advisor: The security_advisor of this ApiAlertProfile. # noqa: E501\n :type security_advisor: ApiAlertProfileSecurityAdvisor\n '
self._security_a... | @security_advisor.setter
def security_advisor(self, security_advisor):
'Sets the security_advisor of this ApiAlertProfile.\n\n\n :param security_advisor: The security_advisor of this ApiAlertProfile. # noqa: E501\n :type security_advisor: ApiAlertProfileSecurityAdvisor\n '
self._security_a... |
daf24576943c28b2385042b3502ae9ae950697063d98106d0de5418aea62a839 | @property
def security_center(self):
'Gets the security_center of this ApiAlertProfile. # noqa: E501\n\n\n :return: The security_center of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileSecurityCenterSettings\n '
return self._security_center | Gets the security_center of this ApiAlertProfile. # noqa: E501
:return: The security_center of this ApiAlertProfile. # noqa: E501
:rtype: ApiAlertProfileSecurityCenterSettings | openapi_client/models/api_alert_profile.py | security_center | hi-artem/twistlock-py | 0 | python | @property
def security_center(self):
'Gets the security_center of this ApiAlertProfile. # noqa: E501\n\n\n :return: The security_center of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileSecurityCenterSettings\n '
return self._security_center | @property
def security_center(self):
'Gets the security_center of this ApiAlertProfile. # noqa: E501\n\n\n :return: The security_center of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileSecurityCenterSettings\n '
return self._security_center<|docstring|>Gets the security_cent... |
a3cac6a1d7b8c3dd79ccb01102fe233c35720971bebed0db74296f94126f6e35 | @security_center.setter
def security_center(self, security_center):
'Sets the security_center of this ApiAlertProfile.\n\n\n :param security_center: The security_center of this ApiAlertProfile. # noqa: E501\n :type security_center: ApiAlertProfileSecurityCenterSettings\n '
self._security_c... | Sets the security_center of this ApiAlertProfile.
:param security_center: The security_center of this ApiAlertProfile. # noqa: E501
:type security_center: ApiAlertProfileSecurityCenterSettings | openapi_client/models/api_alert_profile.py | security_center | hi-artem/twistlock-py | 0 | python | @security_center.setter
def security_center(self, security_center):
'Sets the security_center of this ApiAlertProfile.\n\n\n :param security_center: The security_center of this ApiAlertProfile. # noqa: E501\n :type security_center: ApiAlertProfileSecurityCenterSettings\n '
self._security_c... | @security_center.setter
def security_center(self, security_center):
'Sets the security_center of this ApiAlertProfile.\n\n\n :param security_center: The security_center of this ApiAlertProfile. # noqa: E501\n :type security_center: ApiAlertProfileSecurityCenterSettings\n '
self._security_c... |
737a111b74e6ddf034d9cef604c69c3d2cf181a571c0f238b895bad3ec5f7ad9 | @property
def security_hub(self):
'Gets the security_hub of this ApiAlertProfile. # noqa: E501\n\n\n :return: The security_hub of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileSecurityHubSettings\n '
return self._security_hub | Gets the security_hub of this ApiAlertProfile. # noqa: E501
:return: The security_hub of this ApiAlertProfile. # noqa: E501
:rtype: ApiAlertProfileSecurityHubSettings | openapi_client/models/api_alert_profile.py | security_hub | hi-artem/twistlock-py | 0 | python | @property
def security_hub(self):
'Gets the security_hub of this ApiAlertProfile. # noqa: E501\n\n\n :return: The security_hub of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileSecurityHubSettings\n '
return self._security_hub | @property
def security_hub(self):
'Gets the security_hub of this ApiAlertProfile. # noqa: E501\n\n\n :return: The security_hub of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileSecurityHubSettings\n '
return self._security_hub<|docstring|>Gets the security_hub of this ApiAler... |
ea4baa755f4ae6600abd402bb97b2aa85b1a43b9c2449bf51241e8e1b36315bf | @security_hub.setter
def security_hub(self, security_hub):
'Sets the security_hub of this ApiAlertProfile.\n\n\n :param security_hub: The security_hub of this ApiAlertProfile. # noqa: E501\n :type security_hub: ApiAlertProfileSecurityHubSettings\n '
self._security_hub = security_hub | Sets the security_hub of this ApiAlertProfile.
:param security_hub: The security_hub of this ApiAlertProfile. # noqa: E501
:type security_hub: ApiAlertProfileSecurityHubSettings | openapi_client/models/api_alert_profile.py | security_hub | hi-artem/twistlock-py | 0 | python | @security_hub.setter
def security_hub(self, security_hub):
'Sets the security_hub of this ApiAlertProfile.\n\n\n :param security_hub: The security_hub of this ApiAlertProfile. # noqa: E501\n :type security_hub: ApiAlertProfileSecurityHubSettings\n '
self._security_hub = security_hub | @security_hub.setter
def security_hub(self, security_hub):
'Sets the security_hub of this ApiAlertProfile.\n\n\n :param security_hub: The security_hub of this ApiAlertProfile. # noqa: E501\n :type security_hub: ApiAlertProfileSecurityHubSettings\n '
self._security_hub = security_hub<|docst... |
0dcb3d02c00835fe1ccf5d0668b96a78eeb4466cbfec0902aac92c13f197093b | @property
def service_now(self):
'Gets the service_now of this ApiAlertProfile. # noqa: E501\n\n\n :return: The service_now of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileServiceNowSettings\n '
return self._service_now | Gets the service_now of this ApiAlertProfile. # noqa: E501
:return: The service_now of this ApiAlertProfile. # noqa: E501
:rtype: ApiAlertProfileServiceNowSettings | openapi_client/models/api_alert_profile.py | service_now | hi-artem/twistlock-py | 0 | python | @property
def service_now(self):
'Gets the service_now of this ApiAlertProfile. # noqa: E501\n\n\n :return: The service_now of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileServiceNowSettings\n '
return self._service_now | @property
def service_now(self):
'Gets the service_now of this ApiAlertProfile. # noqa: E501\n\n\n :return: The service_now of this ApiAlertProfile. # noqa: E501\n :rtype: ApiAlertProfileServiceNowSettings\n '
return self._service_now<|docstring|>Gets the service_now of this ApiAlertProfi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.