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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ecbc854962dbd987d1a06115a4c0e7287f393597 | rapzo/pulumi-aws | sdk/python/pulumi_aws/ecs/service.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | capacity_provider_strategies | pulumi.Output[Optional[Sequence['outputs.ServiceCapacityProviderStrategy']]] | def capacity_provider_strategies(self) -> pulumi.Output[Optional[Sequence['outputs.ServiceCapacityProviderStrategy']]]:
"""
Capacity provider strategy to use for the service. Can be one or more. Detailed below.
"""
return pulumi.get(self, "capacity_provider_strategies") |
Capacity provider strategy to use for the service. Can be one or more. Detailed below.
| Capacity provider strategy to use for the service. Can be one or more. Detailed below. | [
"Capacity",
"provider",
"strategy",
"to",
"use",
"for",
"the",
"service",
".",
"Can",
"be",
"one",
"or",
"more",
".",
"Detailed",
"below",
"."
] | def capacity_provider_strategies(self) -> pulumi.Output[Optional[Sequence['outputs.ServiceCapacityProviderStrategy']]]:
return pulumi.get(self, "capacity_provider_strategies") | [
"def",
"capacity_provider_strategies",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"Sequence",
"[",
"'outputs.ServiceCapacityProviderStrategy'",
"]",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"capacity_provider_s... | Capacity provider strategy to use for the service. | [
"Capacity",
"provider",
"strategy",
"to",
"use",
"for",
"the",
"service",
"."
] | [
"\"\"\"\n Capacity provider strategy to use for the service. Can be one or more. Detailed below.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ecbc854962dbd987d1a06115a4c0e7287f393597 | rapzo/pulumi-aws | sdk/python/pulumi_aws/ecs/service.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | deployment_circuit_breaker | pulumi.Output[Optional['outputs.ServiceDeploymentCircuitBreaker']] | def deployment_circuit_breaker(self) -> pulumi.Output[Optional['outputs.ServiceDeploymentCircuitBreaker']]:
"""
Configuration block for deployment circuit breaker. Detailed below.
"""
return pulumi.get(self, "deployment_circuit_breaker") |
Configuration block for deployment circuit breaker. Detailed below.
| Configuration block for deployment circuit breaker. Detailed below. | [
"Configuration",
"block",
"for",
"deployment",
"circuit",
"breaker",
".",
"Detailed",
"below",
"."
] | def deployment_circuit_breaker(self) -> pulumi.Output[Optional['outputs.ServiceDeploymentCircuitBreaker']]:
return pulumi.get(self, "deployment_circuit_breaker") | [
"def",
"deployment_circuit_breaker",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"'outputs.ServiceDeploymentCircuitBreaker'",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"deployment_circuit_breaker\"",
")"
] | Configuration block for deployment circuit breaker. | [
"Configuration",
"block",
"for",
"deployment",
"circuit",
"breaker",
"."
] | [
"\"\"\"\n Configuration block for deployment circuit breaker. Detailed below.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ecbc854962dbd987d1a06115a4c0e7287f393597 | rapzo/pulumi-aws | sdk/python/pulumi_aws/ecs/service.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | deployment_maximum_percent | pulumi.Output[Optional[int]] | def deployment_maximum_percent(self) -> pulumi.Output[Optional[int]]:
"""
Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.
"""
return pul... |
Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.
| Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy. | [
"Upper",
"limit",
"(",
"as",
"a",
"percentage",
"of",
"the",
"service",
"'",
"s",
"desiredCount",
")",
"of",
"the",
"number",
"of",
"running",
"tasks",
"that",
"can",
"be",
"running",
"in",
"a",
"service",
"during",
"a",
"deployment",
".",
"Not",
"valid"... | def deployment_maximum_percent(self) -> pulumi.Output[Optional[int]]:
return pulumi.get(self, "deployment_maximum_percent") | [
"def",
"deployment_maximum_percent",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"int",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"deployment_maximum_percent\"",
")"
] | Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. | [
"Upper",
"limit",
"(",
"as",
"a",
"percentage",
"of",
"the",
"service",
"'",
"s",
"desiredCount",
")",
"of",
"the",
"number",
"of",
"running",
"tasks",
"that",
"can",
"be",
"running",
"in",
"a",
"service",
"during",
"a",
"deployment",
"."
] | [
"\"\"\"\n Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ecbc854962dbd987d1a06115a4c0e7287f393597 | rapzo/pulumi-aws | sdk/python/pulumi_aws/ecs/service.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | deployment_minimum_healthy_percent | pulumi.Output[Optional[int]] | def deployment_minimum_healthy_percent(self) -> pulumi.Output[Optional[int]]:
"""
Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
"""
return pulumi.get(self, "deployment_mini... |
Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
| Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment. | [
"Lower",
"limit",
"(",
"as",
"a",
"percentage",
"of",
"the",
"service",
"'",
"s",
"desiredCount",
")",
"of",
"the",
"number",
"of",
"running",
"tasks",
"that",
"must",
"remain",
"running",
"and",
"healthy",
"in",
"a",
"service",
"during",
"a",
"deployment"... | def deployment_minimum_healthy_percent(self) -> pulumi.Output[Optional[int]]:
return pulumi.get(self, "deployment_minimum_healthy_percent") | [
"def",
"deployment_minimum_healthy_percent",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"int",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"deployment_minimum_healthy_percent\"",
")"
] | Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment. | [
"Lower",
"limit",
"(",
"as",
"a",
"percentage",
"of",
"the",
"service",
"'",
"s",
"desiredCount",
")",
"of",
"the",
"number",
"of",
"running",
"tasks",
"that",
"must",
"remain",
"running",
"and",
"healthy",
"in",
"a",
"service",
"during",
"a",
"deployment"... | [
"\"\"\"\n Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ecbc854962dbd987d1a06115a4c0e7287f393597 | rapzo/pulumi-aws | sdk/python/pulumi_aws/ecs/service.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | desired_count | pulumi.Output[Optional[int]] | def desired_count(self) -> pulumi.Output[Optional[int]]:
"""
Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
"""
return pulumi.get(self, "desired_count") |
Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
| Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy. | [
"Number",
"of",
"instances",
"of",
"the",
"task",
"definition",
"to",
"place",
"and",
"keep",
"running",
".",
"Defaults",
"to",
"0",
".",
"Do",
"not",
"specify",
"if",
"using",
"the",
"`",
"DAEMON",
"`",
"scheduling",
"strategy",
"."
] | def desired_count(self) -> pulumi.Output[Optional[int]]:
return pulumi.get(self, "desired_count") | [
"def",
"desired_count",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"int",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"desired_count\"",
")"
] | Number of instances of the task definition to place and keep running. | [
"Number",
"of",
"instances",
"of",
"the",
"task",
"definition",
"to",
"place",
"and",
"keep",
"running",
"."
] | [
"\"\"\"\n Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ecbc854962dbd987d1a06115a4c0e7287f393597 | rapzo/pulumi-aws | sdk/python/pulumi_aws/ecs/service.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | enable_execute_command | pulumi.Output[Optional[bool]] | def enable_execute_command(self) -> pulumi.Output[Optional[bool]]:
"""
Specifies whether to enable Amazon ECS Exec for the tasks within the service.
"""
return pulumi.get(self, "enable_execute_command") |
Specifies whether to enable Amazon ECS Exec for the tasks within the service.
| Specifies whether to enable Amazon ECS Exec for the tasks within the service. | [
"Specifies",
"whether",
"to",
"enable",
"Amazon",
"ECS",
"Exec",
"for",
"the",
"tasks",
"within",
"the",
"service",
"."
] | def enable_execute_command(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "enable_execute_command") | [
"def",
"enable_execute_command",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"bool",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"enable_execute_command\"",
")"
] | Specifies whether to enable Amazon ECS Exec for the tasks within the service. | [
"Specifies",
"whether",
"to",
"enable",
"Amazon",
"ECS",
"Exec",
"for",
"the",
"tasks",
"within",
"the",
"service",
"."
] | [
"\"\"\"\n Specifies whether to enable Amazon ECS Exec for the tasks within the service.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ecbc854962dbd987d1a06115a4c0e7287f393597 | rapzo/pulumi-aws | sdk/python/pulumi_aws/ecs/service.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | health_check_grace_period_seconds | pulumi.Output[Optional[int]] | def health_check_grace_period_seconds(self) -> pulumi.Output[Optional[int]]:
"""
Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
"""
return pulumi.... |
Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
| Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers. | [
"Seconds",
"to",
"ignore",
"failing",
"load",
"balancer",
"health",
"checks",
"on",
"newly",
"instantiated",
"tasks",
"to",
"prevent",
"premature",
"shutdown",
"up",
"to",
"2147483647",
".",
"Only",
"valid",
"for",
"services",
"configured",
"to",
"use",
"load",
... | def health_check_grace_period_seconds(self) -> pulumi.Output[Optional[int]]:
return pulumi.get(self, "health_check_grace_period_seconds") | [
"def",
"health_check_grace_period_seconds",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"int",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"health_check_grace_period_seconds\"",
")"
] | Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. | [
"Seconds",
"to",
"ignore",
"failing",
"load",
"balancer",
"health",
"checks",
"on",
"newly",
"instantiated",
"tasks",
"to",
"prevent",
"premature",
"shutdown",
"up",
"to",
"2147483647",
"."
] | [
"\"\"\"\n Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ecbc854962dbd987d1a06115a4c0e7287f393597 | rapzo/pulumi-aws | sdk/python/pulumi_aws/ecs/service.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | load_balancers | pulumi.Output[Optional[Sequence['outputs.ServiceLoadBalancer']]] | def load_balancers(self) -> pulumi.Output[Optional[Sequence['outputs.ServiceLoadBalancer']]]:
"""
Configuration block for load balancers. Detailed below.
"""
return pulumi.get(self, "load_balancers") |
Configuration block for load balancers. Detailed below.
| Configuration block for load balancers. Detailed below. | [
"Configuration",
"block",
"for",
"load",
"balancers",
".",
"Detailed",
"below",
"."
] | def load_balancers(self) -> pulumi.Output[Optional[Sequence['outputs.ServiceLoadBalancer']]]:
return pulumi.get(self, "load_balancers") | [
"def",
"load_balancers",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"Sequence",
"[",
"'outputs.ServiceLoadBalancer'",
"]",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"load_balancers\"",
")"
] | Configuration block for load balancers. | [
"Configuration",
"block",
"for",
"load",
"balancers",
"."
] | [
"\"\"\"\n Configuration block for load balancers. Detailed below.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ecbc854962dbd987d1a06115a4c0e7287f393597 | rapzo/pulumi-aws | sdk/python/pulumi_aws/ecs/service.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | ordered_placement_strategies | pulumi.Output[Optional[Sequence['outputs.ServiceOrderedPlacementStrategy']]] | def ordered_placement_strategies(self) -> pulumi.Output[Optional[Sequence['outputs.ServiceOrderedPlacementStrategy']]]:
"""
Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect... |
Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. The maximum number of `ordered_placement_strategy` blocks is `5`. D... | Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. The maximum number of `ordered_placement_strategy` blocks is `5`. Detailed b... | [
"Service",
"level",
"strategy",
"rules",
"that",
"are",
"taken",
"into",
"consideration",
"during",
"task",
"placement",
".",
"List",
"from",
"top",
"to",
"bottom",
"in",
"order",
"of",
"precedence",
".",
"Updates",
"to",
"this",
"configuration",
"will",
"take... | def ordered_placement_strategies(self) -> pulumi.Output[Optional[Sequence['outputs.ServiceOrderedPlacementStrategy']]]:
return pulumi.get(self, "ordered_placement_strategies") | [
"def",
"ordered_placement_strategies",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"Sequence",
"[",
"'outputs.ServiceOrderedPlacementStrategy'",
"]",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"ordered_placement_s... | Service level strategy rules that are taken into consideration during task placement. | [
"Service",
"level",
"strategy",
"rules",
"that",
"are",
"taken",
"into",
"consideration",
"during",
"task",
"placement",
"."
] | [
"\"\"\"\n Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. The maximum number of `ordered_placement_strategy` bloc... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ecbc854962dbd987d1a06115a4c0e7287f393597 | rapzo/pulumi-aws | sdk/python/pulumi_aws/ecs/service.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | placement_constraints | pulumi.Output[Optional[Sequence['outputs.ServicePlacementConstraint']]] | def placement_constraints(self) -> pulumi.Output[Optional[Sequence['outputs.ServicePlacementConstraint']]]:
"""
Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. Maximum number of `... |
Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. Maximum number of `placement_constraints` is `10`. Detailed below.
| Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. Maximum number of `placement_constraints` is `10`. Detailed below. | [
"Rules",
"that",
"are",
"taken",
"into",
"consideration",
"during",
"task",
"placement",
".",
"Updates",
"to",
"this",
"configuration",
"will",
"take",
"effect",
"next",
"task",
"deployment",
"unless",
"`",
"force_new_deployment",
"`",
"is",
"enabled",
".",
"Max... | def placement_constraints(self) -> pulumi.Output[Optional[Sequence['outputs.ServicePlacementConstraint']]]:
return pulumi.get(self, "placement_constraints") | [
"def",
"placement_constraints",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"Sequence",
"[",
"'outputs.ServicePlacementConstraint'",
"]",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"placement_constraints\"",
")"... | Rules that are taken into consideration during task placement. | [
"Rules",
"that",
"are",
"taken",
"into",
"consideration",
"during",
"task",
"placement",
"."
] | [
"\"\"\"\n Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. Maximum number of `placement_constraints` is `10`. Detailed below.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
3370e9a195f091b360cc6cd67353cf91267beeff | rapzo/pulumi-aws | sdk/python/pulumi_aws/codestarconnections/host.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | provider_endpoint | pulumi.Input[str] | def provider_endpoint(self) -> pulumi.Input[str]:
"""
The endpoint of the infrastructure to be represented by the host after it is created.
"""
return pulumi.get(self, "provider_endpoint") |
The endpoint of the infrastructure to be represented by the host after it is created.
| The endpoint of the infrastructure to be represented by the host after it is created. | [
"The",
"endpoint",
"of",
"the",
"infrastructure",
"to",
"be",
"represented",
"by",
"the",
"host",
"after",
"it",
"is",
"created",
"."
] | def provider_endpoint(self) -> pulumi.Input[str]:
return pulumi.get(self, "provider_endpoint") | [
"def",
"provider_endpoint",
"(",
"self",
")",
"->",
"pulumi",
".",
"Input",
"[",
"str",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"provider_endpoint\"",
")"
] | The endpoint of the infrastructure to be represented by the host after it is created. | [
"The",
"endpoint",
"of",
"the",
"infrastructure",
"to",
"be",
"represented",
"by",
"the",
"host",
"after",
"it",
"is",
"created",
"."
] | [
"\"\"\"\n The endpoint of the infrastructure to be represented by the host after it is created.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
3370e9a195f091b360cc6cd67353cf91267beeff | rapzo/pulumi-aws | sdk/python/pulumi_aws/codestarconnections/host.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | vpc_configuration | Optional[pulumi.Input['HostVpcConfigurationArgs']] | def vpc_configuration(self) -> Optional[pulumi.Input['HostVpcConfigurationArgs']]:
"""
The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC.
"""
return pulumi.get(self, "v... |
The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC.
| The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC. | [
"The",
"VPC",
"configuration",
"to",
"be",
"provisioned",
"for",
"the",
"host",
".",
"A",
"VPC",
"must",
"be",
"configured",
"and",
"the",
"infrastructure",
"to",
"be",
"represented",
"by",
"the",
"host",
"must",
"already",
"be",
"connected",
"to",
"the",
... | def vpc_configuration(self) -> Optional[pulumi.Input['HostVpcConfigurationArgs']]:
return pulumi.get(self, "vpc_configuration") | [
"def",
"vpc_configuration",
"(",
"self",
")",
"->",
"Optional",
"[",
"pulumi",
".",
"Input",
"[",
"'HostVpcConfigurationArgs'",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"vpc_configuration\"",
")"
] | The VPC configuration to be provisioned for the host. | [
"The",
"VPC",
"configuration",
"to",
"be",
"provisioned",
"for",
"the",
"host",
"."
] | [
"\"\"\"\n The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
3370e9a195f091b360cc6cd67353cf91267beeff | rapzo/pulumi-aws | sdk/python/pulumi_aws/codestarconnections/host.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | provider_endpoint | Optional[pulumi.Input[str]] | def provider_endpoint(self) -> Optional[pulumi.Input[str]]:
"""
The endpoint of the infrastructure to be represented by the host after it is created.
"""
return pulumi.get(self, "provider_endpoint") |
The endpoint of the infrastructure to be represented by the host after it is created.
| The endpoint of the infrastructure to be represented by the host after it is created. | [
"The",
"endpoint",
"of",
"the",
"infrastructure",
"to",
"be",
"represented",
"by",
"the",
"host",
"after",
"it",
"is",
"created",
"."
] | def provider_endpoint(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "provider_endpoint") | [
"def",
"provider_endpoint",
"(",
"self",
")",
"->",
"Optional",
"[",
"pulumi",
".",
"Input",
"[",
"str",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"provider_endpoint\"",
")"
] | The endpoint of the infrastructure to be represented by the host after it is created. | [
"The",
"endpoint",
"of",
"the",
"infrastructure",
"to",
"be",
"represented",
"by",
"the",
"host",
"after",
"it",
"is",
"created",
"."
] | [
"\"\"\"\n The endpoint of the infrastructure to be represented by the host after it is created.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
3370e9a195f091b360cc6cd67353cf91267beeff | rapzo/pulumi-aws | sdk/python/pulumi_aws/codestarconnections/host.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | provider_endpoint | pulumi.Output[str] | def provider_endpoint(self) -> pulumi.Output[str]:
"""
The endpoint of the infrastructure to be represented by the host after it is created.
"""
return pulumi.get(self, "provider_endpoint") |
The endpoint of the infrastructure to be represented by the host after it is created.
| The endpoint of the infrastructure to be represented by the host after it is created. | [
"The",
"endpoint",
"of",
"the",
"infrastructure",
"to",
"be",
"represented",
"by",
"the",
"host",
"after",
"it",
"is",
"created",
"."
] | def provider_endpoint(self) -> pulumi.Output[str]:
return pulumi.get(self, "provider_endpoint") | [
"def",
"provider_endpoint",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"str",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"provider_endpoint\"",
")"
] | The endpoint of the infrastructure to be represented by the host after it is created. | [
"The",
"endpoint",
"of",
"the",
"infrastructure",
"to",
"be",
"represented",
"by",
"the",
"host",
"after",
"it",
"is",
"created",
"."
] | [
"\"\"\"\n The endpoint of the infrastructure to be represented by the host after it is created.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
3370e9a195f091b360cc6cd67353cf91267beeff | rapzo/pulumi-aws | sdk/python/pulumi_aws/codestarconnections/host.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | vpc_configuration | pulumi.Output[Optional['outputs.HostVpcConfiguration']] | def vpc_configuration(self) -> pulumi.Output[Optional['outputs.HostVpcConfiguration']]:
"""
The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC.
"""
return pulumi.get(sel... |
The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC.
| The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC. | [
"The",
"VPC",
"configuration",
"to",
"be",
"provisioned",
"for",
"the",
"host",
".",
"A",
"VPC",
"must",
"be",
"configured",
"and",
"the",
"infrastructure",
"to",
"be",
"represented",
"by",
"the",
"host",
"must",
"already",
"be",
"connected",
"to",
"the",
... | def vpc_configuration(self) -> pulumi.Output[Optional['outputs.HostVpcConfiguration']]:
return pulumi.get(self, "vpc_configuration") | [
"def",
"vpc_configuration",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"Optional",
"[",
"'outputs.HostVpcConfiguration'",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"vpc_configuration\"",
")"
] | The VPC configuration to be provisioned for the host. | [
"The",
"VPC",
"configuration",
"to",
"be",
"provisioned",
"for",
"the",
"host",
"."
] | [
"\"\"\"\n The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
169241a7da592fe3921a98739953dbe71dc3805d | rapzo/pulumi-aws | sdk/python/pulumi_aws/msk/cluster.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | zookeeper_connect_string_tls | Optional[pulumi.Input[str]] | def zookeeper_connect_string_tls(self) -> Optional[pulumi.Input[str]]:
"""
A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphbetically. The AWS API may not return all endpoints, so this value is not gua... |
A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
| A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies. | [
"A",
"comma",
"separated",
"list",
"of",
"one",
"or",
"more",
"hostname",
":",
"port",
"pairs",
"to",
"use",
"to",
"connect",
"to",
"the",
"Apache",
"Zookeeper",
"cluster",
"via",
"TLS",
".",
"The",
"returned",
"values",
"are",
"sorted",
"alphbetically",
"... | def zookeeper_connect_string_tls(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "zookeeper_connect_string_tls") | [
"def",
"zookeeper_connect_string_tls",
"(",
"self",
")",
"->",
"Optional",
"[",
"pulumi",
".",
"Input",
"[",
"str",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"zookeeper_connect_string_tls\"",
")"
] | A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. | [
"A",
"comma",
"separated",
"list",
"of",
"one",
"or",
"more",
"hostname",
":",
"port",
"pairs",
"to",
"use",
"to",
"connect",
"to",
"the",
"Apache",
"Zookeeper",
"cluster",
"via",
"TLS",
"."
] | [
"\"\"\"\n A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
169241a7da592fe3921a98739953dbe71dc3805d | rapzo/pulumi-aws | sdk/python/pulumi_aws/msk/cluster.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | zookeeper_connect_string_tls | pulumi.Output[str] | def zookeeper_connect_string_tls(self) -> pulumi.Output[str]:
"""
A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed t... |
A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
| A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies. | [
"A",
"comma",
"separated",
"list",
"of",
"one",
"or",
"more",
"hostname",
":",
"port",
"pairs",
"to",
"use",
"to",
"connect",
"to",
"the",
"Apache",
"Zookeeper",
"cluster",
"via",
"TLS",
".",
"The",
"returned",
"values",
"are",
"sorted",
"alphbetically",
"... | def zookeeper_connect_string_tls(self) -> pulumi.Output[str]:
return pulumi.get(self, "zookeeper_connect_string_tls") | [
"def",
"zookeeper_connect_string_tls",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"str",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"zookeeper_connect_string_tls\"",
")"
] | A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. | [
"A",
"comma",
"separated",
"list",
"of",
"one",
"or",
"more",
"hostname",
":",
"port",
"pairs",
"to",
"use",
"to",
"connect",
"to",
"the",
"Apache",
"Zookeeper",
"cluster",
"via",
"TLS",
"."
] | [
"\"\"\"\n A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ae33686b688a77f6fe148e6edd691029485bd4f6 | rapzo/pulumi-aws | sdk/python/pulumi_aws/shield/protection_group.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | protection_group_id | pulumi.Input[str] | def protection_group_id(self) -> pulumi.Input[str]:
"""
The name of the protection group.
"""
return pulumi.get(self, "protection_group_id") |
The name of the protection group.
| The name of the protection group. | [
"The",
"name",
"of",
"the",
"protection",
"group",
"."
] | def protection_group_id(self) -> pulumi.Input[str]:
return pulumi.get(self, "protection_group_id") | [
"def",
"protection_group_id",
"(",
"self",
")",
"->",
"pulumi",
".",
"Input",
"[",
"str",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"protection_group_id\"",
")"
] | The name of the protection group. | [
"The",
"name",
"of",
"the",
"protection",
"group",
"."
] | [
"\"\"\"\n The name of the protection group.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ae33686b688a77f6fe148e6edd691029485bd4f6 | rapzo/pulumi-aws | sdk/python/pulumi_aws/shield/protection_group.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | aggregation | Optional[pulumi.Input[str]] | def aggregation(self) -> Optional[pulumi.Input[str]]:
"""
Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
"""
return pulumi.get(self, "aggregation") |
Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
| Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events. | [
"Defines",
"how",
"AWS",
"Shield",
"combines",
"resource",
"data",
"for",
"the",
"group",
"in",
"order",
"to",
"detect",
"mitigate",
"and",
"report",
"events",
"."
] | def aggregation(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "aggregation") | [
"def",
"aggregation",
"(",
"self",
")",
"->",
"Optional",
"[",
"pulumi",
".",
"Input",
"[",
"str",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"aggregation\"",
")"
] | Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events. | [
"Defines",
"how",
"AWS",
"Shield",
"combines",
"resource",
"data",
"for",
"the",
"group",
"in",
"order",
"to",
"detect",
"mitigate",
"and",
"report",
"events",
"."
] | [
"\"\"\"\n Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ae33686b688a77f6fe148e6edd691029485bd4f6 | rapzo/pulumi-aws | sdk/python/pulumi_aws/shield/protection_group.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | protection_group_arn | Optional[pulumi.Input[str]] | def protection_group_arn(self) -> Optional[pulumi.Input[str]]:
"""
The ARN (Amazon Resource Name) of the protection group.
"""
return pulumi.get(self, "protection_group_arn") |
The ARN (Amazon Resource Name) of the protection group.
| The ARN (Amazon Resource Name) of the protection group. | [
"The",
"ARN",
"(",
"Amazon",
"Resource",
"Name",
")",
"of",
"the",
"protection",
"group",
"."
] | def protection_group_arn(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "protection_group_arn") | [
"def",
"protection_group_arn",
"(",
"self",
")",
"->",
"Optional",
"[",
"pulumi",
".",
"Input",
"[",
"str",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"protection_group_arn\"",
")"
] | The ARN (Amazon Resource Name) of the protection group. | [
"The",
"ARN",
"(",
"Amazon",
"Resource",
"Name",
")",
"of",
"the",
"protection",
"group",
"."
] | [
"\"\"\"\n The ARN (Amazon Resource Name) of the protection group.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ae33686b688a77f6fe148e6edd691029485bd4f6 | rapzo/pulumi-aws | sdk/python/pulumi_aws/shield/protection_group.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | protection_group_id | Optional[pulumi.Input[str]] | def protection_group_id(self) -> Optional[pulumi.Input[str]]:
"""
The name of the protection group.
"""
return pulumi.get(self, "protection_group_id") |
The name of the protection group.
| The name of the protection group. | [
"The",
"name",
"of",
"the",
"protection",
"group",
"."
] | def protection_group_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "protection_group_id") | [
"def",
"protection_group_id",
"(",
"self",
")",
"->",
"Optional",
"[",
"pulumi",
".",
"Input",
"[",
"str",
"]",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"protection_group_id\"",
")"
] | The name of the protection group. | [
"The",
"name",
"of",
"the",
"protection",
"group",
"."
] | [
"\"\"\"\n The name of the protection group.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ae33686b688a77f6fe148e6edd691029485bd4f6 | rapzo/pulumi-aws | sdk/python/pulumi_aws/shield/protection_group.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | aggregation | pulumi.Output[str] | def aggregation(self) -> pulumi.Output[str]:
"""
Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
"""
return pulumi.get(self, "aggregation") |
Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
| Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events. | [
"Defines",
"how",
"AWS",
"Shield",
"combines",
"resource",
"data",
"for",
"the",
"group",
"in",
"order",
"to",
"detect",
"mitigate",
"and",
"report",
"events",
"."
] | def aggregation(self) -> pulumi.Output[str]:
return pulumi.get(self, "aggregation") | [
"def",
"aggregation",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"str",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"aggregation\"",
")"
] | Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events. | [
"Defines",
"how",
"AWS",
"Shield",
"combines",
"resource",
"data",
"for",
"the",
"group",
"in",
"order",
"to",
"detect",
"mitigate",
"and",
"report",
"events",
"."
] | [
"\"\"\"\n Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ae33686b688a77f6fe148e6edd691029485bd4f6 | rapzo/pulumi-aws | sdk/python/pulumi_aws/shield/protection_group.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | protection_group_arn | pulumi.Output[str] | def protection_group_arn(self) -> pulumi.Output[str]:
"""
The ARN (Amazon Resource Name) of the protection group.
"""
return pulumi.get(self, "protection_group_arn") |
The ARN (Amazon Resource Name) of the protection group.
| The ARN (Amazon Resource Name) of the protection group. | [
"The",
"ARN",
"(",
"Amazon",
"Resource",
"Name",
")",
"of",
"the",
"protection",
"group",
"."
] | def protection_group_arn(self) -> pulumi.Output[str]:
return pulumi.get(self, "protection_group_arn") | [
"def",
"protection_group_arn",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"str",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"protection_group_arn\"",
")"
] | The ARN (Amazon Resource Name) of the protection group. | [
"The",
"ARN",
"(",
"Amazon",
"Resource",
"Name",
")",
"of",
"the",
"protection",
"group",
"."
] | [
"\"\"\"\n The ARN (Amazon Resource Name) of the protection group.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ae33686b688a77f6fe148e6edd691029485bd4f6 | rapzo/pulumi-aws | sdk/python/pulumi_aws/shield/protection_group.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | protection_group_id | pulumi.Output[str] | def protection_group_id(self) -> pulumi.Output[str]:
"""
The name of the protection group.
"""
return pulumi.get(self, "protection_group_id") |
The name of the protection group.
| The name of the protection group. | [
"The",
"name",
"of",
"the",
"protection",
"group",
"."
] | def protection_group_id(self) -> pulumi.Output[str]:
return pulumi.get(self, "protection_group_id") | [
"def",
"protection_group_id",
"(",
"self",
")",
"->",
"pulumi",
".",
"Output",
"[",
"str",
"]",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"protection_group_id\"",
")"
] | The name of the protection group. | [
"The",
"name",
"of",
"the",
"protection",
"group",
"."
] | [
"\"\"\"\n The name of the protection group.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
7a152b25446213d798d5d1c65c8194a15db370a1 | rapzo/pulumi-aws | sdk/python/pulumi_aws/secretsmanager/get_secret_version.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | secret_binary | str | def secret_binary(self) -> str:
"""
The decrypted part of the protected secret information that was originally provided as a binary. Base64 encoded.
"""
return pulumi.get(self, "secret_binary") |
The decrypted part of the protected secret information that was originally provided as a binary. Base64 encoded.
| The decrypted part of the protected secret information that was originally provided as a binary. Base64 encoded. | [
"The",
"decrypted",
"part",
"of",
"the",
"protected",
"secret",
"information",
"that",
"was",
"originally",
"provided",
"as",
"a",
"binary",
".",
"Base64",
"encoded",
"."
] | def secret_binary(self) -> str:
return pulumi.get(self, "secret_binary") | [
"def",
"secret_binary",
"(",
"self",
")",
"->",
"str",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"secret_binary\"",
")"
] | The decrypted part of the protected secret information that was originally provided as a binary. | [
"The",
"decrypted",
"part",
"of",
"the",
"protected",
"secret",
"information",
"that",
"was",
"originally",
"provided",
"as",
"a",
"binary",
"."
] | [
"\"\"\"\n The decrypted part of the protected secret information that was originally provided as a binary. Base64 encoded.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
7a152b25446213d798d5d1c65c8194a15db370a1 | rapzo/pulumi-aws | sdk/python/pulumi_aws/secretsmanager/get_secret_version.py | [
"ECL-2.0",
"Apache-2.0"
] | Python | secret_string | str | def secret_string(self) -> str:
"""
The decrypted part of the protected secret information that was originally provided as a string.
"""
return pulumi.get(self, "secret_string") |
The decrypted part of the protected secret information that was originally provided as a string.
| The decrypted part of the protected secret information that was originally provided as a string. | [
"The",
"decrypted",
"part",
"of",
"the",
"protected",
"secret",
"information",
"that",
"was",
"originally",
"provided",
"as",
"a",
"string",
"."
] | def secret_string(self) -> str:
return pulumi.get(self, "secret_string") | [
"def",
"secret_string",
"(",
"self",
")",
"->",
"str",
":",
"return",
"pulumi",
".",
"get",
"(",
"self",
",",
"\"secret_string\"",
")"
] | The decrypted part of the protected secret information that was originally provided as a string. | [
"The",
"decrypted",
"part",
"of",
"the",
"protected",
"secret",
"information",
"that",
"was",
"originally",
"provided",
"as",
"a",
"string",
"."
] | [
"\"\"\"\n The decrypted part of the protected secret information that was originally provided as a string.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f8cb5797a113796dc0f2a223b7981073b90d7ea6 | czydominika/nappy | nappy/script/na2nc.py | [
"BSD-3-Clause"
] | Python | parseArgs | <not_specific> | def parseArgs(args):
"""
Parses arguments and returns dictionary.
"""
arg_dict = {}
a = arg_dict
# Set up defaults
a["na_file"] = None
a["mode"] = "w"
a["variables"] = "all"
a["aux_variables"] = "all"
a["global_attributes"] = {}
a["rename_variables"] = {}
a["time_un... |
Parses arguments and returns dictionary.
| Parses arguments and returns dictionary. | [
"Parses",
"arguments",
"and",
"returns",
"dictionary",
"."
] | def parseArgs(args):
arg_dict = {}
a = arg_dict
a["na_file"] = None
a["mode"] = "w"
a["variables"] = "all"
a["aux_variables"] = "all"
a["global_attributes"] = {}
a["rename_variables"] = {}
a["time_units"] = None
a["time_warning"] = True
a["nc_file"] = None
try:
(... | [
"def",
"parseArgs",
"(",
"args",
")",
":",
"arg_dict",
"=",
"{",
"}",
"a",
"=",
"arg_dict",
"a",
"[",
"\"na_file\"",
"]",
"=",
"None",
"a",
"[",
"\"mode\"",
"]",
"=",
"\"w\"",
"a",
"[",
"\"variables\"",
"]",
"=",
"\"all\"",
"a",
"[",
"\"aux_variables... | Parses arguments and returns dictionary. | [
"Parses",
"arguments",
"and",
"returns",
"dictionary",
"."
] | [
"\"\"\"\n Parses arguments and returns dictionary.\n \"\"\"",
"# Set up defaults"
] | [
{
"param": "args",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "args",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f8cb5797a113796dc0f2a223b7981073b90d7ea6 | czydominika/nappy | nappy/script/na2nc.py | [
"BSD-3-Clause"
] | Python | na2nc | null | def na2nc(args=None):
"""
Controller for conversion of NASA Ames file to NetCDF file.
"""
if args is None:
args = sys.argv[1:]
arg_dict = parseArgs(args)
na_file = arg_dict["na_file"]
del arg_dict["na_file"]
nc_file = apply(nappy.convertNAToNC, [na_file], arg_dict) |
Controller for conversion of NASA Ames file to NetCDF file.
| Controller for conversion of NASA Ames file to NetCDF file. | [
"Controller",
"for",
"conversion",
"of",
"NASA",
"Ames",
"file",
"to",
"NetCDF",
"file",
"."
] | def na2nc(args=None):
if args is None:
args = sys.argv[1:]
arg_dict = parseArgs(args)
na_file = arg_dict["na_file"]
del arg_dict["na_file"]
nc_file = apply(nappy.convertNAToNC, [na_file], arg_dict) | [
"def",
"na2nc",
"(",
"args",
"=",
"None",
")",
":",
"if",
"args",
"is",
"None",
":",
"args",
"=",
"sys",
".",
"argv",
"[",
"1",
":",
"]",
"arg_dict",
"=",
"parseArgs",
"(",
"args",
")",
"na_file",
"=",
"arg_dict",
"[",
"\"na_file\"",
"]",
"del",
... | Controller for conversion of NASA Ames file to NetCDF file. | [
"Controller",
"for",
"conversion",
"of",
"NASA",
"Ames",
"file",
"to",
"NetCDF",
"file",
"."
] | [
"\"\"\"\n Controller for conversion of NASA Ames file to NetCDF file.\n \"\"\""
] | [
{
"param": "args",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "args",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
19e1d4d6ba5b1174351fad3805bebc1baf2fa7c2 | czydominika/nappy | tests/make_unit_tests.py | [
"BSD-3-Clause"
] | Python | makeUnitTestModule | null | def makeUnitTestModule(dr, include_init=False):
"""
Makes a unit test module for each module in a directory. It excludes
__init__.py unless you set include_init to True.
"""
cwd = os.getcwd()
glob_pattn = os.path.join(dr, "*.py")
mods = glob.glob(glob_pattn)
for mod in mods... |
Makes a unit test module for each module in a directory. It excludes
__init__.py unless you set include_init to True.
| Makes a unit test module for each module in a directory. It excludes
init__.py unless you set include_init to True. | [
"Makes",
"a",
"unit",
"test",
"module",
"for",
"each",
"module",
"in",
"a",
"directory",
".",
"It",
"excludes",
"init__",
".",
"py",
"unless",
"you",
"set",
"include_init",
"to",
"True",
"."
] | def makeUnitTestModule(dr, include_init=False):
cwd = os.getcwd()
glob_pattn = os.path.join(dr, "*.py")
mods = glob.glob(glob_pattn)
for mod in mods:
mod_name = os.path.split(mod)[-1]
content = template % (mod_name, mod_name)
ut_name = "test_%s" % mod_name
with open(ut_na... | [
"def",
"makeUnitTestModule",
"(",
"dr",
",",
"include_init",
"=",
"False",
")",
":",
"cwd",
"=",
"os",
".",
"getcwd",
"(",
")",
"glob_pattn",
"=",
"os",
".",
"path",
".",
"join",
"(",
"dr",
",",
"\"*.py\"",
")",
"mods",
"=",
"glob",
".",
"glob",
"(... | Makes a unit test module for each module in a directory. | [
"Makes",
"a",
"unit",
"test",
"module",
"for",
"each",
"module",
"in",
"a",
"directory",
"."
] | [
"\"\"\"\r\n Makes a unit test module for each module in a directory. It excludes\r\n __init__.py unless you set include_init to True.\r\n \"\"\""
] | [
{
"param": "dr",
"type": null
},
{
"param": "include_init",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "dr",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "include_init",
"type": null,
"docstring": null,
"docstring_toke... |
65a40717bf9bc041bf517297a31de563ee330370 | czydominika/nappy | nappy/nc_interface/na_to_cdms.py | [
"BSD-3-Clause"
] | Python | convert | <not_specific> | def convert(self):
"""
Reads the NASA Ames file object and converts to CDMS objects.
Returns (variable_list, aux_variable_list, global_attributes_list).
All these can be readily written to a CDMS File object.
"""
if self.converted:
log.info("Already converted ... |
Reads the NASA Ames file object and converts to CDMS objects.
Returns (variable_list, aux_variable_list, global_attributes_list).
All these can be readily written to a CDMS File object.
| Reads the NASA Ames file object and converts to CDMS objects. | [
"Reads",
"the",
"NASA",
"Ames",
"file",
"object",
"and",
"converts",
"to",
"CDMS",
"objects",
"."
] | def convert(self):
if self.converted:
log.info("Already converted to CDMS objects so not re-doing.")
return (self.cdms_variables, self.cdms_aux_variables, self.global_attributes)
self.na_file_obj.readData()
self._mapNACommentsToGlobalAttributes()
if not hasattr(se... | [
"def",
"convert",
"(",
"self",
")",
":",
"if",
"self",
".",
"converted",
":",
"log",
".",
"info",
"(",
"\"Already converted to CDMS objects so not re-doing.\"",
")",
"return",
"(",
"self",
".",
"cdms_variables",
",",
"self",
".",
"cdms_aux_variables",
",",
"self... | Reads the NASA Ames file object and converts to CDMS objects. | [
"Reads",
"the",
"NASA",
"Ames",
"file",
"object",
"and",
"converts",
"to",
"CDMS",
"objects",
"."
] | [
"\"\"\"\n Reads the NASA Ames file object and converts to CDMS objects.\n Returns (variable_list, aux_variable_list, global_attributes_list).\n All these can be readily written to a CDMS File object.\n \"\"\"",
"# Convert global attribute",
"# Convert axes",
"# Convert main variabl... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
65a40717bf9bc041bf517297a31de563ee330370 | czydominika/nappy | nappy/nc_interface/na_to_cdms.py | [
"BSD-3-Clause"
] | Python | _mapNACommentsToGlobalAttributes | null | def _mapNACommentsToGlobalAttributes(self):
"""
Maps the NASA Ames comments section to global attributes and append them to the
self.global_attributes list.
"""
glob_atts = dict(self.global_attributes)
for key in na_to_nc_map.keys():
if type(key) ==... |
Maps the NASA Ames comments section to global attributes and append them to the
self.global_attributes list.
| Maps the NASA Ames comments section to global attributes and append them to the
self.global_attributes list. | [
"Maps",
"the",
"NASA",
"Ames",
"comments",
"section",
"to",
"global",
"attributes",
"and",
"append",
"them",
"to",
"the",
"self",
".",
"global_attributes",
"list",
"."
] | def _mapNACommentsToGlobalAttributes(self):
glob_atts = dict(self.global_attributes)
for key in na_to_nc_map.keys():
if type(key) == type((1,2)):
if key == ("SCOM", "NCOM"):
comment_line = ""
if self.na_file_obj.NSCOML > 0:
... | [
"def",
"_mapNACommentsToGlobalAttributes",
"(",
"self",
")",
":",
"glob_atts",
"=",
"dict",
"(",
"self",
".",
"global_attributes",
")",
"for",
"key",
"in",
"na_to_nc_map",
".",
"keys",
"(",
")",
":",
"if",
"type",
"(",
"key",
")",
"==",
"type",
"(",
"(",... | Maps the NASA Ames comments section to global attributes and append them to the
self.global_attributes list. | [
"Maps",
"the",
"NASA",
"Ames",
"comments",
"section",
"to",
"global",
"attributes",
"and",
"append",
"them",
"to",
"the",
"self",
".",
"global_attributes",
"list",
"."
] | [
"\"\"\"\n Maps the NASA Ames comments section to global attributes and append them to the \n self.global_attributes list.\n \"\"\"",
"# Map special and normal comments into the global comments section",
"# Add Special comments first",
"# Now add normal comments",
"# Tidy comment line th... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
65a40717bf9bc041bf517297a31de563ee330370 | czydominika/nappy | nappy/nc_interface/na_to_cdms.py | [
"BSD-3-Clause"
] | Python | _convertCdmsVariables | null | def _convertCdmsVariables(self):
"""
Creates cdms variable list for writing out.
"""
self.cdms_variables = []
if self.variables in (None, "all"):
for var_number in range(self.na_file_obj.NV):
self.cdms_variables.append(self._convertNAToCdmsVariabl... |
Creates cdms variable list for writing out.
| Creates cdms variable list for writing out. | [
"Creates",
"cdms",
"variable",
"list",
"for",
"writing",
"out",
"."
] | def _convertCdmsVariables(self):
self.cdms_variables = []
if self.variables in (None, "all"):
for var_number in range(self.na_file_obj.NV):
self.cdms_variables.append(self._convertNAToCdmsVariable(var_number))
else:
if type(self.variables[0]) == type(1... | [
"def",
"_convertCdmsVariables",
"(",
"self",
")",
":",
"self",
".",
"cdms_variables",
"=",
"[",
"]",
"if",
"self",
".",
"variables",
"in",
"(",
"None",
",",
"\"all\"",
")",
":",
"for",
"var_number",
"in",
"range",
"(",
"self",
".",
"na_file_obj",
".",
... | Creates cdms variable list for writing out. | [
"Creates",
"cdms",
"variable",
"list",
"for",
"writing",
"out",
"."
] | [
"\"\"\"\n Creates cdms variable list for writing out.\n \"\"\"",
"# They are integers = indices",
"# Vars are strings"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
65a40717bf9bc041bf517297a31de563ee330370 | czydominika/nappy | nappy/nc_interface/na_to_cdms.py | [
"BSD-3-Clause"
] | Python | _convertNAToCdmsVariable | <not_specific> | def _convertNAToCdmsVariable(self, var_number, attributes={}):
"""
Creates a single cdms variable from the variable number provided in the list.
"""
(var_name, units, miss, scal) = self.na_file_obj.getVariable(var_number)
msg = "\nAdding variable: %s" % self.na_file_obj.VNAME[var... |
Creates a single cdms variable from the variable number provided in the list.
| Creates a single cdms variable from the variable number provided in the list. | [
"Creates",
"a",
"single",
"cdms",
"variable",
"from",
"the",
"variable",
"number",
"provided",
"in",
"the",
"list",
"."
] | def _convertNAToCdmsVariable(self, var_number, attributes={}):
(var_name, units, miss, scal) = self.na_file_obj.getVariable(var_number)
msg = "\nAdding variable: %s" % self.na_file_obj.VNAME[var_number]
log.debug(msg)
self.output_message.append(msg)
array = N.array(self.na_file_o... | [
"def",
"_convertNAToCdmsVariable",
"(",
"self",
",",
"var_number",
",",
"attributes",
"=",
"{",
"}",
")",
":",
"(",
"var_name",
",",
"units",
",",
"miss",
",",
"scal",
")",
"=",
"self",
".",
"na_file_obj",
".",
"getVariable",
"(",
"var_number",
")",
"msg... | Creates a single cdms variable from the variable number provided in the list. | [
"Creates",
"a",
"single",
"cdms",
"variable",
"from",
"the",
"variable",
"number",
"provided",
"in",
"the",
"list",
"."
] | [
"\"\"\"\n Creates a single cdms variable from the variable number provided in the list.\n \"\"\"",
"# Set up axes",
"# Set up variable",
"# Sort units etc",
"# Add the best variable name",
"# Check if mapping provided for renaming this variable",
"# Add a NASA Ames variable number (for map... | [
{
"param": "self",
"type": null
},
{
"param": "var_number",
"type": null
},
{
"param": "attributes",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "var_number",
"type": null,
"docstring": null,
"docstring_toke... |
65a40717bf9bc041bf517297a31de563ee330370 | czydominika/nappy | nappy/nc_interface/na_to_cdms.py | [
"BSD-3-Clause"
] | Python | _convertCdmsAuxVariables | null | def _convertCdmsAuxVariables(self):
"""
Creates a cdms variable from an auxiliary variable
"""
self.cdms_aux_variables = []
if self.aux_variables in (None, "all"):
for avar_number in range(self.na_file_obj.NAUXV):
self.cdms_aux_variables.append(self._... |
Creates a cdms variable from an auxiliary variable
| Creates a cdms variable from an auxiliary variable | [
"Creates",
"a",
"cdms",
"variable",
"from",
"an",
"auxiliary",
"variable"
] | def _convertCdmsAuxVariables(self):
self.cdms_aux_variables = []
if self.aux_variables in (None, "all"):
for avar_number in range(self.na_file_obj.NAUXV):
self.cdms_aux_variables.append(self._convertNAAuxToCdmsVariable(avar_number))
else:
if type(self.aux_... | [
"def",
"_convertCdmsAuxVariables",
"(",
"self",
")",
":",
"self",
".",
"cdms_aux_variables",
"=",
"[",
"]",
"if",
"self",
".",
"aux_variables",
"in",
"(",
"None",
",",
"\"all\"",
")",
":",
"for",
"avar_number",
"in",
"range",
"(",
"self",
".",
"na_file_obj... | Creates a cdms variable from an auxiliary variable | [
"Creates",
"a",
"cdms",
"variable",
"from",
"an",
"auxiliary",
"variable"
] | [
"\"\"\"\n Creates a cdms variable from an auxiliary variable\n \"\"\"",
"# They are integers = indices",
"# They are strings"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
65a40717bf9bc041bf517297a31de563ee330370 | czydominika/nappy | nappy/nc_interface/na_to_cdms.py | [
"BSD-3-Clause"
] | Python | _convertNAAuxToCdmsVariable | <not_specific> | def _convertNAAuxToCdmsVariable(self, avar_number, attributes={}):
"""
Converts an auxiliary variable to a cdms variable.
"""
(var_name, units, miss, scal) = self.na_file_obj.getAuxVariable(avar_number)
array = N.array(self.na_file_obj.A[avar_number])
array = array * scal... |
Converts an auxiliary variable to a cdms variable.
| Converts an auxiliary variable to a cdms variable. | [
"Converts",
"an",
"auxiliary",
"variable",
"to",
"a",
"cdms",
"variable",
"."
] | def _convertNAAuxToCdmsVariable(self, avar_number, attributes={}):
(var_name, units, miss, scal) = self.na_file_obj.getAuxVariable(avar_number)
array = N.array(self.na_file_obj.A[avar_number])
array = array * scal
msg="\nAdding auxiliary variable: %s" % self.na_file_obj.ANAME[avar_number... | [
"def",
"_convertNAAuxToCdmsVariable",
"(",
"self",
",",
"avar_number",
",",
"attributes",
"=",
"{",
"}",
")",
":",
"(",
"var_name",
",",
"units",
",",
"miss",
",",
"scal",
")",
"=",
"self",
".",
"na_file_obj",
".",
"getAuxVariable",
"(",
"avar_number",
")"... | Converts an auxiliary variable to a cdms variable. | [
"Converts",
"an",
"auxiliary",
"variable",
"to",
"a",
"cdms",
"variable",
"."
] | [
"\"\"\"\n Converts an auxiliary variable to a cdms variable.\n \"\"\"",
"# Set up axes",
"# Set up variable",
"# Sort units etc",
"# Check if mapping provided for renaming this variable",
"# Add a NASA Ames auxiliary variable number (for mapping correctly back to NASA Ames)"
] | [
{
"param": "self",
"type": null
},
{
"param": "avar_number",
"type": null
},
{
"param": "attributes",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "avar_number",
"type": null,
"docstring": null,
"docstring_tok... |
65a40717bf9bc041bf517297a31de563ee330370 | czydominika/nappy | nappy/nc_interface/na_to_cdms.py | [
"BSD-3-Clause"
] | Python | _convertCdmsAxes | null | def _convertCdmsAxes(self):
"""
Creates cdms axes from information provided in the NASA Ames dictionary.
"""
if not hasattr(self, 'cdms_axes'):
self.cdms_axes = []
for ivar_number in range(self.na_file_obj.NIV):
self.cdms_axes.append(self._conver... |
Creates cdms axes from information provided in the NASA Ames dictionary.
| Creates cdms axes from information provided in the NASA Ames dictionary. | [
"Creates",
"cdms",
"axes",
"from",
"information",
"provided",
"in",
"the",
"NASA",
"Ames",
"dictionary",
"."
] | def _convertCdmsAxes(self):
if not hasattr(self, 'cdms_axes'):
self.cdms_axes = []
for ivar_number in range(self.na_file_obj.NIV):
self.cdms_axes.append(self._convertNAIndVarToCdmsAxis(ivar_number)) | [
"def",
"_convertCdmsAxes",
"(",
"self",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'cdms_axes'",
")",
":",
"self",
".",
"cdms_axes",
"=",
"[",
"]",
"for",
"ivar_number",
"in",
"range",
"(",
"self",
".",
"na_file_obj",
".",
"NIV",
")",
":",
... | Creates cdms axes from information provided in the NASA Ames dictionary. | [
"Creates",
"cdms",
"axes",
"from",
"information",
"provided",
"in",
"the",
"NASA",
"Ames",
"dictionary",
"."
] | [
"\"\"\"\n Creates cdms axes from information provided in the NASA Ames dictionary.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
2d52a1d8064dfecee7b0e8ac8a1e00c47529d9c1 | czydominika/nappy | nappy/contrib/aircraft/old_na_to_nc_with_aircraft.py | [
"BSD-3-Clause"
] | Python | analyseVariables | <not_specific> | def analyseVariables(self):
"""
Method to examine the content of CDMS variables to return
a tuple of two lists containing variables and auxiliary variables
for the NASA Ames file object.
Variables not compatible with the first file are binned to be used next.
"""
# Need to group the variables toget... |
Method to examine the content of CDMS variables to return
a tuple of two lists containing variables and auxiliary variables
for the NASA Ames file object.
Variables not compatible with the first file are binned to be used next.
| Method to examine the content of CDMS variables to return
a tuple of two lists containing variables and auxiliary variables
for the NASA Ames file object.
Variables not compatible with the first file are binned to be used next. | [
"Method",
"to",
"examine",
"the",
"content",
"of",
"CDMS",
"variables",
"to",
"return",
"a",
"tuple",
"of",
"two",
"lists",
"containing",
"variables",
"and",
"auxiliary",
"variables",
"for",
"the",
"NASA",
"Ames",
"file",
"object",
".",
"Variables",
"not",
"... | def analyseVariables(self):
self.varBin=[]
highrank=-1
bestVar=None
count=0
for var in self.vars:
msg="Analysing: %s" % var.id
print msg
self.outputMessage.append(msg)
count=count+1
rank=var.rank()
if self.rule!=None and self.rule[0]=="aircraft":
var=self... | [
"def",
"analyseVariables",
"(",
"self",
")",
":",
"self",
".",
"varBin",
"=",
"[",
"]",
"highrank",
"=",
"-",
"1",
"bestVar",
"=",
"None",
"count",
"=",
"0",
"for",
"var",
"in",
"self",
".",
"vars",
":",
"msg",
"=",
"\"Analysing: %s\"",
"%",
"var",
... | Method to examine the content of CDMS variables to return
a tuple of two lists containing variables and auxiliary variables
for the NASA Ames file object. | [
"Method",
"to",
"examine",
"the",
"content",
"of",
"CDMS",
"variables",
"to",
"return",
"a",
"tuple",
"of",
"two",
"lists",
"containing",
"variables",
"and",
"auxiliary",
"variables",
"for",
"the",
"NASA",
"Ames",
"file",
"object",
"."
] | [
"\"\"\"\r\n\tMethod to examine the content of CDMS variables to return\r\n\ta tuple of two lists containing variables and auxiliary variables\r\n\tfor the NASA Ames file object.\r\n\tVariables not compatible with the first file are binned to be used next.\r\n\t\"\"\"",
"# Need to group the variables together in b... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
2d52a1d8064dfecee7b0e8ac8a1e00c47529d9c1 | czydominika/nappy | nappy/contrib/aircraft/old_na_to_nc_with_aircraft.py | [
"BSD-3-Clause"
] | Python | defineNAVars | null | def defineNAVars(self, vars):
"""
Method to define NASA Ames file object variables and their
associated metadata.
"""
self.na_dict["NV"]=len(vars)
self.na_dict["VNAME"]=[]
self.na_dict["VMISS"]=[]
self.na_dict["VSCAL"]=[]
self.na_dict["V"]=[]
for var ... |
Method to define NASA Ames file object variables and their
associated metadata.
| Method to define NASA Ames file object variables and their
associated metadata. | [
"Method",
"to",
"define",
"NASA",
"Ames",
"file",
"object",
"variables",
"and",
"their",
"associated",
"metadata",
"."
] | def defineNAVars(self, vars):
self.na_dict["NV"]=len(vars)
self.na_dict["VNAME"]=[]
self.na_dict["VMISS"]=[]
self.na_dict["VSCAL"]=[]
self.na_dict["V"]=[]
for var in vars:
name=getBestName(var)
self.na_dict["VNAME"].append(name)
miss=ge... | [
"def",
"defineNAVars",
"(",
"self",
",",
"vars",
")",
":",
"self",
".",
"na_dict",
"[",
"\"NV\"",
"]",
"=",
"len",
"(",
"vars",
")",
"self",
".",
"na_dict",
"[",
"\"VNAME\"",
"]",
"=",
"[",
"]",
"self",
".",
"na_dict",
"[",
"\"VMISS\"",
"]",
"=",
... | Method to define NASA Ames file object variables and their
associated metadata. | [
"Method",
"to",
"define",
"NASA",
"Ames",
"file",
"object",
"variables",
"and",
"their",
"associated",
"metadata",
"."
] | [
"\"\"\"\r\n\tMethod to define NASA Ames file object variables and their\r\n\tassociated metadata.\r\n\t\"\"\"",
"#print self.na_dict[\"VMISS\"]\r",
"# AND THE ARRAY\r",
"# Populate the variable list \r",
"######## NOTE - might not have to do this #####\r",
"######## It might handle writing from a Numeri... | [
{
"param": "self",
"type": null
},
{
"param": "vars",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "vars",
"type": null,
"docstring": null,
"docstring_tokens": [... |
2d52a1d8064dfecee7b0e8ac8a1e00c47529d9c1 | czydominika/nappy | nappy/contrib/aircraft/old_na_to_nc_with_aircraft.py | [
"BSD-3-Clause"
] | Python | defineNAAuxVars | null | def defineNAAuxVars(self, auxVars):
"""
Method to define NASA Ames file object auxiliary variables and their
associated metadata.
"""
self.na_dict["NAUXV"]=len(auxVars)
self.na_dict["ANAME"]=[]
self.na_dict["AMISS"]=[]
self.na_dict["ASCAL"]=[]
self.na_dict["A"... |
Method to define NASA Ames file object auxiliary variables and their
associated metadata.
| Method to define NASA Ames file object auxiliary variables and their
associated metadata. | [
"Method",
"to",
"define",
"NASA",
"Ames",
"file",
"object",
"auxiliary",
"variables",
"and",
"their",
"associated",
"metadata",
"."
] | def defineNAAuxVars(self, auxVars):
self.na_dict["NAUXV"]=len(auxVars)
self.na_dict["ANAME"]=[]
self.na_dict["AMISS"]=[]
self.na_dict["ASCAL"]=[]
self.na_dict["A"]=[]
for var in auxVars:
name=getBestName(var)
self.na_dict["ANAME"].append(name)
... | [
"def",
"defineNAAuxVars",
"(",
"self",
",",
"auxVars",
")",
":",
"self",
".",
"na_dict",
"[",
"\"NAUXV\"",
"]",
"=",
"len",
"(",
"auxVars",
")",
"self",
".",
"na_dict",
"[",
"\"ANAME\"",
"]",
"=",
"[",
"]",
"self",
".",
"na_dict",
"[",
"\"AMISS\"",
"... | Method to define NASA Ames file object auxiliary variables and their
associated metadata. | [
"Method",
"to",
"define",
"NASA",
"Ames",
"file",
"object",
"auxiliary",
"variables",
"and",
"their",
"associated",
"metadata",
"."
] | [
"\"\"\"\r\n\tMethod to define NASA Ames file object auxiliary variables and their\r\n\tassociated metadata.\r\n\t\"\"\"",
"# AND THE ARRAY\r",
"# Populate the variable list \r",
"######## NOTE - might not have to do this #####\r",
"######## It might handle writing from a Numeric array ########\r",
"#lis... | [
{
"param": "self",
"type": null
},
{
"param": "auxVars",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "auxVars",
"type": null,
"docstring": null,
"docstring_tokens"... |
2d52a1d8064dfecee7b0e8ac8a1e00c47529d9c1 | czydominika/nappy | nappy/contrib/aircraft/old_na_to_nc_with_aircraft.py | [
"BSD-3-Clause"
] | Python | defineNAGlobals | <not_specific> | def defineNAGlobals(self):
"""
Maps CDMS (NetCDF) global attributes into NASA Ames Header fields.
"""
# Get the global mapping dictionary
globalmap=cdmsMap.toNA
# Check if we should add to it with locally set rules
locGlobs=localRules.localGlobalAttributes
for att in locGlobs.keys()... |
Maps CDMS (NetCDF) global attributes into NASA Ames Header fields.
| Maps CDMS (NetCDF) global attributes into NASA Ames Header fields. | [
"Maps",
"CDMS",
"(",
"NetCDF",
")",
"global",
"attributes",
"into",
"NASA",
"Ames",
"Header",
"fields",
"."
] | def defineNAGlobals(self):
globalmap=cdmsMap.toNA
locGlobs=localRules.localGlobalAttributes
for att in locGlobs.keys():
if not globalmap.has_key(att):
globalmap[key]=locGlobs[key]
self.extra_comments=[[],[],[]]
conventionOrReferenceComments=[]
for key in self.globals.ke... | [
"def",
"defineNAGlobals",
"(",
"self",
")",
":",
"globalmap",
"=",
"cdmsMap",
".",
"toNA",
"locGlobs",
"=",
"localRules",
".",
"localGlobalAttributes",
"for",
"att",
"in",
"locGlobs",
".",
"keys",
"(",
")",
":",
"if",
"not",
"globalmap",
".",
"has_key",
"(... | Maps CDMS (NetCDF) global attributes into NASA Ames Header fields. | [
"Maps",
"CDMS",
"(",
"NetCDF",
")",
"global",
"attributes",
"into",
"NASA",
"Ames",
"Header",
"fields",
"."
] | [
"\"\"\"\r\n\tMaps CDMS (NetCDF) global attributes into NASA Ames Header fields.\r\n\t\"\"\"",
"# Get the global mapping dictionary\r",
"# Check if we should add to it with locally set rules\r",
"# Normal comments, special comments, other comments\r",
"# If fields came from NA then extract appropriate fields... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
2d52a1d8064dfecee7b0e8ac8a1e00c47529d9c1 | czydominika/nappy | nappy/contrib/aircraft/old_na_to_nc_with_aircraft.py | [
"BSD-3-Clause"
] | Python | defineNAComments | <not_specific> | def defineNAComments(self, normal_comments=[], special_comments=[]):
"""
Defines the Special and Normal comments sections in the NASA Ames file
object - including information gathered from the defineNAGlobals method.
"""
if hasattr(self, "ncom"): normal_comments=self.ncom+normal_comments
... |
Defines the Special and Normal comments sections in the NASA Ames file
object - including information gathered from the defineNAGlobals method.
| Defines the Special and Normal comments sections in the NASA Ames file
object - including information gathered from the defineNAGlobals method. | [
"Defines",
"the",
"Special",
"and",
"Normal",
"comments",
"sections",
"in",
"the",
"NASA",
"Ames",
"file",
"object",
"-",
"including",
"information",
"gathered",
"from",
"the",
"defineNAGlobals",
"method",
"."
] | def defineNAComments(self, normal_comments=[], special_comments=[]):
if hasattr(self, "ncom"): normal_comments=self.ncom+normal_comments
NCOM=[]
for ncom in normal_comments:
NCOM.append(ncom)
if len(NCOM)>0: NCOM.append("")
if len(self.extra_comments[2])>0:
for excom in sel... | [
"def",
"defineNAComments",
"(",
"self",
",",
"normal_comments",
"=",
"[",
"]",
",",
"special_comments",
"=",
"[",
"]",
")",
":",
"if",
"hasattr",
"(",
"self",
",",
"\"ncom\"",
")",
":",
"normal_comments",
"=",
"self",
".",
"ncom",
"+",
"normal_comments",
... | Defines the Special and Normal comments sections in the NASA Ames file
object - including information gathered from the defineNAGlobals method. | [
"Defines",
"the",
"Special",
"and",
"Normal",
"comments",
"sections",
"in",
"the",
"NASA",
"Ames",
"file",
"object",
"-",
"including",
"information",
"gathered",
"from",
"the",
"defineNAGlobals",
"method",
"."
] | [
"\"\"\"\r\n\tDefines the Special and Normal comments sections in the NASA Ames file \r\n\tobject - including information gathered from the defineNAGlobals method.\r\n\t\"\"\"",
"#used_var_atts=(\"name\", \"long_name\", \"standard_name\", \"id\", \r",
"# \"missing_value\", \"fill_value\", \"units\", \r",
"#... | [
{
"param": "self",
"type": null
},
{
"param": "normal_comments",
"type": null
},
{
"param": "special_comments",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "normal_comments",
"type": null,
"docstring": null,
"docstring... |
2d52a1d8064dfecee7b0e8ac8a1e00c47529d9c1 | czydominika/nappy | nappy/contrib/aircraft/old_na_to_nc_with_aircraft.py | [
"BSD-3-Clause"
] | Python | defineGeneralHeader | <not_specific> | def defineGeneralHeader(self, header_items={}):
"""
Defines known header items and overwrites any with header_items
key/value pairs.
"""
# Check if DATE field previously known in NASA Ames file
time_now=time.strftime("%Y %m %d", time.localtime(time.time())).split()
if not self.na_dict.has_key("RDA... |
Defines known header items and overwrites any with header_items
key/value pairs.
| Defines known header items and overwrites any with header_items
key/value pairs. | [
"Defines",
"known",
"header",
"items",
"and",
"overwrites",
"any",
"with",
"header_items",
"key",
"/",
"value",
"pairs",
"."
] | def defineGeneralHeader(self, header_items={}):
time_now=time.strftime("%Y %m %d", time.localtime(time.time())).split()
if not self.na_dict.has_key("RDATE"):
self.na_dict["RDATE"]=time_now
if self.ax0.isTime():
try:
(unit, start_date)=re.match("(\w+)\s+?since\s+?(\d+-\d+-\d+)", self.... | [
"def",
"defineGeneralHeader",
"(",
"self",
",",
"header_items",
"=",
"{",
"}",
")",
":",
"time_now",
"=",
"time",
".",
"strftime",
"(",
"\"%Y %m %d\"",
",",
"time",
".",
"localtime",
"(",
"time",
".",
"time",
"(",
")",
")",
")",
".",
"split",
"(",
")... | Defines known header items and overwrites any with header_items
key/value pairs. | [
"Defines",
"known",
"header",
"items",
"and",
"overwrites",
"any",
"with",
"header_items",
"key",
"/",
"value",
"pairs",
"."
] | [
"\"\"\"\r\n\tDefines known header items and overwrites any with header_items \r\n\tkey/value pairs.\r\n\t\"\"\"",
"# Check if DATE field previously known in NASA Ames file\r",
"# Get first date in list\r"
] | [
{
"param": "self",
"type": null
},
{
"param": "header_items",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "header_items",
"type": null,
"docstring": null,
"docstring_to... |
2d52a1d8064dfecee7b0e8ac8a1e00c47529d9c1 | czydominika/nappy | nappy/contrib/aircraft/old_na_to_nc_with_aircraft.py | [
"BSD-3-Clause"
] | Python | _useLocalRule | <not_specific> | def _useLocalRule(self, var, ruleArgs):
"""
Applies some logic based on a local rule.
"""
ruleName=ruleArgs[0]
rule=ruleArgs
if ruleName=="aircraft":
# Fixes aircraft data 2D time axis, missing values and does sub-selection by default
flagV... |
Applies some logic based on a local rule.
| Applies some logic based on a local rule. | [
"Applies",
"some",
"logic",
"based",
"on",
"a",
"local",
"rule",
"."
] | def _useLocalRule(self, var, ruleArgs):
ruleName=ruleArgs[0]
rule=ruleArgs
if ruleName=="aircraft":
flagVar=None
if var.id=="Time":
return None
if len(rule)<2: rule.append("av")
if len(rule)<3: rule.append("flag")
if rul... | [
"def",
"_useLocalRule",
"(",
"self",
",",
"var",
",",
"ruleArgs",
")",
":",
"ruleName",
"=",
"ruleArgs",
"[",
"0",
"]",
"rule",
"=",
"ruleArgs",
"if",
"ruleName",
"==",
"\"aircraft\"",
":",
"flagVar",
"=",
"None",
"if",
"var",
".",
"id",
"==",
"\"Time\... | Applies some logic based on a local rule. | [
"Applies",
"some",
"logic",
"based",
"on",
"a",
"local",
"rule",
"."
] | [
"\"\"\"\r\n Applies some logic based on a local rule.\r\n \"\"\"",
"# Fixes aircraft data 2D time axis, missing values and does sub-selection by default\r",
"# return if variable is time\r",
"# Only use flag var for processing real variable\r"
] | [
{
"param": "self",
"type": null
},
{
"param": "var",
"type": null
},
{
"param": "ruleArgs",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "var",
"type": null,
"docstring": null,
"docstring_tokens": []... |
55205688d11b92536db5be5ffb49eb379234cb55 | czydominika/nappy | nappy/utils/compare.py | [
"BSD-3-Clause"
] | Python | compare | null | def compare(i1, i2):
"""
Compares items whether files or directories.
Reports any differences at the command line but
also returns them in a dictionary as:
???
"""
if os.path.isfile(i1):
compFiles(i1, i2)
elif os.path.isdir(i1):
compDirs(i1, i2)
else:
exitNice... |
Compares items whether files or directories.
Reports any differences at the command line but
also returns them in a dictionary as:
???
| Compares items whether files or directories. | [
"Compares",
"items",
"whether",
"files",
"or",
"directories",
"."
] | def compare(i1, i2):
if os.path.isfile(i1):
compFiles(i1, i2)
elif os.path.isdir(i1):
compDirs(i1, i2)
else:
exitNicely("Cannot recognise/find item '" + i1 + "'.") | [
"def",
"compare",
"(",
"i1",
",",
"i2",
")",
":",
"if",
"os",
".",
"path",
".",
"isfile",
"(",
"i1",
")",
":",
"compFiles",
"(",
"i1",
",",
"i2",
")",
"elif",
"os",
".",
"path",
".",
"isdir",
"(",
"i1",
")",
":",
"compDirs",
"(",
"i1",
",",
... | Compares items whether files or directories. | [
"Compares",
"items",
"whether",
"files",
"or",
"directories",
"."
] | [
"\"\"\"\n Compares items whether files or directories.\n Reports any differences at the command line but\n also returns them in a dictionary as:\n ???\n \"\"\""
] | [
{
"param": "i1",
"type": null
},
{
"param": "i2",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "i1",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "i2",
"type": null,
"docstring": null,
"docstring_tokens": [],
... |
55205688d11b92536db5be5ffb49eb379234cb55 | czydominika/nappy | nappy/utils/compare.py | [
"BSD-3-Clause"
] | Python | compDirs | <not_specific> | def compDirs(d1, d2):
"""
Compares directories by looping through and then calling
compFiles() for each pair of files found.
"""
dname = os.path.split(d1)[-1]
# Ignore anything that is in exclusion list
for excl in dir_exclusions:
if excl.match(dname):
print( "IGNORING EX... |
Compares directories by looping through and then calling
compFiles() for each pair of files found.
| Compares directories by looping through and then calling
compFiles() for each pair of files found. | [
"Compares",
"directories",
"by",
"looping",
"through",
"and",
"then",
"calling",
"compFiles",
"()",
"for",
"each",
"pair",
"of",
"files",
"found",
"."
] | def compDirs(d1, d2):
dname = os.path.split(d1)[-1]
for excl in dir_exclusions:
if excl.match(dname):
print( "IGNORING EXCLUDED Directory:", d1)
return
items = os.listdir(d1)
for item in items:
d1f = os.path.join(d1, item)
d2f = os.path.join(d2, item)
... | [
"def",
"compDirs",
"(",
"d1",
",",
"d2",
")",
":",
"dname",
"=",
"os",
".",
"path",
".",
"split",
"(",
"d1",
")",
"[",
"-",
"1",
"]",
"for",
"excl",
"in",
"dir_exclusions",
":",
"if",
"excl",
".",
"match",
"(",
"dname",
")",
":",
"print",
"(",
... | Compares directories by looping through and then calling
compFiles() for each pair of files found. | [
"Compares",
"directories",
"by",
"looping",
"through",
"and",
"then",
"calling",
"compFiles",
"()",
"for",
"each",
"pair",
"of",
"files",
"found",
"."
] | [
"\"\"\"\n Compares directories by looping through and then calling\n compFiles() for each pair of files found.\n \"\"\"",
"# Ignore anything that is in exclusion list"
] | [
{
"param": "d1",
"type": null
},
{
"param": "d2",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "d1",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "d2",
"type": null,
"docstring": null,
"docstring_tokens": [],
... |
55205688d11b92536db5be5ffb49eb379234cb55 | czydominika/nappy | nappy/utils/compare.py | [
"BSD-3-Clause"
] | Python | compFiles | <not_specific> | def compFiles(f1, f2):
"""
Compares contents of two files.
"""
name = os.path.split(f1)[-1]
# Ignore anything that is in exclusion list
for excl in file_exclusions:
if excl.match(name):
print( "IGNORING EXCLUDED file:", f1)
return
# Check they exist
for ... |
Compares contents of two files.
| Compares contents of two files. | [
"Compares",
"contents",
"of",
"two",
"files",
"."
] | def compFiles(f1, f2):
name = os.path.split(f1)[-1]
for excl in file_exclusions:
if excl.match(name):
print( "IGNORING EXCLUDED file:", f1)
return
for f in (f1, f2):
if not os.path.isfile(f):
exitNicely("CANNOT compare files as item does not exist:" + f)
... | [
"def",
"compFiles",
"(",
"f1",
",",
"f2",
")",
":",
"name",
"=",
"os",
".",
"path",
".",
"split",
"(",
"f1",
")",
"[",
"-",
"1",
"]",
"for",
"excl",
"in",
"file_exclusions",
":",
"if",
"excl",
".",
"match",
"(",
"name",
")",
":",
"print",
"(",
... | Compares contents of two files. | [
"Compares",
"contents",
"of",
"two",
"files",
"."
] | [
"\"\"\"\n Compares contents of two files.\n \"\"\"",
"# Ignore anything that is in exclusion list",
"# Check they exist"
] | [
{
"param": "f1",
"type": null
},
{
"param": "f2",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "f1",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "f2",
"type": null,
"docstring": null,
"docstring_tokens": [],
... |
6ff0d9aa2dc1bd7dd8ed525703fb91abe6dbdc99 | czydominika/nappy | nappy/contrib/aircraft/scanFAAM.py | [
"BSD-3-Clause"
] | Python | scanFAAM | <not_specific> | def scanFAAM(fileName=None, vars=None, nth=4, missingValuesToUse=(-9999., -32767.)):
"""
Scans every 'nth' variable in the list of variables (or found in the
file and gets the first and last index of the first (time) dimension
that holds real (non-missing) values.
"""
if type(missingValuesToUse)... |
Scans every 'nth' variable in the list of variables (or found in the
file and gets the first and last index of the first (time) dimension
that holds real (non-missing) values.
| Scans every 'nth' variable in the list of variables (or found in the
file and gets the first and last index of the first (time) dimension
that holds real (non-missing) values. | [
"Scans",
"every",
"'",
"nth",
"'",
"variable",
"in",
"the",
"list",
"of",
"variables",
"(",
"or",
"found",
"in",
"the",
"file",
"and",
"gets",
"the",
"first",
"and",
"last",
"index",
"of",
"the",
"first",
"(",
"time",
")",
"dimension",
"that",
"holds",... | def scanFAAM(fileName=None, vars=None, nth=4, missingValuesToUse=(-9999., -32767.)):
if type(missingValuesToUse)!=type((1,2)):
missingValuesToUse=(missingValuesToUse,)
startList=[]
endList=[]
start=None
end=None
if not fileName and not vars:
raise "You must provide either a file ... | [
"def",
"scanFAAM",
"(",
"fileName",
"=",
"None",
",",
"vars",
"=",
"None",
",",
"nth",
"=",
"4",
",",
"missingValuesToUse",
"=",
"(",
"-",
"9999.",
",",
"-",
"32767.",
")",
")",
":",
"if",
"type",
"(",
"missingValuesToUse",
")",
"!=",
"type",
"(",
... | Scans every 'nth' variable in the list of variables (or found in the
file and gets the first and last index of the first (time) dimension
that holds real (non-missing) values. | [
"Scans",
"every",
"'",
"nth",
"'",
"variable",
"in",
"the",
"list",
"of",
"variables",
"(",
"or",
"found",
"in",
"the",
"file",
"and",
"gets",
"the",
"first",
"and",
"last",
"index",
"of",
"the",
"first",
"(",
"time",
")",
"dimension",
"that",
"holds",... | [
"\"\"\"\n Scans every 'nth' variable in the list of variables (or found in the\n file and gets the first and last index of the first (time) dimension\n that holds real (non-missing) values.\n \"\"\""
] | [
{
"param": "fileName",
"type": null
},
{
"param": "vars",
"type": null
},
{
"param": "nth",
"type": null
},
{
"param": "missingValuesToUse",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "fileName",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "vars",
"type": null,
"docstring": null,
"docstring_tokens... |
6ff0d9aa2dc1bd7dd8ed525703fb91abe6dbdc99 | czydominika/nappy | nappy/contrib/aircraft/scanFAAM.py | [
"BSD-3-Clause"
] | Python | findMissing | <not_specific> | def findMissing(var, step, missingValuesToUse):
"""
Returns the (start, end) tuple for a given variable where
they are indices of an array where missing values end and begin.
"""
start=None
end=None
i0=0
sh=var.shape
iend=sh[0]-1
print var.id, step
for miss in missingVal... |
Returns the (start, end) tuple for a given variable where
they are indices of an array where missing values end and begin.
| Returns the (start, end) tuple for a given variable where
they are indices of an array where missing values end and begin. | [
"Returns",
"the",
"(",
"start",
"end",
")",
"tuple",
"for",
"a",
"given",
"variable",
"where",
"they",
"are",
"indices",
"of",
"an",
"array",
"where",
"missing",
"values",
"end",
"and",
"begin",
"."
] | def findMissing(var, step, missingValuesToUse):
start=None
end=None
i0=0
sh=var.shape
iend=sh[0]-1
print var.id, step
for miss in missingValuesToUse:
for i in range(i0, iend, step):
if var[i][0]==miss:
start=i
break
for e in ran... | [
"def",
"findMissing",
"(",
"var",
",",
"step",
",",
"missingValuesToUse",
")",
":",
"start",
"=",
"None",
"end",
"=",
"None",
"i0",
"=",
"0",
"sh",
"=",
"var",
".",
"shape",
"iend",
"=",
"sh",
"[",
"0",
"]",
"-",
"1",
"print",
"var",
".",
"id",
... | Returns the (start, end) tuple for a given variable where
they are indices of an array where missing values end and begin. | [
"Returns",
"the",
"(",
"start",
"end",
")",
"tuple",
"for",
"a",
"given",
"variable",
"where",
"they",
"are",
"indices",
"of",
"an",
"array",
"where",
"missing",
"values",
"end",
"and",
"begin",
"."
] | [
"\"\"\"\n Returns the (start, end) tuple for a given variable where\n they are indices of an array where missing values end and begin.\n \"\"\""
] | [
{
"param": "var",
"type": null
},
{
"param": "step",
"type": null
},
{
"param": "missingValuesToUse",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "var",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "step",
"type": null,
"docstring": null,
"docstring_tokens": []... |
8f213896dcdc24332d0373d1482c685230044ef9 | czydominika/nappy | nappy/utils/parse_config.py | [
"BSD-3-Clause"
] | Python | makeConfigDict | <not_specific> | def makeConfigDict(cf=config_file):
"""
Parses config file and returns dictionary of sub-dictionaries
for each section holding Keyword-Value pairs.
"""
d = {}
conf = MyCasePreservingConfigParser()
conf.read(cf)
# get all sections and content
for section in conf.sections():... |
Parses config file and returns dictionary of sub-dictionaries
for each section holding Keyword-Value pairs.
| Parses config file and returns dictionary of sub-dictionaries
for each section holding Keyword-Value pairs. | [
"Parses",
"config",
"file",
"and",
"returns",
"dictionary",
"of",
"sub",
"-",
"dictionaries",
"for",
"each",
"section",
"holding",
"Keyword",
"-",
"Value",
"pairs",
"."
] | def makeConfigDict(cf=config_file):
d = {}
conf = MyCasePreservingConfigParser()
conf.read(cf)
for section in conf.sections():
d[section] = {}
for item in conf.options(section):
value = conf.get(section, item)
if value.find("__space__") > -1:
value... | [
"def",
"makeConfigDict",
"(",
"cf",
"=",
"config_file",
")",
":",
"d",
"=",
"{",
"}",
"conf",
"=",
"MyCasePreservingConfigParser",
"(",
")",
"conf",
".",
"read",
"(",
"cf",
")",
"for",
"section",
"in",
"conf",
".",
"sections",
"(",
")",
":",
"d",
"["... | Parses config file and returns dictionary of sub-dictionaries
for each section holding Keyword-Value pairs. | [
"Parses",
"config",
"file",
"and",
"returns",
"dictionary",
"of",
"sub",
"-",
"dictionaries",
"for",
"each",
"section",
"holding",
"Keyword",
"-",
"Value",
"pairs",
"."
] | [
"\"\"\"\r\n Parses config file and returns dictionary of sub-dictionaries\r\n for each section holding Keyword-Value pairs.\r\n \"\"\"",
"# get all sections and content\r"
] | [
{
"param": "cf",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "cf",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
8f213896dcdc24332d0373d1482c685230044ef9 | czydominika/nappy | nappy/utils/parse_config.py | [
"BSD-3-Clause"
] | Python | makeAnnotationsConfigDict | <not_specific> | def makeAnnotationsConfigDict(af):
"""
Parses annotations config file and returns dictionary of annotations.
"""
ad = {}
conf = MyCasePreservingConfigParser()
conf.read(af)
# Load up dict
for item in conf.options("annotations"):
value = conf.get("annotations", item)
... |
Parses annotations config file and returns dictionary of annotations.
| Parses annotations config file and returns dictionary of annotations. | [
"Parses",
"annotations",
"config",
"file",
"and",
"returns",
"dictionary",
"of",
"annotations",
"."
] | def makeAnnotationsConfigDict(af):
ad = {}
conf = MyCasePreservingConfigParser()
conf.read(af)
for item in conf.options("annotations"):
value = conf.get("annotations", item)
ad[item] = value
return ad | [
"def",
"makeAnnotationsConfigDict",
"(",
"af",
")",
":",
"ad",
"=",
"{",
"}",
"conf",
"=",
"MyCasePreservingConfigParser",
"(",
")",
"conf",
".",
"read",
"(",
"af",
")",
"for",
"item",
"in",
"conf",
".",
"options",
"(",
"\"annotations\"",
")",
":",
"valu... | Parses annotations config file and returns dictionary of annotations. | [
"Parses",
"annotations",
"config",
"file",
"and",
"returns",
"dictionary",
"of",
"annotations",
"."
] | [
"\"\"\"\r\n Parses annotations config file and returns dictionary of annotations.\r\n \"\"\"",
"# Load up dict\r"
] | [
{
"param": "af",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "af",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
8f213896dcdc24332d0373d1482c685230044ef9 | czydominika/nappy | nappy/utils/parse_config.py | [
"BSD-3-Clause"
] | Python | makeLocalAttributesConfigDict | <not_specific> | def makeLocalAttributesConfigDict(laf):
"""
Parses local attributes config file and returns dictionary.
"""
lad = {}
conf = MyCasePreservingConfigParser()
conf.read(laf)
# Load up dict
for sect in ("nc_attributes", "na_attributes"):
lad[sect] = {}
for item in ... |
Parses local attributes config file and returns dictionary.
| Parses local attributes config file and returns dictionary. | [
"Parses",
"local",
"attributes",
"config",
"file",
"and",
"returns",
"dictionary",
"."
] | def makeLocalAttributesConfigDict(laf):
lad = {}
conf = MyCasePreservingConfigParser()
conf.read(laf)
for sect in ("nc_attributes", "na_attributes"):
lad[sect] = {}
for item in conf.options(sect):
value = conf.get(sect, item)
lad[sect][item] = value
return lad | [
"def",
"makeLocalAttributesConfigDict",
"(",
"laf",
")",
":",
"lad",
"=",
"{",
"}",
"conf",
"=",
"MyCasePreservingConfigParser",
"(",
")",
"conf",
".",
"read",
"(",
"laf",
")",
"for",
"sect",
"in",
"(",
"\"nc_attributes\"",
",",
"\"na_attributes\"",
")",
":"... | Parses local attributes config file and returns dictionary. | [
"Parses",
"local",
"attributes",
"config",
"file",
"and",
"returns",
"dictionary",
"."
] | [
"\"\"\"\r\n Parses local attributes config file and returns dictionary.\r\n \"\"\"",
"# Load up dict\r"
] | [
{
"param": "laf",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "laf",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
7d6dc3de51e279ee97d8f6ac0a2fd18c0876b29e | czydominika/nappy | nappy/nc_interface/cdms_to_na.py | [
"BSD-3-Clause"
] | Python | convert | <not_specific> | def convert(self):
"""
Reads the CDMS objects and convert to a set of dictionaries that
provide the structure for a NA File object.
Returns [(na_dict, var_ids), (na_dict, var_ids), ....]
All these na_dict dictionaries can be readily written to a NA File object.
Note that... |
Reads the CDMS objects and convert to a set of dictionaries that
provide the structure for a NA File object.
Returns [(na_dict, var_ids), (na_dict, var_ids), ....]
All these na_dict dictionaries can be readily written to a NA File object.
Note that NASA Ames is not as flexible ... | Reads the CDMS objects and convert to a set of dictionaries that
provide the structure for a NA File object.
Returns [(na_dict, var_ids), (na_dict, var_ids), ....]
All these na_dict dictionaries can be readily written to a NA File object.
Note that NASA Ames is not as flexible as NetCDF so you cannot just send any
set... | [
"Reads",
"the",
"CDMS",
"objects",
"and",
"convert",
"to",
"a",
"set",
"of",
"dictionaries",
"that",
"provide",
"the",
"structure",
"for",
"a",
"NA",
"File",
"object",
".",
"Returns",
"[",
"(",
"na_dict",
"var_ids",
")",
"(",
"na_dict",
"var_ids",
")",
"... | def convert(self):
if self.converted:
return self.na_dict_list
variables = self._convertSingletonVars(self.cdms_variables)
variables = self._reorderVars(variables)
collector = nappy.nc_interface.na_content_collector.NAContentCollector(variables,
... | [
"def",
"convert",
"(",
"self",
")",
":",
"if",
"self",
".",
"converted",
":",
"return",
"self",
".",
"na_dict_list",
"variables",
"=",
"self",
".",
"_convertSingletonVars",
"(",
"self",
".",
"cdms_variables",
")",
"variables",
"=",
"self",
".",
"_reorderVars... | Reads the CDMS objects and convert to a set of dictionaries that
provide the structure for a NA File object. | [
"Reads",
"the",
"CDMS",
"objects",
"and",
"convert",
"to",
"a",
"set",
"of",
"dictionaries",
"that",
"provide",
"the",
"structure",
"for",
"a",
"NA",
"File",
"object",
"."
] | [
"\"\"\"\n Reads the CDMS objects and convert to a set of dictionaries that\n provide the structure for a NA File object.\n Returns [(na_dict, var_ids), (na_dict, var_ids), ....]\n All these na_dict dictionaries can be readily written to a NA File object.\n\n Note that NASA Ames is... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
7d6dc3de51e279ee97d8f6ac0a2fd18c0876b29e | czydominika/nappy | nappy/nc_interface/cdms_to_na.py | [
"BSD-3-Clause"
] | Python | _convertSingletonVars | <not_specific> | def _convertSingletonVars(self, variables):
"""
Loops through variables to convert singleton variables (i.e. Masked Arrays/Numeric Arrays)
to proper CDMS variables. Then code won't break when asking for rank attribute later.
Returns a list of CDMS variable objects
"""
va... |
Loops through variables to convert singleton variables (i.e. Masked Arrays/Numeric Arrays)
to proper CDMS variables. Then code won't break when asking for rank attribute later.
Returns a list of CDMS variable objects
| Loops through variables to convert singleton variables
to proper CDMS variables. Then code won't break when asking for rank attribute later.
Returns a list of CDMS variable objects | [
"Loops",
"through",
"variables",
"to",
"convert",
"singleton",
"variables",
"to",
"proper",
"CDMS",
"variables",
".",
"Then",
"code",
"won",
"'",
"t",
"break",
"when",
"asking",
"for",
"rank",
"attribute",
"later",
".",
"Returns",
"a",
"list",
"of",
"CDMS",
... | def _convertSingletonVars(self, variables):
vars = []
for variable in variables:
var_obj = variable
if not hasattr(var_obj, "rank") or var_obj.rank() == 0:
var_metadata = var_obj.attributes
var_obj = cdms.createVariable(N.array(var_obj),
... | [
"def",
"_convertSingletonVars",
"(",
"self",
",",
"variables",
")",
":",
"vars",
"=",
"[",
"]",
"for",
"variable",
"in",
"variables",
":",
"var_obj",
"=",
"variable",
"if",
"not",
"hasattr",
"(",
"var_obj",
",",
"\"rank\"",
")",
"or",
"var_obj",
".",
"ra... | Loops through variables to convert singleton variables (i.e. | [
"Loops",
"through",
"variables",
"to",
"convert",
"singleton",
"variables",
"(",
"i",
".",
"e",
"."
] | [
"\"\"\"\n Loops through variables to convert singleton variables (i.e. Masked Arrays/Numeric Arrays) \n to proper CDMS variables. Then code won't break when asking for rank attribute later.\n Returns a list of CDMS variable objects\n \"\"\"",
"# If singleton variable then convert into ... | [
{
"param": "self",
"type": null
},
{
"param": "variables",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "variables",
"type": null,
"docstring": null,
"docstring_token... |
7d6dc3de51e279ee97d8f6ac0a2fd18c0876b29e | czydominika/nappy | nappy/nc_interface/cdms_to_na.py | [
"BSD-3-Clause"
] | Python | _reorderVars | <not_specific> | def _reorderVars(self, variables):
"""
Returns a reordered list of variables. Any that have the attribute
"nasa_ames_var_number" get ordered first in the list (according to numbering).
"""
# Set up a long list (longer than number of vars)
if len(variables) > var_limit:
... |
Returns a reordered list of variables. Any that have the attribute
"nasa_ames_var_number" get ordered first in the list (according to numbering).
| Returns a reordered list of variables. Any that have the attribute
"nasa_ames_var_number" get ordered first in the list (according to numbering). | [
"Returns",
"a",
"reordered",
"list",
"of",
"variables",
".",
"Any",
"that",
"have",
"the",
"attribute",
"\"",
"nasa_ames_var_number",
"\"",
"get",
"ordered",
"first",
"in",
"the",
"list",
"(",
"according",
"to",
"numbering",
")",
"."
] | def _reorderVars(self, variables):
if len(variables) > var_limit:
raise Exception("Can only handle converting less than " + `var_limit` + " variables in any batch.")
ordered_vars = [None] * var_limit
unordered_vars = []
for var in variables:
var_metadata = var.att... | [
"def",
"_reorderVars",
"(",
"self",
",",
"variables",
")",
":",
"if",
"len",
"(",
"variables",
")",
">",
"var_limit",
":",
"raise",
"Exception",
"(",
"\"Can only handle converting less than \"",
"+",
"`var_limit`",
"+",
"\" variables in any batch.\"",
")",
"ordered_... | Returns a reordered list of variables. | [
"Returns",
"a",
"reordered",
"list",
"of",
"variables",
"."
] | [
"\"\"\"\n Returns a reordered list of variables. Any that have the attribute \n \"nasa_ames_var_number\" get ordered first in the list (according to numbering).\n \"\"\"",
"# Set up a long list (longer than number of vars)",
"# Collect up those that are ordered and unordered",
"# Clear an... | [
{
"param": "self",
"type": null
},
{
"param": "variables",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "variables",
"type": null,
"docstring": null,
"docstring_token... |
7879055b7788c2dea7380ca91a61622b0a6d8db9 | czydominika/nappy | nappy/contrib/aircraft/aircraft_utils.py | [
"BSD-3-Clause"
] | Python | flatten2DTimeData | <not_specific> | def flatten2DTimeData(var, time_var):
"""
Returns a flattened 2D array variable with a recalculated time axies.
"""
data = MV.ravel(var)
missing = var.getMissing()
time_values = time_var._data
time_unit = time_var.units
sampling_rate = var.getAxis(1)
rate = int(sampling_rate... |
Returns a flattened 2D array variable with a recalculated time axies.
| Returns a flattened 2D array variable with a recalculated time axies. | [
"Returns",
"a",
"flattened",
"2D",
"array",
"variable",
"with",
"a",
"recalculated",
"time",
"axies",
"."
] | def flatten2DTimeData(var, time_var):
data = MV.ravel(var)
missing = var.getMissing()
time_values = time_var._data
time_unit = time_var.units
sampling_rate = var.getAxis(1)
rate = int(sampling_rate.id[3:])
newtime_values = []
for t in time_values:
for i in range(rate):
... | [
"def",
"flatten2DTimeData",
"(",
"var",
",",
"time_var",
")",
":",
"data",
"=",
"MV",
".",
"ravel",
"(",
"var",
")",
"missing",
"=",
"var",
".",
"getMissing",
"(",
")",
"time_values",
"=",
"time_var",
".",
"_data",
"time_unit",
"=",
"time_var",
".",
"u... | Returns a flattened 2D array variable with a recalculated time axies. | [
"Returns",
"a",
"flattened",
"2D",
"array",
"variable",
"with",
"a",
"recalculated",
"time",
"axies",
"."
] | [
"\"\"\"\r\n Returns a flattened 2D array variable with a recalculated time axies.\r\n \"\"\"",
"# Now create the variable\r"
] | [
{
"param": "var",
"type": null
},
{
"param": "time_var",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "var",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "time_var",
"type": null,
"docstring": null,
"docstring_tokens"... |
ccbe20e2249711214f73d937bd652b4af8bbfdf5 | czydominika/nappy | nappy/contrib/aircraft/aircraftData.py | [
"BSD-3-Clause"
] | Python | _subSampleBySelection | <not_specific> | def _subSampleBySelection(self, var, timeVar, flagVar, samplingRate, flagsToUse):
"""
Returns a new variable which is 'var' sub-sampled by selecting the value
at the given samplingRate with data selected according to flagVar
including the flag values specified in flagsToUse (defaults ar... |
Returns a new variable which is 'var' sub-sampled by selecting the value
at the given samplingRate with data selected according to flagVar
including the flag values specified in flagsToUse (defaults are 0 and 1).
| Returns a new variable which is 'var' sub-sampled by selecting the value
at the given samplingRate with data selected according to flagVar
including the flag values specified in flagsToUse (defaults are 0 and 1). | [
"Returns",
"a",
"new",
"variable",
"which",
"is",
"'",
"var",
"'",
"sub",
"-",
"sampled",
"by",
"selecting",
"the",
"value",
"at",
"the",
"given",
"samplingRate",
"with",
"data",
"selected",
"according",
"to",
"flagVar",
"including",
"the",
"flag",
"values",... | def _subSampleBySelection(self, var, timeVar, flagVar, samplingRate, flagsToUse):
if samplingRate!=1:
raise "Sampling rates of values other than 1Hz are not yet supported."
maskedArray=self._getMaskedArray(var[:,0](squeeze=1), flagVar[:,0](squeeze=1), flagsToUse)
newTimeAxis=self._fl... | [
"def",
"_subSampleBySelection",
"(",
"self",
",",
"var",
",",
"timeVar",
",",
"flagVar",
",",
"samplingRate",
",",
"flagsToUse",
")",
":",
"if",
"samplingRate",
"!=",
"1",
":",
"raise",
"\"Sampling rates of values other than 1Hz are not yet supported.\"",
"maskedArray",... | Returns a new variable which is 'var' sub-sampled by selecting the value
at the given samplingRate with data selected according to flagVar
including the flag values specified in flagsToUse (defaults are 0 and 1). | [
"Returns",
"a",
"new",
"variable",
"which",
"is",
"'",
"var",
"'",
"sub",
"-",
"sampled",
"by",
"selecting",
"the",
"value",
"at",
"the",
"given",
"samplingRate",
"with",
"data",
"selected",
"according",
"to",
"flagVar",
"including",
"the",
"flag",
"values",... | [
"\"\"\"\n Returns a new variable which is 'var' sub-sampled by selecting the value\n at the given samplingRate with data selected according to flagVar\n including the flag values specified in flagsToUse (defaults are 0 and 1).\n \"\"\"",
"# Now re-construct variable axes etc"
] | [
{
"param": "self",
"type": null
},
{
"param": "var",
"type": null
},
{
"param": "timeVar",
"type": null
},
{
"param": "flagVar",
"type": null
},
{
"param": "samplingRate",
"type": null
},
{
"param": "flagsToUse",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "var",
"type": null,
"docstring": null,
"docstring_tokens": []... |
ccbe20e2249711214f73d937bd652b4af8bbfdf5 | czydominika/nappy | nappy/contrib/aircraft/aircraftData.py | [
"BSD-3-Clause"
] | Python | _subSampleByAveraging | <not_specific> | def _subSampleByAveraging(self, var, timeVar, flagVar, samplingRate, flagsToUse):
"""
Returns a new variable which is 'var' sub-sampled by averaging
at the given samplingRate with data selected according to flagVar
including the flag values specified in flagsToUse (defaults are 0 and 1).... |
Returns a new variable which is 'var' sub-sampled by averaging
at the given samplingRate with data selected according to flagVar
including the flag values specified in flagsToUse (defaults are 0 and 1).
| Returns a new variable which is 'var' sub-sampled by averaging
at the given samplingRate with data selected according to flagVar
including the flag values specified in flagsToUse (defaults are 0 and 1). | [
"Returns",
"a",
"new",
"variable",
"which",
"is",
"'",
"var",
"'",
"sub",
"-",
"sampled",
"by",
"averaging",
"at",
"the",
"given",
"samplingRate",
"with",
"data",
"selected",
"according",
"to",
"flagVar",
"including",
"the",
"flag",
"values",
"specified",
"i... | def _subSampleByAveraging(self, var, timeVar, flagVar, samplingRate, flagsToUse):
maskedArray=self._getMaskedArray(var, flagVar, flagsToUse)
shape=var.shape
if shape[1]==1:
newNumArray=MV.ravel(maskedArray)
newArrayMask=MV.ravel(maskedArray.mask())
newArray=MA... | [
"def",
"_subSampleByAveraging",
"(",
"self",
",",
"var",
",",
"timeVar",
",",
"flagVar",
",",
"samplingRate",
",",
"flagsToUse",
")",
":",
"maskedArray",
"=",
"self",
".",
"_getMaskedArray",
"(",
"var",
",",
"flagVar",
",",
"flagsToUse",
")",
"shape",
"=",
... | Returns a new variable which is 'var' sub-sampled by averaging
at the given samplingRate with data selected according to flagVar
including the flag values specified in flagsToUse (defaults are 0 and 1). | [
"Returns",
"a",
"new",
"variable",
"which",
"is",
"'",
"var",
"'",
"sub",
"-",
"sampled",
"by",
"averaging",
"at",
"the",
"given",
"samplingRate",
"with",
"data",
"selected",
"according",
"to",
"flagVar",
"including",
"the",
"flag",
"values",
"specified",
"i... | [
"\"\"\"\n Returns a new variable which is 'var' sub-sampled by averaging\n at the given samplingRate with data selected according to flagVar\n including the flag values specified in flagsToUse (defaults are 0 and 1).\n \"\"\"",
"# Set as missing if less than half are valid ... | [
{
"param": "self",
"type": null
},
{
"param": "var",
"type": null
},
{
"param": "timeVar",
"type": null
},
{
"param": "flagVar",
"type": null
},
{
"param": "samplingRate",
"type": null
},
{
"param": "flagsToUse",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "var",
"type": null,
"docstring": null,
"docstring_tokens": []... |
ccbe20e2249711214f73d937bd652b4af8bbfdf5 | czydominika/nappy | nappy/contrib/aircraft/aircraftData.py | [
"BSD-3-Clause"
] | Python | _flatten2DTimeAxis | <not_specific> | def _flatten2DTimeAxis(self, timevar, samplingRate):
"""
Returns a flattened 2D time axis.
"""
if samplingRate!=1:
raise "Cannot yet deal with sub-sampling to non 1Hz sampling rates!"
timevalues=timevar._data
timeunit=timevar.units
newTimeValues=[]
... |
Returns a flattened 2D time axis.
| Returns a flattened 2D time axis. | [
"Returns",
"a",
"flattened",
"2D",
"time",
"axis",
"."
] | def _flatten2DTimeAxis(self, timevar, samplingRate):
if samplingRate!=1:
raise "Cannot yet deal with sub-sampling to non 1Hz sampling rates!"
timevalues=timevar._data
timeunit=timevar.units
newTimeValues=[]
rate=samplingRate
for t in timevalues:
fo... | [
"def",
"_flatten2DTimeAxis",
"(",
"self",
",",
"timevar",
",",
"samplingRate",
")",
":",
"if",
"samplingRate",
"!=",
"1",
":",
"raise",
"\"Cannot yet deal with sub-sampling to non 1Hz sampling rates!\"",
"timevalues",
"=",
"timevar",
".",
"_data",
"timeunit",
"=",
"ti... | Returns a flattened 2D time axis. | [
"Returns",
"a",
"flattened",
"2D",
"time",
"axis",
"."
] | [
"\"\"\"\n Returns a flattened 2D time axis.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "timevar",
"type": null
},
{
"param": "samplingRate",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "timevar",
"type": null,
"docstring": null,
"docstring_tokens"... |
ccbe20e2249711214f73d937bd652b4af8bbfdf5 | czydominika/nappy | nappy/contrib/aircraft/aircraftData.py | [
"BSD-3-Clause"
] | Python | _recreateVariable | <not_specific> | def _recreateVariable(self, var, newArray, timeAxis, flagVar, flagMax, missingValue, sampleBy="averaging"):
"""
Rebuilds a variable using new array and new time axis.
"""
atts=var.attributes
newAtts={}
for att,value in atts.items():
if type(value) in (type((1,... |
Rebuilds a variable using new array and new time axis.
| Rebuilds a variable using new array and new time axis. | [
"Rebuilds",
"a",
"variable",
"using",
"new",
"array",
"and",
"new",
"time",
"axis",
"."
] | def _recreateVariable(self, var, newArray, timeAxis, flagVar, flagMax, missingValue, sampleBy="averaging"):
atts=var.attributes
newAtts={}
for att,value in atts.items():
if type(value) in (type((1,1)), type([1,2]), type(Numeric.array([1.]))) and len(value)==1:
value=v... | [
"def",
"_recreateVariable",
"(",
"self",
",",
"var",
",",
"newArray",
",",
"timeAxis",
",",
"flagVar",
",",
"flagMax",
",",
"missingValue",
",",
"sampleBy",
"=",
"\"averaging\"",
")",
":",
"atts",
"=",
"var",
".",
"attributes",
"newAtts",
"=",
"{",
"}",
... | Rebuilds a variable using new array and new time axis. | [
"Rebuilds",
"a",
"variable",
"using",
"new",
"array",
"and",
"new",
"time",
"axis",
"."
] | [
"\"\"\"\n Rebuilds a variable using new array and new time axis.\n \"\"\"",
"# Now create the variable"
] | [
{
"param": "self",
"type": null
},
{
"param": "var",
"type": null
},
{
"param": "newArray",
"type": null
},
{
"param": "timeAxis",
"type": null
},
{
"param": "flagVar",
"type": null
},
{
"param": "flagMax",
"type": null
},
{
"param": "missi... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "var",
"type": null,
"docstring": null,
"docstring_tokens": []... |
ccbe20e2249711214f73d937bd652b4af8bbfdf5 | czydominika/nappy | nappy/contrib/aircraft/aircraftData.py | [
"BSD-3-Clause"
] | Python | _getMaskedArray | <not_specific> | def _getMaskedArray(self, var, flagVar=None, flagValues=(0,1), missingValuesToTest=(-9999., -32767.)):
"""
Returns a masked array that has the values only present where the flag
values are acceptable and the data itself is not missing.
"""
if flagVar:
flagFillValue=-1... |
Returns a masked array that has the values only present where the flag
values are acceptable and the data itself is not missing.
| Returns a masked array that has the values only present where the flag
values are acceptable and the data itself is not missing. | [
"Returns",
"a",
"masked",
"array",
"that",
"has",
"the",
"values",
"only",
"present",
"where",
"the",
"flag",
"values",
"are",
"acceptable",
"and",
"the",
"data",
"itself",
"is",
"not",
"missing",
"."
] | def _getMaskedArray(self, var, flagVar=None, flagValues=(0,1), missingValuesToTest=(-9999., -32767.)):
if flagVar:
flagFillValue=-1
flagGTValue=max(flagValues)
flagMaskWhereUnacceptable=MA.masked_greater(flagVar, flagGTValue).mask()
flagMaskWhereMissing=MA.masked_... | [
"def",
"_getMaskedArray",
"(",
"self",
",",
"var",
",",
"flagVar",
"=",
"None",
",",
"flagValues",
"=",
"(",
"0",
",",
"1",
")",
",",
"missingValuesToTest",
"=",
"(",
"-",
"9999.",
",",
"-",
"32767.",
")",
")",
":",
"if",
"flagVar",
":",
"flagFillVal... | Returns a masked array that has the values only present where the flag
values are acceptable and the data itself is not missing. | [
"Returns",
"a",
"masked",
"array",
"that",
"has",
"the",
"values",
"only",
"present",
"where",
"the",
"flag",
"values",
"are",
"acceptable",
"and",
"the",
"data",
"itself",
"is",
"not",
"missing",
"."
] | [
"\"\"\"\n Returns a masked array that has the values only present where the flag\n values are acceptable and the data itself is not missing.\n \"\"\"",
"#maskedArray=cdms.createVariable(maskedArray, id=var.id, fill_value=varFillValue)",
"#maskedArray.missing_value=varFillValue"
] | [
{
"param": "self",
"type": null
},
{
"param": "var",
"type": null
},
{
"param": "flagVar",
"type": null
},
{
"param": "flagValues",
"type": null
},
{
"param": "missingValuesToTest",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "var",
"type": null,
"docstring": null,
"docstring_tokens": []... |
24e7348e3849fdaf3d96d3848ec738379b3127f9 | czydominika/nappy | nappy/nc_interface/na_to_nc.py | [
"BSD-3-Clause"
] | Python | writeNCFile | <not_specific> | def writeNCFile(self, file_name, mode="w"):
"""
Writes the NASA Ames content that has been converted into CDMS objects to a
NetCDF file of name 'file_name'. Note that mode can be set to append so you
can add the data to an existing file.
"""
if not self.converted:
... |
Writes the NASA Ames content that has been converted into CDMS objects to a
NetCDF file of name 'file_name'. Note that mode can be set to append so you
can add the data to an existing file.
| Writes the NASA Ames content that has been converted into CDMS objects to a
NetCDF file of name 'file_name'. Note that mode can be set to append so you
can add the data to an existing file. | [
"Writes",
"the",
"NASA",
"Ames",
"content",
"that",
"has",
"been",
"converted",
"into",
"CDMS",
"objects",
"to",
"a",
"NetCDF",
"file",
"of",
"name",
"'",
"file_name",
"'",
".",
"Note",
"that",
"mode",
"can",
"be",
"set",
"to",
"append",
"so",
"you",
"... | def writeNCFile(self, file_name, mode="w"):
if not self.converted:
self.convert()
fout = cdms.open(file_name, mode=mode)
for var in self.cdms_variables:
fout.write(var)
for avar in self.cdms_aux_variables:
fout.write(avar)
for (att, value) in s... | [
"def",
"writeNCFile",
"(",
"self",
",",
"file_name",
",",
"mode",
"=",
"\"w\"",
")",
":",
"if",
"not",
"self",
".",
"converted",
":",
"self",
".",
"convert",
"(",
")",
"fout",
"=",
"cdms",
".",
"open",
"(",
"file_name",
",",
"mode",
"=",
"mode",
")... | Writes the NASA Ames content that has been converted into CDMS objects to a
NetCDF file of name 'file_name'. | [
"Writes",
"the",
"NASA",
"Ames",
"content",
"that",
"has",
"been",
"converted",
"into",
"CDMS",
"objects",
"to",
"a",
"NetCDF",
"file",
"of",
"name",
"'",
"file_name",
"'",
"."
] | [
"\"\"\"\r\n Writes the NASA Ames content that has been converted into CDMS objects to a\r\n NetCDF file of name 'file_name'. Note that mode can be set to append so you \r\n can add the data to an existing file.\r\n \"\"\"",
"# Create CDMS output file object\r",
"# Write main variable... | [
{
"param": "self",
"type": null
},
{
"param": "file_name",
"type": null
},
{
"param": "mode",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "file_name",
"type": null,
"docstring": null,
"docstring_token... |
bd48cb34def1e90f73865bcd79bd046fe24aa865 | czydominika/nappy | nappy/nc_interface/nc_to_na.py | [
"BSD-3-Clause"
] | Python | _readCDMSFile | <not_specific> | def _readCDMSFile(self, var_ids=None, exclude_vars=[]):
"""
Reads the file and returns all the CDMS variables in a list as well
as the global attributes: (cdms_variable_list, global_atts_list)
If var_ids is defined then only get those.
"""
fin = cdms.open(self.nc_fi... |
Reads the file and returns all the CDMS variables in a list as well
as the global attributes: (cdms_variable_list, global_atts_list)
If var_ids is defined then only get those.
| Reads the file and returns all the CDMS variables in a list as well
as the global attributes: (cdms_variable_list, global_atts_list)
If var_ids is defined then only get those. | [
"Reads",
"the",
"file",
"and",
"returns",
"all",
"the",
"CDMS",
"variables",
"in",
"a",
"list",
"as",
"well",
"as",
"the",
"global",
"attributes",
":",
"(",
"cdms_variable_list",
"global_atts_list",
")",
"If",
"var_ids",
"is",
"defined",
"then",
"only",
"get... | def _readCDMSFile(self, var_ids=None, exclude_vars=[]):
fin = cdms.open(self.nc_file)
cdms_variables = []
if type(var_ids) == type("string"):
var_ids = [var_ids]
for var_id in fin.listvariables():
if var_ids == None or var_id in var_ids:
if var_id ... | [
"def",
"_readCDMSFile",
"(",
"self",
",",
"var_ids",
"=",
"None",
",",
"exclude_vars",
"=",
"[",
"]",
")",
":",
"fin",
"=",
"cdms",
".",
"open",
"(",
"self",
".",
"nc_file",
")",
"cdms_variables",
"=",
"[",
"]",
"if",
"type",
"(",
"var_ids",
")",
"... | Reads the file and returns all the CDMS variables in a list as well
as the global attributes: (cdms_variable_list, global_atts_list)
If var_ids is defined then only get those. | [
"Reads",
"the",
"file",
"and",
"returns",
"all",
"the",
"CDMS",
"variables",
"in",
"a",
"list",
"as",
"well",
"as",
"the",
"global",
"attributes",
":",
"(",
"cdms_variable_list",
"global_atts_list",
")",
"If",
"var_ids",
"is",
"defined",
"then",
"only",
"get... | [
"\"\"\"\r\n Reads the file and returns all the CDMS variables in a list as well\r\n as the global attributes: (cdms_variable_list, global_atts_list)\r\n If var_ids is defined then only get those.\r\n \"\"\"",
"# Make sure var_ids is a list\r",
"# Check whether singleton variable, if ... | [
{
"param": "self",
"type": null
},
{
"param": "var_ids",
"type": null
},
{
"param": "exclude_vars",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "var_ids",
"type": null,
"docstring": null,
"docstring_tokens"... |
bd48cb34def1e90f73865bcd79bd046fe24aa865 | czydominika/nappy | nappy/nc_interface/nc_to_na.py | [
"BSD-3-Clause"
] | Python | constructNAFileNames | <not_specific> | def constructNAFileNames(self, na_file=None):
"""
Works out what the file names of the output NA files will be and
returns a list of them.
"""
self.convert()
file_names = []
# create file name if not given
if na_file == None:
base_n... |
Works out what the file names of the output NA files will be and
returns a list of them.
| Works out what the file names of the output NA files will be and
returns a list of them. | [
"Works",
"out",
"what",
"the",
"file",
"names",
"of",
"the",
"output",
"NA",
"files",
"will",
"be",
"and",
"returns",
"a",
"list",
"of",
"them",
"."
] | def constructNAFileNames(self, na_file=None):
self.convert()
file_names = []
if na_file == None:
base_name = self.nc_file
if base_name[-3:] == ".nc":
base_name = base_name[:-3]
na_file = base_name + ".na"
file_counter = 1
for th... | [
"def",
"constructNAFileNames",
"(",
"self",
",",
"na_file",
"=",
"None",
")",
":",
"self",
".",
"convert",
"(",
")",
"file_names",
"=",
"[",
"]",
"if",
"na_file",
"==",
"None",
":",
"base_name",
"=",
"self",
".",
"nc_file",
"if",
"base_name",
"[",
"-",... | Works out what the file names of the output NA files will be and
returns a list of them. | [
"Works",
"out",
"what",
"the",
"file",
"names",
"of",
"the",
"output",
"NA",
"files",
"will",
"be",
"and",
"returns",
"a",
"list",
"of",
"them",
"."
] | [
"\"\"\"\r\n Works out what the file names of the output NA files will be and \r\n returns a list of them.\r\n \"\"\"",
"# create file name if not given\r",
"# Now, create some valid file names\r",
"# Create file name\r"
] | [
{
"param": "self",
"type": null
},
{
"param": "na_file",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "na_file",
"type": null,
"docstring": null,
"docstring_tokens"... |
bd48cb34def1e90f73865bcd79bd046fe24aa865 | czydominika/nappy | nappy/nc_interface/nc_to_na.py | [
"BSD-3-Clause"
] | Python | writeNAFiles | <not_specific> | def writeNAFiles(self, na_file=None, delimiter=default_delimiter, annotation=False,
float_format=default_float_format, size_limit=None, no_header=False):
"""
Writes the self.na_dict_list content to one or more NASA Ames files.
Output file names are based on the self.nc_f... |
Writes the self.na_dict_list content to one or more NASA Ames files.
Output file names are based on the self.nc_file name unless specified
in the na_file_name argument in which case that provides the main name
that is appended to if multiple output file names are required.
... | Writes the self.na_dict_list content to one or more NASA Ames files.
Output file names are based on the self.nc_file name unless specified
in the na_file_name argument in which case that provides the main name
that is appended to if multiple output file names are required.
no_header is NOT implemented. | [
"Writes",
"the",
"self",
".",
"na_dict_list",
"content",
"to",
"one",
"or",
"more",
"NASA",
"Ames",
"files",
".",
"Output",
"file",
"names",
"are",
"based",
"on",
"the",
"self",
".",
"nc_file",
"name",
"unless",
"specified",
"in",
"the",
"na_file_name",
"a... | def writeNAFiles(self, na_file=None, delimiter=default_delimiter, annotation=False,
float_format=default_float_format, size_limit=None, no_header=False):
self.convert()
file_names = self.constructNAFileNames(na_file)
file_counter = 1
full_file_counter = 1
fi... | [
"def",
"writeNAFiles",
"(",
"self",
",",
"na_file",
"=",
"None",
",",
"delimiter",
"=",
"default_delimiter",
",",
"annotation",
"=",
"False",
",",
"float_format",
"=",
"default_float_format",
",",
"size_limit",
"=",
"None",
",",
"no_header",
"=",
"False",
")",... | Writes the self.na_dict_list content to one or more NASA Ames files. | [
"Writes",
"the",
"self",
".",
"na_dict_list",
"content",
"to",
"one",
"or",
"more",
"NASA",
"Ames",
"files",
"."
] | [
"\"\"\"\r\n Writes the self.na_dict_list content to one or more NASA Ames files.\r\n Output file names are based on the self.nc_file name unless specified\r\n in the na_file_name argument in which case that provides the main name\r\n that is appended to if multiple output file names are ... | [
{
"param": "self",
"type": null
},
{
"param": "na_file",
"type": null
},
{
"param": "delimiter",
"type": null
},
{
"param": "annotation",
"type": null
},
{
"param": "float_format",
"type": null
},
{
"param": "size_limit",
"type": null
},
{
... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "na_file",
"type": null,
"docstring": null,
"docstring_tokens"... |
bd48cb34def1e90f73865bcd79bd046fe24aa865 | czydominika/nappy | nappy/nc_interface/nc_to_na.py | [
"BSD-3-Clause"
] | Python | _writeNAFileSubsetsWithinSizeLimit | <not_specific> | def _writeNAFileSubsetsWithinSizeLimit(self, this_na_dict, file_name, delimiter,
float_format, size_limit, annotation):
"""
If self.size_limit is specified and FFI is 1001 we can chunk the output into
different files in a NASA Ames compliant way.
Returns lis... |
If self.size_limit is specified and FFI is 1001 we can chunk the output into
different files in a NASA Ames compliant way.
Returns list of file names of outputs written.
| If self.size_limit is specified and FFI is 1001 we can chunk the output into
different files in a NASA Ames compliant way.
Returns list of file names of outputs written. | [
"If",
"self",
".",
"size_limit",
"is",
"specified",
"and",
"FFI",
"is",
"1001",
"we",
"can",
"chunk",
"the",
"output",
"into",
"different",
"files",
"in",
"a",
"NASA",
"Ames",
"compliant",
"way",
".",
"Returns",
"list",
"of",
"file",
"names",
"of",
"outp... | def _writeNAFileSubsetsWithinSizeLimit(self, this_na_dict, file_name, delimiter,
float_format, size_limit, annotation):
file_names = []
var_list = this_na_dict["V"]
array_length = len(var_list[0])
nvol_info = divmod(array_length, size_limit)
nvol = nvol_inf... | [
"def",
"_writeNAFileSubsetsWithinSizeLimit",
"(",
"self",
",",
"this_na_dict",
",",
"file_name",
",",
"delimiter",
",",
"float_format",
",",
"size_limit",
",",
"annotation",
")",
":",
"file_names",
"=",
"[",
"]",
"var_list",
"=",
"this_na_dict",
"[",
"\"V\"",
"]... | If self.size_limit is specified and FFI is 1001 we can chunk the output into
different files in a NASA Ames compliant way. | [
"If",
"self",
".",
"size_limit",
"is",
"specified",
"and",
"FFI",
"is",
"1001",
"we",
"can",
"chunk",
"the",
"output",
"into",
"different",
"files",
"in",
"a",
"NASA",
"Ames",
"compliant",
"way",
"."
] | [
"\"\"\"\r\n If self.size_limit is specified and FFI is 1001 we can chunk the output into \r\n different files in a NASA Ames compliant way. \r\n Returns list of file names of outputs written.\r\n \"\"\"",
"# create the number of volumes (files) that need to be written.\r",
"# Loop th... | [
{
"param": "self",
"type": null
},
{
"param": "this_na_dict",
"type": null
},
{
"param": "file_name",
"type": null
},
{
"param": "delimiter",
"type": null
},
{
"param": "float_format",
"type": null
},
{
"param": "size_limit",
"type": null
},
{
... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "this_na_dict",
"type": null,
"docstring": null,
"docstring_to... |
bd48cb34def1e90f73865bcd79bd046fe24aa865 | czydominika/nappy | nappy/nc_interface/nc_to_na.py | [
"BSD-3-Clause"
] | Python | _updateWithColumnHeaders | <not_specific> | def _updateWithColumnHeaders(self, na_dict, delimiter):
"""
Updates the NCOM and NCOML parts of the na_dict so that
the last normal comments line is in fact a set of headers
for the data section. E.g.:
UTs Spd Direc
30446.9 305 2592
20447... |
Updates the NCOM and NCOML parts of the na_dict so that
the last normal comments line is in fact a set of headers
for the data section. E.g.:
UTs Spd Direc
30446.9 305 2592
20447.9 204 2596
The 'delimiter' argument is used to separate... | Updates the NCOM and NCOML parts of the na_dict so that
the last normal comments line is in fact a set of headers
for the data section.
The 'delimiter' argument is used to separate out the arguments.
This option is only compatible with a limited range of FFIs and
only works if there are no Auxiliary variables defin... | [
"Updates",
"the",
"NCOM",
"and",
"NCOML",
"parts",
"of",
"the",
"na_dict",
"so",
"that",
"the",
"last",
"normal",
"comments",
"line",
"is",
"in",
"fact",
"a",
"set",
"of",
"headers",
"for",
"the",
"data",
"section",
".",
"The",
"'",
"delimiter",
"'",
"... | def _updateWithColumnHeaders(self, na_dict, delimiter):
ffi = na_dict["FFI"]
compatible_ffis = (1001, 1010, 2110)
if ffi not in compatible_ffis or na_dict["NAUXV"] > 0:
log.debug("Column Headers are not written for FFIs other than: %s" % str(compatible_ffis))
return
... | [
"def",
"_updateWithColumnHeaders",
"(",
"self",
",",
"na_dict",
",",
"delimiter",
")",
":",
"ffi",
"=",
"na_dict",
"[",
"\"FFI\"",
"]",
"compatible_ffis",
"=",
"(",
"1001",
",",
"1010",
",",
"2110",
")",
"if",
"ffi",
"not",
"in",
"compatible_ffis",
"or",
... | Updates the NCOM and NCOML parts of the na_dict so that
the last normal comments line is in fact a set of headers
for the data section. | [
"Updates",
"the",
"NCOM",
"and",
"NCOML",
"parts",
"of",
"the",
"na_dict",
"so",
"that",
"the",
"last",
"normal",
"comments",
"line",
"is",
"in",
"fact",
"a",
"set",
"of",
"headers",
"for",
"the",
"data",
"section",
"."
] | [
"\"\"\"\r\n Updates the NCOM and NCOML parts of the na_dict so that \r\n the last normal comments line is in fact a set of headers \r\n for the data section. E.g.:\r\n\r\n UTs Spd Direc\r\n 30446.9 305 2592\r\n 20447.9 204 2596\r\n\r\n The 'delimiter'... | [
{
"param": "self",
"type": null
},
{
"param": "na_dict",
"type": null
},
{
"param": "delimiter",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "na_dict",
"type": null,
"docstring": null,
"docstring_tokens"... |
987d5e7e5c4ade33bf533fa5cfc649f0f4377d03 | czydominika/nappy | nappy/na_file/na_core.py | [
"BSD-3-Clause"
] | Python | _attemptVarAndUnitsMatch | <not_specific> | def _attemptVarAndUnitsMatch(self, item):
"""
If it can match variable name and units from the name it does and returns
(var_name, units). Otherwise returns (item, None).
"""
match = NACore.var_and_units_pattern.match(item)
if match:
(v1, units, v2) = match.g... |
If it can match variable name and units from the name it does and returns
(var_name, units). Otherwise returns (item, None).
| If it can match variable name and units from the name it does and returns
(var_name, units). Otherwise returns (item, None). | [
"If",
"it",
"can",
"match",
"variable",
"name",
"and",
"units",
"from",
"the",
"name",
"it",
"does",
"and",
"returns",
"(",
"var_name",
"units",
")",
".",
"Otherwise",
"returns",
"(",
"item",
"None",
")",
"."
] | def _attemptVarAndUnitsMatch(self, item):
match = NACore.var_and_units_pattern.match(item)
if match:
(v1, units, v2) = match.groups()
var_name = v1 + " " + v2
else:
(var_name, units) = (item, None)
return (var_name.strip(), units) | [
"def",
"_attemptVarAndUnitsMatch",
"(",
"self",
",",
"item",
")",
":",
"match",
"=",
"NACore",
".",
"var_and_units_pattern",
".",
"match",
"(",
"item",
")",
"if",
"match",
":",
"(",
"v1",
",",
"units",
",",
"v2",
")",
"=",
"match",
".",
"groups",
"(",
... | If it can match variable name and units from the name it does and returns
(var_name, units). | [
"If",
"it",
"can",
"match",
"variable",
"name",
"and",
"units",
"from",
"the",
"name",
"it",
"does",
"and",
"returns",
"(",
"var_name",
"units",
")",
"."
] | [
"\"\"\"\n If it can match variable name and units from the name it does and returns\n (var_name, units). Otherwise returns (item, None).\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "item",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "item",
"type": null,
"docstring": null,
"docstring_tokens": [... |
aef2cc898cdc2d7cd6223f615b3655c3f9a1b6a2 | czydominika/nappy | tests/make_na_file_unit_tests.py | [
"BSD-3-Clause"
] | Python | makeNAFileTests | null | def makeNAFileTests():
"Makes unit tests for the main NAFile classes."
ffis = ("1001", "1010", "1020", "2010", "2110", "2160",
"2310", "3010", "4010")
with open("test_na_file_template.tmpl") as fh:
template = fh.read()
for ffi in ffis:
content = template.replace("<... | Makes unit tests for the main NAFile classes. | Makes unit tests for the main NAFile classes. | [
"Makes",
"unit",
"tests",
"for",
"the",
"main",
"NAFile",
"classes",
"."
] | def makeNAFileTests():
ffis = ("1001", "1010", "1020", "2010", "2110", "2160",
"2310", "3010", "4010")
with open("test_na_file_template.tmpl") as fh:
template = fh.read()
for ffi in ffis:
content = template.replace("<FFI>", ffi)
test_file_name = "test_na_file_%s.py" % ffi... | [
"def",
"makeNAFileTests",
"(",
")",
":",
"ffis",
"=",
"(",
"\"1001\"",
",",
"\"1010\"",
",",
"\"1020\"",
",",
"\"2010\"",
",",
"\"2110\"",
",",
"\"2160\"",
",",
"\"2310\"",
",",
"\"3010\"",
",",
"\"4010\"",
")",
"with",
"open",
"(",
"\"test_na_file_template.... | Makes unit tests for the main NAFile classes. | [
"Makes",
"unit",
"tests",
"for",
"the",
"main",
"NAFile",
"classes",
"."
] | [
"\"Makes unit tests for the main NAFile classes.\""
] | [] | {
"returns": [],
"raises": [],
"params": [],
"outlier_params": [],
"others": []
} |
8c7fabb62eadddc9643c35be39cd826c4ee0b964 | czydominika/nappy | nappy/utils/right_strip.py | [
"BSD-3-Clause"
] | Python | rightStripCurlyBraces | <not_specific> | def rightStripCurlyBraces(line):
"""
Returns line but with curly braces right stripped off.
"""
match = rstrip_regex.match(line)
if not match: return line
return match.groups()[0] |
Returns line but with curly braces right stripped off.
| Returns line but with curly braces right stripped off. | [
"Returns",
"line",
"but",
"with",
"curly",
"braces",
"right",
"stripped",
"off",
"."
] | def rightStripCurlyBraces(line):
match = rstrip_regex.match(line)
if not match: return line
return match.groups()[0] | [
"def",
"rightStripCurlyBraces",
"(",
"line",
")",
":",
"match",
"=",
"rstrip_regex",
".",
"match",
"(",
"line",
")",
"if",
"not",
"match",
":",
"return",
"line",
"return",
"match",
".",
"groups",
"(",
")",
"[",
"0",
"]"
] | Returns line but with curly braces right stripped off. | [
"Returns",
"line",
"but",
"with",
"curly",
"braces",
"right",
"stripped",
"off",
"."
] | [
"\"\"\"\n Returns line but with curly braces right stripped off.\n \"\"\""
] | [
{
"param": "line",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "line",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
d5892a41da9acfedbdf16717e2713549af77fe09 | czydominika/nappy | nappy/na_file/na_file_1001.py | [
"BSD-3-Clause"
] | Python | readHeader | null | def readHeader(self):
"""
Reads FFI-specific header section.
"""
self._readCommonHeader()
self.DX = nappy.utils.text_parser.readItemsFromLine(self.file.readline(), self.NIV, float)
self.XNAME = nappy.utils.text_parser.readItemsFromLines(self._readLines(self.NIV), self.NIV... |
Reads FFI-specific header section.
| Reads FFI-specific header section. | [
"Reads",
"FFI",
"-",
"specific",
"header",
"section",
"."
] | def readHeader(self):
self._readCommonHeader()
self.DX = nappy.utils.text_parser.readItemsFromLine(self.file.readline(), self.NIV, float)
self.XNAME = nappy.utils.text_parser.readItemsFromLines(self._readLines(self.NIV), self.NIV, str)
self._readVariablesHeaderSection()
self._rea... | [
"def",
"readHeader",
"(",
"self",
")",
":",
"self",
".",
"_readCommonHeader",
"(",
")",
"self",
".",
"DX",
"=",
"nappy",
".",
"utils",
".",
"text_parser",
".",
"readItemsFromLine",
"(",
"self",
".",
"file",
".",
"readline",
"(",
")",
",",
"self",
".",
... | Reads FFI-specific header section. | [
"Reads",
"FFI",
"-",
"specific",
"header",
"section",
"."
] | [
"\"\"\"\n Reads FFI-specific header section.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
d5892a41da9acfedbdf16717e2713549af77fe09 | czydominika/nappy | nappy/na_file/na_file_1001.py | [
"BSD-3-Clause"
] | Python | writeHeader | null | def writeHeader(self):
"""
Writes FFI-specific header section.
"""
self._writeCommonHeader()
annotation = getAnnotation("DX", self.annotation, delimiter = self.delimiter)
self.header.write((annotation + "%s" * self.NIV + "\n") % tuple(self.DX))
annotation ... |
Writes FFI-specific header section.
| Writes FFI-specific header section. | [
"Writes",
"FFI",
"-",
"specific",
"header",
"section",
"."
] | def writeHeader(self):
self._writeCommonHeader()
annotation = getAnnotation("DX", self.annotation, delimiter = self.delimiter)
self.header.write((annotation + "%s" * self.NIV + "\n") % tuple(self.DX))
annotation = getAnnotation("XNAME", self.annotation, delimiter = self.delimiter)
... | [
"def",
"writeHeader",
"(",
"self",
")",
":",
"self",
".",
"_writeCommonHeader",
"(",
")",
"annotation",
"=",
"getAnnotation",
"(",
"\"DX\"",
",",
"self",
".",
"annotation",
",",
"delimiter",
"=",
"self",
".",
"delimiter",
")",
"self",
".",
"header",
".",
... | Writes FFI-specific header section. | [
"Writes",
"FFI",
"-",
"specific",
"header",
"section",
"."
] | [
"\"\"\"\n Writes FFI-specific header section.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
d5892a41da9acfedbdf16717e2713549af77fe09 | czydominika/nappy | nappy/na_file/na_file_1001.py | [
"BSD-3-Clause"
] | Python | _setupArrays | null | def _setupArrays(self):
"""
Sets up FFI-specific arrays to fill with data (lists of lists).
"""
self.X = []
self.V = []
# Set up the variables list
for n in range(self.NV):
self.V.append([]) |
Sets up FFI-specific arrays to fill with data (lists of lists).
| Sets up FFI-specific arrays to fill with data (lists of lists). | [
"Sets",
"up",
"FFI",
"-",
"specific",
"arrays",
"to",
"fill",
"with",
"data",
"(",
"lists",
"of",
"lists",
")",
"."
] | def _setupArrays(self):
self.X = []
self.V = []
for n in range(self.NV):
self.V.append([]) | [
"def",
"_setupArrays",
"(",
"self",
")",
":",
"self",
".",
"X",
"=",
"[",
"]",
"self",
".",
"V",
"=",
"[",
"]",
"for",
"n",
"in",
"range",
"(",
"self",
".",
"NV",
")",
":",
"self",
".",
"V",
".",
"append",
"(",
"[",
"]",
")"
] | Sets up FFI-specific arrays to fill with data (lists of lists). | [
"Sets",
"up",
"FFI",
"-",
"specific",
"arrays",
"to",
"fill",
"with",
"data",
"(",
"lists",
"of",
"lists",
")",
"."
] | [
"\"\"\"\n Sets up FFI-specific arrays to fill with data (lists of lists).\n \"\"\"",
"# Set up the variables list"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
d5892a41da9acfedbdf16717e2713549af77fe09 | czydominika/nappy | nappy/na_file/na_file_1001.py | [
"BSD-3-Clause"
] | Python | _readData1 | <not_specific> | def _readData1(self, datalines, ivar_count):
"""
Reads first line/section of current block of data.
"""
(x_and_v, rtlines) = nappy.utils.text_parser.readItemsFromUnknownLines(datalines, 1 + self.NV, float)
(x, v) = (x_and_v[0], x_and_v[1:])
self.X.append(x)
count ... |
Reads first line/section of current block of data.
| Reads first line/section of current block of data. | [
"Reads",
"first",
"line",
"/",
"section",
"of",
"current",
"block",
"of",
"data",
"."
] | def _readData1(self, datalines, ivar_count):
(x_and_v, rtlines) = nappy.utils.text_parser.readItemsFromUnknownLines(datalines, 1 + self.NV, float)
(x, v) = (x_and_v[0], x_and_v[1:])
self.X.append(x)
count = 0
for n in range(self.NV):
self.V[n].append(v[count])
... | [
"def",
"_readData1",
"(",
"self",
",",
"datalines",
",",
"ivar_count",
")",
":",
"(",
"x_and_v",
",",
"rtlines",
")",
"=",
"nappy",
".",
"utils",
".",
"text_parser",
".",
"readItemsFromUnknownLines",
"(",
"datalines",
",",
"1",
"+",
"self",
".",
"NV",
",... | Reads first line/section of current block of data. | [
"Reads",
"first",
"line",
"/",
"section",
"of",
"current",
"block",
"of",
"data",
"."
] | [
"\"\"\"\n Reads first line/section of current block of data.\n \"\"\"",
"# Set up mth list in self.V"
] | [
{
"param": "self",
"type": null
},
{
"param": "datalines",
"type": null
},
{
"param": "ivar_count",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "datalines",
"type": null,
"docstring": null,
"docstring_token... |
d5892a41da9acfedbdf16717e2713549af77fe09 | czydominika/nappy | nappy/na_file/na_file_1001.py | [
"BSD-3-Clause"
] | Python | _readData2 | <not_specific> | def _readData2(self, datalines, ivar_count):
"""
Reads second line/section (if used) of current block of data.
"""
return datalines |
Reads second line/section (if used) of current block of data.
| Reads second line/section (if used) of current block of data. | [
"Reads",
"second",
"line",
"/",
"section",
"(",
"if",
"used",
")",
"of",
"current",
"block",
"of",
"data",
"."
] | def _readData2(self, datalines, ivar_count):
return datalines | [
"def",
"_readData2",
"(",
"self",
",",
"datalines",
",",
"ivar_count",
")",
":",
"return",
"datalines"
] | Reads second line/section (if used) of current block of data. | [
"Reads",
"second",
"line",
"/",
"section",
"(",
"if",
"used",
")",
"of",
"current",
"block",
"of",
"data",
"."
] | [
"\"\"\"\n Reads second line/section (if used) of current block of data.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "datalines",
"type": null
},
{
"param": "ivar_count",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "datalines",
"type": null,
"docstring": null,
"docstring_token... |
d5892a41da9acfedbdf16717e2713549af77fe09 | czydominika/nappy | nappy/na_file/na_file_1001.py | [
"BSD-3-Clause"
] | Python | writeData | null | def writeData(self):
"""
Writes the data section of the file.
This method can be called directly by the user.
"""
for m in range(len(self.X)):
var_string = self.format % self.X[m]
for n in range(self.NV):
var_string = var_string + (self.f... |
Writes the data section of the file.
This method can be called directly by the user.
| Writes the data section of the file.
This method can be called directly by the user. | [
"Writes",
"the",
"data",
"section",
"of",
"the",
"file",
".",
"This",
"method",
"can",
"be",
"called",
"directly",
"by",
"the",
"user",
"."
] | def writeData(self):
for m in range(len(self.X)):
var_string = self.format % self.X[m]
for n in range(self.NV):
var_string = var_string + (self.format % self.V[n][m])
self.file.write(wrapLine("Data", self.annotation, self.delimiter, "%s\n" % var_string.rstrip(... | [
"def",
"writeData",
"(",
"self",
")",
":",
"for",
"m",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"X",
")",
")",
":",
"var_string",
"=",
"self",
".",
"format",
"%",
"self",
".",
"X",
"[",
"m",
"]",
"for",
"n",
"in",
"range",
"(",
"self",
".... | Writes the data section of the file. | [
"Writes",
"the",
"data",
"section",
"of",
"the",
"file",
"."
] | [
"\"\"\"\n Writes the data section of the file.\n This method can be called directly by the user.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
d9f68d06c428343f291cd15729cef06cc93f027c | kneufeld/spakle | spakle.py | [
"MIT"
] | Python | decode_payload | <not_specific> | def decode_payload(self, data):
"""
data from gitlab is a x-www-form-urlencoded string
some hoops must be jumped through to get a useable dict
WARNING: all data in dict (keys and values) are bytes not strings
"""
data = urllib.parse.parse_qs(data)
# print("incomi... |
data from gitlab is a x-www-form-urlencoded string
some hoops must be jumped through to get a useable dict
WARNING: all data in dict (keys and values) are bytes not strings
| data from gitlab is a x-www-form-urlencoded string
some hoops must be jumped through to get a useable dict
all data in dict (keys and values) are bytes not strings | [
"data",
"from",
"gitlab",
"is",
"a",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"string",
"some",
"hoops",
"must",
"be",
"jumped",
"through",
"to",
"get",
"a",
"useable",
"dict",
"all",
"data",
"in",
"dict",
"(",
"keys",
"and",
"values",
")",
"... | def decode_payload(self, data):
data = urllib.parse.parse_qs(data)
payload = data[b'payload'][0]
payload = json.loads(payload.decode('utf-8'))
return payload | [
"def",
"decode_payload",
"(",
"self",
",",
"data",
")",
":",
"data",
"=",
"urllib",
".",
"parse",
".",
"parse_qs",
"(",
"data",
")",
"payload",
"=",
"data",
"[",
"b'payload'",
"]",
"[",
"0",
"]",
"payload",
"=",
"json",
".",
"loads",
"(",
"payload",
... | data from gitlab is a x-www-form-urlencoded string
some hoops must be jumped through to get a useable dict | [
"data",
"from",
"gitlab",
"is",
"a",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"string",
"some",
"hoops",
"must",
"be",
"jumped",
"through",
"to",
"get",
"a",
"useable",
"dict"
] | [
"\"\"\"\n data from gitlab is a x-www-form-urlencoded string\n some hoops must be jumped through to get a useable dict\n\n WARNING: all data in dict (keys and values) are bytes not strings\n \"\"\"",
"# print(\"incoming:\", data)",
"# data[payload] is a list with one giant string in ... | [
{
"param": "self",
"type": null
},
{
"param": "data",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "data",
"type": null,
"docstring": null,
"docstring_tokens": [... |
d9f68d06c428343f291cd15729cef06cc93f027c | kneufeld/spakle | spakle.py | [
"MIT"
] | Python | encode_payload | <not_specific> | def encode_payload(self, payload):
"""
opposite of decode_payload, turn our dict back into
an encoded form, ready to send to slack
"""
payload = json.dumps(payload)
payload = {b'payload': [payload]}
data = urllib.parse.urlencode(payload, doseq=True).encode('ascii'... |
opposite of decode_payload, turn our dict back into
an encoded form, ready to send to slack
| opposite of decode_payload, turn our dict back into
an encoded form, ready to send to slack | [
"opposite",
"of",
"decode_payload",
"turn",
"our",
"dict",
"back",
"into",
"an",
"encoded",
"form",
"ready",
"to",
"send",
"to",
"slack"
] | def encode_payload(self, payload):
payload = json.dumps(payload)
payload = {b'payload': [payload]}
data = urllib.parse.urlencode(payload, doseq=True).encode('ascii')
return data | [
"def",
"encode_payload",
"(",
"self",
",",
"payload",
")",
":",
"payload",
"=",
"json",
".",
"dumps",
"(",
"payload",
")",
"payload",
"=",
"{",
"b'payload'",
":",
"[",
"payload",
"]",
"}",
"data",
"=",
"urllib",
".",
"parse",
".",
"urlencode",
"(",
"... | opposite of decode_payload, turn our dict back into
an encoded form, ready to send to slack | [
"opposite",
"of",
"decode_payload",
"turn",
"our",
"dict",
"back",
"into",
"an",
"encoded",
"form",
"ready",
"to",
"send",
"to",
"slack"
] | [
"\"\"\"\n opposite of decode_payload, turn our dict back into\n an encoded form, ready to send to slack\n \"\"\"",
"#print(\"outgoing:\", data)"
] | [
{
"param": "self",
"type": null
},
{
"param": "payload",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "payload",
"type": null,
"docstring": null,
"docstring_tokens"... |
d9f68d06c428343f291cd15729cef06cc93f027c | kneufeld/spakle | spakle.py | [
"MIT"
] | Python | respond_to_gitlab | <not_specific> | def respond_to_gitlab(self, resp):
"""
forward slack response back to gitlab
"""
if resp is None:
self.send_response(500)
self.end_headers()
return
self.send_response(resp.status)
self.end_headers()
self.wfile.write( resp.read... |
forward slack response back to gitlab
| forward slack response back to gitlab | [
"forward",
"slack",
"response",
"back",
"to",
"gitlab"
] | def respond_to_gitlab(self, resp):
if resp is None:
self.send_response(500)
self.end_headers()
return
self.send_response(resp.status)
self.end_headers()
self.wfile.write( resp.read() ) | [
"def",
"respond_to_gitlab",
"(",
"self",
",",
"resp",
")",
":",
"if",
"resp",
"is",
"None",
":",
"self",
".",
"send_response",
"(",
"500",
")",
"self",
".",
"end_headers",
"(",
")",
"return",
"self",
".",
"send_response",
"(",
"resp",
".",
"status",
")... | forward slack response back to gitlab | [
"forward",
"slack",
"response",
"back",
"to",
"gitlab"
] | [
"\"\"\"\n forward slack response back to gitlab\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "resp",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "resp",
"type": null,
"docstring": null,
"docstring_tokens": [... |
4edd9e31b1a74232c986e74c3694caa0a320889a | evan-tan/learning | python/strings.py | [
"MIT"
] | Python | common_letters | <not_specific> | def common_letters(str1, str2):
"""Return common letters between two strings."""
dict_ = []
if len(str1) > len(str2):
str_ = str1
else:
str_ = str2
for letter in str_:
if letter in str2 and letter in str1 and letter not in dict_:
dict_.append(letter)
return di... | Return common letters between two strings. | Return common letters between two strings. | [
"Return",
"common",
"letters",
"between",
"two",
"strings",
"."
] | def common_letters(str1, str2):
dict_ = []
if len(str1) > len(str2):
str_ = str1
else:
str_ = str2
for letter in str_:
if letter in str2 and letter in str1 and letter not in dict_:
dict_.append(letter)
return dict_ | [
"def",
"common_letters",
"(",
"str1",
",",
"str2",
")",
":",
"dict_",
"=",
"[",
"]",
"if",
"len",
"(",
"str1",
")",
">",
"len",
"(",
"str2",
")",
":",
"str_",
"=",
"str1",
"else",
":",
"str_",
"=",
"str2",
"for",
"letter",
"in",
"str_",
":",
"i... | Return common letters between two strings. | [
"Return",
"common",
"letters",
"between",
"two",
"strings",
"."
] | [
"\"\"\"Return common letters between two strings.\"\"\""
] | [
{
"param": "str1",
"type": null
},
{
"param": "str2",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "str1",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "str2",
"type": null,
"docstring": null,
"docstring_tokens": [... |
7c6174208eb9b17685908dbb50ae3e7faf2e7deb | evan-tan/learning | problem_solving/hackerrank_easy.py | [
"MIT"
] | Python | staircase | null | def staircase(n):
"""Print right justified staircase usings spaces and hashes"""
for row in range(n):
n_hashes = row + 1
n_spaces = n - n_hashes
print(" " * n_spaces, end="")
print("#" * n_hashes) | Print right justified staircase usings spaces and hashes | Print right justified staircase usings spaces and hashes | [
"Print",
"right",
"justified",
"staircase",
"usings",
"spaces",
"and",
"hashes"
] | def staircase(n):
for row in range(n):
n_hashes = row + 1
n_spaces = n - n_hashes
print(" " * n_spaces, end="")
print("#" * n_hashes) | [
"def",
"staircase",
"(",
"n",
")",
":",
"for",
"row",
"in",
"range",
"(",
"n",
")",
":",
"n_hashes",
"=",
"row",
"+",
"1",
"n_spaces",
"=",
"n",
"-",
"n_hashes",
"print",
"(",
"\" \"",
"*",
"n_spaces",
",",
"end",
"=",
"\"\"",
")",
"print",
"(",
... | Print right justified staircase usings spaces and hashes | [
"Print",
"right",
"justified",
"staircase",
"usings",
"spaces",
"and",
"hashes"
] | [
"\"\"\"Print right justified staircase usings spaces and hashes\"\"\""
] | [
{
"param": "n",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "n",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
c1e428ee041ad46c9b0cfc1a174671778e7d8517 | shyyhs/MCMA | src/train.py | [
"Apache-2.0"
] | Python | prepareNextIter | <not_specific> | def prepareNextIter(labelA,labelC,src,tgt):
""" labelA labelC are np arraies, src tgt are tensors """
nextSrc = [[] for i in range(numA)]
nextTgt = [[] for i in range(numA)]
for i in range(len(src)):
nextSrc[labelC[i]].append(src[i])
nextTgt[labelC[i]].append(tgt[i])
nextSrc = [tenso... | labelA labelC are np arraies, src tgt are tensors | labelA labelC are np arraies, src tgt are tensors | [
"labelA",
"labelC",
"are",
"np",
"arraies",
"src",
"tgt",
"are",
"tensors"
] | def prepareNextIter(labelA,labelC,src,tgt):
nextSrc = [[] for i in range(numA)]
nextTgt = [[] for i in range(numA)]
for i in range(len(src)):
nextSrc[labelC[i]].append(src[i])
nextTgt[labelC[i]].append(tgt[i])
nextSrc = [tensorData(nextSrc[i]) for i in range(numA)]
nextTgt = [tensorD... | [
"def",
"prepareNextIter",
"(",
"labelA",
",",
"labelC",
",",
"src",
",",
"tgt",
")",
":",
"nextSrc",
"=",
"[",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"numA",
")",
"]",
"nextTgt",
"=",
"[",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"numA",
")... | labelA labelC are np arraies, src tgt are tensors | [
"labelA",
"labelC",
"are",
"np",
"arraies",
"src",
"tgt",
"are",
"tensors"
] | [
"\"\"\" labelA labelC are np arraies, src tgt are tensors \"\"\""
] | [
{
"param": "labelA",
"type": null
},
{
"param": "labelC",
"type": null
},
{
"param": "src",
"type": null
},
{
"param": "tgt",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "labelA",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "labelC",
"type": null,
"docstring": null,
"docstring_tokens... |
c1e428ee041ad46c9b0cfc1a174671778e7d8517 | shyyhs/MCMA | src/train.py | [
"Apache-2.0"
] | Python | evaluate | null | def evaluate(A,C,testSrc,testTgt):
""" predictC is the prediction, whereas predictA is the groundtruth, undersand this """
N = len(testSrc)*1.0
predictC = softmax2num(modelDeduct(C,testSrc))
predictAs = predByAs(A,testSrc)
predictA = getLabel(predictAs,testTgt,eb)
accuracy = sum([(predictC[i]>0 ... | predictC is the prediction, whereas predictA is the groundtruth, undersand this | predictC is the prediction, whereas predictA is the groundtruth, undersand this | [
"predictC",
"is",
"the",
"prediction",
"whereas",
"predictA",
"is",
"the",
"groundtruth",
"undersand",
"this"
] | def evaluate(A,C,testSrc,testTgt):
N = len(testSrc)*1.0
predictC = softmax2num(modelDeduct(C,testSrc))
predictAs = predByAs(A,testSrc)
predictA = getLabel(predictAs,testTgt,eb)
accuracy = sum([(predictC[i]>0 and errMeasure(predictAs[predictC[i]],testTgt[i])<eb) for i in range(N)])/double(N) | [
"def",
"evaluate",
"(",
"A",
",",
"C",
",",
"testSrc",
",",
"testTgt",
")",
":",
"N",
"=",
"len",
"(",
"testSrc",
")",
"*",
"1.0",
"predictC",
"=",
"softmax2num",
"(",
"modelDeduct",
"(",
"C",
",",
"testSrc",
")",
")",
"predictAs",
"=",
"predByAs",
... | predictC is the prediction, whereas predictA is the groundtruth, undersand this | [
"predictC",
"is",
"the",
"prediction",
"whereas",
"predictA",
"is",
"the",
"groundtruth",
"undersand",
"this"
] | [
"\"\"\" predictC is the prediction, whereas predictA is the groundtruth, undersand this \"\"\""
] | [
{
"param": "A",
"type": null
},
{
"param": "C",
"type": null
},
{
"param": "testSrc",
"type": null
},
{
"param": "testTgt",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "A",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "C",
"type": null,
"docstring": null,
"docstring_tokens": [],
... |
690dbf4f8ca4b8db7355256b2c508e761a987931 | bmkrutgers/MyDaemon | examples/myproc.py | [
"MIT"
] | Python | run | null | def run(self):
'''
Process start to run here.
'''
# Delete the run file at exit. Maybe there will be no stop request.
atexit.register(self.delrun)
# Run while there is no stop request.
n = 0
while os.path.exists(RUNFILE):
print('.')
... |
Process start to run here.
| Process start to run here. | [
"Process",
"start",
"to",
"run",
"here",
"."
] | def run(self):
atexit.register(self.delrun)
n = 0
while os.path.exists(RUNFILE):
print('.')
n += 1
if (n > 60):
break
time.sleep(1) | [
"def",
"run",
"(",
"self",
")",
":",
"atexit",
".",
"register",
"(",
"self",
".",
"delrun",
")",
"n",
"=",
"0",
"while",
"os",
".",
"path",
".",
"exists",
"(",
"RUNFILE",
")",
":",
"print",
"(",
"'.'",
")",
"n",
"+=",
"1",
"if",
"(",
"n",
">"... | Process start to run here. | [
"Process",
"start",
"to",
"run",
"here",
"."
] | [
"'''\n Process start to run here.\n '''",
"# Delete the run file at exit. Maybe there will be no stop request.",
"# Run while there is no stop request."
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
0e813412832f83af38b4ba88f56bbfb3f86bd216 | bmkrutgers/MyDaemon | examples/myservice.py | [
"MIT"
] | Python | run | null | def run(self):
'''
Daemon start to run here.
'''
# Run while there is no stop request.
while os.path.exists(RUNFILE):
try:
pass
except Exception as err:
if DEBUG:
raise
else:
... |
Daemon start to run here.
| Daemon start to run here. | [
"Daemon",
"start",
"to",
"run",
"here",
"."
] | def run(self):
while os.path.exists(RUNFILE):
try:
pass
except Exception as err:
if DEBUG:
raise
else:
sys.stderr.write('%s\n' % (err))
finally:
wait(timeout=LOOP_SLEEP) | [
"def",
"run",
"(",
"self",
")",
":",
"while",
"os",
".",
"path",
".",
"exists",
"(",
"RUNFILE",
")",
":",
"try",
":",
"pass",
"except",
"Exception",
"as",
"err",
":",
"if",
"DEBUG",
":",
"raise",
"else",
":",
"sys",
".",
"stderr",
".",
"write",
"... | Daemon start to run here. | [
"Daemon",
"start",
"to",
"run",
"here",
"."
] | [
"'''\n Daemon start to run here.\n '''",
"# Run while there is no stop request."
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
9e60781d9bc4117e0c04fa3dca844cb1f3afecda | igorbrigadir/compliant-client | compliance/compliance.py | [
"Apache-2.0"
] | Python | list_jobs | <not_specific> | def list_jobs(self, type):
"""
Return a 'data' array of job objects.
"""
job_list = {}
#Optional request parameters: status, start_time, end_time
response = requests.get(f"{self.url}?type={type}", auth=self.bearer_oauth, headers=self.headers)
if response.status_c... |
Return a 'data' array of job objects.
| Return a 'data' array of job objects. | [
"Return",
"a",
"'",
"data",
"'",
"array",
"of",
"job",
"objects",
"."
] | def list_jobs(self, type):
job_list = {}
response = requests.get(f"{self.url}?type={type}", auth=self.bearer_oauth, headers=self.headers)
if response.status_code != 200:
print(f"Error requesting Job list: {response.status_code} | {response.text}")
return job_list
... | [
"def",
"list_jobs",
"(",
"self",
",",
"type",
")",
":",
"job_list",
"=",
"{",
"}",
"response",
"=",
"requests",
".",
"get",
"(",
"f\"{self.url}?type={type}\"",
",",
"auth",
"=",
"self",
".",
"bearer_oauth",
",",
"headers",
"=",
"self",
".",
"headers",
")... | Return a 'data' array of job objects. | [
"Return",
"a",
"'",
"data",
"'",
"array",
"of",
"job",
"objects",
"."
] | [
"\"\"\"\n Return a 'data' array of job objects.\n \"\"\"",
"#Optional request parameters: status, start_time, end_time"
] | [
{
"param": "self",
"type": null
},
{
"param": "type",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "type",
"type": null,
"docstring": null,
"docstring_tokens": [... |
e0732f1fc9336ef32bf6baaebd5a1a29637eb819 | igorbrigadir/compliant-client | apps/compliant-client.py | [
"Apache-2.0"
] | Python | handle_input | <not_specific> | def handle_input(arguments):
"""
Validates command-line arguments, and returns setting dictionary.
Manages defaults: config file if present, otherwise internal value, unless overridden from command-line.
:param args:
:return: settings dictionary
"""
settings = {}
i... |
Validates command-line arguments, and returns setting dictionary.
Manages defaults: config file if present, otherwise internal value, unless overridden from command-line.
:param args:
:return: settings dictionary
| Validates command-line arguments, and returns setting dictionary.
Manages defaults: config file if present, otherwise internal value, unless overridden from command-line. | [
"Validates",
"command",
"-",
"line",
"arguments",
"and",
"returns",
"setting",
"dictionary",
".",
"Manages",
"defaults",
":",
"config",
"file",
"if",
"present",
"otherwise",
"internal",
"value",
"unless",
"overridden",
"from",
"command",
"-",
"line",
"."
] | def handle_input(arguments):
settings = {}
if arguments['--all'] == True:
settings['mode'] = 'all'
settings['type'] = arguments['--type']
settings['name'] = arguments['--name']
settings['ids-file'] = arguments['--ids-file']
settings['results-file'] = arguments['--results-... | [
"def",
"handle_input",
"(",
"arguments",
")",
":",
"settings",
"=",
"{",
"}",
"if",
"arguments",
"[",
"'--all'",
"]",
"==",
"True",
":",
"settings",
"[",
"'mode'",
"]",
"=",
"'all'",
"settings",
"[",
"'type'",
"]",
"=",
"arguments",
"[",
"'--type'",
"]... | Validates command-line arguments, and returns setting dictionary. | [
"Validates",
"command",
"-",
"line",
"arguments",
"and",
"returns",
"setting",
"dictionary",
"."
] | [
"\"\"\"\n Validates command-line arguments, and returns setting dictionary.\n Manages defaults: config file if present, otherwise internal value, unless overridden from command-line.\n\n :param args:\n :return: settings dictionary\n\n \"\"\"",
"#Upload and download URLs are not ... | [
{
"param": "arguments",
"type": null
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "arguments",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": nu... |
0a617d2950b89242f3573e1f609485ec71f3ace4 | llang629/hexpop | statoids.py | [
"Apache-2.0"
] | Python | string2fields | <not_specific> | def string2fields(string, lengths):
"""Slice string into fixed-length fields."""
return (string[pos:pos + length].strip()
for idx, length in enumerate(lengths)
for pos in [sum(map(int, lengths[:idx]))]) | Slice string into fixed-length fields. | Slice string into fixed-length fields. | [
"Slice",
"string",
"into",
"fixed",
"-",
"length",
"fields",
"."
] | def string2fields(string, lengths):
return (string[pos:pos + length].strip()
for idx, length in enumerate(lengths)
for pos in [sum(map(int, lengths[:idx]))]) | [
"def",
"string2fields",
"(",
"string",
",",
"lengths",
")",
":",
"return",
"(",
"string",
"[",
"pos",
":",
"pos",
"+",
"length",
"]",
".",
"strip",
"(",
")",
"for",
"idx",
",",
"length",
"in",
"enumerate",
"(",
"lengths",
")",
"for",
"pos",
"in",
"... | Slice string into fixed-length fields. | [
"Slice",
"string",
"into",
"fixed",
"-",
"length",
"fields",
"."
] | [
"\"\"\"Slice string into fixed-length fields.\"\"\""
] | [
{
"param": "string",
"type": null
},
{
"param": "lengths",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "string",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "lengths",
"type": null,
"docstring": null,
"docstring_token... |
4219889ac8466e4d06513372f1e3b5b84b2a8039 | llang629/hexpop | geopop.py | [
"Apache-2.0"
] | Python | parse_ini | <not_specific> | def parse_ini(region=None):
"""Parse configurations from .ini file."""
logger = logging.getLogger(f"{__name__}.{sys._getframe().f_code.co_name}")
hexpop.initialize_logging(logger)
ini = configparser.ConfigParser()
ini.read(pathlib.Path(__file__).with_suffix('.ini'))
if not region:
return... | Parse configurations from .ini file. | Parse configurations from .ini file. | [
"Parse",
"configurations",
"from",
".",
"ini",
"file",
"."
] | def parse_ini(region=None):
logger = logging.getLogger(f"{__name__}.{sys._getframe().f_code.co_name}")
hexpop.initialize_logging(logger)
ini = configparser.ConfigParser()
ini.read(pathlib.Path(__file__).with_suffix('.ini'))
if not region:
return ini.sections()
params = SimpleNamespace()
... | [
"def",
"parse_ini",
"(",
"region",
"=",
"None",
")",
":",
"logger",
"=",
"logging",
".",
"getLogger",
"(",
"f\"{__name__}.{sys._getframe().f_code.co_name}\"",
")",
"hexpop",
".",
"initialize_logging",
"(",
"logger",
")",
"ini",
"=",
"configparser",
".",
"ConfigPar... | Parse configurations from .ini file. | [
"Parse",
"configurations",
"from",
".",
"ini",
"file",
"."
] | [
"\"\"\"Parse configurations from .ini file.\"\"\""
] | [
{
"param": "region",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "region",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
af7dda819c411eb00d6f1f5ba059fea9187c68d8 | llang629/hexpop | coverexp.py | [
"Apache-2.0"
] | Python | helium_api | <not_specific> | def helium_api(cursor=''):
"""Helium API query, isolated for tenacity."""
if cursor:
resp = requests.get(url=EXPLORER_URL + '?cursor=' + cursor)
else:
resp = requests.get(url=EXPLORER_URL)
resp.raise_for_status()
return resp.json() | Helium API query, isolated for tenacity. | Helium API query, isolated for tenacity. | [
"Helium",
"API",
"query",
"isolated",
"for",
"tenacity",
"."
] | def helium_api(cursor=''):
if cursor:
resp = requests.get(url=EXPLORER_URL + '?cursor=' + cursor)
else:
resp = requests.get(url=EXPLORER_URL)
resp.raise_for_status()
return resp.json() | [
"def",
"helium_api",
"(",
"cursor",
"=",
"''",
")",
":",
"if",
"cursor",
":",
"resp",
"=",
"requests",
".",
"get",
"(",
"url",
"=",
"EXPLORER_URL",
"+",
"'?cursor='",
"+",
"cursor",
")",
"else",
":",
"resp",
"=",
"requests",
".",
"get",
"(",
"url",
... | Helium API query, isolated for tenacity. | [
"Helium",
"API",
"query",
"isolated",
"for",
"tenacity",
"."
] | [
"\"\"\"Helium API query, isolated for tenacity.\"\"\""
] | [
{
"param": "cursor",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "cursor",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
af7dda819c411eb00d6f1f5ba059fea9187c68d8 | llang629/hexpop | coverexp.py | [
"Apache-2.0"
] | Python | fetch_hotspots | null | def fetch_hotspots():
"""Fetch hotspots via Helium API."""
first_pass = True
cursor = ''
while first_pass or cursor:
first_pass = False
payload = helium_api(cursor)
try:
cursor = payload['cursor']
except KeyError:
cursor = ''
yield payload[... | Fetch hotspots via Helium API. | Fetch hotspots via Helium API. | [
"Fetch",
"hotspots",
"via",
"Helium",
"API",
"."
] | def fetch_hotspots():
first_pass = True
cursor = ''
while first_pass or cursor:
first_pass = False
payload = helium_api(cursor)
try:
cursor = payload['cursor']
except KeyError:
cursor = ''
yield payload['data'] | [
"def",
"fetch_hotspots",
"(",
")",
":",
"first_pass",
"=",
"True",
"cursor",
"=",
"''",
"while",
"first_pass",
"or",
"cursor",
":",
"first_pass",
"=",
"False",
"payload",
"=",
"helium_api",
"(",
"cursor",
")",
"try",
":",
"cursor",
"=",
"payload",
"[",
"... | Fetch hotspots via Helium API. | [
"Fetch",
"hotspots",
"via",
"Helium",
"API",
"."
] | [
"\"\"\"Fetch hotspots via Helium API.\"\"\""
] | [] | {
"returns": [],
"raises": [],
"params": [],
"outlier_params": [],
"others": []
} |
af7dda819c411eb00d6f1f5ba059fea9187c68d8 | llang629/hexpop | coverexp.py | [
"Apache-2.0"
] | Python | load_explorer_coverage | null | def load_explorer_coverage(hex_set):
"""Load Explorer coverage hex set to table."""
df = pandas.DataFrame({'h3_index': sorted(list(hex_set))})
df['explorer_coverage'] = True
df['update_time'] = datetime.datetime.utcnow()
hexpop.bq_load_table(df, explorer_table, write='WRITE_APPEND') | Load Explorer coverage hex set to table. | Load Explorer coverage hex set to table. | [
"Load",
"Explorer",
"coverage",
"hex",
"set",
"to",
"table",
"."
] | def load_explorer_coverage(hex_set):
df = pandas.DataFrame({'h3_index': sorted(list(hex_set))})
df['explorer_coverage'] = True
df['update_time'] = datetime.datetime.utcnow()
hexpop.bq_load_table(df, explorer_table, write='WRITE_APPEND') | [
"def",
"load_explorer_coverage",
"(",
"hex_set",
")",
":",
"df",
"=",
"pandas",
".",
"DataFrame",
"(",
"{",
"'h3_index'",
":",
"sorted",
"(",
"list",
"(",
"hex_set",
")",
")",
"}",
")",
"df",
"[",
"'explorer_coverage'",
"]",
"=",
"True",
"df",
"[",
"'u... | Load Explorer coverage hex set to table. | [
"Load",
"Explorer",
"coverage",
"hex",
"set",
"to",
"table",
"."
] | [
"\"\"\"Load Explorer coverage hex set to table.\"\"\""
] | [
{
"param": "hex_set",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "hex_set",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
af7dda819c411eb00d6f1f5ba059fea9187c68d8 | llang629/hexpop | coverexp.py | [
"Apache-2.0"
] | Python | query_explorer_coverage | <not_specific> | def query_explorer_coverage(hexset=True):
"""Query most recent Explorer coverage hex set from view."""
view_id = 'most_recent_explorer'
most_recent_explorer = hexpop.bq_create_view(
coverage_dataset,
view_id,
MOST_RECENT_EXPLORER_UPDATES.format(
project=coverage_dataset.p... | Query most recent Explorer coverage hex set from view. | Query most recent Explorer coverage hex set from view. | [
"Query",
"most",
"recent",
"Explorer",
"coverage",
"hex",
"set",
"from",
"view",
"."
] | def query_explorer_coverage(hexset=True):
view_id = 'most_recent_explorer'
most_recent_explorer = hexpop.bq_create_view(
coverage_dataset,
view_id,
MOST_RECENT_EXPLORER_UPDATES.format(
project=coverage_dataset.project,
coverage_dataset=coverage_dataset.dataset_id)... | [
"def",
"query_explorer_coverage",
"(",
"hexset",
"=",
"True",
")",
":",
"view_id",
"=",
"'most_recent_explorer'",
"most_recent_explorer",
"=",
"hexpop",
".",
"bq_create_view",
"(",
"coverage_dataset",
",",
"view_id",
",",
"MOST_RECENT_EXPLORER_UPDATES",
".",
"format",
... | Query most recent Explorer coverage hex set from view. | [
"Query",
"most",
"recent",
"Explorer",
"coverage",
"hex",
"set",
"from",
"view",
"."
] | [
"\"\"\"Query most recent Explorer coverage hex set from view.\"\"\""
] | [
{
"param": "hexset",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "hexset",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
01b62af47de5b52086c7a8a3830edee9178c3a67 | llang629/hexpop | covermap.py | [
"Apache-2.0"
] | Python | fetch_uplinks | <not_specific> | async def fetch_uplinks(h3_index, session):
"""Fetch H3 hex coverage based on Mappers uplinks."""
mappers_coverage = False
mapper_urls = [
MAPPERS_URL + h for h in h3.k_ring(h3.h3_to_center_child(h3_index))
]
for mapper_url in mapper_urls:
while rate_limit and not limiter.consume("ma... | Fetch H3 hex coverage based on Mappers uplinks. | Fetch H3 hex coverage based on Mappers uplinks. | [
"Fetch",
"H3",
"hex",
"coverage",
"based",
"on",
"Mappers",
"uplinks",
"."
] | async def fetch_uplinks(h3_index, session):
mappers_coverage = False
mapper_urls = [
MAPPERS_URL + h for h in h3.k_ring(h3.h3_to_center_child(h3_index))
]
for mapper_url in mapper_urls:
while rate_limit and not limiter.consume("mappers", 1):
time.sleep(0.01)
async wit... | [
"async",
"def",
"fetch_uplinks",
"(",
"h3_index",
",",
"session",
")",
":",
"mappers_coverage",
"=",
"False",
"mapper_urls",
"=",
"[",
"MAPPERS_URL",
"+",
"h",
"for",
"h",
"in",
"h3",
".",
"k_ring",
"(",
"h3",
".",
"h3_to_center_child",
"(",
"h3_index",
")... | Fetch H3 hex coverage based on Mappers uplinks. | [
"Fetch",
"H3",
"hex",
"coverage",
"based",
"on",
"Mappers",
"uplinks",
"."
] | [
"\"\"\"Fetch H3 hex coverage based on Mappers uplinks.\"\"\""
] | [
{
"param": "h3_index",
"type": null
},
{
"param": "session",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "h3_index",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "session",
"type": null,
"docstring": null,
"docstring_tok... |
01b62af47de5b52086c7a8a3830edee9178c3a67 | llang629/hexpop | covermap.py | [
"Apache-2.0"
] | Python | fetch_mappers | <not_specific> | async def fetch_mappers(h3hexes):
"""Queue coroutines to fetch coverage, gather results."""
async with aiohttp.ClientSession() as session:
return await asyncio.gather(
*map(fetch_uplinks, h3hexes, itertools.repeat(session))) | Queue coroutines to fetch coverage, gather results. | Queue coroutines to fetch coverage, gather results. | [
"Queue",
"coroutines",
"to",
"fetch",
"coverage",
"gather",
"results",
"."
] | async def fetch_mappers(h3hexes):
async with aiohttp.ClientSession() as session:
return await asyncio.gather(
*map(fetch_uplinks, h3hexes, itertools.repeat(session))) | [
"async",
"def",
"fetch_mappers",
"(",
"h3hexes",
")",
":",
"async",
"with",
"aiohttp",
".",
"ClientSession",
"(",
")",
"as",
"session",
":",
"return",
"await",
"asyncio",
".",
"gather",
"(",
"*",
"map",
"(",
"fetch_uplinks",
",",
"h3hexes",
",",
"itertools... | Queue coroutines to fetch coverage, gather results. | [
"Queue",
"coroutines",
"to",
"fetch",
"coverage",
"gather",
"results",
"."
] | [
"\"\"\"Queue coroutines to fetch coverage, gather results.\"\"\""
] | [
{
"param": "h3hexes",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "h3hexes",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
01b62af47de5b52086c7a8a3830edee9178c3a67 | llang629/hexpop | covermap.py | [
"Apache-2.0"
] | Python | query_mappers_coverage | <not_specific> | def query_mappers_coverage(hexset=True):
"""Query most recent Mappers coverage hex set from view."""
view_id = 'most_recent_mappers'
most_recent_mappers = hexpop.bq_create_view(
coverage_dataset,
view_id,
MOST_RECENT_MAPPERS_UPDATES.format(
project=coverage_dataset.projec... | Query most recent Mappers coverage hex set from view. | Query most recent Mappers coverage hex set from view. | [
"Query",
"most",
"recent",
"Mappers",
"coverage",
"hex",
"set",
"from",
"view",
"."
] | def query_mappers_coverage(hexset=True):
view_id = 'most_recent_mappers'
most_recent_mappers = hexpop.bq_create_view(
coverage_dataset,
view_id,
MOST_RECENT_MAPPERS_UPDATES.format(
project=coverage_dataset.project,
coverage_dataset=coverage_dataset.dataset_id),
... | [
"def",
"query_mappers_coverage",
"(",
"hexset",
"=",
"True",
")",
":",
"view_id",
"=",
"'most_recent_mappers'",
"most_recent_mappers",
"=",
"hexpop",
".",
"bq_create_view",
"(",
"coverage_dataset",
",",
"view_id",
",",
"MOST_RECENT_MAPPERS_UPDATES",
".",
"format",
"("... | Query most recent Mappers coverage hex set from view. | [
"Query",
"most",
"recent",
"Mappers",
"coverage",
"hex",
"set",
"from",
"view",
"."
] | [
"\"\"\"Query most recent Mappers coverage hex set from view.\"\"\""
] | [
{
"param": "hexset",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "hexset",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
2799f88f1513d9f8f571562b21705333d88cbfa0 | llang629/hexpop | public.py | [
"Apache-2.0"
] | Python | parse_ini | <not_specific> | def parse_ini(source):
"""Parse configurations from .ini file."""
config = SimpleNamespace(source=source)
ini = configparser.ConfigParser()
ini.read(pathlib.Path(__file__).with_suffix('.ini'))
try:
config.description = ini.get(source, 'description').strip()
except configparser.NoOptionEr... | Parse configurations from .ini file. | Parse configurations from .ini file. | [
"Parse",
"configurations",
"from",
".",
"ini",
"file",
"."
] | def parse_ini(source):
config = SimpleNamespace(source=source)
ini = configparser.ConfigParser()
ini.read(pathlib.Path(__file__).with_suffix('.ini'))
try:
config.description = ini.get(source, 'description').strip()
except configparser.NoOptionError:
config.description = None
try:... | [
"def",
"parse_ini",
"(",
"source",
")",
":",
"config",
"=",
"SimpleNamespace",
"(",
"source",
"=",
"source",
")",
"ini",
"=",
"configparser",
".",
"ConfigParser",
"(",
")",
"ini",
".",
"read",
"(",
"pathlib",
".",
"Path",
"(",
"__file__",
")",
".",
"wi... | Parse configurations from .ini file. | [
"Parse",
"configurations",
"from",
".",
"ini",
"file",
"."
] | [
"\"\"\"Parse configurations from .ini file.\"\"\""
] | [
{
"param": "source",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "source",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
2799f88f1513d9f8f571562b21705333d88cbfa0 | llang629/hexpop | public.py | [
"Apache-2.0"
] | Python | init_worker | null | def init_worker():
"""Name worker and initialize its logger."""
multiprocessing.current_process().name = pathlib.Path(
__file__).stem + '_worker' + multiprocessing.current_process(
).name.split('-')[-1]
multiprocessing.current_process().logger = logging.getLogger(
multiprocessing.cur... | Name worker and initialize its logger. | Name worker and initialize its logger. | [
"Name",
"worker",
"and",
"initialize",
"its",
"logger",
"."
] | def init_worker():
multiprocessing.current_process().name = pathlib.Path(
__file__).stem + '_worker' + multiprocessing.current_process(
).name.split('-')[-1]
multiprocessing.current_process().logger = logging.getLogger(
multiprocessing.current_process().name)
hexpop.initialize_loggin... | [
"def",
"init_worker",
"(",
")",
":",
"multiprocessing",
".",
"current_process",
"(",
")",
".",
"name",
"=",
"pathlib",
".",
"Path",
"(",
"__file__",
")",
".",
"stem",
"+",
"'_worker'",
"+",
"multiprocessing",
".",
"current_process",
"(",
")",
".",
"name",
... | Name worker and initialize its logger. | [
"Name",
"worker",
"and",
"initialize",
"its",
"logger",
"."
] | [
"\"\"\"Name worker and initialize its logger.\"\"\""
] | [] | {
"returns": [],
"raises": [],
"params": [],
"outlier_params": [],
"others": []
} |
2799f88f1513d9f8f571562b21705333d88cbfa0 | llang629/hexpop | public.py | [
"Apache-2.0"
] | Python | read_gdf | <not_specific> | def read_gdf(source, test_rows=0, test_start=0):
"""Read GeoPandas dataframe, possibly with smaller set of test rows."""
if test_rows != 0:
return geopandas.read_file(source,
rows=slice(test_start,
test_start + test_rows))
... | Read GeoPandas dataframe, possibly with smaller set of test rows. | Read GeoPandas dataframe, possibly with smaller set of test rows. | [
"Read",
"GeoPandas",
"dataframe",
"possibly",
"with",
"smaller",
"set",
"of",
"test",
"rows",
"."
] | def read_gdf(source, test_rows=0, test_start=0):
if test_rows != 0:
return geopandas.read_file(source,
rows=slice(test_start,
test_start + test_rows))
return geopandas.read_file(source) | [
"def",
"read_gdf",
"(",
"source",
",",
"test_rows",
"=",
"0",
",",
"test_start",
"=",
"0",
")",
":",
"if",
"test_rows",
"!=",
"0",
":",
"return",
"geopandas",
".",
"read_file",
"(",
"source",
",",
"rows",
"=",
"slice",
"(",
"test_start",
",",
"test_sta... | Read GeoPandas dataframe, possibly with smaller set of test rows. | [
"Read",
"GeoPandas",
"dataframe",
"possibly",
"with",
"smaller",
"set",
"of",
"test",
"rows",
"."
] | [
"\"\"\"Read GeoPandas dataframe, possibly with smaller set of test rows.\"\"\""
] | [
{
"param": "source",
"type": null
},
{
"param": "test_rows",
"type": null
},
{
"param": "test_start",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "source",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "test_rows",
"type": null,
"docstring": null,
"docstring_tok... |
2799f88f1513d9f8f571562b21705333d88cbfa0 | llang629/hexpop | public.py | [
"Apache-2.0"
] | Python | gdf2df | <not_specific> | def gdf2df(gdf):
"""Convert GeoPandas to Pandas dataframe, encoding geometry as WKT."""
return pandas.DataFrame(
gdf.assign(WKT=gdf['geometry'].apply(lambda g: g.wkt))).drop(
columns=['geometry']) | Convert GeoPandas to Pandas dataframe, encoding geometry as WKT. | Convert GeoPandas to Pandas dataframe, encoding geometry as WKT. | [
"Convert",
"GeoPandas",
"to",
"Pandas",
"dataframe",
"encoding",
"geometry",
"as",
"WKT",
"."
] | def gdf2df(gdf):
return pandas.DataFrame(
gdf.assign(WKT=gdf['geometry'].apply(lambda g: g.wkt))).drop(
columns=['geometry']) | [
"def",
"gdf2df",
"(",
"gdf",
")",
":",
"return",
"pandas",
".",
"DataFrame",
"(",
"gdf",
".",
"assign",
"(",
"WKT",
"=",
"gdf",
"[",
"'geometry'",
"]",
".",
"apply",
"(",
"lambda",
"g",
":",
"g",
".",
"wkt",
")",
")",
")",
".",
"drop",
"(",
"co... | Convert GeoPandas to Pandas dataframe, encoding geometry as WKT. | [
"Convert",
"GeoPandas",
"to",
"Pandas",
"dataframe",
"encoding",
"geometry",
"as",
"WKT",
"."
] | [
"\"\"\"Convert GeoPandas to Pandas dataframe, encoding geometry as WKT.\"\"\""
] | [
{
"param": "gdf",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "gdf",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
ccbab2160ad1c6981ed0ae1dd2be5938f0af8ae2 | llang629/hexpop | hexpop.py | [
"Apache-2.0"
] | Python | initialize_logging | null | def initialize_logging(logger, verbose=False):
"""Initialize logger with console, file, and syslog handlers."""
if 'linux' in platform.platform().lower():
syslog_path = '/dev/log'
elif 'macos' in platform.platform().lower():
syslog_path = '/var/run/syslog'
else:
syslog_path = '/d... | Initialize logger with console, file, and syslog handlers. | Initialize logger with console, file, and syslog handlers. | [
"Initialize",
"logger",
"with",
"console",
"file",
"and",
"syslog",
"handlers",
"."
] | def initialize_logging(logger, verbose=False):
if 'linux' in platform.platform().lower():
syslog_path = '/dev/log'
elif 'macos' in platform.platform().lower():
syslog_path = '/var/run/syslog'
else:
syslog_path = '/dev/null'
logger.handlers = []
logger.setLevel(logging.DEBUG... | [
"def",
"initialize_logging",
"(",
"logger",
",",
"verbose",
"=",
"False",
")",
":",
"if",
"'linux'",
"in",
"platform",
".",
"platform",
"(",
")",
".",
"lower",
"(",
")",
":",
"syslog_path",
"=",
"'/dev/log'",
"elif",
"'macos'",
"in",
"platform",
".",
"pl... | Initialize logger with console, file, and syslog handlers. | [
"Initialize",
"logger",
"with",
"console",
"file",
"and",
"syslog",
"handlers",
"."
] | [
"\"\"\"Initialize logger with console, file, and syslog handlers.\"\"\"",
"# clean slate"
] | [
{
"param": "logger",
"type": null
},
{
"param": "verbose",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "logger",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "verbose",
"type": null,
"docstring": null,
"docstring_token... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.