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
ed8b85ec566fd970aff61eb6cb56d8199434fc92c32d63cfd0fe64844c09d692
def delete_docker_worker_registry_entry_by_id(self, worker_id, **kwargs): 'delete_docker_worker_registry_entry_by_id # noqa: E501\n\n Deletes a worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_docker_worker_registry_entry_by_id(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) else: data = self.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) return data
delete_docker_worker_registry_entry_by_id # noqa: E501 Deletes a worker registry entry by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_docker_worker_registry_entry_by_id(worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
delete_docker_worker_registry_entry_by_id
dczifra/lightly
1
python
def delete_docker_worker_registry_entry_by_id(self, worker_id, **kwargs): 'delete_docker_worker_registry_entry_by_id # noqa: E501\n\n Deletes a worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_docker_worker_registry_entry_by_id(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) else: data = self.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) return data
def delete_docker_worker_registry_entry_by_id(self, worker_id, **kwargs): 'delete_docker_worker_registry_entry_by_id # noqa: E501\n\n Deletes a worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_docker_worker_registry_entry_by_id(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) else: data = self.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) return data<|docstring|>delete_docker_worker_registry_entry_by_id # noqa: E501 Deletes a worker registry entry by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_docker_worker_registry_entry_by_id(worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
543559163c1e6058cd144b9b41477c54bd2b0473cf1276ae50bc702f8a18fc9e
def delete_docker_worker_registry_entry_by_id_with_http_info(self, worker_id, **kwargs): 'delete_docker_worker_registry_entry_by_id # noqa: E501\n\n Deletes a worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['worker_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method delete_docker_worker_registry_entry_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `delete_docker_worker_registry_entry_by_id`') collection_formats = {} path_params = {} if ('worker_id' in params): path_params['workerId'] = params['worker_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/{workerId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
delete_docker_worker_registry_entry_by_id # noqa: E501 Deletes a worker registry entry by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
delete_docker_worker_registry_entry_by_id_with_http_info
dczifra/lightly
1
python
def delete_docker_worker_registry_entry_by_id_with_http_info(self, worker_id, **kwargs): 'delete_docker_worker_registry_entry_by_id # noqa: E501\n\n Deletes a worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['worker_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method delete_docker_worker_registry_entry_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `delete_docker_worker_registry_entry_by_id`') collection_formats = {} path_params = {} if ('worker_id' in params): path_params['workerId'] = params['worker_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/{workerId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def delete_docker_worker_registry_entry_by_id_with_http_info(self, worker_id, **kwargs): 'delete_docker_worker_registry_entry_by_id # noqa: E501\n\n Deletes a worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['worker_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method delete_docker_worker_registry_entry_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `delete_docker_worker_registry_entry_by_id`') collection_formats = {} path_params = {} if ('worker_id' in params): path_params['workerId'] = params['worker_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/{workerId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>delete_docker_worker_registry_entry_by_id # noqa: E501 Deletes a worker registry entry by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_docker_worker_registry_entry_by_id_with_http_info(worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
8c9974edcce3f36e877201cd022b104e7d1a5f81b8a30f35db3e19b903b05e32
def get_docker_license_information(self, **kwargs): 'get_docker_license_information # noqa: E501\n\n Requests license information to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_license_information(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: DockerLicenseInformation\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_license_information_with_http_info(**kwargs) else: data = self.get_docker_license_information_with_http_info(**kwargs) return data
get_docker_license_information # noqa: E501 Requests license information to run the container. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_license_information(async_req=True) >>> result = thread.get() :param async_req bool :return: DockerLicenseInformation If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_license_information
dczifra/lightly
1
python
def get_docker_license_information(self, **kwargs): 'get_docker_license_information # noqa: E501\n\n Requests license information to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_license_information(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: DockerLicenseInformation\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_license_information_with_http_info(**kwargs) else: data = self.get_docker_license_information_with_http_info(**kwargs) return data
def get_docker_license_information(self, **kwargs): 'get_docker_license_information # noqa: E501\n\n Requests license information to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_license_information(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: DockerLicenseInformation\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_license_information_with_http_info(**kwargs) else: data = self.get_docker_license_information_with_http_info(**kwargs) return data<|docstring|>get_docker_license_information # noqa: E501 Requests license information to run the container. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_license_information(async_req=True) >>> result = thread.get() :param async_req bool :return: DockerLicenseInformation If the method is called asynchronously, returns the request thread.<|endoftext|>
616d18cc18d142ff04065582da498f59bf7a46d534d7560fc07507374306c500
def get_docker_license_information_with_http_info(self, **kwargs): 'get_docker_license_information # noqa: E501\n\n Requests license information to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_license_information_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: DockerLicenseInformation\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_license_information" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/licenseInformation', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerLicenseInformation', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_license_information # noqa: E501 Requests license information to run the container. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_license_information_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: DockerLicenseInformation If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_license_information_with_http_info
dczifra/lightly
1
python
def get_docker_license_information_with_http_info(self, **kwargs): 'get_docker_license_information # noqa: E501\n\n Requests license information to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_license_information_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: DockerLicenseInformation\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_license_information" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/licenseInformation', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerLicenseInformation', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_license_information_with_http_info(self, **kwargs): 'get_docker_license_information # noqa: E501\n\n Requests license information to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_license_information_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: DockerLicenseInformation\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_license_information" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/licenseInformation', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerLicenseInformation', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_license_information # noqa: E501 Requests license information to run the container. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_license_information_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: DockerLicenseInformation If the method is called asynchronously, returns the request thread.<|endoftext|>
c88f20dfc98f53d2e69364994afca90d3d3ca51ba849c6398005e9d1c8a6d3ae
def get_docker_run_by_id(self, run_id, **kwargs): 'get_docker_run_by_id # noqa: E501\n\n Gets a docker run by docker run id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_by_id(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: DockerRunData\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_run_by_id_with_http_info(run_id, **kwargs) else: data = self.get_docker_run_by_id_with_http_info(run_id, **kwargs) return data
get_docker_run_by_id # noqa: E501 Gets a docker run by docker run id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_by_id(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: DockerRunData If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_run_by_id
dczifra/lightly
1
python
def get_docker_run_by_id(self, run_id, **kwargs): 'get_docker_run_by_id # noqa: E501\n\n Gets a docker run by docker run id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_by_id(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: DockerRunData\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_run_by_id_with_http_info(run_id, **kwargs) else: data = self.get_docker_run_by_id_with_http_info(run_id, **kwargs) return data
def get_docker_run_by_id(self, run_id, **kwargs): 'get_docker_run_by_id # noqa: E501\n\n Gets a docker run by docker run id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_by_id(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: DockerRunData\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_run_by_id_with_http_info(run_id, **kwargs) else: data = self.get_docker_run_by_id_with_http_info(run_id, **kwargs) return data<|docstring|>get_docker_run_by_id # noqa: E501 Gets a docker run by docker run id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_by_id(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: DockerRunData If the method is called asynchronously, returns the request thread.<|endoftext|>
30d058189af1f013c81c506ea356a1ad4ac27b802b033fa3d505a6f9788a5d9c
def get_docker_run_by_id_with_http_info(self, run_id, **kwargs): 'get_docker_run_by_id # noqa: E501\n\n Gets a docker run by docker run id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_by_id_with_http_info(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: DockerRunData\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_run_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `get_docker_run_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerRunData', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_run_by_id # noqa: E501 Gets a docker run by docker run id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_by_id_with_http_info(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: DockerRunData If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_run_by_id_with_http_info
dczifra/lightly
1
python
def get_docker_run_by_id_with_http_info(self, run_id, **kwargs): 'get_docker_run_by_id # noqa: E501\n\n Gets a docker run by docker run id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_by_id_with_http_info(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: DockerRunData\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_run_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `get_docker_run_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerRunData', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_run_by_id_with_http_info(self, run_id, **kwargs): 'get_docker_run_by_id # noqa: E501\n\n Gets a docker run by docker run id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_by_id_with_http_info(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: DockerRunData\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_run_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `get_docker_run_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerRunData', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_run_by_id # noqa: E501 Gets a docker run by docker run id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_by_id_with_http_info(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: DockerRunData If the method is called asynchronously, returns the request thread.<|endoftext|>
35b4b799efb38734d7b73e98b6b72708f319cad755cb189c9043322c860d5f07
def get_docker_run_report_read_url_by_id(self, run_id, **kwargs): 'get_docker_run_report_read_url_by_id # noqa: E501\n\n Get the url of a specific docker runs report # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_read_url_by_id(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_run_report_read_url_by_id_with_http_info(run_id, **kwargs) else: data = self.get_docker_run_report_read_url_by_id_with_http_info(run_id, **kwargs) return data
get_docker_run_report_read_url_by_id # noqa: E501 Get the url of a specific docker runs report # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_report_read_url_by_id(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: str If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_run_report_read_url_by_id
dczifra/lightly
1
python
def get_docker_run_report_read_url_by_id(self, run_id, **kwargs): 'get_docker_run_report_read_url_by_id # noqa: E501\n\n Get the url of a specific docker runs report # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_read_url_by_id(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_run_report_read_url_by_id_with_http_info(run_id, **kwargs) else: data = self.get_docker_run_report_read_url_by_id_with_http_info(run_id, **kwargs) return data
def get_docker_run_report_read_url_by_id(self, run_id, **kwargs): 'get_docker_run_report_read_url_by_id # noqa: E501\n\n Get the url of a specific docker runs report # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_read_url_by_id(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_run_report_read_url_by_id_with_http_info(run_id, **kwargs) else: data = self.get_docker_run_report_read_url_by_id_with_http_info(run_id, **kwargs) return data<|docstring|>get_docker_run_report_read_url_by_id # noqa: E501 Get the url of a specific docker runs report # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_report_read_url_by_id(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: str If the method is called asynchronously, returns the request thread.<|endoftext|>
14ec8d382df1ef173d05588c8c705616cd567a4c2a9c3d2a1d1fbade2218a811
def get_docker_run_report_read_url_by_id_with_http_info(self, run_id, **kwargs): 'get_docker_run_report_read_url_by_id # noqa: E501\n\n Get the url of a specific docker runs report # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_read_url_by_id_with_http_info(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_run_report_read_url_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `get_docker_run_report_read_url_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}/readReportUrl', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_run_report_read_url_by_id # noqa: E501 Get the url of a specific docker runs report # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_report_read_url_by_id_with_http_info(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: str If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_run_report_read_url_by_id_with_http_info
dczifra/lightly
1
python
def get_docker_run_report_read_url_by_id_with_http_info(self, run_id, **kwargs): 'get_docker_run_report_read_url_by_id # noqa: E501\n\n Get the url of a specific docker runs report # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_read_url_by_id_with_http_info(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_run_report_read_url_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `get_docker_run_report_read_url_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}/readReportUrl', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_run_report_read_url_by_id_with_http_info(self, run_id, **kwargs): 'get_docker_run_report_read_url_by_id # noqa: E501\n\n Get the url of a specific docker runs report # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_read_url_by_id_with_http_info(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_run_report_read_url_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `get_docker_run_report_read_url_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}/readReportUrl', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_run_report_read_url_by_id # noqa: E501 Get the url of a specific docker runs report # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_report_read_url_by_id_with_http_info(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: str If the method is called asynchronously, returns the request thread.<|endoftext|>
880ffc92dc3c525412911bae96447eb67214ab8b277944f8f547df622176c2d4
def get_docker_run_report_write_url_by_id(self, run_id, **kwargs): 'get_docker_run_report_write_url_by_id # noqa: E501\n\n Get the signed url to upload a report of a docker run # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_write_url_by_id(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_run_report_write_url_by_id_with_http_info(run_id, **kwargs) else: data = self.get_docker_run_report_write_url_by_id_with_http_info(run_id, **kwargs) return data
get_docker_run_report_write_url_by_id # noqa: E501 Get the signed url to upload a report of a docker run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_report_write_url_by_id(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: str If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_run_report_write_url_by_id
dczifra/lightly
1
python
def get_docker_run_report_write_url_by_id(self, run_id, **kwargs): 'get_docker_run_report_write_url_by_id # noqa: E501\n\n Get the signed url to upload a report of a docker run # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_write_url_by_id(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_run_report_write_url_by_id_with_http_info(run_id, **kwargs) else: data = self.get_docker_run_report_write_url_by_id_with_http_info(run_id, **kwargs) return data
def get_docker_run_report_write_url_by_id(self, run_id, **kwargs): 'get_docker_run_report_write_url_by_id # noqa: E501\n\n Get the signed url to upload a report of a docker run # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_write_url_by_id(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_run_report_write_url_by_id_with_http_info(run_id, **kwargs) else: data = self.get_docker_run_report_write_url_by_id_with_http_info(run_id, **kwargs) return data<|docstring|>get_docker_run_report_write_url_by_id # noqa: E501 Get the signed url to upload a report of a docker run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_report_write_url_by_id(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: str If the method is called asynchronously, returns the request thread.<|endoftext|>
1c192f9a8ed6a097f93e1b20ea4bae62f64b5198efeadef626312df216c1a746
def get_docker_run_report_write_url_by_id_with_http_info(self, run_id, **kwargs): 'get_docker_run_report_write_url_by_id # noqa: E501\n\n Get the signed url to upload a report of a docker run # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_write_url_by_id_with_http_info(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_run_report_write_url_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `get_docker_run_report_write_url_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}/writeReportUrl', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_run_report_write_url_by_id # noqa: E501 Get the signed url to upload a report of a docker run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_report_write_url_by_id_with_http_info(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: str If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_run_report_write_url_by_id_with_http_info
dczifra/lightly
1
python
def get_docker_run_report_write_url_by_id_with_http_info(self, run_id, **kwargs): 'get_docker_run_report_write_url_by_id # noqa: E501\n\n Get the signed url to upload a report of a docker run # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_write_url_by_id_with_http_info(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_run_report_write_url_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `get_docker_run_report_write_url_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}/writeReportUrl', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_run_report_write_url_by_id_with_http_info(self, run_id, **kwargs): 'get_docker_run_report_write_url_by_id # noqa: E501\n\n Get the signed url to upload a report of a docker run # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_run_report_write_url_by_id_with_http_info(run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: str\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_run_report_write_url_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `get_docker_run_report_write_url_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}/writeReportUrl', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_run_report_write_url_by_id # noqa: E501 Get the signed url to upload a report of a docker run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_run_report_write_url_by_id_with_http_info(run_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID run_id: ObjectId of the docker run (required) :return: str If the method is called asynchronously, returns the request thread.<|endoftext|>
c909f9b08ff933a67104ceab04e291ec5f35ab33a609dbe5aff8b9bb56253e8b
def get_docker_runs(self, **kwargs): 'get_docker_runs # noqa: E501\n\n Gets all docker runs for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerRunData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_runs_with_http_info(**kwargs) else: data = self.get_docker_runs_with_http_info(**kwargs) return data
get_docker_runs # noqa: E501 Gets all docker runs for a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerRunData] If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_runs
dczifra/lightly
1
python
def get_docker_runs(self, **kwargs): 'get_docker_runs # noqa: E501\n\n Gets all docker runs for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerRunData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_runs_with_http_info(**kwargs) else: data = self.get_docker_runs_with_http_info(**kwargs) return data
def get_docker_runs(self, **kwargs): 'get_docker_runs # noqa: E501\n\n Gets all docker runs for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerRunData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_runs_with_http_info(**kwargs) else: data = self.get_docker_runs_with_http_info(**kwargs) return data<|docstring|>get_docker_runs # noqa: E501 Gets all docker runs for a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerRunData] If the method is called asynchronously, returns the request thread.<|endoftext|>
eb316e625fa052e2afffd8c487a733c4bce65f373d15e93cff850e7a1e3e0376
def get_docker_runs_with_http_info(self, **kwargs): 'get_docker_runs # noqa: E501\n\n Gets all docker runs for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerRunData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_runs" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerRunData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_runs # noqa: E501 Gets all docker runs for a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerRunData] If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_runs_with_http_info
dczifra/lightly
1
python
def get_docker_runs_with_http_info(self, **kwargs): 'get_docker_runs # noqa: E501\n\n Gets all docker runs for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerRunData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_runs" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerRunData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_runs_with_http_info(self, **kwargs): 'get_docker_runs # noqa: E501\n\n Gets all docker runs for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerRunData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_runs" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerRunData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_runs # noqa: E501 Gets all docker runs for a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerRunData] If the method is called asynchronously, returns the request thread.<|endoftext|>
5c5c3ec325dbeccf32376a5b1232bd84f64577fc1c7ff3e978e30a15c0a45283
def get_docker_runs_scheduled_by_dataset_id(self, dataset_id, **kwargs): 'get_docker_runs_scheduled_by_dataset_id # noqa: E501\n\n Get all scheduled docker runs by dataset id which have not finished (not DONE or CANCLED). # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_dataset_id(dataset_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, **kwargs) else: data = self.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, **kwargs) return data
get_docker_runs_scheduled_by_dataset_id # noqa: E501 Get all scheduled docker runs by dataset id which have not finished (not DONE or CANCLED). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs_scheduled_by_dataset_id(dataset_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID dataset_id: ObjectId of the dataset (required) :return: list[DockerRunScheduledData] If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_runs_scheduled_by_dataset_id
dczifra/lightly
1
python
def get_docker_runs_scheduled_by_dataset_id(self, dataset_id, **kwargs): 'get_docker_runs_scheduled_by_dataset_id # noqa: E501\n\n Get all scheduled docker runs by dataset id which have not finished (not DONE or CANCLED). # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_dataset_id(dataset_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, **kwargs) else: data = self.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, **kwargs) return data
def get_docker_runs_scheduled_by_dataset_id(self, dataset_id, **kwargs): 'get_docker_runs_scheduled_by_dataset_id # noqa: E501\n\n Get all scheduled docker runs by dataset id which have not finished (not DONE or CANCLED). # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_dataset_id(dataset_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, **kwargs) else: data = self.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, **kwargs) return data<|docstring|>get_docker_runs_scheduled_by_dataset_id # noqa: E501 Get all scheduled docker runs by dataset id which have not finished (not DONE or CANCLED). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs_scheduled_by_dataset_id(dataset_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID dataset_id: ObjectId of the dataset (required) :return: list[DockerRunScheduledData] If the method is called asynchronously, returns the request thread.<|endoftext|>
e368936d00af27cbdb11f1941af925781d1cf4323110296589c493a359d5a69c
def get_docker_runs_scheduled_by_dataset_id_with_http_info(self, dataset_id, **kwargs): 'get_docker_runs_scheduled_by_dataset_id # noqa: E501\n\n Get all scheduled docker runs by dataset id which have not finished (not DONE or CANCLED). # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['dataset_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_runs_scheduled_by_dataset_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('dataset_id' not in params) or (params['dataset_id'] is None))): raise ValueError('Missing the required parameter `dataset_id` when calling `get_docker_runs_scheduled_by_dataset_id`') collection_formats = {} path_params = {} if ('dataset_id' in params): path_params['datasetId'] = params['dataset_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/datasets/{datasetId}/docker/worker/schedule', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerRunScheduledData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_runs_scheduled_by_dataset_id # noqa: E501 Get all scheduled docker runs by dataset id which have not finished (not DONE or CANCLED). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID dataset_id: ObjectId of the dataset (required) :return: list[DockerRunScheduledData] If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_runs_scheduled_by_dataset_id_with_http_info
dczifra/lightly
1
python
def get_docker_runs_scheduled_by_dataset_id_with_http_info(self, dataset_id, **kwargs): 'get_docker_runs_scheduled_by_dataset_id # noqa: E501\n\n Get all scheduled docker runs by dataset id which have not finished (not DONE or CANCLED). # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['dataset_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_runs_scheduled_by_dataset_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('dataset_id' not in params) or (params['dataset_id'] is None))): raise ValueError('Missing the required parameter `dataset_id` when calling `get_docker_runs_scheduled_by_dataset_id`') collection_formats = {} path_params = {} if ('dataset_id' in params): path_params['datasetId'] = params['dataset_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/datasets/{datasetId}/docker/worker/schedule', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerRunScheduledData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_runs_scheduled_by_dataset_id_with_http_info(self, dataset_id, **kwargs): 'get_docker_runs_scheduled_by_dataset_id # noqa: E501\n\n Get all scheduled docker runs by dataset id which have not finished (not DONE or CANCLED). # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['dataset_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_runs_scheduled_by_dataset_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('dataset_id' not in params) or (params['dataset_id'] is None))): raise ValueError('Missing the required parameter `dataset_id` when calling `get_docker_runs_scheduled_by_dataset_id`') collection_formats = {} path_params = {} if ('dataset_id' in params): path_params['datasetId'] = params['dataset_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/datasets/{datasetId}/docker/worker/schedule', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerRunScheduledData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_runs_scheduled_by_dataset_id # noqa: E501 Get all scheduled docker runs by dataset id which have not finished (not DONE or CANCLED). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs_scheduled_by_dataset_id_with_http_info(dataset_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID dataset_id: ObjectId of the dataset (required) :return: list[DockerRunScheduledData] If the method is called asynchronously, returns the request thread.<|endoftext|>
51760fc6a4b5b31c000482ffda921e6cf06eba307b366a07608a4bd095ad9cd1
def get_docker_runs_scheduled_by_state(self, **kwargs): 'get_docker_runs_scheduled_by_state # noqa: E501\n\n Get all scheduled docker runs of the user with the specified state. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_state(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledState state:\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_runs_scheduled_by_state_with_http_info(**kwargs) else: data = self.get_docker_runs_scheduled_by_state_with_http_info(**kwargs) return data
get_docker_runs_scheduled_by_state # noqa: E501 Get all scheduled docker runs of the user with the specified state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs_scheduled_by_state(async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunScheduledState state: :return: list[DockerRunScheduledData] If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_runs_scheduled_by_state
dczifra/lightly
1
python
def get_docker_runs_scheduled_by_state(self, **kwargs): 'get_docker_runs_scheduled_by_state # noqa: E501\n\n Get all scheduled docker runs of the user with the specified state. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_state(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledState state:\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_runs_scheduled_by_state_with_http_info(**kwargs) else: data = self.get_docker_runs_scheduled_by_state_with_http_info(**kwargs) return data
def get_docker_runs_scheduled_by_state(self, **kwargs): 'get_docker_runs_scheduled_by_state # noqa: E501\n\n Get all scheduled docker runs of the user with the specified state. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_state(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledState state:\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_runs_scheduled_by_state_with_http_info(**kwargs) else: data = self.get_docker_runs_scheduled_by_state_with_http_info(**kwargs) return data<|docstring|>get_docker_runs_scheduled_by_state # noqa: E501 Get all scheduled docker runs of the user with the specified state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs_scheduled_by_state(async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunScheduledState state: :return: list[DockerRunScheduledData] If the method is called asynchronously, returns the request thread.<|endoftext|>
dcaefc272fd78ab9b48313cb8e66c79891d24650f36e3db5420fd491767f953c
def get_docker_runs_scheduled_by_state_with_http_info(self, **kwargs): 'get_docker_runs_scheduled_by_state # noqa: E501\n\n Get all scheduled docker runs of the user with the specified state. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_state_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledState state:\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['state'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_runs_scheduled_by_state" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if ('state' in params): query_params.append(('state', params['state'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/schedule', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerRunScheduledData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_runs_scheduled_by_state # noqa: E501 Get all scheduled docker runs of the user with the specified state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs_scheduled_by_state_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunScheduledState state: :return: list[DockerRunScheduledData] If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_runs_scheduled_by_state_with_http_info
dczifra/lightly
1
python
def get_docker_runs_scheduled_by_state_with_http_info(self, **kwargs): 'get_docker_runs_scheduled_by_state # noqa: E501\n\n Get all scheduled docker runs of the user with the specified state. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_state_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledState state:\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['state'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_runs_scheduled_by_state" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if ('state' in params): query_params.append(('state', params['state'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/schedule', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerRunScheduledData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_runs_scheduled_by_state_with_http_info(self, **kwargs): 'get_docker_runs_scheduled_by_state # noqa: E501\n\n Get all scheduled docker runs of the user with the specified state. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_runs_scheduled_by_state_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledState state:\n :return: list[DockerRunScheduledData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['state'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_runs_scheduled_by_state" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if ('state' in params): query_params.append(('state', params['state'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/schedule', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerRunScheduledData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_runs_scheduled_by_state # noqa: E501 Get all scheduled docker runs of the user with the specified state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_runs_scheduled_by_state_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunScheduledState state: :return: list[DockerRunScheduledData] If the method is called asynchronously, returns the request thread.<|endoftext|>
7489d5e2358f2ee8cec09c7805d5d1e195365bb4170d5da04de0b3b3fd84ddff
def get_docker_worker_config_by_id(self, config_id, **kwargs): 'get_docker_worker_config_by_id # noqa: E501\n\n Gets a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_config_by_id(config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: DockerWorkerConfigData\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_config_by_id_with_http_info(config_id, **kwargs) else: data = self.get_docker_worker_config_by_id_with_http_info(config_id, **kwargs) return data
get_docker_worker_config_by_id # noqa: E501 Gets a docker worker configuration by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_config_by_id(config_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID config_id: ObjectId of the docker worker config (required) :return: DockerWorkerConfigData If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_worker_config_by_id
dczifra/lightly
1
python
def get_docker_worker_config_by_id(self, config_id, **kwargs): 'get_docker_worker_config_by_id # noqa: E501\n\n Gets a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_config_by_id(config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: DockerWorkerConfigData\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_config_by_id_with_http_info(config_id, **kwargs) else: data = self.get_docker_worker_config_by_id_with_http_info(config_id, **kwargs) return data
def get_docker_worker_config_by_id(self, config_id, **kwargs): 'get_docker_worker_config_by_id # noqa: E501\n\n Gets a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_config_by_id(config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: DockerWorkerConfigData\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_config_by_id_with_http_info(config_id, **kwargs) else: data = self.get_docker_worker_config_by_id_with_http_info(config_id, **kwargs) return data<|docstring|>get_docker_worker_config_by_id # noqa: E501 Gets a docker worker configuration by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_config_by_id(config_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID config_id: ObjectId of the docker worker config (required) :return: DockerWorkerConfigData If the method is called asynchronously, returns the request thread.<|endoftext|>
421027090e6813afce6b6fc2f5c40834bd00655d40263ce689bf069e5a23da22
def get_docker_worker_config_by_id_with_http_info(self, config_id, **kwargs): 'get_docker_worker_config_by_id # noqa: E501\n\n Gets a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_config_by_id_with_http_info(config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: DockerWorkerConfigData\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['config_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_config_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('config_id' not in params) or (params['config_id'] is None))): raise ValueError('Missing the required parameter `config_id` when calling `get_docker_worker_config_by_id`') collection_formats = {} path_params = {} if ('config_id' in params): path_params['configId'] = params['config_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/config/{configId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerWorkerConfigData', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_worker_config_by_id # noqa: E501 Gets a docker worker configuration by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_config_by_id_with_http_info(config_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID config_id: ObjectId of the docker worker config (required) :return: DockerWorkerConfigData If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_worker_config_by_id_with_http_info
dczifra/lightly
1
python
def get_docker_worker_config_by_id_with_http_info(self, config_id, **kwargs): 'get_docker_worker_config_by_id # noqa: E501\n\n Gets a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_config_by_id_with_http_info(config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: DockerWorkerConfigData\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['config_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_config_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('config_id' not in params) or (params['config_id'] is None))): raise ValueError('Missing the required parameter `config_id` when calling `get_docker_worker_config_by_id`') collection_formats = {} path_params = {} if ('config_id' in params): path_params['configId'] = params['config_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/config/{configId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerWorkerConfigData', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_worker_config_by_id_with_http_info(self, config_id, **kwargs): 'get_docker_worker_config_by_id # noqa: E501\n\n Gets a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_config_by_id_with_http_info(config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: DockerWorkerConfigData\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['config_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_config_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('config_id' not in params) or (params['config_id'] is None))): raise ValueError('Missing the required parameter `config_id` when calling `get_docker_worker_config_by_id`') collection_formats = {} path_params = {} if ('config_id' in params): path_params['configId'] = params['config_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/config/{configId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerWorkerConfigData', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_worker_config_by_id # noqa: E501 Gets a docker worker configuration by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_config_by_id_with_http_info(config_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID config_id: ObjectId of the docker worker config (required) :return: DockerWorkerConfigData If the method is called asynchronously, returns the request thread.<|endoftext|>
872ce7356c09e4d614b7fa90b4ce385a7cb725ce55d464330115f4681e590484
def get_docker_worker_configs(self, **kwargs): 'get_docker_worker_configs # noqa: E501\n\n Get docker worker configurations. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_configs(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerConfigData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_configs_with_http_info(**kwargs) else: data = self.get_docker_worker_configs_with_http_info(**kwargs) return data
get_docker_worker_configs # noqa: E501 Get docker worker configurations. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_configs(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerWorkerConfigData] If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_worker_configs
dczifra/lightly
1
python
def get_docker_worker_configs(self, **kwargs): 'get_docker_worker_configs # noqa: E501\n\n Get docker worker configurations. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_configs(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerConfigData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_configs_with_http_info(**kwargs) else: data = self.get_docker_worker_configs_with_http_info(**kwargs) return data
def get_docker_worker_configs(self, **kwargs): 'get_docker_worker_configs # noqa: E501\n\n Get docker worker configurations. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_configs(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerConfigData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_configs_with_http_info(**kwargs) else: data = self.get_docker_worker_configs_with_http_info(**kwargs) return data<|docstring|>get_docker_worker_configs # noqa: E501 Get docker worker configurations. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_configs(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerWorkerConfigData] If the method is called asynchronously, returns the request thread.<|endoftext|>
0b8d6748dff9ab7456c3cb50a422df9b99d3c77317e342b93d513b86fc66c86d
def get_docker_worker_configs_with_http_info(self, **kwargs): 'get_docker_worker_configs # noqa: E501\n\n Get docker worker configurations. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_configs_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerConfigData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_configs" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/config', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerWorkerConfigData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_worker_configs # noqa: E501 Get docker worker configurations. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_configs_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerWorkerConfigData] If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_worker_configs_with_http_info
dczifra/lightly
1
python
def get_docker_worker_configs_with_http_info(self, **kwargs): 'get_docker_worker_configs # noqa: E501\n\n Get docker worker configurations. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_configs_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerConfigData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_configs" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/config', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerWorkerConfigData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_worker_configs_with_http_info(self, **kwargs): 'get_docker_worker_configs # noqa: E501\n\n Get docker worker configurations. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_configs_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerConfigData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_configs" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/config', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerWorkerConfigData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_worker_configs # noqa: E501 Get docker worker configurations. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_configs_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerWorkerConfigData] If the method is called asynchronously, returns the request thread.<|endoftext|>
ed87bb41801e46147fa5a72b6bd1e71a0ac688a90d9f5befced0131200320082
def get_docker_worker_registry_entries(self, **kwargs): 'get_docker_worker_registry_entries # noqa: E501\n\n Returns all worker registry entries for a given user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entries(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerRegistryEntryData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_registry_entries_with_http_info(**kwargs) else: data = self.get_docker_worker_registry_entries_with_http_info(**kwargs) return data
get_docker_worker_registry_entries # noqa: E501 Returns all worker registry entries for a given user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_registry_entries(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerWorkerRegistryEntryData] If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_worker_registry_entries
dczifra/lightly
1
python
def get_docker_worker_registry_entries(self, **kwargs): 'get_docker_worker_registry_entries # noqa: E501\n\n Returns all worker registry entries for a given user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entries(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerRegistryEntryData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_registry_entries_with_http_info(**kwargs) else: data = self.get_docker_worker_registry_entries_with_http_info(**kwargs) return data
def get_docker_worker_registry_entries(self, **kwargs): 'get_docker_worker_registry_entries # noqa: E501\n\n Returns all worker registry entries for a given user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entries(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerRegistryEntryData]\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_registry_entries_with_http_info(**kwargs) else: data = self.get_docker_worker_registry_entries_with_http_info(**kwargs) return data<|docstring|>get_docker_worker_registry_entries # noqa: E501 Returns all worker registry entries for a given user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_registry_entries(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerWorkerRegistryEntryData] If the method is called asynchronously, returns the request thread.<|endoftext|>
6cbc3bd28b3ca1d2693a82d879ec92bbc23ac3d206c4954103257c0dc7b343a0
def get_docker_worker_registry_entries_with_http_info(self, **kwargs): 'get_docker_worker_registry_entries # noqa: E501\n\n Returns all worker registry entries for a given user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entries_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerRegistryEntryData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_registry_entries" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerWorkerRegistryEntryData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_worker_registry_entries # noqa: E501 Returns all worker registry entries for a given user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_registry_entries_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerWorkerRegistryEntryData] If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_worker_registry_entries_with_http_info
dczifra/lightly
1
python
def get_docker_worker_registry_entries_with_http_info(self, **kwargs): 'get_docker_worker_registry_entries # noqa: E501\n\n Returns all worker registry entries for a given user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entries_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerRegistryEntryData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_registry_entries" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerWorkerRegistryEntryData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_worker_registry_entries_with_http_info(self, **kwargs): 'get_docker_worker_registry_entries # noqa: E501\n\n Returns all worker registry entries for a given user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entries_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :return: list[DockerWorkerRegistryEntryData]\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_registry_entries" % key)) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DockerWorkerRegistryEntryData]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_worker_registry_entries # noqa: E501 Returns all worker registry entries for a given user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_registry_entries_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[DockerWorkerRegistryEntryData] If the method is called asynchronously, returns the request thread.<|endoftext|>
da3a8052bc3dc4faa9220a176001a3024ca1fb3797b93dc8d0abac58d542033c
def get_docker_worker_registry_entry_by_id(self, worker_id, **kwargs): 'get_docker_worker_registry_entry_by_id # noqa: E501\n\n Returns worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entry_by_id(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: DockerWorkerRegistryEntryData\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) else: data = self.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) return data
get_docker_worker_registry_entry_by_id # noqa: E501 Returns worker registry entry by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_registry_entry_by_id(worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: DockerWorkerRegistryEntryData If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_worker_registry_entry_by_id
dczifra/lightly
1
python
def get_docker_worker_registry_entry_by_id(self, worker_id, **kwargs): 'get_docker_worker_registry_entry_by_id # noqa: E501\n\n Returns worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entry_by_id(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: DockerWorkerRegistryEntryData\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) else: data = self.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) return data
def get_docker_worker_registry_entry_by_id(self, worker_id, **kwargs): 'get_docker_worker_registry_entry_by_id # noqa: E501\n\n Returns worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entry_by_id(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: DockerWorkerRegistryEntryData\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) else: data = self.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, **kwargs) return data<|docstring|>get_docker_worker_registry_entry_by_id # noqa: E501 Returns worker registry entry by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_registry_entry_by_id(worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: DockerWorkerRegistryEntryData If the method is called asynchronously, returns the request thread.<|endoftext|>
c73410e6c8f4eac83aae266f5e4cee73edfb0cb3afcbec03c257303867932043
def get_docker_worker_registry_entry_by_id_with_http_info(self, worker_id, **kwargs): 'get_docker_worker_registry_entry_by_id # noqa: E501\n\n Returns worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: DockerWorkerRegistryEntryData\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['worker_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_registry_entry_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `get_docker_worker_registry_entry_by_id`') collection_formats = {} path_params = {} if ('worker_id' in params): path_params['workerId'] = params['worker_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/{workerId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerWorkerRegistryEntryData', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
get_docker_worker_registry_entry_by_id # noqa: E501 Returns worker registry entry by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: DockerWorkerRegistryEntryData If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
get_docker_worker_registry_entry_by_id_with_http_info
dczifra/lightly
1
python
def get_docker_worker_registry_entry_by_id_with_http_info(self, worker_id, **kwargs): 'get_docker_worker_registry_entry_by_id # noqa: E501\n\n Returns worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: DockerWorkerRegistryEntryData\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['worker_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_registry_entry_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `get_docker_worker_registry_entry_by_id`') collection_formats = {} path_params = {} if ('worker_id' in params): path_params['workerId'] = params['worker_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/{workerId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerWorkerRegistryEntryData', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def get_docker_worker_registry_entry_by_id_with_http_info(self, worker_id, **kwargs): 'get_docker_worker_registry_entry_by_id # noqa: E501\n\n Returns worker registry entry by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: DockerWorkerRegistryEntryData\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['worker_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method get_docker_worker_registry_entry_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `get_docker_worker_registry_entry_by_id`') collection_formats = {} path_params = {} if ('worker_id' in params): path_params['workerId'] = params['worker_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/{workerId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerWorkerRegistryEntryData', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_docker_worker_registry_entry_by_id # noqa: E501 Returns worker registry entry by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_docker_worker_registry_entry_by_id_with_http_info(worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: DockerWorkerRegistryEntryData If the method is called asynchronously, returns the request thread.<|endoftext|>
da72cae49c9a415331abd57921afec02d755ce6288934476138181f33b37534a
def post_docker_authorization_request(self, body, **kwargs): 'post_docker_authorization_request # noqa: E501\n\n Performs an authorization to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_authorization_request(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerAuthorizationRequest body: (required)\n :return: DockerAuthorizationResponse\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.post_docker_authorization_request_with_http_info(body, **kwargs) else: data = self.post_docker_authorization_request_with_http_info(body, **kwargs) return data
post_docker_authorization_request # noqa: E501 Performs an authorization to run the container. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_docker_authorization_request(body, async_req=True) >>> result = thread.get() :param async_req bool :param DockerAuthorizationRequest body: (required) :return: DockerAuthorizationResponse If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
post_docker_authorization_request
dczifra/lightly
1
python
def post_docker_authorization_request(self, body, **kwargs): 'post_docker_authorization_request # noqa: E501\n\n Performs an authorization to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_authorization_request(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerAuthorizationRequest body: (required)\n :return: DockerAuthorizationResponse\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.post_docker_authorization_request_with_http_info(body, **kwargs) else: data = self.post_docker_authorization_request_with_http_info(body, **kwargs) return data
def post_docker_authorization_request(self, body, **kwargs): 'post_docker_authorization_request # noqa: E501\n\n Performs an authorization to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_authorization_request(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerAuthorizationRequest body: (required)\n :return: DockerAuthorizationResponse\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.post_docker_authorization_request_with_http_info(body, **kwargs) else: data = self.post_docker_authorization_request_with_http_info(body, **kwargs) return data<|docstring|>post_docker_authorization_request # noqa: E501 Performs an authorization to run the container. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_docker_authorization_request(body, async_req=True) >>> result = thread.get() :param async_req bool :param DockerAuthorizationRequest body: (required) :return: DockerAuthorizationResponse If the method is called asynchronously, returns the request thread.<|endoftext|>
22fdfabd98c7a46f30b4ccf5ffbcaafaedcd27a1fb2cd76d61b664469c883606
def post_docker_authorization_request_with_http_info(self, body, **kwargs): 'post_docker_authorization_request # noqa: E501\n\n Performs an authorization to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_authorization_request_with_http_info(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerAuthorizationRequest body: (required)\n :return: DockerAuthorizationResponse\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method post_docker_authorization_request" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `post_docker_authorization_request`') collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/authorization', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerAuthorizationResponse', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
post_docker_authorization_request # noqa: E501 Performs an authorization to run the container. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_docker_authorization_request_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param DockerAuthorizationRequest body: (required) :return: DockerAuthorizationResponse If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
post_docker_authorization_request_with_http_info
dczifra/lightly
1
python
def post_docker_authorization_request_with_http_info(self, body, **kwargs): 'post_docker_authorization_request # noqa: E501\n\n Performs an authorization to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_authorization_request_with_http_info(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerAuthorizationRequest body: (required)\n :return: DockerAuthorizationResponse\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method post_docker_authorization_request" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `post_docker_authorization_request`') collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/authorization', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerAuthorizationResponse', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def post_docker_authorization_request_with_http_info(self, body, **kwargs): 'post_docker_authorization_request # noqa: E501\n\n Performs an authorization to run the container. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_authorization_request_with_http_info(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerAuthorizationRequest body: (required)\n :return: DockerAuthorizationResponse\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method post_docker_authorization_request" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `post_docker_authorization_request`') collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/authorization', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DockerAuthorizationResponse', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>post_docker_authorization_request # noqa: E501 Performs an authorization to run the container. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_docker_authorization_request_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param DockerAuthorizationRequest body: (required) :return: DockerAuthorizationResponse If the method is called asynchronously, returns the request thread.<|endoftext|>
2b6841b2cc8cff768276e1b0315c32189f0edf164cc493c35d96ad25e7a6f205
def post_docker_usage_stats(self, body, **kwargs): 'post_docker_usage_stats # noqa: E501\n\n Adds a diagnostic entry of user stats. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_usage_stats(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerUserStats body: (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.post_docker_usage_stats_with_http_info(body, **kwargs) else: data = self.post_docker_usage_stats_with_http_info(body, **kwargs) return data
post_docker_usage_stats # noqa: E501 Adds a diagnostic entry of user stats. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_docker_usage_stats(body, async_req=True) >>> result = thread.get() :param async_req bool :param DockerUserStats body: (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
post_docker_usage_stats
dczifra/lightly
1
python
def post_docker_usage_stats(self, body, **kwargs): 'post_docker_usage_stats # noqa: E501\n\n Adds a diagnostic entry of user stats. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_usage_stats(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerUserStats body: (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.post_docker_usage_stats_with_http_info(body, **kwargs) else: data = self.post_docker_usage_stats_with_http_info(body, **kwargs) return data
def post_docker_usage_stats(self, body, **kwargs): 'post_docker_usage_stats # noqa: E501\n\n Adds a diagnostic entry of user stats. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_usage_stats(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerUserStats body: (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.post_docker_usage_stats_with_http_info(body, **kwargs) else: data = self.post_docker_usage_stats_with_http_info(body, **kwargs) return data<|docstring|>post_docker_usage_stats # noqa: E501 Adds a diagnostic entry of user stats. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_docker_usage_stats(body, async_req=True) >>> result = thread.get() :param async_req bool :param DockerUserStats body: (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
8aab8dd8c01b3c2b0a91d9158cc8266940cf3746cb8bab166efb38798b6fbf01
def post_docker_usage_stats_with_http_info(self, body, **kwargs): 'post_docker_usage_stats # noqa: E501\n\n Adds a diagnostic entry of user stats. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_usage_stats_with_http_info(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerUserStats body: (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method post_docker_usage_stats" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `post_docker_usage_stats`') collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
post_docker_usage_stats # noqa: E501 Adds a diagnostic entry of user stats. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_docker_usage_stats_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param DockerUserStats body: (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
post_docker_usage_stats_with_http_info
dczifra/lightly
1
python
def post_docker_usage_stats_with_http_info(self, body, **kwargs): 'post_docker_usage_stats # noqa: E501\n\n Adds a diagnostic entry of user stats. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_usage_stats_with_http_info(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerUserStats body: (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method post_docker_usage_stats" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `post_docker_usage_stats`') collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def post_docker_usage_stats_with_http_info(self, body, **kwargs): 'post_docker_usage_stats # noqa: E501\n\n Adds a diagnostic entry of user stats. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.post_docker_usage_stats_with_http_info(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerUserStats body: (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method post_docker_usage_stats" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `post_docker_usage_stats`') collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>post_docker_usage_stats # noqa: E501 Adds a diagnostic entry of user stats. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_docker_usage_stats_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param DockerUserStats body: (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
71712dd6605de7e44fa4274ada976483d84b73e75f52e9b67526bfa8b947c0cc
def register_docker_worker(self, body, **kwargs): 'register_docker_worker # noqa: E501\n\n Registers a worker for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.register_docker_worker(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param CreateDockerWorkerRegistryEntryRequest body: (required)\n :return: CreateEntityResponse\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.register_docker_worker_with_http_info(body, **kwargs) else: data = self.register_docker_worker_with_http_info(body, **kwargs) return data
register_docker_worker # noqa: E501 Registers a worker for a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.register_docker_worker(body, async_req=True) >>> result = thread.get() :param async_req bool :param CreateDockerWorkerRegistryEntryRequest body: (required) :return: CreateEntityResponse If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
register_docker_worker
dczifra/lightly
1
python
def register_docker_worker(self, body, **kwargs): 'register_docker_worker # noqa: E501\n\n Registers a worker for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.register_docker_worker(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param CreateDockerWorkerRegistryEntryRequest body: (required)\n :return: CreateEntityResponse\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.register_docker_worker_with_http_info(body, **kwargs) else: data = self.register_docker_worker_with_http_info(body, **kwargs) return data
def register_docker_worker(self, body, **kwargs): 'register_docker_worker # noqa: E501\n\n Registers a worker for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.register_docker_worker(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param CreateDockerWorkerRegistryEntryRequest body: (required)\n :return: CreateEntityResponse\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.register_docker_worker_with_http_info(body, **kwargs) else: data = self.register_docker_worker_with_http_info(body, **kwargs) return data<|docstring|>register_docker_worker # noqa: E501 Registers a worker for a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.register_docker_worker(body, async_req=True) >>> result = thread.get() :param async_req bool :param CreateDockerWorkerRegistryEntryRequest body: (required) :return: CreateEntityResponse If the method is called asynchronously, returns the request thread.<|endoftext|>
bad13039667a052d43c2b0e70ee07dd8974ab3a80845ed04a15c0da3d861be1a
def register_docker_worker_with_http_info(self, body, **kwargs): 'register_docker_worker # noqa: E501\n\n Registers a worker for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.register_docker_worker_with_http_info(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param CreateDockerWorkerRegistryEntryRequest body: (required)\n :return: CreateEntityResponse\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method register_docker_worker" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `register_docker_worker`') collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreateEntityResponse', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
register_docker_worker # noqa: E501 Registers a worker for a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.register_docker_worker_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param CreateDockerWorkerRegistryEntryRequest body: (required) :return: CreateEntityResponse If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
register_docker_worker_with_http_info
dczifra/lightly
1
python
def register_docker_worker_with_http_info(self, body, **kwargs): 'register_docker_worker # noqa: E501\n\n Registers a worker for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.register_docker_worker_with_http_info(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param CreateDockerWorkerRegistryEntryRequest body: (required)\n :return: CreateEntityResponse\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method register_docker_worker" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `register_docker_worker`') collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreateEntityResponse', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def register_docker_worker_with_http_info(self, body, **kwargs): 'register_docker_worker # noqa: E501\n\n Registers a worker for a user. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.register_docker_worker_with_http_info(body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param CreateDockerWorkerRegistryEntryRequest body: (required)\n :return: CreateEntityResponse\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method register_docker_worker" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `register_docker_worker`') collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreateEntityResponse', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>register_docker_worker # noqa: E501 Registers a worker for a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.register_docker_worker_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param CreateDockerWorkerRegistryEntryRequest body: (required) :return: CreateEntityResponse If the method is called asynchronously, returns the request thread.<|endoftext|>
7595e0fc8665bac8a3e24648d88d03392637cccd3603abc4f24866b41f65d8ed
def update_docker_run_by_id(self, body, run_id, **kwargs): 'update_docker_run_by_id # noqa: E501\n\n Updates a docker run database entry. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_run_by_id(body, run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunUpdateRequest body: (required)\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_docker_run_by_id_with_http_info(body, run_id, **kwargs) else: data = self.update_docker_run_by_id_with_http_info(body, run_id, **kwargs) return data
update_docker_run_by_id # noqa: E501 Updates a docker run database entry. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_run_by_id(body, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunUpdateRequest body: (required) :param MongoObjectID run_id: ObjectId of the docker run (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
update_docker_run_by_id
dczifra/lightly
1
python
def update_docker_run_by_id(self, body, run_id, **kwargs): 'update_docker_run_by_id # noqa: E501\n\n Updates a docker run database entry. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_run_by_id(body, run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunUpdateRequest body: (required)\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_docker_run_by_id_with_http_info(body, run_id, **kwargs) else: data = self.update_docker_run_by_id_with_http_info(body, run_id, **kwargs) return data
def update_docker_run_by_id(self, body, run_id, **kwargs): 'update_docker_run_by_id # noqa: E501\n\n Updates a docker run database entry. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_run_by_id(body, run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunUpdateRequest body: (required)\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_docker_run_by_id_with_http_info(body, run_id, **kwargs) else: data = self.update_docker_run_by_id_with_http_info(body, run_id, **kwargs) return data<|docstring|>update_docker_run_by_id # noqa: E501 Updates a docker run database entry. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_run_by_id(body, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunUpdateRequest body: (required) :param MongoObjectID run_id: ObjectId of the docker run (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
d3decf5f4b247642ea1144b8fb2cf8464a0993bf5f1f64c6612e7283e0674ae6
def update_docker_run_by_id_with_http_info(self, body, run_id, **kwargs): 'update_docker_run_by_id # noqa: E501\n\n Updates a docker run database entry. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_run_by_id_with_http_info(body, run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunUpdateRequest body: (required)\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_docker_run_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_docker_run_by_id`') if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `update_docker_run_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
update_docker_run_by_id # noqa: E501 Updates a docker run database entry. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_run_by_id_with_http_info(body, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunUpdateRequest body: (required) :param MongoObjectID run_id: ObjectId of the docker run (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
update_docker_run_by_id_with_http_info
dczifra/lightly
1
python
def update_docker_run_by_id_with_http_info(self, body, run_id, **kwargs): 'update_docker_run_by_id # noqa: E501\n\n Updates a docker run database entry. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_run_by_id_with_http_info(body, run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunUpdateRequest body: (required)\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_docker_run_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_docker_run_by_id`') if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `update_docker_run_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def update_docker_run_by_id_with_http_info(self, body, run_id, **kwargs): 'update_docker_run_by_id # noqa: E501\n\n Updates a docker run database entry. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_run_by_id_with_http_info(body, run_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunUpdateRequest body: (required)\n :param MongoObjectID run_id: ObjectId of the docker run (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'run_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_docker_run_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_docker_run_by_id`') if (self.api_client.client_side_validation and (('run_id' not in params) or (params['run_id'] is None))): raise ValueError('Missing the required parameter `run_id` when calling `update_docker_run_by_id`') collection_formats = {} path_params = {} if ('run_id' in params): path_params['runId'] = params['run_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/runs/{runId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>update_docker_run_by_id # noqa: E501 Updates a docker run database entry. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_run_by_id_with_http_info(body, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunUpdateRequest body: (required) :param MongoObjectID run_id: ObjectId of the docker run (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
7be3eaa59e79daeb7ff48ead6a517e2c8147dbc7f10962d608f2a32665818d00
def update_docker_worker_config_by_id(self, body, config_id, **kwargs): 'update_docker_worker_config_by_id # noqa: E501\n\n Updates a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_config_by_id(body, config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerWorkerConfigCreateRequest body: (required)\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_docker_worker_config_by_id_with_http_info(body, config_id, **kwargs) else: data = self.update_docker_worker_config_by_id_with_http_info(body, config_id, **kwargs) return data
update_docker_worker_config_by_id # noqa: E501 Updates a docker worker configuration by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_worker_config_by_id(body, config_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerWorkerConfigCreateRequest body: (required) :param MongoObjectID config_id: ObjectId of the docker worker config (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
update_docker_worker_config_by_id
dczifra/lightly
1
python
def update_docker_worker_config_by_id(self, body, config_id, **kwargs): 'update_docker_worker_config_by_id # noqa: E501\n\n Updates a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_config_by_id(body, config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerWorkerConfigCreateRequest body: (required)\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_docker_worker_config_by_id_with_http_info(body, config_id, **kwargs) else: data = self.update_docker_worker_config_by_id_with_http_info(body, config_id, **kwargs) return data
def update_docker_worker_config_by_id(self, body, config_id, **kwargs): 'update_docker_worker_config_by_id # noqa: E501\n\n Updates a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_config_by_id(body, config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerWorkerConfigCreateRequest body: (required)\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_docker_worker_config_by_id_with_http_info(body, config_id, **kwargs) else: data = self.update_docker_worker_config_by_id_with_http_info(body, config_id, **kwargs) return data<|docstring|>update_docker_worker_config_by_id # noqa: E501 Updates a docker worker configuration by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_worker_config_by_id(body, config_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerWorkerConfigCreateRequest body: (required) :param MongoObjectID config_id: ObjectId of the docker worker config (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
55b0c9d0ffd20f85897b2c691383b2e928c916df5784fc9d0c43ac4ea249f49e
def update_docker_worker_config_by_id_with_http_info(self, body, config_id, **kwargs): 'update_docker_worker_config_by_id # noqa: E501\n\n Updates a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_config_by_id_with_http_info(body, config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerWorkerConfigCreateRequest body: (required)\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'config_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_docker_worker_config_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_docker_worker_config_by_id`') if (self.api_client.client_side_validation and (('config_id' not in params) or (params['config_id'] is None))): raise ValueError('Missing the required parameter `config_id` when calling `update_docker_worker_config_by_id`') collection_formats = {} path_params = {} if ('config_id' in params): path_params['configId'] = params['config_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/config/{configId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
update_docker_worker_config_by_id # noqa: E501 Updates a docker worker configuration by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_worker_config_by_id_with_http_info(body, config_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerWorkerConfigCreateRequest body: (required) :param MongoObjectID config_id: ObjectId of the docker worker config (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
update_docker_worker_config_by_id_with_http_info
dczifra/lightly
1
python
def update_docker_worker_config_by_id_with_http_info(self, body, config_id, **kwargs): 'update_docker_worker_config_by_id # noqa: E501\n\n Updates a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_config_by_id_with_http_info(body, config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerWorkerConfigCreateRequest body: (required)\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'config_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_docker_worker_config_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_docker_worker_config_by_id`') if (self.api_client.client_side_validation and (('config_id' not in params) or (params['config_id'] is None))): raise ValueError('Missing the required parameter `config_id` when calling `update_docker_worker_config_by_id`') collection_formats = {} path_params = {} if ('config_id' in params): path_params['configId'] = params['config_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/config/{configId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def update_docker_worker_config_by_id_with_http_info(self, body, config_id, **kwargs): 'update_docker_worker_config_by_id # noqa: E501\n\n Updates a docker worker configuration by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_config_by_id_with_http_info(body, config_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerWorkerConfigCreateRequest body: (required)\n :param MongoObjectID config_id: ObjectId of the docker worker config (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'config_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_docker_worker_config_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_docker_worker_config_by_id`') if (self.api_client.client_side_validation and (('config_id' not in params) or (params['config_id'] is None))): raise ValueError('Missing the required parameter `config_id` when calling `update_docker_worker_config_by_id`') collection_formats = {} path_params = {} if ('config_id' in params): path_params['configId'] = params['config_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/config/{configId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>update_docker_worker_config_by_id # noqa: E501 Updates a docker worker configuration by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_worker_config_by_id_with_http_info(body, config_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerWorkerConfigCreateRequest body: (required) :param MongoObjectID config_id: ObjectId of the docker worker config (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
24005752183b0cef83310501ae7f560834a0be0abb3e6f72863502094774130e
def update_docker_worker_registry_entry_by_id(self, body, worker_id, **kwargs): 'update_docker_worker_registry_entry_by_id # noqa: E501\n\n Updates the worker status by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_registry_entry_by_id(body, worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param UpdateDockerWorkerRegistryEntryRequest body: (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, **kwargs) else: data = self.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, **kwargs) return data
update_docker_worker_registry_entry_by_id # noqa: E501 Updates the worker status by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_worker_registry_entry_by_id(body, worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param UpdateDockerWorkerRegistryEntryRequest body: (required) :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
update_docker_worker_registry_entry_by_id
dczifra/lightly
1
python
def update_docker_worker_registry_entry_by_id(self, body, worker_id, **kwargs): 'update_docker_worker_registry_entry_by_id # noqa: E501\n\n Updates the worker status by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_registry_entry_by_id(body, worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param UpdateDockerWorkerRegistryEntryRequest body: (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, **kwargs) else: data = self.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, **kwargs) return data
def update_docker_worker_registry_entry_by_id(self, body, worker_id, **kwargs): 'update_docker_worker_registry_entry_by_id # noqa: E501\n\n Updates the worker status by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_registry_entry_by_id(body, worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param UpdateDockerWorkerRegistryEntryRequest body: (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, **kwargs) else: data = self.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, **kwargs) return data<|docstring|>update_docker_worker_registry_entry_by_id # noqa: E501 Updates the worker status by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_worker_registry_entry_by_id(body, worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param UpdateDockerWorkerRegistryEntryRequest body: (required) :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
5d0cb690e9d323a7034665518a49af9deca66ba8b053e8bcd823918e8eff08d1
def update_docker_worker_registry_entry_by_id_with_http_info(self, body, worker_id, **kwargs): 'update_docker_worker_registry_entry_by_id # noqa: E501\n\n Updates the worker status by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param UpdateDockerWorkerRegistryEntryRequest body: (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'worker_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_docker_worker_registry_entry_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_docker_worker_registry_entry_by_id`') if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `update_docker_worker_registry_entry_by_id`') collection_formats = {} path_params = {} if ('worker_id' in params): path_params['workerId'] = params['worker_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/{workerId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
update_docker_worker_registry_entry_by_id # noqa: E501 Updates the worker status by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param UpdateDockerWorkerRegistryEntryRequest body: (required) :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
update_docker_worker_registry_entry_by_id_with_http_info
dczifra/lightly
1
python
def update_docker_worker_registry_entry_by_id_with_http_info(self, body, worker_id, **kwargs): 'update_docker_worker_registry_entry_by_id # noqa: E501\n\n Updates the worker status by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param UpdateDockerWorkerRegistryEntryRequest body: (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'worker_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_docker_worker_registry_entry_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_docker_worker_registry_entry_by_id`') if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `update_docker_worker_registry_entry_by_id`') collection_formats = {} path_params = {} if ('worker_id' in params): path_params['workerId'] = params['worker_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/{workerId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def update_docker_worker_registry_entry_by_id_with_http_info(self, body, worker_id, **kwargs): 'update_docker_worker_registry_entry_by_id # noqa: E501\n\n Updates the worker status by id. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param UpdateDockerWorkerRegistryEntryRequest body: (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'worker_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_docker_worker_registry_entry_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_docker_worker_registry_entry_by_id`') if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `update_docker_worker_registry_entry_by_id`') collection_formats = {} path_params = {} if ('worker_id' in params): path_params['workerId'] = params['worker_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/docker/worker/{workerId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>update_docker_worker_registry_entry_by_id # noqa: E501 Updates the worker status by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_docker_worker_registry_entry_by_id_with_http_info(body, worker_id, async_req=True) >>> result = thread.get() :param async_req bool :param UpdateDockerWorkerRegistryEntryRequest body: (required) :param MongoObjectID worker_id: ObjectId of the docker worker (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
8c39926903933e9c97d4d3c66d4b79333ae692fd029c718d51cb42b9df8620a6
def update_scheduled_docker_run_state_by_id(self, body, dataset_id, worker_id, scheduled_id, **kwargs): 'update_scheduled_docker_run_state_by_id # noqa: E501\n\n Update the state of a scheduled run. This will fail if the state of the scheduled run is LOCKED. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_scheduled_docker_run_state_by_id(body, dataset_id, worker_id, scheduled_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledUpdateRequest body: (required)\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :param MongoObjectID scheduled_id: ObjectId of the docker worker run configg (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, **kwargs) else: data = self.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, **kwargs) return data
update_scheduled_docker_run_state_by_id # noqa: E501 Update the state of a scheduled run. This will fail if the state of the scheduled run is LOCKED. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_scheduled_docker_run_state_by_id(body, dataset_id, worker_id, scheduled_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunScheduledUpdateRequest body: (required) :param MongoObjectID dataset_id: ObjectId of the dataset (required) :param MongoObjectID worker_id: ObjectId of the docker worker (required) :param MongoObjectID scheduled_id: ObjectId of the docker worker run configg (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
update_scheduled_docker_run_state_by_id
dczifra/lightly
1
python
def update_scheduled_docker_run_state_by_id(self, body, dataset_id, worker_id, scheduled_id, **kwargs): 'update_scheduled_docker_run_state_by_id # noqa: E501\n\n Update the state of a scheduled run. This will fail if the state of the scheduled run is LOCKED. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_scheduled_docker_run_state_by_id(body, dataset_id, worker_id, scheduled_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledUpdateRequest body: (required)\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :param MongoObjectID scheduled_id: ObjectId of the docker worker run configg (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, **kwargs) else: data = self.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, **kwargs) return data
def update_scheduled_docker_run_state_by_id(self, body, dataset_id, worker_id, scheduled_id, **kwargs): 'update_scheduled_docker_run_state_by_id # noqa: E501\n\n Update the state of a scheduled run. This will fail if the state of the scheduled run is LOCKED. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_scheduled_docker_run_state_by_id(body, dataset_id, worker_id, scheduled_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledUpdateRequest body: (required)\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :param MongoObjectID scheduled_id: ObjectId of the docker worker run configg (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, **kwargs) else: data = self.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, **kwargs) return data<|docstring|>update_scheduled_docker_run_state_by_id # noqa: E501 Update the state of a scheduled run. This will fail if the state of the scheduled run is LOCKED. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_scheduled_docker_run_state_by_id(body, dataset_id, worker_id, scheduled_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunScheduledUpdateRequest body: (required) :param MongoObjectID dataset_id: ObjectId of the dataset (required) :param MongoObjectID worker_id: ObjectId of the docker worker (required) :param MongoObjectID scheduled_id: ObjectId of the docker worker run configg (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
c2495ba24fd59e47bbcf61029184a40410608704427596ad4bba46077495f361
def update_scheduled_docker_run_state_by_id_with_http_info(self, body, dataset_id, worker_id, scheduled_id, **kwargs): 'update_scheduled_docker_run_state_by_id # noqa: E501\n\n Update the state of a scheduled run. This will fail if the state of the scheduled run is LOCKED. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledUpdateRequest body: (required)\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :param MongoObjectID scheduled_id: ObjectId of the docker worker run configg (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'dataset_id', 'worker_id', 'scheduled_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_scheduled_docker_run_state_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_scheduled_docker_run_state_by_id`') if (self.api_client.client_side_validation and (('dataset_id' not in params) or (params['dataset_id'] is None))): raise ValueError('Missing the required parameter `dataset_id` when calling `update_scheduled_docker_run_state_by_id`') if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `update_scheduled_docker_run_state_by_id`') if (self.api_client.client_side_validation and (('scheduled_id' not in params) or (params['scheduled_id'] is None))): raise ValueError('Missing the required parameter `scheduled_id` when calling `update_scheduled_docker_run_state_by_id`') collection_formats = {} path_params = {} if ('dataset_id' in params): path_params['datasetId'] = params['dataset_id'] if ('worker_id' in params): path_params['workerId'] = params['worker_id'] if ('scheduled_id' in params): path_params['scheduledId'] = params['scheduled_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/datasets/{datasetId}/docker/worker/{workerId}/schedule/{scheduledId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
update_scheduled_docker_run_state_by_id # noqa: E501 Update the state of a scheduled run. This will fail if the state of the scheduled run is LOCKED. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunScheduledUpdateRequest body: (required) :param MongoObjectID dataset_id: ObjectId of the dataset (required) :param MongoObjectID worker_id: ObjectId of the docker worker (required) :param MongoObjectID scheduled_id: ObjectId of the docker worker run configg (required) :return: None If the method is called asynchronously, returns the request thread.
lightly/openapi_generated/swagger_client/api/docker_api.py
update_scheduled_docker_run_state_by_id_with_http_info
dczifra/lightly
1
python
def update_scheduled_docker_run_state_by_id_with_http_info(self, body, dataset_id, worker_id, scheduled_id, **kwargs): 'update_scheduled_docker_run_state_by_id # noqa: E501\n\n Update the state of a scheduled run. This will fail if the state of the scheduled run is LOCKED. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledUpdateRequest body: (required)\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :param MongoObjectID scheduled_id: ObjectId of the docker worker run configg (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'dataset_id', 'worker_id', 'scheduled_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_scheduled_docker_run_state_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_scheduled_docker_run_state_by_id`') if (self.api_client.client_side_validation and (('dataset_id' not in params) or (params['dataset_id'] is None))): raise ValueError('Missing the required parameter `dataset_id` when calling `update_scheduled_docker_run_state_by_id`') if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `update_scheduled_docker_run_state_by_id`') if (self.api_client.client_side_validation and (('scheduled_id' not in params) or (params['scheduled_id'] is None))): raise ValueError('Missing the required parameter `scheduled_id` when calling `update_scheduled_docker_run_state_by_id`') collection_formats = {} path_params = {} if ('dataset_id' in params): path_params['datasetId'] = params['dataset_id'] if ('worker_id' in params): path_params['workerId'] = params['worker_id'] if ('scheduled_id' in params): path_params['scheduledId'] = params['scheduled_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/datasets/{datasetId}/docker/worker/{workerId}/schedule/{scheduledId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def update_scheduled_docker_run_state_by_id_with_http_info(self, body, dataset_id, worker_id, scheduled_id, **kwargs): 'update_scheduled_docker_run_state_by_id # noqa: E501\n\n Update the state of a scheduled run. This will fail if the state of the scheduled run is LOCKED. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param DockerRunScheduledUpdateRequest body: (required)\n :param MongoObjectID dataset_id: ObjectId of the dataset (required)\n :param MongoObjectID worker_id: ObjectId of the docker worker (required)\n :param MongoObjectID scheduled_id: ObjectId of the docker worker run configg (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['body', 'dataset_id', 'worker_id', 'scheduled_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method update_scheduled_docker_run_state_by_id" % key)) params[key] = val del params['kwargs'] if (self.api_client.client_side_validation and (('body' not in params) or (params['body'] is None))): raise ValueError('Missing the required parameter `body` when calling `update_scheduled_docker_run_state_by_id`') if (self.api_client.client_side_validation and (('dataset_id' not in params) or (params['dataset_id'] is None))): raise ValueError('Missing the required parameter `dataset_id` when calling `update_scheduled_docker_run_state_by_id`') if (self.api_client.client_side_validation and (('worker_id' not in params) or (params['worker_id'] is None))): raise ValueError('Missing the required parameter `worker_id` when calling `update_scheduled_docker_run_state_by_id`') if (self.api_client.client_side_validation and (('scheduled_id' not in params) or (params['scheduled_id'] is None))): raise ValueError('Missing the required parameter `scheduled_id` when calling `update_scheduled_docker_run_state_by_id`') collection_formats = {} path_params = {} if ('dataset_id' in params): path_params['datasetId'] = params['dataset_id'] if ('worker_id' in params): path_params['workerId'] = params['worker_id'] if ('scheduled_id' in params): path_params['scheduledId'] = params['scheduled_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['ApiKeyAuth', 'auth0Bearer'] return self.api_client.call_api('/v1/datasets/{datasetId}/docker/worker/{workerId}/schedule/{scheduledId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>update_scheduled_docker_run_state_by_id # noqa: E501 Update the state of a scheduled run. This will fail if the state of the scheduled run is LOCKED. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_scheduled_docker_run_state_by_id_with_http_info(body, dataset_id, worker_id, scheduled_id, async_req=True) >>> result = thread.get() :param async_req bool :param DockerRunScheduledUpdateRequest body: (required) :param MongoObjectID dataset_id: ObjectId of the dataset (required) :param MongoObjectID worker_id: ObjectId of the docker worker (required) :param MongoObjectID scheduled_id: ObjectId of the docker worker run configg (required) :return: None If the method is called asynchronously, returns the request thread.<|endoftext|>
d98f177d7a6c5caaaba83a19a0ebe013d3d553eb85728a4de63728e9979a84f4
@contextmanager def session_scope(): 'Provide a transactional scope around a series of operations.' session = sessionmaker(bind=engine)() try: (yield session) session.commit() except: session.rollback() raise finally: session.close()
Provide a transactional scope around a series of operations.
project/core/db/base.py
session_scope
p141592/simple_fastapi
2
python
@contextmanager def session_scope(): session = sessionmaker(bind=engine)() try: (yield session) session.commit() except: session.rollback() raise finally: session.close()
@contextmanager def session_scope(): session = sessionmaker(bind=engine)() try: (yield session) session.commit() except: session.rollback() raise finally: session.close()<|docstring|>Provide a transactional scope around a series of operations.<|endoftext|>
a3b9175c9650629318686c2a0766c59734d5c906935cbef537f5a5f7497c8fbd
def centos(function): 'Decorator to set the Linux distribution to CentOS 7' def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = linux_distro.CENTOS hpccm.config.g_linux_version = StrictVersion('7.0') return function(*args, **kwargs) return wrapper
Decorator to set the Linux distribution to CentOS 7
test/helpers.py
centos
DalavanCloud/hpc-container-maker
1
python
def centos(function): def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = linux_distro.CENTOS hpccm.config.g_linux_version = StrictVersion('7.0') return function(*args, **kwargs) return wrapper
def centos(function): def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = linux_distro.CENTOS hpccm.config.g_linux_version = StrictVersion('7.0') return function(*args, **kwargs) return wrapper<|docstring|>Decorator to set the Linux distribution to CentOS 7<|endoftext|>
be1b228444eaac2a1b80f623654b87a9c6a423654191c52407c14b90e100e0e2
def docker(function): 'Decorator to set the global container type to docker' def wrapper(*args, **kwargs): hpccm.config.g_ctype = container_type.DOCKER return function(*args, **kwargs) return wrapper
Decorator to set the global container type to docker
test/helpers.py
docker
DalavanCloud/hpc-container-maker
1
python
def docker(function): def wrapper(*args, **kwargs): hpccm.config.g_ctype = container_type.DOCKER return function(*args, **kwargs) return wrapper
def docker(function): def wrapper(*args, **kwargs): hpccm.config.g_ctype = container_type.DOCKER return function(*args, **kwargs) return wrapper<|docstring|>Decorator to set the global container type to docker<|endoftext|>
3e8aba0ac0ae9301f8418ec0aaf05ba2de3e49e32b8c64dd5f4a459a180eddd3
def invalid_ctype(function): 'Decorator to set the global container type to an invalid value' def wrapper(*args, **kwargs): hpccm.config.g_ctype = None return function(*args, **kwargs) return wrapper
Decorator to set the global container type to an invalid value
test/helpers.py
invalid_ctype
DalavanCloud/hpc-container-maker
1
python
def invalid_ctype(function): def wrapper(*args, **kwargs): hpccm.config.g_ctype = None return function(*args, **kwargs) return wrapper
def invalid_ctype(function): def wrapper(*args, **kwargs): hpccm.config.g_ctype = None return function(*args, **kwargs) return wrapper<|docstring|>Decorator to set the global container type to an invalid value<|endoftext|>
fdac592d5d0f2b000ac5eaa43bf67404d815e6fa20274d8cc9ace2954bb8578a
def invalid_distro(function): 'Decorator to set the global Linux distribution to an invalid value' def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = None return function(*args, **kwargs) return wrapper
Decorator to set the global Linux distribution to an invalid value
test/helpers.py
invalid_distro
DalavanCloud/hpc-container-maker
1
python
def invalid_distro(function): def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = None return function(*args, **kwargs) return wrapper
def invalid_distro(function): def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = None return function(*args, **kwargs) return wrapper<|docstring|>Decorator to set the global Linux distribution to an invalid value<|endoftext|>
95a334cf2b6cb4ab67edafaa592d7137ce27e81e0e989b858fb135e29b730688
def singularity(function): 'Decorator to set the global container type to singularity' def wrapper(*args, **kwargs): hpccm.config.g_ctype = container_type.SINGULARITY return function(*args, **kwargs) return wrapper
Decorator to set the global container type to singularity
test/helpers.py
singularity
DalavanCloud/hpc-container-maker
1
python
def singularity(function): def wrapper(*args, **kwargs): hpccm.config.g_ctype = container_type.SINGULARITY return function(*args, **kwargs) return wrapper
def singularity(function): def wrapper(*args, **kwargs): hpccm.config.g_ctype = container_type.SINGULARITY return function(*args, **kwargs) return wrapper<|docstring|>Decorator to set the global container type to singularity<|endoftext|>
0cd5026716f9b39505fbf239159c2d85481eb6ed0bc9fc7c257eb55d06660a7a
def ubuntu(function): 'Decorator to set the Linux distribution to Ubuntu 16.04' def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = linux_distro.UBUNTU hpccm.config.g_linux_version = StrictVersion('16.04') return function(*args, **kwargs) return wrapper
Decorator to set the Linux distribution to Ubuntu 16.04
test/helpers.py
ubuntu
DalavanCloud/hpc-container-maker
1
python
def ubuntu(function): def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = linux_distro.UBUNTU hpccm.config.g_linux_version = StrictVersion('16.04') return function(*args, **kwargs) return wrapper
def ubuntu(function): def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = linux_distro.UBUNTU hpccm.config.g_linux_version = StrictVersion('16.04') return function(*args, **kwargs) return wrapper<|docstring|>Decorator to set the Linux distribution to Ubuntu 16.04<|endoftext|>
dd7096b4b3f2a478b6a26799ef0636f555b52139e3066369659274afe50bdedd
def ubuntu18(function): 'Decorator to set the Linux distribution to Ubuntu 18.04' def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = linux_distro.UBUNTU hpccm.config.g_linux_version = StrictVersion('18.04') return function(*args, **kwargs) return wrapper
Decorator to set the Linux distribution to Ubuntu 18.04
test/helpers.py
ubuntu18
DalavanCloud/hpc-container-maker
1
python
def ubuntu18(function): def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = linux_distro.UBUNTU hpccm.config.g_linux_version = StrictVersion('18.04') return function(*args, **kwargs) return wrapper
def ubuntu18(function): def wrapper(*args, **kwargs): hpccm.config.g_linux_distro = linux_distro.UBUNTU hpccm.config.g_linux_version = StrictVersion('18.04') return function(*args, **kwargs) return wrapper<|docstring|>Decorator to set the Linux distribution to Ubuntu 18.04<|endoftext|>
2672d8364f423bbc9b78fbfbec964e1704806221144f2e7147899ba0775d1609
def glInitColorClampINGR(): 'Return boolean indicating whether this extension is available' return extensions.hasGLExtension(EXTENSION_NAME)
Return boolean indicating whether this extension is available
Cartwheel/lib/Python26/Lib/site-packages/OpenGL/raw/GL/INGR/color_clamp.py
glInitColorClampINGR
MontyThibault/centre-of-mass-awareness
0
python
def glInitColorClampINGR(): return extensions.hasGLExtension(EXTENSION_NAME)
def glInitColorClampINGR(): return extensions.hasGLExtension(EXTENSION_NAME)<|docstring|>Return boolean indicating whether this extension is available<|endoftext|>
5f64a4d52fee897d7574e0ccb6d126cc7667f192c26290272717141d42ebbde6
def make_boolean_topic_matrix(doc_topic_matrix, threshold=0.15): '\n return a bool matrix for N documents X M topics where topic strength is > threshold\n :param (matrix) doc_topic_matrix: NxM document topic matrix (topics over documents)\n :param (float) threshold: minimum topic strength\n :return:\n ' logging.info('preparing boolean topic matrix') m = (doc_topic_matrix > threshold) return m
return a bool matrix for N documents X M topics where topic strength is > threshold :param (matrix) doc_topic_matrix: NxM document topic matrix (topics over documents) :param (float) threshold: minimum topic strength :return:
lib/build_graph.py
make_boolean_topic_matrix
Lingistic/GraBTax
9
python
def make_boolean_topic_matrix(doc_topic_matrix, threshold=0.15): '\n return a bool matrix for N documents X M topics where topic strength is > threshold\n :param (matrix) doc_topic_matrix: NxM document topic matrix (topics over documents)\n :param (float) threshold: minimum topic strength\n :return:\n ' logging.info('preparing boolean topic matrix') m = (doc_topic_matrix > threshold) return m
def make_boolean_topic_matrix(doc_topic_matrix, threshold=0.15): '\n return a bool matrix for N documents X M topics where topic strength is > threshold\n :param (matrix) doc_topic_matrix: NxM document topic matrix (topics over documents)\n :param (float) threshold: minimum topic strength\n :return:\n ' logging.info('preparing boolean topic matrix') m = (doc_topic_matrix > threshold) return m<|docstring|>return a bool matrix for N documents X M topics where topic strength is > threshold :param (matrix) doc_topic_matrix: NxM document topic matrix (topics over documents) :param (float) threshold: minimum topic strength :return:<|endoftext|>
38d8e86664de98888954e086c687ba214f39f4816db4eb3f41e9cff62af19483
def add_jaccard_weighted_edges(g, bool_topic_matrix): '\n given a document topic matrix, calculate the jaccard similarity score (intersection over union) between each topic\n as a weighted edge between topics\n :param (matrix) bool_topic_matrix: a boolean matrix of n documents X m topics with TRUE if the topic is represented\n :param (networkX graph) g: a graph object to populate\n :return: graph object with jaccard-weighted edges between topics\n ' logging.info('calculating jaccard indexes for all topics') num_topics = bool_topic_matrix.shape[1] jaccard_matrix = numpy.zeros((num_topics, num_topics)) logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = bool_topic_matrix[(:, i)] jaccard_matrix[(i, i)] = 1.0 for j in range((i + 1), num_topics): topic_j = bool_topic_matrix[(:, j)] intersection = numpy.logical_and(topic_i, topic_j) union = numpy.logical_or(topic_i, topic_j) jaccard = (intersection.sum() / float(union.sum())) jaccard_matrix[(i, j)] = jaccard jaccard_matrix[(j, i)] = jaccard try: if ('count' in g.edges[(i, j)].keys()): g.add_edge(i, j, similarity=int((jaccard * 100))) except KeyError: pass return g
given a document topic matrix, calculate the jaccard similarity score (intersection over union) between each topic as a weighted edge between topics :param (matrix) bool_topic_matrix: a boolean matrix of n documents X m topics with TRUE if the topic is represented :param (networkX graph) g: a graph object to populate :return: graph object with jaccard-weighted edges between topics
lib/build_graph.py
add_jaccard_weighted_edges
Lingistic/GraBTax
9
python
def add_jaccard_weighted_edges(g, bool_topic_matrix): '\n given a document topic matrix, calculate the jaccard similarity score (intersection over union) between each topic\n as a weighted edge between topics\n :param (matrix) bool_topic_matrix: a boolean matrix of n documents X m topics with TRUE if the topic is represented\n :param (networkX graph) g: a graph object to populate\n :return: graph object with jaccard-weighted edges between topics\n ' logging.info('calculating jaccard indexes for all topics') num_topics = bool_topic_matrix.shape[1] jaccard_matrix = numpy.zeros((num_topics, num_topics)) logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = bool_topic_matrix[(:, i)] jaccard_matrix[(i, i)] = 1.0 for j in range((i + 1), num_topics): topic_j = bool_topic_matrix[(:, j)] intersection = numpy.logical_and(topic_i, topic_j) union = numpy.logical_or(topic_i, topic_j) jaccard = (intersection.sum() / float(union.sum())) jaccard_matrix[(i, j)] = jaccard jaccard_matrix[(j, i)] = jaccard try: if ('count' in g.edges[(i, j)].keys()): g.add_edge(i, j, similarity=int((jaccard * 100))) except KeyError: pass return g
def add_jaccard_weighted_edges(g, bool_topic_matrix): '\n given a document topic matrix, calculate the jaccard similarity score (intersection over union) between each topic\n as a weighted edge between topics\n :param (matrix) bool_topic_matrix: a boolean matrix of n documents X m topics with TRUE if the topic is represented\n :param (networkX graph) g: a graph object to populate\n :return: graph object with jaccard-weighted edges between topics\n ' logging.info('calculating jaccard indexes for all topics') num_topics = bool_topic_matrix.shape[1] jaccard_matrix = numpy.zeros((num_topics, num_topics)) logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = bool_topic_matrix[(:, i)] jaccard_matrix[(i, i)] = 1.0 for j in range((i + 1), num_topics): topic_j = bool_topic_matrix[(:, j)] intersection = numpy.logical_and(topic_i, topic_j) union = numpy.logical_or(topic_i, topic_j) jaccard = (intersection.sum() / float(union.sum())) jaccard_matrix[(i, j)] = jaccard jaccard_matrix[(j, i)] = jaccard try: if ('count' in g.edges[(i, j)].keys()): g.add_edge(i, j, similarity=int((jaccard * 100))) except KeyError: pass return g<|docstring|>given a document topic matrix, calculate the jaccard similarity score (intersection over union) between each topic as a weighted edge between topics :param (matrix) bool_topic_matrix: a boolean matrix of n documents X m topics with TRUE if the topic is represented :param (networkX graph) g: a graph object to populate :return: graph object with jaccard-weighted edges between topics<|endoftext|>
0609854b3ab1868f80fa65ac2fd95470e9ed1c9b9073899e4a9001d61862a952
def calculate_cooccurences(bool_topic_matrix): '\n given a boolean topic matrix (n observations X m topics where TRUE exists when a topic exists in a doc), count the\n total number of document co-occurrences between topic_i and topic_j\n :param (matrix) bool_topic_matrix: document X topic matrix with bool values where a topic exists in a doc.\n :return: topic_i X topic_j co-occurrence matrix with co-occurrence counts between topics i and j\n ' logging.info('calculating co-occurrences') num_topics = bool_topic_matrix.shape[1] cooccurrence_matrix = numpy.zeros((num_topics, num_topics)) logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = bool_topic_matrix[(:, i)] cooccurrence_matrix[(i, i)] = numpy.nan for j in range((i + 1), num_topics): topic_j = bool_topic_matrix[(:, j)] count_ij = bool_topic_matrix[numpy.where((topic_i & topic_j))].shape[0] cooccurrence_matrix[(i, j)] = count_ij cooccurrence_matrix[(j, i)] = count_ij return cooccurrence_matrix
given a boolean topic matrix (n observations X m topics where TRUE exists when a topic exists in a doc), count the total number of document co-occurrences between topic_i and topic_j :param (matrix) bool_topic_matrix: document X topic matrix with bool values where a topic exists in a doc. :return: topic_i X topic_j co-occurrence matrix with co-occurrence counts between topics i and j
lib/build_graph.py
calculate_cooccurences
Lingistic/GraBTax
9
python
def calculate_cooccurences(bool_topic_matrix): '\n given a boolean topic matrix (n observations X m topics where TRUE exists when a topic exists in a doc), count the\n total number of document co-occurrences between topic_i and topic_j\n :param (matrix) bool_topic_matrix: document X topic matrix with bool values where a topic exists in a doc.\n :return: topic_i X topic_j co-occurrence matrix with co-occurrence counts between topics i and j\n ' logging.info('calculating co-occurrences') num_topics = bool_topic_matrix.shape[1] cooccurrence_matrix = numpy.zeros((num_topics, num_topics)) logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = bool_topic_matrix[(:, i)] cooccurrence_matrix[(i, i)] = numpy.nan for j in range((i + 1), num_topics): topic_j = bool_topic_matrix[(:, j)] count_ij = bool_topic_matrix[numpy.where((topic_i & topic_j))].shape[0] cooccurrence_matrix[(i, j)] = count_ij cooccurrence_matrix[(j, i)] = count_ij return cooccurrence_matrix
def calculate_cooccurences(bool_topic_matrix): '\n given a boolean topic matrix (n observations X m topics where TRUE exists when a topic exists in a doc), count the\n total number of document co-occurrences between topic_i and topic_j\n :param (matrix) bool_topic_matrix: document X topic matrix with bool values where a topic exists in a doc.\n :return: topic_i X topic_j co-occurrence matrix with co-occurrence counts between topics i and j\n ' logging.info('calculating co-occurrences') num_topics = bool_topic_matrix.shape[1] cooccurrence_matrix = numpy.zeros((num_topics, num_topics)) logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = bool_topic_matrix[(:, i)] cooccurrence_matrix[(i, i)] = numpy.nan for j in range((i + 1), num_topics): topic_j = bool_topic_matrix[(:, j)] count_ij = bool_topic_matrix[numpy.where((topic_i & topic_j))].shape[0] cooccurrence_matrix[(i, j)] = count_ij cooccurrence_matrix[(j, i)] = count_ij return cooccurrence_matrix<|docstring|>given a boolean topic matrix (n observations X m topics where TRUE exists when a topic exists in a doc), count the total number of document co-occurrences between topic_i and topic_j :param (matrix) bool_topic_matrix: document X topic matrix with bool values where a topic exists in a doc. :return: topic_i X topic_j co-occurrence matrix with co-occurrence counts between topics i and j<|endoftext|>
291046b31bd163d318359e9b44168910e8c0ad7d5fd0b33271a090f6b8ccef55
def add_vertices(cooccurrence_matrix, g, topic_labels): '\n adds topic vertices and weights (based on co-occurence) -- vertex weighted by total co-occurence, edges weighted\n by co-occurence between v_i and v_j\n :param cooccurrence_matrix: topic X topic co-occurrence matrix\n :param g: graph object to populate\n :param topic_labels: list of labels to associate with each topic (in order)\n :return: graph with weighted vertices, with edges\n ' logging.info('Adding vertices to graph') num_topics = cooccurrence_matrix.shape[1] logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = cooccurrence_matrix[(:, i)] sum_i = numpy.nansum(topic_i) g.add_node(i, weight=int(sum_i), label=', '.join(topic_labels[i])) colocations = numpy.where((topic_i > 0))[0] for j in colocations: g.add_edge(i, j, count=int(numpy.nansum(cooccurrence_matrix[(i, j)]))) return g
adds topic vertices and weights (based on co-occurence) -- vertex weighted by total co-occurence, edges weighted by co-occurence between v_i and v_j :param cooccurrence_matrix: topic X topic co-occurrence matrix :param g: graph object to populate :param topic_labels: list of labels to associate with each topic (in order) :return: graph with weighted vertices, with edges
lib/build_graph.py
add_vertices
Lingistic/GraBTax
9
python
def add_vertices(cooccurrence_matrix, g, topic_labels): '\n adds topic vertices and weights (based on co-occurence) -- vertex weighted by total co-occurence, edges weighted\n by co-occurence between v_i and v_j\n :param cooccurrence_matrix: topic X topic co-occurrence matrix\n :param g: graph object to populate\n :param topic_labels: list of labels to associate with each topic (in order)\n :return: graph with weighted vertices, with edges\n ' logging.info('Adding vertices to graph') num_topics = cooccurrence_matrix.shape[1] logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = cooccurrence_matrix[(:, i)] sum_i = numpy.nansum(topic_i) g.add_node(i, weight=int(sum_i), label=', '.join(topic_labels[i])) colocations = numpy.where((topic_i > 0))[0] for j in colocations: g.add_edge(i, j, count=int(numpy.nansum(cooccurrence_matrix[(i, j)]))) return g
def add_vertices(cooccurrence_matrix, g, topic_labels): '\n adds topic vertices and weights (based on co-occurence) -- vertex weighted by total co-occurence, edges weighted\n by co-occurence between v_i and v_j\n :param cooccurrence_matrix: topic X topic co-occurrence matrix\n :param g: graph object to populate\n :param topic_labels: list of labels to associate with each topic (in order)\n :return: graph with weighted vertices, with edges\n ' logging.info('Adding vertices to graph') num_topics = cooccurrence_matrix.shape[1] logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = cooccurrence_matrix[(:, i)] sum_i = numpy.nansum(topic_i) g.add_node(i, weight=int(sum_i), label=', '.join(topic_labels[i])) colocations = numpy.where((topic_i > 0))[0] for j in colocations: g.add_edge(i, j, count=int(numpy.nansum(cooccurrence_matrix[(i, j)]))) return g<|docstring|>adds topic vertices and weights (based on co-occurence) -- vertex weighted by total co-occurence, edges weighted by co-occurence between v_i and v_j :param cooccurrence_matrix: topic X topic co-occurrence matrix :param g: graph object to populate :param topic_labels: list of labels to associate with each topic (in order) :return: graph with weighted vertices, with edges<|endoftext|>
6d032bbb4f643fcd4bc019ce8b4625c4aa1e6fcc8b474688a572b7316fd9ceac
def update_edge_weights(g): '\n adds edge-weights to an existing graph which already contains jaccard-weighted edges. Edge weight is based on\n jaccard and rank calculations (see get_rank())\n :param g: target graph\n :return: graph with updated edge-weights\n ' logging.info('Adding weights to edges in graph') num_topics = len(g) logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = g.node[i]['weight'] colocations = [edge[1] for edge in g.edges(i)] lambda1 = 1 lambda2 = 1 for j in colocations: if (j != i): rank_ij = get_rank(i, j, g) rank_ji = get_rank(j, i, g) rank = (1 if ((rank_ij == 1) or (rank_ji == 1)) else 0) count = g.edges[(i, j)]['count'] jac = g.edges[(i, j)]['similarity'] weight_ij = (((1 + (lambda1 * rank)) + (lambda2 * jac)) * count) g.add_edge(i, j, weight=int(weight_ij)) return g
adds edge-weights to an existing graph which already contains jaccard-weighted edges. Edge weight is based on jaccard and rank calculations (see get_rank()) :param g: target graph :return: graph with updated edge-weights
lib/build_graph.py
update_edge_weights
Lingistic/GraBTax
9
python
def update_edge_weights(g): '\n adds edge-weights to an existing graph which already contains jaccard-weighted edges. Edge weight is based on\n jaccard and rank calculations (see get_rank())\n :param g: target graph\n :return: graph with updated edge-weights\n ' logging.info('Adding weights to edges in graph') num_topics = len(g) logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = g.node[i]['weight'] colocations = [edge[1] for edge in g.edges(i)] lambda1 = 1 lambda2 = 1 for j in colocations: if (j != i): rank_ij = get_rank(i, j, g) rank_ji = get_rank(j, i, g) rank = (1 if ((rank_ij == 1) or (rank_ji == 1)) else 0) count = g.edges[(i, j)]['count'] jac = g.edges[(i, j)]['similarity'] weight_ij = (((1 + (lambda1 * rank)) + (lambda2 * jac)) * count) g.add_edge(i, j, weight=int(weight_ij)) return g
def update_edge_weights(g): '\n adds edge-weights to an existing graph which already contains jaccard-weighted edges. Edge weight is based on\n jaccard and rank calculations (see get_rank())\n :param g: target graph\n :return: graph with updated edge-weights\n ' logging.info('Adding weights to edges in graph') num_topics = len(g) logging.debug(num_topics) for i in range(num_topics): logging.debug(i) topic_i = g.node[i]['weight'] colocations = [edge[1] for edge in g.edges(i)] lambda1 = 1 lambda2 = 1 for j in colocations: if (j != i): rank_ij = get_rank(i, j, g) rank_ji = get_rank(j, i, g) rank = (1 if ((rank_ij == 1) or (rank_ji == 1)) else 0) count = g.edges[(i, j)]['count'] jac = g.edges[(i, j)]['similarity'] weight_ij = (((1 + (lambda1 * rank)) + (lambda2 * jac)) * count) g.add_edge(i, j, weight=int(weight_ij)) return g<|docstring|>adds edge-weights to an existing graph which already contains jaccard-weighted edges. Edge weight is based on jaccard and rank calculations (see get_rank()) :param g: target graph :return: graph with updated edge-weights<|endoftext|>
bea5a2c143814c970f4154bf1f5fcdad593ff17c91b68ff544abfbbc5747db6c
def get_rank(i, j, g): '\n calculates the rank score between topic i and topic j -- selects all nodes that have a higher weight than j, and\n then counts how many of them have a higher conditional probability than i. Score ranges from 1 to (N(vertices) - 2)\n Rank score of 1 means that topic_i is more predictive of topic_j than any other vertex with higher weight than\n topic_j.\n :param i: topic node\n :param j: topic node\n :param g: populated graph\n :return: returns the rank score\n ' rank_count = 0 topic_j_s = g.node[j]['weight'] candidate_h = [] num_topics = len(g) for h in range(num_topics): if ((j != h) and (i != h)): topic_h_s = g.nodes[h]['weight'] if (topic_h_s > topic_j_s): candidate_h.append(h) for h in candidate_h: h_given_j = get_conditional_topic_prob(h, j, g) i_given_j = get_conditional_topic_prob(i, j, g) if (h_given_j > i_given_j): rank_count += 1 rank = (rank_count + 1) return rank
calculates the rank score between topic i and topic j -- selects all nodes that have a higher weight than j, and then counts how many of them have a higher conditional probability than i. Score ranges from 1 to (N(vertices) - 2) Rank score of 1 means that topic_i is more predictive of topic_j than any other vertex with higher weight than topic_j. :param i: topic node :param j: topic node :param g: populated graph :return: returns the rank score
lib/build_graph.py
get_rank
Lingistic/GraBTax
9
python
def get_rank(i, j, g): '\n calculates the rank score between topic i and topic j -- selects all nodes that have a higher weight than j, and\n then counts how many of them have a higher conditional probability than i. Score ranges from 1 to (N(vertices) - 2)\n Rank score of 1 means that topic_i is more predictive of topic_j than any other vertex with higher weight than\n topic_j.\n :param i: topic node\n :param j: topic node\n :param g: populated graph\n :return: returns the rank score\n ' rank_count = 0 topic_j_s = g.node[j]['weight'] candidate_h = [] num_topics = len(g) for h in range(num_topics): if ((j != h) and (i != h)): topic_h_s = g.nodes[h]['weight'] if (topic_h_s > topic_j_s): candidate_h.append(h) for h in candidate_h: h_given_j = get_conditional_topic_prob(h, j, g) i_given_j = get_conditional_topic_prob(i, j, g) if (h_given_j > i_given_j): rank_count += 1 rank = (rank_count + 1) return rank
def get_rank(i, j, g): '\n calculates the rank score between topic i and topic j -- selects all nodes that have a higher weight than j, and\n then counts how many of them have a higher conditional probability than i. Score ranges from 1 to (N(vertices) - 2)\n Rank score of 1 means that topic_i is more predictive of topic_j than any other vertex with higher weight than\n topic_j.\n :param i: topic node\n :param j: topic node\n :param g: populated graph\n :return: returns the rank score\n ' rank_count = 0 topic_j_s = g.node[j]['weight'] candidate_h = [] num_topics = len(g) for h in range(num_topics): if ((j != h) and (i != h)): topic_h_s = g.nodes[h]['weight'] if (topic_h_s > topic_j_s): candidate_h.append(h) for h in candidate_h: h_given_j = get_conditional_topic_prob(h, j, g) i_given_j = get_conditional_topic_prob(i, j, g) if (h_given_j > i_given_j): rank_count += 1 rank = (rank_count + 1) return rank<|docstring|>calculates the rank score between topic i and topic j -- selects all nodes that have a higher weight than j, and then counts how many of them have a higher conditional probability than i. Score ranges from 1 to (N(vertices) - 2) Rank score of 1 means that topic_i is more predictive of topic_j than any other vertex with higher weight than topic_j. :param i: topic node :param j: topic node :param g: populated graph :return: returns the rank score<|endoftext|>
2fdb86c10aba1b51d2b1bcec20aa2ed0277cd1fc1e24cb75e2e5aefe01f43e12
def get_conditional_topic_prob(i, j, g): '\n gets the conditional probability of topic_i given topic_j\n :param i: topic_i\n :param j: topic_j\n :param g: the populated graph with weighted edges and vertices\n :return: 0.0 < P(i|j) < 1.0\n ' if (i == j): return 1.0 topic_j_s = g.node[j]['weight'] try: count_i_given_j = g.edges[(i, j)]['count'] except KeyError: return 0.0 if (topic_j_s == 0): return 0.0 return (count_i_given_j / topic_j_s)
gets the conditional probability of topic_i given topic_j :param i: topic_i :param j: topic_j :param g: the populated graph with weighted edges and vertices :return: 0.0 < P(i|j) < 1.0
lib/build_graph.py
get_conditional_topic_prob
Lingistic/GraBTax
9
python
def get_conditional_topic_prob(i, j, g): '\n gets the conditional probability of topic_i given topic_j\n :param i: topic_i\n :param j: topic_j\n :param g: the populated graph with weighted edges and vertices\n :return: 0.0 < P(i|j) < 1.0\n ' if (i == j): return 1.0 topic_j_s = g.node[j]['weight'] try: count_i_given_j = g.edges[(i, j)]['count'] except KeyError: return 0.0 if (topic_j_s == 0): return 0.0 return (count_i_given_j / topic_j_s)
def get_conditional_topic_prob(i, j, g): '\n gets the conditional probability of topic_i given topic_j\n :param i: topic_i\n :param j: topic_j\n :param g: the populated graph with weighted edges and vertices\n :return: 0.0 < P(i|j) < 1.0\n ' if (i == j): return 1.0 topic_j_s = g.node[j]['weight'] try: count_i_given_j = g.edges[(i, j)]['count'] except KeyError: return 0.0 if (topic_j_s == 0): return 0.0 return (count_i_given_j / topic_j_s)<|docstring|>gets the conditional probability of topic_i given topic_j :param i: topic_i :param j: topic_j :param g: the populated graph with weighted edges and vertices :return: 0.0 < P(i|j) < 1.0<|endoftext|>
43adfd56b9023203b07b8a9850609b9d53f2c452873f3fca533a3ac951a2a242
def save(name, g): '\n saves a graph in graphml format\n :param name: friendly name of the graph\n :param g: the graph to save\n :return: None\n ' if (not os.path.exists('graphs//')): os.mkdir('graphs//') write_graphml(g, (('graphs//' + name) + '.graphml'))
saves a graph in graphml format :param name: friendly name of the graph :param g: the graph to save :return: None
lib/build_graph.py
save
Lingistic/GraBTax
9
python
def save(name, g): '\n saves a graph in graphml format\n :param name: friendly name of the graph\n :param g: the graph to save\n :return: None\n ' if (not os.path.exists('graphs//')): os.mkdir('graphs//') write_graphml(g, (('graphs//' + name) + '.graphml'))
def save(name, g): '\n saves a graph in graphml format\n :param name: friendly name of the graph\n :param g: the graph to save\n :return: None\n ' if (not os.path.exists('graphs//')): os.mkdir('graphs//') write_graphml(g, (('graphs//' + name) + '.graphml'))<|docstring|>saves a graph in graphml format :param name: friendly name of the graph :param g: the graph to save :return: None<|endoftext|>
001293803a3e8722c88d262aac13a2fe1dcb06d467248d88107d6abf68d718a7
def load(name): '\n loads a previously-saved graph from graphml format using its friendly name.\n :param name: the friendly name of the graph\n :return: the loaded graph\n ' g = read_graphml((('graphs//' + name) + '.graphml'), node_type=int) return g
loads a previously-saved graph from graphml format using its friendly name. :param name: the friendly name of the graph :return: the loaded graph
lib/build_graph.py
load
Lingistic/GraBTax
9
python
def load(name): '\n loads a previously-saved graph from graphml format using its friendly name.\n :param name: the friendly name of the graph\n :return: the loaded graph\n ' g = read_graphml((('graphs//' + name) + '.graphml'), node_type=int) return g
def load(name): '\n loads a previously-saved graph from graphml format using its friendly name.\n :param name: the friendly name of the graph\n :return: the loaded graph\n ' g = read_graphml((('graphs//' + name) + '.graphml'), node_type=int) return g<|docstring|>loads a previously-saved graph from graphml format using its friendly name. :param name: the friendly name of the graph :return: the loaded graph<|endoftext|>
a18c5479305dd94952ae654b97aea4c2c8864960f7cd75541a04fbe343185f22
def build_graph(theta_matrix, labels, friendly_name=None): '\n builds a vertex and edge-weighted graph based on a topic-proportion matrix\n :param theta_matrix: Documents X topic_proportions matrix, values should be between 0.0 and 1.0\n :param labels: list of size = N(Documents) with topic labels\n :param friendly_name: the friendly name to use to save the graph (optional)\n :return: build graph\n ' b_matrix = make_boolean_topic_matrix(theta_matrix) cooccurrences = calculate_cooccurences(b_matrix) g = Graph() g = add_vertices(cooccurrences, g, labels) g = add_jaccard_weighted_edges(g, b_matrix) g = update_edge_weights(g) g.graph['edge_weight_attr'] = 'weight' g.graph['node_weight_attr'] = 'weight' if friendly_name: save(friendly_name, g) return g
builds a vertex and edge-weighted graph based on a topic-proportion matrix :param theta_matrix: Documents X topic_proportions matrix, values should be between 0.0 and 1.0 :param labels: list of size = N(Documents) with topic labels :param friendly_name: the friendly name to use to save the graph (optional) :return: build graph
lib/build_graph.py
build_graph
Lingistic/GraBTax
9
python
def build_graph(theta_matrix, labels, friendly_name=None): '\n builds a vertex and edge-weighted graph based on a topic-proportion matrix\n :param theta_matrix: Documents X topic_proportions matrix, values should be between 0.0 and 1.0\n :param labels: list of size = N(Documents) with topic labels\n :param friendly_name: the friendly name to use to save the graph (optional)\n :return: build graph\n ' b_matrix = make_boolean_topic_matrix(theta_matrix) cooccurrences = calculate_cooccurences(b_matrix) g = Graph() g = add_vertices(cooccurrences, g, labels) g = add_jaccard_weighted_edges(g, b_matrix) g = update_edge_weights(g) g.graph['edge_weight_attr'] = 'weight' g.graph['node_weight_attr'] = 'weight' if friendly_name: save(friendly_name, g) return g
def build_graph(theta_matrix, labels, friendly_name=None): '\n builds a vertex and edge-weighted graph based on a topic-proportion matrix\n :param theta_matrix: Documents X topic_proportions matrix, values should be between 0.0 and 1.0\n :param labels: list of size = N(Documents) with topic labels\n :param friendly_name: the friendly name to use to save the graph (optional)\n :return: build graph\n ' b_matrix = make_boolean_topic_matrix(theta_matrix) cooccurrences = calculate_cooccurences(b_matrix) g = Graph() g = add_vertices(cooccurrences, g, labels) g = add_jaccard_weighted_edges(g, b_matrix) g = update_edge_weights(g) g.graph['edge_weight_attr'] = 'weight' g.graph['node_weight_attr'] = 'weight' if friendly_name: save(friendly_name, g) return g<|docstring|>builds a vertex and edge-weighted graph based on a topic-proportion matrix :param theta_matrix: Documents X topic_proportions matrix, values should be between 0.0 and 1.0 :param labels: list of size = N(Documents) with topic labels :param friendly_name: the friendly name to use to save the graph (optional) :return: build graph<|endoftext|>
b4f39d813eda89f3ed38b4dab5939093ce9bb4b0a4a7725a7d899a885ecbfe04
def blacklisted_topics(g): '\n removes blacklisted topics from a graph\n :param g: graph to modify\n :return: modified graph\n ' g.remove_node(179) g.remove_node(245) g.remove_node(106) g.remove_node(13) g.remove_node(24) g.remove_node(59) g.remove_node(183) g.remove_node(234) g.remove_node(1) g.remove_node(14) return g
removes blacklisted topics from a graph :param g: graph to modify :return: modified graph
lib/build_graph.py
blacklisted_topics
Lingistic/GraBTax
9
python
def blacklisted_topics(g): '\n removes blacklisted topics from a graph\n :param g: graph to modify\n :return: modified graph\n ' g.remove_node(179) g.remove_node(245) g.remove_node(106) g.remove_node(13) g.remove_node(24) g.remove_node(59) g.remove_node(183) g.remove_node(234) g.remove_node(1) g.remove_node(14) return g
def blacklisted_topics(g): '\n removes blacklisted topics from a graph\n :param g: graph to modify\n :return: modified graph\n ' g.remove_node(179) g.remove_node(245) g.remove_node(106) g.remove_node(13) g.remove_node(24) g.remove_node(59) g.remove_node(183) g.remove_node(234) g.remove_node(1) g.remove_node(14) return g<|docstring|>removes blacklisted topics from a graph :param g: graph to modify :return: modified graph<|endoftext|>
f41d0234fe6f27eaabc27097583c8ce778fc1ff9779233d78b63c8873eee7d1d
def recursive_partition(g, taxonomy_out, query_topic, k=4): '\n Based on a query topic and a vertex and edge-weighted graph, partition the graph into a query-based topical taxonomy\n :param g: source graph\n :param taxonomy_out: output graph (can be empty)\n :param query_topic: the head vertex to generate taxonomy from\n :param k: partition size for graph bisection\n :return: taxonomy graph (taxonomy_out)\n ' if (query_topic not in g.nodes()): return (taxonomy_out, query_topic) from lib.subgraph import get_subgraph taxonomy_out.add_node(query_topic, weight=g.node[query_topic]['weight']) g_sub = get_subgraph(g, query_topic) if (len(g_sub) > 1): return (g_sub, query_topic) x = metis.networkx_to_metis(g_sub) (edgecuts, parts) = metis.part_graph(x, k) for part in range(k): max_degree = 0 max_node = None for node in [[node for node in g_sub.nodes()][i] for (i, j) in enumerate(parts) if (j == part)]: degree = g_sub.degree(node) if (degree > max_degree): max_node = node max_degree = degree if (max_node is not None): recursive_partition(g_sub.subgraph([[node for node in g_sub.nodes()][i] for (i, j) in enumerate(parts) if (j == part)]), taxonomy_out, max_node) taxonomy_out.add_node(max_node, weight=g_sub.node[max_node]['weight']) taxonomy_out.add_edge(query_topic, max_node) return (taxonomy_out, query_topic)
Based on a query topic and a vertex and edge-weighted graph, partition the graph into a query-based topical taxonomy :param g: source graph :param taxonomy_out: output graph (can be empty) :param query_topic: the head vertex to generate taxonomy from :param k: partition size for graph bisection :return: taxonomy graph (taxonomy_out)
lib/build_graph.py
recursive_partition
Lingistic/GraBTax
9
python
def recursive_partition(g, taxonomy_out, query_topic, k=4): '\n Based on a query topic and a vertex and edge-weighted graph, partition the graph into a query-based topical taxonomy\n :param g: source graph\n :param taxonomy_out: output graph (can be empty)\n :param query_topic: the head vertex to generate taxonomy from\n :param k: partition size for graph bisection\n :return: taxonomy graph (taxonomy_out)\n ' if (query_topic not in g.nodes()): return (taxonomy_out, query_topic) from lib.subgraph import get_subgraph taxonomy_out.add_node(query_topic, weight=g.node[query_topic]['weight']) g_sub = get_subgraph(g, query_topic) if (len(g_sub) > 1): return (g_sub, query_topic) x = metis.networkx_to_metis(g_sub) (edgecuts, parts) = metis.part_graph(x, k) for part in range(k): max_degree = 0 max_node = None for node in [[node for node in g_sub.nodes()][i] for (i, j) in enumerate(parts) if (j == part)]: degree = g_sub.degree(node) if (degree > max_degree): max_node = node max_degree = degree if (max_node is not None): recursive_partition(g_sub.subgraph([[node for node in g_sub.nodes()][i] for (i, j) in enumerate(parts) if (j == part)]), taxonomy_out, max_node) taxonomy_out.add_node(max_node, weight=g_sub.node[max_node]['weight']) taxonomy_out.add_edge(query_topic, max_node) return (taxonomy_out, query_topic)
def recursive_partition(g, taxonomy_out, query_topic, k=4): '\n Based on a query topic and a vertex and edge-weighted graph, partition the graph into a query-based topical taxonomy\n :param g: source graph\n :param taxonomy_out: output graph (can be empty)\n :param query_topic: the head vertex to generate taxonomy from\n :param k: partition size for graph bisection\n :return: taxonomy graph (taxonomy_out)\n ' if (query_topic not in g.nodes()): return (taxonomy_out, query_topic) from lib.subgraph import get_subgraph taxonomy_out.add_node(query_topic, weight=g.node[query_topic]['weight']) g_sub = get_subgraph(g, query_topic) if (len(g_sub) > 1): return (g_sub, query_topic) x = metis.networkx_to_metis(g_sub) (edgecuts, parts) = metis.part_graph(x, k) for part in range(k): max_degree = 0 max_node = None for node in [[node for node in g_sub.nodes()][i] for (i, j) in enumerate(parts) if (j == part)]: degree = g_sub.degree(node) if (degree > max_degree): max_node = node max_degree = degree if (max_node is not None): recursive_partition(g_sub.subgraph([[node for node in g_sub.nodes()][i] for (i, j) in enumerate(parts) if (j == part)]), taxonomy_out, max_node) taxonomy_out.add_node(max_node, weight=g_sub.node[max_node]['weight']) taxonomy_out.add_edge(query_topic, max_node) return (taxonomy_out, query_topic)<|docstring|>Based on a query topic and a vertex and edge-weighted graph, partition the graph into a query-based topical taxonomy :param g: source graph :param taxonomy_out: output graph (can be empty) :param query_topic: the head vertex to generate taxonomy from :param k: partition size for graph bisection :return: taxonomy graph (taxonomy_out)<|endoftext|>
950225ecd9645c1788abe11477b1c610442398c429cb6e4cf6872f20a5610a59
def interact_model(model_name='345M', seed=None, nsamples=10, batch_size=1, length=150, temperature=1, top_k=0, top_p=1, models_dir='../models'): '\n Interactively run the model\n :model_name=124M : String, which model to use\n :seed=None : Integer seed for random number generators, fix seed to reproduce\n results\n :nsamples=1 : Number of samples to return total\n :batch_size=1 : Number of batches (only affects speed/memory). Must divide nsamples.\n :length=None : Number of tokens in generated text, if None (default), is\n determined by model hyperparameters\n :temperature=1 : Float value controlling randomness in boltzmann\n distribution. Lower temperature results in less random completions. As the\n temperature approaches zero, the model will become deterministic and\n repetitive. Higher temperature results in more random completions.\n :top_k=0 : Integer value controlling diversity. 1 means only 1 word is\n considered for each step (token), resulting in deterministic completions,\n while 40 means 40 words are considered at each step. 0 (default) is a\n special setting meaning no restrictions. 40 generally is a good value.\n :models_dir : path to parent folder containing model subfolders\n (i.e. contains the <model_name> folder)\n ' models_dir = os.path.expanduser(os.path.expandvars(models_dir)) if (batch_size is None): batch_size = 1 assert ((nsamples % batch_size) == 0) enc = encoder.get_encoder(model_name, models_dir) hparams = {} with open(os.path.join(models_dir, model_name, 'hparams.json')) as f: hparams = json.load(f) print('reeeeeeee') print(hparams) print(hparams) print(hparams.get('n_ctx')) if (length is None): length = (hparams.get('n_ctx') // 2) elif (length > hparams.get('n_ctx')): raise ValueError(("Can't get samples longer than window size: %s" % hparams.get('n_ctx'))) with tf.compat.v1.Session(graph=tf.Graph()) as sess: context = tf.compat.v1.placeholder(tf.int32, [batch_size, None]) np.random.seed(seed) tf.compat.v1.set_random_seed(seed) output = sample.sample_sequence(hparams=hparams, length=length, context=context, batch_size=batch_size, temperature=temperature, top_k=top_k, top_p=top_p) saver = tf.compat.v1.train.Saver() ckpt = tf.train.latest_checkpoint(os.path.join(models_dir, model_name)) saver.restore(sess, ckpt) context_tokens = enc.encode(rawtext) generated = 0 for _ in range((nsamples // batch_size)): out = sess.run(output, feed_dict={context: [context_tokens for _ in range(batch_size)]})[(:, len(context_tokens):)] for i in range(batch_size): generated += 1 text = enc.decode(out[i]) print(((((('=' * 40) + ' SAMPLE ') + str(generated)) + ' ') + ('=' * 40))) print(text) print(('=' * 80))
Interactively run the model :model_name=124M : String, which model to use :seed=None : Integer seed for random number generators, fix seed to reproduce results :nsamples=1 : Number of samples to return total :batch_size=1 : Number of batches (only affects speed/memory). Must divide nsamples. :length=None : Number of tokens in generated text, if None (default), is determined by model hyperparameters :temperature=1 : Float value controlling randomness in boltzmann distribution. Lower temperature results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive. Higher temperature results in more random completions. :top_k=0 : Integer value controlling diversity. 1 means only 1 word is considered for each step (token), resulting in deterministic completions, while 40 means 40 words are considered at each step. 0 (default) is a special setting meaning no restrictions. 40 generally is a good value. :models_dir : path to parent folder containing model subfolders (i.e. contains the <model_name> folder)
src_v2/interactive_conditional_samples.py
interact_model
praise2112/gpt-2-tensorflow2.0
0
python
def interact_model(model_name='345M', seed=None, nsamples=10, batch_size=1, length=150, temperature=1, top_k=0, top_p=1, models_dir='../models'): '\n Interactively run the model\n :model_name=124M : String, which model to use\n :seed=None : Integer seed for random number generators, fix seed to reproduce\n results\n :nsamples=1 : Number of samples to return total\n :batch_size=1 : Number of batches (only affects speed/memory). Must divide nsamples.\n :length=None : Number of tokens in generated text, if None (default), is\n determined by model hyperparameters\n :temperature=1 : Float value controlling randomness in boltzmann\n distribution. Lower temperature results in less random completions. As the\n temperature approaches zero, the model will become deterministic and\n repetitive. Higher temperature results in more random completions.\n :top_k=0 : Integer value controlling diversity. 1 means only 1 word is\n considered for each step (token), resulting in deterministic completions,\n while 40 means 40 words are considered at each step. 0 (default) is a\n special setting meaning no restrictions. 40 generally is a good value.\n :models_dir : path to parent folder containing model subfolders\n (i.e. contains the <model_name> folder)\n ' models_dir = os.path.expanduser(os.path.expandvars(models_dir)) if (batch_size is None): batch_size = 1 assert ((nsamples % batch_size) == 0) enc = encoder.get_encoder(model_name, models_dir) hparams = {} with open(os.path.join(models_dir, model_name, 'hparams.json')) as f: hparams = json.load(f) print('reeeeeeee') print(hparams) print(hparams) print(hparams.get('n_ctx')) if (length is None): length = (hparams.get('n_ctx') // 2) elif (length > hparams.get('n_ctx')): raise ValueError(("Can't get samples longer than window size: %s" % hparams.get('n_ctx'))) with tf.compat.v1.Session(graph=tf.Graph()) as sess: context = tf.compat.v1.placeholder(tf.int32, [batch_size, None]) np.random.seed(seed) tf.compat.v1.set_random_seed(seed) output = sample.sample_sequence(hparams=hparams, length=length, context=context, batch_size=batch_size, temperature=temperature, top_k=top_k, top_p=top_p) saver = tf.compat.v1.train.Saver() ckpt = tf.train.latest_checkpoint(os.path.join(models_dir, model_name)) saver.restore(sess, ckpt) context_tokens = enc.encode(rawtext) generated = 0 for _ in range((nsamples // batch_size)): out = sess.run(output, feed_dict={context: [context_tokens for _ in range(batch_size)]})[(:, len(context_tokens):)] for i in range(batch_size): generated += 1 text = enc.decode(out[i]) print(((((('=' * 40) + ' SAMPLE ') + str(generated)) + ' ') + ('=' * 40))) print(text) print(('=' * 80))
def interact_model(model_name='345M', seed=None, nsamples=10, batch_size=1, length=150, temperature=1, top_k=0, top_p=1, models_dir='../models'): '\n Interactively run the model\n :model_name=124M : String, which model to use\n :seed=None : Integer seed for random number generators, fix seed to reproduce\n results\n :nsamples=1 : Number of samples to return total\n :batch_size=1 : Number of batches (only affects speed/memory). Must divide nsamples.\n :length=None : Number of tokens in generated text, if None (default), is\n determined by model hyperparameters\n :temperature=1 : Float value controlling randomness in boltzmann\n distribution. Lower temperature results in less random completions. As the\n temperature approaches zero, the model will become deterministic and\n repetitive. Higher temperature results in more random completions.\n :top_k=0 : Integer value controlling diversity. 1 means only 1 word is\n considered for each step (token), resulting in deterministic completions,\n while 40 means 40 words are considered at each step. 0 (default) is a\n special setting meaning no restrictions. 40 generally is a good value.\n :models_dir : path to parent folder containing model subfolders\n (i.e. contains the <model_name> folder)\n ' models_dir = os.path.expanduser(os.path.expandvars(models_dir)) if (batch_size is None): batch_size = 1 assert ((nsamples % batch_size) == 0) enc = encoder.get_encoder(model_name, models_dir) hparams = {} with open(os.path.join(models_dir, model_name, 'hparams.json')) as f: hparams = json.load(f) print('reeeeeeee') print(hparams) print(hparams) print(hparams.get('n_ctx')) if (length is None): length = (hparams.get('n_ctx') // 2) elif (length > hparams.get('n_ctx')): raise ValueError(("Can't get samples longer than window size: %s" % hparams.get('n_ctx'))) with tf.compat.v1.Session(graph=tf.Graph()) as sess: context = tf.compat.v1.placeholder(tf.int32, [batch_size, None]) np.random.seed(seed) tf.compat.v1.set_random_seed(seed) output = sample.sample_sequence(hparams=hparams, length=length, context=context, batch_size=batch_size, temperature=temperature, top_k=top_k, top_p=top_p) saver = tf.compat.v1.train.Saver() ckpt = tf.train.latest_checkpoint(os.path.join(models_dir, model_name)) saver.restore(sess, ckpt) context_tokens = enc.encode(rawtext) generated = 0 for _ in range((nsamples // batch_size)): out = sess.run(output, feed_dict={context: [context_tokens for _ in range(batch_size)]})[(:, len(context_tokens):)] for i in range(batch_size): generated += 1 text = enc.decode(out[i]) print(((((('=' * 40) + ' SAMPLE ') + str(generated)) + ' ') + ('=' * 40))) print(text) print(('=' * 80))<|docstring|>Interactively run the model :model_name=124M : String, which model to use :seed=None : Integer seed for random number generators, fix seed to reproduce results :nsamples=1 : Number of samples to return total :batch_size=1 : Number of batches (only affects speed/memory). Must divide nsamples. :length=None : Number of tokens in generated text, if None (default), is determined by model hyperparameters :temperature=1 : Float value controlling randomness in boltzmann distribution. Lower temperature results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive. Higher temperature results in more random completions. :top_k=0 : Integer value controlling diversity. 1 means only 1 word is considered for each step (token), resulting in deterministic completions, while 40 means 40 words are considered at each step. 0 (default) is a special setting meaning no restrictions. 40 generally is a good value. :models_dir : path to parent folder containing model subfolders (i.e. contains the <model_name> folder)<|endoftext|>
b7ab41c086ade85df40475a11ee7b0fc33405e8498ebedb91e0a0057a2370457
def _add_colorbar(self, fig, ax, bounds, colormap, label=''): '\n Add a colorbar to the right of an axis.\n :param fig:\n :param ax:\n :param bounds:\n :param colormap:\n :param label:\n :return:\n ' import matplotlib as mpl pos = ax.get_position() cpos = [(pos.x1 + 0.025), (pos.y0 + 0.0125), 0.015, (pos.height * 0.4)] cax = fig.add_axes(cpos) norm = mpl.colors.BoundaryNorm(bounds, colormap.N) cb2 = mpl.colorbar.ColorbarBase(cax, cmap=colormap, norm=norm, ticks=bounds, spacing='uniform', orientation='vertical') cb2.set_label(label) return
Add a colorbar to the right of an axis. :param fig: :param ax: :param bounds: :param colormap: :param label: :return:
sd/sd_plots.py
_add_colorbar
shibaji7/AMGeO-SD
1
python
def _add_colorbar(self, fig, ax, bounds, colormap, label=): '\n Add a colorbar to the right of an axis.\n :param fig:\n :param ax:\n :param bounds:\n :param colormap:\n :param label:\n :return:\n ' import matplotlib as mpl pos = ax.get_position() cpos = [(pos.x1 + 0.025), (pos.y0 + 0.0125), 0.015, (pos.height * 0.4)] cax = fig.add_axes(cpos) norm = mpl.colors.BoundaryNorm(bounds, colormap.N) cb2 = mpl.colorbar.ColorbarBase(cax, cmap=colormap, norm=norm, ticks=bounds, spacing='uniform', orientation='vertical') cb2.set_label(label) return
def _add_colorbar(self, fig, ax, bounds, colormap, label=): '\n Add a colorbar to the right of an axis.\n :param fig:\n :param ax:\n :param bounds:\n :param colormap:\n :param label:\n :return:\n ' import matplotlib as mpl pos = ax.get_position() cpos = [(pos.x1 + 0.025), (pos.y0 + 0.0125), 0.015, (pos.height * 0.4)] cax = fig.add_axes(cpos) norm = mpl.colors.BoundaryNorm(bounds, colormap.N) cb2 = mpl.colorbar.ColorbarBase(cax, cmap=colormap, norm=norm, ticks=bounds, spacing='uniform', orientation='vertical') cb2.set_label(label) return<|docstring|>Add a colorbar to the right of an axis. :param fig: :param ax: :param bounds: :param colormap: :param label: :return:<|endoftext|>
82501f341d450c5e99a65eedd4a5529d5af6df126fd3574a862d64ebde9b866e
def parse_events(response_json): '\n Build the events list\n ' fault_dict = {} for res_out in response_json['result']['faults']: if (res_out['resolved'] is False): flt_details = res_out['details'] flt_node = res_out['nodeID'] flt_drive = res_out['driveID'] flt_svc = res_out['serviceID'] flt_date = res_out['date'] flt_type = res_out['type'] flt_sev = res_out['severity'] flt_key = res_out['clusterFaultID'] fault_dict[flt_key] = [flt_node, flt_drive, flt_svc, flt_date, flt_type, flt_sev, flt_details] if (len(fault_dict) == 0): print(f'No events found') return fault_dict
Build the events list
get_cluster_faults.py
parse_events
schubb2003/element
0
python
def parse_events(response_json): '\n \n ' fault_dict = {} for res_out in response_json['result']['faults']: if (res_out['resolved'] is False): flt_details = res_out['details'] flt_node = res_out['nodeID'] flt_drive = res_out['driveID'] flt_svc = res_out['serviceID'] flt_date = res_out['date'] flt_type = res_out['type'] flt_sev = res_out['severity'] flt_key = res_out['clusterFaultID'] fault_dict[flt_key] = [flt_node, flt_drive, flt_svc, flt_date, flt_type, flt_sev, flt_details] if (len(fault_dict) == 0): print(f'No events found') return fault_dict
def parse_events(response_json): '\n \n ' fault_dict = {} for res_out in response_json['result']['faults']: if (res_out['resolved'] is False): flt_details = res_out['details'] flt_node = res_out['nodeID'] flt_drive = res_out['driveID'] flt_svc = res_out['serviceID'] flt_date = res_out['date'] flt_type = res_out['type'] flt_sev = res_out['severity'] flt_key = res_out['clusterFaultID'] fault_dict[flt_key] = [flt_node, flt_drive, flt_svc, flt_date, flt_type, flt_sev, flt_details] if (len(fault_dict) == 0): print(f'No events found') return fault_dict<|docstring|>Build the events list<|endoftext|>
c65b451e37aba5bd8b6e554e9e7955d6ca19ac46397d4efa797422366aff9779
def get_filename(mvip): '\n Build the output filename\n ' now_date = datetime.now() out_date = now_date.strftime('%Y-%m-%d_%H-%M') outfile_name = (((mvip + '_cluster_faults_') + out_date) + '.txt') if os.path.exists(outfile_name): os.remove(outfile_name) print('Output file name is: {}'.format(outfile_name)) return outfile_name
Build the output filename
get_cluster_faults.py
get_filename
schubb2003/element
0
python
def get_filename(mvip): '\n \n ' now_date = datetime.now() out_date = now_date.strftime('%Y-%m-%d_%H-%M') outfile_name = (((mvip + '_cluster_faults_') + out_date) + '.txt') if os.path.exists(outfile_name): os.remove(outfile_name) print('Output file name is: {}'.format(outfile_name)) return outfile_name
def get_filename(mvip): '\n \n ' now_date = datetime.now() out_date = now_date.strftime('%Y-%m-%d_%H-%M') outfile_name = (((mvip + '_cluster_faults_') + out_date) + '.txt') if os.path.exists(outfile_name): os.remove(outfile_name) print('Output file name is: {}'.format(outfile_name)) return outfile_name<|docstring|>Build the output filename<|endoftext|>
3eaff96f062c650f8b9369c2c8795656659e83655a31bc42ea9744bbfe7a96d7
def main(): '\n Do the work\n ' (mvip, user, user_pass, mvip_node) = get_inputs() fault_payload = build_cluster_events() (headers, url) = build_auth(mvip, user, user_pass, mvip_node) response_json = connect_cluster(headers, url, fault_payload) fault_dict = parse_events(response_json) outfile_name = get_filename(mvip) print_table(outfile_name, fault_dict)
Do the work
get_cluster_faults.py
main
schubb2003/element
0
python
def main(): '\n \n ' (mvip, user, user_pass, mvip_node) = get_inputs() fault_payload = build_cluster_events() (headers, url) = build_auth(mvip, user, user_pass, mvip_node) response_json = connect_cluster(headers, url, fault_payload) fault_dict = parse_events(response_json) outfile_name = get_filename(mvip) print_table(outfile_name, fault_dict)
def main(): '\n \n ' (mvip, user, user_pass, mvip_node) = get_inputs() fault_payload = build_cluster_events() (headers, url) = build_auth(mvip, user, user_pass, mvip_node) response_json = connect_cluster(headers, url, fault_payload) fault_dict = parse_events(response_json) outfile_name = get_filename(mvip) print_table(outfile_name, fault_dict)<|docstring|>Do the work<|endoftext|>
a435253f81069e9b5374c51d80a27467e60ea59361bf7a5f1d2c15905caa0697
def conv2d(x, W): 'conv2d returns a 2d convolution layer with full stride.' return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')
conv2d returns a 2d convolution layer with full stride.
src/tf_train_mt_combined.py
conv2d
gycggd/leaf-classification
0
python
def conv2d(x, W): return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')
def conv2d(x, W): return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')<|docstring|>conv2d returns a 2d convolution layer with full stride.<|endoftext|>
82f251a0ed8019192dcbfb652e5573f5268568a7ebcc8bfeb831427797728c71
def max_pool_2x2(x): 'max_pool_2x2 downsamples a feature map by 2X.' return tf.nn.max_pool(x, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME')
max_pool_2x2 downsamples a feature map by 2X.
src/tf_train_mt_combined.py
max_pool_2x2
gycggd/leaf-classification
0
python
def max_pool_2x2(x): return tf.nn.max_pool(x, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME')
def max_pool_2x2(x): return tf.nn.max_pool(x, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME')<|docstring|>max_pool_2x2 downsamples a feature map by 2X.<|endoftext|>
3368701c8e647c6de9228543f9c8c4d2ed95de1428adb0a706db42b190c6d407
def weight_variable(shape, name=None): 'weight_variable generates a weight variable of a given shape.' initial = tf.truncated_normal(shape, stddev=0.1) return tf.Variable(initial, name=name)
weight_variable generates a weight variable of a given shape.
src/tf_train_mt_combined.py
weight_variable
gycggd/leaf-classification
0
python
def weight_variable(shape, name=None): initial = tf.truncated_normal(shape, stddev=0.1) return tf.Variable(initial, name=name)
def weight_variable(shape, name=None): initial = tf.truncated_normal(shape, stddev=0.1) return tf.Variable(initial, name=name)<|docstring|>weight_variable generates a weight variable of a given shape.<|endoftext|>
316a5066a2a2537e2af8189053d5a5540663f0a2c95314b6bf14e986b37afb86
def bias_variable(shape, name=None): 'bias_variable generates a bias variable of a given shape.' initial = tf.constant(0.1, shape=shape) return tf.Variable(initial, name=name)
bias_variable generates a bias variable of a given shape.
src/tf_train_mt_combined.py
bias_variable
gycggd/leaf-classification
0
python
def bias_variable(shape, name=None): initial = tf.constant(0.1, shape=shape) return tf.Variable(initial, name=name)
def bias_variable(shape, name=None): initial = tf.constant(0.1, shape=shape) return tf.Variable(initial, name=name)<|docstring|>bias_variable generates a bias variable of a given shape.<|endoftext|>
cd4b513793737ea087519829e81a1d3f5f5383098496254a2c5b8dbac06d7191
def test_attctl(self): 'Test offboard attitude control' boundary_x = 200 boundary_y = 100 boundary_z = 20 self.wait_for_topics(60) self.log_topic_vars() self.set_mode('OFFBOARD', 5) self.set_arm(True, 5) rospy.loginfo('run mission') rospy.loginfo('attempting to cross boundary | x: {0}, y: {1}, z: {2}'.format(boundary_x, boundary_y, boundary_z)) timeout = 90 loop_freq = 2 rate = rospy.Rate(loop_freq) crossed = False for i in xrange((timeout * loop_freq)): if ((self.local_position.pose.position.x > boundary_x) and (self.local_position.pose.position.y > boundary_y) and (self.local_position.pose.position.z > boundary_z)): rospy.loginfo('boundary crossed | seconds: {0} of {1}'.format((i / loop_freq), timeout)) crossed = True break try: rate.sleep() except rospy.ROSException as e: self.fail(e) self.assertTrue(crossed, 'took too long to cross boundaries | current position x: {0:.2f}, y: {1:.2f}, z: {2:.2f} | timeout(seconds): {3}'.format(self.local_position.pose.position.x, self.local_position.pose.position.y, self.local_position.pose.position.z, timeout)) self.set_mode('AUTO.LAND', 5) self.set_arm(False, 5)
Test offboard attitude control
integrationtests/python_src/px4_it/mavros/mavros_airsim_test.py
test_attctl
CodexLabsLLC/PX4-Autopilot
0
python
def test_attctl(self): boundary_x = 200 boundary_y = 100 boundary_z = 20 self.wait_for_topics(60) self.log_topic_vars() self.set_mode('OFFBOARD', 5) self.set_arm(True, 5) rospy.loginfo('run mission') rospy.loginfo('attempting to cross boundary | x: {0}, y: {1}, z: {2}'.format(boundary_x, boundary_y, boundary_z)) timeout = 90 loop_freq = 2 rate = rospy.Rate(loop_freq) crossed = False for i in xrange((timeout * loop_freq)): if ((self.local_position.pose.position.x > boundary_x) and (self.local_position.pose.position.y > boundary_y) and (self.local_position.pose.position.z > boundary_z)): rospy.loginfo('boundary crossed | seconds: {0} of {1}'.format((i / loop_freq), timeout)) crossed = True break try: rate.sleep() except rospy.ROSException as e: self.fail(e) self.assertTrue(crossed, 'took too long to cross boundaries | current position x: {0:.2f}, y: {1:.2f}, z: {2:.2f} | timeout(seconds): {3}'.format(self.local_position.pose.position.x, self.local_position.pose.position.y, self.local_position.pose.position.z, timeout)) self.set_mode('AUTO.LAND', 5) self.set_arm(False, 5)
def test_attctl(self): boundary_x = 200 boundary_y = 100 boundary_z = 20 self.wait_for_topics(60) self.log_topic_vars() self.set_mode('OFFBOARD', 5) self.set_arm(True, 5) rospy.loginfo('run mission') rospy.loginfo('attempting to cross boundary | x: {0}, y: {1}, z: {2}'.format(boundary_x, boundary_y, boundary_z)) timeout = 90 loop_freq = 2 rate = rospy.Rate(loop_freq) crossed = False for i in xrange((timeout * loop_freq)): if ((self.local_position.pose.position.x > boundary_x) and (self.local_position.pose.position.y > boundary_y) and (self.local_position.pose.position.z > boundary_z)): rospy.loginfo('boundary crossed | seconds: {0} of {1}'.format((i / loop_freq), timeout)) crossed = True break try: rate.sleep() except rospy.ROSException as e: self.fail(e) self.assertTrue(crossed, 'took too long to cross boundaries | current position x: {0:.2f}, y: {1:.2f}, z: {2:.2f} | timeout(seconds): {3}'.format(self.local_position.pose.position.x, self.local_position.pose.position.y, self.local_position.pose.position.z, timeout)) self.set_mode('AUTO.LAND', 5) self.set_arm(False, 5)<|docstring|>Test offboard attitude control<|endoftext|>
a9b2dff1e02a70cc090370e59fe3983e81e01de78b1a82a9ea6dc74c479d05ac
def isonow(): 'Return utc now in isoformat with timezone' return (utcnow().isoformat() + 'Z')
Return utc now in isoformat with timezone
lbrynet/utils.py
isonow
walidmujahid/lbry
0
python
def isonow(): return (utcnow().isoformat() + 'Z')
def isonow(): return (utcnow().isoformat() + 'Z')<|docstring|>Return utc now in isoformat with timezone<|endoftext|>
fe202a705b3f65dd0e6a082e1e0186f985fa54ba9b961d2a68393537224b2f68
def version_is_greater_than(a, b): 'Returns True if version a is more recent than version b' return (pkg_resources.parse_version(a) > pkg_resources.parse_version(b))
Returns True if version a is more recent than version b
lbrynet/utils.py
version_is_greater_than
walidmujahid/lbry
0
python
def version_is_greater_than(a, b): return (pkg_resources.parse_version(a) > pkg_resources.parse_version(b))
def version_is_greater_than(a, b): return (pkg_resources.parse_version(a) > pkg_resources.parse_version(b))<|docstring|>Returns True if version a is more recent than version b<|endoftext|>
aed205b0cfebe5d7c4fb22192f924192e226bc41bb7440f7a117a7ed414ea8cc
def check_connection(server='lbry.io', port=80, timeout=5): 'Attempts to open a socket to server:port and returns True if successful.' log.debug('Checking connection to %s:%s', server, port) try: server = socket.gethostbyname(server) conn = socket.create_connection((server, port), timeout) conn.close() log.debug('Connection successful') return True except (socket.gaierror, socket.herror) as ex: log.warning('Failed to connect to %s:%s. Unable to resolve domain. Trying to bypass DNS', server, port) try: server = '8.8.8.8' port = 53 socket.create_connection((server, port), timeout) log.debug('Connection successful') return True except Exception as ex: log.error('Failed to connect to %s:%s. Maybe the internet connection is not working', server, port) return False except Exception as ex: log.error('Failed to connect to %s:%s. Maybe the internet connection is not working', server, port) return False
Attempts to open a socket to server:port and returns True if successful.
lbrynet/utils.py
check_connection
walidmujahid/lbry
0
python
def check_connection(server='lbry.io', port=80, timeout=5): log.debug('Checking connection to %s:%s', server, port) try: server = socket.gethostbyname(server) conn = socket.create_connection((server, port), timeout) conn.close() log.debug('Connection successful') return True except (socket.gaierror, socket.herror) as ex: log.warning('Failed to connect to %s:%s. Unable to resolve domain. Trying to bypass DNS', server, port) try: server = '8.8.8.8' port = 53 socket.create_connection((server, port), timeout) log.debug('Connection successful') return True except Exception as ex: log.error('Failed to connect to %s:%s. Maybe the internet connection is not working', server, port) return False except Exception as ex: log.error('Failed to connect to %s:%s. Maybe the internet connection is not working', server, port) return False
def check_connection(server='lbry.io', port=80, timeout=5): log.debug('Checking connection to %s:%s', server, port) try: server = socket.gethostbyname(server) conn = socket.create_connection((server, port), timeout) conn.close() log.debug('Connection successful') return True except (socket.gaierror, socket.herror) as ex: log.warning('Failed to connect to %s:%s. Unable to resolve domain. Trying to bypass DNS', server, port) try: server = '8.8.8.8' port = 53 socket.create_connection((server, port), timeout) log.debug('Connection successful') return True except Exception as ex: log.error('Failed to connect to %s:%s. Maybe the internet connection is not working', server, port) return False except Exception as ex: log.error('Failed to connect to %s:%s. Maybe the internet connection is not working', server, port) return False<|docstring|>Attempts to open a socket to server:port and returns True if successful.<|endoftext|>
138ec07d9a39bc6dca14bb65a1048507a86bcef89289ca45b3ab6405542b7220
def nest_update_event_broker(hass, nest): '\n Dispatch SIGNAL_NEST_UPDATE to devices when nest stream API received data.\n\n Used for the legacy nest API.\n\n Runs in its own thread.\n ' _LOGGER.debug('Listening for nest.update_event') while hass.is_running: nest.update_event.wait() if (not hass.is_running): break nest.update_event.clear() _LOGGER.debug('Dispatching nest data update') dispatcher_send(hass, SIGNAL_NEST_UPDATE) _LOGGER.debug('Stop listening for nest.update_event')
Dispatch SIGNAL_NEST_UPDATE to devices when nest stream API received data. Used for the legacy nest API. Runs in its own thread.
homeassistant/components/nest/legacy/__init__.py
nest_update_event_broker
a-p-z/core
30,023
python
def nest_update_event_broker(hass, nest): '\n Dispatch SIGNAL_NEST_UPDATE to devices when nest stream API received data.\n\n Used for the legacy nest API.\n\n Runs in its own thread.\n ' _LOGGER.debug('Listening for nest.update_event') while hass.is_running: nest.update_event.wait() if (not hass.is_running): break nest.update_event.clear() _LOGGER.debug('Dispatching nest data update') dispatcher_send(hass, SIGNAL_NEST_UPDATE) _LOGGER.debug('Stop listening for nest.update_event')
def nest_update_event_broker(hass, nest): '\n Dispatch SIGNAL_NEST_UPDATE to devices when nest stream API received data.\n\n Used for the legacy nest API.\n\n Runs in its own thread.\n ' _LOGGER.debug('Listening for nest.update_event') while hass.is_running: nest.update_event.wait() if (not hass.is_running): break nest.update_event.clear() _LOGGER.debug('Dispatching nest data update') dispatcher_send(hass, SIGNAL_NEST_UPDATE) _LOGGER.debug('Stop listening for nest.update_event')<|docstring|>Dispatch SIGNAL_NEST_UPDATE to devices when nest stream API received data. Used for the legacy nest API. Runs in its own thread.<|endoftext|>
91a725fa18a7e365b292855777cc088bad3c8bd3970aa4c8f812f6628fc6850f
async def async_setup_legacy(hass: HomeAssistant, config: dict) -> bool: 'Set up Nest components using the legacy nest API.' if (DOMAIN not in config): return True conf = config[DOMAIN] local_auth.initialize(hass, conf[CONF_CLIENT_ID], conf[CONF_CLIENT_SECRET]) filename = config.get(CONF_FILENAME, NEST_CONFIG_FILE) access_token_cache_file = hass.config.path(filename) hass.async_create_task(hass.config_entries.flow.async_init(DOMAIN, context={'source': config_entries.SOURCE_IMPORT}, data={'nest_conf_path': access_token_cache_file})) hass.data[DATA_NEST_CONFIG] = conf return True
Set up Nest components using the legacy nest API.
homeassistant/components/nest/legacy/__init__.py
async_setup_legacy
a-p-z/core
30,023
python
async def async_setup_legacy(hass: HomeAssistant, config: dict) -> bool: if (DOMAIN not in config): return True conf = config[DOMAIN] local_auth.initialize(hass, conf[CONF_CLIENT_ID], conf[CONF_CLIENT_SECRET]) filename = config.get(CONF_FILENAME, NEST_CONFIG_FILE) access_token_cache_file = hass.config.path(filename) hass.async_create_task(hass.config_entries.flow.async_init(DOMAIN, context={'source': config_entries.SOURCE_IMPORT}, data={'nest_conf_path': access_token_cache_file})) hass.data[DATA_NEST_CONFIG] = conf return True
async def async_setup_legacy(hass: HomeAssistant, config: dict) -> bool: if (DOMAIN not in config): return True conf = config[DOMAIN] local_auth.initialize(hass, conf[CONF_CLIENT_ID], conf[CONF_CLIENT_SECRET]) filename = config.get(CONF_FILENAME, NEST_CONFIG_FILE) access_token_cache_file = hass.config.path(filename) hass.async_create_task(hass.config_entries.flow.async_init(DOMAIN, context={'source': config_entries.SOURCE_IMPORT}, data={'nest_conf_path': access_token_cache_file})) hass.data[DATA_NEST_CONFIG] = conf return True<|docstring|>Set up Nest components using the legacy nest API.<|endoftext|>
fe1455acca8e6ff6fd73e4dd8a3afe74379862d513d3b20fa6d5c5eb05ae6827
async def async_setup_legacy_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: 'Set up Nest from legacy config entry.' nest = Nest(access_token=entry.data['tokens']['access_token']) _LOGGER.debug('proceeding with setup') conf = hass.data.get(DATA_NEST_CONFIG, {}) hass.data[DATA_NEST] = NestLegacyDevice(hass, conf, nest) if (not (await hass.async_add_executor_job(hass.data[DATA_NEST].initialize))): return False hass.config_entries.async_setup_platforms(entry, PLATFORMS) def validate_structures(target_structures): all_structures = [structure.name for structure in nest.structures] for target in target_structures: if (target not in all_structures): _LOGGER.info('Invalid structure: %s', target) def set_away_mode(service): 'Set the away mode for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): _LOGGER.info('Setting away mode for: %s to: %s', structure.name, service.data[ATTR_AWAY_MODE]) structure.away = service.data[ATTR_AWAY_MODE] def set_eta(service): 'Set away mode to away and include ETA for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: _LOGGER.info('Setting away mode for: %s to: %s', structure.name, AWAY_MODE_AWAY) structure.away = AWAY_MODE_AWAY now = datetime.utcnow() trip_id = service.data.get(ATTR_TRIP_ID, f'trip_{int(now.timestamp())}') eta_begin = (now + service.data[ATTR_ETA]) eta_window = service.data.get(ATTR_ETA_WINDOW, timedelta(minutes=1)) eta_end = (eta_begin + eta_window) _LOGGER.info('Setting ETA for trip: %s, ETA window starts at: %s and ends at: %s', trip_id, eta_begin, eta_end) structure.set_eta(trip_id, eta_begin, eta_end) else: _LOGGER.info('No thermostats found in structure: %s, unable to set ETA', structure.name) def cancel_eta(service): 'Cancel ETA for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: trip_id = service.data[ATTR_TRIP_ID] _LOGGER.info('Cancelling ETA for trip: %s', trip_id) structure.cancel_eta(trip_id) else: _LOGGER.info('No thermostats found in structure: %s, unable to cancel ETA', structure.name) hass.services.async_register(DOMAIN, SERVICE_SET_AWAY_MODE, set_away_mode, schema=SET_AWAY_MODE_SCHEMA) hass.services.async_register(DOMAIN, SERVICE_SET_ETA, set_eta, schema=SET_ETA_SCHEMA) hass.services.async_register(DOMAIN, SERVICE_CANCEL_ETA, cancel_eta, schema=CANCEL_ETA_SCHEMA) @callback def start_up(event): 'Start Nest update event listener.' threading.Thread(name='Nest update listener', target=nest_update_event_broker, args=(hass, nest)).start() hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, start_up) @callback def shut_down(event): 'Stop Nest update event listener.' nest.update_event.set() entry.async_on_unload(hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, shut_down)) _LOGGER.debug('async_setup_nest is done') return True
Set up Nest from legacy config entry.
homeassistant/components/nest/legacy/__init__.py
async_setup_legacy_entry
a-p-z/core
30,023
python
async def async_setup_legacy_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: nest = Nest(access_token=entry.data['tokens']['access_token']) _LOGGER.debug('proceeding with setup') conf = hass.data.get(DATA_NEST_CONFIG, {}) hass.data[DATA_NEST] = NestLegacyDevice(hass, conf, nest) if (not (await hass.async_add_executor_job(hass.data[DATA_NEST].initialize))): return False hass.config_entries.async_setup_platforms(entry, PLATFORMS) def validate_structures(target_structures): all_structures = [structure.name for structure in nest.structures] for target in target_structures: if (target not in all_structures): _LOGGER.info('Invalid structure: %s', target) def set_away_mode(service): 'Set the away mode for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): _LOGGER.info('Setting away mode for: %s to: %s', structure.name, service.data[ATTR_AWAY_MODE]) structure.away = service.data[ATTR_AWAY_MODE] def set_eta(service): 'Set away mode to away and include ETA for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: _LOGGER.info('Setting away mode for: %s to: %s', structure.name, AWAY_MODE_AWAY) structure.away = AWAY_MODE_AWAY now = datetime.utcnow() trip_id = service.data.get(ATTR_TRIP_ID, f'trip_{int(now.timestamp())}') eta_begin = (now + service.data[ATTR_ETA]) eta_window = service.data.get(ATTR_ETA_WINDOW, timedelta(minutes=1)) eta_end = (eta_begin + eta_window) _LOGGER.info('Setting ETA for trip: %s, ETA window starts at: %s and ends at: %s', trip_id, eta_begin, eta_end) structure.set_eta(trip_id, eta_begin, eta_end) else: _LOGGER.info('No thermostats found in structure: %s, unable to set ETA', structure.name) def cancel_eta(service): 'Cancel ETA for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: trip_id = service.data[ATTR_TRIP_ID] _LOGGER.info('Cancelling ETA for trip: %s', trip_id) structure.cancel_eta(trip_id) else: _LOGGER.info('No thermostats found in structure: %s, unable to cancel ETA', structure.name) hass.services.async_register(DOMAIN, SERVICE_SET_AWAY_MODE, set_away_mode, schema=SET_AWAY_MODE_SCHEMA) hass.services.async_register(DOMAIN, SERVICE_SET_ETA, set_eta, schema=SET_ETA_SCHEMA) hass.services.async_register(DOMAIN, SERVICE_CANCEL_ETA, cancel_eta, schema=CANCEL_ETA_SCHEMA) @callback def start_up(event): 'Start Nest update event listener.' threading.Thread(name='Nest update listener', target=nest_update_event_broker, args=(hass, nest)).start() hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, start_up) @callback def shut_down(event): 'Stop Nest update event listener.' nest.update_event.set() entry.async_on_unload(hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, shut_down)) _LOGGER.debug('async_setup_nest is done') return True
async def async_setup_legacy_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: nest = Nest(access_token=entry.data['tokens']['access_token']) _LOGGER.debug('proceeding with setup') conf = hass.data.get(DATA_NEST_CONFIG, {}) hass.data[DATA_NEST] = NestLegacyDevice(hass, conf, nest) if (not (await hass.async_add_executor_job(hass.data[DATA_NEST].initialize))): return False hass.config_entries.async_setup_platforms(entry, PLATFORMS) def validate_structures(target_structures): all_structures = [structure.name for structure in nest.structures] for target in target_structures: if (target not in all_structures): _LOGGER.info('Invalid structure: %s', target) def set_away_mode(service): 'Set the away mode for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): _LOGGER.info('Setting away mode for: %s to: %s', structure.name, service.data[ATTR_AWAY_MODE]) structure.away = service.data[ATTR_AWAY_MODE] def set_eta(service): 'Set away mode to away and include ETA for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: _LOGGER.info('Setting away mode for: %s to: %s', structure.name, AWAY_MODE_AWAY) structure.away = AWAY_MODE_AWAY now = datetime.utcnow() trip_id = service.data.get(ATTR_TRIP_ID, f'trip_{int(now.timestamp())}') eta_begin = (now + service.data[ATTR_ETA]) eta_window = service.data.get(ATTR_ETA_WINDOW, timedelta(minutes=1)) eta_end = (eta_begin + eta_window) _LOGGER.info('Setting ETA for trip: %s, ETA window starts at: %s and ends at: %s', trip_id, eta_begin, eta_end) structure.set_eta(trip_id, eta_begin, eta_end) else: _LOGGER.info('No thermostats found in structure: %s, unable to set ETA', structure.name) def cancel_eta(service): 'Cancel ETA for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: trip_id = service.data[ATTR_TRIP_ID] _LOGGER.info('Cancelling ETA for trip: %s', trip_id) structure.cancel_eta(trip_id) else: _LOGGER.info('No thermostats found in structure: %s, unable to cancel ETA', structure.name) hass.services.async_register(DOMAIN, SERVICE_SET_AWAY_MODE, set_away_mode, schema=SET_AWAY_MODE_SCHEMA) hass.services.async_register(DOMAIN, SERVICE_SET_ETA, set_eta, schema=SET_ETA_SCHEMA) hass.services.async_register(DOMAIN, SERVICE_CANCEL_ETA, cancel_eta, schema=CANCEL_ETA_SCHEMA) @callback def start_up(event): 'Start Nest update event listener.' threading.Thread(name='Nest update listener', target=nest_update_event_broker, args=(hass, nest)).start() hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, start_up) @callback def shut_down(event): 'Stop Nest update event listener.' nest.update_event.set() entry.async_on_unload(hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, shut_down)) _LOGGER.debug('async_setup_nest is done') return True<|docstring|>Set up Nest from legacy config entry.<|endoftext|>
cf277664b1a0f71ae33a8552857b2154070eb87b4c253f691cb99d9abe4f33e8
def set_away_mode(service): 'Set the away mode for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): _LOGGER.info('Setting away mode for: %s to: %s', structure.name, service.data[ATTR_AWAY_MODE]) structure.away = service.data[ATTR_AWAY_MODE]
Set the away mode for a Nest structure.
homeassistant/components/nest/legacy/__init__.py
set_away_mode
a-p-z/core
30,023
python
def set_away_mode(service): if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): _LOGGER.info('Setting away mode for: %s to: %s', structure.name, service.data[ATTR_AWAY_MODE]) structure.away = service.data[ATTR_AWAY_MODE]
def set_away_mode(service): if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): _LOGGER.info('Setting away mode for: %s to: %s', structure.name, service.data[ATTR_AWAY_MODE]) structure.away = service.data[ATTR_AWAY_MODE]<|docstring|>Set the away mode for a Nest structure.<|endoftext|>
5560012c599711ebee88faa4efd25b0809633be6e52da27198eac65e217cb82a
def set_eta(service): 'Set away mode to away and include ETA for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: _LOGGER.info('Setting away mode for: %s to: %s', structure.name, AWAY_MODE_AWAY) structure.away = AWAY_MODE_AWAY now = datetime.utcnow() trip_id = service.data.get(ATTR_TRIP_ID, f'trip_{int(now.timestamp())}') eta_begin = (now + service.data[ATTR_ETA]) eta_window = service.data.get(ATTR_ETA_WINDOW, timedelta(minutes=1)) eta_end = (eta_begin + eta_window) _LOGGER.info('Setting ETA for trip: %s, ETA window starts at: %s and ends at: %s', trip_id, eta_begin, eta_end) structure.set_eta(trip_id, eta_begin, eta_end) else: _LOGGER.info('No thermostats found in structure: %s, unable to set ETA', structure.name)
Set away mode to away and include ETA for a Nest structure.
homeassistant/components/nest/legacy/__init__.py
set_eta
a-p-z/core
30,023
python
def set_eta(service): if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: _LOGGER.info('Setting away mode for: %s to: %s', structure.name, AWAY_MODE_AWAY) structure.away = AWAY_MODE_AWAY now = datetime.utcnow() trip_id = service.data.get(ATTR_TRIP_ID, f'trip_{int(now.timestamp())}') eta_begin = (now + service.data[ATTR_ETA]) eta_window = service.data.get(ATTR_ETA_WINDOW, timedelta(minutes=1)) eta_end = (eta_begin + eta_window) _LOGGER.info('Setting ETA for trip: %s, ETA window starts at: %s and ends at: %s', trip_id, eta_begin, eta_end) structure.set_eta(trip_id, eta_begin, eta_end) else: _LOGGER.info('No thermostats found in structure: %s, unable to set ETA', structure.name)
def set_eta(service): if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: _LOGGER.info('Setting away mode for: %s to: %s', structure.name, AWAY_MODE_AWAY) structure.away = AWAY_MODE_AWAY now = datetime.utcnow() trip_id = service.data.get(ATTR_TRIP_ID, f'trip_{int(now.timestamp())}') eta_begin = (now + service.data[ATTR_ETA]) eta_window = service.data.get(ATTR_ETA_WINDOW, timedelta(minutes=1)) eta_end = (eta_begin + eta_window) _LOGGER.info('Setting ETA for trip: %s, ETA window starts at: %s and ends at: %s', trip_id, eta_begin, eta_end) structure.set_eta(trip_id, eta_begin, eta_end) else: _LOGGER.info('No thermostats found in structure: %s, unable to set ETA', structure.name)<|docstring|>Set away mode to away and include ETA for a Nest structure.<|endoftext|>
caa3245f4ffe2a2bf19c3f3c26957d16a2ab3063c02d2e784c6b041757a7b399
def cancel_eta(service): 'Cancel ETA for a Nest structure.' if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: trip_id = service.data[ATTR_TRIP_ID] _LOGGER.info('Cancelling ETA for trip: %s', trip_id) structure.cancel_eta(trip_id) else: _LOGGER.info('No thermostats found in structure: %s, unable to cancel ETA', structure.name)
Cancel ETA for a Nest structure.
homeassistant/components/nest/legacy/__init__.py
cancel_eta
a-p-z/core
30,023
python
def cancel_eta(service): if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: trip_id = service.data[ATTR_TRIP_ID] _LOGGER.info('Cancelling ETA for trip: %s', trip_id) structure.cancel_eta(trip_id) else: _LOGGER.info('No thermostats found in structure: %s, unable to cancel ETA', structure.name)
def cancel_eta(service): if (ATTR_STRUCTURE in service.data): target_structures = service.data[ATTR_STRUCTURE] validate_structures(target_structures) else: target_structures = hass.data[DATA_NEST].local_structure for structure in nest.structures: if (structure.name in target_structures): if structure.thermostats: trip_id = service.data[ATTR_TRIP_ID] _LOGGER.info('Cancelling ETA for trip: %s', trip_id) structure.cancel_eta(trip_id) else: _LOGGER.info('No thermostats found in structure: %s, unable to cancel ETA', structure.name)<|docstring|>Cancel ETA for a Nest structure.<|endoftext|>
0b01f5eaa79a92814be024f81ec27ee16037db676d34344e61aaa8439e50deba
@callback def start_up(event): 'Start Nest update event listener.' threading.Thread(name='Nest update listener', target=nest_update_event_broker, args=(hass, nest)).start()
Start Nest update event listener.
homeassistant/components/nest/legacy/__init__.py
start_up
a-p-z/core
30,023
python
@callback def start_up(event): threading.Thread(name='Nest update listener', target=nest_update_event_broker, args=(hass, nest)).start()
@callback def start_up(event): threading.Thread(name='Nest update listener', target=nest_update_event_broker, args=(hass, nest)).start()<|docstring|>Start Nest update event listener.<|endoftext|>
22525f369d4b32682f82ad710a3b5f64e9fbb088d2a774f105fb325957f73b97
@callback def shut_down(event): 'Stop Nest update event listener.' nest.update_event.set()
Stop Nest update event listener.
homeassistant/components/nest/legacy/__init__.py
shut_down
a-p-z/core
30,023
python
@callback def shut_down(event): nest.update_event.set()
@callback def shut_down(event): nest.update_event.set()<|docstring|>Stop Nest update event listener.<|endoftext|>
4faaee5db5bfd65439a5141a61bd53aba74eb11a093e44cb91fde27fb59071ae
def __init__(self, hass, conf, nest): 'Init Nest Devices.' self.hass = hass self.nest = nest self.local_structure = conf.get(CONF_STRUCTURE)
Init Nest Devices.
homeassistant/components/nest/legacy/__init__.py
__init__
a-p-z/core
30,023
python
def __init__(self, hass, conf, nest): self.hass = hass self.nest = nest self.local_structure = conf.get(CONF_STRUCTURE)
def __init__(self, hass, conf, nest): self.hass = hass self.nest = nest self.local_structure = conf.get(CONF_STRUCTURE)<|docstring|>Init Nest Devices.<|endoftext|>
dbce6494fe280123c2eed1c69fabd0902e8427c0910b3b41d36b121e3f7ef0a0
def initialize(self): 'Initialize Nest.' try: structure_names = [s.name for s in self.nest.structures] if (self.local_structure is None): self.local_structure = structure_names except (AuthorizationError, APIError, OSError) as err: _LOGGER.error('Connection error while access Nest web service: %s', err) return False return True
Initialize Nest.
homeassistant/components/nest/legacy/__init__.py
initialize
a-p-z/core
30,023
python
def initialize(self): try: structure_names = [s.name for s in self.nest.structures] if (self.local_structure is None): self.local_structure = structure_names except (AuthorizationError, APIError, OSError) as err: _LOGGER.error('Connection error while access Nest web service: %s', err) return False return True
def initialize(self): try: structure_names = [s.name for s in self.nest.structures] if (self.local_structure is None): self.local_structure = structure_names except (AuthorizationError, APIError, OSError) as err: _LOGGER.error('Connection error while access Nest web service: %s', err) return False return True<|docstring|>Initialize Nest.<|endoftext|>
5411f742d68080e13e76cc6bb9bd308788fc76d0c95813b2dcec367313486934
def structures(self): 'Generate a list of structures.' try: for structure in self.nest.structures: if (structure.name not in self.local_structure): _LOGGER.debug('Ignoring structure %s, not in %s', structure.name, self.local_structure) continue (yield structure) except (AuthorizationError, APIError, OSError) as err: _LOGGER.error('Connection error while access Nest web service: %s', err)
Generate a list of structures.
homeassistant/components/nest/legacy/__init__.py
structures
a-p-z/core
30,023
python
def structures(self): try: for structure in self.nest.structures: if (structure.name not in self.local_structure): _LOGGER.debug('Ignoring structure %s, not in %s', structure.name, self.local_structure) continue (yield structure) except (AuthorizationError, APIError, OSError) as err: _LOGGER.error('Connection error while access Nest web service: %s', err)
def structures(self): try: for structure in self.nest.structures: if (structure.name not in self.local_structure): _LOGGER.debug('Ignoring structure %s, not in %s', structure.name, self.local_structure) continue (yield structure) except (AuthorizationError, APIError, OSError) as err: _LOGGER.error('Connection error while access Nest web service: %s', err)<|docstring|>Generate a list of structures.<|endoftext|>
9e96ee6c037f4914ff56aac2797695368d2b3a954db5b151411e5713544651a0
def thermostats(self): 'Generate a list of thermostats.' return self._devices('thermostats')
Generate a list of thermostats.
homeassistant/components/nest/legacy/__init__.py
thermostats
a-p-z/core
30,023
python
def thermostats(self): return self._devices('thermostats')
def thermostats(self): return self._devices('thermostats')<|docstring|>Generate a list of thermostats.<|endoftext|>
ba3296d056cc647d28436297db7bdfb1993ae00bdca1023be5bd8b17c67f2731
def smoke_co_alarms(self): 'Generate a list of smoke co alarms.' return self._devices('smoke_co_alarms')
Generate a list of smoke co alarms.
homeassistant/components/nest/legacy/__init__.py
smoke_co_alarms
a-p-z/core
30,023
python
def smoke_co_alarms(self): return self._devices('smoke_co_alarms')
def smoke_co_alarms(self): return self._devices('smoke_co_alarms')<|docstring|>Generate a list of smoke co alarms.<|endoftext|>
34c5fc9500fbf84681d399102627f9c05a3e47eaf519da95b02bafff913fea26
def cameras(self): 'Generate a list of cameras.' return self._devices('cameras')
Generate a list of cameras.
homeassistant/components/nest/legacy/__init__.py
cameras
a-p-z/core
30,023
python
def cameras(self): return self._devices('cameras')
def cameras(self): return self._devices('cameras')<|docstring|>Generate a list of cameras.<|endoftext|>
65fb1fb9bcc0b81c5c2011fe5ba892dd7d9174624ed43d627066029b750ecc9d
def _devices(self, device_type): 'Generate a list of Nest devices.' try: for structure in self.nest.structures: if (structure.name not in self.local_structure): _LOGGER.debug('Ignoring structure %s, not in %s', structure.name, self.local_structure) continue for device in getattr(structure, device_type, []): try: device.name_long except KeyError: _LOGGER.warning('Cannot retrieve device name for [%s], please check your Nest developer account permission settings', device.serial) continue (yield (structure, device)) except (AuthorizationError, APIError, OSError) as err: _LOGGER.error('Connection error while access Nest web service: %s', err)
Generate a list of Nest devices.
homeassistant/components/nest/legacy/__init__.py
_devices
a-p-z/core
30,023
python
def _devices(self, device_type): try: for structure in self.nest.structures: if (structure.name not in self.local_structure): _LOGGER.debug('Ignoring structure %s, not in %s', structure.name, self.local_structure) continue for device in getattr(structure, device_type, []): try: device.name_long except KeyError: _LOGGER.warning('Cannot retrieve device name for [%s], please check your Nest developer account permission settings', device.serial) continue (yield (structure, device)) except (AuthorizationError, APIError, OSError) as err: _LOGGER.error('Connection error while access Nest web service: %s', err)
def _devices(self, device_type): try: for structure in self.nest.structures: if (structure.name not in self.local_structure): _LOGGER.debug('Ignoring structure %s, not in %s', structure.name, self.local_structure) continue for device in getattr(structure, device_type, []): try: device.name_long except KeyError: _LOGGER.warning('Cannot retrieve device name for [%s], please check your Nest developer account permission settings', device.serial) continue (yield (structure, device)) except (AuthorizationError, APIError, OSError) as err: _LOGGER.error('Connection error while access Nest web service: %s', err)<|docstring|>Generate a list of Nest devices.<|endoftext|>
ae7ba96eed9443cfcf8be96de5550dbeb7695cdb241a30e6dbb2739d091f56f8
def __init__(self, structure, device, variable): 'Initialize the sensor.' self.structure = structure self.variable = variable if (device is not None): self.device = device self._name = f"{self.device.name_long} {self.variable.replace('_', ' ')}" else: self.device = structure self._name = f"{self.structure.name} {self.variable.replace('_', ' ')}" self._state = None self._unit = None
Initialize the sensor.
homeassistant/components/nest/legacy/__init__.py
__init__
a-p-z/core
30,023
python
def __init__(self, structure, device, variable): self.structure = structure self.variable = variable if (device is not None): self.device = device self._name = f"{self.device.name_long} {self.variable.replace('_', ' ')}" else: self.device = structure self._name = f"{self.structure.name} {self.variable.replace('_', ' ')}" self._state = None self._unit = None
def __init__(self, structure, device, variable): self.structure = structure self.variable = variable if (device is not None): self.device = device self._name = f"{self.device.name_long} {self.variable.replace('_', ' ')}" else: self.device = structure self._name = f"{self.structure.name} {self.variable.replace('_', ' ')}" self._state = None self._unit = None<|docstring|>Initialize the sensor.<|endoftext|>
a02c5bdebdfa2c15eb688e7954a2f2aaa703cfebaabe96346dcb61f14b0de15e
@property def name(self): 'Return the name of the nest, if any.' return self._name
Return the name of the nest, if any.
homeassistant/components/nest/legacy/__init__.py
name
a-p-z/core
30,023
python
@property def name(self): return self._name
@property def name(self): return self._name<|docstring|>Return the name of the nest, if any.<|endoftext|>
0c62cba090aeca8ee9202e5905dacc5dae8c310a0345093cb9828516f899ee58
@property def should_poll(self): 'Do not need poll thanks using Nest streaming API.' return False
Do not need poll thanks using Nest streaming API.
homeassistant/components/nest/legacy/__init__.py
should_poll
a-p-z/core
30,023
python
@property def should_poll(self): return False
@property def should_poll(self): return False<|docstring|>Do not need poll thanks using Nest streaming API.<|endoftext|>
300f67ba4d5417719959ac050320868d0c8ad6a3c979a570d8bc9844206aeeaa
@property def unique_id(self): 'Return unique id based on device serial and variable.' return f'{self.device.serial}-{self.variable}'
Return unique id based on device serial and variable.
homeassistant/components/nest/legacy/__init__.py
unique_id
a-p-z/core
30,023
python
@property def unique_id(self): return f'{self.device.serial}-{self.variable}'
@property def unique_id(self): return f'{self.device.serial}-{self.variable}'<|docstring|>Return unique id based on device serial and variable.<|endoftext|>
4418a49adf4fa81b9234037abb0c15f1f12bbd267d09bb939760b8cac3bf4bac
@property def device_info(self) -> DeviceInfo: 'Return information about the device.' if (not hasattr(self.device, 'name_long')): name = self.structure.name model = 'Structure' else: name = self.device.name_long if self.device.is_thermostat: model = 'Thermostat' elif self.device.is_camera: model = 'Camera' elif self.device.is_smoke_co_alarm: model = 'Nest Protect' else: model = None return DeviceInfo(identifiers={(DOMAIN, self.device.serial)}, manufacturer='Nest Labs', model=model, name=name)
Return information about the device.
homeassistant/components/nest/legacy/__init__.py
device_info
a-p-z/core
30,023
python
@property def device_info(self) -> DeviceInfo: if (not hasattr(self.device, 'name_long')): name = self.structure.name model = 'Structure' else: name = self.device.name_long if self.device.is_thermostat: model = 'Thermostat' elif self.device.is_camera: model = 'Camera' elif self.device.is_smoke_co_alarm: model = 'Nest Protect' else: model = None return DeviceInfo(identifiers={(DOMAIN, self.device.serial)}, manufacturer='Nest Labs', model=model, name=name)
@property def device_info(self) -> DeviceInfo: if (not hasattr(self.device, 'name_long')): name = self.structure.name model = 'Structure' else: name = self.device.name_long if self.device.is_thermostat: model = 'Thermostat' elif self.device.is_camera: model = 'Camera' elif self.device.is_smoke_co_alarm: model = 'Nest Protect' else: model = None return DeviceInfo(identifiers={(DOMAIN, self.device.serial)}, manufacturer='Nest Labs', model=model, name=name)<|docstring|>Return information about the device.<|endoftext|>
7e74889f15abb6594e7f57e7f49d7f6d8339266c765d45b1c8fab66ebdc66243
def update(self): 'Do not use NestSensorDevice directly.' raise NotImplementedError
Do not use NestSensorDevice directly.
homeassistant/components/nest/legacy/__init__.py
update
a-p-z/core
30,023
python
def update(self): raise NotImplementedError
def update(self): raise NotImplementedError<|docstring|>Do not use NestSensorDevice directly.<|endoftext|>
0ad7d7aab5c97338964a327c0a385c61851b5f961104b440d0cebef9e15190e0
async def async_added_to_hass(self): 'Register update signal handler.' async def async_update_state(): 'Update sensor state.' (await self.async_update_ha_state(True)) self.async_on_remove(async_dispatcher_connect(self.hass, SIGNAL_NEST_UPDATE, async_update_state))
Register update signal handler.
homeassistant/components/nest/legacy/__init__.py
async_added_to_hass
a-p-z/core
30,023
python
async def async_added_to_hass(self): async def async_update_state(): 'Update sensor state.' (await self.async_update_ha_state(True)) self.async_on_remove(async_dispatcher_connect(self.hass, SIGNAL_NEST_UPDATE, async_update_state))
async def async_added_to_hass(self): async def async_update_state(): 'Update sensor state.' (await self.async_update_ha_state(True)) self.async_on_remove(async_dispatcher_connect(self.hass, SIGNAL_NEST_UPDATE, async_update_state))<|docstring|>Register update signal handler.<|endoftext|>
15b82bf372f2ca323da4fbd108626eece1e0b6824adfaa0a373bf6843134c9f9
async def async_update_state(): 'Update sensor state.' (await self.async_update_ha_state(True))
Update sensor state.
homeassistant/components/nest/legacy/__init__.py
async_update_state
a-p-z/core
30,023
python
async def async_update_state(): (await self.async_update_ha_state(True))
async def async_update_state(): (await self.async_update_ha_state(True))<|docstring|>Update sensor state.<|endoftext|>
2d8676eb7b7963defd3f3472d3917712bbec45639e4af1115fbd05321ba19d29
def __init__(self, featureA, featureB, color=colors.lightgreen, border=None, flip=False): 'Create a new cross link.\n\n Arguments featureA and featureB should GenomeDiagram feature objects,\n or 3-tuples (track object, start, end), and currently must be on\n different tracks.\n\n The color and border arguments should be ReportLab colour objects, or\n for border use a boolean False for no border, otherwise it defaults to\n the same as the main colour.\n\n The flip argument draws an inverted cross link, useful for showing a\n mapping where one sequence has been reversed. It is conventional to\n also use a different colour (e.g. red for simple links, blue for any\n flipped links).\n ' self.featureA = featureA self.featureB = featureB self.color = color self.border = border self.flip = flip
Create a new cross link. Arguments featureA and featureB should GenomeDiagram feature objects, or 3-tuples (track object, start, end), and currently must be on different tracks. The color and border arguments should be ReportLab colour objects, or for border use a boolean False for no border, otherwise it defaults to the same as the main colour. The flip argument draws an inverted cross link, useful for showing a mapping where one sequence has been reversed. It is conventional to also use a different colour (e.g. red for simple links, blue for any flipped links).
Bio/Graphics/GenomeDiagram/_CrossLink.py
__init__
ToyokoLabs/biopython
2,856
python
def __init__(self, featureA, featureB, color=colors.lightgreen, border=None, flip=False): 'Create a new cross link.\n\n Arguments featureA and featureB should GenomeDiagram feature objects,\n or 3-tuples (track object, start, end), and currently must be on\n different tracks.\n\n The color and border arguments should be ReportLab colour objects, or\n for border use a boolean False for no border, otherwise it defaults to\n the same as the main colour.\n\n The flip argument draws an inverted cross link, useful for showing a\n mapping where one sequence has been reversed. It is conventional to\n also use a different colour (e.g. red for simple links, blue for any\n flipped links).\n ' self.featureA = featureA self.featureB = featureB self.color = color self.border = border self.flip = flip
def __init__(self, featureA, featureB, color=colors.lightgreen, border=None, flip=False): 'Create a new cross link.\n\n Arguments featureA and featureB should GenomeDiagram feature objects,\n or 3-tuples (track object, start, end), and currently must be on\n different tracks.\n\n The color and border arguments should be ReportLab colour objects, or\n for border use a boolean False for no border, otherwise it defaults to\n the same as the main colour.\n\n The flip argument draws an inverted cross link, useful for showing a\n mapping where one sequence has been reversed. It is conventional to\n also use a different colour (e.g. red for simple links, blue for any\n flipped links).\n ' self.featureA = featureA self.featureB = featureB self.color = color self.border = border self.flip = flip<|docstring|>Create a new cross link. Arguments featureA and featureB should GenomeDiagram feature objects, or 3-tuples (track object, start, end), and currently must be on different tracks. The color and border arguments should be ReportLab colour objects, or for border use a boolean False for no border, otherwise it defaults to the same as the main colour. The flip argument draws an inverted cross link, useful for showing a mapping where one sequence has been reversed. It is conventional to also use a different colour (e.g. red for simple links, blue for any flipped links).<|endoftext|>
d99fb41accc279291378667d5a96ba5d6fac5b22c1c4f87fb34bdbdba20d4579
@property def startA(self): 'Start position of Feature A.' try: return self.featureA.start except AttributeError: (track, start, end) = self.featureA return start
Start position of Feature A.
Bio/Graphics/GenomeDiagram/_CrossLink.py
startA
ToyokoLabs/biopython
2,856
python
@property def startA(self): try: return self.featureA.start except AttributeError: (track, start, end) = self.featureA return start
@property def startA(self): try: return self.featureA.start except AttributeError: (track, start, end) = self.featureA return start<|docstring|>Start position of Feature A.<|endoftext|>
e2425969dc64542a869c54e6c3d66bfb8b32381118f6acb5b876dbbefe5f8b5d
@property def endA(self): 'End position of Feature A.' try: return self.featureA.end except AttributeError: (track, start, end) = self.featureA return end
End position of Feature A.
Bio/Graphics/GenomeDiagram/_CrossLink.py
endA
ToyokoLabs/biopython
2,856
python
@property def endA(self): try: return self.featureA.end except AttributeError: (track, start, end) = self.featureA return end
@property def endA(self): try: return self.featureA.end except AttributeError: (track, start, end) = self.featureA return end<|docstring|>End position of Feature A.<|endoftext|>
3b96d8b2765e54cd3fa684d4324f3bb42e9bacd41988e6a82dbac1ee742243aa
@property def startB(self): 'Start position of Feature B.' try: return self.featureB.start except AttributeError: (track, start, end) = self.featureB return start
Start position of Feature B.
Bio/Graphics/GenomeDiagram/_CrossLink.py
startB
ToyokoLabs/biopython
2,856
python
@property def startB(self): try: return self.featureB.start except AttributeError: (track, start, end) = self.featureB return start
@property def startB(self): try: return self.featureB.start except AttributeError: (track, start, end) = self.featureB return start<|docstring|>Start position of Feature B.<|endoftext|>
09e9e8cca04ed0f097d1b44eaad97d51cd96ce029cbbe9f53d1e983cb52ba3a9
@property def endB(self): 'End position of Feature B.' try: return self.featureB.end except AttributeError: (track, start, end) = self.featureB return end
End position of Feature B.
Bio/Graphics/GenomeDiagram/_CrossLink.py
endB
ToyokoLabs/biopython
2,856
python
@property def endB(self): try: return self.featureB.end except AttributeError: (track, start, end) = self.featureB return end
@property def endB(self): try: return self.featureB.end except AttributeError: (track, start, end) = self.featureB return end<|docstring|>End position of Feature B.<|endoftext|>