repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
jart/fabulous | fabulous/rotating_cube.py | Frame.line | def line(self, x0, y0, x1, y1, c='*'):
r"""Draws a line
Who would have thought this would be so complicated? Thanks
again Wikipedia_ <3
.. _Wikipedia: http://en.wikipedia.org/wiki/Bresenham's_line_algorithm
"""
steep = abs(y1 - y0) > abs(x1 - x0)
if steep:
... | python | def line(self, x0, y0, x1, y1, c='*'):
r"""Draws a line
Who would have thought this would be so complicated? Thanks
again Wikipedia_ <3
.. _Wikipedia: http://en.wikipedia.org/wiki/Bresenham's_line_algorithm
"""
steep = abs(y1 - y0) > abs(x1 - x0)
if steep:
... | [
"def",
"line",
"(",
"self",
",",
"x0",
",",
"y0",
",",
"x1",
",",
"y1",
",",
"c",
"=",
"'*'",
")",
":",
"steep",
"=",
"abs",
"(",
"y1",
"-",
"y0",
")",
">",
"abs",
"(",
"x1",
"-",
"x0",
")",
"if",
"steep",
":",
"(",
"x0",
",",
"y0",
")"... | r"""Draws a line
Who would have thought this would be so complicated? Thanks
again Wikipedia_ <3
.. _Wikipedia: http://en.wikipedia.org/wiki/Bresenham's_line_algorithm | [
"r",
"Draws",
"a",
"line"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/rotating_cube.py#L52-L83 |
taskcluster/taskcluster-client.py | taskcluster/ec2manager.py | EC2Manager.terminateWorkerType | def terminateWorkerType(self, *args, **kwargs):
"""
Terminate all resources from a worker type
Terminate all instances for this worker type
This method is ``experimental``
"""
return self._makeApiCall(self.funcinfo["terminateWorkerType"], *args, **kwargs) | python | def terminateWorkerType(self, *args, **kwargs):
"""
Terminate all resources from a worker type
Terminate all instances for this worker type
This method is ``experimental``
"""
return self._makeApiCall(self.funcinfo["terminateWorkerType"], *args, **kwargs) | [
"def",
"terminateWorkerType",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"terminateWorkerType\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Terminate all resources from a worker type
Terminate all instances for this worker type
This method is ``experimental`` | [
"Terminate",
"all",
"resources",
"from",
"a",
"worker",
"type"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/ec2manager.py#L62-L71 |
taskcluster/taskcluster-client.py | taskcluster/ec2manager.py | EC2Manager.getPrices | def getPrices(self, *args, **kwargs):
"""
Request prices for EC2
Return a list of possible prices for EC2
This method gives output: ``v1/prices.json#``
This method is ``experimental``
"""
return self._makeApiCall(self.funcinfo["getPrices"], *args, **kwargs) | python | def getPrices(self, *args, **kwargs):
"""
Request prices for EC2
Return a list of possible prices for EC2
This method gives output: ``v1/prices.json#``
This method is ``experimental``
"""
return self._makeApiCall(self.funcinfo["getPrices"], *args, **kwargs) | [
"def",
"getPrices",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"getPrices\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Request prices for EC2
Return a list of possible prices for EC2
This method gives output: ``v1/prices.json#``
This method is ``experimental`` | [
"Request",
"prices",
"for",
"EC2"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/ec2manager.py#L160-L171 |
taskcluster/taskcluster-client.py | taskcluster/ec2manager.py | EC2Manager.allState | def allState(self, *args, **kwargs):
"""
List out the entire internal state
This method is only for debugging the ec2-manager
This method is ``experimental``
"""
return self._makeApiCall(self.funcinfo["allState"], *args, **kwargs) | python | def allState(self, *args, **kwargs):
"""
List out the entire internal state
This method is only for debugging the ec2-manager
This method is ``experimental``
"""
return self._makeApiCall(self.funcinfo["allState"], *args, **kwargs) | [
"def",
"allState",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"allState\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | List out the entire internal state
This method is only for debugging the ec2-manager
This method is ``experimental`` | [
"List",
"out",
"the",
"entire",
"internal",
"state"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/ec2manager.py#L272-L281 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.task | def task(self, *args, **kwargs):
"""
Get Task Definition
This end-point will return the task-definition. Notice that the task
definition may have been modified by queue, if an optional property is
not specified the queue may provide a default value.
This method gives ou... | python | def task(self, *args, **kwargs):
"""
Get Task Definition
This end-point will return the task-definition. Notice that the task
definition may have been modified by queue, if an optional property is
not specified the queue may provide a default value.
This method gives ou... | [
"def",
"task",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"task\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get Task Definition
This end-point will return the task-definition. Notice that the task
definition may have been modified by queue, if an optional property is
not specified the queue may provide a default value.
This method gives output: ``v1/task.json#``
This method is ``sta... | [
"Get",
"Task",
"Definition"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L44-L57 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.defineTask | def defineTask(self, *args, **kwargs):
"""
Define Task
**Deprecated**, this is the same as `createTask` with a **self-dependency**.
This is only present for legacy.
This method takes input: ``v1/create-task-request.json#``
This method gives output: ``v1/task-status-res... | python | def defineTask(self, *args, **kwargs):
"""
Define Task
**Deprecated**, this is the same as `createTask` with a **self-dependency**.
This is only present for legacy.
This method takes input: ``v1/create-task-request.json#``
This method gives output: ``v1/task-status-res... | [
"def",
"defineTask",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"defineTask\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Define Task
**Deprecated**, this is the same as `createTask` with a **self-dependency**.
This is only present for legacy.
This method takes input: ``v1/create-task-request.json#``
This method gives output: ``v1/task-status-response.json#``
This method is ``deprecated`` | [
"Define",
"Task"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L172-L186 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.scheduleTask | def scheduleTask(self, *args, **kwargs):
"""
Schedule Defined Task
scheduleTask will schedule a task to be executed, even if it has
unresolved dependencies. A task would otherwise only be scheduled if
its dependencies were resolved.
This is useful if you have defined a ... | python | def scheduleTask(self, *args, **kwargs):
"""
Schedule Defined Task
scheduleTask will schedule a task to be executed, even if it has
unresolved dependencies. A task would otherwise only be scheduled if
its dependencies were resolved.
This is useful if you have defined a ... | [
"def",
"scheduleTask",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"scheduleTask\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Schedule Defined Task
scheduleTask will schedule a task to be executed, even if it has
unresolved dependencies. A task would otherwise only be scheduled if
its dependencies were resolved.
This is useful if you have defined a task that depends on itself or on
some other task tha... | [
"Schedule",
"Defined",
"Task"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L188-L212 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.rerunTask | def rerunTask(self, *args, **kwargs):
"""
Rerun a Resolved Task
This method _reruns_ a previously resolved task, even if it was
_completed_. This is useful if your task completes unsuccessfully, and
you just want to run it from scratch again. This will also reset the
num... | python | def rerunTask(self, *args, **kwargs):
"""
Rerun a Resolved Task
This method _reruns_ a previously resolved task, even if it was
_completed_. This is useful if your task completes unsuccessfully, and
you just want to run it from scratch again. This will also reset the
num... | [
"def",
"rerunTask",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"rerunTask\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Rerun a Resolved Task
This method _reruns_ a previously resolved task, even if it was
_completed_. This is useful if your task completes unsuccessfully, and
you just want to run it from scratch again. This will also reset the
number of `retries` allowed.
This method is deprecat... | [
"Rerun",
"a",
"Resolved",
"Task"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L214-L239 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.cancelTask | def cancelTask(self, *args, **kwargs):
"""
Cancel Task
This method will cancel a task that is either `unscheduled`, `pending` or
`running`. It will resolve the current run as `exception` with
`reasonResolved` set to `canceled`. If the task isn't scheduled yet, ie.
it doe... | python | def cancelTask(self, *args, **kwargs):
"""
Cancel Task
This method will cancel a task that is either `unscheduled`, `pending` or
`running`. It will resolve the current run as `exception` with
`reasonResolved` set to `canceled`. If the task isn't scheduled yet, ie.
it doe... | [
"def",
"cancelTask",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"cancelTask\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Cancel Task
This method will cancel a task that is either `unscheduled`, `pending` or
`running`. It will resolve the current run as `exception` with
`reasonResolved` set to `canceled`. If the task isn't scheduled yet, ie.
it doesn't have any runs, an initial run will be added and resolv... | [
"Cancel",
"Task"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L241-L263 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.reportFailed | def reportFailed(self, *args, **kwargs):
"""
Report Run Failed
Report a run failed, resolving the run as `failed`. Use this to resolve
a run that failed because the task specific code behaved unexpectedly.
For example the task exited non-zero, or didn't produce expected output.
... | python | def reportFailed(self, *args, **kwargs):
"""
Report Run Failed
Report a run failed, resolving the run as `failed`. Use this to resolve
a run that failed because the task specific code behaved unexpectedly.
For example the task exited non-zero, or didn't produce expected output.
... | [
"def",
"reportFailed",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"reportFailed\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Report Run Failed
Report a run failed, resolving the run as `failed`. Use this to resolve
a run that failed because the task specific code behaved unexpectedly.
For example the task exited non-zero, or didn't produce expected output.
Do not use this if the task couldn't be run because ... | [
"Report",
"Run",
"Failed"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L348-L365 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.reportException | def reportException(self, *args, **kwargs):
"""
Report Task Exception
Resolve a run as _exception_. Generally, you will want to report tasks as
failed instead of exception. You should `reportException` if,
* The `task.payload` is invalid,
* Non-existent resources ar... | python | def reportException(self, *args, **kwargs):
"""
Report Task Exception
Resolve a run as _exception_. Generally, you will want to report tasks as
failed instead of exception. You should `reportException` if,
* The `task.payload` is invalid,
* Non-existent resources ar... | [
"def",
"reportException",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"reportException\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Report Task Exception
Resolve a run as _exception_. Generally, you will want to report tasks as
failed instead of exception. You should `reportException` if,
* The `task.payload` is invalid,
* Non-existent resources are referenced,
* Declared actions cannot be executed du... | [
"Report",
"Task",
"Exception"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L367-L392 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.createArtifact | def createArtifact(self, *args, **kwargs):
"""
Create Artifact
This API end-point creates an artifact for a specific run of a task. This
should **only** be used by a worker currently operating on this task, or
from a process running within the task (ie. on the worker).
... | python | def createArtifact(self, *args, **kwargs):
"""
Create Artifact
This API end-point creates an artifact for a specific run of a task. This
should **only** be used by a worker currently operating on this task, or
from a process running within the task (ie. on the worker).
... | [
"def",
"createArtifact",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"createArtifact\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Create Artifact
This API end-point creates an artifact for a specific run of a task. This
should **only** be used by a worker currently operating on this task, or
from a process running within the task (ie. on the worker).
All artifacts must specify when they `expires`, the queue will
... | [
"Create",
"Artifact"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L394-L475 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.completeArtifact | def completeArtifact(self, *args, **kwargs):
"""
Complete Artifact
This endpoint finalises an upload done through the blob `storageType`.
The queue will ensure that the task/run is still allowing artifacts
to be uploaded. For single-part S3 blob artifacts, this endpoint
... | python | def completeArtifact(self, *args, **kwargs):
"""
Complete Artifact
This endpoint finalises an upload done through the blob `storageType`.
The queue will ensure that the task/run is still allowing artifacts
to be uploaded. For single-part S3 blob artifacts, this endpoint
... | [
"def",
"completeArtifact",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"completeArtifact\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Complete Artifact
This endpoint finalises an upload done through the blob `storageType`.
The queue will ensure that the task/run is still allowing artifacts
to be uploaded. For single-part S3 blob artifacts, this endpoint
will simply ensure the artifact is present in S3. For multipart... | [
"Complete",
"Artifact"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L477-L496 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.listProvisioners | def listProvisioners(self, *args, **kwargs):
"""
Get a list of all active provisioners
Get all active provisioners.
The term "provisioner" is taken broadly to mean anything with a provisionerId.
This does not necessarily mean there is an associated service performing any
... | python | def listProvisioners(self, *args, **kwargs):
"""
Get a list of all active provisioners
Get all active provisioners.
The term "provisioner" is taken broadly to mean anything with a provisionerId.
This does not necessarily mean there is an associated service performing any
... | [
"def",
"listProvisioners",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"listProvisioners\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get a list of all active provisioners
Get all active provisioners.
The term "provisioner" is taken broadly to mean anything with a provisionerId.
This does not necessarily mean there is an associated service performing any
provisioning activity.
The response is paged. If this ... | [
"Get",
"a",
"list",
"of",
"all",
"active",
"provisioners"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L654-L674 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.getProvisioner | def getProvisioner(self, *args, **kwargs):
"""
Get an active provisioner
Get an active provisioner.
The term "provisioner" is taken broadly to mean anything with a provisionerId.
This does not necessarily mean there is an associated service performing any
provisioning a... | python | def getProvisioner(self, *args, **kwargs):
"""
Get an active provisioner
Get an active provisioner.
The term "provisioner" is taken broadly to mean anything with a provisionerId.
This does not necessarily mean there is an associated service performing any
provisioning a... | [
"def",
"getProvisioner",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"getProvisioner\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get an active provisioner
Get an active provisioner.
The term "provisioner" is taken broadly to mean anything with a provisionerId.
This does not necessarily mean there is an associated service performing any
provisioning activity.
This method gives output: ``v1/provisioner-re... | [
"Get",
"an",
"active",
"provisioner"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L676-L691 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.declareProvisioner | def declareProvisioner(self, *args, **kwargs):
"""
Update a provisioner
Declare a provisioner, supplying some details about it.
`declareProvisioner` allows updating one or more properties of a provisioner as long as the required scopes are
possessed. For example, a request to u... | python | def declareProvisioner(self, *args, **kwargs):
"""
Update a provisioner
Declare a provisioner, supplying some details about it.
`declareProvisioner` allows updating one or more properties of a provisioner as long as the required scopes are
possessed. For example, a request to u... | [
"def",
"declareProvisioner",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"declareProvisioner\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Update a provisioner
Declare a provisioner, supplying some details about it.
`declareProvisioner` allows updating one or more properties of a provisioner as long as the required scopes are
possessed. For example, a request to update the `aws-provisioner-v1`
provisioner with a body `{de... | [
"Update",
"a",
"provisioner"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L693-L715 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.pendingTasks | def pendingTasks(self, *args, **kwargs):
"""
Get Number of Pending Tasks
Get an approximate number of pending tasks for the given `provisionerId`
and `workerType`.
The underlying Azure Storage Queues only promises to give us an estimate.
Furthermore, we cache the result... | python | def pendingTasks(self, *args, **kwargs):
"""
Get Number of Pending Tasks
Get an approximate number of pending tasks for the given `provisionerId`
and `workerType`.
The underlying Azure Storage Queues only promises to give us an estimate.
Furthermore, we cache the result... | [
"def",
"pendingTasks",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"pendingTasks\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get Number of Pending Tasks
Get an approximate number of pending tasks for the given `provisionerId`
and `workerType`.
The underlying Azure Storage Queues only promises to give us an estimate.
Furthermore, we cache the result in memory for 20 seconds. So consumers
should be no ... | [
"Get",
"Number",
"of",
"Pending",
"Tasks"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L717-L734 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.quarantineWorker | def quarantineWorker(self, *args, **kwargs):
"""
Quarantine a worker
Quarantine a worker
This method takes input: ``v1/quarantine-worker-request.json#``
This method gives output: ``v1/worker-response.json#``
This method is ``experimental``
"""
return ... | python | def quarantineWorker(self, *args, **kwargs):
"""
Quarantine a worker
Quarantine a worker
This method takes input: ``v1/quarantine-worker-request.json#``
This method gives output: ``v1/worker-response.json#``
This method is ``experimental``
"""
return ... | [
"def",
"quarantineWorker",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"quarantineWorker\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Quarantine a worker
Quarantine a worker
This method takes input: ``v1/quarantine-worker-request.json#``
This method gives output: ``v1/worker-response.json#``
This method is ``experimental`` | [
"Quarantine",
"a",
"worker"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L822-L835 |
taskcluster/taskcluster-client.py | taskcluster/queue.py | Queue.declareWorker | def declareWorker(self, *args, **kwargs):
"""
Declare a worker
Declare a worker, supplying some details about it.
`declareWorker` allows updating one or more properties of a worker as long as the required scopes are
possessed.
This method takes input: ``v1/update-worke... | python | def declareWorker(self, *args, **kwargs):
"""
Declare a worker
Declare a worker, supplying some details about it.
`declareWorker` allows updating one or more properties of a worker as long as the required scopes are
possessed.
This method takes input: ``v1/update-worke... | [
"def",
"declareWorker",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"declareWorker\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Declare a worker
Declare a worker, supplying some details about it.
`declareWorker` allows updating one or more properties of a worker as long as the required scopes are
possessed.
This method takes input: ``v1/update-worker-request.json#``
This method gives output: ``v1/work... | [
"Declare",
"a",
"worker"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/queue.py#L837-L853 |
taskcluster/taskcluster-client.py | taskcluster/aio/index.py | Index.findTask | async def findTask(self, *args, **kwargs):
"""
Find Indexed Task
Find a task by index path, returning the highest-rank task with that path. If no
task exists for the given path, this API end-point will respond with a 404 status.
This method gives output: ``v1/indexed-task-respo... | python | async def findTask(self, *args, **kwargs):
"""
Find Indexed Task
Find a task by index path, returning the highest-rank task with that path. If no
task exists for the given path, this API end-point will respond with a 404 status.
This method gives output: ``v1/indexed-task-respo... | [
"async",
"def",
"findTask",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"await",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"findTask\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Find Indexed Task
Find a task by index path, returning the highest-rank task with that path. If no
task exists for the given path, this API end-point will respond with a 404 status.
This method gives output: ``v1/indexed-task-response.json#``
This method is ``stable`` | [
"Find",
"Indexed",
"Task"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/index.py#L127-L139 |
taskcluster/taskcluster-client.py | taskcluster/aio/index.py | Index.listNamespaces | async def listNamespaces(self, *args, **kwargs):
"""
List Namespaces
List the namespaces immediately under a given namespace.
This endpoint
lists up to 1000 namespaces. If more namespaces are present, a
`continuationToken` will be returned, which can be given in the nex... | python | async def listNamespaces(self, *args, **kwargs):
"""
List Namespaces
List the namespaces immediately under a given namespace.
This endpoint
lists up to 1000 namespaces. If more namespaces are present, a
`continuationToken` will be returned, which can be given in the nex... | [
"async",
"def",
"listNamespaces",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"await",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"listNamespaces\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",... | List Namespaces
List the namespaces immediately under a given namespace.
This endpoint
lists up to 1000 namespaces. If more namespaces are present, a
`continuationToken` will be returned, which can be given in the next
request. For the initial request, the payload should be an ... | [
"List",
"Namespaces"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/index.py#L141-L158 |
taskcluster/taskcluster-client.py | taskcluster/aio/index.py | Index.listTasks | async def listTasks(self, *args, **kwargs):
"""
List Tasks
List the tasks immediately under a given namespace.
This endpoint
lists up to 1000 tasks. If more tasks are present, a
`continuationToken` will be returned, which can be given in the next
request. For th... | python | async def listTasks(self, *args, **kwargs):
"""
List Tasks
List the tasks immediately under a given namespace.
This endpoint
lists up to 1000 tasks. If more tasks are present, a
`continuationToken` will be returned, which can be given in the next
request. For th... | [
"async",
"def",
"listTasks",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"await",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"listTasks\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | List Tasks
List the tasks immediately under a given namespace.
This endpoint
lists up to 1000 tasks. If more tasks are present, a
`continuationToken` will be returned, which can be given in the next
request. For the initial request, the payload should be an empty JSON
o... | [
"List",
"Tasks"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/index.py#L160-L180 |
taskcluster/taskcluster-client.py | taskcluster/aio/index.py | Index.insertTask | async def insertTask(self, *args, **kwargs):
"""
Insert Task into Index
Insert a task into the index. If the new rank is less than the existing rank
at the given index path, the task is not indexed but the response is still 200 OK.
Please see the introduction above for informa... | python | async def insertTask(self, *args, **kwargs):
"""
Insert Task into Index
Insert a task into the index. If the new rank is less than the existing rank
at the given index path, the task is not indexed but the response is still 200 OK.
Please see the introduction above for informa... | [
"async",
"def",
"insertTask",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"await",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"insertTask\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Insert Task into Index
Insert a task into the index. If the new rank is less than the existing rank
at the given index path, the task is not indexed but the response is still 200 OK.
Please see the introduction above for information
about indexing successfully completed tasks automati... | [
"Insert",
"Task",
"into",
"Index"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/index.py#L182-L199 |
taskcluster/taskcluster-client.py | taskcluster/aio/index.py | Index.findArtifactFromTask | async def findArtifactFromTask(self, *args, **kwargs):
"""
Get Artifact From Indexed Task
Find a task by index path and redirect to the artifact on the most recent
run with the given `name`.
Note that multiple calls to this endpoint may return artifacts from differen tasks
... | python | async def findArtifactFromTask(self, *args, **kwargs):
"""
Get Artifact From Indexed Task
Find a task by index path and redirect to the artifact on the most recent
run with the given `name`.
Note that multiple calls to this endpoint may return artifacts from differen tasks
... | [
"async",
"def",
"findArtifactFromTask",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"await",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"findArtifactFromTask\"",
"]",
",",
"*",
"args",
",",
"*",
"*",... | Get Artifact From Indexed Task
Find a task by index path and redirect to the artifact on the most recent
run with the given `name`.
Note that multiple calls to this endpoint may return artifacts from differen tasks
if a new task is inserted into the index between calls. Avoid using thi... | [
"Get",
"Artifact",
"From",
"Indexed",
"Task"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/index.py#L201-L223 |
taskcluster/taskcluster-client.py | taskcluster/aio/purgecache.py | PurgeCache.allPurgeRequests | async def allPurgeRequests(self, *args, **kwargs):
"""
All Open Purge Requests
This is useful mostly for administors to view
the set of open purge requests. It should not
be used by workers. They should use the purgeRequests
endpoint that is specific to their workerType ... | python | async def allPurgeRequests(self, *args, **kwargs):
"""
All Open Purge Requests
This is useful mostly for administors to view
the set of open purge requests. It should not
be used by workers. They should use the purgeRequests
endpoint that is specific to their workerType ... | [
"async",
"def",
"allPurgeRequests",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"await",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"allPurgeRequests\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwar... | All Open Purge Requests
This is useful mostly for administors to view
the set of open purge requests. It should not
be used by workers. They should use the purgeRequests
endpoint that is specific to their workerType and
provisionerId.
This method gives output: ``v1/all-... | [
"All",
"Open",
"Purge",
"Requests"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/purgecache.py#L55-L70 |
taskcluster/taskcluster-client.py | taskcluster/aio/purgecache.py | PurgeCache.purgeRequests | async def purgeRequests(self, *args, **kwargs):
"""
Open Purge Requests for a provisionerId/workerType pair
List of caches that need to be purged if they are from before
a certain time. This is safe to be used in automation from
workers.
This method gives output: ``v1/p... | python | async def purgeRequests(self, *args, **kwargs):
"""
Open Purge Requests for a provisionerId/workerType pair
List of caches that need to be purged if they are from before
a certain time. This is safe to be used in automation from
workers.
This method gives output: ``v1/p... | [
"async",
"def",
"purgeRequests",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"await",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"purgeRequests\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
... | Open Purge Requests for a provisionerId/workerType pair
List of caches that need to be purged if they are from before
a certain time. This is safe to be used in automation from
workers.
This method gives output: ``v1/purge-cache-request-list.json#``
This method is ``stable`` | [
"Open",
"Purge",
"Requests",
"for",
"a",
"provisionerId",
"/",
"workerType",
"pair"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/purgecache.py#L72-L85 |
jart/fabulous | fabulous/term.py | Term.write | def write(self, text):
"""Parses text and prints proper output to the terminal
This method will extract escape codes from the text and
handle them as well as possible for whichever platform
is being used. At the moment only the display escape codes
are supported.
... | python | def write(self, text):
"""Parses text and prints proper output to the terminal
This method will extract escape codes from the text and
handle them as well as possible for whichever platform
is being used. At the moment only the display escape codes
are supported.
... | [
"def",
"write",
"(",
"self",
",",
"text",
")",
":",
"escape_parts",
"=",
"re",
".",
"compile",
"(",
"'\\x01?\\x1b\\\\[([0-9;]*)m\\x02?'",
")",
"chunks",
"=",
"escape_parts",
".",
"split",
"(",
"text",
")",
"i",
"=",
"0",
"for",
"chunk",
"in",
"chunks",
"... | Parses text and prints proper output to the terminal
This method will extract escape codes from the text and
handle them as well as possible for whichever platform
is being used. At the moment only the display escape codes
are supported. | [
"Parses",
"text",
"and",
"prints",
"proper",
"output",
"to",
"the",
"terminal",
"This",
"method",
"will",
"extract",
"escape",
"codes",
"from",
"the",
"text",
"and",
"handle",
"them",
"as",
"well",
"as",
"possible",
"for",
"whichever",
"platform",
"is",
"bei... | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L179-L199 |
jart/fabulous | fabulous/term.py | UnixTerm.getch | def getch(self):
"""Don't use this yet
It doesn't belong here but I haven't yet thought about a proper
way to implement this feature and the features that will depend on
it.
"""
return NotImplemented
fno = stdout.fileno()
mode = self.termios.tcget... | python | def getch(self):
"""Don't use this yet
It doesn't belong here but I haven't yet thought about a proper
way to implement this feature and the features that will depend on
it.
"""
return NotImplemented
fno = stdout.fileno()
mode = self.termios.tcget... | [
"def",
"getch",
"(",
"self",
")",
":",
"return",
"NotImplemented",
"fno",
"=",
"stdout",
".",
"fileno",
"(",
")",
"mode",
"=",
"self",
".",
"termios",
".",
"tcgetattr",
"(",
"fno",
")",
"try",
":",
"self",
".",
"tty",
".",
"setraw",
"(",
"fno",
","... | Don't use this yet
It doesn't belong here but I haven't yet thought about a proper
way to implement this feature and the features that will depend on
it. | [
"Don",
"t",
"use",
"this",
"yet",
"It",
"doesn",
"t",
"belong",
"here",
"but",
"I",
"haven",
"t",
"yet",
"thought",
"about",
"a",
"proper",
"way",
"to",
"implement",
"this",
"feature",
"and",
"the",
"features",
"that",
"will",
"depend",
"on",
"it",
"."... | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L273-L288 |
jart/fabulous | fabulous/term.py | CursesTerm.display | def display(self, codes=[], fg=None, bg=None):
"""Displays the codes using ANSI escapes
"""
codes, fg, bg = Magic.displayformat(codes, fg, bg)
self.stream.write(Magic.display(codes, fg, bg))
self.flush() | python | def display(self, codes=[], fg=None, bg=None):
"""Displays the codes using ANSI escapes
"""
codes, fg, bg = Magic.displayformat(codes, fg, bg)
self.stream.write(Magic.display(codes, fg, bg))
self.flush() | [
"def",
"display",
"(",
"self",
",",
"codes",
"=",
"[",
"]",
",",
"fg",
"=",
"None",
",",
"bg",
"=",
"None",
")",
":",
"codes",
",",
"fg",
",",
"bg",
"=",
"Magic",
".",
"displayformat",
"(",
"codes",
",",
"fg",
",",
"bg",
")",
"self",
".",
"st... | Displays the codes using ANSI escapes | [
"Displays",
"the",
"codes",
"using",
"ANSI",
"escapes"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L302-L307 |
jart/fabulous | fabulous/term.py | CursesTerm.move | def move(self, place, distance = 1):
"""see doc in Term class"""
for d in range(distance):
self.stream.write(self._get_cap('move '+place))
self.flush() | python | def move(self, place, distance = 1):
"""see doc in Term class"""
for d in range(distance):
self.stream.write(self._get_cap('move '+place))
self.flush() | [
"def",
"move",
"(",
"self",
",",
"place",
",",
"distance",
"=",
"1",
")",
":",
"for",
"d",
"in",
"range",
"(",
"distance",
")",
":",
"self",
".",
"stream",
".",
"write",
"(",
"self",
".",
"_get_cap",
"(",
"'move '",
"+",
"place",
")",
")",
"self"... | see doc in Term class | [
"see",
"doc",
"in",
"Term",
"class"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L309-L313 |
jart/fabulous | fabulous/term.py | CursesTerm.clear | def clear(self, scope = 'screen'):
"""see doc in Term class"""
if scope == 'line':
self.clear('beginning of line')
self.clear('end of line')
else: self.stream.write(self._get_cap('clear '+scope))
self.flush() | python | def clear(self, scope = 'screen'):
"""see doc in Term class"""
if scope == 'line':
self.clear('beginning of line')
self.clear('end of line')
else: self.stream.write(self._get_cap('clear '+scope))
self.flush() | [
"def",
"clear",
"(",
"self",
",",
"scope",
"=",
"'screen'",
")",
":",
"if",
"scope",
"==",
"'line'",
":",
"self",
".",
"clear",
"(",
"'beginning of line'",
")",
"self",
".",
"clear",
"(",
"'end of line'",
")",
"else",
":",
"self",
".",
"stream",
".",
... | see doc in Term class | [
"see",
"doc",
"in",
"Term",
"class"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L315-L321 |
jart/fabulous | fabulous/term.py | CursesTerm.get_size | def get_size(self):
"""see doc in Term class"""
self.curses.setupterm()
return self.curses.tigetnum('cols'), self.curses.tigetnum('lines') | python | def get_size(self):
"""see doc in Term class"""
self.curses.setupterm()
return self.curses.tigetnum('cols'), self.curses.tigetnum('lines') | [
"def",
"get_size",
"(",
"self",
")",
":",
"self",
".",
"curses",
".",
"setupterm",
"(",
")",
"return",
"self",
".",
"curses",
".",
"tigetnum",
"(",
"'cols'",
")",
",",
"self",
".",
"curses",
".",
"tigetnum",
"(",
"'lines'",
")"
] | see doc in Term class | [
"see",
"doc",
"in",
"Term",
"class"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L323-L326 |
jart/fabulous | fabulous/term.py | WinTerm.display | def display(self, codes=[], fg=None, bg=None):
"""Displays codes using Windows kernel calls
"""
codes, fg, bg = Magic.displayformat(codes, fg, bg)
color = 0
for c in codes:
try:
f = getattr(self, '_display_' + c)
out = f()
... | python | def display(self, codes=[], fg=None, bg=None):
"""Displays codes using Windows kernel calls
"""
codes, fg, bg = Magic.displayformat(codes, fg, bg)
color = 0
for c in codes:
try:
f = getattr(self, '_display_' + c)
out = f()
... | [
"def",
"display",
"(",
"self",
",",
"codes",
"=",
"[",
"]",
",",
"fg",
"=",
"None",
",",
"bg",
"=",
"None",
")",
":",
"codes",
",",
"fg",
",",
"bg",
"=",
"Magic",
".",
"displayformat",
"(",
"codes",
",",
"fg",
",",
"bg",
")",
"color",
"=",
"0... | Displays codes using Windows kernel calls | [
"Displays",
"codes",
"using",
"Windows",
"kernel",
"calls"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L429-L466 |
jart/fabulous | fabulous/term.py | WinTerm.get_size | def get_size(self):
"""see doc in Term class"""
attr = self._get_console_info()
cols = attr['window']['right'] - attr['window']['left'] + 1
lines = attr['window']['bottom'] - attr['window']['top'] + 1
return cols, lines | python | def get_size(self):
"""see doc in Term class"""
attr = self._get_console_info()
cols = attr['window']['right'] - attr['window']['left'] + 1
lines = attr['window']['bottom'] - attr['window']['top'] + 1
return cols, lines | [
"def",
"get_size",
"(",
"self",
")",
":",
"attr",
"=",
"self",
".",
"_get_console_info",
"(",
")",
"cols",
"=",
"attr",
"[",
"'window'",
"]",
"[",
"'right'",
"]",
"-",
"attr",
"[",
"'window'",
"]",
"[",
"'left'",
"]",
"+",
"1",
"lines",
"=",
"attr"... | see doc in Term class | [
"see",
"doc",
"in",
"Term",
"class"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L468-L473 |
jart/fabulous | fabulous/term.py | WinTerm._split_attributes | def _split_attributes(self, attrs):
"""Spilt attribute code
Takes an attribute code and returns a tuple containing
foreground (fg), foreground intensity (fgi), background (bg), and
background intensity (bgi)
Attributes can be joined using ``fg | fgi | bg | bgi``... | python | def _split_attributes(self, attrs):
"""Spilt attribute code
Takes an attribute code and returns a tuple containing
foreground (fg), foreground intensity (fgi), background (bg), and
background intensity (bgi)
Attributes can be joined using ``fg | fgi | bg | bgi``... | [
"def",
"_split_attributes",
"(",
"self",
",",
"attrs",
")",
":",
"fg",
"=",
"attrs",
"&",
"self",
".",
"FG_ALL",
"fgi",
"=",
"attrs",
"&",
"self",
".",
"FG_INTENSITY",
"bg",
"=",
"attrs",
"&",
"self",
".",
"BG_ALL",
"bgi",
"=",
"attrs",
"&",
"self",
... | Spilt attribute code
Takes an attribute code and returns a tuple containing
foreground (fg), foreground intensity (fgi), background (bg), and
background intensity (bgi)
Attributes can be joined using ``fg | fgi | bg | bgi`` | [
"Spilt",
"attribute",
"code",
"Takes",
"an",
"attribute",
"code",
"and",
"returns",
"a",
"tuple",
"containing",
"foreground",
"(",
"fg",
")",
"foreground",
"intensity",
"(",
"fgi",
")",
"background",
"(",
"bg",
")",
"and",
"background",
"intensity",
"(",
"bg... | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L517-L530 |
jart/fabulous | fabulous/term.py | WinTerm.move | def move(self, place, distance = 1):
"""see doc in Term class"""
x, y = self._get_position()
if place == 'up':
y -= distance
elif place == 'down':
for i in range(distance): print
nx, ny = self._get_position()
y = ny
self.move('b... | python | def move(self, place, distance = 1):
"""see doc in Term class"""
x, y = self._get_position()
if place == 'up':
y -= distance
elif place == 'down':
for i in range(distance): print
nx, ny = self._get_position()
y = ny
self.move('b... | [
"def",
"move",
"(",
"self",
",",
"place",
",",
"distance",
"=",
"1",
")",
":",
"x",
",",
"y",
"=",
"self",
".",
"_get_position",
"(",
")",
"if",
"place",
"==",
"'up'",
":",
"y",
"-=",
"distance",
"elif",
"place",
"==",
"'down'",
":",
"for",
"i",
... | see doc in Term class | [
"see",
"doc",
"in",
"Term",
"class"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L578-L599 |
jart/fabulous | fabulous/term.py | WinTerm.clear | def clear(self, scope = 'screen'):
"""see doc in Term class
According to http://support.microsoft.com/kb/99261 the best way
to clear the console is to write out empty spaces
"""
#TODO: clear attributes too
if scope == 'screen':
bos = (0, self._get_con... | python | def clear(self, scope = 'screen'):
"""see doc in Term class
According to http://support.microsoft.com/kb/99261 the best way
to clear the console is to write out empty spaces
"""
#TODO: clear attributes too
if scope == 'screen':
bos = (0, self._get_con... | [
"def",
"clear",
"(",
"self",
",",
"scope",
"=",
"'screen'",
")",
":",
"#TODO: clear attributes too",
"if",
"scope",
"==",
"'screen'",
":",
"bos",
"=",
"(",
"0",
",",
"self",
".",
"_get_console_info",
"(",
")",
"[",
"'window'",
"]",
"[",
"'top'",
"]",
"... | see doc in Term class
According to http://support.microsoft.com/kb/99261 the best way
to clear the console is to write out empty spaces | [
"see",
"doc",
"in",
"Term",
"class",
"According",
"to",
"http",
":",
"//",
"support",
".",
"microsoft",
".",
"com",
"/",
"kb",
"/",
"99261",
"the",
"best",
"way",
"to",
"clear",
"the",
"console",
"is",
"to",
"write",
"out",
"empty",
"spaces"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L601-L641 |
jart/fabulous | fabulous/term.py | WinCTypesTerm._get_title | def _get_title(self):
"""According to http://support.microsoft.com/kb/124103 the buffer
size is 1024
Does not support unicode, only ANSI"""
#TODO: unicode support
strbuffer = self.ctypes.create_string_buffer(1024)
size = self.ctypes.c_short(1024)
#unicode... | python | def _get_title(self):
"""According to http://support.microsoft.com/kb/124103 the buffer
size is 1024
Does not support unicode, only ANSI"""
#TODO: unicode support
strbuffer = self.ctypes.create_string_buffer(1024)
size = self.ctypes.c_short(1024)
#unicode... | [
"def",
"_get_title",
"(",
"self",
")",
":",
"#TODO: unicode support",
"strbuffer",
"=",
"self",
".",
"ctypes",
".",
"create_string_buffer",
"(",
"1024",
")",
"size",
"=",
"self",
".",
"ctypes",
".",
"c_short",
"(",
"1024",
")",
"#unicode versions are (Get|Set)Co... | According to http://support.microsoft.com/kb/124103 the buffer
size is 1024
Does not support unicode, only ANSI | [
"According",
"to",
"http",
":",
"//",
"support",
".",
"microsoft",
".",
"com",
"/",
"kb",
"/",
"124103",
"the",
"buffer",
"size",
"is",
"1024",
"Does",
"not",
"support",
"unicode",
"only",
"ANSI"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L758-L768 |
jart/fabulous | fabulous/term.py | WinCTypesTerm._get_coord | def _get_coord(self, coord):
""" It's a hack, see fixcoord in pyreadline's console.py (revision
1289)
"""
x, y = coord
return self.ctypes.c_int(y << 16 | x) | python | def _get_coord(self, coord):
""" It's a hack, see fixcoord in pyreadline's console.py (revision
1289)
"""
x, y = coord
return self.ctypes.c_int(y << 16 | x) | [
"def",
"_get_coord",
"(",
"self",
",",
"coord",
")",
":",
"x",
",",
"y",
"=",
"coord",
"return",
"self",
".",
"ctypes",
".",
"c_int",
"(",
"y",
"<<",
"16",
"|",
"x",
")"
] | It's a hack, see fixcoord in pyreadline's console.py (revision
1289) | [
"It",
"s",
"a",
"hack",
"see",
"fixcoord",
"in",
"pyreadline",
"s",
"console",
".",
"py",
"(",
"revision",
"1289",
")"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L789-L794 |
jart/fabulous | fabulous/term.py | Magic.displayformat | def displayformat(codes=[], fg=None, bg=None):
"""Makes sure all arguments are valid"""
if isinstance(codes, basestring):
codes = [codes]
else:
codes = list(codes)
for code in codes:
if code not in Magic.DISPLAY.keys():
raise ValueError... | python | def displayformat(codes=[], fg=None, bg=None):
"""Makes sure all arguments are valid"""
if isinstance(codes, basestring):
codes = [codes]
else:
codes = list(codes)
for code in codes:
if code not in Magic.DISPLAY.keys():
raise ValueError... | [
"def",
"displayformat",
"(",
"codes",
"=",
"[",
"]",
",",
"fg",
"=",
"None",
",",
"bg",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"codes",
",",
"basestring",
")",
":",
"codes",
"=",
"[",
"codes",
"]",
"else",
":",
"codes",
"=",
"list",
"(",... | Makes sure all arguments are valid | [
"Makes",
"sure",
"all",
"arguments",
"are",
"valid"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L825-L838 |
jart/fabulous | fabulous/term.py | Magic.rdisplay | def rdisplay(codes):
"""Reads a list of codes and generates dict
>>> Magic.rdisplay([])
{}
>>> result = Magic.rdisplay([1,2,34,46])
>>> sorted(result.keys())
['bg', 'codes', 'fg']
>>> sorted(result['codes'])
['bright', 'dim']
>>> result['b... | python | def rdisplay(codes):
"""Reads a list of codes and generates dict
>>> Magic.rdisplay([])
{}
>>> result = Magic.rdisplay([1,2,34,46])
>>> sorted(result.keys())
['bg', 'codes', 'fg']
>>> sorted(result['codes'])
['bright', 'dim']
>>> result['b... | [
"def",
"rdisplay",
"(",
"codes",
")",
":",
"dcodes",
"=",
"[",
"]",
"fg",
"=",
"bg",
"=",
"None",
"for",
"code",
"in",
"codes",
":",
"code",
"=",
"int",
"(",
"code",
")",
"offset",
"=",
"code",
"//",
"10",
"decimal",
"=",
"code",
"%",
"10",
"if... | Reads a list of codes and generates dict
>>> Magic.rdisplay([])
{}
>>> result = Magic.rdisplay([1,2,34,46])
>>> sorted(result.keys())
['bg', 'codes', 'fg']
>>> sorted(result['codes'])
['bright', 'dim']
>>> result['bg']
'cyan'
>>> r... | [
"Reads",
"a",
"list",
"of",
"codes",
"and",
"generates",
"dict",
">>>",
"Magic",
".",
"rdisplay",
"(",
"[]",
")",
"{}",
">>>",
"result",
"=",
"Magic",
".",
"rdisplay",
"(",
"[",
"1",
"2",
"34",
"46",
"]",
")",
">>>",
"sorted",
"(",
"result",
".",
... | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/term.py#L841-L870 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.listClients | def listClients(self, *args, **kwargs):
"""
List Clients
Get a list of all clients. With `prefix`, only clients for which
it is a prefix of the clientId are returned.
By default this end-point will try to return up to 1000 clients in one
request. But it **may return le... | python | def listClients(self, *args, **kwargs):
"""
List Clients
Get a list of all clients. With `prefix`, only clients for which
it is a prefix of the clientId are returned.
By default this end-point will try to return up to 1000 clients in one
request. But it **may return le... | [
"def",
"listClients",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"listClients\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | List Clients
Get a list of all clients. With `prefix`, only clients for which
it is a prefix of the clientId are returned.
By default this end-point will try to return up to 1000 clients in one
request. But it **may return less, even none**.
It may also return a `continuationT... | [
"List",
"Clients"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L74-L93 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.client | def client(self, *args, **kwargs):
"""
Get Client
Get information about a single client.
This method gives output: ``v1/get-client-response.json#``
This method is ``stable``
"""
return self._makeApiCall(self.funcinfo["client"], *args, **kwargs) | python | def client(self, *args, **kwargs):
"""
Get Client
Get information about a single client.
This method gives output: ``v1/get-client-response.json#``
This method is ``stable``
"""
return self._makeApiCall(self.funcinfo["client"], *args, **kwargs) | [
"def",
"client",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"client\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get Client
Get information about a single client.
This method gives output: ``v1/get-client-response.json#``
This method is ``stable`` | [
"Get",
"Client"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L95-L106 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.createClient | def createClient(self, *args, **kwargs):
"""
Create Client
Create a new client and get the `accessToken` for this client.
You should store the `accessToken` from this API call as there is no
other way to retrieve it.
If you loose the `accessToken` you can call `resetAcc... | python | def createClient(self, *args, **kwargs):
"""
Create Client
Create a new client and get the `accessToken` for this client.
You should store the `accessToken` from this API call as there is no
other way to retrieve it.
If you loose the `accessToken` you can call `resetAcc... | [
"def",
"createClient",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"createClient\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Create Client
Create a new client and get the `accessToken` for this client.
You should store the `accessToken` from this API call as there is no
other way to retrieve it.
If you loose the `accessToken` you can call `resetAccessToken` to reset
it, and a new `accessToken` will b... | [
"Create",
"Client"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L108-L132 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.updateClient | def updateClient(self, *args, **kwargs):
"""
Update Client
Update an exisiting client. The `clientId` and `accessToken` cannot be
updated, but `scopes` can be modified. The caller's scopes must
satisfy all scopes being added to the client in the update operation.
If no ... | python | def updateClient(self, *args, **kwargs):
"""
Update Client
Update an exisiting client. The `clientId` and `accessToken` cannot be
updated, but `scopes` can be modified. The caller's scopes must
satisfy all scopes being added to the client in the update operation.
If no ... | [
"def",
"updateClient",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"updateClient\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Update Client
Update an exisiting client. The `clientId` and `accessToken` cannot be
updated, but `scopes` can be modified. The caller's scopes must
satisfy all scopes being added to the client in the update operation.
If no scopes are given in the request, the client's scopes remain
... | [
"Update",
"Client"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L152-L169 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.enableClient | def enableClient(self, *args, **kwargs):
"""
Enable Client
Enable a client that was disabled with `disableClient`. If the client
is already enabled, this does nothing.
This is typically used by identity providers to re-enable clients that
had been disabled when the cor... | python | def enableClient(self, *args, **kwargs):
"""
Enable Client
Enable a client that was disabled with `disableClient`. If the client
is already enabled, this does nothing.
This is typically used by identity providers to re-enable clients that
had been disabled when the cor... | [
"def",
"enableClient",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"enableClient\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Enable Client
Enable a client that was disabled with `disableClient`. If the client
is already enabled, this does nothing.
This is typically used by identity providers to re-enable clients that
had been disabled when the corresponding identity's scopes changed.
This method gi... | [
"Enable",
"Client"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L171-L186 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.disableClient | def disableClient(self, *args, **kwargs):
"""
Disable Client
Disable a client. If the client is already disabled, this does nothing.
This is typically used by identity providers to disable clients when the
corresponding identity's scopes no longer satisfy the client's scopes.
... | python | def disableClient(self, *args, **kwargs):
"""
Disable Client
Disable a client. If the client is already disabled, this does nothing.
This is typically used by identity providers to disable clients when the
corresponding identity's scopes no longer satisfy the client's scopes.
... | [
"def",
"disableClient",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"disableClient\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Disable Client
Disable a client. If the client is already disabled, this does nothing.
This is typically used by identity providers to disable clients when the
corresponding identity's scopes no longer satisfy the client's scopes.
This method gives output: ``v1/get-client-response.js... | [
"Disable",
"Client"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L188-L202 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.deleteClient | def deleteClient(self, *args, **kwargs):
"""
Delete Client
Delete a client, please note that any roles related to this client must
be deleted independently.
This method is ``stable``
"""
return self._makeApiCall(self.funcinfo["deleteClient"], *args, **kwargs) | python | def deleteClient(self, *args, **kwargs):
"""
Delete Client
Delete a client, please note that any roles related to this client must
be deleted independently.
This method is ``stable``
"""
return self._makeApiCall(self.funcinfo["deleteClient"], *args, **kwargs) | [
"def",
"deleteClient",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"deleteClient\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Delete Client
Delete a client, please note that any roles related to this client must
be deleted independently.
This method is ``stable`` | [
"Delete",
"Client"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L204-L214 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.listRoles | def listRoles(self, *args, **kwargs):
"""
List Roles
Get a list of all roles, each role object also includes the list of
scopes it expands to.
This method gives output: ``v1/list-roles-response.json#``
This method is ``stable``
"""
return self._makeApi... | python | def listRoles(self, *args, **kwargs):
"""
List Roles
Get a list of all roles, each role object also includes the list of
scopes it expands to.
This method gives output: ``v1/list-roles-response.json#``
This method is ``stable``
"""
return self._makeApi... | [
"def",
"listRoles",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"listRoles\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | List Roles
Get a list of all roles, each role object also includes the list of
scopes it expands to.
This method gives output: ``v1/list-roles-response.json#``
This method is ``stable`` | [
"List",
"Roles"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L216-L228 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.listRoleIds | def listRoleIds(self, *args, **kwargs):
"""
List Role IDs
If no limit is given, the roleIds of all roles are returned. Since this
list may become long, callers can use the `limit` and `continuationToken`
query arguments to page through the responses.
This method gives o... | python | def listRoleIds(self, *args, **kwargs):
"""
List Role IDs
If no limit is given, the roleIds of all roles are returned. Since this
list may become long, callers can use the `limit` and `continuationToken`
query arguments to page through the responses.
This method gives o... | [
"def",
"listRoleIds",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"listRoleIds\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | List Role IDs
If no limit is given, the roleIds of all roles are returned. Since this
list may become long, callers can use the `limit` and `continuationToken`
query arguments to page through the responses.
This method gives output: ``v1/list-role-ids-response.json#``
This met... | [
"List",
"Role",
"IDs"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L230-L243 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.listRoles2 | def listRoles2(self, *args, **kwargs):
"""
List Roles
If no limit is given, all roles are returned. Since this
list may become long, callers can use the `limit` and `continuationToken`
query arguments to page through the responses.
This method gives output: ``v1/list-ro... | python | def listRoles2(self, *args, **kwargs):
"""
List Roles
If no limit is given, all roles are returned. Since this
list may become long, callers can use the `limit` and `continuationToken`
query arguments to page through the responses.
This method gives output: ``v1/list-ro... | [
"def",
"listRoles2",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"listRoles2\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | List Roles
If no limit is given, all roles are returned. Since this
list may become long, callers can use the `limit` and `continuationToken`
query arguments to page through the responses.
This method gives output: ``v1/list-roles2-response.json#``
This method is ``stable`` | [
"List",
"Roles"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L245-L258 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.createRole | def createRole(self, *args, **kwargs):
"""
Create Role
Create a new role.
The caller's scopes must satisfy the new role's scopes.
If there already exists a role with the same `roleId` this operation
will fail. Use `updateRole` to modify an existing role.
Creat... | python | def createRole(self, *args, **kwargs):
"""
Create Role
Create a new role.
The caller's scopes must satisfy the new role's scopes.
If there already exists a role with the same `roleId` this operation
will fail. Use `updateRole` to modify an existing role.
Creat... | [
"def",
"createRole",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"createRole\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Create Role
Create a new role.
The caller's scopes must satisfy the new role's scopes.
If there already exists a role with the same `roleId` this operation
will fail. Use `updateRole` to modify an existing role.
Creation of a role that will generate an infinite expansion will... | [
"Create",
"Role"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L274-L295 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.updateRole | def updateRole(self, *args, **kwargs):
"""
Update Role
Update an existing role.
The caller's scopes must satisfy all of the new scopes being added, but
need not satisfy all of the role's existing scopes.
An update of a role that will generate an infinite expansion will... | python | def updateRole(self, *args, **kwargs):
"""
Update Role
Update an existing role.
The caller's scopes must satisfy all of the new scopes being added, but
need not satisfy all of the role's existing scopes.
An update of a role that will generate an infinite expansion will... | [
"def",
"updateRole",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"updateRole\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Update Role
Update an existing role.
The caller's scopes must satisfy all of the new scopes being added, but
need not satisfy all of the role's existing scopes.
An update of a role that will generate an infinite expansion will result
in an error response.
This method ... | [
"Update",
"Role"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L297-L316 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.deleteRole | def deleteRole(self, *args, **kwargs):
"""
Delete Role
Delete a role. This operation will succeed regardless of whether or not
the role exists.
This method is ``stable``
"""
return self._makeApiCall(self.funcinfo["deleteRole"], *args, **kwargs) | python | def deleteRole(self, *args, **kwargs):
"""
Delete Role
Delete a role. This operation will succeed regardless of whether or not
the role exists.
This method is ``stable``
"""
return self._makeApiCall(self.funcinfo["deleteRole"], *args, **kwargs) | [
"def",
"deleteRole",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"deleteRole\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Delete Role
Delete a role. This operation will succeed regardless of whether or not
the role exists.
This method is ``stable`` | [
"Delete",
"Role"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L318-L328 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.expandScopesGet | def expandScopesGet(self, *args, **kwargs):
"""
Expand Scopes
Return an expanded copy of the given scopeset, with scopes implied by any
roles included.
This call uses the GET method with an HTTP body. It remains only for
backward compatibility.
This method tak... | python | def expandScopesGet(self, *args, **kwargs):
"""
Expand Scopes
Return an expanded copy of the given scopeset, with scopes implied by any
roles included.
This call uses the GET method with an HTTP body. It remains only for
backward compatibility.
This method tak... | [
"def",
"expandScopesGet",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"expandScopesGet\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Expand Scopes
Return an expanded copy of the given scopeset, with scopes implied by any
roles included.
This call uses the GET method with an HTTP body. It remains only for
backward compatibility.
This method takes input: ``v1/scopeset.json#``
This method gives outpu... | [
"Expand",
"Scopes"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L330-L347 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.expandScopes | def expandScopes(self, *args, **kwargs):
"""
Expand Scopes
Return an expanded copy of the given scopeset, with scopes implied by any
roles included.
This method takes input: ``v1/scopeset.json#``
This method gives output: ``v1/scopeset.json#``
This method is `... | python | def expandScopes(self, *args, **kwargs):
"""
Expand Scopes
Return an expanded copy of the given scopeset, with scopes implied by any
roles included.
This method takes input: ``v1/scopeset.json#``
This method gives output: ``v1/scopeset.json#``
This method is `... | [
"def",
"expandScopes",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"expandScopes\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Expand Scopes
Return an expanded copy of the given scopeset, with scopes implied by any
roles included.
This method takes input: ``v1/scopeset.json#``
This method gives output: ``v1/scopeset.json#``
This method is ``stable`` | [
"Expand",
"Scopes"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L349-L363 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.currentScopes | def currentScopes(self, *args, **kwargs):
"""
Get Current Scopes
Return the expanded scopes available in the request, taking into account all sources
of scopes and scope restrictions (temporary credentials, assumeScopes, client scopes,
and roles).
This method gives outp... | python | def currentScopes(self, *args, **kwargs):
"""
Get Current Scopes
Return the expanded scopes available in the request, taking into account all sources
of scopes and scope restrictions (temporary credentials, assumeScopes, client scopes,
and roles).
This method gives outp... | [
"def",
"currentScopes",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"currentScopes\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get Current Scopes
Return the expanded scopes available in the request, taking into account all sources
of scopes and scope restrictions (temporary credentials, assumeScopes, client scopes,
and roles).
This method gives output: ``v1/scopeset.json#``
This method is ``stable`` | [
"Get",
"Current",
"Scopes"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L365-L378 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.awsS3Credentials | def awsS3Credentials(self, *args, **kwargs):
"""
Get Temporary Read/Write Credentials S3
Get temporary AWS credentials for `read-write` or `read-only` access to
a given `bucket` and `prefix` within that bucket.
The `level` parameter can be `read-write` or `read-only` and determi... | python | def awsS3Credentials(self, *args, **kwargs):
"""
Get Temporary Read/Write Credentials S3
Get temporary AWS credentials for `read-write` or `read-only` access to
a given `bucket` and `prefix` within that bucket.
The `level` parameter can be `read-write` or `read-only` and determi... | [
"def",
"awsS3Credentials",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"awsS3Credentials\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get Temporary Read/Write Credentials S3
Get temporary AWS credentials for `read-write` or `read-only` access to
a given `bucket` and `prefix` within that bucket.
The `level` parameter can be `read-write` or `read-only` and determines
which type of credentials are returned. Please note t... | [
"Get",
"Temporary",
"Read",
"/",
"Write",
"Credentials",
"S3"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L380-L455 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.azureTables | def azureTables(self, *args, **kwargs):
"""
List Tables in an Account Managed by Auth
Retrieve a list of all tables in an account.
This method gives output: ``v1/azure-table-list-response.json#``
This method is ``stable``
"""
return self._makeApiCall(self.func... | python | def azureTables(self, *args, **kwargs):
"""
List Tables in an Account Managed by Auth
Retrieve a list of all tables in an account.
This method gives output: ``v1/azure-table-list-response.json#``
This method is ``stable``
"""
return self._makeApiCall(self.func... | [
"def",
"azureTables",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"azureTables\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | List Tables in an Account Managed by Auth
Retrieve a list of all tables in an account.
This method gives output: ``v1/azure-table-list-response.json#``
This method is ``stable`` | [
"List",
"Tables",
"in",
"an",
"Account",
"Managed",
"by",
"Auth"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L470-L481 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.azureTableSAS | def azureTableSAS(self, *args, **kwargs):
"""
Get Shared-Access-Signature for Azure Table
Get a shared access signature (SAS) string for use with a specific Azure
Table Storage table.
The `level` parameter can be `read-write` or `read-only` and determines
which type of ... | python | def azureTableSAS(self, *args, **kwargs):
"""
Get Shared-Access-Signature for Azure Table
Get a shared access signature (SAS) string for use with a specific Azure
Table Storage table.
The `level` parameter can be `read-write` or `read-only` and determines
which type of ... | [
"def",
"azureTableSAS",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"azureTableSAS\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get Shared-Access-Signature for Azure Table
Get a shared access signature (SAS) string for use with a specific Azure
Table Storage table.
The `level` parameter can be `read-write` or `read-only` and determines
which type of credentials are returned. If level is read-write, it will cre... | [
"Get",
"Shared",
"-",
"Access",
"-",
"Signature",
"for",
"Azure",
"Table"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L483-L499 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.azureContainers | def azureContainers(self, *args, **kwargs):
"""
List containers in an Account Managed by Auth
Retrieve a list of all containers in an account.
This method gives output: ``v1/azure-container-list-response.json#``
This method is ``stable``
"""
return self._makeA... | python | def azureContainers(self, *args, **kwargs):
"""
List containers in an Account Managed by Auth
Retrieve a list of all containers in an account.
This method gives output: ``v1/azure-container-list-response.json#``
This method is ``stable``
"""
return self._makeA... | [
"def",
"azureContainers",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"azureContainers\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | List containers in an Account Managed by Auth
Retrieve a list of all containers in an account.
This method gives output: ``v1/azure-container-list-response.json#``
This method is ``stable`` | [
"List",
"containers",
"in",
"an",
"Account",
"Managed",
"by",
"Auth"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L501-L512 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.azureContainerSAS | def azureContainerSAS(self, *args, **kwargs):
"""
Get Shared-Access-Signature for Azure Container
Get a shared access signature (SAS) string for use with a specific Azure
Blob Storage container.
The `level` parameter can be `read-write` or `read-only` and determines
whi... | python | def azureContainerSAS(self, *args, **kwargs):
"""
Get Shared-Access-Signature for Azure Container
Get a shared access signature (SAS) string for use with a specific Azure
Blob Storage container.
The `level` parameter can be `read-write` or `read-only` and determines
whi... | [
"def",
"azureContainerSAS",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"azureContainerSAS\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get Shared-Access-Signature for Azure Container
Get a shared access signature (SAS) string for use with a specific Azure
Blob Storage container.
The `level` parameter can be `read-write` or `read-only` and determines
which type of credentials are returned. If level is read-write, it w... | [
"Get",
"Shared",
"-",
"Access",
"-",
"Signature",
"for",
"Azure",
"Container"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L514-L530 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.sentryDSN | def sentryDSN(self, *args, **kwargs):
"""
Get DSN for Sentry Project
Get temporary DSN (access credentials) for a sentry project.
The credentials returned can be used with any Sentry client for up to
24 hours, after which the credentials will be automatically disabled.
... | python | def sentryDSN(self, *args, **kwargs):
"""
Get DSN for Sentry Project
Get temporary DSN (access credentials) for a sentry project.
The credentials returned can be used with any Sentry client for up to
24 hours, after which the credentials will be automatically disabled.
... | [
"def",
"sentryDSN",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"sentryDSN\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get DSN for Sentry Project
Get temporary DSN (access credentials) for a sentry project.
The credentials returned can be used with any Sentry client for up to
24 hours, after which the credentials will be automatically disabled.
If the project doesn't exist it will be created, and assig... | [
"Get",
"DSN",
"for",
"Sentry",
"Project"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L532-L549 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.statsumToken | def statsumToken(self, *args, **kwargs):
"""
Get Token for Statsum Project
Get temporary `token` and `baseUrl` for sending metrics to statsum.
The token is valid for 24 hours, clients should refresh after expiration.
This method gives output: ``v1/statsum-token-response.json#`... | python | def statsumToken(self, *args, **kwargs):
"""
Get Token for Statsum Project
Get temporary `token` and `baseUrl` for sending metrics to statsum.
The token is valid for 24 hours, clients should refresh after expiration.
This method gives output: ``v1/statsum-token-response.json#`... | [
"def",
"statsumToken",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"statsumToken\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get Token for Statsum Project
Get temporary `token` and `baseUrl` for sending metrics to statsum.
The token is valid for 24 hours, clients should refresh after expiration.
This method gives output: ``v1/statsum-token-response.json#``
This method is ``stable`` | [
"Get",
"Token",
"for",
"Statsum",
"Project"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L551-L564 |
taskcluster/taskcluster-client.py | taskcluster/auth.py | Auth.websocktunnelToken | def websocktunnelToken(self, *args, **kwargs):
"""
Get a client token for the Websocktunnel service
Get a temporary token suitable for use connecting to a
[websocktunnel](https://github.com/taskcluster/websocktunnel) server.
The resulting token will only be accepted by servers ... | python | def websocktunnelToken(self, *args, **kwargs):
"""
Get a client token for the Websocktunnel service
Get a temporary token suitable for use connecting to a
[websocktunnel](https://github.com/taskcluster/websocktunnel) server.
The resulting token will only be accepted by servers ... | [
"def",
"websocktunnelToken",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"websocktunnelToken\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get a client token for the Websocktunnel service
Get a temporary token suitable for use connecting to a
[websocktunnel](https://github.com/taskcluster/websocktunnel) server.
The resulting token will only be accepted by servers with a matching audience
value. Reaching such a server is ... | [
"Get",
"a",
"client",
"token",
"for",
"the",
"Websocktunnel",
"service"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/auth.py#L566-L586 |
jart/fabulous | fabulous/color.py | h1 | def h1(title, line=OVERLINE):
"""Prints bold text with line beneath it spanning width of terminal
"""
width = utils.term.width
printy(bold(title.center(width)).as_utf8)
printy(bold((line * width)[:width]).as_utf8) | python | def h1(title, line=OVERLINE):
"""Prints bold text with line beneath it spanning width of terminal
"""
width = utils.term.width
printy(bold(title.center(width)).as_utf8)
printy(bold((line * width)[:width]).as_utf8) | [
"def",
"h1",
"(",
"title",
",",
"line",
"=",
"OVERLINE",
")",
":",
"width",
"=",
"utils",
".",
"term",
".",
"width",
"printy",
"(",
"bold",
"(",
"title",
".",
"center",
"(",
"width",
")",
")",
".",
"as_utf8",
")",
"printy",
"(",
"bold",
"(",
"(",... | Prints bold text with line beneath it spanning width of terminal | [
"Prints",
"bold",
"text",
"with",
"line",
"beneath",
"it",
"spanning",
"width",
"of",
"terminal"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/color.py#L832-L837 |
jart/fabulous | fabulous/color.py | parse_color | def parse_color(color):
r"""Turns a color into an (r, g, b) tuple
>>> parse_color('white')
(255, 255, 255)
>>> parse_color('#ff0000')
(255, 0, 0)
>>> parse_color('#f00')
(255, 0, 0)
>>> parse_color((255, 0, 0))
(255, 0, 0)
>>> from fabulous import grapefruit
>>> parse_color(... | python | def parse_color(color):
r"""Turns a color into an (r, g, b) tuple
>>> parse_color('white')
(255, 255, 255)
>>> parse_color('#ff0000')
(255, 0, 0)
>>> parse_color('#f00')
(255, 0, 0)
>>> parse_color((255, 0, 0))
(255, 0, 0)
>>> from fabulous import grapefruit
>>> parse_color(... | [
"def",
"parse_color",
"(",
"color",
")",
":",
"if",
"isinstance",
"(",
"color",
",",
"basestring",
")",
":",
"color",
"=",
"grapefruit",
".",
"Color",
".",
"NewFromHtml",
"(",
"color",
")",
"if",
"isinstance",
"(",
"color",
",",
"int",
")",
":",
"(",
... | r"""Turns a color into an (r, g, b) tuple
>>> parse_color('white')
(255, 255, 255)
>>> parse_color('#ff0000')
(255, 0, 0)
>>> parse_color('#f00')
(255, 0, 0)
>>> parse_color((255, 0, 0))
(255, 0, 0)
>>> from fabulous import grapefruit
>>> parse_color(grapefruit.Color((0.0, 1.0, ... | [
"r",
"Turns",
"a",
"color",
"into",
"an",
"(",
"r",
"g",
"b",
")",
"tuple"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/color.py#L840-L866 |
jart/fabulous | fabulous/color.py | complement | def complement(color):
r"""Calculates polar opposite of color
This isn't guaranteed to look good >_> (especially with brighter, higher
intensity colors.) This will be replaced with a formula that produces
better looking colors in the future.
>>> complement('red')
(0, 255, 76)
>>> complemen... | python | def complement(color):
r"""Calculates polar opposite of color
This isn't guaranteed to look good >_> (especially with brighter, higher
intensity colors.) This will be replaced with a formula that produces
better looking colors in the future.
>>> complement('red')
(0, 255, 76)
>>> complemen... | [
"def",
"complement",
"(",
"color",
")",
":",
"(",
"r",
",",
"g",
",",
"b",
")",
"=",
"parse_color",
"(",
"color",
")",
"gcolor",
"=",
"grapefruit",
".",
"Color",
"(",
"(",
"r",
"/",
"255.0",
",",
"g",
"/",
"255.0",
",",
"b",
"/",
"255.0",
")",
... | r"""Calculates polar opposite of color
This isn't guaranteed to look good >_> (especially with brighter, higher
intensity colors.) This will be replaced with a formula that produces
better looking colors in the future.
>>> complement('red')
(0, 255, 76)
>>> complement((0, 100, 175))
(175, ... | [
"r",
"Calculates",
"polar",
"opposite",
"of",
"color"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/color.py#L869-L886 |
jart/fabulous | fabulous/color.py | section | def section(title, bar=OVERLINE, strm=sys.stdout):
"""Helper function for testing demo routines
"""
width = utils.term.width
printy(bold(title.center(width)))
printy(bold((bar * width)[:width])) | python | def section(title, bar=OVERLINE, strm=sys.stdout):
"""Helper function for testing demo routines
"""
width = utils.term.width
printy(bold(title.center(width)))
printy(bold((bar * width)[:width])) | [
"def",
"section",
"(",
"title",
",",
"bar",
"=",
"OVERLINE",
",",
"strm",
"=",
"sys",
".",
"stdout",
")",
":",
"width",
"=",
"utils",
".",
"term",
".",
"width",
"printy",
"(",
"bold",
"(",
"title",
".",
"center",
"(",
"width",
")",
")",
")",
"pri... | Helper function for testing demo routines | [
"Helper",
"function",
"for",
"testing",
"demo",
"routines"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/color.py#L889-L894 |
taskcluster/taskcluster-client.py | taskcluster/awsprovisionerevents.py | AwsProvisionerEvents.workerTypeCreated | def workerTypeCreated(self, *args, **kwargs):
"""
WorkerType Created Message
When a new `workerType` is created a message will be published to this
exchange.
This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange take... | python | def workerTypeCreated(self, *args, **kwargs):
"""
WorkerType Created Message
When a new `workerType` is created a message will be published to this
exchange.
This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange take... | [
"def",
"workerTypeCreated",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"ref",
"=",
"{",
"'exchange'",
":",
"'worker-type-created'",
",",
"'name'",
":",
"'workerTypeCreated'",
",",
"'routingKey'",
":",
"[",
"{",
"'constant'",
":",
"'p... | WorkerType Created Message
When a new `workerType` is created a message will be published to this
exchange.
This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes the following keys:
* routingKeyKind: Identifier for t... | [
"WorkerType",
"Created",
"Message"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/awsprovisionerevents.py#L24-L60 |
taskcluster/taskcluster-client.py | taskcluster/awsprovisionerevents.py | AwsProvisionerEvents.workerTypeUpdated | def workerTypeUpdated(self, *args, **kwargs):
"""
WorkerType Updated Message
When a `workerType` is updated a message will be published to this
exchange.
This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes th... | python | def workerTypeUpdated(self, *args, **kwargs):
"""
WorkerType Updated Message
When a `workerType` is updated a message will be published to this
exchange.
This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes th... | [
"def",
"workerTypeUpdated",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"ref",
"=",
"{",
"'exchange'",
":",
"'worker-type-updated'",
",",
"'name'",
":",
"'workerTypeUpdated'",
",",
"'routingKey'",
":",
"[",
"{",
"'constant'",
":",
"'p... | WorkerType Updated Message
When a `workerType` is updated a message will be published to this
exchange.
This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes the following keys:
* routingKeyKind: Identifier for the r... | [
"WorkerType",
"Updated",
"Message"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/awsprovisionerevents.py#L62-L98 |
taskcluster/taskcluster-client.py | taskcluster/awsprovisionerevents.py | AwsProvisionerEvents.workerTypeRemoved | def workerTypeRemoved(self, *args, **kwargs):
"""
WorkerType Removed Message
When a `workerType` is removed a message will be published to this
exchange.
This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes th... | python | def workerTypeRemoved(self, *args, **kwargs):
"""
WorkerType Removed Message
When a `workerType` is removed a message will be published to this
exchange.
This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes th... | [
"def",
"workerTypeRemoved",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"ref",
"=",
"{",
"'exchange'",
":",
"'worker-type-removed'",
",",
"'name'",
":",
"'workerTypeRemoved'",
",",
"'routingKey'",
":",
"[",
"{",
"'constant'",
":",
"'p... | WorkerType Removed Message
When a `workerType` is removed a message will be published to this
exchange.
This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes the following keys:
* routingKeyKind: Identifier for the r... | [
"WorkerType",
"Removed",
"Message"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/awsprovisionerevents.py#L100-L136 |
taskcluster/taskcluster-client.py | taskcluster/treeherderevents.py | TreeherderEvents.jobs | def jobs(self, *args, **kwargs):
"""
Job Messages
When a task run is scheduled or resolved, a message is posted to
this exchange in a Treeherder consumable format.
This exchange outputs: ``v1/pulse-job.json#``This exchange takes the following keys:
* destination: dest... | python | def jobs(self, *args, **kwargs):
"""
Job Messages
When a task run is scheduled or resolved, a message is posted to
this exchange in a Treeherder consumable format.
This exchange outputs: ``v1/pulse-job.json#``This exchange takes the following keys:
* destination: dest... | [
"def",
"jobs",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"ref",
"=",
"{",
"'exchange'",
":",
"'jobs'",
",",
"'name'",
":",
"'jobs'",
",",
"'routingKey'",
":",
"[",
"{",
"'multipleWords'",
":",
"False",
",",
"'name'",
":",
"'... | Job Messages
When a task run is scheduled or resolved, a message is posted to
this exchange in a Treeherder consumable format.
This exchange outputs: ``v1/pulse-job.json#``This exchange takes the following keys:
* destination: destination (required)
* project: project (requ... | [
"Job",
"Messages"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/treeherderevents.py#L31-L66 |
taskcluster/taskcluster-client.py | taskcluster/client.py | createTemporaryCredentials | def createTemporaryCredentials(clientId, accessToken, start, expiry, scopes, name=None):
""" Create a set of temporary credentials
Callers should not apply any clock skew; clock drift is accounted for by
auth service.
clientId: the issuing clientId
accessToken: the issuer's accessToken
start: ... | python | def createTemporaryCredentials(clientId, accessToken, start, expiry, scopes, name=None):
""" Create a set of temporary credentials
Callers should not apply any clock skew; clock drift is accounted for by
auth service.
clientId: the issuing clientId
accessToken: the issuer's accessToken
start: ... | [
"def",
"createTemporaryCredentials",
"(",
"clientId",
",",
"accessToken",
",",
"start",
",",
"expiry",
",",
"scopes",
",",
"name",
"=",
"None",
")",
":",
"for",
"scope",
"in",
"scopes",
":",
"if",
"not",
"isinstance",
"(",
"scope",
",",
"six",
".",
"stri... | Create a set of temporary credentials
Callers should not apply any clock skew; clock drift is accounted for by
auth service.
clientId: the issuing clientId
accessToken: the issuer's accessToken
start: start time of credentials (datetime.datetime)
expiry: expiration time of credentials, (dateti... | [
"Create",
"a",
"set",
"of",
"temporary",
"credentials"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/client.py#L636-L704 |
taskcluster/taskcluster-client.py | taskcluster/client.py | BaseClient.makeHawkExt | def makeHawkExt(self):
""" Make an 'ext' for Hawk authentication """
o = self.options
c = o.get('credentials', {})
if c.get('clientId') and c.get('accessToken'):
ext = {}
cert = c.get('certificate')
if cert:
if six.PY3 and isinstance(ce... | python | def makeHawkExt(self):
""" Make an 'ext' for Hawk authentication """
o = self.options
c = o.get('credentials', {})
if c.get('clientId') and c.get('accessToken'):
ext = {}
cert = c.get('certificate')
if cert:
if six.PY3 and isinstance(ce... | [
"def",
"makeHawkExt",
"(",
"self",
")",
":",
"o",
"=",
"self",
".",
"options",
"c",
"=",
"o",
".",
"get",
"(",
"'credentials'",
",",
"{",
"}",
")",
"if",
"c",
".",
"get",
"(",
"'clientId'",
")",
"and",
"c",
".",
"get",
"(",
"'accessToken'",
")",
... | Make an 'ext' for Hawk authentication | [
"Make",
"an",
"ext",
"for",
"Hawk",
"authentication"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/client.py#L93-L114 |
taskcluster/taskcluster-client.py | taskcluster/client.py | BaseClient.buildSignedUrl | def buildSignedUrl(self, methodName, *args, **kwargs):
""" Build a signed URL. This URL contains the credentials needed to access
a resource."""
if 'expiration' in kwargs:
expiration = kwargs['expiration']
del kwargs['expiration']
else:
expiration = ... | python | def buildSignedUrl(self, methodName, *args, **kwargs):
""" Build a signed URL. This URL contains the credentials needed to access
a resource."""
if 'expiration' in kwargs:
expiration = kwargs['expiration']
del kwargs['expiration']
else:
expiration = ... | [
"def",
"buildSignedUrl",
"(",
"self",
",",
"methodName",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"'expiration'",
"in",
"kwargs",
":",
"expiration",
"=",
"kwargs",
"[",
"'expiration'",
"]",
"del",
"kwargs",
"[",
"'expiration'",
"]",
"el... | Build a signed URL. This URL contains the credentials needed to access
a resource. | [
"Build",
"a",
"signed",
"URL",
".",
"This",
"URL",
"contains",
"the",
"credentials",
"needed",
"to",
"access",
"a",
"resource",
"."
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/client.py#L179-L244 |
taskcluster/taskcluster-client.py | taskcluster/client.py | BaseClient._constructUrl | def _constructUrl(self, route):
"""Construct a URL for the given route on this service, based on the
rootUrl"""
return liburls.api(
self.options['rootUrl'],
self.serviceName,
self.apiVersion,
route.rstrip('/')) | python | def _constructUrl(self, route):
"""Construct a URL for the given route on this service, based on the
rootUrl"""
return liburls.api(
self.options['rootUrl'],
self.serviceName,
self.apiVersion,
route.rstrip('/')) | [
"def",
"_constructUrl",
"(",
"self",
",",
"route",
")",
":",
"return",
"liburls",
".",
"api",
"(",
"self",
".",
"options",
"[",
"'rootUrl'",
"]",
",",
"self",
".",
"serviceName",
",",
"self",
".",
"apiVersion",
",",
"route",
".",
"rstrip",
"(",
"'/'",
... | Construct a URL for the given route on this service, based on the
rootUrl | [
"Construct",
"a",
"URL",
"for",
"the",
"given",
"route",
"on",
"this",
"service",
"based",
"on",
"the",
"rootUrl"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/client.py#L246-L253 |
taskcluster/taskcluster-client.py | taskcluster/client.py | BaseClient._makeApiCall | def _makeApiCall(self, entry, *args, **kwargs):
""" This function is used to dispatch calls to other functions
for a given API Reference entry"""
x = self._processArgs(entry, *args, **kwargs)
routeParams, payload, query, paginationHandler, paginationLimit = x
route = self._subAr... | python | def _makeApiCall(self, entry, *args, **kwargs):
""" This function is used to dispatch calls to other functions
for a given API Reference entry"""
x = self._processArgs(entry, *args, **kwargs)
routeParams, payload, query, paginationHandler, paginationLimit = x
route = self._subAr... | [
"def",
"_makeApiCall",
"(",
"self",
",",
"entry",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"x",
"=",
"self",
".",
"_processArgs",
"(",
"entry",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"routeParams",
",",
"payload",
",",
"query",... | This function is used to dispatch calls to other functions
for a given API Reference entry | [
"This",
"function",
"is",
"used",
"to",
"dispatch",
"calls",
"to",
"other",
"functions",
"for",
"a",
"given",
"API",
"Reference",
"entry"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/client.py#L255-L281 |
taskcluster/taskcluster-client.py | taskcluster/client.py | BaseClient._processArgs | def _processArgs(self, entry, *_args, **_kwargs):
""" Given an entry, positional and keyword arguments, figure out what
the query-string options, payload and api arguments are.
"""
# We need the args to be a list so we can mutate them
args = list(_args)
kwargs = copy.dee... | python | def _processArgs(self, entry, *_args, **_kwargs):
""" Given an entry, positional and keyword arguments, figure out what
the query-string options, payload and api arguments are.
"""
# We need the args to be a list so we can mutate them
args = list(_args)
kwargs = copy.dee... | [
"def",
"_processArgs",
"(",
"self",
",",
"entry",
",",
"*",
"_args",
",",
"*",
"*",
"_kwargs",
")",
":",
"# We need the args to be a list so we can mutate them",
"args",
"=",
"list",
"(",
"_args",
")",
"kwargs",
"=",
"copy",
".",
"deepcopy",
"(",
"_kwargs",
... | Given an entry, positional and keyword arguments, figure out what
the query-string options, payload and api arguments are. | [
"Given",
"an",
"entry",
"positional",
"and",
"keyword",
"arguments",
"figure",
"out",
"what",
"the",
"query",
"-",
"string",
"options",
"payload",
"and",
"api",
"arguments",
"are",
"."
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/client.py#L283-L414 |
taskcluster/taskcluster-client.py | taskcluster/client.py | BaseClient._subArgsInRoute | def _subArgsInRoute(self, entry, args):
""" Given a route like "/task/<taskId>/artifacts" and a mapping like
{"taskId": "12345"}, return a string like "/task/12345/artifacts"
"""
route = entry['route']
for arg, val in six.iteritems(args):
toReplace = "<%s>" % arg
... | python | def _subArgsInRoute(self, entry, args):
""" Given a route like "/task/<taskId>/artifacts" and a mapping like
{"taskId": "12345"}, return a string like "/task/12345/artifacts"
"""
route = entry['route']
for arg, val in six.iteritems(args):
toReplace = "<%s>" % arg
... | [
"def",
"_subArgsInRoute",
"(",
"self",
",",
"entry",
",",
"args",
")",
":",
"route",
"=",
"entry",
"[",
"'route'",
"]",
"for",
"arg",
",",
"val",
"in",
"six",
".",
"iteritems",
"(",
"args",
")",
":",
"toReplace",
"=",
"\"<%s>\"",
"%",
"arg",
"if",
... | Given a route like "/task/<taskId>/artifacts" and a mapping like
{"taskId": "12345"}, return a string like "/task/12345/artifacts" | [
"Given",
"a",
"route",
"like",
"/",
"task",
"/",
"<taskId",
">",
"/",
"artifacts",
"and",
"a",
"mapping",
"like",
"{",
"taskId",
":",
"12345",
"}",
"return",
"a",
"string",
"like",
"/",
"task",
"/",
"12345",
"/",
"artifacts"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/client.py#L416-L431 |
taskcluster/taskcluster-client.py | taskcluster/client.py | BaseClient._hasCredentials | def _hasCredentials(self):
""" Return True, if credentials is given """
cred = self.options.get('credentials')
return (
cred and
'clientId' in cred and
'accessToken' in cred and
cred['clientId'] and
cred['accessToken']
) | python | def _hasCredentials(self):
""" Return True, if credentials is given """
cred = self.options.get('credentials')
return (
cred and
'clientId' in cred and
'accessToken' in cred and
cred['clientId'] and
cred['accessToken']
) | [
"def",
"_hasCredentials",
"(",
"self",
")",
":",
"cred",
"=",
"self",
".",
"options",
".",
"get",
"(",
"'credentials'",
")",
"return",
"(",
"cred",
"and",
"'clientId'",
"in",
"cred",
"and",
"'accessToken'",
"in",
"cred",
"and",
"cred",
"[",
"'clientId'",
... | Return True, if credentials is given | [
"Return",
"True",
"if",
"credentials",
"is",
"given"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/client.py#L433-L442 |
taskcluster/taskcluster-client.py | taskcluster/client.py | BaseClient._makeHttpRequest | def _makeHttpRequest(self, method, route, payload):
""" Make an HTTP Request for the API endpoint. This method wraps
the logic about doing failure retry and passes off the actual work
of doing an HTTP request to another method."""
url = self._constructUrl(route)
log.debug('Full... | python | def _makeHttpRequest(self, method, route, payload):
""" Make an HTTP Request for the API endpoint. This method wraps
the logic about doing failure retry and passes off the actual work
of doing an HTTP request to another method."""
url = self._constructUrl(route)
log.debug('Full... | [
"def",
"_makeHttpRequest",
"(",
"self",
",",
"method",
",",
"route",
",",
"payload",
")",
":",
"url",
"=",
"self",
".",
"_constructUrl",
"(",
"route",
")",
"log",
".",
"debug",
"(",
"'Full URL used is: %s'",
",",
"url",
")",
"hawkExt",
"=",
"self",
".",
... | Make an HTTP Request for the API endpoint. This method wraps
the logic about doing failure retry and passes off the actual work
of doing an HTTP request to another method. | [
"Make",
"an",
"HTTP",
"Request",
"for",
"the",
"API",
"endpoint",
".",
"This",
"method",
"wraps",
"the",
"logic",
"about",
"doing",
"failure",
"retry",
"and",
"passes",
"off",
"the",
"actual",
"work",
"of",
"doing",
"an",
"HTTP",
"request",
"to",
"another"... | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/client.py#L444-L553 |
taskcluster/taskcluster-client.py | taskcluster/aio/asyncclient.py | AsyncBaseClient._makeHttpRequest | async def _makeHttpRequest(self, method, route, payload):
""" Make an HTTP Request for the API endpoint. This method wraps
the logic about doing failure retry and passes off the actual work
of doing an HTTP request to another method."""
url = self._constructUrl(route)
log.debug... | python | async def _makeHttpRequest(self, method, route, payload):
""" Make an HTTP Request for the API endpoint. This method wraps
the logic about doing failure retry and passes off the actual work
of doing an HTTP request to another method."""
url = self._constructUrl(route)
log.debug... | [
"async",
"def",
"_makeHttpRequest",
"(",
"self",
",",
"method",
",",
"route",
",",
"payload",
")",
":",
"url",
"=",
"self",
".",
"_constructUrl",
"(",
"route",
")",
"log",
".",
"debug",
"(",
"'Full URL used is: %s'",
",",
"url",
")",
"hawkExt",
"=",
"sel... | Make an HTTP Request for the API endpoint. This method wraps
the logic about doing failure retry and passes off the actual work
of doing an HTTP request to another method. | [
"Make",
"an",
"HTTP",
"Request",
"for",
"the",
"API",
"endpoint",
".",
"This",
"method",
"wraps",
"the",
"logic",
"about",
"doing",
"failure",
"retry",
"and",
"passes",
"off",
"the",
"actual",
"work",
"of",
"doing",
"an",
"HTTP",
"request",
"to",
"another"... | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/asyncclient.py#L107-L223 |
taskcluster/taskcluster-client.py | taskcluster/awsprovisioner.py | AwsProvisioner.listWorkerTypeSummaries | def listWorkerTypeSummaries(self, *args, **kwargs):
"""
List worker types with details
Return a list of worker types, including some summary information about
current capacity for each. While this list includes all defined worker types,
there may be running EC2 instances for de... | python | def listWorkerTypeSummaries(self, *args, **kwargs):
"""
List worker types with details
Return a list of worker types, including some summary information about
current capacity for each. While this list includes all defined worker types,
there may be running EC2 instances for de... | [
"def",
"listWorkerTypeSummaries",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"listWorkerTypeSummaries\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
"... | List worker types with details
Return a list of worker types, including some summary information about
current capacity for each. While this list includes all defined worker types,
there may be running EC2 instances for deleted worker types that are not
included here. The list is unor... | [
"List",
"worker",
"types",
"with",
"details"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/awsprovisioner.py#L51-L65 |
taskcluster/taskcluster-client.py | taskcluster/awsprovisioner.py | AwsProvisioner.workerTypeLastModified | def workerTypeLastModified(self, *args, **kwargs):
"""
Get Worker Type Last Modified Time
This method is provided to allow workers to see when they were
last modified. The value provided through UserData can be
compared against this value to see if changes have been made
... | python | def workerTypeLastModified(self, *args, **kwargs):
"""
Get Worker Type Last Modified Time
This method is provided to allow workers to see when they were
last modified. The value provided through UserData can be
compared against this value to see if changes have been made
... | [
"def",
"workerTypeLastModified",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"workerTypeLastModified\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"... | Get Worker Type Last Modified Time
This method is provided to allow workers to see when they were
last modified. The value provided through UserData can be
compared against this value to see if changes have been made
If the worker type definition has not been changed, the date
... | [
"Get",
"Worker",
"Type",
"Last",
"Modified",
"Time"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/awsprovisioner.py#L129-L144 |
taskcluster/taskcluster-client.py | taskcluster/awsprovisioner.py | AwsProvisioner.removeWorkerType | def removeWorkerType(self, *args, **kwargs):
"""
Delete Worker Type
Delete a worker type definition. This method will only delete
the worker type definition from the storage table. The actual
deletion will be handled by a background worker. As soon as this
method is c... | python | def removeWorkerType(self, *args, **kwargs):
"""
Delete Worker Type
Delete a worker type definition. This method will only delete
the worker type definition from the storage table. The actual
deletion will be handled by a background worker. As soon as this
method is c... | [
"def",
"removeWorkerType",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"removeWorkerType\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Delete Worker Type
Delete a worker type definition. This method will only delete
the worker type definition from the storage table. The actual
deletion will be handled by a background worker. As soon as this
method is called for a worker type, the background worker will
immed... | [
"Delete",
"Worker",
"Type"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/awsprovisioner.py#L163-L181 |
taskcluster/taskcluster-client.py | taskcluster/awsprovisioner.py | AwsProvisioner.getSecret | def getSecret(self, *args, **kwargs):
"""
Get a Secret
Retrieve a secret from storage. The result contains any passwords or
other restricted information verbatim as well as a temporary credential
based on the scopes specified when the secret was created.
It is importan... | python | def getSecret(self, *args, **kwargs):
"""
Get a Secret
Retrieve a secret from storage. The result contains any passwords or
other restricted information verbatim as well as a temporary credential
based on the scopes specified when the secret was created.
It is importan... | [
"def",
"getSecret",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"getSecret\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get a Secret
Retrieve a secret from storage. The result contains any passwords or
other restricted information verbatim as well as a temporary credential
based on the scopes specified when the secret was created.
It is important that this secret is deleted by the consumer (`removeSecr... | [
"Get",
"a",
"Secret"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/awsprovisioner.py#L217-L234 |
taskcluster/taskcluster-client.py | taskcluster/awsprovisioner.py | AwsProvisioner.instanceStarted | def instanceStarted(self, *args, **kwargs):
"""
Report an instance starting
An instance will report in by giving its instance id as well
as its security token. The token is given and checked to ensure
that it matches a real token that exists to ensure that random
machin... | python | def instanceStarted(self, *args, **kwargs):
"""
Report an instance starting
An instance will report in by giving its instance id as well
as its security token. The token is given and checked to ensure
that it matches a real token that exists to ensure that random
machin... | [
"def",
"instanceStarted",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"instanceStarted\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Report an instance starting
An instance will report in by giving its instance id as well
as its security token. The token is given and checked to ensure
that it matches a real token that exists to ensure that random
machines do not check in. We could generate a different token
... | [
"Report",
"an",
"instance",
"starting"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/awsprovisioner.py#L236-L249 |
taskcluster/taskcluster-client.py | taskcluster/awsprovisioner.py | AwsProvisioner.state | def state(self, *args, **kwargs):
"""
Get AWS State for a worker type
Return the state of a given workertype as stored by the provisioner.
This state is stored as three lists: 1 for running instances, 1 for
pending requests. The `summary` property contains an updated summary
... | python | def state(self, *args, **kwargs):
"""
Get AWS State for a worker type
Return the state of a given workertype as stored by the provisioner.
This state is stored as three lists: 1 for running instances, 1 for
pending requests. The `summary` property contains an updated summary
... | [
"def",
"state",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"state\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get AWS State for a worker type
Return the state of a given workertype as stored by the provisioner.
This state is stored as three lists: 1 for running instances, 1 for
pending requests. The `summary` property contains an updated summary
similar to that returned from `listWorkerTypeSum... | [
"Get",
"AWS",
"State",
"for",
"a",
"worker",
"type"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/awsprovisioner.py#L284-L296 |
taskcluster/taskcluster-client.py | taskcluster/awsprovisioner.py | AwsProvisioner.backendStatus | def backendStatus(self, *args, **kwargs):
"""
Backend Status
This endpoint is used to show when the last time the provisioner
has checked in. A check in is done through the deadman's snitch
api. It is done at the conclusion of a provisioning iteration
and used to tell ... | python | def backendStatus(self, *args, **kwargs):
"""
Backend Status
This endpoint is used to show when the last time the provisioner
has checked in. A check in is done through the deadman's snitch
api. It is done at the conclusion of a provisioning iteration
and used to tell ... | [
"def",
"backendStatus",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"backendStatus\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Backend Status
This endpoint is used to show when the last time the provisioner
has checked in. A check in is done through the deadman's snitch
api. It is done at the conclusion of a provisioning iteration
and used to tell if the background provisioning process is still
runnin... | [
"Backend",
"Status"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/awsprovisioner.py#L298-L315 |
taskcluster/taskcluster-client.py | taskcluster/aio/secrets.py | Secrets.set | async def set(self, *args, **kwargs):
"""
Set Secret
Set the secret associated with some key. If the secret already exists, it is
updated instead.
This method takes input: ``v1/secret.json#``
This method is ``stable``
"""
return await self._makeApiCal... | python | async def set(self, *args, **kwargs):
"""
Set Secret
Set the secret associated with some key. If the secret already exists, it is
updated instead.
This method takes input: ``v1/secret.json#``
This method is ``stable``
"""
return await self._makeApiCal... | [
"async",
"def",
"set",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"await",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"set\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Set Secret
Set the secret associated with some key. If the secret already exists, it is
updated instead.
This method takes input: ``v1/secret.json#``
This method is ``stable`` | [
"Set",
"Secret"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/secrets.py#L42-L54 |
taskcluster/taskcluster-client.py | taskcluster/aio/secrets.py | Secrets.remove | async def remove(self, *args, **kwargs):
"""
Delete Secret
Delete the secret associated with some key.
This method is ``stable``
"""
return await self._makeApiCall(self.funcinfo["remove"], *args, **kwargs) | python | async def remove(self, *args, **kwargs):
"""
Delete Secret
Delete the secret associated with some key.
This method is ``stable``
"""
return await self._makeApiCall(self.funcinfo["remove"], *args, **kwargs) | [
"async",
"def",
"remove",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"await",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"remove\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Delete Secret
Delete the secret associated with some key.
This method is ``stable`` | [
"Delete",
"Secret"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/secrets.py#L56-L65 |
taskcluster/taskcluster-client.py | taskcluster/aio/secrets.py | Secrets.get | async def get(self, *args, **kwargs):
"""
Read Secret
Read the secret associated with some key. If the secret has recently
expired, the response code 410 is returned. If the caller lacks the
scope necessary to get the secret, the call will fail with a 403 code
regardle... | python | async def get(self, *args, **kwargs):
"""
Read Secret
Read the secret associated with some key. If the secret has recently
expired, the response code 410 is returned. If the caller lacks the
scope necessary to get the secret, the call will fail with a 403 code
regardle... | [
"async",
"def",
"get",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"await",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"get\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Read Secret
Read the secret associated with some key. If the secret has recently
expired, the response code 410 is returned. If the caller lacks the
scope necessary to get the secret, the call will fail with a 403 code
regardless of whether the secret exists.
This method give... | [
"Read",
"Secret"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/aio/secrets.py#L67-L81 |
jart/fabulous | fabulous/prompt.py | input_object | def input_object(prompt_text, cast = None, default = None,
prompt_ext = ': ', castarg = [], castkwarg = {}):
"""Gets input from the command line and validates it.
prompt_text
A string. Used to prompt the user. Do not include a trailing
space.
prompt_ext
... | python | def input_object(prompt_text, cast = None, default = None,
prompt_ext = ': ', castarg = [], castkwarg = {}):
"""Gets input from the command line and validates it.
prompt_text
A string. Used to prompt the user. Do not include a trailing
space.
prompt_ext
... | [
"def",
"input_object",
"(",
"prompt_text",
",",
"cast",
"=",
"None",
",",
"default",
"=",
"None",
",",
"prompt_ext",
"=",
"': '",
",",
"castarg",
"=",
"[",
"]",
",",
"castkwarg",
"=",
"{",
"}",
")",
":",
"while",
"True",
":",
"stdout",
".",
"write",
... | Gets input from the command line and validates it.
prompt_text
A string. Used to prompt the user. Do not include a trailing
space.
prompt_ext
Added on to the prompt at the end. At the moment this must not
include any control stuff because it is send directly to
... | [
"Gets",
"input",
"from",
"the",
"command",
"line",
"and",
"validates",
"it",
".",
"prompt_text",
"A",
"string",
".",
"Used",
"to",
"prompt",
"the",
"user",
".",
"Do",
"not",
"include",
"a",
"trailing",
"space",
".",
"prompt_ext",
"Added",
"on",
"to",
"th... | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/prompt.py#L38-L82 |
jart/fabulous | fabulous/prompt.py | query | def query(question, values, default=None, list_values = False, ignorecase = True ):
"""Preset a few options
The question argument is a string, nothing magical.
The values argument accepts input in two different forms. The simpler form
(a tuple with strings) looks like:
.. code-blo... | python | def query(question, values, default=None, list_values = False, ignorecase = True ):
"""Preset a few options
The question argument is a string, nothing magical.
The values argument accepts input in two different forms. The simpler form
(a tuple with strings) looks like:
.. code-blo... | [
"def",
"query",
"(",
"question",
",",
"values",
",",
"default",
"=",
"None",
",",
"list_values",
"=",
"False",
",",
"ignorecase",
"=",
"True",
")",
":",
"values",
"=",
"list",
"(",
"values",
")",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"values",
... | Preset a few options
The question argument is a string, nothing magical.
The values argument accepts input in two different forms. The simpler form
(a tuple with strings) looks like:
.. code-block:: python
('Male','Female')
And it will pop up a question a... | [
"Preset",
"a",
"few",
"options",
"The",
"question",
"argument",
"is",
"a",
"string",
"nothing",
"magical",
".",
"The",
"values",
"argument",
"accepts",
"input",
"in",
"two",
"different",
"forms",
".",
"The",
"simpler",
"form",
"(",
"a",
"tuple",
"with",
"s... | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/prompt.py#L84-L151 |
jart/fabulous | fabulous/prompt.py | query_cast | def query_cast(value, answers, ignorecase = False):
"""A cast function for query
Answers should look something like it does in query
"""
if ignorecase: value = value.lower()
for item in answers:
for a in item['values']:
if ignorecase and (value == str(a).lower()):
... | python | def query_cast(value, answers, ignorecase = False):
"""A cast function for query
Answers should look something like it does in query
"""
if ignorecase: value = value.lower()
for item in answers:
for a in item['values']:
if ignorecase and (value == str(a).lower()):
... | [
"def",
"query_cast",
"(",
"value",
",",
"answers",
",",
"ignorecase",
"=",
"False",
")",
":",
"if",
"ignorecase",
":",
"value",
"=",
"value",
".",
"lower",
"(",
")",
"for",
"item",
"in",
"answers",
":",
"for",
"a",
"in",
"item",
"[",
"'values'",
"]",... | A cast function for query
Answers should look something like it does in query | [
"A",
"cast",
"function",
"for",
"query",
"Answers",
"should",
"look",
"something",
"like",
"it",
"does",
"in",
"query"
] | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/prompt.py#L153-L165 |
jart/fabulous | fabulous/prompt.py | file_chooser | def file_chooser(prompt_text = "Enter File: ", default=None, filearg=[], filekwarg={}):
"""A simple tool to get a file from the user. Takes keyworded arguemnts
and passes them to open().
If the user enters nothing the function will return the ``default`` value.
Otherwise it continues to prompt the ... | python | def file_chooser(prompt_text = "Enter File: ", default=None, filearg=[], filekwarg={}):
"""A simple tool to get a file from the user. Takes keyworded arguemnts
and passes them to open().
If the user enters nothing the function will return the ``default`` value.
Otherwise it continues to prompt the ... | [
"def",
"file_chooser",
"(",
"prompt_text",
"=",
"\"Enter File: \"",
",",
"default",
"=",
"None",
",",
"filearg",
"=",
"[",
"]",
",",
"filekwarg",
"=",
"{",
"}",
")",
":",
"try",
":",
"import",
"readline",
",",
"rlcomplete",
"completer",
"=",
"rlcomplete",
... | A simple tool to get a file from the user. Takes keyworded arguemnts
and passes them to open().
If the user enters nothing the function will return the ``default`` value.
Otherwise it continues to prompt the user until it get's a decent response.
filekwarg may contain arguements passed on to `... | [
"A",
"simple",
"tool",
"to",
"get",
"a",
"file",
"from",
"the",
"user",
".",
"Takes",
"keyworded",
"arguemnts",
"and",
"passes",
"them",
"to",
"open",
"()",
".",
"If",
"the",
"user",
"enters",
"nothing",
"the",
"function",
"will",
"return",
"the",
"defau... | train | https://github.com/jart/fabulous/blob/19903cf0a980b82f5928c3bec1f28b6bdd3785bd/fabulous/prompt.py#L167-L193 |
taskcluster/taskcluster-client.py | taskcluster/hooks.py | Hooks.getHookStatus | def getHookStatus(self, *args, **kwargs):
"""
Get hook status
This endpoint will return the current status of the hook. This represents a
snapshot in time and may vary from one call to the next.
This method is deprecated in favor of listLastFires.
This method gives ou... | python | def getHookStatus(self, *args, **kwargs):
"""
Get hook status
This endpoint will return the current status of the hook. This represents a
snapshot in time and may vary from one call to the next.
This method is deprecated in favor of listLastFires.
This method gives ou... | [
"def",
"getHookStatus",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"getHookStatus\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get hook status
This endpoint will return the current status of the hook. This represents a
snapshot in time and may vary from one call to the next.
This method is deprecated in favor of listLastFires.
This method gives output: ``v1/hook-status.json#``
This method is ``depre... | [
"Get",
"hook",
"status"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/hooks.py#L95-L109 |
taskcluster/taskcluster-client.py | taskcluster/hooks.py | Hooks.createHook | def createHook(self, *args, **kwargs):
"""
Create a hook
This endpoint will create a new hook.
The caller's credentials must include the role that will be used to
create the task. That role must satisfy task.scopes as well as the
necessary scopes to add the task to the... | python | def createHook(self, *args, **kwargs):
"""
Create a hook
This endpoint will create a new hook.
The caller's credentials must include the role that will be used to
create the task. That role must satisfy task.scopes as well as the
necessary scopes to add the task to the... | [
"def",
"createHook",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"createHook\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Create a hook
This endpoint will create a new hook.
The caller's credentials must include the role that will be used to
create the task. That role must satisfy task.scopes as well as the
necessary scopes to add the task to the queue.
This method takes input: ``v1/create-hook-... | [
"Create",
"a",
"hook"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/hooks.py#L111-L128 |
taskcluster/taskcluster-client.py | taskcluster/hooks.py | Hooks.listLastFires | def listLastFires(self, *args, **kwargs):
"""
Get information about recent hook fires
This endpoint will return information about the the last few times this hook has been
fired, including whether the hook was fired successfully or not
This method gives output: ``v1/list-lastFi... | python | def listLastFires(self, *args, **kwargs):
"""
Get information about recent hook fires
This endpoint will return information about the the last few times this hook has been
fired, including whether the hook was fired successfully or not
This method gives output: ``v1/list-lastFi... | [
"def",
"listLastFires",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_makeApiCall",
"(",
"self",
".",
"funcinfo",
"[",
"\"listLastFires\"",
"]",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Get information about recent hook fires
This endpoint will return information about the the last few times this hook has been
fired, including whether the hook was fired successfully or not
This method gives output: ``v1/list-lastFires-response.json#``
This method is ``experimental`` | [
"Get",
"information",
"about",
"recent",
"hook",
"fires"
] | train | https://github.com/taskcluster/taskcluster-client.py/blob/bcc95217f8bf80bed2ae5885a19fa0035da7ebc9/taskcluster/hooks.py#L223-L235 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.