hexsha stringlengths 40 40 | repo stringlengths 7 114 | path stringlengths 4 124 | license listlengths 1 9 | language stringclasses 1
value | identifier stringlengths 1 71 | return_type stringlengths 1 749 ⌀ | original_string stringlengths 76 22.7k | original_docstring stringlengths 16 7.61k | docstring stringlengths 16 2.47k | docstring_tokens listlengths 6 477 | code stringlengths 14 10.2k | code_tokens listlengths 6 996 | short_docstring stringlengths 2 644 | short_docstring_tokens listlengths 1 116 | comment listlengths 1 89 | parameters listlengths 0 64 | docstring_params dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ae38e848cb0a0d92d36a0e84af6020ec8de3a1e7 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/media/_inputs.py | [
"Apache-2.0"
] | Python | filter | pulumi.Input[Union[str, 'AttributeFilter']] | def filter(self) -> pulumi.Input[Union[str, 'AttributeFilter']]:
"""
The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.
"""
return pulumi.get(self, "filter") |
The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.
| The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks. | [
"The",
"type",
"of",
"AttributeFilter",
"to",
"apply",
"to",
"the",
"TrackAttribute",
"in",
"order",
"to",
"select",
"the",
"tracks",
"."
] | def filter(self) -> pulumi.Input[Union[str, 'AttributeFilter']]:
return pulumi.get(self, "filter") | [
"def",
"filter",
"(",
"self",
")",
"->",
"pulumi",
".",
"Input",
"[",
"Union",
"[",
"str",
",",
"'AttributeFilter'",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"filter\"",
")"
] | The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks. | [
"The",
"type",
"of",
"AttributeFilter",
"to",
"apply",
"to",
"the",
"TrackAttribute",
"in",
"order",
"to",
"select",
"the",
"tracks",
"."
] | [
"\"\"\"\n The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ae38e848cb0a0d92d36a0e84af6020ec8de3a1e7 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/media/_inputs.py | [
"Apache-2.0"
] | Python | filter_value | Optional[pulumi.Input[str]] | def filter_value(self) -> Optional[pulumi.Input[str]]:
"""
The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property.
"""
return pulumi.get(self, "filter_value") |
The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property.
| The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property. | [
"The",
"value",
"to",
"filter",
"the",
"tracks",
"by",
".",
"Only",
"used",
"when",
"AttributeFilter",
".",
"ValueEquals",
"is",
"specified",
"for",
"the",
"Filter",
"property",
"."
] | def filter_value(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "filter_value") | [
"def",
"filter_value",
"(",
"self",
")",
"->",
"Optional",
"[",
"pulumi",
".",
"Input",
"[",
"str",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"filter_value\"",
")"
] | The value to filter the tracks by. | [
"The",
"value",
"to",
"filter",
"the",
"tracks",
"by",
"."
] | [
"\"\"\"\n The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ae38e848cb0a0d92d36a0e84af6020ec8de3a1e7 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/media/_inputs.py | [
"Apache-2.0"
] | Python | codecs | pulumi.Input[Sequence[pulumi.Input[Union['AacAudioArgs', 'AudioArgs', 'CopyAudioArgs', 'CopyVideoArgs', 'H264VideoArgs', 'H265VideoArgs', 'ImageArgs', 'JpgImageArgs', 'PngImageArgs', 'VideoArgs']]]] | def codecs(self) -> pulumi.Input[Sequence[pulumi.Input[Union['AacAudioArgs', 'AudioArgs', 'CopyAudioArgs', 'CopyVideoArgs', 'H264VideoArgs', 'H265VideoArgs', 'ImageArgs', 'JpgImageArgs', 'PngImageArgs', 'VideoArgs']]]]:
"""
The list of codecs to be used when encoding the input video.
"""
... |
The list of codecs to be used when encoding the input video.
| The list of codecs to be used when encoding the input video. | [
"The",
"list",
"of",
"codecs",
"to",
"be",
"used",
"when",
"encoding",
"the",
"input",
"video",
"."
] | def codecs(self) -> pulumi.Input[Sequence[pulumi.Input[Union['AacAudioArgs', 'AudioArgs', 'CopyAudioArgs', 'CopyVideoArgs', 'H264VideoArgs', 'H265VideoArgs', 'ImageArgs', 'JpgImageArgs', 'PngImageArgs', 'VideoArgs']]]]:
return pulumi.get(self, "codecs") | [
"def",
"codecs",
"(",
"self",
")",
"->",
"pulumi",
".",
"Input",
"[",
"Sequence",
"[",
"pulumi",
".",
"Input",
"[",
"Union",
"[",
"'AacAudioArgs'",
",",
"'AudioArgs'",
",",
"'CopyAudioArgs'",
",",
"'CopyVideoArgs'",
",",
"'H264VideoArgs'",
",",
"'H265VideoArgs... | The list of codecs to be used when encoding the input video. | [
"The",
"list",
"of",
"codecs",
"to",
"be",
"used",
"when",
"encoding",
"the",
"input",
"video",
"."
] | [
"\"\"\"\n The list of codecs to be used when encoding the input video.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe6219cef8ed26128ff430960b94bf007ada5d50 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/network/v20190601/inbound_nat_rule.py | [
"Apache-2.0"
] | Python | enable_tcp_reset | pulumi.Output[Optional[bool]] | def enable_tcp_reset(self) -> pulumi.Output[Optional[bool]]:
"""
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
"""
return pulumi.get(self, "enable_tcp_reset") |
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
| Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. | [
"Receive",
"bidirectional",
"TCP",
"Reset",
"on",
"TCP",
"flow",
"idle",
"timeout",
"or",
"unexpected",
"connection",
"termination",
".",
"This",
"element",
"is",
"only",
"used",
"when",
"the",
"protocol",
"is",
"set",
"to",
"TCP",
"."
] | def enable_tcp_reset(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "enable_tcp_reset") | [
"def",
"enable_tcp_reset",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"bool",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"enable_tcp_reset\"",
")"
] | Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. | [
"Receive",
"bidirectional",
"TCP",
"Reset",
"on",
"TCP",
"flow",
"idle",
"timeout",
"or",
"unexpected",
"connection",
"termination",
"."
] | [
"\"\"\"\n Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe6918a05d870e1bcef1590e2aab9de8530f741f | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/network/v20190601/get_azure_firewall.py | [
"Apache-2.0"
] | Python | hub_ip_addresses | 'outputs.HubIPAddressesResponse' | def hub_ip_addresses(self) -> 'outputs.HubIPAddressesResponse':
"""
IP addresses associated with AzureFirewall.
"""
return pulumi.get(self, "hub_ip_addresses") |
IP addresses associated with AzureFirewall.
| IP addresses associated with AzureFirewall. | [
"IP",
"addresses",
"associated",
"with",
"AzureFirewall",
"."
] | def hub_ip_addresses(self) -> 'outputs.HubIPAddressesResponse':
return pulumi.get(self, "hub_ip_addresses") | [
"def",
"hub_ip_addresses",
"(",
"self",
")",
"->",
"'outputs.HubIPAddressesResponse'",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"hub_ip_addresses\"",
")"
] | IP addresses associated with AzureFirewall. | [
"IP",
"addresses",
"associated",
"with",
"AzureFirewall",
"."
] | [
"\"\"\"\n IP addresses associated with AzureFirewall.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe7de5e7f7d032d4929d223cc59bdbdd8ce8ed96 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/network/v20200401/get_hub_route_table.py | [
"Apache-2.0"
] | Python | associated_connections | Sequence[str] | def associated_connections(self) -> Sequence[str]:
"""
List of all connections associated with this route table.
"""
return pulumi.get(self, "associated_connections") |
List of all connections associated with this route table.
| List of all connections associated with this route table. | [
"List",
"of",
"all",
"connections",
"associated",
"with",
"this",
"route",
"table",
"."
] | def associated_connections(self) -> Sequence[str]:
return pulumi.get(self, "associated_connections") | [
"def",
"associated_connections",
"(",
"self",
")",
"->",
"Sequence",
"[",
"str",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"associated_connections\"",
")"
] | List of all connections associated with this route table. | [
"List",
"of",
"all",
"connections",
"associated",
"with",
"this",
"route",
"table",
"."
] | [
"\"\"\"\n List of all connections associated with this route table.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe7de5e7f7d032d4929d223cc59bdbdd8ce8ed96 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/network/v20200401/get_hub_route_table.py | [
"Apache-2.0"
] | Python | propagating_connections | Sequence[str] | def propagating_connections(self) -> Sequence[str]:
"""
List of all connections that advertise to this route table.
"""
return pulumi.get(self, "propagating_connections") |
List of all connections that advertise to this route table.
| List of all connections that advertise to this route table. | [
"List",
"of",
"all",
"connections",
"that",
"advertise",
"to",
"this",
"route",
"table",
"."
] | def propagating_connections(self) -> Sequence[str]:
return pulumi.get(self, "propagating_connections") | [
"def",
"propagating_connections",
"(",
"self",
")",
"->",
"Sequence",
"[",
"str",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"propagating_connections\"",
")"
] | List of all connections that advertise to this route table. | [
"List",
"of",
"all",
"connections",
"that",
"advertise",
"to",
"this",
"route",
"table",
"."
] | [
"\"\"\"\n List of all connections that advertise to this route table.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe866d4755c28ea0bc4a7b3d6312d8e27798db1c | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/automation/v20151031/schedule.py | [
"Apache-2.0"
] | Python | advanced_schedule | pulumi.Output[Optional['outputs.AdvancedScheduleResponse']] | def advanced_schedule(self) -> pulumi.Output[Optional['outputs.AdvancedScheduleResponse']]:
"""
Gets or sets the advanced schedule.
"""
return pulumi.get(self, "advanced_schedule") |
Gets or sets the advanced schedule.
| Gets or sets the advanced schedule. | [
"Gets",
"or",
"sets",
"the",
"advanced",
"schedule",
"."
] | def advanced_schedule(self) -> pulumi.Output[Optional['outputs.AdvancedScheduleResponse']]:
return pulumi.get(self, "advanced_schedule") | [
"def",
"advanced_schedule",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"'outputs.AdvancedScheduleResponse'",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"advanced_schedule\"",
")"
] | Gets or sets the advanced schedule. | [
"Gets",
"or",
"sets",
"the",
"advanced",
"schedule",
"."
] | [
"\"\"\"\n Gets or sets the advanced schedule.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe866d4755c28ea0bc4a7b3d6312d8e27798db1c | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/automation/v20151031/schedule.py | [
"Apache-2.0"
] | Python | expiry_time_offset_minutes | pulumi.Output[Optional[float]] | def expiry_time_offset_minutes(self) -> pulumi.Output[Optional[float]]:
"""
Gets or sets the expiry time's offset in minutes.
"""
return pulumi.get(self, "expiry_time_offset_minutes") |
Gets or sets the expiry time's offset in minutes.
| Gets or sets the expiry time's offset in minutes. | [
"Gets",
"or",
"sets",
"the",
"expiry",
"time",
"'",
"s",
"offset",
"in",
"minutes",
"."
] | def expiry_time_offset_minutes(self) -> pulumi.Output[Optional[float]]:
return pulumi.get(self, "expiry_time_offset_minutes") | [
"def",
"expiry_time_offset_minutes",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"float",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"expiry_time_offset_minutes\"",
")"
] | Gets or sets the expiry time's offset in minutes. | [
"Gets",
"or",
"sets",
"the",
"expiry",
"time",
"'",
"s",
"offset",
"in",
"minutes",
"."
] | [
"\"\"\"\n Gets or sets the expiry time's offset in minutes.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe866d4755c28ea0bc4a7b3d6312d8e27798db1c | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/automation/v20151031/schedule.py | [
"Apache-2.0"
] | Python | interval | pulumi.Output[Optional[Any]] | def interval(self) -> pulumi.Output[Optional[Any]]:
"""
Gets or sets the interval of the schedule.
"""
return pulumi.get(self, "interval") |
Gets or sets the interval of the schedule.
| Gets or sets the interval of the schedule. | [
"Gets",
"or",
"sets",
"the",
"interval",
"of",
"the",
"schedule",
"."
] | def interval(self) -> pulumi.Output[Optional[Any]]:
return pulumi.get(self, "interval") | [
"def",
"interval",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"Any",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"interval\"",
")"
] | Gets or sets the interval of the schedule. | [
"Gets",
"or",
"sets",
"the",
"interval",
"of",
"the",
"schedule",
"."
] | [
"\"\"\"\n Gets or sets the interval of the schedule.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe866d4755c28ea0bc4a7b3d6312d8e27798db1c | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/automation/v20151031/schedule.py | [
"Apache-2.0"
] | Python | next_run | pulumi.Output[Optional[str]] | def next_run(self) -> pulumi.Output[Optional[str]]:
"""
Gets or sets the next run time of the schedule.
"""
return pulumi.get(self, "next_run") |
Gets or sets the next run time of the schedule.
| Gets or sets the next run time of the schedule. | [
"Gets",
"or",
"sets",
"the",
"next",
"run",
"time",
"of",
"the",
"schedule",
"."
] | def next_run(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "next_run") | [
"def",
"next_run",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"str",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"next_run\"",
")"
] | Gets or sets the next run time of the schedule. | [
"Gets",
"or",
"sets",
"the",
"next",
"run",
"time",
"of",
"the",
"schedule",
"."
] | [
"\"\"\"\n Gets or sets the next run time of the schedule.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe866d4755c28ea0bc4a7b3d6312d8e27798db1c | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/automation/v20151031/schedule.py | [
"Apache-2.0"
] | Python | next_run_offset_minutes | pulumi.Output[Optional[float]] | def next_run_offset_minutes(self) -> pulumi.Output[Optional[float]]:
"""
Gets or sets the next run time's offset in minutes.
"""
return pulumi.get(self, "next_run_offset_minutes") |
Gets or sets the next run time's offset in minutes.
| Gets or sets the next run time's offset in minutes. | [
"Gets",
"or",
"sets",
"the",
"next",
"run",
"time",
"'",
"s",
"offset",
"in",
"minutes",
"."
] | def next_run_offset_minutes(self) -> pulumi.Output[Optional[float]]:
return pulumi.get(self, "next_run_offset_minutes") | [
"def",
"next_run_offset_minutes",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"float",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"next_run_offset_minutes\"",
")"
] | Gets or sets the next run time's offset in minutes. | [
"Gets",
"or",
"sets",
"the",
"next",
"run",
"time",
"'",
"s",
"offset",
"in",
"minutes",
"."
] | [
"\"\"\"\n Gets or sets the next run time's offset in minutes.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe866d4755c28ea0bc4a7b3d6312d8e27798db1c | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/automation/v20151031/schedule.py | [
"Apache-2.0"
] | Python | start_time_offset_minutes | pulumi.Output[float] | def start_time_offset_minutes(self) -> pulumi.Output[float]:
"""
Gets the start time's offset in minutes.
"""
return pulumi.get(self, "start_time_offset_minutes") |
Gets the start time's offset in minutes.
| Gets the start time's offset in minutes. | [
"Gets",
"the",
"start",
"time",
"'",
"s",
"offset",
"in",
"minutes",
"."
] | def start_time_offset_minutes(self) -> pulumi.Output[float]:
return pulumi.get(self, "start_time_offset_minutes") | [
"def",
"start_time_offset_minutes",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"float",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"start_time_offset_minutes\"",
")"
] | Gets the start time's offset in minutes. | [
"Gets",
"the",
"start",
"time",
"'",
"s",
"offset",
"in",
"minutes",
"."
] | [
"\"\"\"\n Gets the start time's offset in minutes.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
fe8a4039406827b71d0a3ac159b02b2a3e89eccb | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/compute/v20190701/_inputs.py | [
"Apache-2.0"
] | Python | type | pulumi.Input[Union[str, 'EncryptionType']] | def type(self) -> pulumi.Input[Union[str, 'EncryptionType']]:
"""
The type of key used to encrypt the data of the disk.
"""
return pulumi.get(self, "type") |
The type of key used to encrypt the data of the disk.
| The type of key used to encrypt the data of the disk. | [
"The",
"type",
"of",
"key",
"used",
"to",
"encrypt",
"the",
"data",
"of",
"the",
"disk",
"."
] | def type(self) -> pulumi.Input[Union[str, 'EncryptionType']]:
return pulumi.get(self, "type") | [
"def",
"type",
"(",
"self",
")",
"->",
"pulumi",
".",
"Input",
"[",
"Union",
"[",
"str",
",",
"'EncryptionType'",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"type\"",
")"
] | The type of key used to encrypt the data of the disk. | [
"The",
"type",
"of",
"key",
"used",
"to",
"encrypt",
"the",
"data",
"of",
"the",
"disk",
"."
] | [
"\"\"\"\n The type of key used to encrypt the data of the disk.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
8925db89249ecb1f87a9c7a40f80837428a72990 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/avs/v20200717preview/get_workload_network_dns_zone.py | [
"Apache-2.0"
] | Python | dns_server_ips | Optional[Sequence[str]] | def dns_server_ips(self) -> Optional[Sequence[str]]:
"""
DNS Server IP array of the DNS Zone.
"""
return pulumi.get(self, "dns_server_ips") |
DNS Server IP array of the DNS Zone.
| DNS Server IP array of the DNS Zone. | [
"DNS",
"Server",
"IP",
"array",
"of",
"the",
"DNS",
"Zone",
"."
] | def dns_server_ips(self) -> Optional[Sequence[str]]:
return pulumi.get(self, "dns_server_ips") | [
"def",
"dns_server_ips",
"(",
"self",
")",
"->",
"Optional",
"[",
"Sequence",
"[",
"str",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"dns_server_ips\"",
")"
] | DNS Server IP array of the DNS Zone. | [
"DNS",
"Server",
"IP",
"array",
"of",
"the",
"DNS",
"Zone",
"."
] | [
"\"\"\"\n DNS Server IP array of the DNS Zone.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
8925db89249ecb1f87a9c7a40f80837428a72990 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/avs/v20200717preview/get_workload_network_dns_zone.py | [
"Apache-2.0"
] | Python | dns_services | Optional[float] | def dns_services(self) -> Optional[float]:
"""
Number of DNS Services using the DNS zone.
"""
return pulumi.get(self, "dns_services") |
Number of DNS Services using the DNS zone.
| Number of DNS Services using the DNS zone. | [
"Number",
"of",
"DNS",
"Services",
"using",
"the",
"DNS",
"zone",
"."
] | def dns_services(self) -> Optional[float]:
return pulumi.get(self, "dns_services") | [
"def",
"dns_services",
"(",
"self",
")",
"->",
"Optional",
"[",
"float",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"dns_services\"",
")"
] | Number of DNS Services using the DNS zone. | [
"Number",
"of",
"DNS",
"Services",
"using",
"the",
"DNS",
"zone",
"."
] | [
"\"\"\"\n Number of DNS Services using the DNS zone.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
8925db89249ecb1f87a9c7a40f80837428a72990 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/avs/v20200717preview/get_workload_network_dns_zone.py | [
"Apache-2.0"
] | Python | domain | Optional[Sequence[str]] | def domain(self) -> Optional[Sequence[str]]:
"""
Domain names of the DNS Zone.
"""
return pulumi.get(self, "domain") |
Domain names of the DNS Zone.
| Domain names of the DNS Zone. | [
"Domain",
"names",
"of",
"the",
"DNS",
"Zone",
"."
] | def domain(self) -> Optional[Sequence[str]]:
return pulumi.get(self, "domain") | [
"def",
"domain",
"(",
"self",
")",
"->",
"Optional",
"[",
"Sequence",
"[",
"str",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"domain\"",
")"
] | Domain names of the DNS Zone. | [
"Domain",
"names",
"of",
"the",
"DNS",
"Zone",
"."
] | [
"\"\"\"\n Domain names of the DNS Zone.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
8925db89249ecb1f87a9c7a40f80837428a72990 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/avs/v20200717preview/get_workload_network_dns_zone.py | [
"Apache-2.0"
] | Python | source_ip | Optional[str] | def source_ip(self) -> Optional[str]:
"""
Source IP of the DNS Zone.
"""
return pulumi.get(self, "source_ip") |
Source IP of the DNS Zone.
| Source IP of the DNS Zone. | [
"Source",
"IP",
"of",
"the",
"DNS",
"Zone",
"."
] | def source_ip(self) -> Optional[str]:
return pulumi.get(self, "source_ip") | [
"def",
"source_ip",
"(",
"self",
")",
"->",
"Optional",
"[",
"str",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"source_ip\"",
")"
] | Source IP of the DNS Zone. | [
"Source",
"IP",
"of",
"the",
"DNS",
"Zone",
"."
] | [
"\"\"\"\n Source IP of the DNS Zone.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
892978a20a7a91241e8774282b6804af6b58e4bd | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/resources/template_spec_version.py | [
"Apache-2.0"
] | Python | artifacts | pulumi.Output[Optional[Sequence['outputs.TemplateSpecTemplateArtifactResponse']]] | def artifacts(self) -> pulumi.Output[Optional[Sequence['outputs.TemplateSpecTemplateArtifactResponse']]]:
"""
An array of Template Spec artifacts.
"""
return pulumi.get(self, "artifacts") |
An array of Template Spec artifacts.
| An array of Template Spec artifacts. | [
"An",
"array",
"of",
"Template",
"Spec",
"artifacts",
"."
] | def artifacts(self) -> pulumi.Output[Optional[Sequence['outputs.TemplateSpecTemplateArtifactResponse']]]:
return pulumi.get(self, "artifacts") | [
"def",
"artifacts",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"Sequence",
"[",
"'outputs.TemplateSpecTemplateArtifactResponse'",
"]",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"artifacts\"",
")"
] | An array of Template Spec artifacts. | [
"An",
"array",
"of",
"Template",
"Spec",
"artifacts",
"."
] | [
"\"\"\"\n An array of Template Spec artifacts.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
892978a20a7a91241e8774282b6804af6b58e4bd | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/resources/template_spec_version.py | [
"Apache-2.0"
] | Python | template | pulumi.Output[Optional[Any]] | def template(self) -> pulumi.Output[Optional[Any]]:
"""
The Azure Resource Manager template content.
"""
return pulumi.get(self, "template") |
The Azure Resource Manager template content.
| The Azure Resource Manager template content. | [
"The",
"Azure",
"Resource",
"Manager",
"template",
"content",
"."
] | def template(self) -> pulumi.Output[Optional[Any]]:
return pulumi.get(self, "template") | [
"def",
"template",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"Any",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"template\"",
")"
] | The Azure Resource Manager template content. | [
"The",
"Azure",
"Resource",
"Manager",
"template",
"content",
"."
] | [
"\"\"\"\n The Azure Resource Manager template content.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
908fcde85926f2e45dd405e9e4253a525cf9d53b | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/web/latest/list_web_app_backup_configuration.py | [
"Apache-2.0"
] | Python | list_web_app_backup_configuration | AwaitableListWebAppBackupConfigurationResult | def list_web_app_backup_configuration(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableListWebAppBackupConfigurationResult:
"""
Description of a backup which... |
Description of a backup which will be performed.
Latest API Version: 2020-10-01.
:param str name: Name of the app.
:param str resource_group_name: Name of the resource group to which the resource belongs.
| Description of a backup which will be performed. | [
"Description",
"of",
"a",
"backup",
"which",
"will",
"be",
"performed",
"."
] | def list_web_app_backup_configuration(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableListWebAppBackupConfigurationResult:
pulumi.log.warn("list_web_app_backup_... | [
"def",
"list_web_app_backup_configuration",
"(",
"name",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
",",
"resource_group_name",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
",",
"opts",
":",
"Optional",
"[",
"pulumi",
".",
"InvokeOptions",
"]",
"=",
... | Description of a backup which will be performed. | [
"Description",
"of",
"a",
"backup",
"which",
"will",
"be",
"performed",
"."
] | [
"\"\"\"\n Description of a backup which will be performed.\n Latest API Version: 2020-10-01.\n\n\n :param str name: Name of the app.\n :param str resource_group_name: Name of the resource group to which the resource belongs.\n \"\"\""
] | [
{
"param": "name",
"type": "Optional[str]"
},
{
"param": "resource_group_name",
"type": "Optional[str]"
},
{
"param": "opts",
"type": "Optional[pulumi.InvokeOptions]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "name",
"type": "Optional[str]",
"docstring": "Name of the app.",
"docstring_tokens": [
"Name",
"of",
"the",
"app",
"."
],
"default": null,
"is_optional": false
},
... |
0298f1709b6635ce6c979926b5b834de341f2e3c | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/avs/v20200320/get_private_cloud.py | [
"Apache-2.0"
] | Python | management_cluster | 'outputs.ManagementClusterResponse' | def management_cluster(self) -> 'outputs.ManagementClusterResponse':
"""
The default cluster used for management
"""
return pulumi.get(self, "management_cluster") |
The default cluster used for management
| The default cluster used for management | [
"The",
"default",
"cluster",
"used",
"for",
"management"
] | def management_cluster(self) -> 'outputs.ManagementClusterResponse':
return pulumi.get(self, "management_cluster") | [
"def",
"management_cluster",
"(",
"self",
")",
"->",
"'outputs.ManagementClusterResponse'",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"management_cluster\"",
")"
] | The default cluster used for management | [
"The",
"default",
"cluster",
"used",
"for",
"management"
] | [
"\"\"\"\n The default cluster used for management\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
0298f1709b6635ce6c979926b5b834de341f2e3c | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/avs/v20200320/get_private_cloud.py | [
"Apache-2.0"
] | Python | network_block | str | def network_block(self) -> str:
"""
The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22
"""
return pulumi.get(self, "network_bl... |
The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22
| The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22 | [
"The",
"block",
"of",
"addresses",
"should",
"be",
"unique",
"across",
"VNet",
"in",
"your",
"subscription",
"as",
"well",
"as",
"on",
"-",
"premise",
".",
"Make",
"sure",
"the",
"CIDR",
"format",
"is",
"conformed",
"to",
"(",
"A",
".",
"B",
".",
"C",
... | def network_block(self) -> str:
return pulumi.get(self, "network_block") | [
"def",
"network_block",
"(",
"self",
")",
"->",
"str",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"network_block\"",
")"
] | The block of addresses should be unique across VNet in your subscription as well as on-premise. | [
"The",
"block",
"of",
"addresses",
"should",
"be",
"unique",
"across",
"VNet",
"in",
"your",
"subscription",
"as",
"well",
"as",
"on",
"-",
"premise",
"."
] | [
"\"\"\"\n The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
02b6a207bb2d212092d8b34e362805e6eb3cc9b0 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/storage/latest/get_file_share.py | [
"Apache-2.0"
] | Python | share_usage_bytes | float | def share_usage_bytes(self) -> float:
"""
The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.
"""
return pulumi.get(self, "share_usage_bytes") |
The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.
| The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files. | [
"The",
"approximate",
"size",
"of",
"the",
"data",
"stored",
"on",
"the",
"share",
".",
"Note",
"that",
"this",
"value",
"may",
"not",
"include",
"all",
"recently",
"created",
"or",
"recently",
"resized",
"files",
"."
] | def share_usage_bytes(self) -> float:
return pulumi.get(self, "share_usage_bytes") | [
"def",
"share_usage_bytes",
"(",
"self",
")",
"->",
"float",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"share_usage_bytes\"",
")"
] | The approximate size of the data stored on the share. | [
"The",
"approximate",
"size",
"of",
"the",
"data",
"stored",
"on",
"the",
"share",
"."
] | [
"\"\"\"\n The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
02b6a207bb2d212092d8b34e362805e6eb3cc9b0 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/storage/latest/get_file_share.py | [
"Apache-2.0"
] | Python | snapshot_time | str | def snapshot_time(self) -> str:
"""
Creation time of share snapshot returned in the response of list shares with expand param "snapshots".
"""
return pulumi.get(self, "snapshot_time") |
Creation time of share snapshot returned in the response of list shares with expand param "snapshots".
| Creation time of share snapshot returned in the response of list shares with expand param "snapshots". | [
"Creation",
"time",
"of",
"share",
"snapshot",
"returned",
"in",
"the",
"response",
"of",
"list",
"shares",
"with",
"expand",
"param",
"\"",
"snapshots",
"\"",
"."
] | def snapshot_time(self) -> str:
return pulumi.get(self, "snapshot_time") | [
"def",
"snapshot_time",
"(",
"self",
")",
"->",
"str",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"snapshot_time\"",
")"
] | Creation time of share snapshot returned in the response of list shares with expand param "snapshots". | [
"Creation",
"time",
"of",
"share",
"snapshot",
"returned",
"in",
"the",
"response",
"of",
"list",
"shares",
"with",
"expand",
"param",
"\"",
"snapshots",
"\"",
"."
] | [
"\"\"\"\n Creation time of share snapshot returned in the response of list shares with expand param \"snapshots\".\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
cf3a76a0ea3fa3372cdc102c08735f13e4916822 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/apimanagement/v20191201/get_api_release.py | [
"Apache-2.0"
] | Python | updated_date_time | str | def updated_date_time(self) -> str:
"""
The time the API release was updated.
"""
return pulumi.get(self, "updated_date_time") |
The time the API release was updated.
| The time the API release was updated. | [
"The",
"time",
"the",
"API",
"release",
"was",
"updated",
"."
] | def updated_date_time(self) -> str:
return pulumi.get(self, "updated_date_time") | [
"def",
"updated_date_time",
"(",
"self",
")",
"->",
"str",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"updated_date_time\"",
")"
] | The time the API release was updated. | [
"The",
"time",
"the",
"API",
"release",
"was",
"updated",
"."
] | [
"\"\"\"\n The time the API release was updated.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
cf3bcba41275fc266d4c10ee0d9c1f28452d97c1 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/datacatalog/adc_catalog.py | [
"Apache-2.0"
] | Python | admins | pulumi.Output[Optional[Sequence['outputs.PrincipalsResponse']]] | def admins(self) -> pulumi.Output[Optional[Sequence['outputs.PrincipalsResponse']]]:
"""
Azure data catalog admin list.
"""
return pulumi.get(self, "admins") |
Azure data catalog admin list.
| Azure data catalog admin list. | [
"Azure",
"data",
"catalog",
"admin",
"list",
"."
] | def admins(self) -> pulumi.Output[Optional[Sequence['outputs.PrincipalsResponse']]]:
return pulumi.get(self, "admins") | [
"def",
"admins",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"Sequence",
"[",
"'outputs.PrincipalsResponse'",
"]",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"admins\"",
")"
] | Azure data catalog admin list. | [
"Azure",
"data",
"catalog",
"admin",
"list",
"."
] | [
"\"\"\"\n Azure data catalog admin list.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
cf3bcba41275fc266d4c10ee0d9c1f28452d97c1 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/datacatalog/adc_catalog.py | [
"Apache-2.0"
] | Python | enable_automatic_unit_adjustment | pulumi.Output[Optional[bool]] | def enable_automatic_unit_adjustment(self) -> pulumi.Output[Optional[bool]]:
"""
Automatic unit adjustment enabled or not.
"""
return pulumi.get(self, "enable_automatic_unit_adjustment") |
Automatic unit adjustment enabled or not.
| Automatic unit adjustment enabled or not. | [
"Automatic",
"unit",
"adjustment",
"enabled",
"or",
"not",
"."
] | def enable_automatic_unit_adjustment(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "enable_automatic_unit_adjustment") | [
"def",
"enable_automatic_unit_adjustment",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"bool",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"enable_automatic_unit_adjustment\"",
")"
] | Automatic unit adjustment enabled or not. | [
"Automatic",
"unit",
"adjustment",
"enabled",
"or",
"not",
"."
] | [
"\"\"\"\n Automatic unit adjustment enabled or not.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
cf3bcba41275fc266d4c10ee0d9c1f28452d97c1 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/datacatalog/adc_catalog.py | [
"Apache-2.0"
] | Python | successfully_provisioned | pulumi.Output[Optional[bool]] | def successfully_provisioned(self) -> pulumi.Output[Optional[bool]]:
"""
Azure data catalog provision status.
"""
return pulumi.get(self, "successfully_provisioned") |
Azure data catalog provision status.
| Azure data catalog provision status. | [
"Azure",
"data",
"catalog",
"provision",
"status",
"."
] | def successfully_provisioned(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "successfully_provisioned") | [
"def",
"successfully_provisioned",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"bool",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"successfully_provisioned\"",
")"
] | Azure data catalog provision status. | [
"Azure",
"data",
"catalog",
"provision",
"status",
"."
] | [
"\"\"\"\n Azure data catalog provision status.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
cf3bcba41275fc266d4c10ee0d9c1f28452d97c1 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/datacatalog/adc_catalog.py | [
"Apache-2.0"
] | Python | users | pulumi.Output[Optional[Sequence['outputs.PrincipalsResponse']]] | def users(self) -> pulumi.Output[Optional[Sequence['outputs.PrincipalsResponse']]]:
"""
Azure data catalog user list.
"""
return pulumi.get(self, "users") |
Azure data catalog user list.
| Azure data catalog user list. | [
"Azure",
"data",
"catalog",
"user",
"list",
"."
] | def users(self) -> pulumi.Output[Optional[Sequence['outputs.PrincipalsResponse']]]:
return pulumi.get(self, "users") | [
"def",
"users",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"Sequence",
"[",
"'outputs.PrincipalsResponse'",
"]",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"users\"",
")"
] | Azure data catalog user list. | [
"Azure",
"data",
"catalog",
"user",
"list",
"."
] | [
"\"\"\"\n Azure data catalog user list.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
662c460d178661667ff09c6563b8aef9b0a8a112 | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/databoxedge/v20200501preview/device.py | [
"Apache-2.0"
] | Python | model_description | pulumi.Output[Optional[str]] | def model_description(self) -> pulumi.Output[Optional[str]]:
"""
The description of the Data Box Edge/Gateway device model.
"""
return pulumi.get(self, "model_description") |
The description of the Data Box Edge/Gateway device model.
| The description of the Data Box Edge/Gateway device model. | [
"The",
"description",
"of",
"the",
"Data",
"Box",
"Edge",
"/",
"Gateway",
"device",
"model",
"."
] | def model_description(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "model_description") | [
"def",
"model_description",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"str",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"model_description\"",
")"
] | The description of the Data Box Edge/Gateway device model. | [
"The",
"description",
"of",
"the",
"Data",
"Box",
"Edge",
"/",
"Gateway",
"device",
"model",
"."
] | [
"\"\"\"\n The description of the Data Box Edge/Gateway device model.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
7a280d346bd495355559f58921a7d312568d8a3c | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/softwareplan/get_hybrid_use_benefit.py | [
"Apache-2.0"
] | Python | etag | int | def etag(self) -> int:
"""
Indicates the revision of the hybrid use benefit
"""
return pulumi.get(self, "etag") |
Indicates the revision of the hybrid use benefit
| Indicates the revision of the hybrid use benefit | [
"Indicates",
"the",
"revision",
"of",
"the",
"hybrid",
"use",
"benefit"
] | def etag(self) -> int:
return pulumi.get(self, "etag") | [
"def",
"etag",
"(",
"self",
")",
"->",
"int",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"etag\"",
")"
] | Indicates the revision of the hybrid use benefit | [
"Indicates",
"the",
"revision",
"of",
"the",
"hybrid",
"use",
"benefit"
] | [
"\"\"\"\n Indicates the revision of the hybrid use benefit\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
7a35aed4b2377e7156ca5c78ef2c1d000729c25a | pulumi/pulumi-azure-nextgen | sdk/python/pulumi_azure_nextgen/kusto/v20170907privatepreview/list_database_principals.py | [
"Apache-2.0"
] | Python | list_database_principals | AwaitableListDatabasePrincipalsResult | def list_database_principals(cluster_name: Optional[str] = None,
database_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableListDatabasePrincipalsResult:
... |
The list Kusto database principals operation response.
:param str cluster_name: The name of the Kusto cluster.
:param str database_name: The name of the database in the Kusto cluster.
:param str resource_group_name: The name of the resource group containing the Kusto cluster.
| The list Kusto database principals operation response. | [
"The",
"list",
"Kusto",
"database",
"principals",
"operation",
"response",
"."
] | def list_database_principals(cluster_name: Optional[str] = None,
database_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableListDatabasePrincipalsResult:
... | [
"def",
"list_database_principals",
"(",
"cluster_name",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
",",
"database_name",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
",",
"resource_group_name",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
",",
"opt... | The list Kusto database principals operation response. | [
"The",
"list",
"Kusto",
"database",
"principals",
"operation",
"response",
"."
] | [
"\"\"\"\n The list Kusto database principals operation response.\n\n\n :param str cluster_name: The name of the Kusto cluster.\n :param str database_name: The name of the database in the Kusto cluster.\n :param str resource_group_name: The name of the resource group containing the Kusto cluster.\n \"... | [
{
"param": "cluster_name",
"type": "Optional[str]"
},
{
"param": "database_name",
"type": "Optional[str]"
},
{
"param": "resource_group_name",
"type": "Optional[str]"
},
{
"param": "opts",
"type": "Optional[pulumi.InvokeOptions]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "cluster_name",
"type": "Optional[str]",
"docstring": "The name of the Kusto cluster.",
"docstring_tokens": [
"The",
"name",
"of",
"the",
"Kusto",
"cluster",
"."
],
... |
a497909d576a0e2b36e338c486a9d02460581140 | loremacchia/Just-Read-It | backend/CRAFT-pytorch-master/DDM_results.py | [
"MIT"
] | Python | autolabelCRNN | null | def autolabelCRNN(rects):
"""Attach a text label above each bar in *rects*, displaying its height."""
for rect in rects:
height = rect.get_height()
idx = 0
for i in range(len(yCRNN)):
if(yCRNN[i] == height):
idx = i
... | Attach a text label above each bar in *rects*, displaying its height. | Attach a text label above each bar in *rects*, displaying its height. | [
"Attach",
"a",
"text",
"label",
"above",
"each",
"bar",
"in",
"*",
"rects",
"*",
"displaying",
"its",
"height",
"."
] | def autolabelCRNN(rects):
for rect in rects:
height = rect.get_height()
idx = 0
for i in range(len(yCRNN)):
if(yCRNN[i] == height):
idx = i
break
ax.annotate('{}%'.format('%.0f'%(height*100/yDat[i])),
... | [
"def",
"autolabelCRNN",
"(",
"rects",
")",
":",
"for",
"rect",
"in",
"rects",
":",
"height",
"=",
"rect",
".",
"get_height",
"(",
")",
"idx",
"=",
"0",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"yCRNN",
")",
")",
":",
"if",
"(",
"yCRNN",
"[",
... | Attach a text label above each bar in *rects*, displaying its height. | [
"Attach",
"a",
"text",
"label",
"above",
"each",
"bar",
"in",
"*",
"rects",
"*",
"displaying",
"its",
"height",
"."
] | [
"\"\"\"Attach a text label above each bar in *rects*, displaying its height.\"\"\"",
"# 3 points vertical offset\r"
] | [
{
"param": "rects",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "rects",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
a497909d576a0e2b36e338c486a9d02460581140 | loremacchia/Just-Read-It | backend/CRAFT-pytorch-master/DDM_results.py | [
"MIT"
] | Python | autolabelTess | null | def autolabelTess(rects):
"""Attach a text label above each bar in *rects*, displaying its height."""
for rect in rects:
height = rect.get_height()
idx = 0
for i in range(len(yTess)):
if(yTess[i] == height):
idx = i
... | Attach a text label above each bar in *rects*, displaying its height. | Attach a text label above each bar in *rects*, displaying its height. | [
"Attach",
"a",
"text",
"label",
"above",
"each",
"bar",
"in",
"*",
"rects",
"*",
"displaying",
"its",
"height",
"."
] | def autolabelTess(rects):
for rect in rects:
height = rect.get_height()
idx = 0
for i in range(len(yTess)):
if(yTess[i] == height):
idx = i
break
ax.annotate('{}%'.format('%.0f'%(height*100/yDat[i])),
... | [
"def",
"autolabelTess",
"(",
"rects",
")",
":",
"for",
"rect",
"in",
"rects",
":",
"height",
"=",
"rect",
".",
"get_height",
"(",
")",
"idx",
"=",
"0",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"yTess",
")",
")",
":",
"if",
"(",
"yTess",
"[",
... | Attach a text label above each bar in *rects*, displaying its height. | [
"Attach",
"a",
"text",
"label",
"above",
"each",
"bar",
"in",
"*",
"rects",
"*",
"displaying",
"its",
"height",
"."
] | [
"\"\"\"Attach a text label above each bar in *rects*, displaying its height.\"\"\"",
"# 3 points vertical offset\r"
] | [
{
"param": "rects",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "rects",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
c4e0897929da13829d58404c7da0a5d34c90d889 | c1m50c/morse-code | src/morse_code.py | [
"MIT"
] | Python | decode | str | def decode(string: str) -> str:
"""
Decodes a string containing morse code into english, digits and punctuation symbols.
## Parameters
```py
string: str # String to Decode.
```
"""
split_str: List[str] = string.split(" ")
result: str = ""
fo... |
Decodes a string containing morse code into english, digits and punctuation symbols.
## Parameters
```py
string: str # String to Decode.
```
| Decodes a string containing morse code into english, digits and punctuation symbols.
Parameters
```py
string: str # String to Decode. | [
"Decodes",
"a",
"string",
"containing",
"morse",
"code",
"into",
"english",
"digits",
"and",
"punctuation",
"symbols",
".",
"Parameters",
"`",
"`",
"`",
"py",
"string",
":",
"str",
"#",
"String",
"to",
"Decode",
"."
] | def decode(string: str) -> str:
split_str: List[str] = string.split(" ")
result: str = ""
for code in split_str:
if code in LETTERS_VK:
result += LETTERS_VK[code]
elif code in NUMBERS_VK:
result += NUMBERS_VK[code]
elif code in PUNCTUATION_VK:
resu... | [
"def",
"decode",
"(",
"string",
":",
"str",
")",
"->",
"str",
":",
"split_str",
":",
"List",
"[",
"str",
"]",
"=",
"string",
".",
"split",
"(",
"\" \"",
")",
"result",
":",
"str",
"=",
"\"\"",
"for",
"code",
"in",
"split_str",
":",
"if",
"code",
... | Decodes a string containing morse code into english, digits and punctuation symbols. | [
"Decodes",
"a",
"string",
"containing",
"morse",
"code",
"into",
"english",
"digits",
"and",
"punctuation",
"symbols",
"."
] | [
"\"\"\"\n Decodes a string containing morse code into english, digits and punctuation symbols.\n \n ## Parameters\n ```py\n string: str # String to Decode.\n ```\n \"\"\""
] | [
{
"param": "string",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "string",
"type": "str",
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
5a9eaca8f2059389a13d79dc2a2428b52bdfb95d | mouse-reeve/langmaker | langmaker/inflectionrule.py | [
"MIT"
] | Python | apply_rule | <not_specific> | def apply_rule(self, lemma, tags):
''' run the appropriate rule on a lemma for given tags '''
# TODO: handle overloading rule tags
tags = ','.join(tags)
try:
rule = self.rules[tags]
except KeyError:
logging.info('No rule found for tags %s', tags)
... | run the appropriate rule on a lemma for given tags | run the appropriate rule on a lemma for given tags | [
"run",
"the",
"appropriate",
"rule",
"on",
"a",
"lemma",
"for",
"given",
"tags"
] | def apply_rule(self, lemma, tags):
tags = ','.join(tags)
try:
rule = self.rules[tags]
except KeyError:
logging.info('No rule found for tags %s', tags)
return lemma
return rule.inflect(lemma) | [
"def",
"apply_rule",
"(",
"self",
",",
"lemma",
",",
"tags",
")",
":",
"tags",
"=",
"','",
".",
"join",
"(",
"tags",
")",
"try",
":",
"rule",
"=",
"self",
".",
"rules",
"[",
"tags",
"]",
"except",
"KeyError",
":",
"logging",
".",
"info",
"(",
"'N... | run the appropriate rule on a lemma for given tags | [
"run",
"the",
"appropriate",
"rule",
"on",
"a",
"lemma",
"for",
"given",
"tags"
] | [
"''' run the appropriate rule on a lemma for given tags '''",
"# TODO: handle overloading rule tags"
] | [
{
"param": "self",
"type": null
},
{
"param": "lemma",
"type": null
},
{
"param": "tags",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "lemma",
"type": null,
"docstring": null,
"docstring_tokens": ... |
76a65a6b18e082ba03a87684b1972b9612c6a6f1 | mouse-reeve/langmaker | langmaker/phoneme.py | [
"MIT"
] | Python | select_phonemes | null | def select_phonemes(self, phonemes):
''' use a given list of ipa phonemes '''
consonants = {i[0]: i for i in ipa_phonemes['consonants']['pulmonic']}
for phoneme in phonemes['consonants']:
self.consonants.append(consonants[phoneme]) | use a given list of ipa phonemes | use a given list of ipa phonemes | [
"use",
"a",
"given",
"list",
"of",
"ipa",
"phonemes"
] | def select_phonemes(self, phonemes):
consonants = {i[0]: i for i in ipa_phonemes['consonants']['pulmonic']}
for phoneme in phonemes['consonants']:
self.consonants.append(consonants[phoneme]) | [
"def",
"select_phonemes",
"(",
"self",
",",
"phonemes",
")",
":",
"consonants",
"=",
"{",
"i",
"[",
"0",
"]",
":",
"i",
"for",
"i",
"in",
"ipa_phonemes",
"[",
"'consonants'",
"]",
"[",
"'pulmonic'",
"]",
"}",
"for",
"phoneme",
"in",
"phonemes",
"[",
... | use a given list of ipa phonemes | [
"use",
"a",
"given",
"list",
"of",
"ipa",
"phonemes"
] | [
"''' use a given list of ipa phonemes '''"
] | [
{
"param": "self",
"type": null
},
{
"param": "phonemes",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "phonemes",
"type": null,
"docstring": null,
"docstring_tokens... |
6c7f36f83b9eb05e8473935f3dec558535dc269d | mouse-reeve/langmaker | langmaker/morphology.py | [
"MIT"
] | Python | inflect | <not_specific> | def inflect(self, lemma, word_pos, tags):
''' inflect a word based on grammatical variables '''
if not word_pos in pos:
raise KeyError('invalid part of speech')
return self.rules.apply_rule(lemma, tags) | inflect a word based on grammatical variables | inflect a word based on grammatical variables | [
"inflect",
"a",
"word",
"based",
"on",
"grammatical",
"variables"
] | def inflect(self, lemma, word_pos, tags):
if not word_pos in pos:
raise KeyError('invalid part of speech')
return self.rules.apply_rule(lemma, tags) | [
"def",
"inflect",
"(",
"self",
",",
"lemma",
",",
"word_pos",
",",
"tags",
")",
":",
"if",
"not",
"word_pos",
"in",
"pos",
":",
"raise",
"KeyError",
"(",
"'invalid part of speech'",
")",
"return",
"self",
".",
"rules",
".",
"apply_rule",
"(",
"lemma",
",... | inflect a word based on grammatical variables | [
"inflect",
"a",
"word",
"based",
"on",
"grammatical",
"variables"
] | [
"''' inflect a word based on grammatical variables '''"
] | [
{
"param": "self",
"type": null
},
{
"param": "lemma",
"type": null
},
{
"param": "word_pos",
"type": null
},
{
"param": "tags",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "lemma",
"type": null,
"docstring": null,
"docstring_tokens": ... |
354f602bd0ccca827091610aa4adaa1a10c86594 | mouse-reeve/langmaker | langmaker/syllable.py | [
"MIT"
] | Python | generate_syllables | <not_specific> | def generate_syllables(self):
''' every possible syllable for the given phonemes and grammar '''
# spaces, which are only there for NLTK's sake, are removed
return [re.sub(' ', '', '/'.join(s)) for s in \
generate(self.grammar, depth=4)] | every possible syllable for the given phonemes and grammar | every possible syllable for the given phonemes and grammar | [
"every",
"possible",
"syllable",
"for",
"the",
"given",
"phonemes",
"and",
"grammar"
] | def generate_syllables(self):
return [re.sub(' ', '', '/'.join(s)) for s in \
generate(self.grammar, depth=4)] | [
"def",
"generate_syllables",
"(",
"self",
")",
":",
"return",
"[",
"re",
".",
"sub",
"(",
"' '",
",",
"''",
",",
"'/'",
".",
"join",
"(",
"s",
")",
")",
"for",
"s",
"in",
"generate",
"(",
"self",
".",
"grammar",
",",
"depth",
"=",
"4",
")",
"]"... | every possible syllable for the given phonemes and grammar | [
"every",
"possible",
"syllable",
"for",
"the",
"given",
"phonemes",
"and",
"grammar"
] | [
"''' every possible syllable for the given phonemes and grammar '''",
"# spaces, which are only there for NLTK's sake, are removed"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
d38bb1f6e49fda375415acd41e4215a8b72cda8c | mouse-reeve/langmaker | langmaker/transcriptionrule.py | [
"MIT"
] | Python | apply_rules | <not_specific> | def apply_rules(self, word):
''' run the appropriate rule on a lemma for given tags '''
for rule in self.rules:
word = rule.transform(word)
return word | run the appropriate rule on a lemma for given tags | run the appropriate rule on a lemma for given tags | [
"run",
"the",
"appropriate",
"rule",
"on",
"a",
"lemma",
"for",
"given",
"tags"
] | def apply_rules(self, word):
for rule in self.rules:
word = rule.transform(word)
return word | [
"def",
"apply_rules",
"(",
"self",
",",
"word",
")",
":",
"for",
"rule",
"in",
"self",
".",
"rules",
":",
"word",
"=",
"rule",
".",
"transform",
"(",
"word",
")",
"return",
"word"
] | run the appropriate rule on a lemma for given tags | [
"run",
"the",
"appropriate",
"rule",
"on",
"a",
"lemma",
"for",
"given",
"tags"
] | [
"''' run the appropriate rule on a lemma for given tags '''"
] | [
{
"param": "self",
"type": null
},
{
"param": "word",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "word",
"type": null,
"docstring": null,
"docstring_tokens": [... |
252ec5aa568a3abfbd58278a1c1e25581e331610 | mouse-reeve/langmaker | langmaker/lexeme.py | [
"MIT"
] | Python | translate | <not_specific> | def translate(self, english_word, pos):
''' lookup or create a translation for an english word '''
if not english_word in self.dictionary:
self.dictionary[english_word] = self.get_lemma(pos)
return self.dictionary[english_word] | lookup or create a translation for an english word | lookup or create a translation for an english word | [
"lookup",
"or",
"create",
"a",
"translation",
"for",
"an",
"english",
"word"
] | def translate(self, english_word, pos):
if not english_word in self.dictionary:
self.dictionary[english_word] = self.get_lemma(pos)
return self.dictionary[english_word] | [
"def",
"translate",
"(",
"self",
",",
"english_word",
",",
"pos",
")",
":",
"if",
"not",
"english_word",
"in",
"self",
".",
"dictionary",
":",
"self",
".",
"dictionary",
"[",
"english_word",
"]",
"=",
"self",
".",
"get_lemma",
"(",
"pos",
")",
"return",
... | lookup or create a translation for an english word | [
"lookup",
"or",
"create",
"a",
"translation",
"for",
"an",
"english",
"word"
] | [
"''' lookup or create a translation for an english word '''"
] | [
{
"param": "self",
"type": null
},
{
"param": "english_word",
"type": null
},
{
"param": "pos",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "english_word",
"type": null,
"docstring": null,
"docstring_to... |
6a244f3e7b9860d0b9ad5e6398320a63568eb3c5 | dabmake/Alexa-Pi | debounce_handler.py | [
"MIT"
] | Python | debounce | <not_specific> | def debounce(self):
"""If multiple Echos are present, the one most likely to respond first
is the one that can best hear the speaker... which is the closest one.
Adding a refractory period to handlers keeps us from worrying about
one Echo overhearing a command meant for another ... | If multiple Echos are present, the one most likely to respond first
is the one that can best hear the speaker... which is the closest one.
Adding a refractory period to handlers keeps us from worrying about
one Echo overhearing a command meant for another one.
| If multiple Echos are present, the one most likely to respond first
is the one that can best hear the speaker... which is the closest one.
Adding a refractory period to handlers keeps us from worrying about
one Echo overhearing a command meant for another one. | [
"If",
"multiple",
"Echos",
"are",
"present",
"the",
"one",
"most",
"likely",
"to",
"respond",
"first",
"is",
"the",
"one",
"that",
"can",
"best",
"hear",
"the",
"speaker",
"...",
"which",
"is",
"the",
"closest",
"one",
".",
"Adding",
"a",
"refractory",
"... | def debounce(self):
if (time.time() - self.lastEcho) < self.DEBOUNCE_SECONDS:
return True
self.lastEcho = time.time()
return | [
"def",
"debounce",
"(",
"self",
")",
":",
"if",
"(",
"time",
".",
"time",
"(",
")",
"-",
"self",
".",
"lastEcho",
")",
"<",
"self",
".",
"DEBOUNCE_SECONDS",
":",
"return",
"True",
"self",
".",
"lastEcho",
"=",
"time",
".",
"time",
"(",
")",
"return... | If multiple Echos are present, the one most likely to respond first
is the one that can best hear the speaker... which is the closest one. | [
"If",
"multiple",
"Echos",
"are",
"present",
"the",
"one",
"most",
"likely",
"to",
"respond",
"first",
"is",
"the",
"one",
"that",
"can",
"best",
"hear",
"the",
"speaker",
"...",
"which",
"is",
"the",
"closest",
"one",
"."
] | [
"\"\"\"If multiple Echos are present, the one most likely to respond first\n is the one that can best hear the speaker... which is the closest one.\n Adding a refractory period to handlers keeps us from worrying about\n one Echo overhearing a command meant for another one.\n \"\... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
b2c4b6e02fe0e290a258e8933b527e023d664d4a | zf020114/CHPDet | src/DOTA_devkit/prepare_Rotatexml_COCOformat.py | [
"MIT"
] | Python | generate_txt_labels | null | def generate_txt_labels(src_path, out_path, trainval=True):
"""Generate .txt labels recording img_names
Args:
src_path: dataset path containing images and labelTxt folders.
out_path: output txt file path
trainval: trainval or test?
"""
img_path = os.path.join(src_path, 'images')
... | Generate .txt labels recording img_names
Args:
src_path: dataset path containing images and labelTxt folders.
out_path: output txt file path
trainval: trainval or test?
| Generate .txt labels recording img_names | [
"Generate",
".",
"txt",
"labels",
"recording",
"img_names"
] | def generate_txt_labels(src_path, out_path, trainval=True):
img_path = os.path.join(src_path, 'images')
label_path = os.path.join(src_path, 'labelTxt')
img_lists = os.listdir(img_path)
with open(out_path, 'w') as f:
for img in img_lists:
img_name = osp.splitext(img)[0]
la... | [
"def",
"generate_txt_labels",
"(",
"src_path",
",",
"out_path",
",",
"trainval",
"=",
"True",
")",
":",
"img_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"src_path",
",",
"'images'",
")",
"label_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"src... | Generate .txt labels recording img_names | [
"Generate",
".",
"txt",
"labels",
"recording",
"img_names"
] | [
"\"\"\"Generate .txt labels recording img_names\n Args:\n src_path: dataset path containing images and labelTxt folders.\n out_path: output txt file path\n trainval: trainval or test?\n \"\"\""
] | [
{
"param": "src_path",
"type": null
},
{
"param": "out_path",
"type": null
},
{
"param": "trainval",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "src_path",
"type": null,
"docstring": "dataset path containing images and labelTxt folders.",
"docstring_tokens": [
"dataset",
"path",
"containing",
"images",
"and",
"labelTxt",
... |
b2c4b6e02fe0e290a258e8933b527e023d664d4a | zf020114/CHPDet | src/DOTA_devkit/prepare_Rotatexml_COCOformat.py | [
"MIT"
] | Python | generate_json_labels | null | def generate_json_labels(img_path,label_path, out_path, NAME_LABEL_MAP,trainval=True,ext='.jpg'):
"""Generate .json labels which is similar to coco format
Args:
src_path: dataset path containing images and labelTxt folders.
out_path: output json file path
trainval: trainval or test?
... | Generate .json labels which is similar to coco format
Args:
src_path: dataset path containing images and labelTxt folders.
out_path: output json file path
trainval: trainval or test?
| Generate .json labels which is similar to coco format | [
"Generate",
".",
"json",
"labels",
"which",
"is",
"similar",
"to",
"coco",
"format"
] | def generate_json_labels(img_path,label_path, out_path, NAME_LABEL_MAP,trainval=True,ext='.jpg'):
img_lists = os.listdir(img_path)
data_dict = []
with open(out_path, 'w') as f:
for id, img in enumerate(img_lists):
img_info = {}
img_name = osp.splitext(img)[0]
labe... | [
"def",
"generate_json_labels",
"(",
"img_path",
",",
"label_path",
",",
"out_path",
",",
"NAME_LABEL_MAP",
",",
"trainval",
"=",
"True",
",",
"ext",
"=",
"'.jpg'",
")",
":",
"img_lists",
"=",
"os",
".",
"listdir",
"(",
"img_path",
")",
"data_dict",
"=",
"[... | Generate .json labels which is similar to coco format | [
"Generate",
".",
"json",
"labels",
"which",
"is",
"similar",
"to",
"coco",
"format"
] | [
"\"\"\"Generate .json labels which is similar to coco format\n Args:\n src_path: dataset path containing images and labelTxt folders.\n out_path: output json file path\n trainval: trainval or test?\n \"\"\"",
"# img_path = os.path.join(src_path, 'train2017')",
"# label_path = osp.join... | [
{
"param": "img_path",
"type": null
},
{
"param": "label_path",
"type": null
},
{
"param": "out_path",
"type": null
},
{
"param": "NAME_LABEL_MAP",
"type": null
},
{
"param": "trainval",
"type": null
},
{
"param": "ext",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "img_path",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "label_path",
"type": null,
"docstring": null,
"docstring_... |
16813d4b667f8e2f78736645e3d6ff7e02f78dc0 | zf020114/CHPDet | src/DOTA_devkit/DOTA2JSON.py | [
"MIT"
] | Python | generate_json_labels | null | def generate_json_labels(src_path, out_path, trainval=True):
"""Generate .json labels which is similar to coco format
Args:
src_path: dataset path containing images and labelTxt folders.
out_path: output json file path
trainval: trainval or test?
"""
img_path = os.path.join(src_p... | Generate .json labels which is similar to coco format
Args:
src_path: dataset path containing images and labelTxt folders.
out_path: output json file path
trainval: trainval or test?
| Generate .json labels which is similar to coco format | [
"Generate",
".",
"json",
"labels",
"which",
"is",
"similar",
"to",
"coco",
"format"
] | def generate_json_labels(src_path, out_path, trainval=True):
img_path = os.path.join(src_path, 'images')
label_path = os.path.join(src_path, 'labelTxt')
img_lists = os.listdir(img_path)
data_dict = []
with open(out_path, 'w') as f:
for id, img in enumerate(img_lists):
img_info = ... | [
"def",
"generate_json_labels",
"(",
"src_path",
",",
"out_path",
",",
"trainval",
"=",
"True",
")",
":",
"img_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"src_path",
",",
"'images'",
")",
"label_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"sr... | Generate .json labels which is similar to coco format | [
"Generate",
".",
"json",
"labels",
"which",
"is",
"similar",
"to",
"coco",
"format"
] | [
"\"\"\"Generate .json labels which is similar to coco format\n Args:\n src_path: dataset path containing images and labelTxt folders.\n out_path: output json file path\n trainval: trainval or test?\n \"\"\""
] | [
{
"param": "src_path",
"type": null
},
{
"param": "out_path",
"type": null
},
{
"param": "trainval",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "src_path",
"type": null,
"docstring": "dataset path containing images and labelTxt folders.",
"docstring_tokens": [
"dataset",
"path",
"containing",
"images",
"and",
"labelTxt",
... |
ddd6476225e18194030071c0f9f9852ba3d1d3dd | sugarsack/sugar-sdk | sugarsdk/linting/docstring_rstcheck.py | [
"Apache-2.0"
] | Python | visit_functiondef | null | def visit_functiondef(self, node):
"""
Check if docstring always starts and ends from/by triple double-quotes
and they are on the new line.
"""
if hasattr(node, "doc") and node.doc:
out = list(rstcheck.check(node.doc.strip()))
if out:
messa... |
Check if docstring always starts and ends from/by triple double-quotes
and they are on the new line.
| Check if docstring always starts and ends from/by triple double-quotes
and they are on the new line. | [
"Check",
"if",
"docstring",
"always",
"starts",
"and",
"ends",
"from",
"/",
"by",
"triple",
"double",
"-",
"quotes",
"and",
"they",
"are",
"on",
"the",
"new",
"line",
"."
] | def visit_functiondef(self, node):
if hasattr(node, "doc") and node.doc:
out = list(rstcheck.check(node.doc.strip()))
if out:
messages = []
for errcode, msg in out:
messages.append(msg)
self.add_message("docstring-rst-fo... | [
"def",
"visit_functiondef",
"(",
"self",
",",
"node",
")",
":",
"if",
"hasattr",
"(",
"node",
",",
"\"doc\"",
")",
"and",
"node",
".",
"doc",
":",
"out",
"=",
"list",
"(",
"rstcheck",
".",
"check",
"(",
"node",
".",
"doc",
".",
"strip",
"(",
")",
... | Check if docstring always starts and ends from/by triple double-quotes
and they are on the new line. | [
"Check",
"if",
"docstring",
"always",
"starts",
"and",
"ends",
"from",
"/",
"by",
"triple",
"double",
"-",
"quotes",
"and",
"they",
"are",
"on",
"the",
"new",
"line",
"."
] | [
"\"\"\"\n Check if docstring always starts and ends from/by triple double-quotes\n and they are on the new line.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "node",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "node",
"type": null,
"docstring": null,
"docstring_tokens": [... |
ddd6476225e18194030071c0f9f9852ba3d1d3dd | sugarsack/sugar-sdk | sugarsdk/linting/docstring_rstcheck.py | [
"Apache-2.0"
] | Python | register | null | def register(linter):
"""
Required method to auto register this checker
"""
linter.register_checker(DocstringRSTChecker(linter)) |
Required method to auto register this checker
| Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | def register(linter):
linter.register_checker(DocstringRSTChecker(linter)) | [
"def",
"register",
"(",
"linter",
")",
":",
"linter",
".",
"register_checker",
"(",
"DocstringRSTChecker",
"(",
"linter",
")",
")"
] | Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | [
"\"\"\"\n Required method to auto register this checker\n \"\"\""
] | [
{
"param": "linter",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "linter",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
2a30826ee5e8e63edd43d8d7004ad48d5c96c036 | sugarsack/sugar-sdk | sugarsdk/linting/pep287.py | [
"Apache-2.0"
] | Python | _cleanup_spaces | <not_specific> | def _cleanup_spaces(self, data):
"""
Remove double- or more spaces into one.
:param data:
:return:
"""
return re.sub(r"\s+", " ", data) |
Remove double- or more spaces into one.
:param data:
:return:
| Remove double- or more spaces into one. | [
"Remove",
"double",
"-",
"or",
"more",
"spaces",
"into",
"one",
"."
] | def _cleanup_spaces(self, data):
return re.sub(r"\s+", " ", data) | [
"def",
"_cleanup_spaces",
"(",
"self",
",",
"data",
")",
":",
"return",
"re",
".",
"sub",
"(",
"r\"\\s+\"",
",",
"\" \"",
",",
"data",
")"
] | Remove double- or more spaces into one. | [
"Remove",
"double",
"-",
"or",
"more",
"spaces",
"into",
"one",
"."
] | [
"\"\"\"\n Remove double- or more spaces into one.\n\n :param data:\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "data",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
2a30826ee5e8e63edd43d8d7004ad48d5c96c036 | sugarsack/sugar-sdk | sugarsdk/linting/pep287.py | [
"Apache-2.0"
] | Python | _check_raises_described | null | def _check_raises_described(self, node, raised):
"""
Check if 'raises' is properly documented.
:param doc:
:return:
"""
for line in node.doc.strip().split(os.linesep):
line = line.strip()
if line.startswith(":raises "):
exc_name = ... |
Check if 'raises' is properly documented.
:param doc:
:return:
| Check if 'raises' is properly documented. | [
"Check",
"if",
"'",
"raises",
"'",
"is",
"properly",
"documented",
"."
] | def _check_raises_described(self, node, raised):
for line in node.doc.strip().split(os.linesep):
line = line.strip()
if line.startswith(":raises "):
exc_name = line.split(" ", 1)[-1].split(" ", 1)
if len(exc_name) == 1:
self.add_message... | [
"def",
"_check_raises_described",
"(",
"self",
",",
"node",
",",
"raised",
")",
":",
"for",
"line",
"in",
"node",
".",
"doc",
".",
"strip",
"(",
")",
".",
"split",
"(",
"os",
".",
"linesep",
")",
":",
"line",
"=",
"line",
".",
"strip",
"(",
")",
... | Check if 'raises' is properly documented. | [
"Check",
"if",
"'",
"raises",
"'",
"is",
"properly",
"documented",
"."
] | [
"\"\"\"\n Check if 'raises' is properly documented.\n\n :param doc:\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "node",
"type": null
},
{
"param": "raised",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
2a30826ee5e8e63edd43d8d7004ad48d5c96c036 | sugarsack/sugar-sdk | sugarsdk/linting/pep287.py | [
"Apache-2.0"
] | Python | _get_ident_len | <not_specific> | def _get_ident_len(self, line):
"""
Get ident length of the line.
:param line:
:return: int
"""
return len([True for elm in line.split(" ") if not bool(elm)]) |
Get ident length of the line.
:param line:
:return: int
| Get ident length of the line. | [
"Get",
"ident",
"length",
"of",
"the",
"line",
"."
] | def _get_ident_len(self, line):
return len([True for elm in line.split(" ") if not bool(elm)]) | [
"def",
"_get_ident_len",
"(",
"self",
",",
"line",
")",
":",
"return",
"len",
"(",
"[",
"True",
"for",
"elm",
"in",
"line",
".",
"split",
"(",
"\" \"",
")",
"if",
"not",
"bool",
"(",
"elm",
")",
"]",
")"
] | Get ident length of the line. | [
"Get",
"ident",
"length",
"of",
"the",
"line",
"."
] | [
"\"\"\"\n Get ident length of the line.\n\n :param line:\n :return: int\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "line",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
2a30826ee5e8e63edd43d8d7004ad48d5c96c036 | sugarsack/sugar-sdk | sugarsdk/linting/pep287.py | [
"Apache-2.0"
] | Python | _check_tabs | null | def _check_tabs(self, node):
"""
There shall be no tabs. Ever.
:param node: function node
:return: None
"""
if len(node.doc.split("\t")) > 1:
self.add_message("PEP287-tabs", node=node, args=(node.name, )) |
There shall be no tabs. Ever.
:param node: function node
:return: None
| There shall be no tabs. Ever. | [
"There",
"shall",
"be",
"no",
"tabs",
".",
"Ever",
"."
] | def _check_tabs(self, node):
if len(node.doc.split("\t")) > 1:
self.add_message("PEP287-tabs", node=node, args=(node.name, )) | [
"def",
"_check_tabs",
"(",
"self",
",",
"node",
")",
":",
"if",
"len",
"(",
"node",
".",
"doc",
".",
"split",
"(",
"\"\\t\"",
")",
")",
">",
"1",
":",
"self",
".",
"add_message",
"(",
"\"PEP287-tabs\"",
",",
"node",
"=",
"node",
",",
"args",
"=",
... | There shall be no tabs. | [
"There",
"shall",
"be",
"no",
"tabs",
"."
] | [
"\"\"\"\n There shall be no tabs. Ever.\n\n :param node: function node\n :return: None\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "node",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
2a30826ee5e8e63edd43d8d7004ad48d5c96c036 | sugarsack/sugar-sdk | sugarsdk/linting/pep287.py | [
"Apache-2.0"
] | Python | _check_explanation_block | null | def _check_explanation_block(self, node):
"""
Docstring should contain explanation block.
:param node: function node
:return: None
"""
docmap = []
kw_ident = -1
for idx, line in enumerate(node.doc.rstrip().split(os.linesep)):
if not idx:
... |
Docstring should contain explanation block.
:param node: function node
:return: None
| Docstring should contain explanation block. | [
"Docstring",
"should",
"contain",
"explanation",
"block",
"."
] | def _check_explanation_block(self, node):
docmap = []
kw_ident = -1
for idx, line in enumerate(node.doc.rstrip().split(os.linesep)):
if not idx:
continue
s_line = line.strip()
if not s_line:
docmap.append("-")
elif... | [
"def",
"_check_explanation_block",
"(",
"self",
",",
"node",
")",
":",
"docmap",
"=",
"[",
"]",
"kw_ident",
"=",
"-",
"1",
"for",
"idx",
",",
"line",
"in",
"enumerate",
"(",
"node",
".",
"doc",
".",
"rstrip",
"(",
")",
".",
"split",
"(",
"os",
".",... | Docstring should contain explanation block. | [
"Docstring",
"should",
"contain",
"explanation",
"block",
"."
] | [
"\"\"\"\n Docstring should contain explanation block.\n\n :param node: function node\n :return: None\n \"\"\"",
"# Skip newline after triple-quotes",
"# a = self._get_ident_len(line)"
] | [
{
"param": "self",
"type": null
},
{
"param": "node",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
2a30826ee5e8e63edd43d8d7004ad48d5c96c036 | sugarsack/sugar-sdk | sugarsdk/linting/pep287.py | [
"Apache-2.0"
] | Python | what_raises | <not_specific> | def what_raises(self, node, raises=None):
"""
Return number of raises statements in the code.
:param node: function node
:param raises: Reserved for the internal data transfer
:return: List of explicitly raised exception class names
"""
if raises is None:
... |
Return number of raises statements in the code.
:param node: function node
:param raises: Reserved for the internal data transfer
:return: List of explicitly raised exception class names
| Return number of raises statements in the code. | [
"Return",
"number",
"of",
"raises",
"statements",
"in",
"the",
"code",
"."
] | def what_raises(self, node, raises=None):
if raises is None:
raises = []
for element in node.get_children():
if isinstance(element, astroid.node_classes.Raise):
if isinstance(element.exc, astroid.node_classes.Name):
raises.append('-')
... | [
"def",
"what_raises",
"(",
"self",
",",
"node",
",",
"raises",
"=",
"None",
")",
":",
"if",
"raises",
"is",
"None",
":",
"raises",
"=",
"[",
"]",
"for",
"element",
"in",
"node",
".",
"get_children",
"(",
")",
":",
"if",
"isinstance",
"(",
"element",
... | Return number of raises statements in the code. | [
"Return",
"number",
"of",
"raises",
"statements",
"in",
"the",
"code",
"."
] | [
"\"\"\"\n Return number of raises statements in the code.\n\n :param node: function node\n :param raises: Reserved for the internal data transfer\n :return: List of explicitly raised exception class names\n \"\"\"",
"# skipper"
] | [
{
"param": "self",
"type": null
},
{
"param": "node",
"type": null
},
{
"param": "raises",
"type": null
}
] | {
"returns": [
{
"docstring": "List of explicitly raised exception class names",
"docstring_tokens": [
"List",
"of",
"explicitly",
"raised",
"exception",
"class",
"names"
],
"type": null
}
],
"raises": [],
"params": [
{
... |
2a30826ee5e8e63edd43d8d7004ad48d5c96c036 | sugarsack/sugar-sdk | sugarsdk/linting/pep287.py | [
"Apache-2.0"
] | Python | _check_raises | null | def _check_raises(self, node):
"""
Find out if a function raises something but
is not documents that or vice versa.
:param node: function node
:return: None
"""
exceptions = list(set(self.what_raises(node)))
documented = 0
self._check_raises_descr... |
Find out if a function raises something but
is not documents that or vice versa.
:param node: function node
:return: None
| Find out if a function raises something but
is not documents that or vice versa. | [
"Find",
"out",
"if",
"a",
"function",
"raises",
"something",
"but",
"is",
"not",
"documents",
"that",
"or",
"vice",
"versa",
"."
] | def _check_raises(self, node):
exceptions = list(set(self.what_raises(node)))
documented = 0
self._check_raises_described(node, raised=exceptions)
for line in node.doc.strip().split(os.linesep):
line = line.strip()
if line.startswith(":rais"):
keyw... | [
"def",
"_check_raises",
"(",
"self",
",",
"node",
")",
":",
"exceptions",
"=",
"list",
"(",
"set",
"(",
"self",
".",
"what_raises",
"(",
"node",
")",
")",
")",
"documented",
"=",
"0",
"self",
".",
"_check_raises_described",
"(",
"node",
",",
"raised",
... | Find out if a function raises something but
is not documents that or vice versa. | [
"Find",
"out",
"if",
"a",
"function",
"raises",
"something",
"but",
"is",
"not",
"documents",
"that",
"or",
"vice",
"versa",
"."
] | [
"\"\"\"\n Find out if a function raises something but\n is not documents that or vice versa.\n\n :param node: function node\n :return: None\n \"\"\"",
"# This is actually an error",
"# Here we check if there are only skippers, i.e. something is re-raised but never documented:"... | [
{
"param": "self",
"type": null
},
{
"param": "node",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
2a30826ee5e8e63edd43d8d7004ad48d5c96c036 | sugarsack/sugar-sdk | sugarsdk/linting/pep287.py | [
"Apache-2.0"
] | Python | register | null | def register(linter):
"""
Required method to auto register this checker
"""
linter.register_checker(PEP287Checker(linter)) |
Required method to auto register this checker
| Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | def register(linter):
linter.register_checker(PEP287Checker(linter)) | [
"def",
"register",
"(",
"linter",
")",
":",
"linter",
".",
"register_checker",
"(",
"PEP287Checker",
"(",
"linter",
")",
")"
] | Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | [
"\"\"\"\n Required method to auto register this checker\n \"\"\""
] | [
{
"param": "linter",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "linter",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
55b7f2ccd54a9c579b5cd640acf51ff416f86947 | sugarsack/sugar-sdk | sugarsdk/gendoc.py | [
"Apache-2.0"
] | Python | _to_rst_header_table | str | def _to_rst_header_table(self, table:str) -> str:
"""
Hack to quickly add header on Ascii table for rst.
:param table: table header
:return: table data with the header
"""
data = table.split(os.linesep)
data[2] = data[2].replace("-", "=")
return os.lines... |
Hack to quickly add header on Ascii table for rst.
:param table: table header
:return: table data with the header
| Hack to quickly add header on Ascii table for rst. | [
"Hack",
"to",
"quickly",
"add",
"header",
"on",
"Ascii",
"table",
"for",
"rst",
"."
] | def _to_rst_header_table(self, table:str) -> str:
data = table.split(os.linesep)
data[2] = data[2].replace("-", "=")
return os.linesep.join(data) | [
"def",
"_to_rst_header_table",
"(",
"self",
",",
"table",
":",
"str",
")",
"->",
"str",
":",
"data",
"=",
"table",
".",
"split",
"(",
"os",
".",
"linesep",
")",
"data",
"[",
"2",
"]",
"=",
"data",
"[",
"2",
"]",
".",
"replace",
"(",
"\"-\"",
",",... | Hack to quickly add header on Ascii table for rst. | [
"Hack",
"to",
"quickly",
"add",
"header",
"on",
"Ascii",
"table",
"for",
"rst",
"."
] | [
"\"\"\"\n Hack to quickly add header on Ascii table for rst.\n\n :param table: table header\n :return: table data with the header\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "table",
"type": "str"
}
] | {
"returns": [
{
"docstring": "table data with the header",
"docstring_tokens": [
"table",
"data",
"with",
"the",
"header"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring... |
6ac62b7c9d915ecb366419e79ac617ba3034f48f | sugarsack/sugar-sdk | sugarsdk/linting/docstring_triplequotes.py | [
"Apache-2.0"
] | Python | visit_module | null | def visit_module(self, node):
"""
Get the entire module source and see if there are triple quotes.
:param node:
:return:
"""
with open(node.file) as mod_fh:
for idx, line in enumerate(mod_fh.read().split(os.linesep)):
if "'''" in line:
... |
Get the entire module source and see if there are triple quotes.
:param node:
:return:
| Get the entire module source and see if there are triple quotes. | [
"Get",
"the",
"entire",
"module",
"source",
"and",
"see",
"if",
"there",
"are",
"triple",
"quotes",
"."
] | def visit_module(self, node):
with open(node.file) as mod_fh:
for idx, line in enumerate(mod_fh.read().split(os.linesep)):
if "'''" in line:
self.add_message("docstring-triple-double-quotes", node=node, line=idx+1) | [
"def",
"visit_module",
"(",
"self",
",",
"node",
")",
":",
"with",
"open",
"(",
"node",
".",
"file",
")",
"as",
"mod_fh",
":",
"for",
"idx",
",",
"line",
"in",
"enumerate",
"(",
"mod_fh",
".",
"read",
"(",
")",
".",
"split",
"(",
"os",
".",
"line... | Get the entire module source and see if there are triple quotes. | [
"Get",
"the",
"entire",
"module",
"source",
"and",
"see",
"if",
"there",
"are",
"triple",
"quotes",
"."
] | [
"\"\"\"\n Get the entire module source and see if there are triple quotes.\n :param node:\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "node",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
6ac62b7c9d915ecb366419e79ac617ba3034f48f | sugarsack/sugar-sdk | sugarsdk/linting/docstring_triplequotes.py | [
"Apache-2.0"
] | Python | register | null | def register(linter):
"""
Required method to auto register this checker
"""
linter.register_checker(TripleDoublequotesChecker(linter)) |
Required method to auto register this checker
| Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | def register(linter):
linter.register_checker(TripleDoublequotesChecker(linter)) | [
"def",
"register",
"(",
"linter",
")",
":",
"linter",
".",
"register_checker",
"(",
"TripleDoublequotesChecker",
"(",
"linter",
")",
")"
] | Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | [
"\"\"\"\n Required method to auto register this checker\n \"\"\""
] | [
{
"param": "linter",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "linter",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
7d490aa4728f81da29779edabeb84a8110d63f0b | sugarsack/sugar-sdk | sugarsdk/linting/docstring_single_line.py | [
"Apache-2.0"
] | Python | _check_docstring | null | def _check_docstring(self, node):
"""
Check if docstring always starts and ends from/by triple double-quotes
and they are on the new line.
:param node:
:return:
"""
if hasattr(node, "doc") and node.doc:
doc = node.doc.strip("\t").strip(" ")
... |
Check if docstring always starts and ends from/by triple double-quotes
and they are on the new line.
:param node:
:return:
| Check if docstring always starts and ends from/by triple double-quotes
and they are on the new line. | [
"Check",
"if",
"docstring",
"always",
"starts",
"and",
"ends",
"from",
"/",
"by",
"triple",
"double",
"-",
"quotes",
"and",
"they",
"are",
"on",
"the",
"new",
"line",
"."
] | def _check_docstring(self, node):
if hasattr(node, "doc") and node.doc:
doc = node.doc.strip("\t").strip(" ")
msg = None
if not doc.startswith(os.linesep):
msg = "should start with the newline after triple double-quotes"
if not doc.endswith(os.line... | [
"def",
"_check_docstring",
"(",
"self",
",",
"node",
")",
":",
"if",
"hasattr",
"(",
"node",
",",
"\"doc\"",
")",
"and",
"node",
".",
"doc",
":",
"doc",
"=",
"node",
".",
"doc",
".",
"strip",
"(",
"\"\\t\"",
")",
".",
"strip",
"(",
"\" \"",
")",
... | Check if docstring always starts and ends from/by triple double-quotes
and they are on the new line. | [
"Check",
"if",
"docstring",
"always",
"starts",
"and",
"ends",
"from",
"/",
"by",
"triple",
"double",
"-",
"quotes",
"and",
"they",
"are",
"on",
"the",
"new",
"line",
"."
] | [
"\"\"\"\n Check if docstring always starts and ends from/by triple double-quotes\n and they are on the new line.\n\n :param node:\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "node",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
7d490aa4728f81da29779edabeb84a8110d63f0b | sugarsack/sugar-sdk | sugarsdk/linting/docstring_single_line.py | [
"Apache-2.0"
] | Python | register | null | def register(linter):
"""
Required method to auto register this checker
"""
linter.register_checker(DocstringNewlineChecker(linter)) |
Required method to auto register this checker
| Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | def register(linter):
linter.register_checker(DocstringNewlineChecker(linter)) | [
"def",
"register",
"(",
"linter",
")",
":",
"linter",
".",
"register_checker",
"(",
"DocstringNewlineChecker",
"(",
"linter",
")",
")"
] | Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | [
"\"\"\"\n Required method to auto register this checker\n \"\"\""
] | [
{
"param": "linter",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "linter",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
7d5aba10f8919869dd65b3ca6bb18707a4f07707 | sugarsack/sugar-sdk | sugarsdk/modgen.py | [
"Apache-2.0"
] | Python | _get_common_resource | <not_specific> | def _get_common_resource(self, prefix, resource, namespace):
"""
Get corresponding resource and apply the namespace.
"""
return jinja2.Template(sugarsdk.utils.get_template("{}_{}".format(prefix, resource))).render(**namespace) |
Get corresponding resource and apply the namespace.
| Get corresponding resource and apply the namespace. | [
"Get",
"corresponding",
"resource",
"and",
"apply",
"the",
"namespace",
"."
] | def _get_common_resource(self, prefix, resource, namespace):
return jinja2.Template(sugarsdk.utils.get_template("{}_{}".format(prefix, resource))).render(**namespace) | [
"def",
"_get_common_resource",
"(",
"self",
",",
"prefix",
",",
"resource",
",",
"namespace",
")",
":",
"return",
"jinja2",
".",
"Template",
"(",
"sugarsdk",
".",
"utils",
".",
"get_template",
"(",
"\"{}_{}\"",
".",
"format",
"(",
"prefix",
",",
"resource",
... | Get corresponding resource and apply the namespace. | [
"Get",
"corresponding",
"resource",
"and",
"apply",
"the",
"namespace",
"."
] | [
"\"\"\"\n Get corresponding resource and apply the namespace.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "prefix",
"type": null
},
{
"param": "resource",
"type": null
},
{
"param": "namespace",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "prefix",
"type": null,
"docstring": null,
"docstring_tokens":... |
7d5aba10f8919869dd65b3ca6bb18707a4f07707 | sugarsack/sugar-sdk | sugarsdk/modgen.py | [
"Apache-2.0"
] | Python | _create_runner_tree | null | def _create_runner_tree(self, root):
"""
Create a tree of the state module, if it does not exists yet.
"""
if not os.path.exists(root):
os.makedirs(root)
for rs_name in [self.RS_INIT, self.RS_EXAMPLES, self.RS_DOCUMENTATION, self.RS_INTERFACE]:
se... |
Create a tree of the state module, if it does not exists yet.
| Create a tree of the state module, if it does not exists yet. | [
"Create",
"a",
"tree",
"of",
"the",
"state",
"module",
"if",
"it",
"does",
"not",
"exists",
"yet",
"."
] | def _create_runner_tree(self, root):
if not os.path.exists(root):
os.makedirs(root)
for rs_name in [self.RS_INIT, self.RS_EXAMPLES, self.RS_DOCUMENTATION, self.RS_INTERFACE]:
self._add_resource(root, rs_name)
root = os.path.join(root, "_impl")
os.m... | [
"def",
"_create_runner_tree",
"(",
"self",
",",
"root",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"root",
")",
":",
"os",
".",
"makedirs",
"(",
"root",
")",
"for",
"rs_name",
"in",
"[",
"self",
".",
"RS_INIT",
",",
"self",
".",
... | Create a tree of the state module, if it does not exists yet. | [
"Create",
"a",
"tree",
"of",
"the",
"state",
"module",
"if",
"it",
"does",
"not",
"exists",
"yet",
"."
] | [
"\"\"\"\n Create a tree of the state module, if it does not exists yet.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "root",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "root",
"type": null,
"docstring": null,
"docstring_tokens": [... |
7d5aba10f8919869dd65b3ca6bb18707a4f07707 | sugarsack/sugar-sdk | sugarsdk/modgen.py | [
"Apache-2.0"
] | Python | _create_state_tree | null | def _create_state_tree(self, root):
"""
Create a tree of the state module, if if does not exists yet.
:param root:
:return:
"""
if not os.path.exists(root):
os.makedirs(root)
for rs_name in [self.RS_INIT, self.RS_EXAMPLES, self.RS_DOCUMENTATION, s... |
Create a tree of the state module, if if does not exists yet.
:param root:
:return:
| Create a tree of the state module, if if does not exists yet. | [
"Create",
"a",
"tree",
"of",
"the",
"state",
"module",
"if",
"if",
"does",
"not",
"exists",
"yet",
"."
] | def _create_state_tree(self, root):
if not os.path.exists(root):
os.makedirs(root)
for rs_name in [self.RS_INIT, self.RS_EXAMPLES, self.RS_DOCUMENTATION, self.RS_IMPLEMENTATION]:
self._add_resource(root, rs_name)
else:
raise IOError("Path '{}' already ... | [
"def",
"_create_state_tree",
"(",
"self",
",",
"root",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"root",
")",
":",
"os",
".",
"makedirs",
"(",
"root",
")",
"for",
"rs_name",
"in",
"[",
"self",
".",
"RS_INIT",
",",
"self",
".",
... | Create a tree of the state module, if if does not exists yet. | [
"Create",
"a",
"tree",
"of",
"the",
"state",
"module",
"if",
"if",
"does",
"not",
"exists",
"yet",
"."
] | [
"\"\"\"\n Create a tree of the state module, if if does not exists yet.\n\n :param root:\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "root",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
7d5aba10f8919869dd65b3ca6bb18707a4f07707 | sugarsack/sugar-sdk | sugarsdk/modgen.py | [
"Apache-2.0"
] | Python | generate | null | def generate(self):
"""
Generate a module (runner or state).
"""
mod_path = self._get_module_path()
if self._cli_args.type == "runner":
self._create_runner_tree(mod_path)
print("Runner module has been generated to", mod_path)
elif self._cli_args.ty... |
Generate a module (runner or state).
| Generate a module (runner or state). | [
"Generate",
"a",
"module",
"(",
"runner",
"or",
"state",
")",
"."
] | def generate(self):
mod_path = self._get_module_path()
if self._cli_args.type == "runner":
self._create_runner_tree(mod_path)
print("Runner module has been generated to", mod_path)
elif self._cli_args.type == "state":
self._create_state_tree(mod_path)
... | [
"def",
"generate",
"(",
"self",
")",
":",
"mod_path",
"=",
"self",
".",
"_get_module_path",
"(",
")",
"if",
"self",
".",
"_cli_args",
".",
"type",
"==",
"\"runner\"",
":",
"self",
".",
"_create_runner_tree",
"(",
"mod_path",
")",
"print",
"(",
"\"Runner mo... | Generate a module (runner or state). | [
"Generate",
"a",
"module",
"(",
"runner",
"or",
"state",
")",
"."
] | [
"\"\"\"\n Generate a module (runner or state).\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
20748f08a64b2ec773443869d2d827fa751b344e | sugarsack/sugar-sdk | sugarsdk/linting/multireturns.py | [
"Apache-2.0"
] | Python | visit_functiondef | null | def visit_functiondef(self, node):
"""
Checks for presence of return statement at the end of a function
"return" or "return None" are useless because None is the default
return type if they are missing
"""
if node.body and self.collect_returns(node) > 1:
self.... |
Checks for presence of return statement at the end of a function
"return" or "return None" are useless because None is the default
return type if they are missing
| Checks for presence of return statement at the end of a function
"return" or "return None" are useless because None is the default
return type if they are missing | [
"Checks",
"for",
"presence",
"of",
"return",
"statement",
"at",
"the",
"end",
"of",
"a",
"function",
"\"",
"return",
"\"",
"or",
"\"",
"return",
"None",
"\"",
"are",
"useless",
"because",
"None",
"is",
"the",
"default",
"return",
"type",
"if",
"they",
"a... | def visit_functiondef(self, node):
if node.body and self.collect_returns(node) > 1:
self.add_message("multiple-return-statements", node=node) | [
"def",
"visit_functiondef",
"(",
"self",
",",
"node",
")",
":",
"if",
"node",
".",
"body",
"and",
"self",
".",
"collect_returns",
"(",
"node",
")",
">",
"1",
":",
"self",
".",
"add_message",
"(",
"\"multiple-return-statements\"",
",",
"node",
"=",
"node",
... | Checks for presence of return statement at the end of a function
"return" or "return None" are useless because None is the default
return type if they are missing | [
"Checks",
"for",
"presence",
"of",
"return",
"statement",
"at",
"the",
"end",
"of",
"a",
"function",
"\"",
"return",
"\"",
"or",
"\"",
"return",
"None",
"\"",
"are",
"useless",
"because",
"None",
"is",
"the",
"default",
"return",
"type",
"if",
"they",
"a... | [
"\"\"\"\n Checks for presence of return statement at the end of a function\n \"return\" or \"return None\" are useless because None is the default\n return type if they are missing\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "node",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "node",
"type": null,
"docstring": null,
"docstring_tokens": [... |
20748f08a64b2ec773443869d2d827fa751b344e | sugarsack/sugar-sdk | sugarsdk/linting/multireturns.py | [
"Apache-2.0"
] | Python | register | null | def register(linter):
"""
Required method to auto register this checker
"""
linter.register_checker(MultipleReturnChecker(linter)) |
Required method to auto register this checker
| Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | def register(linter):
linter.register_checker(MultipleReturnChecker(linter)) | [
"def",
"register",
"(",
"linter",
")",
":",
"linter",
".",
"register_checker",
"(",
"MultipleReturnChecker",
"(",
"linter",
")",
")"
] | Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | [
"\"\"\"\n Required method to auto register this checker\n \"\"\""
] | [
{
"param": "linter",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "linter",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
899bdea301ed4e2ddb410314fbf546d42e716b34 | sugarsack/sugar-sdk | sugarsdk/linting/pep8_emptylines.py | [
"Apache-2.0"
] | Python | register | null | def register(linter):
"""
Required method to auto register this checker
"""
linter.register_checker(PEP8EmptyLinesChecker(linter)) |
Required method to auto register this checker
| Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | def register(linter):
linter.register_checker(PEP8EmptyLinesChecker(linter)) | [
"def",
"register",
"(",
"linter",
")",
":",
"linter",
".",
"register_checker",
"(",
"PEP8EmptyLinesChecker",
"(",
"linter",
")",
")"
] | Required method to auto register this checker | [
"Required",
"method",
"to",
"auto",
"register",
"this",
"checker"
] | [
"\"\"\"\n Required method to auto register this checker\n \"\"\""
] | [
{
"param": "linter",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "linter",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
40265256563acc20ca931a62fdd503d5f0c6c0d6 | sugarsack/sugar-sdk | sugarsdk/modval.py | [
"Apache-2.0"
] | Python | _get_runner_meta | <not_specific> | def _get_runner_meta(self, uri):
"""
Get doc, schema and examples of a runner.
:param uri:
:return:
"""
mod_type = self._cli_args.type
mod_path = os.path.join(self._runner_module_loader.root_path, os.path.sep.join(uri.split(".")))
doc_path = os.path.join... |
Get doc, schema and examples of a runner.
:param uri:
:return:
| Get doc, schema and examples of a runner. | [
"Get",
"doc",
"schema",
"and",
"examples",
"of",
"a",
"runner",
"."
] | def _get_runner_meta(self, uri):
mod_type = self._cli_args.type
mod_path = os.path.join(self._runner_module_loader.root_path, os.path.sep.join(uri.split(".")))
doc_path = os.path.join(mod_path, "doc.yaml")
xpl_path = os.path.join(mod_path, "examples.yaml")
scm_path = os.path.join... | [
"def",
"_get_runner_meta",
"(",
"self",
",",
"uri",
")",
":",
"mod_type",
"=",
"self",
".",
"_cli_args",
".",
"type",
"mod_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"_runner_module_loader",
".",
"root_path",
",",
"os",
".",
"path",
... | Get doc, schema and examples of a runner. | [
"Get",
"doc",
"schema",
"and",
"examples",
"of",
"a",
"runner",
"."
] | [
"\"\"\"\n Get doc, schema and examples of a runner.\n\n :param uri:\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "uri",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
40265256563acc20ca931a62fdd503d5f0c6c0d6 | sugarsack/sugar-sdk | sugarsdk/modval.py | [
"Apache-2.0"
] | Python | _get_runner_interface | <not_specific> | def _get_runner_interface(self, uri):
"""
Get parsed runner interface source.
:param uri:
:return:
"""
ifc = {}
ifc_path = os.path.join(self._runner_module_loader.root_path, os.path.sep.join(uri.split(".")), "interface.py")
with sugar.utils.files.fopen(if... |
Get parsed runner interface source.
:param uri:
:return:
| Get parsed runner interface source. | [
"Get",
"parsed",
"runner",
"interface",
"source",
"."
] | def _get_runner_interface(self, uri):
ifc = {}
ifc_path = os.path.join(self._runner_module_loader.root_path, os.path.sep.join(uri.split(".")), "interface.py")
with sugar.utils.files.fopen(ifc_path) as src_h:
ifc["interface"] = astroid.parse(src_h.read())
return ifc | [
"def",
"_get_runner_interface",
"(",
"self",
",",
"uri",
")",
":",
"ifc",
"=",
"{",
"}",
"ifc_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"_runner_module_loader",
".",
"root_path",
",",
"os",
".",
"path",
".",
"sep",
".",
"join",
"(... | Get parsed runner interface source. | [
"Get",
"parsed",
"runner",
"interface",
"source",
"."
] | [
"\"\"\"\n Get parsed runner interface source.\n\n :param uri:\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "uri",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
40265256563acc20ca931a62fdd503d5f0c6c0d6 | sugarsack/sugar-sdk | sugarsdk/modval.py | [
"Apache-2.0"
] | Python | _get_runner_implementations | <not_specific> | def _get_runner_implementations(self, ifc, uri):
"""
Get parsed runner implementations source.
:param uri:
:return:
"""
for node in ifc["interface"].body:
if isinstance(node, astroid.ClassDef):
ifc = node
break
imps = {... |
Get parsed runner implementations source.
:param uri:
:return:
| Get parsed runner implementations source. | [
"Get",
"parsed",
"runner",
"implementations",
"source",
"."
] | def _get_runner_implementations(self, ifc, uri):
for node in ifc["interface"].body:
if isinstance(node, astroid.ClassDef):
ifc = node
break
imps = {ifc: []}
imp_path = os.path.join(self._runner_module_loader.root_path, os.path.sep.join(uri.split(".")),... | [
"def",
"_get_runner_implementations",
"(",
"self",
",",
"ifc",
",",
"uri",
")",
":",
"for",
"node",
"in",
"ifc",
"[",
"\"interface\"",
"]",
".",
"body",
":",
"if",
"isinstance",
"(",
"node",
",",
"astroid",
".",
"ClassDef",
")",
":",
"ifc",
"=",
"node"... | Get parsed runner implementations source. | [
"Get",
"parsed",
"runner",
"implementations",
"source",
"."
] | [
"\"\"\"\n Get parsed runner implementations source.\n\n :param uri:\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "ifc",
"type": null
},
{
"param": "uri",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
40265256563acc20ca931a62fdd503d5f0c6c0d6 | sugarsack/sugar-sdk | sugarsdk/modval.py | [
"Apache-2.0"
] | Python | _runner_cmp_meta | null | def _runner_cmp_meta(self, ifc, meta, uri):
"""
Compare meta to the interface.
:param ifc: interface
:param meta: meta (doc/examples/scheme)
:param uri: URI of the module.
:return:
"""
mod_type = self._cli_args.type
methods = []
for node i... |
Compare meta to the interface.
:param ifc: interface
:param meta: meta (doc/examples/scheme)
:param uri: URI of the module.
:return:
| Compare meta to the interface. | [
"Compare",
"meta",
"to",
"the",
"interface",
"."
] | def _runner_cmp_meta(self, ifc, meta, uri):
mod_type = self._cli_args.type
methods = []
for node in ifc["interface"].body:
if isinstance(node, astroid.ClassDef):
for func_node in node.body:
methods.append(func_node)
self._console.info("Veri... | [
"def",
"_runner_cmp_meta",
"(",
"self",
",",
"ifc",
",",
"meta",
",",
"uri",
")",
":",
"mod_type",
"=",
"self",
".",
"_cli_args",
".",
"type",
"methods",
"=",
"[",
"]",
"for",
"node",
"in",
"ifc",
"[",
"\"interface\"",
"]",
".",
"body",
":",
"if",
... | Compare meta to the interface. | [
"Compare",
"meta",
"to",
"the",
"interface",
"."
] | [
"\"\"\"\n Compare meta to the interface.\n\n :param ifc: interface\n :param meta: meta (doc/examples/scheme)\n :param uri: URI of the module.\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "ifc",
"type": null
},
{
"param": "meta",
"type": null
},
{
"param": "uri",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
40265256563acc20ca931a62fdd503d5f0c6c0d6 | sugarsack/sugar-sdk | sugarsdk/modval.py | [
"Apache-2.0"
] | Python | _common_cmp_signature | null | def _common_cmp_signature(self, uri, node, doc):
"""
Compare if the function is the same as the documentation.
:param node: astroid function node object
:param doc: documentation for that node
:return: None
"""
mod_type = self._cli_args.type
if "parameter... |
Compare if the function is the same as the documentation.
:param node: astroid function node object
:param doc: documentation for that node
:return: None
| Compare if the function is the same as the documentation. | [
"Compare",
"if",
"the",
"function",
"is",
"the",
"same",
"as",
"the",
"documentation",
"."
] | def _common_cmp_signature(self, uri, node, doc):
mod_type = self._cli_args.type
if "parameters" not in doc:
self.errors.append(("Documentation of the {} module '{}' has no parameters section", (mod_type, uri)))
if node.args.vararg:
self.infos.append(("Not so good: implici... | [
"def",
"_common_cmp_signature",
"(",
"self",
",",
"uri",
",",
"node",
",",
"doc",
")",
":",
"mod_type",
"=",
"self",
".",
"_cli_args",
".",
"type",
"if",
"\"parameters\"",
"not",
"in",
"doc",
":",
"self",
".",
"errors",
".",
"append",
"(",
"(",
"\"Docu... | Compare if the function is the same as the documentation. | [
"Compare",
"if",
"the",
"function",
"is",
"the",
"same",
"as",
"the",
"documentation",
"."
] | [
"\"\"\"\n Compare if the function is the same as the documentation.\n\n :param node: astroid function node object\n :param doc: documentation for that node\n :return: None\n \"\"\"",
"# Get a map of non-required attrs in signature",
"# Get a map of required attrs in doc"
] | [
{
"param": "self",
"type": null
},
{
"param": "uri",
"type": null
},
{
"param": "node",
"type": null
},
{
"param": "doc",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
40265256563acc20ca931a62fdd503d5f0c6c0d6 | sugarsack/sugar-sdk | sugarsdk/modval.py | [
"Apache-2.0"
] | Python | _runner_cmp_impl | null | def _runner_cmp_impl(self, impl: dict, uri: str):
"""
Compare implementations to the interface.
:param impl: interface to implementations map
:param uri: URI of the module
:return:
"""
ifc = next(iter(impl))
ifc_func_names = [node.name for node in ifc.bod... |
Compare implementations to the interface.
:param impl: interface to implementations map
:param uri: URI of the module
:return:
| Compare implementations to the interface. | [
"Compare",
"implementations",
"to",
"the",
"interface",
"."
] | def _runner_cmp_impl(self, impl: dict, uri: str):
ifc = next(iter(impl))
ifc_func_names = [node.name for node in ifc.body]
for cls_impl, fname in impl[ifc]:
impl_func_names = [node.name for node in cls_impl.body]
for ifc_fname in ifc_func_names:
if ifc_fna... | [
"def",
"_runner_cmp_impl",
"(",
"self",
",",
"impl",
":",
"dict",
",",
"uri",
":",
"str",
")",
":",
"ifc",
"=",
"next",
"(",
"iter",
"(",
"impl",
")",
")",
"ifc_func_names",
"=",
"[",
"node",
".",
"name",
"for",
"node",
"in",
"ifc",
".",
"body",
... | Compare implementations to the interface. | [
"Compare",
"implementations",
"to",
"the",
"interface",
"."
] | [
"\"\"\"\n Compare implementations to the interface.\n\n :param impl: interface to implementations map\n :param uri: URI of the module\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "impl",
"type": "dict"
},
{
"param": "uri",
"type": "str"
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
40265256563acc20ca931a62fdd503d5f0c6c0d6 | sugarsack/sugar-sdk | sugarsdk/modval.py | [
"Apache-2.0"
] | Python | _validate_runner_by_uri | null | def _validate_runner_by_uri(self, uri):
"""
Validate a runner module by uri.
:param uri:
:return: tuple of infos warnings and errors
"""
meta = self._get_runner_meta(uri)
self._console.info(" ...get meta ({})", ', '.join(list(meta.keys())))
interface = s... |
Validate a runner module by uri.
:param uri:
:return: tuple of infos warnings and errors
| Validate a runner module by uri. | [
"Validate",
"a",
"runner",
"module",
"by",
"uri",
"."
] | def _validate_runner_by_uri(self, uri):
meta = self._get_runner_meta(uri)
self._console.info(" ...get meta ({})", ', '.join(list(meta.keys())))
interface = self._get_runner_interface(uri)
self._console.info(" ...get interface")
implementations = self._get_runner_implementations... | [
"def",
"_validate_runner_by_uri",
"(",
"self",
",",
"uri",
")",
":",
"meta",
"=",
"self",
".",
"_get_runner_meta",
"(",
"uri",
")",
"self",
".",
"_console",
".",
"info",
"(",
"\" ...get meta ({})\"",
",",
"', '",
".",
"join",
"(",
"list",
"(",
"meta",
"... | Validate a runner module by uri. | [
"Validate",
"a",
"runner",
"module",
"by",
"uri",
"."
] | [
"\"\"\"\n Validate a runner module by uri.\n\n :param uri:\n :return: tuple of infos warnings and errors\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "uri",
"type": null
}
] | {
"returns": [
{
"docstring": "tuple of infos warnings and errors",
"docstring_tokens": [
"tuple",
"of",
"infos",
"warnings",
"and",
"errors"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"ty... |
40265256563acc20ca931a62fdd503d5f0c6c0d6 | sugarsack/sugar-sdk | sugarsdk/modval.py | [
"Apache-2.0"
] | Python | _validate_state_by_uri | null | def _validate_state_by_uri(self, uri):
"""
Validate a state module by uri.
:param uri:
:return: tuple of infos warnings and errors
""" |
Validate a state module by uri.
:param uri:
:return: tuple of infos warnings and errors
| Validate a state module by uri. | [
"Validate",
"a",
"state",
"module",
"by",
"uri",
"."
] | def _validate_state_by_uri(self, uri): | [
"def",
"_validate_state_by_uri",
"(",
"self",
",",
"uri",
")",
":"
] | Validate a state module by uri. | [
"Validate",
"a",
"state",
"module",
"by",
"uri",
"."
] | [
"\"\"\"\n Validate a state module by uri.\n\n :param uri:\n :return: tuple of infos warnings and errors\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "uri",
"type": null
}
] | {
"returns": [
{
"docstring": "tuple of infos warnings and errors",
"docstring_tokens": [
"tuple",
"of",
"infos",
"warnings",
"and",
"errors"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"ty... |
40265256563acc20ca931a62fdd503d5f0c6c0d6 | sugarsack/sugar-sdk | sugarsdk/modval.py | [
"Apache-2.0"
] | Python | report | <not_specific> | def report(self):
"""
Print report and return an exit code.
:return:
"""
print()
if self.infos:
sys.stdout.write(self._title.paint("information") + os.linesep)
for msg, args in self.infos:
self._console.info(msg, *args)
if self.war... |
Print report and return an exit code.
:return:
| Print report and return an exit code. | [
"Print",
"report",
"and",
"return",
"an",
"exit",
"code",
"."
] | def report(self):
print()
if self.infos:
sys.stdout.write(self._title.paint("information") + os.linesep)
for msg, args in self.infos:
self._console.info(msg, *args)
if self.warnings:
print()
sys.stdout.write(self._title.paint("warnings") + ... | [
"def",
"report",
"(",
"self",
")",
":",
"print",
"(",
")",
"if",
"self",
".",
"infos",
":",
"sys",
".",
"stdout",
".",
"write",
"(",
"self",
".",
"_title",
".",
"paint",
"(",
"\"information\"",
")",
"+",
"os",
".",
"linesep",
")",
"for",
"msg",
"... | Print report and return an exit code. | [
"Print",
"report",
"and",
"return",
"an",
"exit",
"code",
"."
] | [
"\"\"\"\n Print report and return an exit code.\n\n :return:\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
fb99d4c422b2c2deee1b0317d6272e605cf1c7a0 | Nikronic/Places365-Preprocessing | train_template.py | [
"MIT"
] | Python | show_sample | null | def show_sample(max_len):
"""
Shows some samples and their sizes as tensor to see how preprocessing works
:param max_len: number of samples to show
:return: None -> print some data on console
"""
for i in range(len(train_dataset)):
sample = train_dataset[i]
X = sample['X']
... |
Shows some samples and their sizes as tensor to see how preprocessing works
:param max_len: number of samples to show
:return: None -> print some data on console
| Shows some samples and their sizes as tensor to see how preprocessing works | [
"Shows",
"some",
"samples",
"and",
"their",
"sizes",
"as",
"tensor",
"to",
"see",
"how",
"preprocessing",
"works"
] | def show_sample(max_len):
for i in range(len(train_dataset)):
sample = train_dataset[i]
X = sample['X']
y_d = sample['y_descreen']
y_e = sample['y_edge']
print(i)
print(type(X), X.size())
print(type(y_d), y_d.size())
print(type(y_e), y_e.size())
... | [
"def",
"show_sample",
"(",
"max_len",
")",
":",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"train_dataset",
")",
")",
":",
"sample",
"=",
"train_dataset",
"[",
"i",
"]",
"X",
"=",
"sample",
"[",
"'X'",
"]",
"y_d",
"=",
"sample",
"[",
"'y_descreen'",... | Shows some samples and their sizes as tensor to see how preprocessing works | [
"Shows",
"some",
"samples",
"and",
"their",
"sizes",
"as",
"tensor",
"to",
"see",
"how",
"preprocessing",
"works"
] | [
"\"\"\"\n Shows some samples and their sizes as tensor to see how preprocessing works\n :param max_len: number of samples to show\n :return: None -> print some data on console\n \"\"\""
] | [
{
"param": "max_len",
"type": null
}
] | {
"returns": [
{
"docstring": "> print some data on console",
"docstring_tokens": [
">",
"print",
"some",
"data",
"on",
"console"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "max_len",
"type": null... |
7b0aee15734a22103107ea3435fc4ae0cc24c4e1 | jeremyforest/whole_optic_analysis_pipeline | OPTIMAS/classical_ephy.py | [
"MIT"
] | Python | load_json_timing_data | <not_specific> | def load_json_timing_data(path_output, experiment):
"""
This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored.
Input: path of the json file and the experiment folder number as input.
Output: timings, each in their own variable
"""
with op... |
This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored.
Input: path of the json file and the experiment folder number as input.
Output: timings, each in their own variable
| This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored.
Input: path of the json file and the experiment folder number as input.
Output: timings, each in their own variable | [
"This",
"function",
"allows",
"to",
"load",
"the",
"json",
"file",
"where",
"the",
"timings",
"of",
"the",
"laser",
"dlp",
"camera",
"and",
"ephys",
"are",
"stored",
".",
"Input",
":",
"path",
"of",
"the",
"json",
"file",
"and",
"the",
"experiment",
"fol... | def load_json_timing_data(path_output, experiment):
with open(f'{path_output}experiment_{experiment}_timings.json') as file:
timings_data = dict(json.load(file))
timings_dlp_on = timings_data['dlp']['on']
timings_dlp_off = timings_data['dlp']['off']
timings_laser_on = timings_data['laser']['on']... | [
"def",
"load_json_timing_data",
"(",
"path_output",
",",
"experiment",
")",
":",
"with",
"open",
"(",
"f'{path_output}experiment_{experiment}_timings.json'",
")",
"as",
"file",
":",
"timings_data",
"=",
"dict",
"(",
"json",
".",
"load",
"(",
"file",
")",
")",
"t... | This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored. | [
"This",
"function",
"allows",
"to",
"load",
"the",
"json",
"file",
"where",
"the",
"timings",
"of",
"the",
"laser",
"dlp",
"camera",
"and",
"ephys",
"are",
"stored",
"."
] | [
"\"\"\"\n This function allows to load the json file where the timings of the laser, dlp, camera\n and ephys are stored.\n Input: path of the json file and the experiment folder number as input.\n Output: timings, each in their own variable\n \"\"\"",
"## timings of the images as per the dcam api",... | [
{
"param": "path_output",
"type": null
},
{
"param": "experiment",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "path_output",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "experiment",
"type": null,
"docstring": null,
"docstri... |
75b73eec6df3ebfe8d26d3b490e8364f1e938413 | jeremyforest/whole_optic_analysis_pipeline | OPTIMAS/utils/files_handling.py | [
"MIT"
] | Python | read_image_size | <not_specific> | def read_image_size(json_file_path):
"""
Open json file, read the image size and bin width to determine actuale
images size in x and y dimensions
input: json file path
output: tuple (image size x, image size y)
"""
with open(json_file_path) as f:
data = json.load(f)
image_bin = d... |
Open json file, read the image size and bin width to determine actuale
images size in x and y dimensions
input: json file path
output: tuple (image size x, image size y)
| Open json file, read the image size and bin width to determine actuale
images size in x and y dimensions
input: json file path
output: tuple (image size x, image size y) | [
"Open",
"json",
"file",
"read",
"the",
"image",
"size",
"and",
"bin",
"width",
"to",
"determine",
"actuale",
"images",
"size",
"in",
"x",
"and",
"y",
"dimensions",
"input",
":",
"json",
"file",
"path",
"output",
":",
"tuple",
"(",
"image",
"size",
"x",
... | def read_image_size(json_file_path):
with open(json_file_path) as f:
data = json.load(f)
image_bin = data['binning'][0]
image_size_x, image_size_y = data['fov'][0][1], data['fov'][0][3]
return (int(image_size_x/image_bin), int(image_size_y/image_bin)) | [
"def",
"read_image_size",
"(",
"json_file_path",
")",
":",
"with",
"open",
"(",
"json_file_path",
")",
"as",
"f",
":",
"data",
"=",
"json",
".",
"load",
"(",
"f",
")",
"image_bin",
"=",
"data",
"[",
"'binning'",
"]",
"[",
"0",
"]",
"image_size_x",
",",... | Open json file, read the image size and bin width to determine actuale
images size in x and y dimensions
input: json file path
output: tuple (image size x, image size y) | [
"Open",
"json",
"file",
"read",
"the",
"image",
"size",
"and",
"bin",
"width",
"to",
"determine",
"actuale",
"images",
"size",
"in",
"x",
"and",
"y",
"dimensions",
"input",
":",
"json",
"file",
"path",
"output",
":",
"tuple",
"(",
"image",
"size",
"x",
... | [
"\"\"\"\n Open json file, read the image size and bin width to determine actuale\n images size in x and y dimensions\n input: json file path\n output: tuple (image size x, image size y)\n \"\"\""
] | [
{
"param": "json_file_path",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "json_file_path",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
75b73eec6df3ebfe8d26d3b490e8364f1e938413 | jeremyforest/whole_optic_analysis_pipeline | OPTIMAS/utils/files_handling.py | [
"MIT"
] | Python | images_list | <not_specific> | def images_list(folder, extension="png", data_type='raw'):
"""
If the npy file names have no leading zeros then the list is not ordered
correctly. This serve to create an ordered list from the length of the
number of files in the folder.
input: folder path
output: ordered npy file name list
... |
If the npy file names have no leading zeros then the list is not ordered
correctly. This serve to create an ordered list from the length of the
number of files in the folder.
input: folder path
output: ordered npy file name list
| If the npy file names have no leading zeros then the list is not ordered
correctly. This serve to create an ordered list from the length of the
number of files in the folder.
input: folder path
output: ordered npy file name list | [
"If",
"the",
"npy",
"file",
"names",
"have",
"no",
"leading",
"zeros",
"then",
"the",
"list",
"is",
"not",
"ordered",
"correctly",
".",
"This",
"serve",
"to",
"create",
"an",
"ordered",
"list",
"from",
"the",
"length",
"of",
"the",
"number",
"of",
"files... | def images_list(folder, extension="png", data_type='raw'):
files_len = len(next(os.walk(folder))[2])
image_list = []
for i in range(files_len):
if data_type == 'raw':
image_name = f'image{str(i)}.{extension}'
elif data_type == 'denoised':
image_name = f'image_denoised... | [
"def",
"images_list",
"(",
"folder",
",",
"extension",
"=",
"\"png\"",
",",
"data_type",
"=",
"'raw'",
")",
":",
"files_len",
"=",
"len",
"(",
"next",
"(",
"os",
".",
"walk",
"(",
"folder",
")",
")",
"[",
"2",
"]",
")",
"image_list",
"=",
"[",
"]",... | If the npy file names have no leading zeros then the list is not ordered
correctly. | [
"If",
"the",
"npy",
"file",
"names",
"have",
"no",
"leading",
"zeros",
"then",
"the",
"list",
"is",
"not",
"ordered",
"correctly",
"."
] | [
"\"\"\"\n If the npy file names have no leading zeros then the list is not ordered\n correctly. This serve to create an ordered list from the length of the\n number of files in the folder.\n input: folder path\n output: ordered npy file name list\n \"\"\""
] | [
{
"param": "folder",
"type": null
},
{
"param": "extension",
"type": null
},
{
"param": "data_type",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "folder",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "extension",
"type": null,
"docstring": null,
"docstring_tok... |
75b73eec6df3ebfe8d26d3b490e8364f1e938413 | jeremyforest/whole_optic_analysis_pipeline | OPTIMAS/utils/files_handling.py | [
"MIT"
] | Python | load_timing_data | <not_specific> | def load_timing_data(json_file_path):
"""
This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored.
Input: path of the json file
Output: timings, each in their own variable
"""
with open(json_file_path) as file:
timings_data = dict(j... |
This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored.
Input: path of the json file
Output: timings, each in their own variable
| This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored.
Input: path of the json file
Output: timings, each in their own variable | [
"This",
"function",
"allows",
"to",
"load",
"the",
"json",
"file",
"where",
"the",
"timings",
"of",
"the",
"laser",
"dlp",
"camera",
"and",
"ephys",
"are",
"stored",
".",
"Input",
":",
"path",
"of",
"the",
"json",
"file",
"Output",
":",
"timings",
"each"... | def load_timing_data(json_file_path):
with open(json_file_path) as file:
timings_data = dict(json.load(file))
timings_dlp_on = timings_data['dlp']['on']
timings_dlp_off = timings_data['dlp']['off']
timings_laser_on = timings_data['laser']['on']
timings_laser_off = timings_data['laser']['off'... | [
"def",
"load_timing_data",
"(",
"json_file_path",
")",
":",
"with",
"open",
"(",
"json_file_path",
")",
"as",
"file",
":",
"timings_data",
"=",
"dict",
"(",
"json",
".",
"load",
"(",
"file",
")",
")",
"timings_dlp_on",
"=",
"timings_data",
"[",
"'dlp'",
"]... | This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored. | [
"This",
"function",
"allows",
"to",
"load",
"the",
"json",
"file",
"where",
"the",
"timings",
"of",
"the",
"laser",
"dlp",
"camera",
"and",
"ephys",
"are",
"stored",
"."
] | [
"\"\"\"\n This function allows to load the json file where the timings of the laser, dlp, camera\n and ephys are stored.\n Input: path of the json file\n Output: timings, each in their own variable\n \"\"\"",
"## timings of the images as per the dcam api",
"## timing of the first frame as per man... | [
{
"param": "json_file_path",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "json_file_path",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
2fabb166324b7e4a59457d4050cc9743280f3eeb | jeremyforest/whole_optic_analysis_pipeline | OPTIMAS/merging_experiments.py | [
"MIT"
] | Python | load_json_timing_data | <not_specific> | def load_json_timing_data(path_output, experiment):
"""
This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored.
Input: path of the json file and the experiment folder number as input.
Output: timings, each in their own variable
"""
with op... |
This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored.
Input: path of the json file and the experiment folder number as input.
Output: timings, each in their own variable
| This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored.
Input: path of the json file and the experiment folder number as input.
Output: timings, each in their own variable | [
"This",
"function",
"allows",
"to",
"load",
"the",
"json",
"file",
"where",
"the",
"timings",
"of",
"the",
"laser",
"dlp",
"camera",
"and",
"ephys",
"are",
"stored",
".",
"Input",
":",
"path",
"of",
"the",
"json",
"file",
"and",
"the",
"experiment",
"fol... | def load_json_timing_data(path_output, experiment):
with open(f'{path_output}experiment_{experiment}_timings.json') as file:
timings_data = dict(json.load(file))
timings_dlp_on = timings_data['dlp']['on']
timings_dlp_off = timings_data['dlp']['off']
timings_laser_on = timings_data['laser']['on']... | [
"def",
"load_json_timing_data",
"(",
"path_output",
",",
"experiment",
")",
":",
"with",
"open",
"(",
"f'{path_output}experiment_{experiment}_timings.json'",
")",
"as",
"file",
":",
"timings_data",
"=",
"dict",
"(",
"json",
".",
"load",
"(",
"file",
")",
")",
"t... | This function allows to load the json file where the timings of the laser, dlp, camera
and ephys are stored. | [
"This",
"function",
"allows",
"to",
"load",
"the",
"json",
"file",
"where",
"the",
"timings",
"of",
"the",
"laser",
"dlp",
"camera",
"and",
"ephys",
"are",
"stored",
"."
] | [
"\"\"\"\n This function allows to load the json file where the timings of the laser, dlp, camera\n and ephys are stored.\n Input: path of the json file and the experiment folder number as input.\n Output: timings, each in their own variable\n \"\"\"",
"## timings of the images as per the dcam api",... | [
{
"param": "path_output",
"type": null
},
{
"param": "experiment",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "path_output",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "experiment",
"type": null,
"docstring": null,
"docstri... |
73d7b27829d72540d4293314964118e3a09b1275 | jeremyforest/whole_optic_analysis_pipeline | OPTIMAS/trefide_pipeline.py | [
"MIT"
] | Python | play_3d | null | def play_3d(movie,
gain=3,
fr=60,
offset=0,
magnification=1,
repeat=False,
save = False,
path = None):
""" Render Video With OpenCV3 Library's Imshow"""
fov_height, fov_width, nb_channels, num_frames = movie.shape
maxmov = ... | Render Video With OpenCV3 Library's Imshow | Render Video With OpenCV3 Library's Imshow | [
"Render",
"Video",
"With",
"OpenCV3",
"Library",
"'",
"s",
"Imshow"
] | def play_3d(movie,
gain=3,
fr=60,
offset=0,
magnification=1,
repeat=False,
save = False,
path = None):
fov_height, fov_width, nb_channels, num_frames = movie.shape
maxmov = np.max(movie)
looping=True
terminated=False
... | [
"def",
"play_3d",
"(",
"movie",
",",
"gain",
"=",
"3",
",",
"fr",
"=",
"60",
",",
"offset",
"=",
"0",
",",
"magnification",
"=",
"1",
",",
"repeat",
"=",
"False",
",",
"save",
"=",
"False",
",",
"path",
"=",
"None",
")",
":",
"fov_height",
",",
... | Render Video With OpenCV3 Library's Imshow | [
"Render",
"Video",
"With",
"OpenCV3",
"Library",
"'",
"s",
"Imshow"
] | [
"\"\"\" Render Video With OpenCV3 Library's Imshow\"\"\"",
"# cv2.imshow('frame', (frame - offset) / maxmov*gain)"
] | [
{
"param": "movie",
"type": null
},
{
"param": "gain",
"type": null
},
{
"param": "fr",
"type": null
},
{
"param": "offset",
"type": null
},
{
"param": "magnification",
"type": null
},
{
"param": "repeat",
"type": null
},
{
"param": "save",... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "movie",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "gain",
"type": null,
"docstring": null,
"docstring_tokens": ... |
73d7b27829d72540d4293314964118e3a09b1275 | jeremyforest/whole_optic_analysis_pipeline | OPTIMAS/trefide_pipeline.py | [
"MIT"
] | Python | remove_spline_trend | <not_specific> | def remove_spline_trend(data,
trend):
"""
Removes the fitted spline trend from the raw data
Parameters:
data:
trend:
Returns:
"""
data.shape
data = data.reshape(128*128,-1)
detrended = data - trend
print(detrended)
return detrended |
Removes the fitted spline trend from the raw data
Parameters:
data:
trend:
Returns:
| Removes the fitted spline trend from the raw data | [
"Removes",
"the",
"fitted",
"spline",
"trend",
"from",
"the",
"raw",
"data"
] | def remove_spline_trend(data,
trend):
data.shape
data = data.reshape(128*128,-1)
detrended = data - trend
print(detrended)
return detrended | [
"def",
"remove_spline_trend",
"(",
"data",
",",
"trend",
")",
":",
"data",
".",
"shape",
"data",
"=",
"data",
".",
"reshape",
"(",
"128",
"*",
"128",
",",
"-",
"1",
")",
"detrended",
"=",
"data",
"-",
"trend",
"print",
"(",
"detrended",
")",
"return"... | Removes the fitted spline trend from the raw data | [
"Removes",
"the",
"fitted",
"spline",
"trend",
"from",
"the",
"raw",
"data"
] | [
"\"\"\"\n Removes the fitted spline trend from the raw data\n\n Parameters:\n data:\n trend:\n Returns:\n\n \"\"\""
] | [
{
"param": "data",
"type": null
},
{
"param": "trend",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "data",
"type": null,
"docstring": null,
"docstring_tokens": [
"None"
],
"default": null,
... |
4bdbfc230a51cc590b2f00652415877c5376d2b5 | jeremyforest/whole_optic_analysis_pipeline | OPTIMAS/convert_npy_to_png.py | [
"MIT"
] | Python | png_conversion | null | def png_conversion(input_data_folder, experiment):
'''
takes the images in npy format and convert them into png format for
visualization purposes. One npy file is outputed as one png image.
inpupt: path of the folder that contains all the experiments (it is the
folder with the date of the ex... |
takes the images in npy format and convert them into png format for
visualization purposes. One npy file is outputed as one png image.
inpupt: path of the folder that contains all the experiments (it is the
folder with the date of the experiments)
output: save the images in input_data_folde... | takes the images in npy format and convert them into png format for
visualization purposes. One npy file is outputed as one png image.
inpupt: path of the folder that contains all the experiments (it is the
folder with the date of the experiments)
output: save the images in input_data_folder/experiment/images | [
"takes",
"the",
"images",
"in",
"npy",
"format",
"and",
"convert",
"them",
"into",
"png",
"format",
"for",
"visualization",
"purposes",
".",
"One",
"npy",
"file",
"is",
"outputed",
"as",
"one",
"png",
"image",
".",
"inpupt",
":",
"path",
"of",
"the",
"fo... | def png_conversion(input_data_folder, experiment):
files = os.listdir(f'{input_data_folder}/{experiment}/raw_data/')
for file in tqdm(files):
if file.endswith('.npy'):
try:
img_array = np.load(f'{input_data_folder}/{experiment}/raw_data/{file}')
json_file_path... | [
"def",
"png_conversion",
"(",
"input_data_folder",
",",
"experiment",
")",
":",
"files",
"=",
"os",
".",
"listdir",
"(",
"f'{input_data_folder}/{experiment}/raw_data/'",
")",
"for",
"file",
"in",
"tqdm",
"(",
"files",
")",
":",
"if",
"file",
".",
"endswith",
"... | takes the images in npy format and convert them into png format for
visualization purposes. | [
"takes",
"the",
"images",
"in",
"npy",
"format",
"and",
"convert",
"them",
"into",
"png",
"format",
"for",
"visualization",
"purposes",
"."
] | [
"'''\n takes the images in npy format and convert them into png format for\n visualization purposes. One npy file is outputed as one png image.\n inpupt: path of the folder that contains all the experiments (it is the\n folder with the date of the experiments)\n output: save the images in inp... | [
{
"param": "input_data_folder",
"type": null
},
{
"param": "experiment",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "input_data_folder",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "experiment",
"type": null,
"docstring": null,
"d... |
04cf3c11f1eef2560462b420c15d89101421f711 | jeremyforest/whole_optic_analysis_pipeline | OPTIMAS/merge_npy.py | [
"MIT"
] | Python | merge_npy | null | def merge_npy(input_data_folder, experiment):
"""
merge all the individual npy files into one bigger file for faster I/O
"""
path_input_npy_folder = f"{input_data_folder}/{experiment}/raw_data"
output_data_folder = f'{input_data_folder}/{experiment}'
json_file_path = f"{input_data_folder}/{exper... |
merge all the individual npy files into one bigger file for faster I/O
| merge all the individual npy files into one bigger file for faster I/O | [
"merge",
"all",
"the",
"individual",
"npy",
"files",
"into",
"one",
"bigger",
"file",
"for",
"faster",
"I",
"/",
"O"
] | def merge_npy(input_data_folder, experiment):
path_input_npy_folder = f"{input_data_folder}/{experiment}/raw_data"
output_data_folder = f'{input_data_folder}/{experiment}'
json_file_path = f"{input_data_folder}/{experiment}/{experiment}_info.json"
output = []
files = images_list(path_input_npy_folde... | [
"def",
"merge_npy",
"(",
"input_data_folder",
",",
"experiment",
")",
":",
"path_input_npy_folder",
"=",
"f\"{input_data_folder}/{experiment}/raw_data\"",
"output_data_folder",
"=",
"f'{input_data_folder}/{experiment}'",
"json_file_path",
"=",
"f\"{input_data_folder}/{experiment}/{ex... | merge all the individual npy files into one bigger file for faster I/O | [
"merge",
"all",
"the",
"individual",
"npy",
"files",
"into",
"one",
"bigger",
"file",
"for",
"faster",
"I",
"/",
"O"
] | [
"\"\"\"\n merge all the individual npy files into one bigger file for faster I/O\n \"\"\""
] | [
{
"param": "input_data_folder",
"type": null
},
{
"param": "experiment",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "input_data_folder",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "experiment",
"type": null,
"docstring": null,
"d... |
b835bae7dafae7881429e519daebe8b599689c58 | leedongminAI/RL_Tensorflow_Lab | dqn.py | [
"MIT"
] | Python | _build_network | None | def _build_network(self, h_size=16, l_rate=0.001) -> None:
"""DQN Network architecture (simple MLP)
Args:
h_size (int, optional): Hidden layer dimension
l_rate (float, optional): Learning rate
"""
with tf.variable_scope(self.net_name):
self._X = tf.pl... | DQN Network architecture (simple MLP)
Args:
h_size (int, optional): Hidden layer dimension
l_rate (float, optional): Learning rate
| DQN Network architecture (simple MLP) | [
"DQN",
"Network",
"architecture",
"(",
"simple",
"MLP",
")"
] | def _build_network(self, h_size=16, l_rate=0.001) -> None:
with tf.variable_scope(self.net_name):
self._X = tf.placeholder(tf.float32, [None, self.input_size], name="input_x")
net = self._X
net = tf.layers.dense(net, h_size, activation=tf.nn.relu)
net = tf.layers.... | [
"def",
"_build_network",
"(",
"self",
",",
"h_size",
"=",
"16",
",",
"l_rate",
"=",
"0.001",
")",
"->",
"None",
":",
"with",
"tf",
".",
"variable_scope",
"(",
"self",
".",
"net_name",
")",
":",
"self",
".",
"_X",
"=",
"tf",
".",
"placeholder",
"(",
... | DQN Network architecture (simple MLP) | [
"DQN",
"Network",
"architecture",
"(",
"simple",
"MLP",
")"
] | [
"\"\"\"DQN Network architecture (simple MLP)\n\n Args:\n h_size (int, optional): Hidden layer dimension\n l_rate (float, optional): Learning rate\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "h_size",
"type": null
},
{
"param": "l_rate",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "h_size",
"type": null,
"docstring": "Hidden layer dimension",
... |
b835bae7dafae7881429e519daebe8b599689c58 | leedongminAI/RL_Tensorflow_Lab | dqn.py | [
"MIT"
] | Python | update | list | def update(self, x_stack: np.ndarray, y_stack: np.ndarray) -> list:
"""Performs updates on given X and y and returns a result
Args:
x_stack (np.ndarray): State array, shape (n, input_dim)
y_stack (np.ndarray): Target Q array, shape (n, output_dim)
Returns:
l... | Performs updates on given X and y and returns a result
Args:
x_stack (np.ndarray): State array, shape (n, input_dim)
y_stack (np.ndarray): Target Q array, shape (n, output_dim)
Returns:
list: First element is loss, second element is a result from train step
| Performs updates on given X and y and returns a result | [
"Performs",
"updates",
"on",
"given",
"X",
"and",
"y",
"and",
"returns",
"a",
"result"
] | def update(self, x_stack: np.ndarray, y_stack: np.ndarray) -> list:
feed = {
self._X: x_stack,
self._Y: y_stack
}
return self.session.run([self._loss, self._train], feed) | [
"def",
"update",
"(",
"self",
",",
"x_stack",
":",
"np",
".",
"ndarray",
",",
"y_stack",
":",
"np",
".",
"ndarray",
")",
"->",
"list",
":",
"feed",
"=",
"{",
"self",
".",
"_X",
":",
"x_stack",
",",
"self",
".",
"_Y",
":",
"y_stack",
"}",
"return"... | Performs updates on given X and y and returns a result | [
"Performs",
"updates",
"on",
"given",
"X",
"and",
"y",
"and",
"returns",
"a",
"result"
] | [
"\"\"\"Performs updates on given X and y and returns a result\n\n Args:\n x_stack (np.ndarray): State array, shape (n, input_dim)\n y_stack (np.ndarray): Target Q array, shape (n, output_dim)\n\n Returns:\n list: First element is loss, second element is a result from t... | [
{
"param": "self",
"type": null
},
{
"param": "x_stack",
"type": "np.ndarray"
},
{
"param": "y_stack",
"type": "np.ndarray"
}
] | {
"returns": [
{
"docstring": "First element is loss, second element is a result from train step",
"docstring_tokens": [
"First",
"element",
"is",
"loss",
"second",
"element",
"is",
"a",
"result",
"from",
"train",
... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | authenticate | null | def authenticate(session, base_url, login, password):
"""Authenticate and get a session cookie"""
auth_url = "{0}/auth/login".format(base_url)
auth_data = {"login": login, "password": password}
auth_request = session.post(auth_url, data=auth_data)
if auth_request.status_code != 200:
print("I... | Authenticate and get a session cookie | Authenticate and get a session cookie | [
"Authenticate",
"and",
"get",
"a",
"session",
"cookie"
] | def authenticate(session, base_url, login, password):
auth_url = "{0}/auth/login".format(base_url)
auth_data = {"login": login, "password": password}
auth_request = session.post(auth_url, data=auth_data)
if auth_request.status_code != 200:
print("Invalid url!")
raise SystemExit | [
"def",
"authenticate",
"(",
"session",
",",
"base_url",
",",
"login",
",",
"password",
")",
":",
"auth_url",
"=",
"\"{0}/auth/login\"",
".",
"format",
"(",
"base_url",
")",
"auth_data",
"=",
"{",
"\"login\"",
":",
"login",
",",
"\"password\"",
":",
"password... | Authenticate and get a session cookie | [
"Authenticate",
"and",
"get",
"a",
"session",
"cookie"
] | [
"\"\"\"Authenticate and get a session cookie\"\"\""
] | [
{
"param": "session",
"type": null
},
{
"param": "base_url",
"type": null
},
{
"param": "login",
"type": null
},
{
"param": "password",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "session",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "base_url",
"type": null,
"docstring": null,
"docstring_tok... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | determine_acknowledgement | <not_specific> | def determine_acknowledgement(record, report, ignore_string):
"""Mark report for output unless ignored"""
if record[COMMENT_TEXT]:
comment = record[COMMENT_TEXT].lower()
else:
comment = ""
if ignore_string in comment:
report["should"] = False
return True
report["shou... | Mark report for output unless ignored | Mark report for output unless ignored | [
"Mark",
"report",
"for",
"output",
"unless",
"ignored"
] | def determine_acknowledgement(record, report, ignore_string):
if record[COMMENT_TEXT]:
comment = record[COMMENT_TEXT].lower()
else:
comment = ""
if ignore_string in comment:
report["should"] = False
return True
report["should"] = True
return False | [
"def",
"determine_acknowledgement",
"(",
"record",
",",
"report",
",",
"ignore_string",
")",
":",
"if",
"record",
"[",
"COMMENT_TEXT",
"]",
":",
"comment",
"=",
"record",
"[",
"COMMENT_TEXT",
"]",
".",
"lower",
"(",
")",
"else",
":",
"comment",
"=",
"\"\""... | Mark report for output unless ignored | [
"Mark",
"report",
"for",
"output",
"unless",
"ignored"
] | [
"\"\"\"Mark report for output unless ignored\"\"\""
] | [
{
"param": "record",
"type": null
},
{
"param": "report",
"type": null
},
{
"param": "ignore_string",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "record",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "report",
"type": null,
"docstring": null,
"docstring_tokens... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | generic_report | null | def generic_report(record, report):
"""Add generic information to the report"""
company = get_company(record)
report["SLA"] = company
report["Serial"] = record[SERIAL_NUMBER]
report["Model"] = record[MACHINE_MODEL]
report["Device Type"] = record[MACHINE_NAME]
report["Hostname"] = record[COM... | Add generic information to the report | Add generic information to the report | [
"Add",
"generic",
"information",
"to",
"the",
"report"
] | def generic_report(record, report):
company = get_company(record)
report["SLA"] = company
report["Serial"] = record[SERIAL_NUMBER]
report["Model"] = record[MACHINE_MODEL]
report["Device Type"] = record[MACHINE_NAME]
report["Hostname"] = record[COMPUTER_NAME]
if record[LONG_USERNAME] is not N... | [
"def",
"generic_report",
"(",
"record",
",",
"report",
")",
":",
"company",
"=",
"get_company",
"(",
"record",
")",
"report",
"[",
"\"SLA\"",
"]",
"=",
"company",
"report",
"[",
"\"Serial\"",
"]",
"=",
"record",
"[",
"SERIAL_NUMBER",
"]",
"report",
"[",
... | Add generic information to the report | [
"Add",
"generic",
"information",
"to",
"the",
"report"
] | [
"\"\"\"Add generic information to the report\"\"\""
] | [
{
"param": "record",
"type": null
},
{
"param": "report",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "record",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "report",
"type": null,
"docstring": null,
"docstring_tokens... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | storage_report | null | def storage_report(record, report):
"""Generate report for low storage situation"""
threshold = 20000000000 # <= 20G local storage
if record[FREESPACE] and int(record[FREESPACE]) <= threshold:
value = float(record[FREESPACE]) / 1000000000.0
add_problem(
report,
"Stor... | Generate report for low storage situation | Generate report for low storage situation | [
"Generate",
"report",
"for",
"low",
"storage",
"situation"
] | def storage_report(record, report):
threshold = 20000000000
if record[FREESPACE] and int(record[FREESPACE]) <= threshold:
value = float(record[FREESPACE]) / 1000000000.0
add_problem(
report,
"Storage",
{"Free space": "{0:.2g} GB".format(value)},
... | [
"def",
"storage_report",
"(",
"record",
",",
"report",
")",
":",
"threshold",
"=",
"20000000000",
"if",
"record",
"[",
"FREESPACE",
"]",
"and",
"int",
"(",
"record",
"[",
"FREESPACE",
"]",
")",
"<=",
"threshold",
":",
"value",
"=",
"float",
"(",
"record"... | Generate report for low storage situation | [
"Generate",
"report",
"for",
"low",
"storage",
"situation"
] | [
"\"\"\"Generate report for low storage situation\"\"\"",
"# <= 20G local storage"
] | [
{
"param": "record",
"type": null
},
{
"param": "report",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "record",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "report",
"type": null,
"docstring": null,
"docstring_tokens... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | smart_report | null | def smart_report(record, report):
"""Generate report when there are smart errors"""
if record[SMART_HEALTH] == "FAILED!":
add_problem(
report,
"SMART",
"SMART health: FAILED!",
determine_acknowledgement(record, report, "ack-smart"),
)
elif reco... | Generate report when there are smart errors | Generate report when there are smart errors | [
"Generate",
"report",
"when",
"there",
"are",
"smart",
"errors"
] | def smart_report(record, report):
if record[SMART_HEALTH] == "FAILED!":
add_problem(
report,
"SMART",
"SMART health: FAILED!",
determine_acknowledgement(record, report, "ack-smart"),
)
elif record[SMART_ERROR_COUNT] is not None and int(record[SMART... | [
"def",
"smart_report",
"(",
"record",
",",
"report",
")",
":",
"if",
"record",
"[",
"SMART_HEALTH",
"]",
"==",
"\"FAILED!\"",
":",
"add_problem",
"(",
"report",
",",
"\"SMART\"",
",",
"\"SMART health: FAILED!\"",
",",
"determine_acknowledgement",
"(",
"record",
... | Generate report when there are smart errors | [
"Generate",
"report",
"when",
"there",
"are",
"smart",
"errors"
] | [
"\"\"\"Generate report when there are smart errors\"\"\""
] | [
{
"param": "record",
"type": null
},
{
"param": "report",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "record",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "report",
"type": null,
"docstring": null,
"docstring_tokens... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | battery_report | null | def battery_report(record, report):
"""Generate report when battery is bad"""
# Capacity problem
threshold = 75
battery_bad = False
description = {}
if (
record[POWER_MAX_PERCENT] is not None
and int(record[POWER_MAX_PERCENT]) <= threshold
):
description["Capacity"] =... | Generate report when battery is bad | Generate report when battery is bad | [
"Generate",
"report",
"when",
"battery",
"is",
"bad"
] | def battery_report(record, report):
threshold = 75
battery_bad = False
description = {}
if (
record[POWER_MAX_PERCENT] is not None
and int(record[POWER_MAX_PERCENT]) <= threshold
):
description["Capacity"] = "{}%".format(record[POWER_MAX_PERCENT])
battery_bad = True
... | [
"def",
"battery_report",
"(",
"record",
",",
"report",
")",
":",
"threshold",
"=",
"75",
"battery_bad",
"=",
"False",
"description",
"=",
"{",
"}",
"if",
"(",
"record",
"[",
"POWER_MAX_PERCENT",
"]",
"is",
"not",
"None",
"and",
"int",
"(",
"record",
"[",... | Generate report when battery is bad | [
"Generate",
"report",
"when",
"battery",
"is",
"bad"
] | [
"\"\"\"Generate report when battery is bad\"\"\"",
"# Capacity problem",
"# Battery condition"
] | [
{
"param": "record",
"type": null
},
{
"param": "report",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "record",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "report",
"type": null,
"docstring": null,
"docstring_tokens... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | security_report | null | def security_report(record, report):
"""Generate report when security settings are disabled"""
# SIP status
if record[SECURITY_SIP] == "Disabled":
add_problem(
report,
"SIP",
"SIP is disabled",
determine_acknowledgement(record, report, "ack-sip"),
... | Generate report when security settings are disabled | Generate report when security settings are disabled | [
"Generate",
"report",
"when",
"security",
"settings",
"are",
"disabled"
] | def security_report(record, report):
if record[SECURITY_SIP] == "Disabled":
add_problem(
report,
"SIP",
"SIP is disabled",
determine_acknowledgement(record, report, "ack-sip"),
) | [
"def",
"security_report",
"(",
"record",
",",
"report",
")",
":",
"if",
"record",
"[",
"SECURITY_SIP",
"]",
"==",
"\"Disabled\"",
":",
"add_problem",
"(",
"report",
",",
"\"SIP\"",
",",
"\"SIP is disabled\"",
",",
"determine_acknowledgement",
"(",
"record",
",",... | Generate report when security settings are disabled | [
"Generate",
"report",
"when",
"security",
"settings",
"are",
"disabled"
] | [
"\"\"\"Generate report when security settings are disabled\"\"\"",
"# SIP status"
] | [
{
"param": "record",
"type": null
},
{
"param": "report",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "record",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "report",
"type": null,
"docstring": null,
"docstring_tokens... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | uptime_report | null | def uptime_report(record, report):
"""Generate report when computer is up for too long"""
threshold = 90 # timestamp > 90 days
if record[REPORT_TIMESTAMP] is not None:
uptime = (time.time() - int(record[REPORT_TIMESTAMP])) / 86400
checkin = time.ctime(int(record[REPORT_TIMESTAMP]))
... | Generate report when computer is up for too long | Generate report when computer is up for too long | [
"Generate",
"report",
"when",
"computer",
"is",
"up",
"for",
"too",
"long"
] | def uptime_report(record, report):
threshold = 90
if record[REPORT_TIMESTAMP] is not None:
uptime = (time.time() - int(record[REPORT_TIMESTAMP])) / 86400
checkin = time.ctime(int(record[REPORT_TIMESTAMP]))
if uptime > threshold:
add_problem(
report,
... | [
"def",
"uptime_report",
"(",
"record",
",",
"report",
")",
":",
"threshold",
"=",
"90",
"if",
"record",
"[",
"REPORT_TIMESTAMP",
"]",
"is",
"not",
"None",
":",
"uptime",
"=",
"(",
"time",
".",
"time",
"(",
")",
"-",
"int",
"(",
"record",
"[",
"REPORT... | Generate report when computer is up for too long | [
"Generate",
"report",
"when",
"computer",
"is",
"up",
"for",
"too",
"long"
] | [
"\"\"\"Generate report when computer is up for too long\"\"\"",
"# timestamp > 90 days"
] | [
{
"param": "record",
"type": null
},
{
"param": "report",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "record",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "report",
"type": null,
"docstring": null,
"docstring_tokens... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | sensor_report | null | def sensor_report(record, report):
"""Generate report when sensor is in bad state"""
# bad fans
if record[FAN_TEMS_MSSFF] == "1":
add_problem(
report,
"Fan",
"Fan Errors!",
determine_acknowledgement(record, report, "ack-fans"),
) | Generate report when sensor is in bad state | Generate report when sensor is in bad state | [
"Generate",
"report",
"when",
"sensor",
"is",
"in",
"bad",
"state"
] | def sensor_report(record, report):
if record[FAN_TEMS_MSSFF] == "1":
add_problem(
report,
"Fan",
"Fan Errors!",
determine_acknowledgement(record, report, "ack-fans"),
) | [
"def",
"sensor_report",
"(",
"record",
",",
"report",
")",
":",
"if",
"record",
"[",
"FAN_TEMS_MSSFF",
"]",
"==",
"\"1\"",
":",
"add_problem",
"(",
"report",
",",
"\"Fan\"",
",",
"\"Fan Errors!\"",
",",
"determine_acknowledgement",
"(",
"record",
",",
"report"... | Generate report when sensor is in bad state | [
"Generate",
"report",
"when",
"sensor",
"is",
"in",
"bad",
"state"
] | [
"\"\"\"Generate report when sensor is in bad state\"\"\"",
"# bad fans"
] | [
{
"param": "record",
"type": null
},
{
"param": "report",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "record",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "report",
"type": null,
"docstring": null,
"docstring_tokens... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | process_data | null | def process_data(json_data, config):
"""Parse downloaded data and generate report"""
mydata = json_data["data"]
mydata.sort(key=sortfunc)
computers = []
for record in mydata:
report = prepare_machine_report(record, config.get("excluded"))
if report["should"]:
report.pop... | Parse downloaded data and generate report | Parse downloaded data and generate report | [
"Parse",
"downloaded",
"data",
"and",
"generate",
"report"
] | def process_data(json_data, config):
mydata = json_data["data"]
mydata.sort(key=sortfunc)
computers = []
for record in mydata:
report = prepare_machine_report(record, config.get("excluded"))
if report["should"]:
report.pop("should", None)
computers.append(report)
... | [
"def",
"process_data",
"(",
"json_data",
",",
"config",
")",
":",
"mydata",
"=",
"json_data",
"[",
"\"data\"",
"]",
"mydata",
".",
"sort",
"(",
"key",
"=",
"sortfunc",
")",
"computers",
"=",
"[",
"]",
"for",
"record",
"in",
"mydata",
":",
"report",
"="... | Parse downloaded data and generate report | [
"Parse",
"downloaded",
"data",
"and",
"generate",
"report"
] | [
"\"\"\"Parse downloaded data and generate report\"\"\""
] | [
{
"param": "json_data",
"type": null
},
{
"param": "config",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "json_data",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "config",
"type": null,
"docstring": null,
"docstring_tok... |
7bd924cb80f88684ddad674fc492c168739cab94 | EtneteraLogicworks/munkireport-parser | munkireport_parser.py | [
"MIT"
] | Python | parse_args | <not_specific> | def parse_args():
"""Define argument parser and returns parsed command line arguments"""
parser = argparse.ArgumentParser(
description="Tool to create user-readable reports of selected paramaters from munkireport",
)
parser.add_argument(
"-c",
"--config",
dest="config_fil... | Define argument parser and returns parsed command line arguments | Define argument parser and returns parsed command line arguments | [
"Define",
"argument",
"parser",
"and",
"returns",
"parsed",
"command",
"line",
"arguments"
] | def parse_args():
parser = argparse.ArgumentParser(
description="Tool to create user-readable reports of selected paramaters from munkireport",
)
parser.add_argument(
"-c",
"--config",
dest="config_file",
type=argparse.FileType("r"),
default=CONFIG_PATH_DEFAUL... | [
"def",
"parse_args",
"(",
")",
":",
"parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
"description",
"=",
"\"Tool to create user-readable reports of selected paramaters from munkireport\"",
",",
")",
"parser",
".",
"add_argument",
"(",
"\"-c\"",
",",
"\"--config\"",
... | Define argument parser and returns parsed command line arguments | [
"Define",
"argument",
"parser",
"and",
"returns",
"parsed",
"command",
"line",
"arguments"
] | [
"\"\"\"Define argument parser and returns parsed command line arguments\"\"\""
] | [] | {
"returns": [],
"raises": [],
"params": [],
"outlier_params": [],
"others": []
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.