repository_name stringlengths 7 55 | func_path_in_repository stringlengths 4 223 | func_name stringlengths 1 134 | whole_func_string stringlengths 75 104k | language stringclasses 1
value | func_code_string stringlengths 75 104k | func_code_tokens listlengths 19 28.4k | func_documentation_string stringlengths 1 46.9k | func_documentation_tokens listlengths 1 1.97k | split_name stringclasses 1
value | func_code_url stringlengths 87 315 |
|---|---|---|---|---|---|---|---|---|---|---|
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/table/tableservice.py | TableService.insert_or_replace_entity | def insert_or_replace_entity(self, table_name, entity, timeout=None):
'''
Replaces an existing entity or inserts a new entity if it does not
exist in the table. Because this operation can insert or update an
entity, it is also known as an "upsert" operation.
If insert_or_replace... | python | def insert_or_replace_entity(self, table_name, entity, timeout=None):
'''
Replaces an existing entity or inserts a new entity if it does not
exist in the table. Because this operation can insert or update an
entity, it is also known as an "upsert" operation.
If insert_or_replace... | [
"def",
"insert_or_replace_entity",
"(",
"self",
",",
"table_name",
",",
"entity",
",",
"timeout",
"=",
"None",
")",
":",
"_validate_not_none",
"(",
"'table_name'",
",",
"table_name",
")",
"request",
"=",
"_insert_or_replace_entity",
"(",
"entity",
")",
"request",
... | Replaces an existing entity or inserts a new entity if it does not
exist in the table. Because this operation can insert or update an
entity, it is also known as an "upsert" operation.
If insert_or_replace_entity is used to replace an entity, any properties
from the previous entity wil... | [
"Replaces",
"an",
"existing",
"entity",
"or",
"inserts",
"a",
"new",
"entity",
"if",
"it",
"does",
"not",
"exist",
"in",
"the",
"table",
".",
"Because",
"this",
"operation",
"can",
"insert",
"or",
"update",
"an",
"entity",
"it",
"is",
"also",
"known",
"a... | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L945-L973 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/table/tableservice.py | TableService.insert_or_merge_entity | def insert_or_merge_entity(self, table_name, entity, timeout=None):
'''
Merges an existing entity or inserts a new entity if it does not exist
in the table.
If insert_or_merge_entity is used to merge an entity, any properties from
the previous entity will be retained if the re... | python | def insert_or_merge_entity(self, table_name, entity, timeout=None):
'''
Merges an existing entity or inserts a new entity if it does not exist
in the table.
If insert_or_merge_entity is used to merge an entity, any properties from
the previous entity will be retained if the re... | [
"def",
"insert_or_merge_entity",
"(",
"self",
",",
"table_name",
",",
"entity",
",",
"timeout",
"=",
"None",
")",
":",
"_validate_not_none",
"(",
"'table_name'",
",",
"table_name",
")",
"request",
"=",
"_insert_or_merge_entity",
"(",
"entity",
")",
"request",
".... | Merges an existing entity or inserts a new entity if it does not exist
in the table.
If insert_or_merge_entity is used to merge an entity, any properties from
the previous entity will be retained if the request does not define or
include them.
:param str table_name:
... | [
"Merges",
"an",
"existing",
"entity",
"or",
"inserts",
"a",
"new",
"entity",
"if",
"it",
"does",
"not",
"exist",
"in",
"the",
"table",
"."
] | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L975-L1002 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/_http/batchclient.py | _BatchClient.get_request_table | def get_request_table(self, request):
'''
Extracts table name from request.uri. The request.uri has either
"/mytable(...)" or "/mytable" format.
request:
the request to insert, update or delete entity
'''
if '(' in request.path:
pos = request.path... | python | def get_request_table(self, request):
'''
Extracts table name from request.uri. The request.uri has either
"/mytable(...)" or "/mytable" format.
request:
the request to insert, update or delete entity
'''
if '(' in request.path:
pos = request.path... | [
"def",
"get_request_table",
"(",
"self",
",",
"request",
")",
":",
"if",
"'('",
"in",
"request",
".",
"path",
":",
"pos",
"=",
"request",
".",
"path",
".",
"find",
"(",
"'('",
")",
"return",
"request",
".",
"path",
"[",
"1",
":",
"pos",
"]",
"else"... | Extracts table name from request.uri. The request.uri has either
"/mytable(...)" or "/mytable" format.
request:
the request to insert, update or delete entity | [
"Extracts",
"table",
"name",
"from",
"request",
".",
"uri",
".",
"The",
"request",
".",
"uri",
"has",
"either",
"/",
"mytable",
"(",
"...",
")",
"or",
"/",
"mytable",
"format",
"."
] | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/_http/batchclient.py#L73-L85 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/_http/batchclient.py | _BatchClient.get_request_partition_key | def get_request_partition_key(self, request):
'''
Extracts PartitionKey from request.body if it is a POST request or from
request.path if it is not a POST request. Only insert operation request
is a POST request and the PartitionKey is in the request body.
request:
t... | python | def get_request_partition_key(self, request):
'''
Extracts PartitionKey from request.body if it is a POST request or from
request.path if it is not a POST request. Only insert operation request
is a POST request and the PartitionKey is in the request body.
request:
t... | [
"def",
"get_request_partition_key",
"(",
"self",
",",
"request",
")",
":",
"if",
"request",
".",
"method",
"==",
"'POST'",
":",
"doc",
"=",
"ETree",
".",
"fromstring",
"(",
"request",
".",
"body",
")",
"part_key",
"=",
"doc",
".",
"find",
"(",
"'./atom:c... | Extracts PartitionKey from request.body if it is a POST request or from
request.path if it is not a POST request. Only insert operation request
is a POST request and the PartitionKey is in the request body.
request:
the request to insert, update or delete entity | [
"Extracts",
"PartitionKey",
"from",
"request",
".",
"body",
"if",
"it",
"is",
"a",
"POST",
"request",
"or",
"from",
"request",
".",
"path",
"if",
"it",
"is",
"not",
"a",
"POST",
"request",
".",
"Only",
"insert",
"operation",
"request",
"is",
"a",
"POST",... | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/_http/batchclient.py#L87-L108 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/_http/batchclient.py | _BatchClient.get_request_row_key | def get_request_row_key(self, request):
'''
Extracts RowKey from request.body if it is a POST request or from
request.path if it is not a POST request. Only insert operation request
is a POST request and the Rowkey is in the request body.
request:
the request to inse... | python | def get_request_row_key(self, request):
'''
Extracts RowKey from request.body if it is a POST request or from
request.path if it is not a POST request. Only insert operation request
is a POST request and the Rowkey is in the request body.
request:
the request to inse... | [
"def",
"get_request_row_key",
"(",
"self",
",",
"request",
")",
":",
"if",
"request",
".",
"method",
"==",
"'POST'",
":",
"doc",
"=",
"ETree",
".",
"fromstring",
"(",
"request",
".",
"body",
")",
"row_key",
"=",
"doc",
".",
"find",
"(",
"'./atom:content/... | Extracts RowKey from request.body if it is a POST request or from
request.path if it is not a POST request. Only insert operation request
is a POST request and the Rowkey is in the request body.
request:
the request to insert, update or delete entity | [
"Extracts",
"RowKey",
"from",
"request",
".",
"body",
"if",
"it",
"is",
"a",
"POST",
"request",
"or",
"from",
"request",
".",
"path",
"if",
"it",
"is",
"not",
"a",
"POST",
"request",
".",
"Only",
"insert",
"operation",
"request",
"is",
"a",
"POST",
"re... | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/_http/batchclient.py#L110-L132 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/_http/batchclient.py | _BatchClient.validate_request_table | def validate_request_table(self, request):
'''
Validates that all requests have the same table name. Set the table
name if it is the first request for the batch operation.
request:
the request to insert, update or delete entity
'''
if self.batch_table:
... | python | def validate_request_table(self, request):
'''
Validates that all requests have the same table name. Set the table
name if it is the first request for the batch operation.
request:
the request to insert, update or delete entity
'''
if self.batch_table:
... | [
"def",
"validate_request_table",
"(",
"self",
",",
"request",
")",
":",
"if",
"self",
".",
"batch_table",
":",
"if",
"self",
".",
"get_request_table",
"(",
"request",
")",
"!=",
"self",
".",
"batch_table",
":",
"raise",
"AzureBatchValidationError",
"(",
"_ERRO... | Validates that all requests have the same table name. Set the table
name if it is the first request for the batch operation.
request:
the request to insert, update or delete entity | [
"Validates",
"that",
"all",
"requests",
"have",
"the",
"same",
"table",
"name",
".",
"Set",
"the",
"table",
"name",
"if",
"it",
"is",
"the",
"first",
"request",
"for",
"the",
"batch",
"operation",
"."
] | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/_http/batchclient.py#L134-L146 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/_http/batchclient.py | _BatchClient.validate_request_partition_key | def validate_request_partition_key(self, request):
'''
Validates that all requests have the same PartitiionKey. Set the
PartitionKey if it is the first request for the batch operation.
request:
the request to insert, update or delete entity
'''
if self.batch_... | python | def validate_request_partition_key(self, request):
'''
Validates that all requests have the same PartitiionKey. Set the
PartitionKey if it is the first request for the batch operation.
request:
the request to insert, update or delete entity
'''
if self.batch_... | [
"def",
"validate_request_partition_key",
"(",
"self",
",",
"request",
")",
":",
"if",
"self",
".",
"batch_partition_key",
":",
"if",
"self",
".",
"get_request_partition_key",
"(",
"request",
")",
"!=",
"self",
".",
"batch_partition_key",
":",
"raise",
"AzureBatchV... | Validates that all requests have the same PartitiionKey. Set the
PartitionKey if it is the first request for the batch operation.
request:
the request to insert, update or delete entity | [
"Validates",
"that",
"all",
"requests",
"have",
"the",
"same",
"PartitiionKey",
".",
"Set",
"the",
"PartitionKey",
"if",
"it",
"is",
"the",
"first",
"request",
"for",
"the",
"batch",
"operation",
"."
] | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/_http/batchclient.py#L148-L161 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/_http/batchclient.py | _BatchClient.validate_request_row_key | def validate_request_row_key(self, request):
'''
Validates that all requests have the different RowKey and adds RowKey
to existing RowKey list.
request:
the request to insert, update or delete entity
'''
if self.batch_row_keys:
if self.get_request... | python | def validate_request_row_key(self, request):
'''
Validates that all requests have the different RowKey and adds RowKey
to existing RowKey list.
request:
the request to insert, update or delete entity
'''
if self.batch_row_keys:
if self.get_request... | [
"def",
"validate_request_row_key",
"(",
"self",
",",
"request",
")",
":",
"if",
"self",
".",
"batch_row_keys",
":",
"if",
"self",
".",
"get_request_row_key",
"(",
"request",
")",
"in",
"self",
".",
"batch_row_keys",
":",
"raise",
"AzureBatchValidationError",
"("... | Validates that all requests have the different RowKey and adds RowKey
to existing RowKey list.
request:
the request to insert, update or delete entity | [
"Validates",
"that",
"all",
"requests",
"have",
"the",
"different",
"RowKey",
"and",
"adds",
"RowKey",
"to",
"existing",
"RowKey",
"list",
"."
] | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/_http/batchclient.py#L163-L175 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/_http/batchclient.py | _BatchClient.begin_batch | def begin_batch(self):
'''
Starts the batch operation. Intializes the batch variables
is_batch:
batch operation flag.
batch_table:
the table name of the batch operation
batch_partition_key:
the PartitionKey of the batch requests.
batch... | python | def begin_batch(self):
'''
Starts the batch operation. Intializes the batch variables
is_batch:
batch operation flag.
batch_table:
the table name of the batch operation
batch_partition_key:
the PartitionKey of the batch requests.
batch... | [
"def",
"begin_batch",
"(",
"self",
")",
":",
"self",
".",
"is_batch",
"=",
"True",
"self",
".",
"batch_table",
"=",
"''",
"self",
".",
"batch_partition_key",
"=",
"''",
"self",
".",
"batch_row_keys",
"=",
"[",
"]",
"self",
".",
"batch_requests",
"=",
"["... | Starts the batch operation. Intializes the batch variables
is_batch:
batch operation flag.
batch_table:
the table name of the batch operation
batch_partition_key:
the PartitionKey of the batch requests.
batch_row_keys:
the RowKey list of a... | [
"Starts",
"the",
"batch",
"operation",
".",
"Intializes",
"the",
"batch",
"variables"
] | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/_http/batchclient.py#L177-L196 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/_http/batchclient.py | _BatchClient.insert_request_to_batch | def insert_request_to_batch(self, request):
'''
Adds request to batch operation.
request:
the request to insert, update or delete entity
'''
self.validate_request_table(request)
self.validate_request_partition_key(request)
self.validate_request_row_ke... | python | def insert_request_to_batch(self, request):
'''
Adds request to batch operation.
request:
the request to insert, update or delete entity
'''
self.validate_request_table(request)
self.validate_request_partition_key(request)
self.validate_request_row_ke... | [
"def",
"insert_request_to_batch",
"(",
"self",
",",
"request",
")",
":",
"self",
".",
"validate_request_table",
"(",
"request",
")",
"self",
".",
"validate_request_partition_key",
"(",
"request",
")",
"self",
".",
"validate_request_row_key",
"(",
"request",
")",
"... | Adds request to batch operation.
request:
the request to insert, update or delete entity | [
"Adds",
"request",
"to",
"batch",
"operation",
"."
] | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/_http/batchclient.py#L198-L208 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/_http/batchclient.py | _BatchClient.commit_batch_requests | def commit_batch_requests(self):
''' Commits the batch requests. '''
batch_boundary = b'batch_' + _new_boundary()
changeset_boundary = b'changeset_' + _new_boundary()
# Commits batch only the requests list is not empty.
if self.batch_requests:
request = HTTPRequest(... | python | def commit_batch_requests(self):
''' Commits the batch requests. '''
batch_boundary = b'batch_' + _new_boundary()
changeset_boundary = b'changeset_' + _new_boundary()
# Commits batch only the requests list is not empty.
if self.batch_requests:
request = HTTPRequest(... | [
"def",
"commit_batch_requests",
"(",
"self",
")",
":",
"batch_boundary",
"=",
"b'batch_'",
"+",
"_new_boundary",
"(",
")",
"changeset_boundary",
"=",
"b'changeset_'",
"+",
"_new_boundary",
"(",
")",
"# Commits batch only the requests list is not empty.",
"if",
"self",
"... | Commits the batch requests. | [
"Commits",
"the",
"batch",
"requests",
"."
] | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/_http/batchclient.py#L216-L303 |
openstack/proliantutils | proliantutils/redfish/resources/manager/manager.py | HPEManager.set_license | def set_license(self, key):
"""Set the license on a redfish system
:param key: license key
"""
data = {'LicenseKey': key}
license_service_uri = (utils.get_subresource_path_by(self,
['Oem', 'Hpe', 'Links', 'LicenseService']))
self._conn.post... | python | def set_license(self, key):
"""Set the license on a redfish system
:param key: license key
"""
data = {'LicenseKey': key}
license_service_uri = (utils.get_subresource_path_by(self,
['Oem', 'Hpe', 'Links', 'LicenseService']))
self._conn.post... | [
"def",
"set_license",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"{",
"'LicenseKey'",
":",
"key",
"}",
"license_service_uri",
"=",
"(",
"utils",
".",
"get_subresource_path_by",
"(",
"self",
",",
"[",
"'Oem'",
",",
"'Hpe'",
",",
"'Links'",
",",
"'Lic... | Set the license on a redfish system
:param key: license key | [
"Set",
"the",
"license",
"on",
"a",
"redfish",
"system"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/manager/manager.py#L31-L39 |
openstack/proliantutils | proliantutils/redfish/resources/manager/manager.py | HPEManager.virtual_media | def virtual_media(self):
"""Property to provide reference to `VirtualMediaCollection` instance.
It is calculated once when the first time it is queried. On refresh,
this property gets reset.
"""
return virtual_media.VirtualMediaCollection(
self._conn, utils.get_subre... | python | def virtual_media(self):
"""Property to provide reference to `VirtualMediaCollection` instance.
It is calculated once when the first time it is queried. On refresh,
this property gets reset.
"""
return virtual_media.VirtualMediaCollection(
self._conn, utils.get_subre... | [
"def",
"virtual_media",
"(",
"self",
")",
":",
"return",
"virtual_media",
".",
"VirtualMediaCollection",
"(",
"self",
".",
"_conn",
",",
"utils",
".",
"get_subresource_path_by",
"(",
"self",
",",
"'VirtualMedia'",
")",
",",
"redfish_version",
"=",
"self",
".",
... | Property to provide reference to `VirtualMediaCollection` instance.
It is calculated once when the first time it is queried. On refresh,
this property gets reset. | [
"Property",
"to",
"provide",
"reference",
"to",
"VirtualMediaCollection",
"instance",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/manager/manager.py#L43-L51 |
openstack/proliantutils | proliantutils/ilo/operations.py | IloOperations.set_iscsi_info | def set_iscsi_info(self, target_name, lun, ip_address,
port='3260', auth_method=None, username=None,
password=None):
"""Set iscsi details of the system in uefi boot mode.
The initiator system is set with the target details like
IQN, LUN, IP, Port et... | python | def set_iscsi_info(self, target_name, lun, ip_address,
port='3260', auth_method=None, username=None,
password=None):
"""Set iscsi details of the system in uefi boot mode.
The initiator system is set with the target details like
IQN, LUN, IP, Port et... | [
"def",
"set_iscsi_info",
"(",
"self",
",",
"target_name",
",",
"lun",
",",
"ip_address",
",",
"port",
"=",
"'3260'",
",",
"auth_method",
"=",
"None",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
")",
":",
"raise",
"exception",
".",
"IloCom... | Set iscsi details of the system in uefi boot mode.
The initiator system is set with the target details like
IQN, LUN, IP, Port etc.
:param target_name: Target Name for iscsi.
:param lun: logical unit number.
:param ip_address: IP address of the target.
:param port: port ... | [
"Set",
"iscsi",
"details",
"of",
"the",
"system",
"in",
"uefi",
"boot",
"mode",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/operations.py#L67-L85 |
NuGrid/NuGridPy | nugridpy/ascii_table.py | writeTraj | def writeTraj(filename='trajectory.input', data=[], ageunit=0, tunit=0,
rhounit=0, idNum=0):
'''
Method for writeing Trajectory type ascii files files.
Parameters
----------
filename : string
The file where this data will be written.
data : list
A list of 1D data v... | python | def writeTraj(filename='trajectory.input', data=[], ageunit=0, tunit=0,
rhounit=0, idNum=0):
'''
Method for writeing Trajectory type ascii files files.
Parameters
----------
filename : string
The file where this data will be written.
data : list
A list of 1D data v... | [
"def",
"writeTraj",
"(",
"filename",
"=",
"'trajectory.input'",
",",
"data",
"=",
"[",
"]",
",",
"ageunit",
"=",
"0",
",",
"tunit",
"=",
"0",
",",
"rhounit",
"=",
"0",
",",
"idNum",
"=",
"0",
")",
":",
"if",
"data",
"==",
"[",
"]",
":",
"print",
... | Method for writeing Trajectory type ascii files files.
Parameters
----------
filename : string
The file where this data will be written.
data : list
A list of 1D data vectors with time, T and rho.
ageunit : integer, optional
If 1 ageunit = SEC, If 0 ageunit = YRS. If 2 aguni... | [
"Method",
"for",
"writeing",
"Trajectory",
"type",
"ascii",
"files",
"files",
"."
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/ascii_table.py#L349-L396 |
NuGrid/NuGridPy | nugridpy/ascii_table.py | write | def write(filename, headers, dcols, data, headerlines=[],
header_char='H', sldir='.', sep=' ', trajectory=False,
download=False):
'''
Method for writeing Ascii files.
Note the attribute name at position i in dcols will be associated
with the column data at index i in data. Also th... | python | def write(filename, headers, dcols, data, headerlines=[],
header_char='H', sldir='.', sep=' ', trajectory=False,
download=False):
'''
Method for writeing Ascii files.
Note the attribute name at position i in dcols will be associated
with the column data at index i in data. Also th... | [
"def",
"write",
"(",
"filename",
",",
"headers",
",",
"dcols",
",",
"data",
",",
"headerlines",
"=",
"[",
"]",
",",
"header_char",
"=",
"'H'",
",",
"sldir",
"=",
"'.'",
",",
"sep",
"=",
"' '",
",",
"trajectory",
"=",
"False",
",",
"download",
"=",
... | Method for writeing Ascii files.
Note the attribute name at position i in dcols will be associated
with the column data at index i in data. Also the number of data
columns(in data) must equal the number of data attributes (in dcols)
Also all the lengths of that columns must all be the same.
Param... | [
"Method",
"for",
"writeing",
"Ascii",
"files",
"."
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/ascii_table.py#L398-L532 |
NuGrid/NuGridPy | nugridpy/ascii_table.py | writeGCE_table | def writeGCE_table(filename,headers,data,dcols=['Isotopes','Yields','Z','A'],header_char='H',sldir='.',sep='&'):
'''
Method for writeing data in GCE format in Ascii files.
Reads either elements or isotopes
dcols[0] needs to contain either isotopes or elements
Note the attribute name at position i i... | python | def writeGCE_table(filename,headers,data,dcols=['Isotopes','Yields','Z','A'],header_char='H',sldir='.',sep='&'):
'''
Method for writeing data in GCE format in Ascii files.
Reads either elements or isotopes
dcols[0] needs to contain either isotopes or elements
Note the attribute name at position i i... | [
"def",
"writeGCE_table",
"(",
"filename",
",",
"headers",
",",
"data",
",",
"dcols",
"=",
"[",
"'Isotopes'",
",",
"'Yields'",
",",
"'Z'",
",",
"'A'",
"]",
",",
"header_char",
"=",
"'H'",
",",
"sldir",
"=",
"'.'",
",",
"sep",
"=",
"'&'",
")",
":",
"... | Method for writeing data in GCE format in Ascii files.
Reads either elements or isotopes
dcols[0] needs to contain either isotopes or elements
Note the attribute name at position i in dcols will be associated
with the column data at index i in data.
Also the number of data columns(in data) must equ... | [
"Method",
"for",
"writeing",
"data",
"in",
"GCE",
"format",
"in",
"Ascii",
"files",
".",
"Reads",
"either",
"elements",
"or",
"isotopes",
"dcols",
"[",
"0",
"]",
"needs",
"to",
"contain",
"either",
"isotopes",
"or",
"elements"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/ascii_table.py#L534-L674 |
NuGrid/NuGridPy | nugridpy/ascii_table.py | readTable.get | def get(self, attri):
'''
Method that dynamically determines the type of attribute that is
passed into this method. Also it then returns that attribute's
associated data.
Parameters
----------
attri : string
The attribute we are looking for.
... | python | def get(self, attri):
'''
Method that dynamically determines the type of attribute that is
passed into this method. Also it then returns that attribute's
associated data.
Parameters
----------
attri : string
The attribute we are looking for.
... | [
"def",
"get",
"(",
"self",
",",
"attri",
")",
":",
"isCol",
"=",
"False",
"isHead",
"=",
"False",
"if",
"attri",
"in",
"self",
".",
"dcols",
":",
"isCol",
"=",
"True",
"elif",
"attri",
"in",
"self",
".",
"hattrs",
":",
"isHead",
"=",
"True",
"else"... | Method that dynamically determines the type of attribute that is
passed into this method. Also it then returns that attribute's
associated data.
Parameters
----------
attri : string
The attribute we are looking for. | [
"Method",
"that",
"dynamically",
"determines",
"the",
"type",
"of",
"attribute",
"that",
"is",
"passed",
"into",
"this",
"method",
".",
"Also",
"it",
"then",
"returns",
"that",
"attribute",
"s",
"associated",
"data",
"."
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/ascii_table.py#L208-L234 |
NuGrid/NuGridPy | nugridpy/ascii_table.py | readTable._readFile | def _readFile(self, sldir, fileName, sep):
'''
Private method that reads in the header and column data.
'''
if sldir.endswith(os.sep):
fileName = str(sldir)+str(fileName)
else:
fileName = str(sldir)+os.sep+str(fileName)
fileLines=[] #list of li... | python | def _readFile(self, sldir, fileName, sep):
'''
Private method that reads in the header and column data.
'''
if sldir.endswith(os.sep):
fileName = str(sldir)+str(fileName)
else:
fileName = str(sldir)+os.sep+str(fileName)
fileLines=[] #list of li... | [
"def",
"_readFile",
"(",
"self",
",",
"sldir",
",",
"fileName",
",",
"sep",
")",
":",
"if",
"sldir",
".",
"endswith",
"(",
"os",
".",
"sep",
")",
":",
"fileName",
"=",
"str",
"(",
"sldir",
")",
"+",
"str",
"(",
"fileName",
")",
"else",
":",
"file... | Private method that reads in the header and column data. | [
"Private",
"method",
"that",
"reads",
"in",
"the",
"header",
"and",
"column",
"data",
"."
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/ascii_table.py#L248-L346 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | initial_finall_mass_relation | def initial_finall_mass_relation(self,marker='o',linestyle='--'):
'''
INtiial to final mass relation
'''
final_m=[]
ini_m=[]
for i in range(len(self.runs_H5_surf)):
sefiles=se(self.runs_H5_out[i])
ini_m.append(sefiles.get("mini"))
h1=sefiles.get(i... | python | def initial_finall_mass_relation(self,marker='o',linestyle='--'):
'''
INtiial to final mass relation
'''
final_m=[]
ini_m=[]
for i in range(len(self.runs_H5_surf)):
sefiles=se(self.runs_H5_out[i])
ini_m.append(sefiles.get("mini"))
h1=sefiles.get(i... | [
"def",
"initial_finall_mass_relation",
"(",
"self",
",",
"marker",
"=",
"'o'",
",",
"linestyle",
"=",
"'--'",
")",
":",
"final_m",
"=",
"[",
"]",
"ini_m",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"runs_H5_surf",
")",
")... | INtiial to final mass relation | [
"INtiial",
"to",
"final",
"mass",
"relation"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L304-L325 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | final_bottom_envelope_set1 | def final_bottom_envelope_set1(self):
'''
For paper1 marco routine:
Numbers of remnant mass shell masses, exists also in mesa_set!
'''
inim=[]
remnm=[]
for i in range(len(self.runs_H5_surf)):
m1p65_last=se(self.runs_H5_out[i])
mass_dummy=m1p65_last.se.get(m1p65_last.se.cycles[len(m1p65_last.se.c... | python | def final_bottom_envelope_set1(self):
'''
For paper1 marco routine:
Numbers of remnant mass shell masses, exists also in mesa_set!
'''
inim=[]
remnm=[]
for i in range(len(self.runs_H5_surf)):
m1p65_last=se(self.runs_H5_out[i])
mass_dummy=m1p65_last.se.get(m1p65_last.se.cycles[len(m1p65_last.se.c... | [
"def",
"final_bottom_envelope_set1",
"(",
"self",
")",
":",
"inim",
"=",
"[",
"]",
"remnm",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"runs_H5_surf",
")",
")",
":",
"m1p65_last",
"=",
"se",
"(",
"self",
".",
"runs_H5_out... | For paper1 marco routine:
Numbers of remnant mass shell masses, exists also in mesa_set! | [
"For",
"paper1",
"marco",
"routine",
":",
"Numbers",
"of",
"remnant",
"mass",
"shell",
"masses",
"exists",
"also",
"in",
"mesa_set!"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L328-L349 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | remnant_lifetime_agb | def remnant_lifetime_agb(self):
'''
For paper1 extension:
bottom_envelope
Numbers of remnant mass shell masses, exists also in mesa_set + star age!
'''
inim=[]
remnm=[]
time11=[]
tottime=[]
c_core=[... | python | def remnant_lifetime_agb(self):
'''
For paper1 extension:
bottom_envelope
Numbers of remnant mass shell masses, exists also in mesa_set + star age!
'''
inim=[]
remnm=[]
time11=[]
tottime=[]
c_core=[... | [
"def",
"remnant_lifetime_agb",
"(",
"self",
")",
":",
"inim",
"=",
"[",
"]",
"remnm",
"=",
"[",
"]",
"time11",
"=",
"[",
"]",
"tottime",
"=",
"[",
"]",
"c_core",
"=",
"[",
"]",
"o_core",
"=",
"[",
"]",
"small_co_core",
"=",
"[",
"]",
"c_core_center... | For paper1 extension:
bottom_envelope
Numbers of remnant mass shell masses, exists also in mesa_set + star age! | [
"For",
"paper1",
"extension",
":",
"bottom_envelope",
"Numbers",
"of",
"remnant",
"mass",
"shell",
"masses",
"exists",
"also",
"in",
"mesa_set",
"+",
"star",
"age!"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L351-L399 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | plot_surf_composition | def plot_surf_composition(self,hsfe_hsls = True,lsfe_hsls = False,rbsr_hsls = False,rbzr_hsls = False,sry_srzr = False,rbfe_sfe = False,iso_ratio= False,isotopes_x = ['Mg-25','Mg-24'],isotopes_y = ['Mg-26','Mg-24'],sparsity = 5000,marker1=['o'],symbols1=['k-'],color=['k']):
'''
Set only one of the vriables True to... | python | def plot_surf_composition(self,hsfe_hsls = True,lsfe_hsls = False,rbsr_hsls = False,rbzr_hsls = False,sry_srzr = False,rbfe_sfe = False,iso_ratio= False,isotopes_x = ['Mg-25','Mg-24'],isotopes_y = ['Mg-26','Mg-24'],sparsity = 5000,marker1=['o'],symbols1=['k-'],color=['k']):
'''
Set only one of the vriables True to... | [
"def",
"plot_surf_composition",
"(",
"self",
",",
"hsfe_hsls",
"=",
"True",
",",
"lsfe_hsls",
"=",
"False",
",",
"rbsr_hsls",
"=",
"False",
",",
"rbzr_hsls",
"=",
"False",
",",
"sry_srzr",
"=",
"False",
",",
"rbfe_sfe",
"=",
"False",
",",
"iso_ratio",
"=",... | Set only one of the vriables True to plot quantitie4s.
In case you set iso_ratio = True:
isotooes_x and isototopes_y are used. | [
"Set",
"only",
"one",
"of",
"the",
"vriables",
"True",
"to",
"plot",
"quantitie4s",
".",
"In",
"case",
"you",
"set",
"iso_ratio",
"=",
"True",
":",
"isotooes_x",
"and",
"isototopes_y",
"are",
"used",
"."
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L402-L1166 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | set_plot_CO_mass | def set_plot_CO_mass(self,fig=3123,xaxis='mass',linestyle=['-'],marker=['o'],color=['r'],age_years=True,sparsity=500,markersparsity=200,withoutZlabel=False,t0_model=[]):
'''
PLots C/O surface number fraction
'''
if len(t0_model)==0:
t0_model = len(self.runs_H5_surf)*[0]
plt.figure(fig)
... | python | def set_plot_CO_mass(self,fig=3123,xaxis='mass',linestyle=['-'],marker=['o'],color=['r'],age_years=True,sparsity=500,markersparsity=200,withoutZlabel=False,t0_model=[]):
'''
PLots C/O surface number fraction
'''
if len(t0_model)==0:
t0_model = len(self.runs_H5_surf)*[0]
plt.figure(fig)
... | [
"def",
"set_plot_CO_mass",
"(",
"self",
",",
"fig",
"=",
"3123",
",",
"xaxis",
"=",
"'mass'",
",",
"linestyle",
"=",
"[",
"'-'",
"]",
",",
"marker",
"=",
"[",
"'o'",
"]",
",",
"color",
"=",
"[",
"'r'",
"]",
",",
"age_years",
"=",
"True",
",",
"sp... | PLots C/O surface number fraction | [
"PLots",
"C",
"/",
"O",
"surface",
"number",
"fraction"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1169-L1208 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | set_plot_surface_abu | def set_plot_surface_abu(self,fig=2,species=['Sr-88','Ba-136'],decay=False,number_frac=False,xaxis='cycles',age_years=False,ratio=False,sumiso=False,eps=False,samefigure=False,samefigureall=False,withkip=False,sparsity=200,linestyle=['--'],marker=['o'],color=['r'],label=[],markevery=100,t0_model=-1,savefig=''):
''... | python | def set_plot_surface_abu(self,fig=2,species=['Sr-88','Ba-136'],decay=False,number_frac=False,xaxis='cycles',age_years=False,ratio=False,sumiso=False,eps=False,samefigure=False,samefigureall=False,withkip=False,sparsity=200,linestyle=['--'],marker=['o'],color=['r'],label=[],markevery=100,t0_model=-1,savefig=''):
''... | [
"def",
"set_plot_surface_abu",
"(",
"self",
",",
"fig",
"=",
"2",
",",
"species",
"=",
"[",
"'Sr-88'",
",",
"'Ba-136'",
"]",
",",
"decay",
"=",
"False",
",",
"number_frac",
"=",
"False",
",",
"xaxis",
"=",
"'cycles'",
",",
"age_years",
"=",
"False",
",... | Simply plots surface abundance versus model number or time | [
"Simply",
"plots",
"surface",
"abundance",
"versus",
"model",
"number",
"or",
"time"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1240-L1374 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | set_plot_profile_decay | def set_plot_profile_decay(self,cycles=20*[-1],mass_range=20*[[0,0]],ylim=20*[[0,0]],isotopes=[],linestyle=[],save_dir=''):
'''
Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*['-']
imp... | python | def set_plot_profile_decay(self,cycles=20*[-1],mass_range=20*[[0,0]],ylim=20*[[0,0]],isotopes=[],linestyle=[],save_dir=''):
'''
Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*['-']
imp... | [
"def",
"set_plot_profile_decay",
"(",
"self",
",",
"cycles",
"=",
"20",
"*",
"[",
"-",
"1",
"]",
",",
"mass_range",
"=",
"20",
"*",
"[",
"[",
"0",
",",
"0",
"]",
"]",
",",
"ylim",
"=",
"20",
"*",
"[",
"[",
"0",
",",
"0",
"]",
"]",
",",
"iso... | Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs | [
"Plots",
"HRDs"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1413-L1466 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | set_get_abu_distr_decay_old | def set_get_abu_distr_decay_old(self,cycles=20*[-1],mass_range=20*[[0,0]],ylim=20*[[0,0]],isotopes=['all'],linestyle=[],save_dir=''):
'''
Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*[... | python | def set_get_abu_distr_decay_old(self,cycles=20*[-1],mass_range=20*[[0,0]],ylim=20*[[0,0]],isotopes=['all'],linestyle=[],save_dir=''):
'''
Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*[... | [
"def",
"set_get_abu_distr_decay_old",
"(",
"self",
",",
"cycles",
"=",
"20",
"*",
"[",
"-",
"1",
"]",
",",
"mass_range",
"=",
"20",
"*",
"[",
"[",
"0",
",",
"0",
"]",
"]",
",",
"ylim",
"=",
"20",
"*",
"[",
"[",
"0",
",",
"0",
"]",
"]",
",",
... | Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs | [
"Plots",
"HRDs"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1499-L1548 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | set_cores_massive | def set_cores_massive(self,filename='core_masses_massive.txt'):
'''
Uesse function cores in nugridse.py
'''
core_info=[]
minis=[]
for i in range(len(self.runs_H5_surf)):
sefiles=se(self.runs_H5_out[i])
mini=sefiles.get('mini')
minis.append(mini)
incycle=in... | python | def set_cores_massive(self,filename='core_masses_massive.txt'):
'''
Uesse function cores in nugridse.py
'''
core_info=[]
minis=[]
for i in range(len(self.runs_H5_surf)):
sefiles=se(self.runs_H5_out[i])
mini=sefiles.get('mini')
minis.append(mini)
incycle=in... | [
"def",
"set_cores_massive",
"(",
"self",
",",
"filename",
"=",
"'core_masses_massive.txt'",
")",
":",
"core_info",
"=",
"[",
"]",
"minis",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"runs_H5_surf",
")",
")",
":",
"sefiles",
... | Uesse function cores in nugridse.py | [
"Uesse",
"function",
"cores",
"in",
"nugridse",
".",
"py"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1550-L1578 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | get_fallback_coord | def get_fallback_coord(self,isotope='Ni-56',masslimit=0.1,masscutlim=False,delay=True):
'''
Returns fallback mass coordinate so that the amount of masslimit
of the isotope isotope is ejected. Explosion type chosen with delay option.
masscutlim: If true, new fallback coordinate can only as small as the o... | python | def get_fallback_coord(self,isotope='Ni-56',masslimit=0.1,masscutlim=False,delay=True):
'''
Returns fallback mass coordinate so that the amount of masslimit
of the isotope isotope is ejected. Explosion type chosen with delay option.
masscutlim: If true, new fallback coordinate can only as small as the o... | [
"def",
"get_fallback_coord",
"(",
"self",
",",
"isotope",
"=",
"'Ni-56'",
",",
"masslimit",
"=",
"0.1",
",",
"masscutlim",
"=",
"False",
",",
"delay",
"=",
"True",
")",
":",
"def",
"getmasscut",
"(",
"m_ini",
",",
"z_ini",
",",
"delay",
")",
":",
"if",... | Returns fallback mass coordinate so that the amount of masslimit
of the isotope isotope is ejected. Explosion type chosen with delay option.
masscutlim: If true, new fallback coordinate can only as small as the original fallback
prescription by C. Fryer. Useful for more massive stars which would not eje... | [
"Returns",
"fallback",
"mass",
"coordinate",
"so",
"that",
"the",
"amount",
"of",
"masslimit",
"of",
"the",
"isotope",
"isotope",
"is",
"ejected",
".",
"Explosion",
"type",
"chosen",
"with",
"delay",
"option",
".",
"masscutlim",
":",
"If",
"true",
"new",
"fa... | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1580-L1678 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | set_burnstages_upgrade_massive | def set_burnstages_upgrade_massive(self):
'''
Outputs burnign stages as done in burningstages_upgrade (nugridse)
'''
burn_info=[]
burn_mini=[]
for i in range(len(self.runs_H5_surf)):
sefiles=se(self.runs_H5_out[i])
burn_info.append(sefiles.burnstage_upgrade())
... | python | def set_burnstages_upgrade_massive(self):
'''
Outputs burnign stages as done in burningstages_upgrade (nugridse)
'''
burn_info=[]
burn_mini=[]
for i in range(len(self.runs_H5_surf)):
sefiles=se(self.runs_H5_out[i])
burn_info.append(sefiles.burnstage_upgrade())
... | [
"def",
"set_burnstages_upgrade_massive",
"(",
"self",
")",
":",
"burn_info",
"=",
"[",
"]",
"burn_mini",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"runs_H5_surf",
")",
")",
":",
"sefiles",
"=",
"se",
"(",
"self",
".",
"r... | Outputs burnign stages as done in burningstages_upgrade (nugridse) | [
"Outputs",
"burnign",
"stages",
"as",
"done",
"in",
"burningstages_upgrade",
"(",
"nugridse",
")"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1684-L1700 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | set_plot_CC_T_rho_new | def set_plot_CC_T_rho_new(self,fig='CC evol',linestyle=['-'],burn_limit=0.997,color=['r'],marker=['o'],markevery=500):
'''
Plots
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*['-']
plt.figure(fig... | python | def set_plot_CC_T_rho_new(self,fig='CC evol',linestyle=['-'],burn_limit=0.997,color=['r'],marker=['o'],markevery=500):
'''
Plots
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*['-']
plt.figure(fig... | [
"def",
"set_plot_CC_T_rho_new",
"(",
"self",
",",
"fig",
"=",
"'CC evol'",
",",
"linestyle",
"=",
"[",
"'-'",
"]",
",",
"burn_limit",
"=",
"0.997",
",",
"color",
"=",
"[",
"'r'",
"]",
",",
"marker",
"=",
"[",
"'o'",
"]",
",",
"markevery",
"=",
"500",... | Plots
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs | [
"Plots",
"end_model",
"-",
"array",
"control",
"how",
"far",
"in",
"models",
"a",
"run",
"is",
"plottet",
"if",
"-",
"1",
"till",
"end",
"symbs_1",
"-",
"set",
"symbols",
"of",
"runs"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1702-L1788 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | set_plot_CC_T_rho_max | def set_plot_CC_T_rho_max(self,linestyle=[],burn_limit=0.997,color=['r'],marker=['o'],markevery=500):
'''
Plots
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*['-']
plt.figure('CC evol')
... | python | def set_plot_CC_T_rho_max(self,linestyle=[],burn_limit=0.997,color=['r'],marker=['o'],markevery=500):
'''
Plots
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*['-']
plt.figure('CC evol')
... | [
"def",
"set_plot_CC_T_rho_max",
"(",
"self",
",",
"linestyle",
"=",
"[",
"]",
",",
"burn_limit",
"=",
"0.997",
",",
"color",
"=",
"[",
"'r'",
"]",
",",
"marker",
"=",
"[",
"'o'",
"]",
",",
"markevery",
"=",
"500",
")",
":",
"if",
"len",
"(",
"lines... | Plots
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs | [
"Plots",
"end_model",
"-",
"array",
"control",
"how",
"far",
"in",
"models",
"a",
"run",
"is",
"plottet",
"if",
"-",
"1",
"till",
"end",
"symbs_1",
"-",
"set",
"symbols",
"of",
"runs"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1791-L1827 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | set_plot_CC_T_rho | def set_plot_CC_T_rho(self,linestyle=[],burn_limit=0.997,color=['r'],marker=['o'],nolabelZ=False,markevery=500):
'''
Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*['-']
plt.figure('CC e... | python | def set_plot_CC_T_rho(self,linestyle=[],burn_limit=0.997,color=['r'],marker=['o'],nolabelZ=False,markevery=500):
'''
Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*['-']
plt.figure('CC e... | [
"def",
"set_plot_CC_T_rho",
"(",
"self",
",",
"linestyle",
"=",
"[",
"]",
",",
"burn_limit",
"=",
"0.997",
",",
"color",
"=",
"[",
"'r'",
"]",
",",
"marker",
"=",
"[",
"'o'",
"]",
",",
"nolabelZ",
"=",
"False",
",",
"markevery",
"=",
"500",
")",
":... | Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs | [
"Plots",
"HRDs",
"end_model",
"-",
"array",
"control",
"how",
"far",
"in",
"models",
"a",
"run",
"is",
"plottet",
"if",
"-",
"1",
"till",
"end",
"symbs_1",
"-",
"set",
"symbols",
"of",
"runs"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1831-L1897 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | set_plot_tcrhoc | def set_plot_tcrhoc(self,linestyle=['-'],burn_limit=0.997,marker=['o'],markevery=500,end_model=[-1],deg_line=True):
'''
Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*['-']
... | python | def set_plot_tcrhoc(self,linestyle=['-'],burn_limit=0.997,marker=['o'],markevery=500,end_model=[-1],deg_line=True):
'''
Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs
'''
if len(linestyle)==0:
linestyle=200*['-']
... | [
"def",
"set_plot_tcrhoc",
"(",
"self",
",",
"linestyle",
"=",
"[",
"'-'",
"]",
",",
"burn_limit",
"=",
"0.997",
",",
"marker",
"=",
"[",
"'o'",
"]",
",",
"markevery",
"=",
"500",
",",
"end_model",
"=",
"[",
"-",
"1",
"]",
",",
"deg_line",
"=",
"Tru... | Plots HRDs
end_model - array, control how far in models a run is plottet, if -1 till end
symbs_1 - set symbols of runs | [
"Plots",
"HRDs",
"end_model",
"-",
"array",
"control",
"how",
"far",
"in",
"models",
"a",
"run",
"is",
"plottet",
"if",
"-",
"1",
"till",
"end",
"symbs_1",
"-",
"set",
"symbols",
"of",
"runs"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L1898-L2074 |
NuGrid/NuGridPy | scripts/nugrid_set/nugrid_set.py | prod_fac_massgrid_A_1 | def prod_fac_massgrid_A_1(self,weighted=True,log=True,runs=[],isotopes=[],elements=[],cycles=[],plot_set_diagram=True,color=['r','b','g','k'],marker_type=['o','p','s','D'],line_style=['--','-','-.',':'],markersize=[6,6,6,6],line_width=[14,14,14,14],title='',withlabel=True,label='',plot_lines=True,exp_only=False,pre_exp... | python | def prod_fac_massgrid_A_1(self,weighted=True,log=True,runs=[],isotopes=[],elements=[],cycles=[],plot_set_diagram=True,color=['r','b','g','k'],marker_type=['o','p','s','D'],line_style=['--','-','-.',':'],markersize=[6,6,6,6],line_width=[14,14,14,14],title='',withlabel=True,label='',plot_lines=True,exp_only=False,pre_exp... | [
"def",
"prod_fac_massgrid_A_1",
"(",
"self",
",",
"weighted",
"=",
"True",
",",
"log",
"=",
"True",
",",
"runs",
"=",
"[",
"]",
",",
"isotopes",
"=",
"[",
"]",
",",
"elements",
"=",
"[",
"]",
",",
"cycles",
"=",
"[",
"]",
",",
"plot_set_diagram",
"... | Plots behaviour star mass dependent yields of different isotopes - specify dirs at the beginning
Beware of different z,
runs : If array is empty function uses all available directories.
!! If len of elements longer than zero, than isotopes will be ignored and elements used!! | [
"Plots",
"behaviour",
"star",
"mass",
"dependent",
"yields",
"of",
"different",
"isotopes",
"-",
"specify",
"dirs",
"at",
"the",
"beginning",
"Beware",
"of",
"different",
"z"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/scripts/nugrid_set/nugrid_set.py#L2078-L2431 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2015_04_05/_serialization.py | _get_request_body_bytes_only | def _get_request_body_bytes_only(param_name, param_value):
'''Validates the request body passed in and converts it to bytes
if our policy allows it.'''
if param_value is None:
return b''
if isinstance(param_value, bytes):
return param_value
raise TypeError(_ERROR_VALUE_SHOULD_BE_BY... | python | def _get_request_body_bytes_only(param_name, param_value):
'''Validates the request body passed in and converts it to bytes
if our policy allows it.'''
if param_value is None:
return b''
if isinstance(param_value, bytes):
return param_value
raise TypeError(_ERROR_VALUE_SHOULD_BE_BY... | [
"def",
"_get_request_body_bytes_only",
"(",
"param_name",
",",
"param_value",
")",
":",
"if",
"param_value",
"is",
"None",
":",
"return",
"b''",
"if",
"isinstance",
"(",
"param_value",
",",
"bytes",
")",
":",
"return",
"param_value",
"raise",
"TypeError",
"(",
... | Validates the request body passed in and converts it to bytes
if our policy allows it. | [
"Validates",
"the",
"request",
"body",
"passed",
"in",
"and",
"converts",
"it",
"to",
"bytes",
"if",
"our",
"policy",
"allows",
"it",
"."
] | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/_serialization.py#L96-L105 |
openstack/proliantutils | proliantutils/redfish/resources/system/storage/common.py | _get_attribute_value_of | def _get_attribute_value_of(resource, attribute_name, default=None):
"""Gets the value of attribute_name from the resource
It catches the exception, if any, while retrieving the
value of attribute_name from resource and returns default.
:param resource: The resource object
:attribute_name: Propert... | python | def _get_attribute_value_of(resource, attribute_name, default=None):
"""Gets the value of attribute_name from the resource
It catches the exception, if any, while retrieving the
value of attribute_name from resource and returns default.
:param resource: The resource object
:attribute_name: Propert... | [
"def",
"_get_attribute_value_of",
"(",
"resource",
",",
"attribute_name",
",",
"default",
"=",
"None",
")",
":",
"try",
":",
"return",
"getattr",
"(",
"resource",
",",
"attribute_name",
")",
"except",
"(",
"sushy",
".",
"exceptions",
".",
"SushyError",
",",
... | Gets the value of attribute_name from the resource
It catches the exception, if any, while retrieving the
value of attribute_name from resource and returns default.
:param resource: The resource object
:attribute_name: Property of the resource
:returns the property value if no error encountered
... | [
"Gets",
"the",
"value",
"of",
"attribute_name",
"from",
"the",
"resource"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/storage/common.py#L26-L48 |
openstack/proliantutils | proliantutils/redfish/resources/system/storage/common.py | get_local_gb | def get_local_gb(system_obj):
"""Gets the largest volume or the largest disk
:param system_obj: The HPESystem object.
:returns the size in GB
"""
local_max_bytes = 0
logical_max_mib = 0
volume_max_bytes = 0
physical_max_mib = 0
drives_max_bytes = 0
simple_max_bytes = 0
# Ge... | python | def get_local_gb(system_obj):
"""Gets the largest volume or the largest disk
:param system_obj: The HPESystem object.
:returns the size in GB
"""
local_max_bytes = 0
logical_max_mib = 0
volume_max_bytes = 0
physical_max_mib = 0
drives_max_bytes = 0
simple_max_bytes = 0
# Ge... | [
"def",
"get_local_gb",
"(",
"system_obj",
")",
":",
"local_max_bytes",
"=",
"0",
"logical_max_mib",
"=",
"0",
"volume_max_bytes",
"=",
"0",
"physical_max_mib",
"=",
"0",
"drives_max_bytes",
"=",
"0",
"simple_max_bytes",
"=",
"0",
"# Gets the resources and properties",... | Gets the largest volume or the largest disk
:param system_obj: The HPESystem object.
:returns the size in GB | [
"Gets",
"the",
"largest",
"volume",
"or",
"the",
"largest",
"disk"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/storage/common.py#L51-L112 |
openstack/proliantutils | proliantutils/redfish/resources/system/storage/common.py | has_ssd | def has_ssd(system_obj):
"""Gets if the system has any drive as SSD drive
:param system_obj: The HPESystem object.
:returns True if system has SSD drives.
"""
smart_value = False
storage_value = False
smart_resource = _get_attribute_value_of(system_obj, 'smart_storage')
if smart_resourc... | python | def has_ssd(system_obj):
"""Gets if the system has any drive as SSD drive
:param system_obj: The HPESystem object.
:returns True if system has SSD drives.
"""
smart_value = False
storage_value = False
smart_resource = _get_attribute_value_of(system_obj, 'smart_storage')
if smart_resourc... | [
"def",
"has_ssd",
"(",
"system_obj",
")",
":",
"smart_value",
"=",
"False",
"storage_value",
"=",
"False",
"smart_resource",
"=",
"_get_attribute_value_of",
"(",
"system_obj",
",",
"'smart_storage'",
")",
"if",
"smart_resource",
"is",
"not",
"None",
":",
"smart_va... | Gets if the system has any drive as SSD drive
:param system_obj: The HPESystem object.
:returns True if system has SSD drives. | [
"Gets",
"if",
"the",
"system",
"has",
"any",
"drive",
"as",
"SSD",
"drive"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/storage/common.py#L115-L137 |
openstack/proliantutils | proliantutils/redfish/resources/system/storage/common.py | has_nvme_ssd | def has_nvme_ssd(system_obj):
"""Gets if the system has any drive as NVMe SSD drive
:param system_obj: The HPESystem object.
:returns True if system has SSD drives and protocol is NVMe.
"""
storage_value = False
storage_resource = _get_attribute_value_of(system_obj, 'storages')
if storage_r... | python | def has_nvme_ssd(system_obj):
"""Gets if the system has any drive as NVMe SSD drive
:param system_obj: The HPESystem object.
:returns True if system has SSD drives and protocol is NVMe.
"""
storage_value = False
storage_resource = _get_attribute_value_of(system_obj, 'storages')
if storage_r... | [
"def",
"has_nvme_ssd",
"(",
"system_obj",
")",
":",
"storage_value",
"=",
"False",
"storage_resource",
"=",
"_get_attribute_value_of",
"(",
"system_obj",
",",
"'storages'",
")",
"if",
"storage_resource",
"is",
"not",
"None",
":",
"storage_value",
"=",
"_get_attribut... | Gets if the system has any drive as NVMe SSD drive
:param system_obj: The HPESystem object.
:returns True if system has SSD drives and protocol is NVMe. | [
"Gets",
"if",
"the",
"system",
"has",
"any",
"drive",
"as",
"NVMe",
"SSD",
"drive"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/storage/common.py#L165-L177 |
openstack/proliantutils | proliantutils/redfish/resources/system/storage/common.py | get_drive_rotational_speed_rpm | def get_drive_rotational_speed_rpm(system_obj):
"""Gets the set of rotational speed rpms of the disks.
:param system_obj: The HPESystem object.
:returns the set of rotational speed rpms of the HDD devices.
"""
speed = set()
smart_resource = _get_attribute_value_of(system_obj, 'smart_storage')
... | python | def get_drive_rotational_speed_rpm(system_obj):
"""Gets the set of rotational speed rpms of the disks.
:param system_obj: The HPESystem object.
:returns the set of rotational speed rpms of the HDD devices.
"""
speed = set()
smart_resource = _get_attribute_value_of(system_obj, 'smart_storage')
... | [
"def",
"get_drive_rotational_speed_rpm",
"(",
"system_obj",
")",
":",
"speed",
"=",
"set",
"(",
")",
"smart_resource",
"=",
"_get_attribute_value_of",
"(",
"system_obj",
",",
"'smart_storage'",
")",
"if",
"smart_resource",
"is",
"not",
"None",
":",
"speed",
".",
... | Gets the set of rotational speed rpms of the disks.
:param system_obj: The HPESystem object.
:returns the set of rotational speed rpms of the HDD devices. | [
"Gets",
"the",
"set",
"of",
"rotational",
"speed",
"rpms",
"of",
"the",
"disks",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/storage/common.py#L180-L195 |
openstack/proliantutils | proliantutils/ipa_hw_manager/hardware_manager.py | ProliantHardwareManager.create_configuration | def create_configuration(self, node, ports):
"""Create RAID configuration on the bare metal.
This method creates the desired RAID configuration as read from
node['target_raid_config'].
:param node: A dictionary of the node object
:param ports: A list of dictionaries containing ... | python | def create_configuration(self, node, ports):
"""Create RAID configuration on the bare metal.
This method creates the desired RAID configuration as read from
node['target_raid_config'].
:param node: A dictionary of the node object
:param ports: A list of dictionaries containing ... | [
"def",
"create_configuration",
"(",
"self",
",",
"node",
",",
"ports",
")",
":",
"target_raid_config",
"=",
"node",
".",
"get",
"(",
"'target_raid_config'",
",",
"{",
"}",
")",
".",
"copy",
"(",
")",
"return",
"hpssa_manager",
".",
"create_configuration",
"(... | Create RAID configuration on the bare metal.
This method creates the desired RAID configuration as read from
node['target_raid_config'].
:param node: A dictionary of the node object
:param ports: A list of dictionaries containing information of ports
for the node
:r... | [
"Create",
"RAID",
"configuration",
"on",
"the",
"bare",
"metal",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ipa_hw_manager/hardware_manager.py#L55-L79 |
openstack/proliantutils | proliantutils/ipa_hw_manager/hardware_manager.py | ProliantHardwareManager.erase_devices | def erase_devices(self, node, port):
"""Erase the drives on the bare metal.
This method erase all the drives which supports sanitize and the drives
which are not part of any logical volume on the bare metal. It calls
generic erase method after the success of Sanitize disk erase.
... | python | def erase_devices(self, node, port):
"""Erase the drives on the bare metal.
This method erase all the drives which supports sanitize and the drives
which are not part of any logical volume on the bare metal. It calls
generic erase method after the success of Sanitize disk erase.
... | [
"def",
"erase_devices",
"(",
"self",
",",
"node",
",",
"port",
")",
":",
"result",
"=",
"{",
"}",
"result",
"[",
"'Disk Erase Status'",
"]",
"=",
"hpssa_manager",
".",
"erase_devices",
"(",
")",
"result",
".",
"update",
"(",
"super",
"(",
"ProliantHardware... | Erase the drives on the bare metal.
This method erase all the drives which supports sanitize and the drives
which are not part of any logical volume on the bare metal. It calls
generic erase method after the success of Sanitize disk erase.
:param node: A dictionary of the node object.
... | [
"Erase",
"the",
"drives",
"on",
"the",
"bare",
"metal",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ipa_hw_manager/hardware_manager.py#L91-L110 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.init_model_based_tags | def init_model_based_tags(self, model):
"""Initializing the model based memory and NIC information tags.
It should be called just after instantiating a RIBCL object.
ribcl = ribcl.RIBCLOperations(host, login, password, timeout,
port, cacert=cacert... | python | def init_model_based_tags(self, model):
"""Initializing the model based memory and NIC information tags.
It should be called just after instantiating a RIBCL object.
ribcl = ribcl.RIBCLOperations(host, login, password, timeout,
port, cacert=cacert... | [
"def",
"init_model_based_tags",
"(",
"self",
",",
"model",
")",
":",
"self",
".",
"model",
"=",
"model",
"if",
"'G7'",
"in",
"self",
".",
"model",
":",
"self",
".",
"MEMORY_SIZE_TAG",
"=",
"\"MEMORY_SIZE\"",
"self",
".",
"MEMORY_SIZE_NOT_PRESENT_TAG",
"=",
"... | Initializing the model based memory and NIC information tags.
It should be called just after instantiating a RIBCL object.
ribcl = ribcl.RIBCLOperations(host, login, password, timeout,
port, cacert=cacert)
model = ribcl.get_product_name()
... | [
"Initializing",
"the",
"model",
"based",
"memory",
"and",
"NIC",
"information",
"tags",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L96-L118 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._request_ilo | def _request_ilo(self, root, extra_headers=None):
"""Send RIBCL XML data to iLO.
This function sends the XML request to the ILO and
receives the output from ILO.
:raises: IloConnectionError() if unable to send the request.
"""
if self.port:
urlstr = 'https:/... | python | def _request_ilo(self, root, extra_headers=None):
"""Send RIBCL XML data to iLO.
This function sends the XML request to the ILO and
receives the output from ILO.
:raises: IloConnectionError() if unable to send the request.
"""
if self.port:
urlstr = 'https:/... | [
"def",
"_request_ilo",
"(",
"self",
",",
"root",
",",
"extra_headers",
"=",
"None",
")",
":",
"if",
"self",
".",
"port",
":",
"urlstr",
"=",
"'https://%s:%d/ribcl'",
"%",
"(",
"self",
".",
"host",
",",
"self",
".",
"port",
")",
"else",
":",
"urlstr",
... | Send RIBCL XML data to iLO.
This function sends the XML request to the ILO and
receives the output from ILO.
:raises: IloConnectionError() if unable to send the request. | [
"Send",
"RIBCL",
"XML",
"data",
"to",
"iLO",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L120-L153 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._create_dynamic_xml | def _create_dynamic_xml(self, cmdname, tag_name, mode, subelements=None):
"""Create RIBCL XML to send to iLO.
This function creates the dynamic xml required to be sent
to the ILO for all the APIs.
:param cmdname: the API which needs to be implemented.
:param tag_name: the tag i... | python | def _create_dynamic_xml(self, cmdname, tag_name, mode, subelements=None):
"""Create RIBCL XML to send to iLO.
This function creates the dynamic xml required to be sent
to the ILO for all the APIs.
:param cmdname: the API which needs to be implemented.
:param tag_name: the tag i... | [
"def",
"_create_dynamic_xml",
"(",
"self",
",",
"cmdname",
",",
"tag_name",
",",
"mode",
",",
"subelements",
"=",
"None",
")",
":",
"root",
"=",
"etree",
".",
"Element",
"(",
"'RIBCL'",
",",
"VERSION",
"=",
"\"2.0\"",
")",
"login",
"=",
"etree",
".",
"... | Create RIBCL XML to send to iLO.
This function creates the dynamic xml required to be sent
to the ILO for all the APIs.
:param cmdname: the API which needs to be implemented.
:param tag_name: the tag info under which ILO has defined
the particular API.
... | [
"Create",
"RIBCL",
"XML",
"to",
"send",
"to",
"iLO",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L155-L186 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._serialize_xml | def _serialize_xml(self, root):
"""Serialize XML data into string
It serializes the dynamic xml created and converts
it to a string. This is done before sending the
xml to the ILO.
:param root: root of the dynamic xml.
"""
if hasattr(etree, 'tostringlist'):
... | python | def _serialize_xml(self, root):
"""Serialize XML data into string
It serializes the dynamic xml created and converts
it to a string. This is done before sending the
xml to the ILO.
:param root: root of the dynamic xml.
"""
if hasattr(etree, 'tostringlist'):
... | [
"def",
"_serialize_xml",
"(",
"self",
",",
"root",
")",
":",
"if",
"hasattr",
"(",
"etree",
",",
"'tostringlist'",
")",
":",
"if",
"six",
".",
"PY3",
":",
"xml_content_list",
"=",
"[",
"x",
".",
"decode",
"(",
"\"utf-8\"",
")",
"for",
"x",
"in",
"etr... | Serialize XML data into string
It serializes the dynamic xml created and converts
it to a string. This is done before sending the
xml to the ILO.
:param root: root of the dynamic xml. | [
"Serialize",
"XML",
"data",
"into",
"string"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L188-L211 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._parse_output | def _parse_output(self, xml_response):
"""Parse the response XML from iLO.
This function parses the output received from ILO.
As the output contains multiple XMLs, it extracts
one xml at a time and loops over till all the xmls
in the response are exhausted.
It returns t... | python | def _parse_output(self, xml_response):
"""Parse the response XML from iLO.
This function parses the output received from ILO.
As the output contains multiple XMLs, it extracts
one xml at a time and loops over till all the xmls
in the response are exhausted.
It returns t... | [
"def",
"_parse_output",
"(",
"self",
",",
"xml_response",
")",
":",
"count",
"=",
"0",
"xml_dict",
"=",
"{",
"}",
"resp_message",
"=",
"None",
"xml_start_pos",
"=",
"[",
"]",
"for",
"m",
"in",
"re",
".",
"finditer",
"(",
"r\"\\<\\?xml\"",
",",
"xml_respo... | Parse the response XML from iLO.
This function parses the output received from ILO.
As the output contains multiple XMLs, it extracts
one xml at a time and loops over till all the xmls
in the response are exhausted.
It returns the data to APIs either in dictionary
forma... | [
"Parse",
"the",
"response",
"XML",
"from",
"iLO",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L213-L253 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._elementtree_to_dict | def _elementtree_to_dict(self, element):
"""Convert XML elementtree to dictionary.
Converts the actual response from the ILO for an API
to the dictionary.
"""
node = {}
text = getattr(element, 'text')
if text is not None:
text = text.strip()
... | python | def _elementtree_to_dict(self, element):
"""Convert XML elementtree to dictionary.
Converts the actual response from the ILO for an API
to the dictionary.
"""
node = {}
text = getattr(element, 'text')
if text is not None:
text = text.strip()
... | [
"def",
"_elementtree_to_dict",
"(",
"self",
",",
"element",
")",
":",
"node",
"=",
"{",
"}",
"text",
"=",
"getattr",
"(",
"element",
",",
"'text'",
")",
"if",
"text",
"is",
"not",
"None",
":",
"text",
"=",
"text",
".",
"strip",
"(",
")",
"if",
"len... | Convert XML elementtree to dictionary.
Converts the actual response from the ILO for an API
to the dictionary. | [
"Convert",
"XML",
"elementtree",
"to",
"dictionary",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L255-L277 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._validate_message | def _validate_message(self, message):
"""Validate XML response from iLO.
This function validates the XML response to see
if the exit status is 0 or not in the response.
If the status is non-zero it raises exception.
"""
if message.tag != 'RIBCL':
# the true c... | python | def _validate_message(self, message):
"""Validate XML response from iLO.
This function validates the XML response to see
if the exit status is 0 or not in the response.
If the status is non-zero it raises exception.
"""
if message.tag != 'RIBCL':
# the true c... | [
"def",
"_validate_message",
"(",
"self",
",",
"message",
")",
":",
"if",
"message",
".",
"tag",
"!=",
"'RIBCL'",
":",
"# the true case shall be unreachable for response",
"# XML from Ilo as all messages are tagged with RIBCL",
"# but still raise an exception if any invalid",
"# X... | Validate XML response from iLO.
This function validates the XML response to see
if the exit status is 0 or not in the response.
If the status is non-zero it raises exception. | [
"Validate",
"XML",
"response",
"from",
"iLO",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L279-L329 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._execute_command | def _execute_command(self, create_command, tag_info, mode, dic={}):
"""Execute a command on the iLO.
Common infrastructure used by all APIs to send/get
response from ILO.
"""
xml = self._create_dynamic_xml(
create_command, tag_info, mode, dic)
d = self._reque... | python | def _execute_command(self, create_command, tag_info, mode, dic={}):
"""Execute a command on the iLO.
Common infrastructure used by all APIs to send/get
response from ILO.
"""
xml = self._create_dynamic_xml(
create_command, tag_info, mode, dic)
d = self._reque... | [
"def",
"_execute_command",
"(",
"self",
",",
"create_command",
",",
"tag_info",
",",
"mode",
",",
"dic",
"=",
"{",
"}",
")",
":",
"xml",
"=",
"self",
".",
"_create_dynamic_xml",
"(",
"create_command",
",",
"tag_info",
",",
"mode",
",",
"dic",
")",
"d",
... | Execute a command on the iLO.
Common infrastructure used by all APIs to send/get
response from ILO. | [
"Execute",
"a",
"command",
"on",
"the",
"iLO",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L331-L342 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_all_licenses | def get_all_licenses(self):
"""Retrieve license type, key, installation date, etc."""
data = self._execute_command('GET_ALL_LICENSES', 'RIB_INFO', 'read')
d = {}
for key, val in data['GET_ALL_LICENSES']['LICENSE'].items():
if isinstance(val, dict):
d[key] = da... | python | def get_all_licenses(self):
"""Retrieve license type, key, installation date, etc."""
data = self._execute_command('GET_ALL_LICENSES', 'RIB_INFO', 'read')
d = {}
for key, val in data['GET_ALL_LICENSES']['LICENSE'].items():
if isinstance(val, dict):
d[key] = da... | [
"def",
"get_all_licenses",
"(",
"self",
")",
":",
"data",
"=",
"self",
".",
"_execute_command",
"(",
"'GET_ALL_LICENSES'",
",",
"'RIB_INFO'",
",",
"'read'",
")",
"d",
"=",
"{",
"}",
"for",
"key",
",",
"val",
"in",
"data",
"[",
"'GET_ALL_LICENSES'",
"]",
... | Retrieve license type, key, installation date, etc. | [
"Retrieve",
"license",
"type",
"key",
"installation",
"date",
"etc",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L344-L351 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_vm_status | def get_vm_status(self, device='FLOPPY'):
"""Returns the virtual media drive status."""
dic = {'DEVICE': device.upper()}
data = self._execute_command(
'GET_VM_STATUS', 'RIB_INFO', 'read', dic)
return data['GET_VM_STATUS'] | python | def get_vm_status(self, device='FLOPPY'):
"""Returns the virtual media drive status."""
dic = {'DEVICE': device.upper()}
data = self._execute_command(
'GET_VM_STATUS', 'RIB_INFO', 'read', dic)
return data['GET_VM_STATUS'] | [
"def",
"get_vm_status",
"(",
"self",
",",
"device",
"=",
"'FLOPPY'",
")",
":",
"dic",
"=",
"{",
"'DEVICE'",
":",
"device",
".",
"upper",
"(",
")",
"}",
"data",
"=",
"self",
".",
"_execute_command",
"(",
"'GET_VM_STATUS'",
",",
"'RIB_INFO'",
",",
"'read'"... | Returns the virtual media drive status. | [
"Returns",
"the",
"virtual",
"media",
"drive",
"status",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L372-L377 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.set_host_power | def set_host_power(self, power):
"""Toggle the power button of server.
:param power: 'ON' or 'OFF'
"""
if power.upper() in POWER_STATE:
dic = {'HOST_POWER': POWER_STATE[power.upper()]}
data = self._execute_command(
'SET_HOST_POWER', 'SERVER_INFO',... | python | def set_host_power(self, power):
"""Toggle the power button of server.
:param power: 'ON' or 'OFF'
"""
if power.upper() in POWER_STATE:
dic = {'HOST_POWER': POWER_STATE[power.upper()]}
data = self._execute_command(
'SET_HOST_POWER', 'SERVER_INFO',... | [
"def",
"set_host_power",
"(",
"self",
",",
"power",
")",
":",
"if",
"power",
".",
"upper",
"(",
")",
"in",
"POWER_STATE",
":",
"dic",
"=",
"{",
"'HOST_POWER'",
":",
"POWER_STATE",
"[",
"power",
".",
"upper",
"(",
")",
"]",
"}",
"data",
"=",
"self",
... | Toggle the power button of server.
:param power: 'ON' or 'OFF' | [
"Toggle",
"the",
"power",
"button",
"of",
"server",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L396-L408 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.set_one_time_boot | def set_one_time_boot(self, value):
"""Configures a single boot from a specific device.
:param value: specific device to which the boot option is set
"""
dic = {'value': value}
data = self._execute_command(
'SET_ONE_TIME_BOOT', 'SERVER_INFO', 'write', dic)
re... | python | def set_one_time_boot(self, value):
"""Configures a single boot from a specific device.
:param value: specific device to which the boot option is set
"""
dic = {'value': value}
data = self._execute_command(
'SET_ONE_TIME_BOOT', 'SERVER_INFO', 'write', dic)
re... | [
"def",
"set_one_time_boot",
"(",
"self",
",",
"value",
")",
":",
"dic",
"=",
"{",
"'value'",
":",
"value",
"}",
"data",
"=",
"self",
".",
"_execute_command",
"(",
"'SET_ONE_TIME_BOOT'",
",",
"'SERVER_INFO'",
",",
"'write'",
",",
"dic",
")",
"return",
"data... | Configures a single boot from a specific device.
:param value: specific device to which the boot option is set | [
"Configures",
"a",
"single",
"boot",
"from",
"a",
"specific",
"device",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L410-L418 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.insert_virtual_media | def insert_virtual_media(self, url, device='FLOPPY'):
"""Notifies iLO of the location of a virtual media diskette image."""
dic = {
'DEVICE': device.upper(),
'IMAGE_URL': url,
}
data = self._execute_command(
'INSERT_VIRTUAL_MEDIA', 'RIB_INFO', 'write',... | python | def insert_virtual_media(self, url, device='FLOPPY'):
"""Notifies iLO of the location of a virtual media diskette image."""
dic = {
'DEVICE': device.upper(),
'IMAGE_URL': url,
}
data = self._execute_command(
'INSERT_VIRTUAL_MEDIA', 'RIB_INFO', 'write',... | [
"def",
"insert_virtual_media",
"(",
"self",
",",
"url",
",",
"device",
"=",
"'FLOPPY'",
")",
":",
"dic",
"=",
"{",
"'DEVICE'",
":",
"device",
".",
"upper",
"(",
")",
",",
"'IMAGE_URL'",
":",
"url",
",",
"}",
"data",
"=",
"self",
".",
"_execute_command"... | Notifies iLO of the location of a virtual media diskette image. | [
"Notifies",
"iLO",
"of",
"the",
"location",
"of",
"a",
"virtual",
"media",
"diskette",
"image",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L420-L428 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.eject_virtual_media | def eject_virtual_media(self, device='FLOPPY'):
"""Ejects the Virtual Media image if one is inserted."""
vm_status = self.get_vm_status(device=device)
if vm_status['IMAGE_INSERTED'] == 'NO':
return
dic = {'DEVICE': device.upper()}
self._execute_command(
'... | python | def eject_virtual_media(self, device='FLOPPY'):
"""Ejects the Virtual Media image if one is inserted."""
vm_status = self.get_vm_status(device=device)
if vm_status['IMAGE_INSERTED'] == 'NO':
return
dic = {'DEVICE': device.upper()}
self._execute_command(
'... | [
"def",
"eject_virtual_media",
"(",
"self",
",",
"device",
"=",
"'FLOPPY'",
")",
":",
"vm_status",
"=",
"self",
".",
"get_vm_status",
"(",
"device",
"=",
"device",
")",
"if",
"vm_status",
"[",
"'IMAGE_INSERTED'",
"]",
"==",
"'NO'",
":",
"return",
"dic",
"="... | Ejects the Virtual Media image if one is inserted. | [
"Ejects",
"the",
"Virtual",
"Media",
"image",
"if",
"one",
"is",
"inserted",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L430-L438 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.set_vm_status | def set_vm_status(self, device='FLOPPY',
boot_option='BOOT_ONCE', write_protect='YES'):
"""Sets the Virtual Media drive status
It also allows the boot options for booting from the virtual media.
"""
dic = {'DEVICE': device.upper()}
xml = self._create_dynami... | python | def set_vm_status(self, device='FLOPPY',
boot_option='BOOT_ONCE', write_protect='YES'):
"""Sets the Virtual Media drive status
It also allows the boot options for booting from the virtual media.
"""
dic = {'DEVICE': device.upper()}
xml = self._create_dynami... | [
"def",
"set_vm_status",
"(",
"self",
",",
"device",
"=",
"'FLOPPY'",
",",
"boot_option",
"=",
"'BOOT_ONCE'",
",",
"write_protect",
"=",
"'YES'",
")",
":",
"dic",
"=",
"{",
"'DEVICE'",
":",
"device",
".",
"upper",
"(",
")",
"}",
"xml",
"=",
"self",
".",... | Sets the Virtual Media drive status
It also allows the boot options for booting from the virtual media. | [
"Sets",
"the",
"Virtual",
"Media",
"drive",
"status"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L440-L464 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_supported_boot_mode | def get_supported_boot_mode(self):
"""Retrieves the supported boot mode.
:returns: any one of the following proliantutils.ilo.constants:
SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY,
SUPPORTED_BOOT_MODE_UEFI_ONLY,
SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI
"""
... | python | def get_supported_boot_mode(self):
"""Retrieves the supported boot mode.
:returns: any one of the following proliantutils.ilo.constants:
SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY,
SUPPORTED_BOOT_MODE_UEFI_ONLY,
SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI
"""
... | [
"def",
"get_supported_boot_mode",
"(",
"self",
")",
":",
"data",
"=",
"self",
".",
"_execute_command",
"(",
"'GET_SUPPORTED_BOOT_MODE'",
",",
"'SERVER_INFO'",
",",
"'read'",
")",
"supported_boot_mode",
"=",
"(",
"data",
"[",
"'GET_SUPPORTED_BOOT_MODE'",
"]",
"[",
... | Retrieves the supported boot mode.
:returns: any one of the following proliantutils.ilo.constants:
SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY,
SUPPORTED_BOOT_MODE_UEFI_ONLY,
SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI | [
"Retrieves",
"the",
"supported",
"boot",
"mode",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L478-L493 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.set_pending_boot_mode | def set_pending_boot_mode(self, value):
"""Configures the boot mode of the system from a specific boot mode."""
dic = {'value': value}
data = self._execute_command(
'SET_PENDING_BOOT_MODE', 'SERVER_INFO', 'write', dic)
return data | python | def set_pending_boot_mode(self, value):
"""Configures the boot mode of the system from a specific boot mode."""
dic = {'value': value}
data = self._execute_command(
'SET_PENDING_BOOT_MODE', 'SERVER_INFO', 'write', dic)
return data | [
"def",
"set_pending_boot_mode",
"(",
"self",
",",
"value",
")",
":",
"dic",
"=",
"{",
"'value'",
":",
"value",
"}",
"data",
"=",
"self",
".",
"_execute_command",
"(",
"'SET_PENDING_BOOT_MODE'",
",",
"'SERVER_INFO'",
",",
"'write'",
",",
"dic",
")",
"return",... | Configures the boot mode of the system from a specific boot mode. | [
"Configures",
"the",
"boot",
"mode",
"of",
"the",
"system",
"from",
"a",
"specific",
"boot",
"mode",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L495-L500 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_persistent_boot_device | def get_persistent_boot_device(self):
"""Get the current persistent boot device set for the host."""
result = self._get_persistent_boot()
boot_mode = self._check_boot_mode(result)
if boot_mode == 'bios':
return result[0]['value']
value = result[0]['DESCRIPTION']
... | python | def get_persistent_boot_device(self):
"""Get the current persistent boot device set for the host."""
result = self._get_persistent_boot()
boot_mode = self._check_boot_mode(result)
if boot_mode == 'bios':
return result[0]['value']
value = result[0]['DESCRIPTION']
... | [
"def",
"get_persistent_boot_device",
"(",
"self",
")",
":",
"result",
"=",
"self",
".",
"_get_persistent_boot",
"(",
")",
"boot_mode",
"=",
"self",
".",
"_check_boot_mode",
"(",
"result",
")",
"if",
"boot_mode",
"==",
"'bios'",
":",
"return",
"result",
"[",
... | Get the current persistent boot device set for the host. | [
"Get",
"the",
"current",
"persistent",
"boot",
"device",
"set",
"for",
"the",
"host",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L509-L528 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._set_persistent_boot | def _set_persistent_boot(self, values=[]):
"""Configures a boot from a specific device."""
xml = self._create_dynamic_xml(
'SET_PERSISTENT_BOOT', 'SERVER_INFO', 'write')
if six.PY2:
child_iterator = xml.getiterator()
else:
child_iterator = xml.iter()... | python | def _set_persistent_boot(self, values=[]):
"""Configures a boot from a specific device."""
xml = self._create_dynamic_xml(
'SET_PERSISTENT_BOOT', 'SERVER_INFO', 'write')
if six.PY2:
child_iterator = xml.getiterator()
else:
child_iterator = xml.iter()... | [
"def",
"_set_persistent_boot",
"(",
"self",
",",
"values",
"=",
"[",
"]",
")",
":",
"xml",
"=",
"self",
".",
"_create_dynamic_xml",
"(",
"'SET_PERSISTENT_BOOT'",
",",
"'SERVER_INFO'",
",",
"'write'",
")",
"if",
"six",
".",
"PY2",
":",
"child_iterator",
"=",
... | Configures a boot from a specific device. | [
"Configures",
"a",
"boot",
"from",
"a",
"specific",
"device",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L530-L547 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._request_host | def _request_host(self):
"""Request host info from the server."""
urlstr = 'https://%s/xmldata?item=all' % (self.host)
kwargs = {}
if self.cacert is not None:
kwargs['verify'] = self.cacert
else:
kwargs['verify'] = False
try:
response =... | python | def _request_host(self):
"""Request host info from the server."""
urlstr = 'https://%s/xmldata?item=all' % (self.host)
kwargs = {}
if self.cacert is not None:
kwargs['verify'] = self.cacert
else:
kwargs['verify'] = False
try:
response =... | [
"def",
"_request_host",
"(",
"self",
")",
":",
"urlstr",
"=",
"'https://%s/xmldata?item=all'",
"%",
"(",
"self",
".",
"host",
")",
"kwargs",
"=",
"{",
"}",
"if",
"self",
".",
"cacert",
"is",
"not",
"None",
":",
"kwargs",
"[",
"'verify'",
"]",
"=",
"sel... | Request host info from the server. | [
"Request",
"host",
"info",
"from",
"the",
"server",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L630-L644 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_host_uuid | def get_host_uuid(self):
"""Request host UUID of the server.
:returns: the host UUID of the server
:raises: IloConnectionError if failed connecting to the iLO.
"""
xml = self._request_host()
root = etree.fromstring(xml)
data = self._elementtree_to_dict(root)
... | python | def get_host_uuid(self):
"""Request host UUID of the server.
:returns: the host UUID of the server
:raises: IloConnectionError if failed connecting to the iLO.
"""
xml = self._request_host()
root = etree.fromstring(xml)
data = self._elementtree_to_dict(root)
... | [
"def",
"get_host_uuid",
"(",
"self",
")",
":",
"xml",
"=",
"self",
".",
"_request_host",
"(",
")",
"root",
"=",
"etree",
".",
"fromstring",
"(",
"xml",
")",
"data",
"=",
"self",
".",
"_elementtree_to_dict",
"(",
"root",
")",
"return",
"data",
"[",
"'HS... | Request host UUID of the server.
:returns: the host UUID of the server
:raises: IloConnectionError if failed connecting to the iLO. | [
"Request",
"host",
"UUID",
"of",
"the",
"server",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L646-L655 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_host_health_data | def get_host_health_data(self, data=None):
"""Request host health data of the server.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the embedded health data.
:raises: IloConnectionError if failed connecting to the iLO.
:raise... | python | def get_host_health_data(self, data=None):
"""Request host health data of the server.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the embedded health data.
:raises: IloConnectionError if failed connecting to the iLO.
:raise... | [
"def",
"get_host_health_data",
"(",
"self",
",",
"data",
"=",
"None",
")",
":",
"if",
"not",
"data",
"or",
"data",
"and",
"\"GET_EMBEDDED_HEALTH_DATA\"",
"not",
"in",
"data",
":",
"data",
"=",
"self",
".",
"_execute_command",
"(",
"'GET_EMBEDDED_HEALTH'",
",",... | Request host health data of the server.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the embedded health data.
:raises: IloConnectionError if failed connecting to the iLO.
:raises: IloError, on an error from iLO. | [
"Request",
"host",
"health",
"data",
"of",
"the",
"server",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L657-L668 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_host_health_power_supplies | def get_host_health_power_supplies(self, data=None):
"""Request the health power supply information.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the power supply information.
:raises: IloConnectionError if failed connecting to the ... | python | def get_host_health_power_supplies(self, data=None):
"""Request the health power supply information.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the power supply information.
:raises: IloConnectionError if failed connecting to the ... | [
"def",
"get_host_health_power_supplies",
"(",
"self",
",",
"data",
"=",
"None",
")",
":",
"data",
"=",
"self",
".",
"get_host_health_data",
"(",
"data",
")",
"d",
"=",
"(",
"data",
"[",
"'GET_EMBEDDED_HEALTH_DATA'",
"]",
"[",
"'POWER_SUPPLIES'",
"]",
"[",
"'... | Request the health power supply information.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the power supply information.
:raises: IloConnectionError if failed connecting to the iLO.
:raises: IloError, on an error from iLO. | [
"Request",
"the",
"health",
"power",
"supply",
"information",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L683-L695 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_host_health_temperature_sensors | def get_host_health_temperature_sensors(self, data=None):
"""Get the health Temp Sensor report.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the temperature sensors
information.
:raises: IloConnectionError if failed conn... | python | def get_host_health_temperature_sensors(self, data=None):
"""Get the health Temp Sensor report.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the temperature sensors
information.
:raises: IloConnectionError if failed conn... | [
"def",
"get_host_health_temperature_sensors",
"(",
"self",
",",
"data",
"=",
"None",
")",
":",
"data",
"=",
"self",
".",
"get_host_health_data",
"(",
"data",
")",
"d",
"=",
"data",
"[",
"'GET_EMBEDDED_HEALTH_DATA'",
"]",
"[",
"'TEMPERATURE'",
"]",
"[",
"'TEMP'... | Get the health Temp Sensor report.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the temperature sensors
information.
:raises: IloConnectionError if failed connecting to the iLO.
:raises: IloError, on an error from iLO. | [
"Get",
"the",
"health",
"Temp",
"Sensor",
"report",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L697-L710 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_host_health_fan_sensors | def get_host_health_fan_sensors(self, data=None):
"""Get the health Fan Sensor Report.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the fan sensor information.
:raises: IloConnectionError if failed connecting to the iLO.
:ra... | python | def get_host_health_fan_sensors(self, data=None):
"""Get the health Fan Sensor Report.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the fan sensor information.
:raises: IloConnectionError if failed connecting to the iLO.
:ra... | [
"def",
"get_host_health_fan_sensors",
"(",
"self",
",",
"data",
"=",
"None",
")",
":",
"data",
"=",
"self",
".",
"get_host_health_data",
"(",
"data",
")",
"d",
"=",
"data",
"[",
"'GET_EMBEDDED_HEALTH_DATA'",
"]",
"[",
"'FANS'",
"]",
"[",
"'FAN'",
"]",
"if"... | Get the health Fan Sensor Report.
:param: the data to retrieve from the server, defaults to None.
:returns: the dictionary containing the fan sensor information.
:raises: IloConnectionError if failed connecting to the iLO.
:raises: IloError, on an error from iLO. | [
"Get",
"the",
"health",
"Fan",
"Sensor",
"Report",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L712-L724 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.reset_ilo_credential | def reset_ilo_credential(self, password):
"""Resets the iLO password.
:param password: The password to be set.
:raises: IloError, if account not found or on an error from iLO.
"""
dic = {'USER_LOGIN': self.login}
root = self._create_dynamic_xml(
'MOD_USER', ... | python | def reset_ilo_credential(self, password):
"""Resets the iLO password.
:param password: The password to be set.
:raises: IloError, if account not found or on an error from iLO.
"""
dic = {'USER_LOGIN': self.login}
root = self._create_dynamic_xml(
'MOD_USER', ... | [
"def",
"reset_ilo_credential",
"(",
"self",
",",
"password",
")",
":",
"dic",
"=",
"{",
"'USER_LOGIN'",
":",
"self",
".",
"login",
"}",
"root",
"=",
"self",
".",
"_create_dynamic_xml",
"(",
"'MOD_USER'",
",",
"'USER_INFO'",
",",
"'write'",
",",
"dic",
")",... | Resets the iLO password.
:param password: The password to be set.
:raises: IloError, if account not found or on an error from iLO. | [
"Resets",
"the",
"iLO",
"password",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L759-L773 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_essential_properties | def get_essential_properties(self):
"""Gets essential scheduling properties as required by ironic
:returns: a dictionary of server properties like memory size,
disk size, number of cpus, cpu arch, port numbers
and mac addresses.
:raises:IloError if iLO return... | python | def get_essential_properties(self):
"""Gets essential scheduling properties as required by ironic
:returns: a dictionary of server properties like memory size,
disk size, number of cpus, cpu arch, port numbers
and mac addresses.
:raises:IloError if iLO return... | [
"def",
"get_essential_properties",
"(",
"self",
")",
":",
"data",
"=",
"self",
".",
"get_host_health_data",
"(",
")",
"properties",
"=",
"{",
"'memory_mb'",
":",
"self",
".",
"_parse_memory_embedded_health",
"(",
"data",
")",
"}",
"cpus",
",",
"cpu_arch",
"=",... | Gets essential scheduling properties as required by ironic
:returns: a dictionary of server properties like memory size,
disk size, number of cpus, cpu arch, port numbers
and mac addresses.
:raises:IloError if iLO returns an error in command execution. | [
"Gets",
"essential",
"scheduling",
"properties",
"as",
"required",
"by",
"ironic"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L788-L807 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_server_capabilities | def get_server_capabilities(self):
"""Gets server properties which can be used for scheduling
:returns: a dictionary of hardware properties like firmware
versions, server model.
:raises: IloError, if iLO returns an error in command execution.
"""
capabilities =... | python | def get_server_capabilities(self):
"""Gets server properties which can be used for scheduling
:returns: a dictionary of hardware properties like firmware
versions, server model.
:raises: IloError, if iLO returns an error in command execution.
"""
capabilities =... | [
"def",
"get_server_capabilities",
"(",
"self",
")",
":",
"capabilities",
"=",
"{",
"}",
"data",
"=",
"self",
".",
"get_host_health_data",
"(",
")",
"ilo_firmware",
"=",
"self",
".",
"_get_ilo_firmware_version",
"(",
"data",
")",
"if",
"ilo_firmware",
":",
"cap... | Gets server properties which can be used for scheduling
:returns: a dictionary of hardware properties like firmware
versions, server model.
:raises: IloError, if iLO returns an error in command execution. | [
"Gets",
"server",
"properties",
"which",
"can",
"be",
"used",
"for",
"scheduling"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L809-L831 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._parse_memory_embedded_health | def _parse_memory_embedded_health(self, data):
"""Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: memory size in MB.
:raises IloError, if unable to get the memory details.
"""
memory_mb = 0
... | python | def _parse_memory_embedded_health(self, data):
"""Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: memory size in MB.
:raises IloError, if unable to get the memory details.
"""
memory_mb = 0
... | [
"def",
"_parse_memory_embedded_health",
"(",
"self",
",",
"data",
")",
":",
"memory_mb",
"=",
"0",
"memory",
"=",
"self",
".",
"_get_memory_details_value_based_on_model",
"(",
"data",
")",
"if",
"memory",
"is",
"None",
":",
"msg",
"=",
"\"Unable to get memory data... | Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: memory size in MB.
:raises IloError, if unable to get the memory details. | [
"Parse",
"the",
"get_host_health_data",
"()",
"for",
"essential",
"properties"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L833-L856 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._parse_processor_embedded_health | def _parse_processor_embedded_health(self, data):
"""Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: processor details like cpu arch and number of cpus.
"""
processor = self.get_value_as_list((data['... | python | def _parse_processor_embedded_health(self, data):
"""Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: processor details like cpu arch and number of cpus.
"""
processor = self.get_value_as_list((data['... | [
"def",
"_parse_processor_embedded_health",
"(",
"self",
",",
"data",
")",
":",
"processor",
"=",
"self",
".",
"get_value_as_list",
"(",
"(",
"data",
"[",
"'GET_EMBEDDED_HEALTH_DATA'",
"]",
"[",
"'PROCESSORS'",
"]",
")",
",",
"'PROCESSOR'",
")",
"if",
"processor"... | Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: processor details like cpu arch and number of cpus. | [
"Parse",
"the",
"get_host_health_data",
"()",
"for",
"essential",
"properties"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L858-L887 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._parse_storage_embedded_health | def _parse_storage_embedded_health(self, data):
"""Gets the storage data from get_embedded_health
Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: disk size in GB.
"""
local_gb = 0
st... | python | def _parse_storage_embedded_health(self, data):
"""Gets the storage data from get_embedded_health
Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: disk size in GB.
"""
local_gb = 0
st... | [
"def",
"_parse_storage_embedded_health",
"(",
"self",
",",
"data",
")",
":",
"local_gb",
"=",
"0",
"storage",
"=",
"self",
".",
"get_value_as_list",
"(",
"data",
"[",
"'GET_EMBEDDED_HEALTH_DATA'",
"]",
",",
"'STORAGE'",
")",
"if",
"storage",
"is",
"None",
":",... | Gets the storage data from get_embedded_health
Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: disk size in GB. | [
"Gets",
"the",
"storage",
"data",
"from",
"get_embedded_health"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L889-L938 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_value_as_list | def get_value_as_list(self, dictionary, key):
"""Helper function to check and convert a value to list.
Helper function to check and convert a value to json list.
This helps the ribcl data to be generalized across the servers.
:param dictionary: a dictionary to check in if key is presen... | python | def get_value_as_list(self, dictionary, key):
"""Helper function to check and convert a value to list.
Helper function to check and convert a value to json list.
This helps the ribcl data to be generalized across the servers.
:param dictionary: a dictionary to check in if key is presen... | [
"def",
"get_value_as_list",
"(",
"self",
",",
"dictionary",
",",
"key",
")",
":",
"if",
"key",
"not",
"in",
"dictionary",
":",
"return",
"None",
"value",
"=",
"dictionary",
"[",
"key",
"]",
"if",
"not",
"isinstance",
"(",
"value",
",",
"list",
")",
":"... | Helper function to check and convert a value to list.
Helper function to check and convert a value to json list.
This helps the ribcl data to be generalized across the servers.
:param dictionary: a dictionary to check in if key is present.
:param key: key to be checked if thats present... | [
"Helper",
"function",
"to",
"check",
"and",
"convert",
"a",
"value",
"to",
"list",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L940-L957 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._parse_nics_embedded_health | def _parse_nics_embedded_health(self, data):
"""Gets the NIC details from get_embedded_health data
Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: a dictionary of port numbers and their corresponding
... | python | def _parse_nics_embedded_health(self, data):
"""Gets the NIC details from get_embedded_health data
Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: a dictionary of port numbers and their corresponding
... | [
"def",
"_parse_nics_embedded_health",
"(",
"self",
",",
"data",
")",
":",
"nic_data",
"=",
"self",
".",
"get_value_as_list",
"(",
"(",
"data",
"[",
"'GET_EMBEDDED_HEALTH_DATA'",
"]",
"[",
"self",
".",
"NIC_INFORMATION_TAG",
"]",
")",
",",
"'NIC'",
")",
"if",
... | Gets the NIC details from get_embedded_health data
Parse the get_host_health_data() for essential properties
:param data: the output returned by get_host_health_data()
:returns: a dictionary of port numbers and their corresponding
mac addresses.
:raises IloError, if ... | [
"Gets",
"the",
"NIC",
"details",
"from",
"get_embedded_health",
"data"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L959-L989 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._get_firmware_embedded_health | def _get_firmware_embedded_health(self, data):
"""Parse the get_host_health_data() for server capabilities
:param data: the output returned by get_host_health_data()
:returns: a dictionary of firmware name and firmware version.
"""
firmware = self.get_value_as_list(data['GET_EM... | python | def _get_firmware_embedded_health(self, data):
"""Parse the get_host_health_data() for server capabilities
:param data: the output returned by get_host_health_data()
:returns: a dictionary of firmware name and firmware version.
"""
firmware = self.get_value_as_list(data['GET_EM... | [
"def",
"_get_firmware_embedded_health",
"(",
"self",
",",
"data",
")",
":",
"firmware",
"=",
"self",
".",
"get_value_as_list",
"(",
"data",
"[",
"'GET_EMBEDDED_HEALTH_DATA'",
"]",
",",
"'FIRMWARE_INFORMATION'",
")",
"if",
"firmware",
"is",
"None",
":",
"return",
... | Parse the get_host_health_data() for server capabilities
:param data: the output returned by get_host_health_data()
:returns: a dictionary of firmware name and firmware version. | [
"Parse",
"the",
"get_host_health_data",
"()",
"for",
"server",
"capabilities"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L991-L1004 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._get_rom_firmware_version | def _get_rom_firmware_version(self, data):
"""Gets the rom firmware version for server capabilities
Parse the get_host_health_data() to retreive the firmware
details.
:param data: the output returned by get_host_health_data()
:returns: a dictionary of rom firmware version.
... | python | def _get_rom_firmware_version(self, data):
"""Gets the rom firmware version for server capabilities
Parse the get_host_health_data() to retreive the firmware
details.
:param data: the output returned by get_host_health_data()
:returns: a dictionary of rom firmware version.
... | [
"def",
"_get_rom_firmware_version",
"(",
"self",
",",
"data",
")",
":",
"firmware_details",
"=",
"self",
".",
"_get_firmware_embedded_health",
"(",
"data",
")",
"if",
"firmware_details",
":",
"try",
":",
"rom_firmware_version",
"=",
"(",
"firmware_details",
"[",
"... | Gets the rom firmware version for server capabilities
Parse the get_host_health_data() to retreive the firmware
details.
:param data: the output returned by get_host_health_data()
:returns: a dictionary of rom firmware version. | [
"Gets",
"the",
"rom",
"firmware",
"version",
"for",
"server",
"capabilities"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L1006-L1023 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._get_ilo_firmware_version | def _get_ilo_firmware_version(self, data):
"""Gets the ilo firmware version for server capabilities
Parse the get_host_health_data() to retreive the firmware
details.
:param data: the output returned by get_host_health_data()
:returns: a dictionary of iLO firmware version.
... | python | def _get_ilo_firmware_version(self, data):
"""Gets the ilo firmware version for server capabilities
Parse the get_host_health_data() to retreive the firmware
details.
:param data: the output returned by get_host_health_data()
:returns: a dictionary of iLO firmware version.
... | [
"def",
"_get_ilo_firmware_version",
"(",
"self",
",",
"data",
")",
":",
"firmware_details",
"=",
"self",
".",
"_get_firmware_embedded_health",
"(",
"data",
")",
"if",
"firmware_details",
":",
"try",
":",
"return",
"{",
"'ilo_firmware_version'",
":",
"firmware_detail... | Gets the ilo firmware version for server capabilities
Parse the get_host_health_data() to retreive the firmware
details.
:param data: the output returned by get_host_health_data()
:returns: a dictionary of iLO firmware version. | [
"Gets",
"the",
"ilo",
"firmware",
"version",
"for",
"server",
"capabilities"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L1025-L1040 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.get_ilo_firmware_version_as_major_minor | def get_ilo_firmware_version_as_major_minor(self):
"""Gets the ilo firmware version for server capabilities
Parse the get_host_health_data() to retreive the firmware
details.
:param data: the output returned by get_host_health_data()
:returns: String with the format "<major>.<m... | python | def get_ilo_firmware_version_as_major_minor(self):
"""Gets the ilo firmware version for server capabilities
Parse the get_host_health_data() to retreive the firmware
details.
:param data: the output returned by get_host_health_data()
:returns: String with the format "<major>.<m... | [
"def",
"get_ilo_firmware_version_as_major_minor",
"(",
"self",
")",
":",
"data",
"=",
"self",
".",
"get_host_health_data",
"(",
")",
"firmware_details",
"=",
"self",
".",
"_get_firmware_embedded_health",
"(",
"data",
")",
"if",
"firmware_details",
":",
"ilo_version_st... | Gets the ilo firmware version for server capabilities
Parse the get_host_health_data() to retreive the firmware
details.
:param data: the output returned by get_host_health_data()
:returns: String with the format "<major>.<minor>" or None. | [
"Gets",
"the",
"ilo",
"firmware",
"version",
"for",
"server",
"capabilities"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L1042-L1056 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._get_number_of_gpu_devices_connected | def _get_number_of_gpu_devices_connected(self, data):
"""Gets the number of GPU devices connected to the server
Parse the get_host_health_data() and get the count of
number of GPU devices connected to the server.
:param data: the output returned by get_host_health_data()
:retur... | python | def _get_number_of_gpu_devices_connected(self, data):
"""Gets the number of GPU devices connected to the server
Parse the get_host_health_data() and get the count of
number of GPU devices connected to the server.
:param data: the output returned by get_host_health_data()
:retur... | [
"def",
"_get_number_of_gpu_devices_connected",
"(",
"self",
",",
"data",
")",
":",
"temp",
"=",
"self",
".",
"get_value_as_list",
"(",
"(",
"data",
"[",
"'GET_EMBEDDED_HEALTH_DATA'",
"]",
"[",
"'TEMPERATURE'",
"]",
")",
",",
"'TEMP'",
")",
"count",
"=",
"0",
... | Gets the number of GPU devices connected to the server
Parse the get_host_health_data() and get the count of
number of GPU devices connected to the server.
:param data: the output returned by get_host_health_data()
:returns: a dictionary of rom firmware version. | [
"Gets",
"the",
"number",
"of",
"GPU",
"devices",
"connected",
"to",
"the",
"server"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L1058-L1079 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.activate_license | def activate_license(self, key):
"""Activates iLO license.
:param key: iLO license key.
:raises: IloError, on an error from iLO.
"""
root = self._create_dynamic_xml('LICENSE', 'RIB_INFO', 'write')
element = root.find('LOGIN/RIB_INFO/LICENSE')
etree.SubElement(ele... | python | def activate_license(self, key):
"""Activates iLO license.
:param key: iLO license key.
:raises: IloError, on an error from iLO.
"""
root = self._create_dynamic_xml('LICENSE', 'RIB_INFO', 'write')
element = root.find('LOGIN/RIB_INFO/LICENSE')
etree.SubElement(ele... | [
"def",
"activate_license",
"(",
"self",
",",
"key",
")",
":",
"root",
"=",
"self",
".",
"_create_dynamic_xml",
"(",
"'LICENSE'",
",",
"'RIB_INFO'",
",",
"'write'",
")",
"element",
"=",
"root",
".",
"find",
"(",
"'LOGIN/RIB_INFO/LICENSE'",
")",
"etree",
".",
... | Activates iLO license.
:param key: iLO license key.
:raises: IloError, on an error from iLO. | [
"Activates",
"iLO",
"license",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L1081-L1091 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations.update_firmware | def update_firmware(self, filename, component_type):
"""Updates the given firmware on the server for the given component.
:param filename: location of the raw firmware file. Extraction of the
firmware file (if in compact format) is expected to
happen pr... | python | def update_firmware(self, filename, component_type):
"""Updates the given firmware on the server for the given component.
:param filename: location of the raw firmware file. Extraction of the
firmware file (if in compact format) is expected to
happen pr... | [
"def",
"update_firmware",
"(",
"self",
",",
"filename",
",",
"component_type",
")",
":",
"fw_img_processor",
"=",
"firmware_controller",
".",
"FirmwareImageUploader",
"(",
"filename",
")",
"LOG",
".",
"debug",
"(",
"self",
".",
"_",
"(",
"'Uploading firmware file:... | Updates the given firmware on the server for the given component.
:param filename: location of the raw firmware file. Extraction of the
firmware file (if in compact format) is expected to
happen prior to this invocation.
:param component_type: Type of c... | [
"Updates",
"the",
"given",
"firmware",
"on",
"the",
"server",
"for",
"the",
"given",
"component",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L1094-L1126 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._get_firmware_update_xml_for_file_and_component | def _get_firmware_update_xml_for_file_and_component(
self, filename, component):
"""Creates the dynamic xml for flashing the device firmware via iLO.
This method creates the dynamic xml for flashing the firmware, based
on the component type so passed.
:param filename: locati... | python | def _get_firmware_update_xml_for_file_and_component(
self, filename, component):
"""Creates the dynamic xml for flashing the device firmware via iLO.
This method creates the dynamic xml for flashing the firmware, based
on the component type so passed.
:param filename: locati... | [
"def",
"_get_firmware_update_xml_for_file_and_component",
"(",
"self",
",",
"filename",
",",
"component",
")",
":",
"if",
"component",
"==",
"'ilo'",
":",
"cmd_name",
"=",
"'UPDATE_RIB_FIRMWARE'",
"else",
":",
"# Note(deray): Not explicitly checking for all other supported",
... | Creates the dynamic xml for flashing the device firmware via iLO.
This method creates the dynamic xml for flashing the firmware, based
on the component type so passed.
:param filename: location of the raw firmware file.
:param component_type: Type of component to be applied to.
... | [
"Creates",
"the",
"dynamic",
"xml",
"for",
"flashing",
"the",
"device",
"firmware",
"via",
"iLO",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L1128-L1155 |
openstack/proliantutils | proliantutils/ilo/ribcl.py | RIBCLOperations._update_nic_data_from_nic_info_based_on_model | def _update_nic_data_from_nic_info_based_on_model(self, nic_dict, item,
port, mac):
"""This method updates with port number and corresponding mac
:param nic_dict: dictionary contains port number and corresponding mac
:param item: dictionary ... | python | def _update_nic_data_from_nic_info_based_on_model(self, nic_dict, item,
port, mac):
"""This method updates with port number and corresponding mac
:param nic_dict: dictionary contains port number and corresponding mac
:param item: dictionary ... | [
"def",
"_update_nic_data_from_nic_info_based_on_model",
"(",
"self",
",",
"nic_dict",
",",
"item",
",",
"port",
",",
"mac",
")",
":",
"if",
"'G7'",
"in",
"self",
".",
"model",
":",
"nic_dict",
"[",
"port",
"]",
"=",
"mac",
"else",
":",
"location",
"=",
"... | This method updates with port number and corresponding mac
:param nic_dict: dictionary contains port number and corresponding mac
:param item: dictionary containing nic details
:param port: Port number
:param mac: mac-address | [
"This",
"method",
"updates",
"with",
"port",
"number",
"and",
"corresponding",
"mac"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ribcl.py#L1170-L1184 |
openstack/proliantutils | proliantutils/rest/v1.py | RestConnectorBase._get_response_body_from_gzipped_content | def _get_response_body_from_gzipped_content(self, url, response):
"""Get the response body from gzipped content
Try to decode as gzip (we should check the headers for
Content-Encoding=gzip)
if response.headers['content-encoding'] == "gzip":
...
:param url: the ur... | python | def _get_response_body_from_gzipped_content(self, url, response):
"""Get the response body from gzipped content
Try to decode as gzip (we should check the headers for
Content-Encoding=gzip)
if response.headers['content-encoding'] == "gzip":
...
:param url: the ur... | [
"def",
"_get_response_body_from_gzipped_content",
"(",
"self",
",",
"url",
",",
"response",
")",
":",
"try",
":",
"gzipper",
"=",
"gzip",
".",
"GzipFile",
"(",
"fileobj",
"=",
"six",
".",
"BytesIO",
"(",
"response",
".",
"text",
")",
")",
"LOG",
".",
"de... | Get the response body from gzipped content
Try to decode as gzip (we should check the headers for
Content-Encoding=gzip)
if response.headers['content-encoding'] == "gzip":
...
:param url: the url for which response was sent
:type url: str
:param response:... | [
"Get",
"the",
"response",
"body",
"from",
"gzipped",
"content"
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/rest/v1.py#L62-L94 |
openstack/proliantutils | proliantutils/rest/v1.py | RestConnectorBase._rest_op | def _rest_op(self, operation, suburi, request_headers, request_body):
"""Generic REST Operation handler."""
url = urlparse.urlparse('https://' + self.host + suburi)
# Used for logging on redirection error.
start_url = url.geturl()
LOG.debug(self._("%(operation)s %(url)s"),
... | python | def _rest_op(self, operation, suburi, request_headers, request_body):
"""Generic REST Operation handler."""
url = urlparse.urlparse('https://' + self.host + suburi)
# Used for logging on redirection error.
start_url = url.geturl()
LOG.debug(self._("%(operation)s %(url)s"),
... | [
"def",
"_rest_op",
"(",
"self",
",",
"operation",
",",
"suburi",
",",
"request_headers",
",",
"request_body",
")",
":",
"url",
"=",
"urlparse",
".",
"urlparse",
"(",
"'https://'",
"+",
"self",
".",
"host",
"+",
"suburi",
")",
"# Used for logging on redirection... | Generic REST Operation handler. | [
"Generic",
"REST",
"Operation",
"handler",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/rest/v1.py#L96-L224 |
openstack/proliantutils | proliantutils/rest/v1.py | RestConnectorBase._rest_patch | def _rest_patch(self, suburi, request_headers, request_body):
"""REST PATCH operation.
HTTP response codes could be 500, 404, 202 etc.
"""
return self._rest_op('PATCH', suburi, request_headers, request_body) | python | def _rest_patch(self, suburi, request_headers, request_body):
"""REST PATCH operation.
HTTP response codes could be 500, 404, 202 etc.
"""
return self._rest_op('PATCH', suburi, request_headers, request_body) | [
"def",
"_rest_patch",
"(",
"self",
",",
"suburi",
",",
"request_headers",
",",
"request_body",
")",
":",
"return",
"self",
".",
"_rest_op",
"(",
"'PATCH'",
",",
"suburi",
",",
"request_headers",
",",
"request_body",
")"
] | REST PATCH operation.
HTTP response codes could be 500, 404, 202 etc. | [
"REST",
"PATCH",
"operation",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/rest/v1.py#L233-L238 |
openstack/proliantutils | proliantutils/rest/v1.py | RestConnectorBase._rest_put | def _rest_put(self, suburi, request_headers, request_body):
"""REST PUT operation.
HTTP response codes could be 500, 404, 202 etc.
"""
return self._rest_op('PUT', suburi, request_headers, request_body) | python | def _rest_put(self, suburi, request_headers, request_body):
"""REST PUT operation.
HTTP response codes could be 500, 404, 202 etc.
"""
return self._rest_op('PUT', suburi, request_headers, request_body) | [
"def",
"_rest_put",
"(",
"self",
",",
"suburi",
",",
"request_headers",
",",
"request_body",
")",
":",
"return",
"self",
".",
"_rest_op",
"(",
"'PUT'",
",",
"suburi",
",",
"request_headers",
",",
"request_body",
")"
] | REST PUT operation.
HTTP response codes could be 500, 404, 202 etc. | [
"REST",
"PUT",
"operation",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/rest/v1.py#L240-L245 |
openstack/proliantutils | proliantutils/rest/v1.py | RestConnectorBase._rest_post | def _rest_post(self, suburi, request_headers, request_body):
"""REST POST operation.
The response body after the operation could be the new resource, or
ExtendedError, or it could be empty.
"""
return self._rest_op('POST', suburi, request_headers, request_body) | python | def _rest_post(self, suburi, request_headers, request_body):
"""REST POST operation.
The response body after the operation could be the new resource, or
ExtendedError, or it could be empty.
"""
return self._rest_op('POST', suburi, request_headers, request_body) | [
"def",
"_rest_post",
"(",
"self",
",",
"suburi",
",",
"request_headers",
",",
"request_body",
")",
":",
"return",
"self",
".",
"_rest_op",
"(",
"'POST'",
",",
"suburi",
",",
"request_headers",
",",
"request_body",
")"
] | REST POST operation.
The response body after the operation could be the new resource, or
ExtendedError, or it could be empty. | [
"REST",
"POST",
"operation",
"."
] | train | https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/rest/v1.py#L247-L253 |
NuGrid/NuGridPy | nugridpy/h5T.py | Files.findCycle | def findCycle(self, cycNum):
'''
Method that looks through the self.cycles and returns the
nearest cycle:
Parameters
----------
cycNum : int
int of the cycle desired cycle.
'''
cycNum=int(cycNum)
i=0
while i < len(self.cycles... | python | def findCycle(self, cycNum):
'''
Method that looks through the self.cycles and returns the
nearest cycle:
Parameters
----------
cycNum : int
int of the cycle desired cycle.
'''
cycNum=int(cycNum)
i=0
while i < len(self.cycles... | [
"def",
"findCycle",
"(",
"self",
",",
"cycNum",
")",
":",
"cycNum",
"=",
"int",
"(",
"cycNum",
")",
"i",
"=",
"0",
"while",
"i",
"<",
"len",
"(",
"self",
".",
"cycles",
")",
":",
"if",
"cycNum",
"<",
"int",
"(",
"self",
".",
"cycles",
"[",
"i",... | Method that looks through the self.cycles and returns the
nearest cycle:
Parameters
----------
cycNum : int
int of the cycle desired cycle. | [
"Method",
"that",
"looks",
"through",
"the",
"self",
".",
"cycles",
"and",
"returns",
"the",
"nearest",
"cycle",
":"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/h5T.py#L190-L219 |
NuGrid/NuGridPy | nugridpy/h5T.py | Files.get | def get(self, cycle_list, dataitem=None, isotope=None, sparse=1):
'''
Get Data from HDF5 files.
There are three ways to call this function
1. get(dataitem)
Fetches the datatiem for all cycles. If dataitem is a header
attribute or list of attributes then the dat... | python | def get(self, cycle_list, dataitem=None, isotope=None, sparse=1):
'''
Get Data from HDF5 files.
There are three ways to call this function
1. get(dataitem)
Fetches the datatiem for all cycles. If dataitem is a header
attribute or list of attributes then the dat... | [
"def",
"get",
"(",
"self",
",",
"cycle_list",
",",
"dataitem",
"=",
"None",
",",
"isotope",
"=",
"None",
",",
"sparse",
"=",
"1",
")",
":",
"# Check out the inputs",
"t1",
"=",
"time",
".",
"time",
"(",
")",
"isotopes_of_interest",
"=",
"[",
"]",
"n... | Get Data from HDF5 files.
There are three ways to call this function
1. get(dataitem)
Fetches the datatiem for all cycles. If dataitem is a header
attribute or list of attributes then the data is retured.
If detaitem an individulal or list of column attributes,
... | [
"Get",
"Data",
"from",
"HDF5",
"files",
"."
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/h5T.py#L543-L980 |
NuGrid/NuGridPy | nugridpy/h5T.py | Files.red_dim | def red_dim(self, array):
"""
This function reduces the dimensions of an array until it is
no longer of length 1.
"""
while isinstance(array, list) == True or \
isinstance(array, np.ndarray) == True:
try:
if len(array) == 1:
... | python | def red_dim(self, array):
"""
This function reduces the dimensions of an array until it is
no longer of length 1.
"""
while isinstance(array, list) == True or \
isinstance(array, np.ndarray) == True:
try:
if len(array) == 1:
... | [
"def",
"red_dim",
"(",
"self",
",",
"array",
")",
":",
"while",
"isinstance",
"(",
"array",
",",
"list",
")",
"==",
"True",
"or",
"isinstance",
"(",
"array",
",",
"np",
".",
"ndarray",
")",
"==",
"True",
":",
"try",
":",
"if",
"len",
"(",
"array",
... | This function reduces the dimensions of an array until it is
no longer of length 1. | [
"This",
"function",
"reduces",
"the",
"dimensions",
"of",
"an",
"array",
"until",
"it",
"is",
"no",
"longer",
"of",
"length",
"1",
"."
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/h5T.py#L993-L1009 |
Azure/azure-multiapi-storage-python | azure/multiapi/storage/v2017_07_29/common/storageclient.py | StorageClient._perform_request | def _perform_request(self, request, parser=None, parser_args=None, operation_context=None):
'''
Sends the request and return response. Catches HTTPError and hands it
to error handler
'''
operation_context = operation_context or _OperationContext()
retry_context = RetryCon... | python | def _perform_request(self, request, parser=None, parser_args=None, operation_context=None):
'''
Sends the request and return response. Catches HTTPError and hands it
to error handler
'''
operation_context = operation_context or _OperationContext()
retry_context = RetryCon... | [
"def",
"_perform_request",
"(",
"self",
",",
"request",
",",
"parser",
"=",
"None",
",",
"parser_args",
"=",
"None",
",",
"operation_context",
"=",
"None",
")",
":",
"operation_context",
"=",
"operation_context",
"or",
"_OperationContext",
"(",
")",
"retry_conte... | Sends the request and return response. Catches HTTPError and hands it
to error handler | [
"Sends",
"the",
"request",
"and",
"return",
"response",
".",
"Catches",
"HTTPError",
"and",
"hands",
"it",
"to",
"error",
"handler"
] | train | https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2017_07_29/common/storageclient.py#L210-L363 |
NuGrid/NuGridPy | nugridpy/data_plot.py | _padding_model_number | def _padding_model_number(number, max_num):
'''
This method returns a zero-front padded string
It makes out of str(45) -> '0045' if 999 < max_num < 10000. This is
meant to work for reasonable integers (maybe less than 10^6).
Parameters
----------
number : integer
number that the st... | python | def _padding_model_number(number, max_num):
'''
This method returns a zero-front padded string
It makes out of str(45) -> '0045' if 999 < max_num < 10000. This is
meant to work for reasonable integers (maybe less than 10^6).
Parameters
----------
number : integer
number that the st... | [
"def",
"_padding_model_number",
"(",
"number",
",",
"max_num",
")",
":",
"cnum",
"=",
"str",
"(",
"number",
")",
"clen",
"=",
"len",
"(",
"cnum",
")",
"cmax",
"=",
"int",
"(",
"log10",
"(",
"max_num",
")",
")",
"+",
"1",
"return",
"(",
"cmax",
"-",... | This method returns a zero-front padded string
It makes out of str(45) -> '0045' if 999 < max_num < 10000. This is
meant to work for reasonable integers (maybe less than 10^6).
Parameters
----------
number : integer
number that the string should represent.
max_num : integer
max... | [
"This",
"method",
"returns",
"a",
"zero",
"-",
"front",
"padded",
"string"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/data_plot.py#L61-L82 |
NuGrid/NuGridPy | nugridpy/data_plot.py | flux_chart | def flux_chart(file_name, plotaxis, plot_type, which_flux=None,
I_am_the_target=None, prange=None):
'''
Plots a chart with fluxes
Parameters
----------
file_name : string
Name of the file of fluxes we are looking at.
plotaxis : list
[xmin, xmax, ymin, ymax], where... | python | def flux_chart(file_name, plotaxis, plot_type, which_flux=None,
I_am_the_target=None, prange=None):
'''
Plots a chart with fluxes
Parameters
----------
file_name : string
Name of the file of fluxes we are looking at.
plotaxis : list
[xmin, xmax, ymin, ymax], where... | [
"def",
"flux_chart",
"(",
"file_name",
",",
"plotaxis",
",",
"plot_type",
",",
"which_flux",
"=",
"None",
",",
"I_am_the_target",
"=",
"None",
",",
"prange",
"=",
"None",
")",
":",
"import",
"numpy",
"as",
"np",
"import",
"matplotlib",
".",
"pyplot",
"as",... | Plots a chart with fluxes
Parameters
----------
file_name : string
Name of the file of fluxes we are looking at.
plotaxis : list
[xmin, xmax, ymin, ymax], where on x axis there is neutron
number and on y axis there is Z.
plot_types : integer
Set to 0 for standard flu... | [
"Plots",
"a",
"chart",
"with",
"fluxes"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/data_plot.py#L4816-L5352 |
NuGrid/NuGridPy | nugridpy/data_plot.py | DataPlot._sparse | def _sparse(self, x, y, sparse):
"""
Method that removes every non sparse th element.
For example:
if this argument was 5, This method would plot the 0th, 5th,
10th ... elements.
Parameters
----------
x : list
list of x values, of length j.
... | python | def _sparse(self, x, y, sparse):
"""
Method that removes every non sparse th element.
For example:
if this argument was 5, This method would plot the 0th, 5th,
10th ... elements.
Parameters
----------
x : list
list of x values, of length j.
... | [
"def",
"_sparse",
"(",
"self",
",",
"x",
",",
"y",
",",
"sparse",
")",
":",
"tmpX",
"=",
"[",
"]",
"tmpY",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"x",
")",
")",
":",
"if",
"sparse",
"==",
"1",
":",
"return",
"x",
",",
... | Method that removes every non sparse th element.
For example:
if this argument was 5, This method would plot the 0th, 5th,
10th ... elements.
Parameters
----------
x : list
list of x values, of length j.
y : list
list of y values, of leng... | [
"Method",
"that",
"removes",
"every",
"non",
"sparse",
"th",
"element",
"."
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/data_plot.py#L193-L220 |
NuGrid/NuGridPy | nugridpy/data_plot.py | DataPlot.plotMulti | def plotMulti(self, atrix, atriy, cyclist, title, path='/',
legend=None, labelx=None, labely=None, logx=False,
logy=False, base=10, sparse=1, pdf=False,
limits=None):
'''
Method for plotting multiple plots and saving it to multiple
pngs or PD... | python | def plotMulti(self, atrix, atriy, cyclist, title, path='/',
legend=None, labelx=None, labely=None, logx=False,
logy=False, base=10, sparse=1, pdf=False,
limits=None):
'''
Method for plotting multiple plots and saving it to multiple
pngs or PD... | [
"def",
"plotMulti",
"(",
"self",
",",
"atrix",
",",
"atriy",
",",
"cyclist",
",",
"title",
",",
"path",
"=",
"'/'",
",",
"legend",
"=",
"None",
",",
"labelx",
"=",
"None",
",",
"labely",
"=",
"None",
",",
"logx",
"=",
"False",
",",
"logy",
"=",
"... | Method for plotting multiple plots and saving it to multiple
pngs or PDFs.
Parameters
----------
atrix : string
The name of the attribute you want on the x axis.
atriy : string
The name of the attribute you want on the Y axis.
cyclist : list
... | [
"Method",
"for",
"plotting",
"multiple",
"plots",
"and",
"saving",
"it",
"to",
"multiple",
"pngs",
"or",
"PDFs",
"."
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/data_plot.py#L222-L298 |
NuGrid/NuGridPy | nugridpy/data_plot.py | DataPlot.plot | def plot(self, atrix, atriy, fname=None, numtype='ndump',
legend=None, labelx=None, labely=None, indexx=None,
indexy=None, title=None, shape='.', logx=False,
logy=False, path='/', base=10, sparse=1, show=True, pdf=False,limits=None,
markevery=None, linewidth=1):
... | python | def plot(self, atrix, atriy, fname=None, numtype='ndump',
legend=None, labelx=None, labely=None, indexx=None,
indexy=None, title=None, shape='.', logx=False,
logy=False, path='/', base=10, sparse=1, show=True, pdf=False,limits=None,
markevery=None, linewidth=1):
... | [
"def",
"plot",
"(",
"self",
",",
"atrix",
",",
"atriy",
",",
"fname",
"=",
"None",
",",
"numtype",
"=",
"'ndump'",
",",
"legend",
"=",
"None",
",",
"labelx",
"=",
"None",
",",
"labely",
"=",
"None",
",",
"indexx",
"=",
"None",
",",
"indexy",
"=",
... | Simple function that plots atriy as a function of atrix
This method will automatically find and plot the requested data.
Parameters
----------
atrix : string
The name of the attribute you want on the x axis.
atriy : string
The name of the attribute you w... | [
"Simple",
"function",
"that",
"plots",
"atriy",
"as",
"a",
"function",
"of",
"atrix"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/data_plot.py#L300-L592 |
NuGrid/NuGridPy | nugridpy/data_plot.py | DataPlot.plot_isoratios | def plot_isoratios(self,xiso,yiso,fign=1,spec=None,deltax=True,deltay=True,logx=False,logy=False,
title=None,legend=None,legloc='lower right',errbar=True,dcycle=500,addiso=None,
co_toggle='c',cust_toggle=None,shift=0,weighting=None,zoneselect=None,iniabufile='iniab2.0E-02... | python | def plot_isoratios(self,xiso,yiso,fign=1,spec=None,deltax=True,deltay=True,logx=False,logy=False,
title=None,legend=None,legloc='lower right',errbar=True,dcycle=500,addiso=None,
co_toggle='c',cust_toggle=None,shift=0,weighting=None,zoneselect=None,iniabufile='iniab2.0E-02... | [
"def",
"plot_isoratios",
"(",
"self",
",",
"xiso",
",",
"yiso",
",",
"fign",
"=",
"1",
",",
"spec",
"=",
"None",
",",
"deltax",
"=",
"True",
",",
"deltay",
"=",
"True",
",",
"logx",
"=",
"False",
",",
"logy",
"=",
"False",
",",
"title",
"=",
"Non... | This is the new routine to plot isotopic ratios for ALL input. rt, June 2014
Parameters:
-----------
xiso : np.array
x data to plot. This can be an array or a list of arrays, depending on who calls the routine
yiso : np.array
y data to plot. This can be an array ... | [
"This",
"is",
"the",
"new",
"routine",
"to",
"plot",
"isotopic",
"ratios",
"for",
"ALL",
"input",
".",
"rt",
"June",
"2014"
] | train | https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/data_plot.py#L594-L1188 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.