body_hash stringlengths 64 64 | body stringlengths 23 109k | docstring stringlengths 1 57k | path stringlengths 4 198 | name stringlengths 1 115 | repository_name stringlengths 7 111 | repository_stars float64 0 191k | lang stringclasses 1
value | body_without_docstring stringlengths 14 108k | unified stringlengths 45 133k |
|---|---|---|---|---|---|---|---|---|---|
454092ee1b28c156b5d51654c926c944a14e324b34eeef403ef0c07877948cad | @property
def is_suppressed(self):
'\n Gets the is_suppressed of this LogAnalyticsWarning.\n A flag indicating if the warning is currently suppressed\n\n\n :return: The is_suppressed of this LogAnalyticsWarning.\n :rtype: bool\n '
return self._is_suppressed | Gets the is_suppressed of this LogAnalyticsWarning.
A flag indicating if the warning is currently suppressed
:return: The is_suppressed of this LogAnalyticsWarning.
:rtype: bool | src/oci/log_analytics/models/log_analytics_warning.py | is_suppressed | ezequielramos/oci-python-sdk | 249 | python | @property
def is_suppressed(self):
'\n Gets the is_suppressed of this LogAnalyticsWarning.\n A flag indicating if the warning is currently suppressed\n\n\n :return: The is_suppressed of this LogAnalyticsWarning.\n :rtype: bool\n '
return self._is_suppressed | @property
def is_suppressed(self):
'\n Gets the is_suppressed of this LogAnalyticsWarning.\n A flag indicating if the warning is currently suppressed\n\n\n :return: The is_suppressed of this LogAnalyticsWarning.\n :rtype: bool\n '
return self._is_suppressed<|docstring|>Gets th... |
5c862c189179ef3758431fa9f4658a83bd14c02569768459de6107a9f43145de | @is_suppressed.setter
def is_suppressed(self, is_suppressed):
'\n Sets the is_suppressed of this LogAnalyticsWarning.\n A flag indicating if the warning is currently suppressed\n\n\n :param is_suppressed: The is_suppressed of this LogAnalyticsWarning.\n :type: bool\n '
self._i... | Sets the is_suppressed of this LogAnalyticsWarning.
A flag indicating if the warning is currently suppressed
:param is_suppressed: The is_suppressed of this LogAnalyticsWarning.
:type: bool | src/oci/log_analytics/models/log_analytics_warning.py | is_suppressed | ezequielramos/oci-python-sdk | 249 | python | @is_suppressed.setter
def is_suppressed(self, is_suppressed):
'\n Sets the is_suppressed of this LogAnalyticsWarning.\n A flag indicating if the warning is currently suppressed\n\n\n :param is_suppressed: The is_suppressed of this LogAnalyticsWarning.\n :type: bool\n '
self._i... | @is_suppressed.setter
def is_suppressed(self, is_suppressed):
'\n Sets the is_suppressed of this LogAnalyticsWarning.\n A flag indicating if the warning is currently suppressed\n\n\n :param is_suppressed: The is_suppressed of this LogAnalyticsWarning.\n :type: bool\n '
self._i... |
43ab154f3f19b412d86d95ddeafb7700069dd31b0f9d42092c56394c0d33d7cc | @property
def time_of_latest_warning(self):
'\n Gets the time_of_latest_warning of this LogAnalyticsWarning.\n The most recent date on which the warning was triggered\n\n\n :return: The time_of_latest_warning of this LogAnalyticsWarning.\n :rtype: datetime\n '
return self._tim... | Gets the time_of_latest_warning of this LogAnalyticsWarning.
The most recent date on which the warning was triggered
:return: The time_of_latest_warning of this LogAnalyticsWarning.
:rtype: datetime | src/oci/log_analytics/models/log_analytics_warning.py | time_of_latest_warning | ezequielramos/oci-python-sdk | 249 | python | @property
def time_of_latest_warning(self):
'\n Gets the time_of_latest_warning of this LogAnalyticsWarning.\n The most recent date on which the warning was triggered\n\n\n :return: The time_of_latest_warning of this LogAnalyticsWarning.\n :rtype: datetime\n '
return self._tim... | @property
def time_of_latest_warning(self):
'\n Gets the time_of_latest_warning of this LogAnalyticsWarning.\n The most recent date on which the warning was triggered\n\n\n :return: The time_of_latest_warning of this LogAnalyticsWarning.\n :rtype: datetime\n '
return self._tim... |
64a63cea8ac49a31c0a188c8ac6a827941b43a94d241cc9828499a41b7cdef96 | @time_of_latest_warning.setter
def time_of_latest_warning(self, time_of_latest_warning):
'\n Sets the time_of_latest_warning of this LogAnalyticsWarning.\n The most recent date on which the warning was triggered\n\n\n :param time_of_latest_warning: The time_of_latest_warning of this LogAnalytic... | Sets the time_of_latest_warning of this LogAnalyticsWarning.
The most recent date on which the warning was triggered
:param time_of_latest_warning: The time_of_latest_warning of this LogAnalyticsWarning.
:type: datetime | src/oci/log_analytics/models/log_analytics_warning.py | time_of_latest_warning | ezequielramos/oci-python-sdk | 249 | python | @time_of_latest_warning.setter
def time_of_latest_warning(self, time_of_latest_warning):
'\n Sets the time_of_latest_warning of this LogAnalyticsWarning.\n The most recent date on which the warning was triggered\n\n\n :param time_of_latest_warning: The time_of_latest_warning of this LogAnalytic... | @time_of_latest_warning.setter
def time_of_latest_warning(self, time_of_latest_warning):
'\n Sets the time_of_latest_warning of this LogAnalyticsWarning.\n The most recent date on which the warning was triggered\n\n\n :param time_of_latest_warning: The time_of_latest_warning of this LogAnalytic... |
224a726b0fc3856e8b3f9a35e41ca5c9f4302e36d970aa5b97ef66938884c904 | @property
def warning_level(self):
'\n Gets the warning_level of this LogAnalyticsWarning.\n The warning level - either pattern, rule, or source.\n\n\n :return: The warning_level of this LogAnalyticsWarning.\n :rtype: str\n '
return self._warning_level | Gets the warning_level of this LogAnalyticsWarning.
The warning level - either pattern, rule, or source.
:return: The warning_level of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | warning_level | ezequielramos/oci-python-sdk | 249 | python | @property
def warning_level(self):
'\n Gets the warning_level of this LogAnalyticsWarning.\n The warning level - either pattern, rule, or source.\n\n\n :return: The warning_level of this LogAnalyticsWarning.\n :rtype: str\n '
return self._warning_level | @property
def warning_level(self):
'\n Gets the warning_level of this LogAnalyticsWarning.\n The warning level - either pattern, rule, or source.\n\n\n :return: The warning_level of this LogAnalyticsWarning.\n :rtype: str\n '
return self._warning_level<|docstring|>Gets the war... |
5ce29d7748afd48aa2bd776a2271defa034bcdeef45bec81e98cdeb45bc06e79 | @warning_level.setter
def warning_level(self, warning_level):
'\n Sets the warning_level of this LogAnalyticsWarning.\n The warning level - either pattern, rule, or source.\n\n\n :param warning_level: The warning_level of this LogAnalyticsWarning.\n :type: str\n '
self._warnin... | Sets the warning_level of this LogAnalyticsWarning.
The warning level - either pattern, rule, or source.
:param warning_level: The warning_level of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | warning_level | ezequielramos/oci-python-sdk | 249 | python | @warning_level.setter
def warning_level(self, warning_level):
'\n Sets the warning_level of this LogAnalyticsWarning.\n The warning level - either pattern, rule, or source.\n\n\n :param warning_level: The warning_level of this LogAnalyticsWarning.\n :type: str\n '
self._warnin... | @warning_level.setter
def warning_level(self, warning_level):
'\n Sets the warning_level of this LogAnalyticsWarning.\n The warning level - either pattern, rule, or source.\n\n\n :param warning_level: The warning_level of this LogAnalyticsWarning.\n :type: str\n '
self._warnin... |
47f33b0db92c22e537bbdc6ee5eeea3c0e084398c55edfb5e8ec679fbbab847c | @property
def warning_message(self):
'\n Gets the warning_message of this LogAnalyticsWarning.\n A description of the warning intended for the consumer of the warning. It will\n usually detail the cause of the warning, may suggest a remedy, and can contain any\n other relevant informati... | Gets the warning_message of this LogAnalyticsWarning.
A description of the warning intended for the consumer of the warning. It will
usually detail the cause of the warning, may suggest a remedy, and can contain any
other relevant information the consumer might find useful
:return: The warning_message of this LogAna... | src/oci/log_analytics/models/log_analytics_warning.py | warning_message | ezequielramos/oci-python-sdk | 249 | python | @property
def warning_message(self):
'\n Gets the warning_message of this LogAnalyticsWarning.\n A description of the warning intended for the consumer of the warning. It will\n usually detail the cause of the warning, may suggest a remedy, and can contain any\n other relevant informati... | @property
def warning_message(self):
'\n Gets the warning_message of this LogAnalyticsWarning.\n A description of the warning intended for the consumer of the warning. It will\n usually detail the cause of the warning, may suggest a remedy, and can contain any\n other relevant informati... |
29289e13447bc1437147777752e59807cb70bd34f658f5fc0c5d0a98a3abeff0 | @warning_message.setter
def warning_message(self, warning_message):
'\n Sets the warning_message of this LogAnalyticsWarning.\n A description of the warning intended for the consumer of the warning. It will\n usually detail the cause of the warning, may suggest a remedy, and can contain any\n ... | Sets the warning_message of this LogAnalyticsWarning.
A description of the warning intended for the consumer of the warning. It will
usually detail the cause of the warning, may suggest a remedy, and can contain any
other relevant information the consumer might find useful
:param warning_message: The warning_message... | src/oci/log_analytics/models/log_analytics_warning.py | warning_message | ezequielramos/oci-python-sdk | 249 | python | @warning_message.setter
def warning_message(self, warning_message):
'\n Sets the warning_message of this LogAnalyticsWarning.\n A description of the warning intended for the consumer of the warning. It will\n usually detail the cause of the warning, may suggest a remedy, and can contain any\n ... | @warning_message.setter
def warning_message(self, warning_message):
'\n Sets the warning_message of this LogAnalyticsWarning.\n A description of the warning intended for the consumer of the warning. It will\n usually detail the cause of the warning, may suggest a remedy, and can contain any\n ... |
cfcfa9e2812719ef14e822f757e1d16278195ed43ea481391529a0fd4b12af09 | @property
def pattern_id(self):
'\n Gets the pattern_id of this LogAnalyticsWarning.\n The unique identifier of the warning pattern\n\n\n :return: The pattern_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._pattern_id | Gets the pattern_id of this LogAnalyticsWarning.
The unique identifier of the warning pattern
:return: The pattern_id of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | pattern_id | ezequielramos/oci-python-sdk | 249 | python | @property
def pattern_id(self):
'\n Gets the pattern_id of this LogAnalyticsWarning.\n The unique identifier of the warning pattern\n\n\n :return: The pattern_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._pattern_id | @property
def pattern_id(self):
'\n Gets the pattern_id of this LogAnalyticsWarning.\n The unique identifier of the warning pattern\n\n\n :return: The pattern_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._pattern_id<|docstring|>Gets the pattern_id of this LogA... |
a12953f5b94307ff89d424cc9d45a7881cfc155b094e203ef109b6d054cd38ba | @pattern_id.setter
def pattern_id(self, pattern_id):
'\n Sets the pattern_id of this LogAnalyticsWarning.\n The unique identifier of the warning pattern\n\n\n :param pattern_id: The pattern_id of this LogAnalyticsWarning.\n :type: str\n '
self._pattern_id = pattern_id | Sets the pattern_id of this LogAnalyticsWarning.
The unique identifier of the warning pattern
:param pattern_id: The pattern_id of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | pattern_id | ezequielramos/oci-python-sdk | 249 | python | @pattern_id.setter
def pattern_id(self, pattern_id):
'\n Sets the pattern_id of this LogAnalyticsWarning.\n The unique identifier of the warning pattern\n\n\n :param pattern_id: The pattern_id of this LogAnalyticsWarning.\n :type: str\n '
self._pattern_id = pattern_id | @pattern_id.setter
def pattern_id(self, pattern_id):
'\n Sets the pattern_id of this LogAnalyticsWarning.\n The unique identifier of the warning pattern\n\n\n :param pattern_id: The pattern_id of this LogAnalyticsWarning.\n :type: str\n '
self._pattern_id = pattern_id<|docstri... |
991b9798b456f9521880e6cfe9b3239048d3d69a98fbb1c07dab104d5c058642 | @property
def pattern_text(self):
'\n Gets the pattern_text of this LogAnalyticsWarning.\n The text of the pattern used by the warning\n\n\n :return: The pattern_text of this LogAnalyticsWarning.\n :rtype: str\n '
return self._pattern_text | Gets the pattern_text of this LogAnalyticsWarning.
The text of the pattern used by the warning
:return: The pattern_text of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | pattern_text | ezequielramos/oci-python-sdk | 249 | python | @property
def pattern_text(self):
'\n Gets the pattern_text of this LogAnalyticsWarning.\n The text of the pattern used by the warning\n\n\n :return: The pattern_text of this LogAnalyticsWarning.\n :rtype: str\n '
return self._pattern_text | @property
def pattern_text(self):
'\n Gets the pattern_text of this LogAnalyticsWarning.\n The text of the pattern used by the warning\n\n\n :return: The pattern_text of this LogAnalyticsWarning.\n :rtype: str\n '
return self._pattern_text<|docstring|>Gets the pattern_text of ... |
b3aa173042f5443f2214658bbd9586097b57bde5b165e092cfdac71441e8c6f4 | @pattern_text.setter
def pattern_text(self, pattern_text):
'\n Sets the pattern_text of this LogAnalyticsWarning.\n The text of the pattern used by the warning\n\n\n :param pattern_text: The pattern_text of this LogAnalyticsWarning.\n :type: str\n '
self._pattern_text = patter... | Sets the pattern_text of this LogAnalyticsWarning.
The text of the pattern used by the warning
:param pattern_text: The pattern_text of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | pattern_text | ezequielramos/oci-python-sdk | 249 | python | @pattern_text.setter
def pattern_text(self, pattern_text):
'\n Sets the pattern_text of this LogAnalyticsWarning.\n The text of the pattern used by the warning\n\n\n :param pattern_text: The pattern_text of this LogAnalyticsWarning.\n :type: str\n '
self._pattern_text = patter... | @pattern_text.setter
def pattern_text(self, pattern_text):
'\n Sets the pattern_text of this LogAnalyticsWarning.\n The text of the pattern used by the warning\n\n\n :param pattern_text: The pattern_text of this LogAnalyticsWarning.\n :type: str\n '
self._pattern_text = patter... |
822af900dab0db3a20eceaa3d45805770ad910208db8f0c901c3cc5953877f6c | @property
def rule_id(self):
'\n Gets the rule_id of this LogAnalyticsWarning.\n The unique identifier of the rule associated with the warning\n\n\n :return: The rule_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._rule_id | Gets the rule_id of this LogAnalyticsWarning.
The unique identifier of the rule associated with the warning
:return: The rule_id of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | rule_id | ezequielramos/oci-python-sdk | 249 | python | @property
def rule_id(self):
'\n Gets the rule_id of this LogAnalyticsWarning.\n The unique identifier of the rule associated with the warning\n\n\n :return: The rule_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._rule_id | @property
def rule_id(self):
'\n Gets the rule_id of this LogAnalyticsWarning.\n The unique identifier of the rule associated with the warning\n\n\n :return: The rule_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._rule_id<|docstring|>Gets the rule_id of this Lo... |
65f158af3abdd9e5429a82d693adff04475c41a37121d1cd02f48ff86278c8e3 | @rule_id.setter
def rule_id(self, rule_id):
'\n Sets the rule_id of this LogAnalyticsWarning.\n The unique identifier of the rule associated with the warning\n\n\n :param rule_id: The rule_id of this LogAnalyticsWarning.\n :type: str\n '
self._rule_id = rule_id | Sets the rule_id of this LogAnalyticsWarning.
The unique identifier of the rule associated with the warning
:param rule_id: The rule_id of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | rule_id | ezequielramos/oci-python-sdk | 249 | python | @rule_id.setter
def rule_id(self, rule_id):
'\n Sets the rule_id of this LogAnalyticsWarning.\n The unique identifier of the rule associated with the warning\n\n\n :param rule_id: The rule_id of this LogAnalyticsWarning.\n :type: str\n '
self._rule_id = rule_id | @rule_id.setter
def rule_id(self, rule_id):
'\n Sets the rule_id of this LogAnalyticsWarning.\n The unique identifier of the rule associated with the warning\n\n\n :param rule_id: The rule_id of this LogAnalyticsWarning.\n :type: str\n '
self._rule_id = rule_id<|docstring|>Set... |
092071f62ff2191f81caf8efe27adcefbd44f36dd839bec99ff326b331e88fbd | @property
def source_id(self):
'\n Gets the source_id of this LogAnalyticsWarning.\n The unique identifier of the source associated with the warning\n\n\n :return: The source_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._source_id | Gets the source_id of this LogAnalyticsWarning.
The unique identifier of the source associated with the warning
:return: The source_id of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | source_id | ezequielramos/oci-python-sdk | 249 | python | @property
def source_id(self):
'\n Gets the source_id of this LogAnalyticsWarning.\n The unique identifier of the source associated with the warning\n\n\n :return: The source_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._source_id | @property
def source_id(self):
'\n Gets the source_id of this LogAnalyticsWarning.\n The unique identifier of the source associated with the warning\n\n\n :return: The source_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._source_id<|docstring|>Gets the source_i... |
f30a0e3edba0159cc36840fa17db3ddce1150b4b2726358bc0c22b9708961b89 | @source_id.setter
def source_id(self, source_id):
'\n Sets the source_id of this LogAnalyticsWarning.\n The unique identifier of the source associated with the warning\n\n\n :param source_id: The source_id of this LogAnalyticsWarning.\n :type: str\n '
self._source_id = source_... | Sets the source_id of this LogAnalyticsWarning.
The unique identifier of the source associated with the warning
:param source_id: The source_id of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | source_id | ezequielramos/oci-python-sdk | 249 | python | @source_id.setter
def source_id(self, source_id):
'\n Sets the source_id of this LogAnalyticsWarning.\n The unique identifier of the source associated with the warning\n\n\n :param source_id: The source_id of this LogAnalyticsWarning.\n :type: str\n '
self._source_id = source_... | @source_id.setter
def source_id(self, source_id):
'\n Sets the source_id of this LogAnalyticsWarning.\n The unique identifier of the source associated with the warning\n\n\n :param source_id: The source_id of this LogAnalyticsWarning.\n :type: str\n '
self._source_id = source_... |
9ca14982bbeb1375fea051f6fdc063e17b2038d1d0911e2e64cb1f59e4874d68 | @property
def suppressed_by(self):
'\n Gets the suppressed_by of this LogAnalyticsWarning.\n The user who suppressed the warning, or empty if the warning is not suppressed\n\n\n :return: The suppressed_by of this LogAnalyticsWarning.\n :rtype: str\n '
return self._suppressed_b... | Gets the suppressed_by of this LogAnalyticsWarning.
The user who suppressed the warning, or empty if the warning is not suppressed
:return: The suppressed_by of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | suppressed_by | ezequielramos/oci-python-sdk | 249 | python | @property
def suppressed_by(self):
'\n Gets the suppressed_by of this LogAnalyticsWarning.\n The user who suppressed the warning, or empty if the warning is not suppressed\n\n\n :return: The suppressed_by of this LogAnalyticsWarning.\n :rtype: str\n '
return self._suppressed_b... | @property
def suppressed_by(self):
'\n Gets the suppressed_by of this LogAnalyticsWarning.\n The user who suppressed the warning, or empty if the warning is not suppressed\n\n\n :return: The suppressed_by of this LogAnalyticsWarning.\n :rtype: str\n '
return self._suppressed_b... |
da9bd5002cf0198522e9922d73647462e5f536dd3c21330e183958994dda73f6 | @suppressed_by.setter
def suppressed_by(self, suppressed_by):
'\n Sets the suppressed_by of this LogAnalyticsWarning.\n The user who suppressed the warning, or empty if the warning is not suppressed\n\n\n :param suppressed_by: The suppressed_by of this LogAnalyticsWarning.\n :type: str\n... | Sets the suppressed_by of this LogAnalyticsWarning.
The user who suppressed the warning, or empty if the warning is not suppressed
:param suppressed_by: The suppressed_by of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | suppressed_by | ezequielramos/oci-python-sdk | 249 | python | @suppressed_by.setter
def suppressed_by(self, suppressed_by):
'\n Sets the suppressed_by of this LogAnalyticsWarning.\n The user who suppressed the warning, or empty if the warning is not suppressed\n\n\n :param suppressed_by: The suppressed_by of this LogAnalyticsWarning.\n :type: str\n... | @suppressed_by.setter
def suppressed_by(self, suppressed_by):
'\n Sets the suppressed_by of this LogAnalyticsWarning.\n The user who suppressed the warning, or empty if the warning is not suppressed\n\n\n :param suppressed_by: The suppressed_by of this LogAnalyticsWarning.\n :type: str\n... |
ad8fe9ade70ecd0aa536de9f2a1d362344a796485960e8d6a1289c4376b49d16 | @property
def entity_id(self):
'\n Gets the entity_id of this LogAnalyticsWarning.\n The unique identifier of the entity associated with the warning\n\n\n :return: The entity_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._entity_id | Gets the entity_id of this LogAnalyticsWarning.
The unique identifier of the entity associated with the warning
:return: The entity_id of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | entity_id | ezequielramos/oci-python-sdk | 249 | python | @property
def entity_id(self):
'\n Gets the entity_id of this LogAnalyticsWarning.\n The unique identifier of the entity associated with the warning\n\n\n :return: The entity_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._entity_id | @property
def entity_id(self):
'\n Gets the entity_id of this LogAnalyticsWarning.\n The unique identifier of the entity associated with the warning\n\n\n :return: The entity_id of this LogAnalyticsWarning.\n :rtype: str\n '
return self._entity_id<|docstring|>Gets the entity_i... |
abc77b454dfb8a71d8f1fa212e55f6bad57df3a61704d9f46a0897f92abb0961 | @entity_id.setter
def entity_id(self, entity_id):
'\n Sets the entity_id of this LogAnalyticsWarning.\n The unique identifier of the entity associated with the warning\n\n\n :param entity_id: The entity_id of this LogAnalyticsWarning.\n :type: str\n '
self._entity_id = entity_... | Sets the entity_id of this LogAnalyticsWarning.
The unique identifier of the entity associated with the warning
:param entity_id: The entity_id of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | entity_id | ezequielramos/oci-python-sdk | 249 | python | @entity_id.setter
def entity_id(self, entity_id):
'\n Sets the entity_id of this LogAnalyticsWarning.\n The unique identifier of the entity associated with the warning\n\n\n :param entity_id: The entity_id of this LogAnalyticsWarning.\n :type: str\n '
self._entity_id = entity_... | @entity_id.setter
def entity_id(self, entity_id):
'\n Sets the entity_id of this LogAnalyticsWarning.\n The unique identifier of the entity associated with the warning\n\n\n :param entity_id: The entity_id of this LogAnalyticsWarning.\n :type: str\n '
self._entity_id = entity_... |
aa9059880c4c63053dd4368956554f1d0af0238fc5e2a540c230597a9bac4db6 | @property
def entity_type(self):
'\n Gets the entity_type of this LogAnalyticsWarning.\n The type of the entity associated with the warning\n\n\n :return: The entity_type of this LogAnalyticsWarning.\n :rtype: str\n '
return self._entity_type | Gets the entity_type of this LogAnalyticsWarning.
The type of the entity associated with the warning
:return: The entity_type of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | entity_type | ezequielramos/oci-python-sdk | 249 | python | @property
def entity_type(self):
'\n Gets the entity_type of this LogAnalyticsWarning.\n The type of the entity associated with the warning\n\n\n :return: The entity_type of this LogAnalyticsWarning.\n :rtype: str\n '
return self._entity_type | @property
def entity_type(self):
'\n Gets the entity_type of this LogAnalyticsWarning.\n The type of the entity associated with the warning\n\n\n :return: The entity_type of this LogAnalyticsWarning.\n :rtype: str\n '
return self._entity_type<|docstring|>Gets the entity_type o... |
a430b9210b676bfebbe7378336554541a7ab45163de33edfcb5dbc3c705a09af | @entity_type.setter
def entity_type(self, entity_type):
'\n Sets the entity_type of this LogAnalyticsWarning.\n The type of the entity associated with the warning\n\n\n :param entity_type: The entity_type of this LogAnalyticsWarning.\n :type: str\n '
self._entity_type = entity... | Sets the entity_type of this LogAnalyticsWarning.
The type of the entity associated with the warning
:param entity_type: The entity_type of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | entity_type | ezequielramos/oci-python-sdk | 249 | python | @entity_type.setter
def entity_type(self, entity_type):
'\n Sets the entity_type of this LogAnalyticsWarning.\n The type of the entity associated with the warning\n\n\n :param entity_type: The entity_type of this LogAnalyticsWarning.\n :type: str\n '
self._entity_type = entity... | @entity_type.setter
def entity_type(self, entity_type):
'\n Sets the entity_type of this LogAnalyticsWarning.\n The type of the entity associated with the warning\n\n\n :param entity_type: The entity_type of this LogAnalyticsWarning.\n :type: str\n '
self._entity_type = entity... |
df9ea207b5d7d5954eaa9ce6eefe6a58f7fc9d7fd56d04e4566e944b6c32333d | @property
def entity_type_display_name(self):
'\n Gets the entity_type_display_name of this LogAnalyticsWarning.\n The display name of the entity type associated with the warning\n\n\n :return: The entity_type_display_name of this LogAnalyticsWarning.\n :rtype: str\n '
return ... | Gets the entity_type_display_name of this LogAnalyticsWarning.
The display name of the entity type associated with the warning
:return: The entity_type_display_name of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | entity_type_display_name | ezequielramos/oci-python-sdk | 249 | python | @property
def entity_type_display_name(self):
'\n Gets the entity_type_display_name of this LogAnalyticsWarning.\n The display name of the entity type associated with the warning\n\n\n :return: The entity_type_display_name of this LogAnalyticsWarning.\n :rtype: str\n '
return ... | @property
def entity_type_display_name(self):
'\n Gets the entity_type_display_name of this LogAnalyticsWarning.\n The display name of the entity type associated with the warning\n\n\n :return: The entity_type_display_name of this LogAnalyticsWarning.\n :rtype: str\n '
return ... |
f65a6f5cab238b8e0dc5acbe10743f2a45179edbb80ace8998f6c8f3fa62979d | @entity_type_display_name.setter
def entity_type_display_name(self, entity_type_display_name):
'\n Sets the entity_type_display_name of this LogAnalyticsWarning.\n The display name of the entity type associated with the warning\n\n\n :param entity_type_display_name: The entity_type_display_name... | Sets the entity_type_display_name of this LogAnalyticsWarning.
The display name of the entity type associated with the warning
:param entity_type_display_name: The entity_type_display_name of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | entity_type_display_name | ezequielramos/oci-python-sdk | 249 | python | @entity_type_display_name.setter
def entity_type_display_name(self, entity_type_display_name):
'\n Sets the entity_type_display_name of this LogAnalyticsWarning.\n The display name of the entity type associated with the warning\n\n\n :param entity_type_display_name: The entity_type_display_name... | @entity_type_display_name.setter
def entity_type_display_name(self, entity_type_display_name):
'\n Sets the entity_type_display_name of this LogAnalyticsWarning.\n The display name of the entity type associated with the warning\n\n\n :param entity_type_display_name: The entity_type_display_name... |
bd7d70e35bd71203da5bfb6a6d55e727542020def17ef04e8bbfc56d63eecc90 | @property
def type_display_name(self):
'\n Gets the type_display_name of this LogAnalyticsWarning.\n The display name of the warning type\n\n\n :return: The type_display_name of this LogAnalyticsWarning.\n :rtype: str\n '
return self._type_display_name | Gets the type_display_name of this LogAnalyticsWarning.
The display name of the warning type
:return: The type_display_name of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | type_display_name | ezequielramos/oci-python-sdk | 249 | python | @property
def type_display_name(self):
'\n Gets the type_display_name of this LogAnalyticsWarning.\n The display name of the warning type\n\n\n :return: The type_display_name of this LogAnalyticsWarning.\n :rtype: str\n '
return self._type_display_name | @property
def type_display_name(self):
'\n Gets the type_display_name of this LogAnalyticsWarning.\n The display name of the warning type\n\n\n :return: The type_display_name of this LogAnalyticsWarning.\n :rtype: str\n '
return self._type_display_name<|docstring|>Gets the typ... |
5ad023d6b94e487077568630b845bee982c18126b3fc0b0b864c7a0efc70d672 | @type_display_name.setter
def type_display_name(self, type_display_name):
'\n Sets the type_display_name of this LogAnalyticsWarning.\n The display name of the warning type\n\n\n :param type_display_name: The type_display_name of this LogAnalyticsWarning.\n :type: str\n '
self... | Sets the type_display_name of this LogAnalyticsWarning.
The display name of the warning type
:param type_display_name: The type_display_name of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | type_display_name | ezequielramos/oci-python-sdk | 249 | python | @type_display_name.setter
def type_display_name(self, type_display_name):
'\n Sets the type_display_name of this LogAnalyticsWarning.\n The display name of the warning type\n\n\n :param type_display_name: The type_display_name of this LogAnalyticsWarning.\n :type: str\n '
self... | @type_display_name.setter
def type_display_name(self, type_display_name):
'\n Sets the type_display_name of this LogAnalyticsWarning.\n The display name of the warning type\n\n\n :param type_display_name: The type_display_name of this LogAnalyticsWarning.\n :type: str\n '
self... |
611c6279595a0e5575cfe1ba210b6893f3168bcf6d00c3ccfab9530c8c9f16fa | @property
def type_name(self):
'\n Gets the type_name of this LogAnalyticsWarning.\n The internal name of the warning\n\n\n :return: The type_name of this LogAnalyticsWarning.\n :rtype: str\n '
return self._type_name | Gets the type_name of this LogAnalyticsWarning.
The internal name of the warning
:return: The type_name of this LogAnalyticsWarning.
:rtype: str | src/oci/log_analytics/models/log_analytics_warning.py | type_name | ezequielramos/oci-python-sdk | 249 | python | @property
def type_name(self):
'\n Gets the type_name of this LogAnalyticsWarning.\n The internal name of the warning\n\n\n :return: The type_name of this LogAnalyticsWarning.\n :rtype: str\n '
return self._type_name | @property
def type_name(self):
'\n Gets the type_name of this LogAnalyticsWarning.\n The internal name of the warning\n\n\n :return: The type_name of this LogAnalyticsWarning.\n :rtype: str\n '
return self._type_name<|docstring|>Gets the type_name of this LogAnalyticsWarning.
... |
4ba6a03f7d935a77f738006f20db75a3ee873d8810a13a71c0791b62d38e83e9 | @type_name.setter
def type_name(self, type_name):
'\n Sets the type_name of this LogAnalyticsWarning.\n The internal name of the warning\n\n\n :param type_name: The type_name of this LogAnalyticsWarning.\n :type: str\n '
self._type_name = type_name | Sets the type_name of this LogAnalyticsWarning.
The internal name of the warning
:param type_name: The type_name of this LogAnalyticsWarning.
:type: str | src/oci/log_analytics/models/log_analytics_warning.py | type_name | ezequielramos/oci-python-sdk | 249 | python | @type_name.setter
def type_name(self, type_name):
'\n Sets the type_name of this LogAnalyticsWarning.\n The internal name of the warning\n\n\n :param type_name: The type_name of this LogAnalyticsWarning.\n :type: str\n '
self._type_name = type_name | @type_name.setter
def type_name(self, type_name):
'\n Sets the type_name of this LogAnalyticsWarning.\n The internal name of the warning\n\n\n :param type_name: The type_name of this LogAnalyticsWarning.\n :type: str\n '
self._type_name = type_name<|docstring|>Sets the type_na... |
fef39eadaac9e3a11a6b7687e17968f8b6ca5e5a6b92ab57c01d0375ec233599 | @property
def severity(self):
'\n Gets the severity of this LogAnalyticsWarning.\n The warning severity\n\n\n :return: The severity of this LogAnalyticsWarning.\n :rtype: int\n '
return self._severity | Gets the severity of this LogAnalyticsWarning.
The warning severity
:return: The severity of this LogAnalyticsWarning.
:rtype: int | src/oci/log_analytics/models/log_analytics_warning.py | severity | ezequielramos/oci-python-sdk | 249 | python | @property
def severity(self):
'\n Gets the severity of this LogAnalyticsWarning.\n The warning severity\n\n\n :return: The severity of this LogAnalyticsWarning.\n :rtype: int\n '
return self._severity | @property
def severity(self):
'\n Gets the severity of this LogAnalyticsWarning.\n The warning severity\n\n\n :return: The severity of this LogAnalyticsWarning.\n :rtype: int\n '
return self._severity<|docstring|>Gets the severity of this LogAnalyticsWarning.
The warning sever... |
8683e1629d76b2994dcfebf4f11864824b8c1aac7fc363316e0f2e8d1eeda6e0 | @severity.setter
def severity(self, severity):
'\n Sets the severity of this LogAnalyticsWarning.\n The warning severity\n\n\n :param severity: The severity of this LogAnalyticsWarning.\n :type: int\n '
self._severity = severity | Sets the severity of this LogAnalyticsWarning.
The warning severity
:param severity: The severity of this LogAnalyticsWarning.
:type: int | src/oci/log_analytics/models/log_analytics_warning.py | severity | ezequielramos/oci-python-sdk | 249 | python | @severity.setter
def severity(self, severity):
'\n Sets the severity of this LogAnalyticsWarning.\n The warning severity\n\n\n :param severity: The severity of this LogAnalyticsWarning.\n :type: int\n '
self._severity = severity | @severity.setter
def severity(self, severity):
'\n Sets the severity of this LogAnalyticsWarning.\n The warning severity\n\n\n :param severity: The severity of this LogAnalyticsWarning.\n :type: int\n '
self._severity = severity<|docstring|>Sets the severity of this LogAnalyti... |
0dc0b17d49132dd699444e782d106279b2c7bd2bffb0834bfe8ee5cd6814858c | def register(linter: PyLinter) -> None:
'Register the checker.'
linter.register_checker(HassConstructorFormatChecker(linter)) | Register the checker. | pylint/plugins/hass_constructor.py | register | orcema/core | 30,023 | python | def register(linter: PyLinter) -> None:
linter.register_checker(HassConstructorFormatChecker(linter)) | def register(linter: PyLinter) -> None:
linter.register_checker(HassConstructorFormatChecker(linter))<|docstring|>Register the checker.<|endoftext|> |
1938c4662a2a8d355c0e65df4c4709eeb56a997c4587222f724f6722d9a2f6bd | def visit_functiondef(self, node: nodes.FunctionDef) -> None:
'Called when a FunctionDef node is visited.'
if ((not node.is_method()) or (node.name != '__init__')):
return
args = node.args
annotations = ((args.posonlyargs_annotations + args.annotations) + args.kwonlyargs_annotations)[1:]
if ... | Called when a FunctionDef node is visited. | pylint/plugins/hass_constructor.py | visit_functiondef | orcema/core | 30,023 | python | def visit_functiondef(self, node: nodes.FunctionDef) -> None:
if ((not node.is_method()) or (node.name != '__init__')):
return
args = node.args
annotations = ((args.posonlyargs_annotations + args.annotations) + args.kwonlyargs_annotations)[1:]
if (args.vararg is not None):
annotatio... | def visit_functiondef(self, node: nodes.FunctionDef) -> None:
if ((not node.is_method()) or (node.name != '__init__')):
return
args = node.args
annotations = ((args.posonlyargs_annotations + args.annotations) + args.kwonlyargs_annotations)[1:]
if (args.vararg is not None):
annotatio... |
53b07ad8eabb960a34ddebfed0787ab87f826b67d5d96d32fa2284270f35ca18 | def test_insert(server: Eve):
'Test to ensure records can be inserted into DynamoDB\n\n :param Eve server: Eve server\n :raises: AssertionError\n '
with server.app_context():
id_field = server.config['DOMAIN']['actor']['id_field']
assert server.data.insert('actor', [{id_field: '1', 'fna... | Test to ensure records can be inserted into DynamoDB
:param Eve server: Eve server
:raises: AssertionError | test/test_insert.py | test_insert | jlane9/eve-dynamodb | 0 | python | def test_insert(server: Eve):
'Test to ensure records can be inserted into DynamoDB\n\n :param Eve server: Eve server\n :raises: AssertionError\n '
with server.app_context():
id_field = server.config['DOMAIN']['actor']['id_field']
assert server.data.insert('actor', [{id_field: '1', 'fna... | def test_insert(server: Eve):
'Test to ensure records can be inserted into DynamoDB\n\n :param Eve server: Eve server\n :raises: AssertionError\n '
with server.app_context():
id_field = server.config['DOMAIN']['actor']['id_field']
assert server.data.insert('actor', [{id_field: '1', 'fna... |
c5370a725fbd78808dd2fe5e76944f771214c8284bf91f7312e13e8bad9b618a | def test_duplicate_insert(server: Eve):
'Test to ensure id must remain unique\n\n :param Eve server: Eve server\n :raises: AssertionError\n '
with server.app_context():
id_field = server.config['DOMAIN']['actor']['id_field']
server.data.insert('actor', [{id_field: '1', 'fname': 'Oprah'}... | Test to ensure id must remain unique
:param Eve server: Eve server
:raises: AssertionError | test/test_insert.py | test_duplicate_insert | jlane9/eve-dynamodb | 0 | python | def test_duplicate_insert(server: Eve):
'Test to ensure id must remain unique\n\n :param Eve server: Eve server\n :raises: AssertionError\n '
with server.app_context():
id_field = server.config['DOMAIN']['actor']['id_field']
server.data.insert('actor', [{id_field: '1', 'fname': 'Oprah'}... | def test_duplicate_insert(server: Eve):
'Test to ensure id must remain unique\n\n :param Eve server: Eve server\n :raises: AssertionError\n '
with server.app_context():
id_field = server.config['DOMAIN']['actor']['id_field']
server.data.insert('actor', [{id_field: '1', 'fname': 'Oprah'}... |
e1ff9581088552106023f21575d0661d949059d43f29b7b40dfd2b29e7e190ad | def get_performance_test_results(self, page_url: str=None, metric_names: str=None, start_date: str=None, end_date: str=None):
'\n https://docs.saucelabs.com/dev/api/performance/#get-performance-test-results\n\n Retrieves the results of performance tests run by the requesting account and returns the\n ... | https://docs.saucelabs.com/dev/api/performance/#get-performance-test-results
Retrieves the results of performance tests run by the requesting account and returns the
metric values for those tests.
:param page_url: Filter results to return only tests run on a specific URL
:param metric_names: Provide a list of specific... | saucelab_api_client/base_classes/performance_api.py | get_performance_test_results | Slamnlc/saucelab-api-client | 0 | python | def get_performance_test_results(self, page_url: str=None, metric_names: str=None, start_date: str=None, end_date: str=None):
'\n https://docs.saucelabs.com/dev/api/performance/#get-performance-test-results\n\n Retrieves the results of performance tests run by the requesting account and returns the\n ... | def get_performance_test_results(self, page_url: str=None, metric_names: str=None, start_date: str=None, end_date: str=None):
'\n https://docs.saucelabs.com/dev/api/performance/#get-performance-test-results\n\n Retrieves the results of performance tests run by the requesting account and returns the\n ... |
81f36f98172ff5c05d9b22a18c153665997e45466cc2a00351edde07e0a59011 | def get_performance_test_results_for_test(self, job_id: str, full: bool=True):
'\n https://docs.saucelabs.com/performance/one-page/#get-performance-results-for-a-specific-test\n\n Retrieves the results of a specific performance test run by the requesting account\n :param job_id: The unique iden... | https://docs.saucelabs.com/performance/one-page/#get-performance-results-for-a-specific-test
Retrieves the results of a specific performance test run by the requesting account
:param job_id: The unique identifier of the requested test results
:param full: Set to false to return only basic job data, excluding metric va... | saucelab_api_client/base_classes/performance_api.py | get_performance_test_results_for_test | Slamnlc/saucelab-api-client | 0 | python | def get_performance_test_results_for_test(self, job_id: str, full: bool=True):
'\n https://docs.saucelabs.com/performance/one-page/#get-performance-results-for-a-specific-test\n\n Retrieves the results of a specific performance test run by the requesting account\n :param job_id: The unique iden... | def get_performance_test_results_for_test(self, job_id: str, full: bool=True):
'\n https://docs.saucelabs.com/performance/one-page/#get-performance-results-for-a-specific-test\n\n Retrieves the results of a specific performance test run by the requesting account\n :param job_id: The unique iden... |
8d28d7602be19d3f5d722265ec6bc474bea7c63c9be56b5ff4489908f1067e31 | def main():
' MAIN! '
SW1 = NetworkDevice('172.16.63.100', 'cisco', 'cisco')
R1 = NetworkDevice('172.16.63.101', 'cisco', 'cisco')
R2 = NetworkDevice('172.16.63.102', 'cisco', 'cisco')
network_devices = [SW1, R1, R2]
for device in network_devices:
print()
device.get_device_detail... | MAIN! | week10/NetworkDevice.py | main | gerards/pynet_learning_python | 0 | python | def main():
' '
SW1 = NetworkDevice('172.16.63.100', 'cisco', 'cisco')
R1 = NetworkDevice('172.16.63.101', 'cisco', 'cisco')
R2 = NetworkDevice('172.16.63.102', 'cisco', 'cisco')
network_devices = [SW1, R1, R2]
for device in network_devices:
print()
device.get_device_details()
... | def main():
' '
SW1 = NetworkDevice('172.16.63.100', 'cisco', 'cisco')
R1 = NetworkDevice('172.16.63.101', 'cisco', 'cisco')
R2 = NetworkDevice('172.16.63.102', 'cisco', 'cisco')
network_devices = [SW1, R1, R2]
for device in network_devices:
print()
device.get_device_details()
... |
2e8ba65e952fc708c4cd6a96dddb8d0528add04ed0804c896b7a1d5b2e71d10b | def _connect(self, disable_paging=True):
' Setup connect to network device '
remote_conn_pre = paramiko.SSHClient()
remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy())
remote_conn_pre.connect(self.ipaddr, username=self.username, password=self.password, look_for_keys=False, allow_agent=... | Setup connect to network device | week10/NetworkDevice.py | _connect | gerards/pynet_learning_python | 0 | python | def _connect(self, disable_paging=True):
' '
remote_conn_pre = paramiko.SSHClient()
remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy())
remote_conn_pre.connect(self.ipaddr, username=self.username, password=self.password, look_for_keys=False, allow_agent=False)
remote_conn = remote... | def _connect(self, disable_paging=True):
' '
remote_conn_pre = paramiko.SSHClient()
remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy())
remote_conn_pre.connect(self.ipaddr, username=self.username, password=self.password, look_for_keys=False, allow_agent=False)
remote_conn = remote... |
1f1eab6d0532b9a6557acfeb0738e143611e4bfdce68d1f43a6e4970992001e1 | def send_command(self, command):
' Send command to network device and return output '
remote_conn = self._connect()
remote_conn.send((('\n' + command) + '\n'))
time.sleep(2)
output = remote_conn.recv(65535)
output = output.decode()
remote_conn.close()
return output | Send command to network device and return output | week10/NetworkDevice.py | send_command | gerards/pynet_learning_python | 0 | python | def send_command(self, command):
' '
remote_conn = self._connect()
remote_conn.send((('\n' + command) + '\n'))
time.sleep(2)
output = remote_conn.recv(65535)
output = output.decode()
remote_conn.close()
return output | def send_command(self, command):
' '
remote_conn = self._connect()
remote_conn.send((('\n' + command) + '\n'))
time.sleep(2)
output = remote_conn.recv(65535)
output = output.decode()
remote_conn.close()
return output<|docstring|>Send command to network device and return output<|endoftex... |
cb5d72a2ef8893356949a88d182d24e3f2124447315d47ceb08038b0bc5ee9f3 | def get_device_details(self):
' Return device details pulled from show version '
show_version = self.send_command('show version')
show_version_lines = show_version.split('\n')
for line in show_version_lines:
if ('Cisco IOS Software' in line):
vendor_line = line.split(', ')
... | Return device details pulled from show version | week10/NetworkDevice.py | get_device_details | gerards/pynet_learning_python | 0 | python | def get_device_details(self):
' '
show_version = self.send_command('show version')
show_version_lines = show_version.split('\n')
for line in show_version_lines:
if ('Cisco IOS Software' in line):
vendor_line = line.split(', ')
self.device_details['vendor'] = vendor_line[... | def get_device_details(self):
' '
show_version = self.send_command('show version')
show_version_lines = show_version.split('\n')
for line in show_version_lines:
if ('Cisco IOS Software' in line):
vendor_line = line.split(', ')
self.device_details['vendor'] = vendor_line[... |
92f2aaab1106c6f2ede4d7b6e3fd5dd15939afe98150a46b4884ba72012372ba | def __init__(self, phantom_model: str, phantom_dim: PhantomDimensions, human_mesh: Optional[str]=None):
'Create the phantom of choice.\n\n Parameters\n ----------\n phantom_model : str\n Type of phantom to create. Valid selections are \'plane\',\n \'cylinder\', \'human\', ... | Create the phantom of choice.
Parameters
----------
phantom_model : str
Type of phantom to create. Valid selections are 'plane',
'cylinder', 'human', "table" an "pad".
phantom_dim : PhantomDimensions
instance of class PhantomDimensions containing dimensions for
all phantoms models except human phantoms... | src/pyskindose/phantom_class.py | __init__ | notZaki/PySkinDose | 0 | python | def __init__(self, phantom_model: str, phantom_dim: PhantomDimensions, human_mesh: Optional[str]=None):
'Create the phantom of choice.\n\n Parameters\n ----------\n phantom_model : str\n Type of phantom to create. Valid selections are \'plane\',\n \'cylinder\', \'human\', ... | def __init__(self, phantom_model: str, phantom_dim: PhantomDimensions, human_mesh: Optional[str]=None):
'Create the phantom of choice.\n\n Parameters\n ----------\n phantom_model : str\n Type of phantom to create. Valid selections are \'plane\',\n \'cylinder\', \'human\', ... |
dd7814745a7bafa28c94ea7048e64b266191675db3065cf0ab1bee0f612c24ea | def rotate(self, angles: List[int]) -> None:
'Rotate the phantom about the angles specified in rotation.\n\n Parameters\n ----------\n angles: List[int]\n list of angles in degrees the phantom should be rotated about,\n given as [x_rot: <int>, y_rot: <int>, z_rot: <int>]. ... | Rotate the phantom about the angles specified in rotation.
Parameters
----------
angles: List[int]
list of angles in degrees the phantom should be rotated about,
given as [x_rot: <int>, y_rot: <int>, z_rot: <int>]. E.g.
rotation = [0, 90, 0] will rotate the phantom 90 degrees about the
y-axis. | src/pyskindose/phantom_class.py | rotate | notZaki/PySkinDose | 0 | python | def rotate(self, angles: List[int]) -> None:
'Rotate the phantom about the angles specified in rotation.\n\n Parameters\n ----------\n angles: List[int]\n list of angles in degrees the phantom should be rotated about,\n given as [x_rot: <int>, y_rot: <int>, z_rot: <int>]. ... | def rotate(self, angles: List[int]) -> None:
'Rotate the phantom about the angles specified in rotation.\n\n Parameters\n ----------\n angles: List[int]\n list of angles in degrees the phantom should be rotated about,\n given as [x_rot: <int>, y_rot: <int>, z_rot: <int>]. ... |
17470644cfc134ba6ae9c8d369650e36db5d53194d85da167066a647ac503e6c | def translate(self, dr: List[int]) -> None:
'Translate the phantom in the x, y or z direction.\n\n Parameters\n ----------\n dr : List[int]\n list of distances the phantom should be translated, given in cm.\n Specified as dr = [dx: <int>, dy: <int>, dz: <int>]. E.g.\n ... | Translate the phantom in the x, y or z direction.
Parameters
----------
dr : List[int]
list of distances the phantom should be translated, given in cm.
Specified as dr = [dx: <int>, dy: <int>, dz: <int>]. E.g.
dr = [0, 0, 10] will translate the phantom 10 cm in the z direction | src/pyskindose/phantom_class.py | translate | notZaki/PySkinDose | 0 | python | def translate(self, dr: List[int]) -> None:
'Translate the phantom in the x, y or z direction.\n\n Parameters\n ----------\n dr : List[int]\n list of distances the phantom should be translated, given in cm.\n Specified as dr = [dx: <int>, dy: <int>, dz: <int>]. E.g.\n ... | def translate(self, dr: List[int]) -> None:
'Translate the phantom in the x, y or z direction.\n\n Parameters\n ----------\n dr : List[int]\n list of distances the phantom should be translated, given in cm.\n Specified as dr = [dx: <int>, dy: <int>, dz: <int>]. E.g.\n ... |
44fdc1119a5ecc365bf8ed89a3f76611d487207565f2884b13b575511819a952 | def save_position(self) -> None:
'Store a reference position of the phantom.\n\n This function is supposed to be used to store the patient fixation\n conducted in the function position_geometry\n\n '
r_ref = copy.copy(self.r)
self.r_ref = r_ref | Store a reference position of the phantom.
This function is supposed to be used to store the patient fixation
conducted in the function position_geometry | src/pyskindose/phantom_class.py | save_position | notZaki/PySkinDose | 0 | python | def save_position(self) -> None:
'Store a reference position of the phantom.\n\n This function is supposed to be used to store the patient fixation\n conducted in the function position_geometry\n\n '
r_ref = copy.copy(self.r)
self.r_ref = r_ref | def save_position(self) -> None:
'Store a reference position of the phantom.\n\n This function is supposed to be used to store the patient fixation\n conducted in the function position_geometry\n\n '
r_ref = copy.copy(self.r)
self.r_ref = r_ref<|docstring|>Store a reference position of ... |
3be814430079b375017c320c69b6e60a1e60ec0cebe8e2146cbc79fb8d17e31c | def position(self, data_norm: pd.DataFrame, event: int) -> None:
'Position the phantom for a event by adding RDSR table displacement.\n\n Positions the phantom from reference position to actual position\n according to the table displacement info in data_norm.\n\n Parameters\n ----------\... | Position the phantom for a event by adding RDSR table displacement.
Positions the phantom from reference position to actual position
according to the table displacement info in data_norm.
Parameters
----------
data_norm : pd.DataFrame
Table containing dicom RDSR information from each irradiation event
See rds... | src/pyskindose/phantom_class.py | position | notZaki/PySkinDose | 0 | python | def position(self, data_norm: pd.DataFrame, event: int) -> None:
'Position the phantom for a event by adding RDSR table displacement.\n\n Positions the phantom from reference position to actual position\n according to the table displacement info in data_norm.\n\n Parameters\n ----------\... | def position(self, data_norm: pd.DataFrame, event: int) -> None:
'Position the phantom for a event by adding RDSR table displacement.\n\n Positions the phantom from reference position to actual position\n according to the table displacement info in data_norm.\n\n Parameters\n ----------\... |
0ad9557eaa7d38fa4fb4e9eafd837f6bb1ce10e6c4420ad0df3ba1ce556e8ed7 | def plot_dosemap(self, dark_mode: bool=True, notebook_mode: bool=False):
'Plot a map of the absorbed skindose upon the patient phantom.\n\n This function creates and plots an offline plotly graph of the\n skin dose distribution on the phantom. The colorscale is mapped to the\n absorbed skin dos... | Plot a map of the absorbed skindose upon the patient phantom.
This function creates and plots an offline plotly graph of the
skin dose distribution on the phantom. The colorscale is mapped to the
absorbed skin dose value. Only available for phantom type: "plane",
"cylinder" or "human"
Parameters
----------
dark_mode ... | src/pyskindose/phantom_class.py | plot_dosemap | notZaki/PySkinDose | 0 | python | def plot_dosemap(self, dark_mode: bool=True, notebook_mode: bool=False):
'Plot a map of the absorbed skindose upon the patient phantom.\n\n This function creates and plots an offline plotly graph of the\n skin dose distribution on the phantom. The colorscale is mapped to the\n absorbed skin dos... | def plot_dosemap(self, dark_mode: bool=True, notebook_mode: bool=False):
'Plot a map of the absorbed skindose upon the patient phantom.\n\n This function creates and plots an offline plotly graph of the\n skin dose distribution on the phantom. The colorscale is mapped to the\n absorbed skin dos... |
ac8835bde3f1b68dbe6d3b49fa29159c7ee706aa2da498ab9f0d022ab13e8ae0 | def plot_graph(vertices, edges, ax, xlim=None, highlight=None, highlight_color='magenta', node_color='b', edge_color='#999999', label=None):
'Takes a graph given as vertices and edges and visualizes its structure'
start = vertices.ravel().min()
stop = vertices.ravel().max()
ax.grid(b=True, which='major'... | Takes a graph given as vertices and edges and visualizes its structure | spladder/viz/graph.py | plot_graph | ratschlab/spladder | 96 | python | def plot_graph(vertices, edges, ax, xlim=None, highlight=None, highlight_color='magenta', node_color='b', edge_color='#999999', label=None):
start = vertices.ravel().min()
stop = vertices.ravel().max()
ax.grid(b=True, which='major', linestyle='--', linewidth=0.2, color='#222222')
ax.yaxis.grid(Fals... | def plot_graph(vertices, edges, ax, xlim=None, highlight=None, highlight_color='magenta', node_color='b', edge_color='#999999', label=None):
start = vertices.ravel().min()
stop = vertices.ravel().max()
ax.grid(b=True, which='major', linestyle='--', linewidth=0.2, color='#222222')
ax.yaxis.grid(Fals... |
06c765a786afb757be1866036a0e7080ea8f24eab589dd8e1b4fd11b86bff1a4 | def __init__(self, classes_root_dir, this_root_dir, yolo_config, augment=False):
'\n :param root_dir:\n :param yolo_config: dictionary that contain the require data for yolo (C, B, K)\n '
self.augment = augment
self.root_dir = this_root_dir
self.C = yolo_config['C']
self.B = yol... | :param root_dir:
:param yolo_config: dictionary that contain the require data for yolo (C, B, K) | Multitask/ImageAudioClassifier/Helper.py | __init__ | nileshpd1211/SRIP-UCSD---Efficient-Deep-Networks | 0 | python | def __init__(self, classes_root_dir, this_root_dir, yolo_config, augment=False):
'\n :param root_dir:\n :param yolo_config: dictionary that contain the require data for yolo (C, B, K)\n '
self.augment = augment
self.root_dir = this_root_dir
self.C = yolo_config['C']
self.B = yol... | def __init__(self, classes_root_dir, this_root_dir, yolo_config, augment=False):
'\n :param root_dir:\n :param yolo_config: dictionary that contain the require data for yolo (C, B, K)\n '
self.augment = augment
self.root_dir = this_root_dir
self.C = yolo_config['C']
self.B = yol... |
2251cf9211e0219bbd7950e779b5de897420674c4ab917c64b86c61b8e3cc913 | def __getitem__(self, idx):
'\n :param idx:\n :return:\n '
features_path = self.data[idx][0]
add_augment = False
if self.augment:
add_augment = utils.random_onoff()
(features, dot_len, real_features_len, sr) = utils.spect_loader(features_path, max_len=101, augment=add_au... | :param idx:
:return: | Multitask/ImageAudioClassifier/Helper.py | __getitem__ | nileshpd1211/SRIP-UCSD---Efficient-Deep-Networks | 0 | python | def __getitem__(self, idx):
'\n :param idx:\n :return:\n '
features_path = self.data[idx][0]
add_augment = False
if self.augment:
add_augment = utils.random_onoff()
(features, dot_len, real_features_len, sr) = utils.spect_loader(features_path, max_len=101, augment=add_au... | def __getitem__(self, idx):
'\n :param idx:\n :return:\n '
features_path = self.data[idx][0]
add_augment = False
if self.augment:
add_augment = utils.random_onoff()
(features, dot_len, real_features_len, sr) = utils.spect_loader(features_path, max_len=101, augment=add_au... |
b71335bbad624951a0b6757bf15e0ecd2d1cbf4ebd02e5de403f832d60394d49 | def hIndex(self, citations):
'\n :type citations: List[int]\n :rtype: int\n '
n = len(citations)
(left, right) = (0, (n - 1))
while (left <= right):
mid = (left + ((right - left) / 2))
if (citations[mid] >= (n - mid)):
right = (mid - 1)
else:
... | :type citations: List[int]
:rtype: int | tools/leetcode.275.H-Index II/leetcode.275.H-Index II.submission1.py | hIndex | tedye/leetcode | 4 | python | def hIndex(self, citations):
'\n :type citations: List[int]\n :rtype: int\n '
n = len(citations)
(left, right) = (0, (n - 1))
while (left <= right):
mid = (left + ((right - left) / 2))
if (citations[mid] >= (n - mid)):
right = (mid - 1)
else:
... | def hIndex(self, citations):
'\n :type citations: List[int]\n :rtype: int\n '
n = len(citations)
(left, right) = (0, (n - 1))
while (left <= right):
mid = (left + ((right - left) / 2))
if (citations[mid] >= (n - mid)):
right = (mid - 1)
else:
... |
d240279e07d79914326ff5bc4417f2c7fa32f54eb5f39c1740e7f0eba3320d3a | def is_alien_sorted(self, a, x):
'\n Determines whether input strings follow specified lexographic order.\n\n :param list[str] a: input array of ordered strings\n :param str x: string representing target lexographic order\n :return: True if input array is sorted by target lexographic ord... | Determines whether input strings follow specified lexographic order.
:param list[str] a: input array of ordered strings
:param str x: string representing target lexographic order
:return: True if input array is sorted by target lexographic order
:rtype: bool | 0953_verifying_alien_dictionary/python_source.py | is_alien_sorted | arthurdysart/LeetCode | 0 | python | def is_alien_sorted(self, a, x):
'\n Determines whether input strings follow specified lexographic order.\n\n :param list[str] a: input array of ordered strings\n :param str x: string representing target lexographic order\n :return: True if input array is sorted by target lexographic ord... | def is_alien_sorted(self, a, x):
'\n Determines whether input strings follow specified lexographic order.\n\n :param list[str] a: input array of ordered strings\n :param str x: string representing target lexographic order\n :return: True if input array is sorted by target lexographic ord... |
8a4918fa56de7fc7952f0af094a56d509d17c7994152e56659752c54a5a213bd | def stdin(self, sys_stdin):
'\n Imports standard input.\n\n :param _io.TextIOWrapper sys_stdin: standard input\n :return: input array of ordered strings and target string\n :rtype: tup[list[str], str]\n '
inputs = [x.strip('[]"\n') for x in sys_stdin]
if (inputs[0] == ''):... | Imports standard input.
:param _io.TextIOWrapper sys_stdin: standard input
:return: input array of ordered strings and target string
:rtype: tup[list[str], str] | 0953_verifying_alien_dictionary/python_source.py | stdin | arthurdysart/LeetCode | 0 | python | def stdin(self, sys_stdin):
'\n Imports standard input.\n\n :param _io.TextIOWrapper sys_stdin: standard input\n :return: input array of ordered strings and target string\n :rtype: tup[list[str], str]\n '
inputs = [x.strip('[]"\n') for x in sys_stdin]
if (inputs[0] == ):
... | def stdin(self, sys_stdin):
'\n Imports standard input.\n\n :param _io.TextIOWrapper sys_stdin: standard input\n :return: input array of ordered strings and target string\n :rtype: tup[list[str], str]\n '
inputs = [x.strip('[]"\n') for x in sys_stdin]
if (inputs[0] == ):
... |
77d0f790ef6024adf98538666e66cf5336cfea9f80fe28bfc3b50a08c1e3a9fe | def test_empty_dag(self):
'Empty DAG has empty counts.'
circuit = QuantumCircuit()
dag = circuit_to_dag(circuit)
pass_ = CountOpsLongestPath()
_ = pass_.run(dag)
self.assertDictEqual(pass_.property_set['count_ops_longest_path'], {}) | Empty DAG has empty counts. | test/python/transpiler/test_count_ops_longest_path_pass.py | test_empty_dag | ikkoham/qiskit-core | 1,456 | python | def test_empty_dag(self):
circuit = QuantumCircuit()
dag = circuit_to_dag(circuit)
pass_ = CountOpsLongestPath()
_ = pass_.run(dag)
self.assertDictEqual(pass_.property_set['count_ops_longest_path'], {}) | def test_empty_dag(self):
circuit = QuantumCircuit()
dag = circuit_to_dag(circuit)
pass_ = CountOpsLongestPath()
_ = pass_.run(dag)
self.assertDictEqual(pass_.property_set['count_ops_longest_path'], {})<|docstring|>Empty DAG has empty counts.<|endoftext|> |
22ab0475905474e90ced6c8c5b7291ffb9ec334cf3604f96d37cf1819b9392d1 | def test_just_qubits(self):
'A dag with 9 operations (3 CXs, 2Xs, 2Ys and 2 Hs) on the longest\n path\n '
qr = QuantumRegister(2)
circuit = QuantumCircuit(qr)
circuit.cx(qr[0], qr[1])
circuit.x(qr[0])
circuit.y(qr[0])
circuit.h(qr[0])
circuit.cx(qr[0], qr[1])
circuit.x(... | A dag with 9 operations (3 CXs, 2Xs, 2Ys and 2 Hs) on the longest
path | test/python/transpiler/test_count_ops_longest_path_pass.py | test_just_qubits | ikkoham/qiskit-core | 1,456 | python | def test_just_qubits(self):
'A dag with 9 operations (3 CXs, 2Xs, 2Ys and 2 Hs) on the longest\n path\n '
qr = QuantumRegister(2)
circuit = QuantumCircuit(qr)
circuit.cx(qr[0], qr[1])
circuit.x(qr[0])
circuit.y(qr[0])
circuit.h(qr[0])
circuit.cx(qr[0], qr[1])
circuit.x(... | def test_just_qubits(self):
'A dag with 9 operations (3 CXs, 2Xs, 2Ys and 2 Hs) on the longest\n path\n '
qr = QuantumRegister(2)
circuit = QuantumCircuit(qr)
circuit.cx(qr[0], qr[1])
circuit.x(qr[0])
circuit.y(qr[0])
circuit.h(qr[0])
circuit.cx(qr[0], qr[1])
circuit.x(... |
82a1f146eaf101a08df80a614ffdd02e2a64a51ae7616d3478a392ea8c08ad80 | @staticmethod
def add_args(arg_parser: argparse.ArgumentParser) -> None:
"\n Override this to add arguments to the CLI argument parser. These args\n will show up when the user invokes ``libcst.tool codemod`` with\n ``--help``. They will also be presented to your class's ``__init__``\n me... | Override this to add arguments to the CLI argument parser. These args
will show up when the user invokes ``libcst.tool codemod`` with
``--help``. They will also be presented to your class's ``__init__``
method. So, if you define a command with an argument 'foo', you should also
have a corresponding 'foo' positional or ... | libcst/codemod/_command.py | add_args | Instagram/LibCST | 880 | python | @staticmethod
def add_args(arg_parser: argparse.ArgumentParser) -> None:
"\n Override this to add arguments to the CLI argument parser. These args\n will show up when the user invokes ``libcst.tool codemod`` with\n ``--help``. They will also be presented to your class's ``__init__``\n me... | @staticmethod
def add_args(arg_parser: argparse.ArgumentParser) -> None:
"\n Override this to add arguments to the CLI argument parser. These args\n will show up when the user invokes ``libcst.tool codemod`` with\n ``--help``. They will also be presented to your class's ``__init__``\n me... |
180f5fe5fb058f75111ecb2593a0ba537116919fc788ded2d7561772987014b8 | @abstractmethod
def transform_module_impl(self, tree: Module) -> Module:
'\n Override this with your transform. You should take in the tree, optionally\n mutate it and then return the mutated version. The module reference and all\n calculated metadata are available for the lifetime of this func... | Override this with your transform. You should take in the tree, optionally
mutate it and then return the mutated version. The module reference and all
calculated metadata are available for the lifetime of this function. | libcst/codemod/_command.py | transform_module_impl | Instagram/LibCST | 880 | python | @abstractmethod
def transform_module_impl(self, tree: Module) -> Module:
'\n Override this with your transform. You should take in the tree, optionally\n mutate it and then return the mutated version. The module reference and all\n calculated metadata are available for the lifetime of this func... | @abstractmethod
def transform_module_impl(self, tree: Module) -> Module:
'\n Override this with your transform. You should take in the tree, optionally\n mutate it and then return the mutated version. The module reference and all\n calculated metadata are available for the lifetime of this func... |
085b981ec8b43303f55ea9740aa6d6d6dabdcd498361d21424514019017cfe05 | @abstractmethod
def get_transforms(self) -> Generator[(Type[Codemod], None, None)]:
'\n A generator which yields one or more subclasses of\n :class:`~libcst.codemod.Codemod`. In the general case, you will usually\n yield a series of classes, but it is possible to programmatically decide\n ... | A generator which yields one or more subclasses of
:class:`~libcst.codemod.Codemod`. In the general case, you will usually
yield a series of classes, but it is possible to programmatically decide
which classes to yield depending on the contents of the context
:attr:`~libcst.codemod.CodemodContext.scratch`.
Note that y... | libcst/codemod/_command.py | get_transforms | Instagram/LibCST | 880 | python | @abstractmethod
def get_transforms(self) -> Generator[(Type[Codemod], None, None)]:
'\n A generator which yields one or more subclasses of\n :class:`~libcst.codemod.Codemod`. In the general case, you will usually\n yield a series of classes, but it is possible to programmatically decide\n ... | @abstractmethod
def get_transforms(self) -> Generator[(Type[Codemod], None, None)]:
'\n A generator which yields one or more subclasses of\n :class:`~libcst.codemod.Codemod`. In the general case, you will usually\n yield a series of classes, but it is possible to programmatically decide\n ... |
c4395fbe5ef6cc471595ca298803691eea6ed88bec1ab6db552f028ffe9e9705 | @app.http_get('/api/architectures')
@app.authenticated
async def get_architectures(request):
'\n Gets a list of all architectures from\n the database.\n\n ---\n description: Returns a list of architectures\n tags:\n - Architectures\n produces:\n - text/json\n responses:\n "... | Gets a list of all architectures from
the database.
---
description: Returns a list of architectures
tags:
- Architectures
produces:
- text/json
responses:
"200":
description: successful
"500":
description: internal server error | molior/api/architecture.py | get_architectures | randombenj/molior | 0 | python | @app.http_get('/api/architectures')
@app.authenticated
async def get_architectures(request):
'\n Gets a list of all architectures from\n the database.\n\n ---\n description: Returns a list of architectures\n tags:\n - Architectures\n produces:\n - text/json\n responses:\n "... | @app.http_get('/api/architectures')
@app.authenticated
async def get_architectures(request):
'\n Gets a list of all architectures from\n the database.\n\n ---\n description: Returns a list of architectures\n tags:\n - Architectures\n produces:\n - text/json\n responses:\n "... |
dcf375c490e7c5191f9b9da8cafa661abe6c9112b4a2b6d71f6a911ed708d6ad | def _showvid(video_name, from_frame=0):
'\n HELPER FUNCTION\n Navigate through video frame by frame from a certain frame.\n\n :param video_name: videopath\n :param from_frame: show vid from this frame\n :return: nothing\n '
cap = cv2.VideoCapture(str(video_name))
cap.set(1, from_frame)
... | HELPER FUNCTION
Navigate through video frame by frame from a certain frame.
:param video_name: videopath
:param from_frame: show vid from this frame
:return: nothing | PredictFeatures/OrientationLabeler.py | _showvid | Iglohut/autoscore_3d | 0 | python | def _showvid(video_name, from_frame=0):
'\n HELPER FUNCTION\n Navigate through video frame by frame from a certain frame.\n\n :param video_name: videopath\n :param from_frame: show vid from this frame\n :return: nothing\n '
cap = cv2.VideoCapture(str(video_name))
cap.set(1, from_frame)
... | def _showvid(video_name, from_frame=0):
'\n HELPER FUNCTION\n Navigate through video frame by frame from a certain frame.\n\n :param video_name: videopath\n :param from_frame: show vid from this frame\n :return: nothing\n '
cap = cv2.VideoCapture(str(video_name))
cap.set(1, from_frame)
... |
9e369e65be931b91d23a29a3edeff0c7c0a6096f6582921674fbd8d462592ad5 | def _vidlength(video_name):
'\n\n :param video_name: path to video\n :return: number of frames in video\n '
cap = cv2.VideoCapture(str(video_name))
property_id = int(cv2.CAP_PROP_FRAME_COUNT)
length = int(cv2.VideoCapture.get(cap, property_id))
return length | :param video_name: path to video
:return: number of frames in video | PredictFeatures/OrientationLabeler.py | _vidlength | Iglohut/autoscore_3d | 0 | python | def _vidlength(video_name):
'\n\n :param video_name: path to video\n :return: number of frames in video\n '
cap = cv2.VideoCapture(str(video_name))
property_id = int(cv2.CAP_PROP_FRAME_COUNT)
length = int(cv2.VideoCapture.get(cap, property_id))
return length | def _vidlength(video_name):
'\n\n :param video_name: path to video\n :return: number of frames in video\n '
cap = cv2.VideoCapture(str(video_name))
property_id = int(cv2.CAP_PROP_FRAME_COUNT)
length = int(cv2.VideoCapture.get(cap, property_id))
return length<|docstring|>:param video_name: p... |
dec98e363ba80c4fc077be997195ccf59efa8720611dcebb02e270464ee71a2c | def myKalman(measurements):
'\n This Kalman smoothes a timeseries of (x, y) coordinates for a single limb.\n :param measurements: coordinate tuple list [(x1, y1), ..., (xn, yx)]\n :return: kalman smoothed coordinates list: [[x]], [y]]\n '
initial_state_mean = [measurements[(0, 0)], 0, measurements[(... | This Kalman smoothes a timeseries of (x, y) coordinates for a single limb.
:param measurements: coordinate tuple list [(x1, y1), ..., (xn, yx)]
:return: kalman smoothed coordinates list: [[x]], [y]] | PredictFeatures/OrientationLabeler.py | myKalman | Iglohut/autoscore_3d | 0 | python | def myKalman(measurements):
'\n This Kalman smoothes a timeseries of (x, y) coordinates for a single limb.\n :param measurements: coordinate tuple list [(x1, y1), ..., (xn, yx)]\n :return: kalman smoothed coordinates list: [[x]], [y]]\n '
initial_state_mean = [measurements[(0, 0)], 0, measurements[(... | def myKalman(measurements):
'\n This Kalman smoothes a timeseries of (x, y) coordinates for a single limb.\n :param measurements: coordinate tuple list [(x1, y1), ..., (xn, yx)]\n :return: kalman smoothed coordinates list: [[x]], [y]]\n '
initial_state_mean = [measurements[(0, 0)], 0, measurements[(... |
2227b6f4d1fb6fc20d0ac56e3aec3cbd5e16b044cf89728da70b1d6b2d31048b | def kalman_df(df):
'\n Doe skalman smoothing on all bodyparts of df\n :param df: DataFrame with only bodyparts (no HD yet!)\n :return: smoothed df\n '
cols = df.columns.values.tolist()[1:]
cols = [col for col in cols if ('likelihood' not in col)]
for idx in range(0, len(cols), 2):
bo... | Doe skalman smoothing on all bodyparts of df
:param df: DataFrame with only bodyparts (no HD yet!)
:return: smoothed df | PredictFeatures/OrientationLabeler.py | kalman_df | Iglohut/autoscore_3d | 0 | python | def kalman_df(df):
'\n Doe skalman smoothing on all bodyparts of df\n :param df: DataFrame with only bodyparts (no HD yet!)\n :return: smoothed df\n '
cols = df.columns.values.tolist()[1:]
cols = [col for col in cols if ('likelihood' not in col)]
for idx in range(0, len(cols), 2):
bo... | def kalman_df(df):
'\n Doe skalman smoothing on all bodyparts of df\n :param df: DataFrame with only bodyparts (no HD yet!)\n :return: smoothed df\n '
cols = df.columns.values.tolist()[1:]
cols = [col for col in cols if ('likelihood' not in col)]
for idx in range(0, len(cols), 2):
bo... |
6203267fdea6a1c652fd9f304bc6a6b5893415fe605a68363695239b6c6db77b | @MAX_API.doc('predict')
@MAX_API.expect(input_parser)
def post(self):
'Generate audio embedding from input data'
result = {'status': 'error'}
true_start = time.time()
args = input_parser.parse_args()
if ((args['audio'] is None) and (args['url'] is None)):
e = BadRequest()
e.data = {'... | Generate audio embedding from input data | api/predict.py | post | dad9489/MAX-Audio-Embedding-Generator | 0 | python | @MAX_API.doc('predict')
@MAX_API.expect(input_parser)
def post(self):
result = {'status': 'error'}
true_start = time.time()
args = input_parser.parse_args()
if ((args['audio'] is None) and (args['url'] is None)):
e = BadRequest()
e.data = {'status': 'error', 'message': 'Need to prov... | @MAX_API.doc('predict')
@MAX_API.expect(input_parser)
def post(self):
result = {'status': 'error'}
true_start = time.time()
args = input_parser.parse_args()
if ((args['audio'] is None) and (args['url'] is None)):
e = BadRequest()
e.data = {'status': 'error', 'message': 'Need to prov... |
566995742683f5de5548e42f1f4836c041fad16e6bf20e877bc12523313fe440 | def __init__(self, laser_int):
"\n\t\tInitialize class. \n\t\t\n\t\tParameters\n\t\t----------\n\t\tlaser_int: str\n\t\t\tlaser intensity (in filename). e.g. `_0.5mW' \n\t\t\t\n\t\t"
self.dirs_to_plot = None
self.data = None
self.genotypes = None
self.laser_int = laser_int | Initialize class.
Parameters
----------
laser_int: str
laser intensity (in filename). e.g. `_0.5mW' | analysis/plot_fwd_pcts.py | __init__ | faymanns/Qbio_2018 | 0 | python | def __init__(self, laser_int):
"\n\t\tInitialize class. \n\t\t\n\t\tParameters\n\t\t----------\n\t\tlaser_int: str\n\t\t\tlaser intensity (in filename). e.g. `_0.5mW' \n\t\t\t\n\t\t"
self.dirs_to_plot = None
self.data = None
self.genotypes = None
self.laser_int = laser_int | def __init__(self, laser_int):
"\n\t\tInitialize class. \n\t\t\n\t\tParameters\n\t\t----------\n\t\tlaser_int: str\n\t\t\tlaser intensity (in filename). e.g. `_0.5mW' \n\t\t\t\n\t\t"
self.dirs_to_plot = None
self.data = None
self.genotypes = None
self.laser_int = laser_int<|docstring|>Initialize cla... |
7a1c493ccce05b259b9f49525928ef640133598a2b000d6b1cc3436ccfcff9e0 | def get_all_dirs(self, in_dir):
'\n\t\tGet all directories in the analysis output directory corresponding \n\t\tto the desired genotype. All directories containing genotype will\n\t\tbe appended to dirs_to_plot.\n\t\t\n\t\tParameters\n\t\t----------\n\t\tin_dir: str\n\t\t\tanalysis directory.\n\t\t\n\t\t'
if (n... | Get all directories in the analysis output directory corresponding
to the desired genotype. All directories containing genotype will
be appended to dirs_to_plot.
Parameters
----------
in_dir: str
analysis directory. | analysis/plot_fwd_pcts.py | get_all_dirs | faymanns/Qbio_2018 | 0 | python | def get_all_dirs(self, in_dir):
'\n\t\tGet all directories in the analysis output directory corresponding \n\t\tto the desired genotype. All directories containing genotype will\n\t\tbe appended to dirs_to_plot.\n\t\t\n\t\tParameters\n\t\t----------\n\t\tin_dir: str\n\t\t\tanalysis directory.\n\t\t\n\t\t'
if (n... | def get_all_dirs(self, in_dir):
'\n\t\tGet all directories in the analysis output directory corresponding \n\t\tto the desired genotype. All directories containing genotype will\n\t\tbe appended to dirs_to_plot.\n\t\t\n\t\tParameters\n\t\t----------\n\t\tin_dir: str\n\t\t\tanalysis directory.\n\t\t\n\t\t'
if (n... |
86de5e1aa6bdf8bc5a235a335d96e9d0d7f2894efa12f474c37040f070eb11a3 | def plot_pct_fwds(self):
'\n\t\tPlot the pct of forward motion for each genotype.\n\t\t'
Nn = len(self.dirs_to_plot)
for (iD, dir) in enumerate(self.dirs_to_plot):
filename = os.path.join(dir, 'pct_fwd.txt')
tmp_data = sp.loadtxt(filename)
if (self.data is None):
self.dat... | Plot the pct of forward motion for each genotype. | analysis/plot_fwd_pcts.py | plot_pct_fwds | faymanns/Qbio_2018 | 0 | python | def plot_pct_fwds(self):
'\n\t\t\n\t\t'
Nn = len(self.dirs_to_plot)
for (iD, dir) in enumerate(self.dirs_to_plot):
filename = os.path.join(dir, 'pct_fwd.txt')
tmp_data = sp.loadtxt(filename)
if (self.data is None):
self.data = sp.zeros((Nn, len(tmp_data)))
self.da... | def plot_pct_fwds(self):
'\n\t\t\n\t\t'
Nn = len(self.dirs_to_plot)
for (iD, dir) in enumerate(self.dirs_to_plot):
filename = os.path.join(dir, 'pct_fwd.txt')
tmp_data = sp.loadtxt(filename)
if (self.data is None):
self.data = sp.zeros((Nn, len(tmp_data)))
self.da... |
4a17b5feb45fdb8db3fecf5fd897c9f9e1b09e25004cf605a9f005a39897df04 | def save_data(self, in_dir):
'\n\t\tOutput fwd and bkwd percent averages and stds. \n\t\t\n\t\tParameters\n\t\t----------\n\t\tin_dir : str\n\t\t\tDirectory of where to save data / same as input directory.\n\t\t\n\t\t'
out_file = os.path.join(in_dir, '_centroid', ('pct_fwds%s.png' % self.laser_int))
plt.tig... | Output fwd and bkwd percent averages and stds.
Parameters
----------
in_dir : str
Directory of where to save data / same as input directory. | analysis/plot_fwd_pcts.py | save_data | faymanns/Qbio_2018 | 0 | python | def save_data(self, in_dir):
'\n\t\tOutput fwd and bkwd percent averages and stds. \n\t\t\n\t\tParameters\n\t\t----------\n\t\tin_dir : str\n\t\t\tDirectory of where to save data / same as input directory.\n\t\t\n\t\t'
out_file = os.path.join(in_dir, '_centroid', ('pct_fwds%s.png' % self.laser_int))
plt.tig... | def save_data(self, in_dir):
'\n\t\tOutput fwd and bkwd percent averages and stds. \n\t\t\n\t\tParameters\n\t\t----------\n\t\tin_dir : str\n\t\t\tDirectory of where to save data / same as input directory.\n\t\t\n\t\t'
out_file = os.path.join(in_dir, '_centroid', ('pct_fwds%s.png' % self.laser_int))
plt.tig... |
a3e4201dbb722285f9540dfa52030508336618feb630d5967a2b12fde0e50d91 | def load_test(tstfile):
'Load a test from file.\n\n This reads a test from a csv file.\n\n Parameters\n ----------\n tstfile : :class:`str`\n Path to the file\n '
try:
with zipfile.ZipFile(tstfile, 'r') as zfile:
info = TxtIO(zfile.open('info.csv'))
data = c... | Load a test from file.
This reads a test from a csv file.
Parameters
----------
tstfile : :class:`str`
Path to the file | welltestpy/data/testslib.py | load_test | kinverarity1/welltestpy | 2 | python | def load_test(tstfile):
'Load a test from file.\n\n This reads a test from a csv file.\n\n Parameters\n ----------\n tstfile : :class:`str`\n Path to the file\n '
try:
with zipfile.ZipFile(tstfile, 'r') as zfile:
info = TxtIO(zfile.open('info.csv'))
data = c... | def load_test(tstfile):
'Load a test from file.\n\n This reads a test from a csv file.\n\n Parameters\n ----------\n tstfile : :class:`str`\n Path to the file\n '
try:
with zipfile.ZipFile(tstfile, 'r') as zfile:
info = TxtIO(zfile.open('info.csv'))
data = c... |
c224e5dc5a0224e5f02c3af6d53d508f8705a013e292a8472f4e92475114325f | def _load_pumping_test(tstfile):
'Load a pumping test from file.\n\n This reads a pumping test from a csv file.\n\n Parameters\n ----------\n tstfile : :class:`str`\n Path to the file\n '
try:
with zipfile.ZipFile(tstfile, 'r') as zfile:
info = TxtIO(zfile.open('info.cs... | Load a pumping test from file.
This reads a pumping test from a csv file.
Parameters
----------
tstfile : :class:`str`
Path to the file | welltestpy/data/testslib.py | _load_pumping_test | kinverarity1/welltestpy | 2 | python | def _load_pumping_test(tstfile):
'Load a pumping test from file.\n\n This reads a pumping test from a csv file.\n\n Parameters\n ----------\n tstfile : :class:`str`\n Path to the file\n '
try:
with zipfile.ZipFile(tstfile, 'r') as zfile:
info = TxtIO(zfile.open('info.cs... | def _load_pumping_test(tstfile):
'Load a pumping test from file.\n\n This reads a pumping test from a csv file.\n\n Parameters\n ----------\n tstfile : :class:`str`\n Path to the file\n '
try:
with zipfile.ZipFile(tstfile, 'r') as zfile:
info = TxtIO(zfile.open('info.cs... |
fab1a3c2c8cb3b3cd725df62c63bae968f3032f896b9750b7935ba59a91de521 | @property
def testtype(self):
':class:`str`: String containing the test type'
return self._testtype | :class:`str`: String containing the test type | welltestpy/data/testslib.py | testtype | kinverarity1/welltestpy | 2 | python | @property
def testtype(self):
return self._testtype | @property
def testtype(self):
return self._testtype<|docstring|>:class:`str`: String containing the test type<|endoftext|> |
ca09f0967451fde4c69efe2576303327263db9621891c5a5a51cb85a52623886 | @property
def wells(self):
':class:`tuple` of :class:`str`: all well names'
tmp = list(self.__observations.keys())
tmp.append(self.pumpingwell)
return tuple(set(tmp)) | :class:`tuple` of :class:`str`: all well names | welltestpy/data/testslib.py | wells | kinverarity1/welltestpy | 2 | python | @property
def wells(self):
tmp = list(self.__observations.keys())
tmp.append(self.pumpingwell)
return tuple(set(tmp)) | @property
def wells(self):
tmp = list(self.__observations.keys())
tmp.append(self.pumpingwell)
return tuple(set(tmp))<|docstring|>:class:`tuple` of :class:`str`: all well names<|endoftext|> |
a8bdf55ac8df6b50afdbdc9b43d7d5cd409b0d3bbaf06312f14152081ad38add | @property
def pumpingrate(self):
':class:`float`: pumping rate at the pumping well'
return self._pumpingrate.value | :class:`float`: pumping rate at the pumping well | welltestpy/data/testslib.py | pumpingrate | kinverarity1/welltestpy | 2 | python | @property
def pumpingrate(self):
return self._pumpingrate.value | @property
def pumpingrate(self):
return self._pumpingrate.value<|docstring|>:class:`float`: pumping rate at the pumping well<|endoftext|> |
fb7212229268e3a199810db49e0bf9143a6f55b60576c9d144d334cf0e723d41 | @property
def aquiferdepth(self):
':class:`float`: aquifer depth at the field site'
return self._aquiferdepth.value | :class:`float`: aquifer depth at the field site | welltestpy/data/testslib.py | aquiferdepth | kinverarity1/welltestpy | 2 | python | @property
def aquiferdepth(self):
return self._aquiferdepth.value | @property
def aquiferdepth(self):
return self._aquiferdepth.value<|docstring|>:class:`float`: aquifer depth at the field site<|endoftext|> |
590e85b2ed67637e8c6832bde79e60cbc6d27f5f01cdce17dce447ecd4010bca | @property
def aquiferradius(self):
':class:`float`: aquifer radius at the field site'
return self._aquiferradius.value | :class:`float`: aquifer radius at the field site | welltestpy/data/testslib.py | aquiferradius | kinverarity1/welltestpy | 2 | python | @property
def aquiferradius(self):
return self._aquiferradius.value | @property
def aquiferradius(self):
return self._aquiferradius.value<|docstring|>:class:`float`: aquifer radius at the field site<|endoftext|> |
682b0e58f04a2e5ae333f66ea5755226b70f4b6399ace49c36a7b1cf574d4aef | @property
def observations(self):
':class:`dict`: observations made at the field site'
return self.__observations | :class:`dict`: observations made at the field site | welltestpy/data/testslib.py | observations | kinverarity1/welltestpy | 2 | python | @property
def observations(self):
return self.__observations | @property
def observations(self):
return self.__observations<|docstring|>:class:`dict`: observations made at the field site<|endoftext|> |
f2c67e29e9f682b617f1ae9a2200a9cc844e640e5c030365758795579d6bbbcb | def add_steady_obs(self, well, observation, description='Steady State Drawdown observation'):
'\n Add steady drawdown observations.\n\n Parameters\n ----------\n well : :class:`str`\n well where the observation is made.\n observation : :class:`Variable`\n Obs... | Add steady drawdown observations.
Parameters
----------
well : :class:`str`
well where the observation is made.
observation : :class:`Variable`
Observation.
description : :class:`str`, optional
Description of the Variable. Default: ``"Steady observation"`` | welltestpy/data/testslib.py | add_steady_obs | kinverarity1/welltestpy | 2 | python | def add_steady_obs(self, well, observation, description='Steady State Drawdown observation'):
'\n Add steady drawdown observations.\n\n Parameters\n ----------\n well : :class:`str`\n well where the observation is made.\n observation : :class:`Variable`\n Obs... | def add_steady_obs(self, well, observation, description='Steady State Drawdown observation'):
'\n Add steady drawdown observations.\n\n Parameters\n ----------\n well : :class:`str`\n well where the observation is made.\n observation : :class:`Variable`\n Obs... |
4d5a57c2170e6666867fa19c14cdca83e4fd48717fde30c08659b7e6d9bb1f4f | def add_transient_obs(self, well, time, observation, description='Transient Drawdown observation'):
'\n Add transient drawdown observations.\n\n Parameters\n ----------\n well : :class:`str`\n well where the observation is made.\n time : :class:`Variable`\n T... | Add transient drawdown observations.
Parameters
----------
well : :class:`str`
well where the observation is made.
time : :class:`Variable`
Time points of observation.
observation : :class:`Variable`
Observation.
description : :class:`str`, optional
Description of the Variable. Default: ``"Drawdown obs... | welltestpy/data/testslib.py | add_transient_obs | kinverarity1/welltestpy | 2 | python | def add_transient_obs(self, well, time, observation, description='Transient Drawdown observation'):
'\n Add transient drawdown observations.\n\n Parameters\n ----------\n well : :class:`str`\n well where the observation is made.\n time : :class:`Variable`\n T... | def add_transient_obs(self, well, time, observation, description='Transient Drawdown observation'):
'\n Add transient drawdown observations.\n\n Parameters\n ----------\n well : :class:`str`\n well where the observation is made.\n time : :class:`Variable`\n T... |
3d18a563517c283907a0a2809b5e7cb7019f91fde132f0a1aad08816b30ad12e | def addobservations(self, obs):
'Add some specified observations.\n\n This will add observations to the pumping test.\n\n Parameters\n ----------\n obs : :class:`dict`\n Observations to be added.\n '
if isinstance(obs, dict):
for k in obs:
if (no... | Add some specified observations.
This will add observations to the pumping test.
Parameters
----------
obs : :class:`dict`
Observations to be added. | welltestpy/data/testslib.py | addobservations | kinverarity1/welltestpy | 2 | python | def addobservations(self, obs):
'Add some specified observations.\n\n This will add observations to the pumping test.\n\n Parameters\n ----------\n obs : :class:`dict`\n Observations to be added.\n '
if isinstance(obs, dict):
for k in obs:
if (no... | def addobservations(self, obs):
'Add some specified observations.\n\n This will add observations to the pumping test.\n\n Parameters\n ----------\n obs : :class:`dict`\n Observations to be added.\n '
if isinstance(obs, dict):
for k in obs:
if (no... |
f818f8f7b7d65db37976e8e70aabc6f381176edd1b2778881b3a8092cbe5184d | def delobservations(self, obs):
'Delete some specified observations.\n\n This will delete observations from the pumping test. You can give a\n list of observations or a single observation by name.\n\n Parameters\n ----------\n obs : :class:`list` of :class:`str` or :class:`str`\n ... | Delete some specified observations.
This will delete observations from the pumping test. You can give a
list of observations or a single observation by name.
Parameters
----------
obs : :class:`list` of :class:`str` or :class:`str`
Observations to be deleted. | welltestpy/data/testslib.py | delobservations | kinverarity1/welltestpy | 2 | python | def delobservations(self, obs):
'Delete some specified observations.\n\n This will delete observations from the pumping test. You can give a\n list of observations or a single observation by name.\n\n Parameters\n ----------\n obs : :class:`list` of :class:`str` or :class:`str`\n ... | def delobservations(self, obs):
'Delete some specified observations.\n\n This will delete observations from the pumping test. You can give a\n list of observations or a single observation by name.\n\n Parameters\n ----------\n obs : :class:`list` of :class:`str` or :class:`str`\n ... |
ccc554dfb8b981269ec483fa5406778027d6b630ac5d007a26aa080388b7dcb9 | def _addplot(self, plt_ax, wells, exclude=None):
'Generate a plot of the pumping test.\n\n This will plot the pumping test on the given figure axes.\n\n Parameters\n ----------\n ax : :class:`Axes`\n Axes where the plot should be done.\n wells : :class:`dict`\n ... | Generate a plot of the pumping test.
This will plot the pumping test on the given figure axes.
Parameters
----------
ax : :class:`Axes`
Axes where the plot should be done.
wells : :class:`dict`
Dictonary containing the well classes sorted by name.
exclude: :class:`list`, optional
List of wells that should... | welltestpy/data/testslib.py | _addplot | kinverarity1/welltestpy | 2 | python | def _addplot(self, plt_ax, wells, exclude=None):
'Generate a plot of the pumping test.\n\n This will plot the pumping test on the given figure axes.\n\n Parameters\n ----------\n ax : :class:`Axes`\n Axes where the plot should be done.\n wells : :class:`dict`\n ... | def _addplot(self, plt_ax, wells, exclude=None):
'Generate a plot of the pumping test.\n\n This will plot the pumping test on the given figure axes.\n\n Parameters\n ----------\n ax : :class:`Axes`\n Axes where the plot should be done.\n wells : :class:`dict`\n ... |
1f2c27d7bab3679f065cd99372781dce9862c66454b0984ee1538b0f45fb204e | def save(self, path='', name=None):
'Save a pumping test to file.\n\n This writes the variable to a csv file.\n\n Parameters\n ----------\n path : :class:`str`, optional\n Path where the variable should be saved. Default: ``""``\n name : :class:`str`, optional\n ... | Save a pumping test to file.
This writes the variable to a csv file.
Parameters
----------
path : :class:`str`, optional
Path where the variable should be saved. Default: ``""``
name : :class:`str`, optional
Name of the file. If ``None``, the name will be generated by
``"Test_"+name``. Default: ``None``
... | welltestpy/data/testslib.py | save | kinverarity1/welltestpy | 2 | python | def save(self, path=, name=None):
'Save a pumping test to file.\n\n This writes the variable to a csv file.\n\n Parameters\n ----------\n path : :class:`str`, optional\n Path where the variable should be saved. Default: ````\n name : :class:`str`, optional\n ... | def save(self, path=, name=None):
'Save a pumping test to file.\n\n This writes the variable to a csv file.\n\n Parameters\n ----------\n path : :class:`str`, optional\n Path where the variable should be saved. Default: ````\n name : :class:`str`, optional\n ... |
96c7322beb5d8ab3fbcfff7907ea73f68352abd03abf88acd321bcb8ec011125 | def __init__(self):
' Initialization '
self._headers = {} | Initialization | wtf/app/response.py | __init__ | ndparker/wtf | 1 | python | def __init__(self):
' '
self._headers = {} | def __init__(self):
' '
self._headers = {}<|docstring|>Initialization<|endoftext|> |
9d0e3b504d397a82ccf39671a8b54bc550ed0933b2548ad66a369f6e7c93ee34 | def __contains__(self, name):
'\n Check if header is already set\n\n :Parameters:\n - `name`: Header name\n\n :Types:\n - `name`: ``str``\n\n :return: Does the header already exist?\n :rtype: ``bool``\n '
return (name.lower() in self._headers) | Check if header is already set
:Parameters:
- `name`: Header name
:Types:
- `name`: ``str``
:return: Does the header already exist?
:rtype: ``bool`` | wtf/app/response.py | __contains__ | ndparker/wtf | 1 | python | def __contains__(self, name):
'\n Check if header is already set\n\n :Parameters:\n - `name`: Header name\n\n :Types:\n - `name`: ``str``\n\n :return: Does the header already exist?\n :rtype: ``bool``\n '
return (name.lower() in self._headers) | def __contains__(self, name):
'\n Check if header is already set\n\n :Parameters:\n - `name`: Header name\n\n :Types:\n - `name`: ``str``\n\n :return: Does the header already exist?\n :rtype: ``bool``\n '
return (name.lower() in self._headers)<|docstring... |
7995a790dce5ff563348b1458f481dca9267036836b51117aaec0e6eefaab52e | def __iter__(self):
' Header tuple iterator '
for (name, values) in self._headers.iteritems():
for value in values:
(yield (name, value)) | Header tuple iterator | wtf/app/response.py | __iter__ | ndparker/wtf | 1 | python | def __iter__(self):
' '
for (name, values) in self._headers.iteritems():
for value in values:
(yield (name, value)) | def __iter__(self):
' '
for (name, values) in self._headers.iteritems():
for value in values:
(yield (name, value))<|docstring|>Header tuple iterator<|endoftext|> |
2de996f8326151a6c59ebc99a0dd35b53d2a7705e3a428841c666b7f26fda7cb | def get(self, name):
'\n Determine the value list of a header\n\n :Parameters:\n - `name`: The header name\n\n :Types:\n - `name`: ``str``\n\n :return: The value list or ``None``\n :rtype: ``list``\n '
return self._headers.get(name.lower()) | Determine the value list of a header
:Parameters:
- `name`: The header name
:Types:
- `name`: ``str``
:return: The value list or ``None``
:rtype: ``list`` | wtf/app/response.py | get | ndparker/wtf | 1 | python | def get(self, name):
'\n Determine the value list of a header\n\n :Parameters:\n - `name`: The header name\n\n :Types:\n - `name`: ``str``\n\n :return: The value list or ``None``\n :rtype: ``list``\n '
return self._headers.get(name.lower()) | def get(self, name):
'\n Determine the value list of a header\n\n :Parameters:\n - `name`: The header name\n\n :Types:\n - `name`: ``str``\n\n :return: The value list or ``None``\n :rtype: ``list``\n '
return self._headers.get(name.lower())<|docstring|>D... |
6f8da64a055ed8e25447a16c80ceed25091bb06c9fc5166f06a12833688c750f | def set(self, name, *values):
"\n Set a header, replacing any same-named header previously set\n\n :Parameters:\n - `name`: The header name\n - `values`: List of values (``('value', ...)``)\n\n :Types:\n - `name`: ``str``\n - `values`: ``tuple``\n "
se... | Set a header, replacing any same-named header previously set
:Parameters:
- `name`: The header name
- `values`: List of values (``('value', ...)``)
:Types:
- `name`: ``str``
- `values`: ``tuple`` | wtf/app/response.py | set | ndparker/wtf | 1 | python | def set(self, name, *values):
"\n Set a header, replacing any same-named header previously set\n\n :Parameters:\n - `name`: The header name\n - `values`: List of values (``('value', ...)``)\n\n :Types:\n - `name`: ``str``\n - `values`: ``tuple``\n "
se... | def set(self, name, *values):
"\n Set a header, replacing any same-named header previously set\n\n :Parameters:\n - `name`: The header name\n - `values`: List of values (``('value', ...)``)\n\n :Types:\n - `name`: ``str``\n - `values`: ``tuple``\n "
se... |
b60b124e21e7b50ce2550d357190308dc55b73ac403a9468b9f8778a6e1f58cf | def add(self, name, *values):
"\n Add a value list to a header\n\n The old values are preserved\n\n :Parameters:\n - `name`: Header name\n - `values`: Values to add (``('value', ...)``)\n\n :Types:\n - `name`: ``str``\n - `values`: ``tuple``\n "
... | Add a value list to a header
The old values are preserved
:Parameters:
- `name`: Header name
- `values`: Values to add (``('value', ...)``)
:Types:
- `name`: ``str``
- `values`: ``tuple`` | wtf/app/response.py | add | ndparker/wtf | 1 | python | def add(self, name, *values):
"\n Add a value list to a header\n\n The old values are preserved\n\n :Parameters:\n - `name`: Header name\n - `values`: Values to add (``('value', ...)``)\n\n :Types:\n - `name`: ``str``\n - `values`: ``tuple``\n "
... | def add(self, name, *values):
"\n Add a value list to a header\n\n The old values are preserved\n\n :Parameters:\n - `name`: Header name\n - `values`: Values to add (``('value', ...)``)\n\n :Types:\n - `name`: ``str``\n - `values`: ``tuple``\n "
... |
a98c5f43d93908c32a1c86344580910ee8d1c0df547b5f692f6733a3b6956ed9 | def remove(self, name, value=None):
'\n Remove a header by name (plus optionally by value)\n\n If the header does not exist alrady, it is not an error.\n\n :Parameters:\n - `name`: Header name\n - `value`: Particular value to remove\n\n :Types:\n - `name`: ``str``... | Remove a header by name (plus optionally by value)
If the header does not exist alrady, it is not an error.
:Parameters:
- `name`: Header name
- `value`: Particular value to remove
:Types:
- `name`: ``str``
- `value`: ``str`` | wtf/app/response.py | remove | ndparker/wtf | 1 | python | def remove(self, name, value=None):
'\n Remove a header by name (plus optionally by value)\n\n If the header does not exist alrady, it is not an error.\n\n :Parameters:\n - `name`: Header name\n - `value`: Particular value to remove\n\n :Types:\n - `name`: ``str``... | def remove(self, name, value=None):
'\n Remove a header by name (plus optionally by value)\n\n If the header does not exist alrady, it is not an error.\n\n :Parameters:\n - `name`: Header name\n - `value`: Particular value to remove\n\n :Types:\n - `name`: ``str``... |
6550ebffe6eab4d2d299ea9a2477bafaf3e67d5a101aeb2074488e0e5af9adf0 | def __init__(self, request, start_response):
'\n Initialization\n\n :Parameters:\n - `request`: Request object\n - `start_response`: WSGI start_response callable\n\n :Types:\n - `request`: `wtf.app.request.Request`\n - `start_response`: ``callable``\n '
... | Initialization
:Parameters:
- `request`: Request object
- `start_response`: WSGI start_response callable
:Types:
- `request`: `wtf.app.request.Request`
- `start_response`: ``callable`` | wtf/app/response.py | __init__ | ndparker/wtf | 1 | python | def __init__(self, request, start_response):
'\n Initialization\n\n :Parameters:\n - `request`: Request object\n - `start_response`: WSGI start_response callable\n\n :Types:\n - `request`: `wtf.app.request.Request`\n - `start_response`: ``callable``\n '
... | def __init__(self, request, start_response):
'\n Initialization\n\n :Parameters:\n - `request`: Request object\n - `start_response`: WSGI start_response callable\n\n :Types:\n - `request`: `wtf.app.request.Request`\n - `start_response`: ``callable``\n '
... |
41bfb06f6c58f66debd5e95f3f4deedbad1d4dfbb48646a2ad3995ffa7122ac9 | def __getattr__(self, name):
"\n Resolve unknown attributes\n\n We're looking for special env variables inserted by the middleware\n stack: ``wtf.response.<name>``. These are expected to be factories,\n which are lazily initialized with the response object and return\n the actual ... | Resolve unknown attributes
We're looking for special env variables inserted by the middleware
stack: ``wtf.response.<name>``. These are expected to be factories,
which are lazily initialized with the response object and return
the actual attribute, which is cached in the response object for
further use.
:Parameters:
... | wtf/app/response.py | __getattr__ | ndparker/wtf | 1 | python | def __getattr__(self, name):
"\n Resolve unknown attributes\n\n We're looking for special env variables inserted by the middleware\n stack: ``wtf.response.<name>``. These are expected to be factories,\n which are lazily initialized with the response object and return\n the actual ... | def __getattr__(self, name):
"\n Resolve unknown attributes\n\n We're looking for special env variables inserted by the middleware\n stack: ``wtf.response.<name>``. These are expected to be factories,\n which are lazily initialized with the response object and return\n the actual ... |
60c2a5838db4b4ff470fdb067f90d9ae9b041bc2937c92862ffe48167a993e6a | def status(self, status=None, reason=None):
"\n Set/get response status\n\n :Parameters:\n - `status`: Response status code\n - `reason`: Reason phrase\n\n :Types:\n - `status`: ``int``\n - `reason`: ``str``\n\n :return: Tuple of previous status and reason... | Set/get response status
:Parameters:
- `status`: Response status code
- `reason`: Reason phrase
:Types:
- `status`: ``int``
- `reason`: ``str``
:return: Tuple of previous status and reason phrase
(``(int, 'reason')``)
:rtype: ``tuple`` | wtf/app/response.py | status | ndparker/wtf | 1 | python | def status(self, status=None, reason=None):
"\n Set/get response status\n\n :Parameters:\n - `status`: Response status code\n - `reason`: Reason phrase\n\n :Types:\n - `status`: ``int``\n - `reason`: ``str``\n\n :return: Tuple of previous status and reason... | def status(self, status=None, reason=None):
"\n Set/get response status\n\n :Parameters:\n - `status`: Response status code\n - `reason`: Reason phrase\n\n :Types:\n - `status`: ``int``\n - `reason`: ``str``\n\n :return: Tuple of previous status and reason... |
74acc9f0902a3d93638e018df84884a0acd7e32070fa5a7398bb64b02879386f | def cookie(self, name, value, path='/', expires=None, max_age=None, domain=None, secure=None, comment=None, version=None, codec=None):
'\n Set response cookie\n\n :Parameters:\n - `name`: Cookie name\n - `value`: Cookie value (if a codec is given, the type should be\n applica... | Set response cookie
:Parameters:
- `name`: Cookie name
- `value`: Cookie value (if a codec is given, the type should be
applicable for the codec encoder).
- `path`: Valid URL base path for the cookie. It should always be set
to a reasonable path (at least ``/``), otherwise the cookie will
only be valid for... | wtf/app/response.py | cookie | ndparker/wtf | 1 | python | def cookie(self, name, value, path='/', expires=None, max_age=None, domain=None, secure=None, comment=None, version=None, codec=None):
'\n Set response cookie\n\n :Parameters:\n - `name`: Cookie name\n - `value`: Cookie value (if a codec is given, the type should be\n applica... | def cookie(self, name, value, path='/', expires=None, max_age=None, domain=None, secure=None, comment=None, version=None, codec=None):
'\n Set response cookie\n\n :Parameters:\n - `name`: Cookie name\n - `value`: Cookie value (if a codec is given, the type should be\n applica... |
6486355a8054dac6c69eaa5df8deef458106bec128bfbab80581d0f588bdf7f7 | def content_type(self, ctype=None, charset=None):
'\n Set/get response content type\n\n :Parameters:\n - `ctype`: Content-Type\n - `charset`: Charset\n\n :Types:\n - `ctype`: ``str``\n - `charset`: ``str``\n\n :return: Full previous content type header (ma... | Set/get response content type
:Parameters:
- `ctype`: Content-Type
- `charset`: Charset
:Types:
- `ctype`: ``str``
- `charset`: ``str``
:return: Full previous content type header (maybe ``None``)
:rtype: ``str`` | wtf/app/response.py | content_type | ndparker/wtf | 1 | python | def content_type(self, ctype=None, charset=None):
'\n Set/get response content type\n\n :Parameters:\n - `ctype`: Content-Type\n - `charset`: Charset\n\n :Types:\n - `ctype`: ``str``\n - `charset`: ``str``\n\n :return: Full previous content type header (ma... | def content_type(self, ctype=None, charset=None):
'\n Set/get response content type\n\n :Parameters:\n - `ctype`: Content-Type\n - `charset`: Charset\n\n :Types:\n - `ctype`: ``str``\n - `charset`: ``str``\n\n :return: Full previous content type header (ma... |
b975b346cf9fbcb4ec537f7a3b53bb405f9dba842bc31099401995bf5dfb0f64 | def content_length(self, length):
'\n Add content length information\n\n :Parameters:\n - `length`: The expected length in octets\n\n :Types:\n - `length`: ``int``\n '
self.headers.set('Content-Length', str(length)) | Add content length information
:Parameters:
- `length`: The expected length in octets
:Types:
- `length`: ``int`` | wtf/app/response.py | content_length | ndparker/wtf | 1 | python | def content_length(self, length):
'\n Add content length information\n\n :Parameters:\n - `length`: The expected length in octets\n\n :Types:\n - `length`: ``int``\n '
self.headers.set('Content-Length', str(length)) | def content_length(self, length):
'\n Add content length information\n\n :Parameters:\n - `length`: The expected length in octets\n\n :Types:\n - `length`: ``int``\n '
self.headers.set('Content-Length', str(length))<|docstring|>Add content length information
:Paramet... |
00233f77471deaa97827af77026f5c9a4c39776399b6b21f5ad6a52a35030fcb | def last_modified(self, last_modified):
'\n Add last-modified information\n\n :Parameters:\n - `last_modified`: Last modification date (UTC)\n\n :Types:\n - `last_modified`: ``datetime.datetime``\n '
self.headers.set('Last-Modified', _httputil.make_date(last_modified)... | Add last-modified information
:Parameters:
- `last_modified`: Last modification date (UTC)
:Types:
- `last_modified`: ``datetime.datetime`` | wtf/app/response.py | last_modified | ndparker/wtf | 1 | python | def last_modified(self, last_modified):
'\n Add last-modified information\n\n :Parameters:\n - `last_modified`: Last modification date (UTC)\n\n :Types:\n - `last_modified`: ``datetime.datetime``\n '
self.headers.set('Last-Modified', _httputil.make_date(last_modified)... | def last_modified(self, last_modified):
'\n Add last-modified information\n\n :Parameters:\n - `last_modified`: Last modification date (UTC)\n\n :Types:\n - `last_modified`: ``datetime.datetime``\n '
self.headers.set('Last-Modified', _httputil.make_date(last_modified)... |
bb29fbd1736fe2029b44c51a44397e4689e5300bfb096f154aa650fa707ebd70 | def cache(self, expiry, audience=None):
'\n Add cache information\n\n :Parameters:\n - `expiry`: Expiry time in seconds from now\n - `audience`: Caching audience; ``private`` or ``public``\n\n :Types:\n - `expiry`: ``int``\n - `audience`: ``str``\n '
e... | Add cache information
:Parameters:
- `expiry`: Expiry time in seconds from now
- `audience`: Caching audience; ``private`` or ``public``
:Types:
- `expiry`: ``int``
- `audience`: ``str`` | wtf/app/response.py | cache | ndparker/wtf | 1 | python | def cache(self, expiry, audience=None):
'\n Add cache information\n\n :Parameters:\n - `expiry`: Expiry time in seconds from now\n - `audience`: Caching audience; ``private`` or ``public``\n\n :Types:\n - `expiry`: ``int``\n - `audience`: ``str``\n '
e... | def cache(self, expiry, audience=None):
'\n Add cache information\n\n :Parameters:\n - `expiry`: Expiry time in seconds from now\n - `audience`: Caching audience; ``private`` or ``public``\n\n :Types:\n - `expiry`: ``int``\n - `audience`: ``str``\n '
e... |
bb552e0c4c10c0dec5c7604644ab6c09c5a30df1737b7aa061f9dc7fe0386275 | def raise_error(self, status, **param):
'\n Raise an HTTP error\n\n :Parameters:\n - `status`: Status code\n - `param`: Additional parameters for the accompanying class in\n `http_response`. The request object is passed automagically.\n\n :Types:\n - `status`: ... | Raise an HTTP error
:Parameters:
- `status`: Status code
- `param`: Additional parameters for the accompanying class in
`http_response`. The request object is passed automagically.
:Types:
- `status`: ``int``
- `param`: ``dict``
:Exceptions:
- `KeyError`: The status code is not available
- `HTTPResponse`: T... | wtf/app/response.py | raise_error | ndparker/wtf | 1 | python | def raise_error(self, status, **param):
'\n Raise an HTTP error\n\n :Parameters:\n - `status`: Status code\n - `param`: Additional parameters for the accompanying class in\n `http_response`. The request object is passed automagically.\n\n :Types:\n - `status`: ... | def raise_error(self, status, **param):
'\n Raise an HTTP error\n\n :Parameters:\n - `status`: Status code\n - `param`: Additional parameters for the accompanying class in\n `http_response`. The request object is passed automagically.\n\n :Types:\n - `status`: ... |
38fa2df410bfe3ef949c9f693a5408c1a5202c81bbc45e9b06ca2c7b11c04123 | def raise_redirect(self, location, status=302):
'\n Raise HTTP redirect\n\n :Parameters:\n - `location`: URL to redirect to\n - `status`: Response code\n\n :Types:\n - `location`: ``str``\n - `status`: ``int``\n\n :Exceptions:\n - `http.HTTPRedirec... | Raise HTTP redirect
:Parameters:
- `location`: URL to redirect to
- `status`: Response code
:Types:
- `location`: ``str``
- `status`: ``int``
:Exceptions:
- `http.HTTPRedirectResponse`: The redirect exception | wtf/app/response.py | raise_redirect | ndparker/wtf | 1 | python | def raise_redirect(self, location, status=302):
'\n Raise HTTP redirect\n\n :Parameters:\n - `location`: URL to redirect to\n - `status`: Response code\n\n :Types:\n - `location`: ``str``\n - `status`: ``int``\n\n :Exceptions:\n - `http.HTTPRedirec... | def raise_redirect(self, location, status=302):
'\n Raise HTTP redirect\n\n :Parameters:\n - `location`: URL to redirect to\n - `status`: Response code\n\n :Types:\n - `location`: ``str``\n - `status`: ``int``\n\n :Exceptions:\n - `http.HTTPRedirec... |
5f6aecdf910b2674ddb6bfaea5669c8df48ea89ee9c59feb2f0fcb74c58aadb7 | def raise_basic_auth(self, realm, message=None):
'\n Raise a 401 error for HTTP Basic authentication\n\n :Parameters:\n - `realm`: The realm to authenticate\n - `message`: Optional default overriding message\n\n :Types:\n - `realm`: ``str``\n - `message`: ``str``... | Raise a 401 error for HTTP Basic authentication
:Parameters:
- `realm`: The realm to authenticate
- `message`: Optional default overriding message
:Types:
- `realm`: ``str``
- `message`: ``str``
:Exceptions:
- `http.AuthorizationRequired`: The 401 exception | wtf/app/response.py | raise_basic_auth | ndparker/wtf | 1 | python | def raise_basic_auth(self, realm, message=None):
'\n Raise a 401 error for HTTP Basic authentication\n\n :Parameters:\n - `realm`: The realm to authenticate\n - `message`: Optional default overriding message\n\n :Types:\n - `realm`: ``str``\n - `message`: ``str``... | def raise_basic_auth(self, realm, message=None):
'\n Raise a 401 error for HTTP Basic authentication\n\n :Parameters:\n - `realm`: The realm to authenticate\n - `message`: Optional default overriding message\n\n :Types:\n - `realm`: ``str``\n - `message`: ``str``... |
4399788d10ed577e07442c3f70ee0a7f55d1f227bcf5fdc0e677969a3cdfd8e2 | def first_write(towrite):
' First write flushes all '
if (self.write == first_write):
resp_code = ('%03d %s' % self._status)
headers = list(self.headers)
self.write = start_response(resp_code, headers)
return self.write(towrite) | First write flushes all | wtf/app/response.py | first_write | ndparker/wtf | 1 | python | def first_write(towrite):
' '
if (self.write == first_write):
resp_code = ('%03d %s' % self._status)
headers = list(self.headers)
self.write = start_response(resp_code, headers)
return self.write(towrite) | def first_write(towrite):
' '
if (self.write == first_write):
resp_code = ('%03d %s' % self._status)
headers = list(self.headers)
self.write = start_response(resp_code, headers)
return self.write(towrite)<|docstring|>First write flushes all<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.