body stringlengths 26 98.2k | body_hash int64 -9,222,864,604,528,158,000 9,221,803,474B | docstring stringlengths 1 16.8k | path stringlengths 5 230 | name stringlengths 1 96 | repository_name stringlengths 7 89 | lang stringclasses 1
value | body_without_docstring stringlengths 20 98.2k |
|---|---|---|---|---|---|---|---|
def device_snapshot_rollback_with_http_info(self, scope_id, device_id, snapshot_id, **kwargs):
'Gets a list of snapshots # noqa: E501\n\n Updates the configuration of a device rolling back a given snapshot ID. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n ... | 3,986,388,578,949,759,500 | Gets a list of snapshots # noqa: E501
Updates the configuration of a device rolling back a given snapshot ID. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.device_snapshot_rollback_with_http_info(scope_id, devic... | kapua-client/python-client/swagger_client/api/devices_api.py | device_snapshot_rollback_with_http_info | liang-faan/SmartIOT-Diec | python | def device_snapshot_rollback_with_http_info(self, scope_id, device_id, snapshot_id, **kwargs):
'Gets a list of snapshots # noqa: E501\n\n Updates the configuration of a device rolling back a given snapshot ID. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n ... |
def device_update(self, scope_id, device_id, body, **kwargs):
'Update a Device # noqa: E501\n\n Updates a new Device based on the information provided in the Device parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, pleas... | -4,749,977,442,186,164,000 | Update a Device # noqa: E501
Updates a new Device based on the information provided in the Device parameter. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.device_update(scope_id, device_id, body, async_req=True)... | kapua-client/python-client/swagger_client/api/devices_api.py | device_update | liang-faan/SmartIOT-Diec | python | def device_update(self, scope_id, device_id, body, **kwargs):
'Update a Device # noqa: E501\n\n Updates a new Device based on the information provided in the Device parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, pleas... |
def device_update_with_http_info(self, scope_id, device_id, body, **kwargs):
'Update a Device # noqa: E501\n\n Updates a new Device based on the information provided in the Device parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP... | 8,073,674,989,738,873,000 | Update a Device # noqa: E501
Updates a new Device based on the information provided in the Device parameter. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.device_update_with_http_info(scope_id, device_id, body, ... | kapua-client/python-client/swagger_client/api/devices_api.py | device_update_with_http_info | liang-faan/SmartIOT-Diec | python | def device_update_with_http_info(self, scope_id, device_id, body, **kwargs):
'Update a Device # noqa: E501\n\n Updates a new Device based on the information provided in the Device parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP... |
def length_conversion(value: float, from_type: str, to_type: str) -> float:
'\n Conversion between length units.\n\n >>> length_conversion(4, "METER", "FEET")\n 13.12336\n >>> length_conversion(4, "M", "FT")\n 13.12336\n >>> length_conversion(1, "meter", "kilometer")\n 0.001\n >>> length_con... | -2,713,754,555,307,478,500 | Conversion between length units.
>>> length_conversion(4, "METER", "FEET")
13.12336
>>> length_conversion(4, "M", "FT")
13.12336
>>> length_conversion(1, "meter", "kilometer")
0.001
>>> length_conversion(1, "kilometer", "inch")
39370.1
>>> length_conversion(3, "kilometer", "mile")
1.8641130000000001
>>> length_convers... | conversions/length_conversion.py | length_conversion | 04n0/TheAlgorithms-Python | python | def length_conversion(value: float, from_type: str, to_type: str) -> float:
'\n Conversion between length units.\n\n >>> length_conversion(4, "METER", "FEET")\n 13.12336\n >>> length_conversion(4, "M", "FT")\n 13.12336\n >>> length_conversion(1, "meter", "kilometer")\n 0.001\n >>> length_con... |
def integrate(self):
' See abstract method. '
self.data = LDTransformData(self, self.integrand, self.true_measure, self.discrete_distrib, self.coefv, self.m_min, self.m_max, self.fudge, self.check_cone, ptransform=self.ptransform, cast_complex=self.cast_complex, control_variates=self.cv, control_variate_means=s... | -8,699,421,854,595,669,000 | See abstract method. | qmcpy/stopping_criterion/_cub_qmc_ld_g.py | integrate | QMCSoftware/QMCSoftware | python | def integrate(self):
' '
self.data = LDTransformData(self, self.integrand, self.true_measure, self.discrete_distrib, self.coefv, self.m_min, self.m_max, self.fudge, self.check_cone, ptransform=self.ptransform, cast_complex=self.cast_complex, control_variates=self.cv, control_variate_means=self.cv_mu, update_be... |
def set_tolerance(self, abs_tol=None, rel_tol=None):
'\n See abstract method. \n \n Args:\n abs_tol (float): absolute tolerance. Reset if supplied, ignored if not. \n rel_tol (float): relative tolerance. Reset if supplied, ignored if not. \n '
if (abs_tol != Non... | 366,003,947,805,066,500 | See abstract method.
Args:
abs_tol (float): absolute tolerance. Reset if supplied, ignored if not.
rel_tol (float): relative tolerance. Reset if supplied, ignored if not. | qmcpy/stopping_criterion/_cub_qmc_ld_g.py | set_tolerance | QMCSoftware/QMCSoftware | python | def set_tolerance(self, abs_tol=None, rel_tol=None):
'\n See abstract method. \n \n Args:\n abs_tol (float): absolute tolerance. Reset if supplied, ignored if not. \n rel_tol (float): relative tolerance. Reset if supplied, ignored if not. \n '
if (abs_tol != Non... |
def create_device_name(node: OZWNode):
'Generate sensible (short) default device name from a OZWNode.'
if node.node_name:
return node.node_name
if (node.meta_data and node.meta_data.get('Name')):
return node.meta_data['Name']
if node.node_product_name:
return node.node_product_na... | 7,304,968,344,675,889,000 | Generate sensible (short) default device name from a OZWNode. | homeassistant/components/ozw/entity.py | create_device_name | 2Fake/core | python | def create_device_name(node: OZWNode):
if node.node_name:
return node.node_name
if (node.meta_data and node.meta_data.get('Name')):
return node.meta_data['Name']
if node.node_product_name:
return node.node_product_name
if node.node_device_type_string:
return node.nod... |
def create_device_id(node: OZWNode, node_instance: int=1):
'Generate unique device_id from a OZWNode.'
ozw_instance = node.parent.id
dev_id = f'{ozw_instance}.{node.node_id}.{node_instance}'
return dev_id | 7,974,858,200,362,401,000 | Generate unique device_id from a OZWNode. | homeassistant/components/ozw/entity.py | create_device_id | 2Fake/core | python | def create_device_id(node: OZWNode, node_instance: int=1):
ozw_instance = node.parent.id
dev_id = f'{ozw_instance}.{node.node_id}.{node_instance}'
return dev_id |
def create_value_id(value: OZWValue):
'Generate unique value_id from an OZWValue.'
return f'{value.node.parent.id}-{value.node.id}-{value.value_id_key}' | 1,264,765,362,012,980,000 | Generate unique value_id from an OZWValue. | homeassistant/components/ozw/entity.py | create_value_id | 2Fake/core | python | def create_value_id(value: OZWValue):
return f'{value.node.parent.id}-{value.node.id}-{value.value_id_key}' |
def __init__(self, hass, options, schema, primary_value):
'Initialize the values object with the passed entity schema.'
self._hass = hass
self._entity_created = False
self._schema = copy.deepcopy(schema)
self._values = {}
self.options = options
for (name, disc_settings) in self._schema[const... | -5,097,259,871,609,913,000 | Initialize the values object with the passed entity schema. | homeassistant/components/ozw/entity.py | __init__ | 2Fake/core | python | def __init__(self, hass, options, schema, primary_value):
self._hass = hass
self._entity_created = False
self._schema = copy.deepcopy(schema)
self._values = {}
self.options = options
for (name, disc_settings) in self._schema[const.DISC_VALUES].items():
self._values[name] = None
... |
def async_setup(self):
'Set up values instance.'
for value in self._node.values():
self.async_check_value(value)
self._async_check_entity_ready() | -3,300,220,210,320,531,000 | Set up values instance. | homeassistant/components/ozw/entity.py | async_setup | 2Fake/core | python | def async_setup(self):
for value in self._node.values():
self.async_check_value(value)
self._async_check_entity_ready() |
def __getattr__(self, name):
'Get the specified value for this entity.'
return self._values.get(name, None) | -7,461,882,825,756,319,000 | Get the specified value for this entity. | homeassistant/components/ozw/entity.py | __getattr__ | 2Fake/core | python | def __getattr__(self, name):
return self._values.get(name, None) |
def __iter__(self):
'Allow iteration over all values.'
return iter(self._values.values()) | 6,936,969,451,779,372,000 | Allow iteration over all values. | homeassistant/components/ozw/entity.py | __iter__ | 2Fake/core | python | def __iter__(self):
return iter(self._values.values()) |
def __contains__(self, name):
'Check if the specified name/key exists in the values.'
return (name in self._values) | 7,321,282,956,213,657,000 | Check if the specified name/key exists in the values. | homeassistant/components/ozw/entity.py | __contains__ | 2Fake/core | python | def __contains__(self, name):
return (name in self._values) |
@callback
def async_check_value(self, value):
'Check if the new value matches a missing value for this entity.\n\n If a match is found, it is added to the values mapping.\n '
if (not check_node_schema(value.node, self._schema)):
return
for (name, name_value) in self._values.items():
... | 8,416,800,283,286,510,000 | Check if the new value matches a missing value for this entity.
If a match is found, it is added to the values mapping. | homeassistant/components/ozw/entity.py | async_check_value | 2Fake/core | python | @callback
def async_check_value(self, value):
'Check if the new value matches a missing value for this entity.\n\n If a match is found, it is added to the values mapping.\n '
if (not check_node_schema(value.node, self._schema)):
return
for (name, name_value) in self._values.items():
... |
@callback
def _async_check_entity_ready(self):
'Check if all required values are discovered and create entity.'
if self._entity_created:
return
for (name, disc_settings) in self._schema[const.DISC_VALUES].items():
if ((self._values[name] is None) and (not disc_settings.get(const.DISC_OPTIONA... | 4,784,856,119,720,975,000 | Check if all required values are discovered and create entity. | homeassistant/components/ozw/entity.py | _async_check_entity_ready | 2Fake/core | python | @callback
def _async_check_entity_ready(self):
if self._entity_created:
return
for (name, disc_settings) in self._schema[const.DISC_VALUES].items():
if ((self._values[name] is None) and (not disc_settings.get(const.DISC_OPTIONAL))):
return
component = self._schema[const.DISC... |
@property
def values_id(self):
'Identification for this values collection.'
return create_value_id(self.primary) | -4,657,473,676,736,909,000 | Identification for this values collection. | homeassistant/components/ozw/entity.py | values_id | 2Fake/core | python | @property
def values_id(self):
return create_value_id(self.primary) |
def __init__(self, values):
'Initialize a generic Z-Wave device entity.'
self.values = values
self.options = values.options | -8,800,890,720,828,710,000 | Initialize a generic Z-Wave device entity. | homeassistant/components/ozw/entity.py | __init__ | 2Fake/core | python | def __init__(self, values):
self.values = values
self.options = values.options |
@callback
def on_value_update(self):
'Call when a value is added/updated in the entity EntityValues Collection.\n\n To be overridden by platforms needing this event.\n ' | 991,291,505,622,625,800 | Call when a value is added/updated in the entity EntityValues Collection.
To be overridden by platforms needing this event. | homeassistant/components/ozw/entity.py | on_value_update | 2Fake/core | python | @callback
def on_value_update(self):
'Call when a value is added/updated in the entity EntityValues Collection.\n\n To be overridden by platforms needing this event.\n ' |
async def async_added_to_hass(self):
'Call when entity is added.'
self.async_on_remove(self.options.listen(EVENT_VALUE_CHANGED, self._value_changed))
self.async_on_remove(self.options.listen(EVENT_INSTANCE_STATUS_CHANGED, self._instance_updated))
self.async_on_remove(async_dispatcher_connect(self.hass, ... | 4,368,566,727,181,420,500 | Call when entity is added. | homeassistant/components/ozw/entity.py | async_added_to_hass | 2Fake/core | python | async def async_added_to_hass(self):
self.async_on_remove(self.options.listen(EVENT_VALUE_CHANGED, self._value_changed))
self.async_on_remove(self.options.listen(EVENT_INSTANCE_STATUS_CHANGED, self._instance_updated))
self.async_on_remove(async_dispatcher_connect(self.hass, const.SIGNAL_DELETE_ENTITY, ... |
@property
def device_info(self) -> DeviceInfo:
'Return device information for the device registry.'
node = self.values.primary.node
node_instance = self.values.primary.instance
dev_id = create_device_id(node, self.values.primary.instance)
node_firmware = node.get_value(CommandClass.VERSION, ValueInd... | -7,016,024,995,082,802,000 | Return device information for the device registry. | homeassistant/components/ozw/entity.py | device_info | 2Fake/core | python | @property
def device_info(self) -> DeviceInfo:
node = self.values.primary.node
node_instance = self.values.primary.instance
dev_id = create_device_id(node, self.values.primary.instance)
node_firmware = node.get_value(CommandClass.VERSION, ValueIndex.VERSION_APPLICATION)
device_info = DeviceInfo... |
@property
def extra_state_attributes(self):
'Return the device specific state attributes.'
return {const.ATTR_NODE_ID: self.values.primary.node.node_id} | 8,201,373,440,509,317,000 | Return the device specific state attributes. | homeassistant/components/ozw/entity.py | extra_state_attributes | 2Fake/core | python | @property
def extra_state_attributes(self):
return {const.ATTR_NODE_ID: self.values.primary.node.node_id} |
@property
def name(self):
'Return the name of the entity.'
node = self.values.primary.node
return f'{create_device_name(node)}: {self.values.primary.label}' | -2,945,267,306,644,348,400 | Return the name of the entity. | homeassistant/components/ozw/entity.py | name | 2Fake/core | python | @property
def name(self):
node = self.values.primary.node
return f'{create_device_name(node)}: {self.values.primary.label}' |
@property
def unique_id(self):
'Return the unique_id of the entity.'
return self.values.values_id | 2,640,360,077,620,196,400 | Return the unique_id of the entity. | homeassistant/components/ozw/entity.py | unique_id | 2Fake/core | python | @property
def unique_id(self):
return self.values.values_id |
@property
def available(self) -> bool:
'Return entity availability.'
instance_status = self.values.primary.ozw_instance.get_status()
return (instance_status and (instance_status.status in OZW_READY_STATES_VALUES)) | 1,111,907,310,407,255,400 | Return entity availability. | homeassistant/components/ozw/entity.py | available | 2Fake/core | python | @property
def available(self) -> bool:
instance_status = self.values.primary.ozw_instance.get_status()
return (instance_status and (instance_status.status in OZW_READY_STATES_VALUES)) |
@callback
def _value_changed(self, value):
'Call when a value from ZWaveDeviceEntityValues is changed.\n\n Should not be overridden by subclasses.\n '
if (value.value_id_key in (v.value_id_key for v in self.values if v)):
self.on_value_update()
self.async_write_ha_state() | -9,045,919,858,291,650,000 | Call when a value from ZWaveDeviceEntityValues is changed.
Should not be overridden by subclasses. | homeassistant/components/ozw/entity.py | _value_changed | 2Fake/core | python | @callback
def _value_changed(self, value):
'Call when a value from ZWaveDeviceEntityValues is changed.\n\n Should not be overridden by subclasses.\n '
if (value.value_id_key in (v.value_id_key for v in self.values if v)):
self.on_value_update()
self.async_write_ha_state() |
@callback
def _value_added(self):
'Call when a value from ZWaveDeviceEntityValues is added.\n\n Should not be overridden by subclasses.\n '
self.on_value_update() | -9,171,750,733,512,999,000 | Call when a value from ZWaveDeviceEntityValues is added.
Should not be overridden by subclasses. | homeassistant/components/ozw/entity.py | _value_added | 2Fake/core | python | @callback
def _value_added(self):
'Call when a value from ZWaveDeviceEntityValues is added.\n\n Should not be overridden by subclasses.\n '
self.on_value_update() |
@callback
def _instance_updated(self, new_status):
'Call when the instance status changes.\n\n Should not be overridden by subclasses.\n '
self.on_value_update()
self.async_write_ha_state() | 6,747,436,077,086,713,000 | Call when the instance status changes.
Should not be overridden by subclasses. | homeassistant/components/ozw/entity.py | _instance_updated | 2Fake/core | python | @callback
def _instance_updated(self, new_status):
'Call when the instance status changes.\n\n Should not be overridden by subclasses.\n '
self.on_value_update()
self.async_write_ha_state() |
@property
def should_poll(self):
'No polling needed.'
return False | 8,786,248,581,820,519,000 | No polling needed. | homeassistant/components/ozw/entity.py | should_poll | 2Fake/core | python | @property
def should_poll(self):
return False |
async def _delete_callback(self, values_id):
'Remove this entity.'
if (not self.values):
return
if (values_id == self.values.values_id):
(await self.async_remove(force_remove=True)) | 369,757,128,528,806,000 | Remove this entity. | homeassistant/components/ozw/entity.py | _delete_callback | 2Fake/core | python | async def _delete_callback(self, values_id):
if (not self.values):
return
if (values_id == self.values.values_id):
(await self.async_remove(force_remove=True)) |
def get_event_channel(event_channel_name: Optional[str]=None, partner_namespace_name: Optional[str]=None, resource_group_name: Optional[str]=None, opts: Optional[pulumi.InvokeOptions]=None) -> AwaitableGetEventChannelResult:
"\n Event Channel.\n API Version: 2020-04-01-preview.\n\n\n :param str event_chann... | -6,736,609,495,564,944,000 | Event Channel.
API Version: 2020-04-01-preview.
:param str event_channel_name: Name of the event channel.
:param str partner_namespace_name: Name of the partner namespace.
:param str resource_group_name: The name of the resource group within the user's subscription. | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | get_event_channel | pulumi/pulumi-azure-nextgen | python | def get_event_channel(event_channel_name: Optional[str]=None, partner_namespace_name: Optional[str]=None, resource_group_name: Optional[str]=None, opts: Optional[pulumi.InvokeOptions]=None) -> AwaitableGetEventChannelResult:
"\n Event Channel.\n API Version: 2020-04-01-preview.\n\n\n :param str event_chann... |
@property
@pulumi.getter
def destination(self) -> Optional['outputs.EventChannelDestinationResponse']:
'\n Represents the destination of an event channel.\n '
return pulumi.get(self, 'destination') | -4,506,886,846,389,863,400 | Represents the destination of an event channel. | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | destination | pulumi/pulumi-azure-nextgen | python | @property
@pulumi.getter
def destination(self) -> Optional['outputs.EventChannelDestinationResponse']:
'\n \n '
return pulumi.get(self, 'destination') |
@property
@pulumi.getter(name='expirationTimeIfNotActivatedUtc')
def expiration_time_if_not_activated_utc(self) -> Optional[str]:
'\n Expiration time of the event channel. If this timer expires while the corresponding partner topic is never activated,\n the event channel and corresponding partner topi... | 1,019,862,384,949,718,000 | Expiration time of the event channel. If this timer expires while the corresponding partner topic is never activated,
the event channel and corresponding partner topic are deleted. | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | expiration_time_if_not_activated_utc | pulumi/pulumi-azure-nextgen | python | @property
@pulumi.getter(name='expirationTimeIfNotActivatedUtc')
def expiration_time_if_not_activated_utc(self) -> Optional[str]:
'\n Expiration time of the event channel. If this timer expires while the corresponding partner topic is never activated,\n the event channel and corresponding partner topi... |
@property
@pulumi.getter
def filter(self) -> Optional['outputs.EventChannelFilterResponse']:
'\n Information about the filter for the event channel.\n '
return pulumi.get(self, 'filter') | 4,082,275,425,832,576,000 | Information about the filter for the event channel. | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | filter | pulumi/pulumi-azure-nextgen | python | @property
@pulumi.getter
def filter(self) -> Optional['outputs.EventChannelFilterResponse']:
'\n \n '
return pulumi.get(self, 'filter') |
@property
@pulumi.getter
def id(self) -> str:
'\n Fully qualified identifier of the resource.\n '
return pulumi.get(self, 'id') | -797,042,907,259,989,800 | Fully qualified identifier of the resource. | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | id | pulumi/pulumi-azure-nextgen | python | @property
@pulumi.getter
def id(self) -> str:
'\n \n '
return pulumi.get(self, 'id') |
@property
@pulumi.getter
def name(self) -> str:
'\n Name of the resource\n '
return pulumi.get(self, 'name') | 8,397,791,671,501,956,000 | Name of the resource | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | name | pulumi/pulumi-azure-nextgen | python | @property
@pulumi.getter
def name(self) -> str:
'\n \n '
return pulumi.get(self, 'name') |
@property
@pulumi.getter(name='partnerTopicFriendlyDescription')
def partner_topic_friendly_description(self) -> Optional[str]:
'\n Friendly description about the topic. This can be set by the publisher/partner to show custom description for the customer partner topic.\n This will be helpful to remove... | -2,828,560,881,684,123,600 | Friendly description about the topic. This can be set by the publisher/partner to show custom description for the customer partner topic.
This will be helpful to remove any ambiguity of the origin of creation of the partner topic for the customer. | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | partner_topic_friendly_description | pulumi/pulumi-azure-nextgen | python | @property
@pulumi.getter(name='partnerTopicFriendlyDescription')
def partner_topic_friendly_description(self) -> Optional[str]:
'\n Friendly description about the topic. This can be set by the publisher/partner to show custom description for the customer partner topic.\n This will be helpful to remove... |
@property
@pulumi.getter(name='partnerTopicReadinessState')
def partner_topic_readiness_state(self) -> str:
'\n The readiness state of the corresponding partner topic.\n '
return pulumi.get(self, 'partner_topic_readiness_state') | -6,023,202,783,094,649,000 | The readiness state of the corresponding partner topic. | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | partner_topic_readiness_state | pulumi/pulumi-azure-nextgen | python | @property
@pulumi.getter(name='partnerTopicReadinessState')
def partner_topic_readiness_state(self) -> str:
'\n \n '
return pulumi.get(self, 'partner_topic_readiness_state') |
@property
@pulumi.getter(name='provisioningState')
def provisioning_state(self) -> str:
'\n Provisioning state of the event channel.\n '
return pulumi.get(self, 'provisioning_state') | -8,108,073,650,365,843,000 | Provisioning state of the event channel. | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | provisioning_state | pulumi/pulumi-azure-nextgen | python | @property
@pulumi.getter(name='provisioningState')
def provisioning_state(self) -> str:
'\n \n '
return pulumi.get(self, 'provisioning_state') |
@property
@pulumi.getter
def source(self) -> Optional['outputs.EventChannelSourceResponse']:
"\n Source of the event channel. This represents a unique resource in the partner's resource model.\n "
return pulumi.get(self, 'source') | 6,002,450,563,591,865,000 | Source of the event channel. This represents a unique resource in the partner's resource model. | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | source | pulumi/pulumi-azure-nextgen | python | @property
@pulumi.getter
def source(self) -> Optional['outputs.EventChannelSourceResponse']:
"\n \n "
return pulumi.get(self, 'source') |
@property
@pulumi.getter
def type(self) -> str:
'\n Type of the resource\n '
return pulumi.get(self, 'type') | -7,565,207,814,351,393,000 | Type of the resource | sdk/python/pulumi_azure_nextgen/eventgrid/get_event_channel.py | type | pulumi/pulumi-azure-nextgen | python | @property
@pulumi.getter
def type(self) -> str:
'\n \n '
return pulumi.get(self, 'type') |
def _ExtendDefaultOptions(**kwargs):
'Extend DEFAULT_OPTIONS with keys/values in kwargs.'
options_kwargs = DEFAULT_OPTIONS.copy()
options_kwargs.update(kwargs)
return cros_test_lib.EasyAttr(**options_kwargs) | 730,533,219,309,188,200 | Extend DEFAULT_OPTIONS with keys/values in kwargs. | third_party/chromite/cbuildbot/archive_lib_unittest.py | _ExtendDefaultOptions | FLOSSBoxIN/src | python | def _ExtendDefaultOptions(**kwargs):
options_kwargs = DEFAULT_OPTIONS.copy()
options_kwargs.update(kwargs)
return cros_test_lib.EasyAttr(**options_kwargs) |
def _ExtendDefaultConfig(**kwargs):
'Extend DEFAULT_CONFIG with keys/values in kwargs.'
config_kwargs = DEFAULT_CONFIG.copy()
config_kwargs.update(kwargs)
return config_lib.BuildConfig(**config_kwargs) | 1,578,621,462,235,720,400 | Extend DEFAULT_CONFIG with keys/values in kwargs. | third_party/chromite/cbuildbot/archive_lib_unittest.py | _ExtendDefaultConfig | FLOSSBoxIN/src | python | def _ExtendDefaultConfig(**kwargs):
config_kwargs = DEFAULT_CONFIG.copy()
config_kwargs.update(kwargs)
return config_lib.BuildConfig(**config_kwargs) |
def _NewBuilderRun(options=None, config=None):
'Create a BuilderRun objection from options and config values.\n\n Args:\n options: Specify options or default to DEFAULT_OPTIONS.\n config: Specify build config or default to DEFAULT_CONFIG.\n\n Returns:\n BuilderRun object.\n '
manager = parallel_unit... | -4,143,234,409,975,037,400 | Create a BuilderRun objection from options and config values.
Args:
options: Specify options or default to DEFAULT_OPTIONS.
config: Specify build config or default to DEFAULT_CONFIG.
Returns:
BuilderRun object. | third_party/chromite/cbuildbot/archive_lib_unittest.py | _NewBuilderRun | FLOSSBoxIN/src | python | def _NewBuilderRun(options=None, config=None):
'Create a BuilderRun objection from options and config values.\n\n Args:\n options: Specify options or default to DEFAULT_OPTIONS.\n config: Specify build config or default to DEFAULT_CONFIG.\n\n Returns:\n BuilderRun object.\n '
manager = parallel_unit... |
def _GetBaseUploadURI(self, *args, **kwargs):
'Test GetBaseUploadURI with archive_base and no bot_id.'
return archive_lib.GetBaseUploadURI(self.cfg, *args, **kwargs) | -7,643,745,006,367,143,000 | Test GetBaseUploadURI with archive_base and no bot_id. | third_party/chromite/cbuildbot/archive_lib_unittest.py | _GetBaseUploadURI | FLOSSBoxIN/src | python | def _GetBaseUploadURI(self, *args, **kwargs):
return archive_lib.GetBaseUploadURI(self.cfg, *args, **kwargs) |
def testDefaultGSPath(self):
'Test GetBaseUploadURI with default gs_path value in config.'
self.cfg = _ExtendDefaultConfig(gs_path=config_lib.GS_PATH_DEFAULT)
expected_result = ('%s/%s' % (config_lib.GetConfig().params.ARCHIVE_URL, DEFAULT_BOT_NAME))
result = self._GetBaseUploadURI()
self.assertEqua... | 4,054,763,538,668,536,000 | Test GetBaseUploadURI with default gs_path value in config. | third_party/chromite/cbuildbot/archive_lib_unittest.py | testDefaultGSPath | FLOSSBoxIN/src | python | def testDefaultGSPath(self):
self.cfg = _ExtendDefaultConfig(gs_path=config_lib.GS_PATH_DEFAULT)
expected_result = ('%s/%s' % (config_lib.GetConfig().params.ARCHIVE_URL, DEFAULT_BOT_NAME))
result = self._GetBaseUploadURI()
self.assertEqual(expected_result, result)
expected_result = ('%s/%s' % (... |
def testOverrideGSPath(self):
'Test GetBaseUploadURI with default gs_path value in config.'
self.cfg = _ExtendDefaultConfig(gs_path='gs://funkytown/foo/bar')
expected_result = 'gs://funkytown/foo/bar/TheCoolBot'
result = self._GetBaseUploadURI()
self.assertEqual(expected_result, result)
expected... | -7,068,031,788,268,119,000 | Test GetBaseUploadURI with default gs_path value in config. | third_party/chromite/cbuildbot/archive_lib_unittest.py | testOverrideGSPath | FLOSSBoxIN/src | python | def testOverrideGSPath(self):
self.cfg = _ExtendDefaultConfig(gs_path='gs://funkytown/foo/bar')
expected_result = 'gs://funkytown/foo/bar/TheCoolBot'
result = self._GetBaseUploadURI()
self.assertEqual(expected_result, result)
expected_result = 'gs://funkytown/foo/bar/TheNewBotId'
result = s... |
def app(argv):
'Execute in system shell\n '
if (len(argv) < 2):
print(('Usage: python %s <command> <table> [<column1>=<value1> [...]]\n <command>: print, insert, delete, or edit\n <table>: barrier, shape, or josephson\n' % argv[0]))
sys.exit(0)
db = SVJJDBInteract()
funcna... | 4,346,635,271,438,776,300 | Execute in system shell | cryomem/cmtools/lib/old/sql_svjj_old2.py | app | bebaek/cryomem | python | def app(argv):
'\n '
if (len(argv) < 2):
print(('Usage: python %s <command> <table> [<column1>=<value1> [...]]\n <command>: print, insert, delete, or edit\n <table>: barrier, shape, or josephson\n' % argv[0]))
sys.exit(0)
db = SVJJDBInteract()
funcname = argv[1]
table ... |
def _has_required_moto():
'\n Returns True or False depending on if ``moto`` is installed and at the correct version,\n depending on what version of Python is running these tests.\n '
if (not HAS_MOTO):
return False
else:
moto_version = salt.utils.versions.LooseVersion(pkg_resources... | 6,249,751,324,489,795,000 | Returns True or False depending on if ``moto`` is installed and at the correct version,
depending on what version of Python is running these tests. | tests/unit/modules/test_boto_elb.py | _has_required_moto | Anujsahu902/salt | python | def _has_required_moto():
'\n Returns True or False depending on if ``moto`` is installed and at the correct version,\n depending on what version of Python is running these tests.\n '
if (not HAS_MOTO):
return False
else:
moto_version = salt.utils.versions.LooseVersion(pkg_resources... |
@mock_ec2_deprecated
@mock_elb_deprecated
def test_register_instances_valid_id_result_true(self):
'\n tests that given a valid instance id and valid ELB that\n register_instances returns True.\n '
conn_ec2 = boto.ec2.connect_to_region(region, **boto_conn_parameters)
conn_elb = boto.ec2.... | 2,777,180,147,702,114,000 | tests that given a valid instance id and valid ELB that
register_instances returns True. | tests/unit/modules/test_boto_elb.py | test_register_instances_valid_id_result_true | Anujsahu902/salt | python | @mock_ec2_deprecated
@mock_elb_deprecated
def test_register_instances_valid_id_result_true(self):
'\n tests that given a valid instance id and valid ELB that\n register_instances returns True.\n '
conn_ec2 = boto.ec2.connect_to_region(region, **boto_conn_parameters)
conn_elb = boto.ec2.... |
@mock_ec2_deprecated
@mock_elb_deprecated
def test_register_instances_valid_id_string(self):
'\n tests that given a string containing a instance id and valid ELB that\n register_instances adds the given instance to an ELB\n '
conn_ec2 = boto.ec2.connect_to_region(region, **boto_conn_paramet... | -6,257,057,722,977,847,000 | tests that given a string containing a instance id and valid ELB that
register_instances adds the given instance to an ELB | tests/unit/modules/test_boto_elb.py | test_register_instances_valid_id_string | Anujsahu902/salt | python | @mock_ec2_deprecated
@mock_elb_deprecated
def test_register_instances_valid_id_string(self):
'\n tests that given a string containing a instance id and valid ELB that\n register_instances adds the given instance to an ELB\n '
conn_ec2 = boto.ec2.connect_to_region(region, **boto_conn_paramet... |
@mock_ec2_deprecated
@mock_elb_deprecated
def test_deregister_instances_valid_id_result_true(self):
'\n tests that given an valid id the boto_elb deregister_instances method\n removes exactly one of a number of ELB registered instances\n '
conn_ec2 = boto.ec2.connect_to_region(region, **bot... | -5,711,186,435,208,022,000 | tests that given an valid id the boto_elb deregister_instances method
removes exactly one of a number of ELB registered instances | tests/unit/modules/test_boto_elb.py | test_deregister_instances_valid_id_result_true | Anujsahu902/salt | python | @mock_ec2_deprecated
@mock_elb_deprecated
def test_deregister_instances_valid_id_result_true(self):
'\n tests that given an valid id the boto_elb deregister_instances method\n removes exactly one of a number of ELB registered instances\n '
conn_ec2 = boto.ec2.connect_to_region(region, **bot... |
@mock_ec2_deprecated
@mock_elb_deprecated
def test_deregister_instances_valid_id_string(self):
'\n tests that given an valid id the boto_elb deregister_instances method\n removes exactly one of a number of ELB registered instances\n '
conn_ec2 = boto.ec2.connect_to_region(region, **boto_con... | 8,067,242,356,702,884,000 | tests that given an valid id the boto_elb deregister_instances method
removes exactly one of a number of ELB registered instances | tests/unit/modules/test_boto_elb.py | test_deregister_instances_valid_id_string | Anujsahu902/salt | python | @mock_ec2_deprecated
@mock_elb_deprecated
def test_deregister_instances_valid_id_string(self):
'\n tests that given an valid id the boto_elb deregister_instances method\n removes exactly one of a number of ELB registered instances\n '
conn_ec2 = boto.ec2.connect_to_region(region, **boto_con... |
@mock_ec2_deprecated
@mock_elb_deprecated
def test_deregister_instances_valid_id_list(self):
'\n tests that given an valid ids in the form of a list that the boto_elb\n deregister_instances all members of the given list\n '
conn_ec2 = boto.ec2.connect_to_region(region, **boto_conn_parameter... | 5,285,540,475,398,629,000 | tests that given an valid ids in the form of a list that the boto_elb
deregister_instances all members of the given list | tests/unit/modules/test_boto_elb.py | test_deregister_instances_valid_id_list | Anujsahu902/salt | python | @mock_ec2_deprecated
@mock_elb_deprecated
def test_deregister_instances_valid_id_list(self):
'\n tests that given an valid ids in the form of a list that the boto_elb\n deregister_instances all members of the given list\n '
conn_ec2 = boto.ec2.connect_to_region(region, **boto_conn_parameter... |
def mock_ec2_deprecated(self):
'\n if the mock_ec2_deprecated function is not available due to import failure\n this replaces the decorated function with stub_function.\n Allows boto_elb unit tests to use the @mock_ec2_deprecated decorator\n without a "NameError: name \'mock_ec2_deprecat... | 1,059,726,787,215,719,600 | if the mock_ec2_deprecated function is not available due to import failure
this replaces the decorated function with stub_function.
Allows boto_elb unit tests to use the @mock_ec2_deprecated decorator
without a "NameError: name 'mock_ec2_deprecated' is not defined" error. | tests/unit/modules/test_boto_elb.py | mock_ec2_deprecated | Anujsahu902/salt | python | def mock_ec2_deprecated(self):
'\n if the mock_ec2_deprecated function is not available due to import failure\n this replaces the decorated function with stub_function.\n Allows boto_elb unit tests to use the @mock_ec2_deprecated decorator\n without a "NameError: name \'mock_ec2_deprecat... |
def mock_elb_deprecated(self):
'\n if the mock_elb_deprecated function is not available due to import failure\n this replaces the decorated function with stub_function.\n Allows boto_elb unit tests to use the @mock_elb_deprecated decorator\n without a "NameError: name \'mock_elb_deprecat... | 8,916,713,692,544,773,000 | if the mock_elb_deprecated function is not available due to import failure
this replaces the decorated function with stub_function.
Allows boto_elb unit tests to use the @mock_elb_deprecated decorator
without a "NameError: name 'mock_elb_deprecated' is not defined" error. | tests/unit/modules/test_boto_elb.py | mock_elb_deprecated | Anujsahu902/salt | python | def mock_elb_deprecated(self):
'\n if the mock_elb_deprecated function is not available due to import failure\n this replaces the decorated function with stub_function.\n Allows boto_elb unit tests to use the @mock_elb_deprecated decorator\n without a "NameError: name \'mock_elb_deprecat... |
def trim(self, t=None, run=None):
'\n Trims all runs of the Evaluator to the length specified by the threshold value t.\n\n @param t: Threshold parameter or number of top-k documents to be considered.\n @param run: If run is not None, only the provided run will be trimmed.\n '
if run... | -3,830,407,540,122,297,000 | Trims all runs of the Evaluator to the length specified by the threshold value t.
@param t: Threshold parameter or number of top-k documents to be considered.
@param run: If run is not None, only the provided run will be trimmed. | repro_eval/Evaluator.py | trim | irgroup/repro_eval | python | def trim(self, t=None, run=None):
'\n Trims all runs of the Evaluator to the length specified by the threshold value t.\n\n @param t: Threshold parameter or number of top-k documents to be considered.\n @param run: If run is not None, only the provided run will be trimmed.\n '
if run... |
def evaluate(self, run=None):
'\n Evaluates the original baseline and advanced run if available.\n\n @param run: Reproduced or replicated run that will be evaluated.\n '
if self.run_b_orig:
self.run_b_orig = break_ties(self.run_b_orig)
self.run_b_orig_score = self.rel_eval.e... | -2,836,894,970,880,344,000 | Evaluates the original baseline and advanced run if available.
@param run: Reproduced or replicated run that will be evaluated. | repro_eval/Evaluator.py | evaluate | irgroup/repro_eval | python | def evaluate(self, run=None):
'\n Evaluates the original baseline and advanced run if available.\n\n @param run: Reproduced or replicated run that will be evaluated.\n '
if self.run_b_orig:
self.run_b_orig = break_ties(self.run_b_orig)
self.run_b_orig_score = self.rel_eval.e... |
def er(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Determines the Effect Ratio (ER) according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.\n How to Measur... | -8,725,338,648,397,147,000 | Determines the Effect Ratio (ER) according to the following paper:
Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.
How to Measure the Reproducibility of System-oriented IR Experiments.
Proceedings of SIGIR, pages 349-358, 2020.
The ER value is determined by the rati... | repro_eval/Evaluator.py | er | irgroup/repro_eval | python | def er(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Determines the Effect Ratio (ER) according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.\n How to Measur... |
def dri(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Determines the Delta Relative Improvement (DeltaRI) according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.\n ... | -6,920,642,213,305,712,000 | Determines the Delta Relative Improvement (DeltaRI) according to the following paper:
Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.
How to Measure the Reproducibility of System-oriented IR Experiments.
Proceedings of SIGIR, pages 349-358, 2020.
The DeltaRI value i... | repro_eval/Evaluator.py | dri | irgroup/repro_eval | python | def dri(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Determines the Delta Relative Improvement (DeltaRI) according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.\n ... |
def _ttest(self, rpd=True, run_b_score=None, run_a_score=None, print_feedback=False):
'\n Conducts either a paired (reproducibility) or unpaired (replicability) two-sided t-test according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, I... | 4,213,860,720,074,198,000 | Conducts either a paired (reproducibility) or unpaired (replicability) two-sided t-test according to the following paper:
Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.
How to Measure the Reproducibility of System-oriented IR Experiments.
Proceedings of SIGIR, pages... | repro_eval/Evaluator.py | _ttest | irgroup/repro_eval | python | def _ttest(self, rpd=True, run_b_score=None, run_a_score=None, print_feedback=False):
'\n Conducts either a paired (reproducibility) or unpaired (replicability) two-sided t-test according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, I... |
def evaluate(self, run=None):
'\n Evaluates the scores of the original and reproduced baseline and advanced runs.\n If a (reproduced) run is provided only this one will be evaluated and a dictionary with the corresponding\n scores is returned.\n @param run: A reproduced run. If not speci... | 2,651,078,559,028,764,000 | Evaluates the scores of the original and reproduced baseline and advanced runs.
If a (reproduced) run is provided only this one will be evaluated and a dictionary with the corresponding
scores is returned.
@param run: A reproduced run. If not specified, the original and reproduced runs of the the RpdEvaluator will
... | repro_eval/Evaluator.py | evaluate | irgroup/repro_eval | python | def evaluate(self, run=None):
'\n Evaluates the scores of the original and reproduced baseline and advanced runs.\n If a (reproduced) run is provided only this one will be evaluated and a dictionary with the corresponding\n scores is returned.\n @param run: A reproduced run. If not speci... |
def ktau_union(self, run_b_rep=None, run_a_rep=None, run_b_path=None, run_a_path=None, print_feedback=False):
"\n Determines Kendall's tau Union (KTU) between the original and reproduced document orderings\n according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Mais... | 7,629,346,488,053,989,000 | Determines Kendall's tau Union (KTU) between the original and reproduced document orderings
according to the following paper:
Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.
How to Measure the Reproducibility of System-oriented IR Experiments.
Proceedings of SIGIR, p... | repro_eval/Evaluator.py | ktau_union | irgroup/repro_eval | python | def ktau_union(self, run_b_rep=None, run_a_rep=None, run_b_path=None, run_a_path=None, print_feedback=False):
"\n Determines Kendall's tau Union (KTU) between the original and reproduced document orderings\n according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Mais... |
def rbo(self, run_b_rep=None, run_a_rep=None, run_b_path=None, run_a_path=None, print_feedback=False, misinfo=True):
'\n Determines the Rank-Biased Overlap (RBO) between the original and reproduced document orderings\n according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr,... | -7,116,054,795,594,959,000 | Determines the Rank-Biased Overlap (RBO) between the original and reproduced document orderings
according to the following paper:
Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.
How to Measure the Reproducibility of System-oriented IR Experiments.
Proceedings of SIGI... | repro_eval/Evaluator.py | rbo | irgroup/repro_eval | python | def rbo(self, run_b_rep=None, run_a_rep=None, run_b_path=None, run_a_path=None, print_feedback=False, misinfo=True):
'\n Determines the Rank-Biased Overlap (RBO) between the original and reproduced document orderings\n according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr,... |
def rmse(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Determines the Root Mean Square Error (RMSE) according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.\n ... | 6,958,954,102,970,656,000 | Determines the Root Mean Square Error (RMSE) according to the following paper:
Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.
How to Measure the Reproducibility of System-oriented IR Experiments.
Proceedings of SIGIR, pages 349-358, 2020.
@param run_b_score: Scores... | repro_eval/Evaluator.py | rmse | irgroup/repro_eval | python | def rmse(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Determines the Root Mean Square Error (RMSE) according to the following paper:\n Timo Breuer, Nicola Ferro, Norbert Fuhr, Maria Maistro, Tetsuya Sakai, Philipp Schaer, Ian Soboroff.\n ... |
def nrmse(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Determines the normalized Root Mean Square Error (RMSE).\n\n @param run_b_score: Scores of the baseline run,\n if not provided the scores of the RpdEvaluator obje... | 7,757,995,920,480,574,000 | Determines the normalized Root Mean Square Error (RMSE).
@param run_b_score: Scores of the baseline run,
if not provided the scores of the RpdEvaluator object will be used instead.
@param run_a_score: Scores of the advanced run,
if not provided the scores of the RpdEvaluator obj... | repro_eval/Evaluator.py | nrmse | irgroup/repro_eval | python | def nrmse(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Determines the normalized Root Mean Square Error (RMSE).\n\n @param run_b_score: Scores of the baseline run,\n if not provided the scores of the RpdEvaluator obje... |
def ttest(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Conducts a paired two-tailed t-test for reproduced runs that were derived from the same test collection\n as in the original experiment.\n\n @param run_b_score: Scores of the baselin... | -5,172,674,030,073,816,000 | Conducts a paired two-tailed t-test for reproduced runs that were derived from the same test collection
as in the original experiment.
@param run_b_score: Scores of the baseline run,
if not provided the scores of the RpdEvaluator object will be used instead.
@param run_a_score: Scores of the advanc... | repro_eval/Evaluator.py | ttest | irgroup/repro_eval | python | def ttest(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Conducts a paired two-tailed t-test for reproduced runs that were derived from the same test collection\n as in the original experiment.\n\n @param run_b_score: Scores of the baselin... |
def evaluate(self, run=None):
'\n Evaluates the scores of the original and replicated baseline and advanced runs.\n If a (replicated) run is provided only this one will be evaluated and a dictionary with the corresponding\n scores is returned.\n @param run: A replicated run. If not speci... | -1,068,061,838,797,665,700 | Evaluates the scores of the original and replicated baseline and advanced runs.
If a (replicated) run is provided only this one will be evaluated and a dictionary with the corresponding
scores is returned.
@param run: A replicated run. If not specified, the original and replicated runs of the the RplEvaluator will
... | repro_eval/Evaluator.py | evaluate | irgroup/repro_eval | python | def evaluate(self, run=None):
'\n Evaluates the scores of the original and replicated baseline and advanced runs.\n If a (replicated) run is provided only this one will be evaluated and a dictionary with the corresponding\n scores is returned.\n @param run: A replicated run. If not speci... |
def ttest(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Conducts an un-paired two-tailed t-test for replicated runs that were derived from a test collection\n not used in the original experiment.\n\n @param run_b_score: Scores of the base... | 3,054,882,994,089,691,000 | Conducts an un-paired two-tailed t-test for replicated runs that were derived from a test collection
not used in the original experiment.
@param run_b_score: Scores of the baseline run,
if not provided the scores of the RpdEvaluator object will be used instead.
@param run_a_score: Scores of the adv... | repro_eval/Evaluator.py | ttest | irgroup/repro_eval | python | def ttest(self, run_b_score=None, run_a_score=None, run_b_path=None, run_a_path=None, print_feedback=False):
'\n Conducts an un-paired two-tailed t-test for replicated runs that were derived from a test collection\n not used in the original experiment.\n\n @param run_b_score: Scores of the base... |
def _is_visible(idx_row, idx_col, lengths):
'\n Index -> {(idx_row, idx_col): bool}).\n '
return ((idx_col, idx_row) in lengths) | 2,937,382,027,686,599,000 | Index -> {(idx_row, idx_col): bool}). | pandas/io/formats/style.py | _is_visible | harunpehlivan/pandas | python | def _is_visible(idx_row, idx_col, lengths):
'\n \n '
return ((idx_col, idx_row) in lengths) |
def _get_level_lengths(index, hidden_elements=None):
'\n Given an index, find the level length for each element.\n\n Optional argument is a list of index positions which\n should not be visible.\n\n Result is a dictionary of (level, inital_position): span\n '
sentinel = object()
levels = inde... | -7,061,920,920,471,018,000 | Given an index, find the level length for each element.
Optional argument is a list of index positions which
should not be visible.
Result is a dictionary of (level, inital_position): span | pandas/io/formats/style.py | _get_level_lengths | harunpehlivan/pandas | python | def _get_level_lengths(index, hidden_elements=None):
'\n Given an index, find the level length for each element.\n\n Optional argument is a list of index positions which\n should not be visible.\n\n Result is a dictionary of (level, inital_position): span\n '
sentinel = object()
levels = inde... |
def _repr_html_(self):
'\n Hooks into Jupyter notebook rich display system.\n '
return self.render() | -7,018,489,556,849,788,000 | Hooks into Jupyter notebook rich display system. | pandas/io/formats/style.py | _repr_html_ | harunpehlivan/pandas | python | def _repr_html_(self):
'\n \n '
return self.render() |
def _translate(self):
'\n Convert the DataFrame in `self.data` and the attrs from `_build_styles`\n into a dictionary of {head, body, uuid, cellstyle}.\n '
table_styles = (self.table_styles or [])
caption = self.caption
ctx = self.ctx
precision = self.precision
hidden_index ... | 7,732,696,741,437,161,000 | Convert the DataFrame in `self.data` and the attrs from `_build_styles`
into a dictionary of {head, body, uuid, cellstyle}. | pandas/io/formats/style.py | _translate | harunpehlivan/pandas | python | def _translate(self):
'\n Convert the DataFrame in `self.data` and the attrs from `_build_styles`\n into a dictionary of {head, body, uuid, cellstyle}.\n '
table_styles = (self.table_styles or [])
caption = self.caption
ctx = self.ctx
precision = self.precision
hidden_index ... |
def format(self, formatter, subset=None):
'\n Format the text display value of cells.\n\n .. versionadded:: 0.18.0\n\n Parameters\n ----------\n formatter : str, callable, or dict\n subset : IndexSlice\n An argument to ``DataFrame.loc`` that restricts which eleme... | -4,866,826,672,809,622,000 | Format the text display value of cells.
.. versionadded:: 0.18.0
Parameters
----------
formatter : str, callable, or dict
subset : IndexSlice
An argument to ``DataFrame.loc`` that restricts which elements
``formatter`` is applied to.
Returns
-------
self : Styler
Notes
-----
``formatter`` is either an ``a`... | pandas/io/formats/style.py | format | harunpehlivan/pandas | python | def format(self, formatter, subset=None):
'\n Format the text display value of cells.\n\n .. versionadded:: 0.18.0\n\n Parameters\n ----------\n formatter : str, callable, or dict\n subset : IndexSlice\n An argument to ``DataFrame.loc`` that restricts which eleme... |
def render(self, **kwargs):
"\n Render the built up styles to HTML.\n\n Parameters\n ----------\n `**kwargs` : Any additional keyword arguments are passed through\n to ``self.template.render``. This is useful when you need to provide\n additional variables for a custom temp... | 4,806,731,898,727,246,000 | Render the built up styles to HTML.
Parameters
----------
`**kwargs` : Any additional keyword arguments are passed through
to ``self.template.render``. This is useful when you need to provide
additional variables for a custom template.
.. versionadded:: 0.20
Returns
-------
rendered : str
The rendered HTML
... | pandas/io/formats/style.py | render | harunpehlivan/pandas | python | def render(self, **kwargs):
"\n Render the built up styles to HTML.\n\n Parameters\n ----------\n `**kwargs` : Any additional keyword arguments are passed through\n to ``self.template.render``. This is useful when you need to provide\n additional variables for a custom temp... |
def _update_ctx(self, attrs):
"\n Update the state of the Styler.\n\n Collects a mapping of {index_label: ['<property>: <value>']}.\n\n attrs : Series or DataFrame\n should contain strings of '<property>: <value>;<prop2>: <val2>'\n Whitespace shouldn't matter and the final trailin... | 5,688,525,126,651,154,000 | Update the state of the Styler.
Collects a mapping of {index_label: ['<property>: <value>']}.
attrs : Series or DataFrame
should contain strings of '<property>: <value>;<prop2>: <val2>'
Whitespace shouldn't matter and the final trailing ';' shouldn't
matter. | pandas/io/formats/style.py | _update_ctx | harunpehlivan/pandas | python | def _update_ctx(self, attrs):
"\n Update the state of the Styler.\n\n Collects a mapping of {index_label: ['<property>: <value>']}.\n\n attrs : Series or DataFrame\n should contain strings of '<property>: <value>;<prop2>: <val2>'\n Whitespace shouldn't matter and the final trailin... |
def __copy__(self):
'\n Deep copy by default.\n '
return self._copy(deepcopy=False) | 8,099,102,557,575,076,000 | Deep copy by default. | pandas/io/formats/style.py | __copy__ | harunpehlivan/pandas | python | def __copy__(self):
'\n \n '
return self._copy(deepcopy=False) |
def clear(self):
'\n Reset the styler, removing any previously applied styles.\n Returns None.\n '
self.ctx.clear()
self._todo = [] | 3,962,199,865,544,457,000 | Reset the styler, removing any previously applied styles.
Returns None. | pandas/io/formats/style.py | clear | harunpehlivan/pandas | python | def clear(self):
'\n Reset the styler, removing any previously applied styles.\n Returns None.\n '
self.ctx.clear()
self._todo = [] |
def _compute(self):
'\n Execute the style functions built up in `self._todo`.\n\n Relies on the conventions that all style functions go through\n .apply or .applymap. The append styles to apply as tuples of\n\n (application method, *args, **kwargs)\n '
r = self
for (func, ... | 3,414,097,489,805,550,000 | Execute the style functions built up in `self._todo`.
Relies on the conventions that all style functions go through
.apply or .applymap. The append styles to apply as tuples of
(application method, *args, **kwargs) | pandas/io/formats/style.py | _compute | harunpehlivan/pandas | python | def _compute(self):
'\n Execute the style functions built up in `self._todo`.\n\n Relies on the conventions that all style functions go through\n .apply or .applymap. The append styles to apply as tuples of\n\n (application method, *args, **kwargs)\n '
r = self
for (func, ... |
def apply(self, func, axis=0, subset=None, **kwargs):
"\n Apply a function column-wise, row-wise, or table-wise,\n updating the HTML representation with the result.\n\n Parameters\n ----------\n func : function\n ``func`` should take a Series or DataFrame (depending\n ... | 2,671,970,695,599,941,000 | Apply a function column-wise, row-wise, or table-wise,
updating the HTML representation with the result.
Parameters
----------
func : function
``func`` should take a Series or DataFrame (depending
on ``axis``), and return an object with the same shape.
Must return a DataFrame with identical index and
c... | pandas/io/formats/style.py | apply | harunpehlivan/pandas | python | def apply(self, func, axis=0, subset=None, **kwargs):
"\n Apply a function column-wise, row-wise, or table-wise,\n updating the HTML representation with the result.\n\n Parameters\n ----------\n func : function\n ``func`` should take a Series or DataFrame (depending\n ... |
def applymap(self, func, subset=None, **kwargs):
'\n Apply a function elementwise, updating the HTML\n representation with the result.\n\n Parameters\n ----------\n func : function\n ``func`` should take a scalar and return a scalar\n subset : IndexSlice\n ... | 1,650,845,506,284,373,800 | Apply a function elementwise, updating the HTML
representation with the result.
Parameters
----------
func : function
``func`` should take a scalar and return a scalar
subset : IndexSlice
a valid indexer to limit ``data`` to *before* applying the
function. Consider using a pandas.IndexSlice
kwargs : dict
... | pandas/io/formats/style.py | applymap | harunpehlivan/pandas | python | def applymap(self, func, subset=None, **kwargs):
'\n Apply a function elementwise, updating the HTML\n representation with the result.\n\n Parameters\n ----------\n func : function\n ``func`` should take a scalar and return a scalar\n subset : IndexSlice\n ... |
def where(self, cond, value, other=None, subset=None, **kwargs):
'\n Apply a function elementwise, updating the HTML\n representation with a style which is selected in\n accordance with the return value of a function.\n\n .. versionadded:: 0.21.0\n\n Parameters\n ----------... | 4,949,484,499,230,533,000 | Apply a function elementwise, updating the HTML
representation with a style which is selected in
accordance with the return value of a function.
.. versionadded:: 0.21.0
Parameters
----------
cond : callable
``cond`` should take a scalar and return a boolean
value : str
applied when ``cond`` returns true
othe... | pandas/io/formats/style.py | where | harunpehlivan/pandas | python | def where(self, cond, value, other=None, subset=None, **kwargs):
'\n Apply a function elementwise, updating the HTML\n representation with a style which is selected in\n accordance with the return value of a function.\n\n .. versionadded:: 0.21.0\n\n Parameters\n ----------... |
def set_precision(self, precision):
'\n Set the precision used to render.\n\n Parameters\n ----------\n precision : int\n\n Returns\n -------\n self : Styler\n '
self.precision = precision
return self | -3,630,970,260,750,355,500 | Set the precision used to render.
Parameters
----------
precision : int
Returns
-------
self : Styler | pandas/io/formats/style.py | set_precision | harunpehlivan/pandas | python | def set_precision(self, precision):
'\n Set the precision used to render.\n\n Parameters\n ----------\n precision : int\n\n Returns\n -------\n self : Styler\n '
self.precision = precision
return self |
def set_table_attributes(self, attributes):
'\n Set the table attributes.\n\n These are the items that show up in the opening ``<table>`` tag\n in addition to to automatic (by default) id.\n\n Parameters\n ----------\n attributes : string\n\n Returns\n -------... | 7,405,072,924,604,848,000 | Set the table attributes.
These are the items that show up in the opening ``<table>`` tag
in addition to to automatic (by default) id.
Parameters
----------
attributes : string
Returns
-------
self : Styler
Examples
--------
>>> df = pd.DataFrame(np.random.randn(10, 4))
>>> df.style.set_table_attributes('class="pur... | pandas/io/formats/style.py | set_table_attributes | harunpehlivan/pandas | python | def set_table_attributes(self, attributes):
'\n Set the table attributes.\n\n These are the items that show up in the opening ``<table>`` tag\n in addition to to automatic (by default) id.\n\n Parameters\n ----------\n attributes : string\n\n Returns\n -------... |
def export(self):
'\n Export the styles to applied to the current Styler.\n\n Can be applied to a second style with ``Styler.use``.\n\n Returns\n -------\n styles : list\n\n See Also\n --------\n Styler.use\n '
return self._todo | -6,302,264,730,595,205,000 | Export the styles to applied to the current Styler.
Can be applied to a second style with ``Styler.use``.
Returns
-------
styles : list
See Also
--------
Styler.use | pandas/io/formats/style.py | export | harunpehlivan/pandas | python | def export(self):
'\n Export the styles to applied to the current Styler.\n\n Can be applied to a second style with ``Styler.use``.\n\n Returns\n -------\n styles : list\n\n See Also\n --------\n Styler.use\n '
return self._todo |
def use(self, styles):
'\n Set the styles on the current Styler, possibly using styles\n from ``Styler.export``.\n\n Parameters\n ----------\n styles : list\n list of style functions\n\n Returns\n -------\n self : Styler\n\n See Also\n ... | 8,005,693,763,462,239,000 | Set the styles on the current Styler, possibly using styles
from ``Styler.export``.
Parameters
----------
styles : list
list of style functions
Returns
-------
self : Styler
See Also
--------
Styler.export | pandas/io/formats/style.py | use | harunpehlivan/pandas | python | def use(self, styles):
'\n Set the styles on the current Styler, possibly using styles\n from ``Styler.export``.\n\n Parameters\n ----------\n styles : list\n list of style functions\n\n Returns\n -------\n self : Styler\n\n See Also\n ... |
def set_uuid(self, uuid):
'\n Set the uuid for a Styler.\n\n Parameters\n ----------\n uuid : str\n\n Returns\n -------\n self : Styler\n '
self.uuid = uuid
return self | -6,428,507,068,428,712,000 | Set the uuid for a Styler.
Parameters
----------
uuid : str
Returns
-------
self : Styler | pandas/io/formats/style.py | set_uuid | harunpehlivan/pandas | python | def set_uuid(self, uuid):
'\n Set the uuid for a Styler.\n\n Parameters\n ----------\n uuid : str\n\n Returns\n -------\n self : Styler\n '
self.uuid = uuid
return self |
def set_caption(self, caption):
'\n Set the caption on a Styler\n\n Parameters\n ----------\n caption : str\n\n Returns\n -------\n self : Styler\n '
self.caption = caption
return self | -4,207,975,177,316,797,000 | Set the caption on a Styler
Parameters
----------
caption : str
Returns
-------
self : Styler | pandas/io/formats/style.py | set_caption | harunpehlivan/pandas | python | def set_caption(self, caption):
'\n Set the caption on a Styler\n\n Parameters\n ----------\n caption : str\n\n Returns\n -------\n self : Styler\n '
self.caption = caption
return self |
def set_table_styles(self, table_styles):
"\n Set the table styles on a Styler.\n\n These are placed in a ``<style>`` tag before the generated HTML table.\n\n Parameters\n ----------\n table_styles : list\n Each individual table_style should be a dictionary with\n ... | 3,939,827,332,193,556,000 | Set the table styles on a Styler.
These are placed in a ``<style>`` tag before the generated HTML table.
Parameters
----------
table_styles : list
Each individual table_style should be a dictionary with
``selector`` and ``props`` keys. ``selector`` should be a CSS
selector that the style will be applied t... | pandas/io/formats/style.py | set_table_styles | harunpehlivan/pandas | python | def set_table_styles(self, table_styles):
"\n Set the table styles on a Styler.\n\n These are placed in a ``<style>`` tag before the generated HTML table.\n\n Parameters\n ----------\n table_styles : list\n Each individual table_style should be a dictionary with\n ... |
def hide_index(self):
'\n Hide any indices from rendering.\n\n .. versionadded:: 0.23.0\n\n Returns\n -------\n self : Styler\n '
self.hidden_index = True
return self | 4,394,477,431,902,735,400 | Hide any indices from rendering.
.. versionadded:: 0.23.0
Returns
-------
self : Styler | pandas/io/formats/style.py | hide_index | harunpehlivan/pandas | python | def hide_index(self):
'\n Hide any indices from rendering.\n\n .. versionadded:: 0.23.0\n\n Returns\n -------\n self : Styler\n '
self.hidden_index = True
return self |
def hide_columns(self, subset):
'\n Hide columns from rendering.\n\n .. versionadded:: 0.23.0\n\n Parameters\n ----------\n subset : IndexSlice\n An argument to ``DataFrame.loc`` that identifies which columns\n are hidden.\n\n Returns\n -------\... | -89,767,141,061,159,070 | Hide columns from rendering.
.. versionadded:: 0.23.0
Parameters
----------
subset : IndexSlice
An argument to ``DataFrame.loc`` that identifies which columns
are hidden.
Returns
-------
self : Styler | pandas/io/formats/style.py | hide_columns | harunpehlivan/pandas | python | def hide_columns(self, subset):
'\n Hide columns from rendering.\n\n .. versionadded:: 0.23.0\n\n Parameters\n ----------\n subset : IndexSlice\n An argument to ``DataFrame.loc`` that identifies which columns\n are hidden.\n\n Returns\n -------\... |
def highlight_null(self, null_color='red'):
'\n Shade the background ``null_color`` for missing values.\n\n Parameters\n ----------\n null_color : str\n\n Returns\n -------\n self : Styler\n '
self.applymap(self._highlight_null, null_color=null_color)
... | 1,991,409,830,712,989,000 | Shade the background ``null_color`` for missing values.
Parameters
----------
null_color : str
Returns
-------
self : Styler | pandas/io/formats/style.py | highlight_null | harunpehlivan/pandas | python | def highlight_null(self, null_color='red'):
'\n Shade the background ``null_color`` for missing values.\n\n Parameters\n ----------\n null_color : str\n\n Returns\n -------\n self : Styler\n '
self.applymap(self._highlight_null, null_color=null_color)
... |
def background_gradient(self, cmap='PuBu', low=0, high=0, axis=0, subset=None, text_color_threshold=0.408):
"\n Color the background in a gradient according to\n the data in each column (optionally row).\n\n Requires matplotlib.\n\n Parameters\n ----------\n cmap : str or c... | 3,402,305,775,612,038,000 | Color the background in a gradient according to
the data in each column (optionally row).
Requires matplotlib.
Parameters
----------
cmap : str or colormap
matplotlib colormap
low, high : float
compress the range by these values.
axis : int or str
1 or 'columns' for columnwise, 0 or 'index' for rowwise
su... | pandas/io/formats/style.py | background_gradient | harunpehlivan/pandas | python | def background_gradient(self, cmap='PuBu', low=0, high=0, axis=0, subset=None, text_color_threshold=0.408):
"\n Color the background in a gradient according to\n the data in each column (optionally row).\n\n Requires matplotlib.\n\n Parameters\n ----------\n cmap : str or c... |
@staticmethod
def _background_gradient(s, cmap='PuBu', low=0, high=0, text_color_threshold=0.408):
'\n Color background in a range according to the data.\n '
if ((not isinstance(text_color_threshold, (float, int))) or (not (0 <= text_color_threshold <= 1))):
msg = '`text_color_threshold` m... | -1,450,159,208,812,286,500 | Color background in a range according to the data. | pandas/io/formats/style.py | _background_gradient | harunpehlivan/pandas | python | @staticmethod
def _background_gradient(s, cmap='PuBu', low=0, high=0, text_color_threshold=0.408):
'\n \n '
if ((not isinstance(text_color_threshold, (float, int))) or (not (0 <= text_color_threshold <= 1))):
msg = '`text_color_threshold` must be a value from 0 to 1.'
raise ValueEr... |
def set_properties(self, subset=None, **kwargs):
'\n Convenience method for setting one or more non-data dependent\n properties or each cell.\n\n Parameters\n ----------\n subset : IndexSlice\n a valid slice for ``data`` to limit the style application to\n kwargs... | -614,258,365,675,136,500 | Convenience method for setting one or more non-data dependent
properties or each cell.
Parameters
----------
subset : IndexSlice
a valid slice for ``data`` to limit the style application to
kwargs : dict
property: value pairs to be set for each cell
Returns
-------
self : Styler
Examples
--------
>>> df = pd... | pandas/io/formats/style.py | set_properties | harunpehlivan/pandas | python | def set_properties(self, subset=None, **kwargs):
'\n Convenience method for setting one or more non-data dependent\n properties or each cell.\n\n Parameters\n ----------\n subset : IndexSlice\n a valid slice for ``data`` to limit the style application to\n kwargs... |
@staticmethod
def _bar(s, align, colors, width=100, vmin=None, vmax=None):
'\n Draw bar chart in dataframe cells.\n '
smin = (s.min() if (vmin is None) else vmin)
if isinstance(smin, ABCSeries):
smin = smin.min()
smax = (s.max() if (vmax is None) else vmax)
if isinstance(smax, ... | -2,759,675,745,142,124,500 | Draw bar chart in dataframe cells. | pandas/io/formats/style.py | _bar | harunpehlivan/pandas | python | @staticmethod
def _bar(s, align, colors, width=100, vmin=None, vmax=None):
'\n \n '
smin = (s.min() if (vmin is None) else vmin)
if isinstance(smin, ABCSeries):
smin = smin.min()
smax = (s.max() if (vmax is None) else vmax)
if isinstance(smax, ABCSeries):
smax = smax.ma... |
def bar(self, subset=None, axis=0, color='#d65f5f', width=100, align='left', vmin=None, vmax=None):
"\n Draw bar chart in the cell backgrounds.\n\n Parameters\n ----------\n subset : IndexSlice, optional\n A valid slice for `data` to limit the style application to.\n ax... | -5,269,238,799,898,452,000 | Draw bar chart in the cell backgrounds.
Parameters
----------
subset : IndexSlice, optional
A valid slice for `data` to limit the style application to.
axis : int, str or None, default 0
Apply to each column (`axis=0` or `'index'`)
or to each row (`axis=1` or `'columns'`) or
to the entire DataFrame at ... | pandas/io/formats/style.py | bar | harunpehlivan/pandas | python | def bar(self, subset=None, axis=0, color='#d65f5f', width=100, align='left', vmin=None, vmax=None):
"\n Draw bar chart in the cell backgrounds.\n\n Parameters\n ----------\n subset : IndexSlice, optional\n A valid slice for `data` to limit the style application to.\n ax... |
def highlight_max(self, subset=None, color='yellow', axis=0):
"\n Highlight the maximum by shading the background.\n\n Parameters\n ----------\n subset : IndexSlice, default None\n a valid slice for ``data`` to limit the style application to\n color : str, default 'yell... | 9,088,035,780,358,375,000 | Highlight the maximum by shading the background.
Parameters
----------
subset : IndexSlice, default None
a valid slice for ``data`` to limit the style application to
color : str, default 'yellow'
axis : int, str, or None; default 0
0 or 'index' for columnwise (default), 1 or 'columns' for rowwise,
or ``Non... | pandas/io/formats/style.py | highlight_max | harunpehlivan/pandas | python | def highlight_max(self, subset=None, color='yellow', axis=0):
"\n Highlight the maximum by shading the background.\n\n Parameters\n ----------\n subset : IndexSlice, default None\n a valid slice for ``data`` to limit the style application to\n color : str, default 'yell... |
def highlight_min(self, subset=None, color='yellow', axis=0):
"\n Highlight the minimum by shading the background.\n\n Parameters\n ----------\n subset : IndexSlice, default None\n a valid slice for ``data`` to limit the style application to\n color : str, default 'yell... | -2,233,053,266,408,328,200 | Highlight the minimum by shading the background.
Parameters
----------
subset : IndexSlice, default None
a valid slice for ``data`` to limit the style application to
color : str, default 'yellow'
axis : int, str, or None; default 0
0 or 'index' for columnwise (default), 1 or 'columns' for rowwise,
or ``Non... | pandas/io/formats/style.py | highlight_min | harunpehlivan/pandas | python | def highlight_min(self, subset=None, color='yellow', axis=0):
"\n Highlight the minimum by shading the background.\n\n Parameters\n ----------\n subset : IndexSlice, default None\n a valid slice for ``data`` to limit the style application to\n color : str, default 'yell... |
@staticmethod
def _highlight_extrema(data, color='yellow', max_=True):
'\n Highlight the min or max in a Series or DataFrame.\n '
attr = 'background-color: {0}'.format(color)
if (data.ndim == 1):
if max_:
extrema = (data == data.max())
else:
extrema = (d... | 5,835,042,187,748,983,000 | Highlight the min or max in a Series or DataFrame. | pandas/io/formats/style.py | _highlight_extrema | harunpehlivan/pandas | python | @staticmethod
def _highlight_extrema(data, color='yellow', max_=True):
'\n \n '
attr = 'background-color: {0}'.format(color)
if (data.ndim == 1):
if max_:
extrema = (data == data.max())
else:
extrema = (data == data.min())
return [(attr if v else... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.