partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
train | Repository.create_commit | Create a commit on this repository.
:param str message: (required), commit message
:param str tree: (required), SHA of the tree object this
commit points to
:param list parents: (required), SHAs of the commits that were parents
of this commit. If empty, the commit will b... | aegea/packages/github3/repos/repo.py | def create_commit(self, message, tree, parents, author={}, committer={}):
"""Create a commit on this repository.
:param str message: (required), commit message
:param str tree: (required), SHA of the tree object this
commit points to
:param list parents: (required), SHAs of ... | def create_commit(self, message, tree, parents, author={}, committer={}):
"""Create a commit on this repository.
:param str message: (required), commit message
:param str tree: (required), SHA of the tree object this
commit points to
:param list parents: (required), SHAs of ... | [
"Create",
"a",
"commit",
"on",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L483-L509 | [
"def",
"create_commit",
"(",
"self",
",",
"message",
",",
"tree",
",",
"parents",
",",
"author",
"=",
"{",
"}",
",",
"committer",
"=",
"{",
"}",
")",
":",
"json",
"=",
"None",
"if",
"message",
"and",
"tree",
"and",
"isinstance",
"(",
"parents",
",",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_deployment | Create a deployment.
:param str ref: (required), The ref to deploy. This can be a branch,
tag, or sha.
:param bool force: Optional parameter to bypass any ahead/behind
checks or commit status checks. Default: False
:param str payload: Optional JSON payload with extra inf... | aegea/packages/github3/repos/repo.py | def create_deployment(self, ref, force=False, payload='',
auto_merge=False, description='', environment=None):
"""Create a deployment.
:param str ref: (required), The ref to deploy. This can be a branch,
tag, or sha.
:param bool force: Optional parameter to... | def create_deployment(self, ref, force=False, payload='',
auto_merge=False, description='', environment=None):
"""Create a deployment.
:param str ref: (required), The ref to deploy. This can be a branch,
tag, or sha.
:param bool force: Optional parameter to... | [
"Create",
"a",
"deployment",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L512-L539 | [
"def",
"create_deployment",
"(",
"self",
",",
"ref",
",",
"force",
"=",
"False",
",",
"payload",
"=",
"''",
",",
"auto_merge",
"=",
"False",
",",
"description",
"=",
"''",
",",
"environment",
"=",
"None",
")",
":",
"json",
"=",
"None",
"if",
"ref",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_file | Create a file in this repository.
See also: http://developer.github.com/v3/repos/contents/#create-a-file
:param str path: (required), path of the file in the repository
:param str message: (required), commit message
:param bytes content: (required), the actual data in the file
... | aegea/packages/github3/repos/repo.py | def create_file(self, path, message, content, branch=None,
committer=None, author=None):
"""Create a file in this repository.
See also: http://developer.github.com/v3/repos/contents/#create-a-file
:param str path: (required), path of the file in the repository
:para... | def create_file(self, path, message, content, branch=None,
committer=None, author=None):
"""Create a file in this repository.
See also: http://developer.github.com/v3/repos/contents/#create-a-file
:param str path: (required), path of the file in the repository
:para... | [
"Create",
"a",
"file",
"in",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L542-L580 | [
"def",
"create_file",
"(",
"self",
",",
"path",
",",
"message",
",",
"content",
",",
"branch",
"=",
"None",
",",
"committer",
"=",
"None",
",",
"author",
"=",
"None",
")",
":",
"if",
"content",
"and",
"not",
"isinstance",
"(",
"content",
",",
"bytes",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_fork | Create a fork of this repository.
:param str organization: (required), login for organization to create
the fork under
:returns: :class:`Repository <Repository>` if successful, else None | aegea/packages/github3/repos/repo.py | def create_fork(self, organization=None):
"""Create a fork of this repository.
:param str organization: (required), login for organization to create
the fork under
:returns: :class:`Repository <Repository>` if successful, else None
"""
url = self._build_url('forks', ... | def create_fork(self, organization=None):
"""Create a fork of this repository.
:param str organization: (required), login for organization to create
the fork under
:returns: :class:`Repository <Repository>` if successful, else None
"""
url = self._build_url('forks', ... | [
"Create",
"a",
"fork",
"of",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L583-L597 | [
"def",
"create_fork",
"(",
"self",
",",
"organization",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'forks'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"if",
"organization",
":",
"resp",
"=",
"self",
".",
"_post",
"(",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_hook | Create a hook on this repository.
:param str name: (required), name of the hook
:param dict config: (required), key-value pairs which act as settings
for this hook
:param list events: (optional), events the hook is triggered for
:param bool active: (optional), whether the ho... | aegea/packages/github3/repos/repo.py | def create_hook(self, name, config, events=['push'], active=True):
"""Create a hook on this repository.
:param str name: (required), name of the hook
:param dict config: (required), key-value pairs which act as settings
for this hook
:param list events: (optional), events th... | def create_hook(self, name, config, events=['push'], active=True):
"""Create a hook on this repository.
:param str name: (required), name of the hook
:param dict config: (required), key-value pairs which act as settings
for this hook
:param list events: (optional), events th... | [
"Create",
"a",
"hook",
"on",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L600-L618 | [
"def",
"create_hook",
"(",
"self",
",",
"name",
",",
"config",
",",
"events",
"=",
"[",
"'push'",
"]",
",",
"active",
"=",
"True",
")",
":",
"json",
"=",
"None",
"if",
"name",
"and",
"config",
"and",
"isinstance",
"(",
"config",
",",
"dict",
")",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_issue | Creates an issue on this repository.
:param str title: (required), title of the issue
:param str body: (optional), body of the issue
:param str assignee: (optional), login of the user to assign the
issue to
:param int milestone: (optional), id number of the milestone to
... | aegea/packages/github3/repos/repo.py | def create_issue(self,
title,
body=None,
assignee=None,
milestone=None,
labels=None):
"""Creates an issue on this repository.
:param str title: (required), title of the issue
:param str body... | def create_issue(self,
title,
body=None,
assignee=None,
milestone=None,
labels=None):
"""Creates an issue on this repository.
:param str title: (required), title of the issue
:param str body... | [
"Creates",
"an",
"issue",
"on",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L621-L652 | [
"def",
"create_issue",
"(",
"self",
",",
"title",
",",
"body",
"=",
"None",
",",
"assignee",
"=",
"None",
",",
"milestone",
"=",
"None",
",",
"labels",
"=",
"None",
")",
":",
"issue",
"=",
"{",
"'title'",
":",
"title",
",",
"'body'",
":",
"body",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_key | Create a deploy key.
:param str title: (required), title of key
:param str key: (required), key text
:returns: :class:`Key <github3.users.Key>` if successful, else None | aegea/packages/github3/repos/repo.py | def create_key(self, title, key):
"""Create a deploy key.
:param str title: (required), title of key
:param str key: (required), key text
:returns: :class:`Key <github3.users.Key>` if successful, else None
"""
json = None
if title and key:
data = {'ti... | def create_key(self, title, key):
"""Create a deploy key.
:param str title: (required), title of key
:param str key: (required), key text
:returns: :class:`Key <github3.users.Key>` if successful, else None
"""
json = None
if title and key:
data = {'ti... | [
"Create",
"a",
"deploy",
"key",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L655-L667 | [
"def",
"create_key",
"(",
"self",
",",
"title",
",",
"key",
")",
":",
"json",
"=",
"None",
"if",
"title",
"and",
"key",
":",
"data",
"=",
"{",
"'title'",
":",
"title",
",",
"'key'",
":",
"key",
"}",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'k... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_label | Create a label for this repository.
:param str name: (required), name to give to the label
:param str color: (required), value of the color to assign to the
label, e.g., '#fafafa' or 'fafafa' (the latter is what is sent)
:returns: :class:`Label <github3.issues.label.Label>` if succe... | aegea/packages/github3/repos/repo.py | def create_label(self, name, color):
"""Create a label for this repository.
:param str name: (required), name to give to the label
:param str color: (required), value of the color to assign to the
label, e.g., '#fafafa' or 'fafafa' (the latter is what is sent)
:returns: :cla... | def create_label(self, name, color):
"""Create a label for this repository.
:param str name: (required), name to give to the label
:param str color: (required), value of the color to assign to the
label, e.g., '#fafafa' or 'fafafa' (the latter is what is sent)
:returns: :cla... | [
"Create",
"a",
"label",
"for",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L670-L684 | [
"def",
"create_label",
"(",
"self",
",",
"name",
",",
"color",
")",
":",
"json",
"=",
"None",
"if",
"name",
"and",
"color",
":",
"data",
"=",
"{",
"'name'",
":",
"name",
",",
"'color'",
":",
"color",
".",
"strip",
"(",
"'#'",
")",
"}",
"url",
"="... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_milestone | Create a milestone for this repository.
:param str title: (required), title of the milestone
:param str state: (optional), state of the milestone, accepted
values: ('open', 'closed'), default: 'open'
:param str description: (optional), description of the milestone
:param str... | aegea/packages/github3/repos/repo.py | def create_milestone(self, title, state=None, description=None,
due_on=None):
"""Create a milestone for this repository.
:param str title: (required), title of the milestone
:param str state: (optional), state of the milestone, accepted
values: ('open', 'clo... | def create_milestone(self, title, state=None, description=None,
due_on=None):
"""Create a milestone for this repository.
:param str title: (required), title of the milestone
:param str state: (optional), state of the milestone, accepted
values: ('open', 'clo... | [
"Create",
"a",
"milestone",
"for",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L687-L708 | [
"def",
"create_milestone",
"(",
"self",
",",
"title",
",",
"state",
"=",
"None",
",",
"description",
"=",
"None",
",",
"due_on",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'milestones'",
",",
"base_url",
"=",
"self",
".",
"_api... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_pull | Create a pull request of ``head`` onto ``base`` branch in this repo.
:param str title: (required)
:param str base: (required), e.g., 'master'
:param str head: (required), e.g., 'username:branch'
:param str body: (optional), markdown formatted description
:returns: :class:`PullRe... | aegea/packages/github3/repos/repo.py | def create_pull(self, title, base, head, body=None):
"""Create a pull request of ``head`` onto ``base`` branch in this repo.
:param str title: (required)
:param str base: (required), e.g., 'master'
:param str head: (required), e.g., 'username:branch'
:param str body: (optional),... | def create_pull(self, title, base, head, body=None):
"""Create a pull request of ``head`` onto ``base`` branch in this repo.
:param str title: (required)
:param str base: (required), e.g., 'master'
:param str head: (required), e.g., 'username:branch'
:param str body: (optional),... | [
"Create",
"a",
"pull",
"request",
"of",
"head",
"onto",
"base",
"branch",
"in",
"this",
"repo",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L711-L723 | [
"def",
"create_pull",
"(",
"self",
",",
"title",
",",
"base",
",",
"head",
",",
"body",
"=",
"None",
")",
":",
"data",
"=",
"{",
"'title'",
":",
"title",
",",
"'body'",
":",
"body",
",",
"'base'",
":",
"base",
",",
"'head'",
":",
"head",
"}",
"re... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_pull_from_issue | Create a pull request from issue #``issue``.
:param int issue: (required), issue number
:param str base: (required), e.g., 'master'
:param str head: (required), e.g., 'username:branch'
:returns: :class:`PullRequest <github3.pulls.PullRequest>` if
successful, else None | aegea/packages/github3/repos/repo.py | def create_pull_from_issue(self, issue, base, head):
"""Create a pull request from issue #``issue``.
:param int issue: (required), issue number
:param str base: (required), e.g., 'master'
:param str head: (required), e.g., 'username:branch'
:returns: :class:`PullRequest <github3... | def create_pull_from_issue(self, issue, base, head):
"""Create a pull request from issue #``issue``.
:param int issue: (required), issue number
:param str base: (required), e.g., 'master'
:param str head: (required), e.g., 'username:branch'
:returns: :class:`PullRequest <github3... | [
"Create",
"a",
"pull",
"request",
"from",
"issue",
"#",
"issue",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L726-L738 | [
"def",
"create_pull_from_issue",
"(",
"self",
",",
"issue",
",",
"base",
",",
"head",
")",
":",
"if",
"int",
"(",
"issue",
")",
">",
"0",
":",
"data",
"=",
"{",
"'issue'",
":",
"issue",
",",
"'base'",
":",
"base",
",",
"'head'",
":",
"head",
"}",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_ref | Create a reference in this repository.
:param str ref: (required), fully qualified name of the reference,
e.g. ``refs/heads/master``. If it doesn't start with ``refs`` and
contain at least two slashes, GitHub's API will reject it.
:param str sha: (required), SHA1 value to set th... | aegea/packages/github3/repos/repo.py | def create_ref(self, ref, sha):
"""Create a reference in this repository.
:param str ref: (required), fully qualified name of the reference,
e.g. ``refs/heads/master``. If it doesn't start with ``refs`` and
contain at least two slashes, GitHub's API will reject it.
:para... | def create_ref(self, ref, sha):
"""Create a reference in this repository.
:param str ref: (required), fully qualified name of the reference,
e.g. ``refs/heads/master``. If it doesn't start with ``refs`` and
contain at least two slashes, GitHub's API will reject it.
:para... | [
"Create",
"a",
"reference",
"in",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L741-L756 | [
"def",
"create_ref",
"(",
"self",
",",
"ref",
",",
"sha",
")",
":",
"json",
"=",
"None",
"if",
"ref",
"and",
"ref",
".",
"count",
"(",
"'/'",
")",
">=",
"2",
"and",
"sha",
":",
"data",
"=",
"{",
"'ref'",
":",
"ref",
",",
"'sha'",
":",
"sha",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_release | Create a release for this repository.
:param str tag_name: (required), name to give to the tag
:param str target_commitish: (optional), vague concept of a target,
either a SHA or a branch name.
:param str name: (optional), name of the release
:param str body: (optional), des... | aegea/packages/github3/repos/repo.py | def create_release(self, tag_name, target_commitish=None, name=None,
body=None, draft=False, prerelease=False):
"""Create a release for this repository.
:param str tag_name: (required), name to give to the tag
:param str target_commitish: (optional), vague concept of a ta... | def create_release(self, tag_name, target_commitish=None, name=None,
body=None, draft=False, prerelease=False):
"""Create a release for this repository.
:param str tag_name: (required), name to give to the tag
:param str target_commitish: (optional), vague concept of a ta... | [
"Create",
"a",
"release",
"for",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L759-L786 | [
"def",
"create_release",
"(",
"self",
",",
"tag_name",
",",
"target_commitish",
"=",
"None",
",",
"name",
"=",
"None",
",",
"body",
"=",
"None",
",",
"draft",
"=",
"False",
",",
"prerelease",
"=",
"False",
")",
":",
"data",
"=",
"{",
"'tag_name'",
":",... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_status | Create a status object on a commit.
:param str sha: (required), SHA of the commit to create the status on
:param str state: (required), state of the test; only the following
are accepted: 'pending', 'success', 'error', 'failure'
:param str target_url: (optional), URL to associate wi... | aegea/packages/github3/repos/repo.py | def create_status(self, sha, state, target_url=None, description=None,
context='default'):
"""Create a status object on a commit.
:param str sha: (required), SHA of the commit to create the status on
:param str state: (required), state of the test; only the following
... | def create_status(self, sha, state, target_url=None, description=None,
context='default'):
"""Create a status object on a commit.
:param str sha: (required), SHA of the commit to create the status on
:param str state: (required), state of the test; only the following
... | [
"Create",
"a",
"status",
"object",
"on",
"a",
"commit",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L789-L810 | [
"def",
"create_status",
"(",
"self",
",",
"sha",
",",
"state",
",",
"target_url",
"=",
"None",
",",
"description",
"=",
"None",
",",
"context",
"=",
"'default'",
")",
":",
"json",
"=",
"None",
"if",
"sha",
"and",
"state",
":",
"data",
"=",
"{",
"'sta... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_tag | Create a tag in this repository.
:param str tag: (required), name of the tag
:param str message: (required), tag message
:param str sha: (required), SHA of the git object this is tagging
:param str obj_type: (required), type of object being tagged, e.g.,
'commit', 'tree', 'b... | aegea/packages/github3/repos/repo.py | def create_tag(self, tag, message, sha, obj_type, tagger,
lightweight=False):
"""Create a tag in this repository.
:param str tag: (required), name of the tag
:param str message: (required), tag message
:param str sha: (required), SHA of the git object this is tagging
... | def create_tag(self, tag, message, sha, obj_type, tagger,
lightweight=False):
"""Create a tag in this repository.
:param str tag: (required), name of the tag
:param str message: (required), tag message
:param str sha: (required), SHA of the git object this is tagging
... | [
"Create",
"a",
"tag",
"in",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L813-L841 | [
"def",
"create_tag",
"(",
"self",
",",
"tag",
",",
"message",
",",
"sha",
",",
"obj_type",
",",
"tagger",
",",
"lightweight",
"=",
"False",
")",
":",
"if",
"lightweight",
"and",
"tag",
"and",
"sha",
":",
"return",
"self",
".",
"create_ref",
"(",
"'refs... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.create_tree | Create a tree on this repository.
:param list tree: (required), specifies the tree structure.
Format: [{'path': 'path/file', 'mode':
'filemode', 'type': 'blob or tree', 'sha': '44bfc6d...'}]
:param str base_tree: (optional), SHA1 of the tree you want
to update with n... | aegea/packages/github3/repos/repo.py | def create_tree(self, tree, base_tree=''):
"""Create a tree on this repository.
:param list tree: (required), specifies the tree structure.
Format: [{'path': 'path/file', 'mode':
'filemode', 'type': 'blob or tree', 'sha': '44bfc6d...'}]
:param str base_tree: (optional), ... | def create_tree(self, tree, base_tree=''):
"""Create a tree on this repository.
:param list tree: (required), specifies the tree structure.
Format: [{'path': 'path/file', 'mode':
'filemode', 'type': 'blob or tree', 'sha': '44bfc6d...'}]
:param str base_tree: (optional), ... | [
"Create",
"a",
"tree",
"on",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L844-L859 | [
"def",
"create_tree",
"(",
"self",
",",
"tree",
",",
"base_tree",
"=",
"''",
")",
":",
"json",
"=",
"None",
"if",
"tree",
"and",
"isinstance",
"(",
"tree",
",",
"list",
")",
":",
"data",
"=",
"{",
"'tree'",
":",
"tree",
",",
"'base_tree'",
":",
"ba... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.delete_file | Delete the file located at ``path``.
This is part of the Contents CrUD (Create Update Delete) API. See
http://developer.github.com/v3/repos/contents/#delete-a-file for more
information.
:param str path: (required), path to the file being removed
:param str message: (required), ... | aegea/packages/github3/repos/repo.py | def delete_file(self, path, message, sha, branch=None, committer=None,
author=None):
"""Delete the file located at ``path``.
This is part of the Contents CrUD (Create Update Delete) API. See
http://developer.github.com/v3/repos/contents/#delete-a-file for more
inform... | def delete_file(self, path, message, sha, branch=None, committer=None,
author=None):
"""Delete the file located at ``path``.
This is part of the Contents CrUD (Create Update Delete) API. See
http://developer.github.com/v3/repos/contents/#delete-a-file for more
inform... | [
"Delete",
"the",
"file",
"located",
"at",
"path",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L870-L902 | [
"def",
"delete_file",
"(",
"self",
",",
"path",
",",
"message",
",",
"sha",
",",
"branch",
"=",
"None",
",",
"committer",
"=",
"None",
",",
"author",
"=",
"None",
")",
":",
"json",
"=",
"None",
"if",
"path",
"and",
"message",
"and",
"sha",
":",
"ur... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.delete_key | Delete the key with the specified id from your deploy keys list.
:returns: bool -- True if successful, False otherwise | aegea/packages/github3/repos/repo.py | def delete_key(self, key_id):
"""Delete the key with the specified id from your deploy keys list.
:returns: bool -- True if successful, False otherwise
"""
if int(key_id) <= 0:
return False
url = self._build_url('keys', str(key_id), base_url=self._api)
return... | def delete_key(self, key_id):
"""Delete the key with the specified id from your deploy keys list.
:returns: bool -- True if successful, False otherwise
"""
if int(key_id) <= 0:
return False
url = self._build_url('keys', str(key_id), base_url=self._api)
return... | [
"Delete",
"the",
"key",
"with",
"the",
"specified",
"id",
"from",
"your",
"deploy",
"keys",
"list",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L905-L913 | [
"def",
"delete_key",
"(",
"self",
",",
"key_id",
")",
":",
"if",
"int",
"(",
"key_id",
")",
"<=",
"0",
":",
"return",
"False",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'keys'",
",",
"str",
"(",
"key_id",
")",
",",
"base_url",
"=",
"self",
".",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.edit | Edit this repository.
:param str name: (required), name of the repository
:param str description: (optional), If not ``None``, change the
description for this repository. API default: ``None`` - leave
value unchanged.
:param str homepage: (optional), If not ``None``, cha... | aegea/packages/github3/repos/repo.py | def edit(self,
name,
description=None,
homepage=None,
private=None,
has_issues=None,
has_wiki=None,
has_downloads=None,
default_branch=None):
"""Edit this repository.
:param str name: (required), nam... | def edit(self,
name,
description=None,
homepage=None,
private=None,
has_issues=None,
has_wiki=None,
has_downloads=None,
default_branch=None):
"""Edit this repository.
:param str name: (required), nam... | [
"Edit",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L925-L969 | [
"def",
"edit",
"(",
"self",
",",
"name",
",",
"description",
"=",
"None",
",",
"homepage",
"=",
"None",
",",
"private",
"=",
"None",
",",
"has_issues",
"=",
"None",
",",
"has_wiki",
"=",
"None",
",",
"has_downloads",
"=",
"None",
",",
"default_branch",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.git_commit | Get a single (git) commit.
:param str sha: (required), sha of the commit
:returns: :class:`Commit <github3.git.Commit>` if successful,
otherwise None | aegea/packages/github3/repos/repo.py | def git_commit(self, sha):
"""Get a single (git) commit.
:param str sha: (required), sha of the commit
:returns: :class:`Commit <github3.git.Commit>` if successful,
otherwise None
"""
json = {}
if sha:
url = self._build_url('git', 'commits', sha, ... | def git_commit(self, sha):
"""Get a single (git) commit.
:param str sha: (required), sha of the commit
:returns: :class:`Commit <github3.git.Commit>` if successful,
otherwise None
"""
json = {}
if sha:
url = self._build_url('git', 'commits', sha, ... | [
"Get",
"a",
"single",
"(",
"git",
")",
"commit",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L982-L993 | [
"def",
"git_commit",
"(",
"self",
",",
"sha",
")",
":",
"json",
"=",
"{",
"}",
"if",
"sha",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'git'",
",",
"'commits'",
",",
"sha",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"json",
"=",
"self... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.hook | Get a single hook.
:param int id_num: (required), id of the hook
:returns: :class:`Hook <github3.repos.hook.Hook>` if successful,
otherwise None | aegea/packages/github3/repos/repo.py | def hook(self, id_num):
"""Get a single hook.
:param int id_num: (required), id of the hook
:returns: :class:`Hook <github3.repos.hook.Hook>` if successful,
otherwise None
"""
json = None
if int(id_num) > 0:
url = self._build_url('hooks', str(id_n... | def hook(self, id_num):
"""Get a single hook.
:param int id_num: (required), id of the hook
:returns: :class:`Hook <github3.repos.hook.Hook>` if successful,
otherwise None
"""
json = None
if int(id_num) > 0:
url = self._build_url('hooks', str(id_n... | [
"Get",
"a",
"single",
"hook",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L996-L1007 | [
"def",
"hook",
"(",
"self",
",",
"id_num",
")",
":",
"json",
"=",
"None",
"if",
"int",
"(",
"id_num",
")",
">",
"0",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'hooks'",
",",
"str",
"(",
"id_num",
")",
",",
"base_url",
"=",
"self",
".",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.is_assignee | Check if the user is a possible assignee for an issue on this
repository.
:returns: :class:`bool` | aegea/packages/github3/repos/repo.py | def is_assignee(self, login):
"""Check if the user is a possible assignee for an issue on this
repository.
:returns: :class:`bool`
"""
if not login:
return False
url = self._build_url('assignees', login, base_url=self._api)
return self._boolean(self._... | def is_assignee(self, login):
"""Check if the user is a possible assignee for an issue on this
repository.
:returns: :class:`bool`
"""
if not login:
return False
url = self._build_url('assignees', login, base_url=self._api)
return self._boolean(self._... | [
"Check",
"if",
"the",
"user",
"is",
"a",
"possible",
"assignee",
"for",
"an",
"issue",
"on",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1009-L1018 | [
"def",
"is_assignee",
"(",
"self",
",",
"login",
")",
":",
"if",
"not",
"login",
":",
"return",
"False",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'assignees'",
",",
"login",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"self",
".",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.issue | Get the issue specified by ``number``.
:param int number: (required), number of the issue on this repository
:returns: :class:`Issue <github3.issues.issue.Issue>` if successful,
otherwise None | aegea/packages/github3/repos/repo.py | def issue(self, number):
"""Get the issue specified by ``number``.
:param int number: (required), number of the issue on this repository
:returns: :class:`Issue <github3.issues.issue.Issue>` if successful,
otherwise None
"""
json = None
if int(number) > 0:
... | def issue(self, number):
"""Get the issue specified by ``number``.
:param int number: (required), number of the issue on this repository
:returns: :class:`Issue <github3.issues.issue.Issue>` if successful,
otherwise None
"""
json = None
if int(number) > 0:
... | [
"Get",
"the",
"issue",
"specified",
"by",
"number",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1020-L1031 | [
"def",
"issue",
"(",
"self",
",",
"number",
")",
":",
"json",
"=",
"None",
"if",
"int",
"(",
"number",
")",
">",
"0",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'issues'",
",",
"str",
"(",
"number",
")",
",",
"base_url",
"=",
"self",
".",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.key | Get the specified deploy key.
:param int id_num: (required), id of the key
:returns: :class:`Key <github3.users.Key>` if successful, else None | aegea/packages/github3/repos/repo.py | def key(self, id_num):
"""Get the specified deploy key.
:param int id_num: (required), id of the key
:returns: :class:`Key <github3.users.Key>` if successful, else None
"""
json = None
if int(id_num) > 0:
url = self._build_url('keys', str(id_num), base_url=se... | def key(self, id_num):
"""Get the specified deploy key.
:param int id_num: (required), id of the key
:returns: :class:`Key <github3.users.Key>` if successful, else None
"""
json = None
if int(id_num) > 0:
url = self._build_url('keys', str(id_num), base_url=se... | [
"Get",
"the",
"specified",
"deploy",
"key",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1034-L1044 | [
"def",
"key",
"(",
"self",
",",
"id_num",
")",
":",
"json",
"=",
"None",
"if",
"int",
"(",
"id_num",
")",
">",
"0",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'keys'",
",",
"str",
"(",
"id_num",
")",
",",
"base_url",
"=",
"self",
".",
"_... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.label | Get the label specified by ``name``
:param str name: (required), name of the label
:returns: :class:`Label <github3.issues.label.Label>` if successful,
else None | aegea/packages/github3/repos/repo.py | def label(self, name):
"""Get the label specified by ``name``
:param str name: (required), name of the label
:returns: :class:`Label <github3.issues.label.Label>` if successful,
else None
"""
json = None
if name:
url = self._build_url('labels', na... | def label(self, name):
"""Get the label specified by ``name``
:param str name: (required), name of the label
:returns: :class:`Label <github3.issues.label.Label>` if successful,
else None
"""
json = None
if name:
url = self._build_url('labels', na... | [
"Get",
"the",
"label",
"specified",
"by",
"name"
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1046-L1057 | [
"def",
"label",
"(",
"self",
",",
"name",
")",
":",
"json",
"=",
"None",
"if",
"name",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'labels'",
",",
"name",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"json",
"=",
"self",
".",
"_json",
"(... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_branches | Iterate over the branches in this repository.
:param int number: (optional), number of branches to return. Default:
-1 returns all branches
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns: generator of
:class:`Branch <g... | aegea/packages/github3/repos/repo.py | def iter_branches(self, number=-1, etag=None):
"""Iterate over the branches in this repository.
:param int number: (optional), number of branches to return. Default:
-1 returns all branches
:param str etag: (optional), ETag from a previous request to the same
endpoint
... | def iter_branches(self, number=-1, etag=None):
"""Iterate over the branches in this repository.
:param int number: (optional), number of branches to return. Default:
-1 returns all branches
:param str etag: (optional), ETag from a previous request to the same
endpoint
... | [
"Iterate",
"over",
"the",
"branches",
"in",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1082-L1093 | [
"def",
"iter_branches",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'branches'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"self",
".",
"_iter",
"(",
"i... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_code_frequency | Iterate over the code frequency per week.
Returns a weekly aggregate of the number of additions and deletions
pushed to this repository.
:param int number: (optional), number of weeks to return. Default: -1
returns all weeks
:param str etag: (optional), ETag from a previous... | aegea/packages/github3/repos/repo.py | def iter_code_frequency(self, number=-1, etag=None):
"""Iterate over the code frequency per week.
Returns a weekly aggregate of the number of additions and deletions
pushed to this repository.
:param int number: (optional), number of weeks to return. Default: -1
returns all... | def iter_code_frequency(self, number=-1, etag=None):
"""Iterate over the code frequency per week.
Returns a weekly aggregate of the number of additions and deletions
pushed to this repository.
:param int number: (optional), number of weeks to return. Default: -1
returns all... | [
"Iterate",
"over",
"the",
"code",
"frequency",
"per",
"week",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1095-L1117 | [
"def",
"iter_code_frequency",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'stats'",
",",
"'code_frequency'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"self... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_comments_on_commit | Iterate over comments for a single commit.
:param sha: (required), sha of the commit to list comments on
:type sha: str
:param int number: (optional), number of comments to return. Default:
-1 returns all comments
:param str etag: (optional), ETag from a previous request to ... | aegea/packages/github3/repos/repo.py | def iter_comments_on_commit(self, sha, number=1, etag=None):
"""Iterate over comments for a single commit.
:param sha: (required), sha of the commit to list comments on
:type sha: str
:param int number: (optional), number of comments to return. Default:
-1 returns all commen... | def iter_comments_on_commit(self, sha, number=1, etag=None):
"""Iterate over comments for a single commit.
:param sha: (required), sha of the commit to list comments on
:type sha: str
:param int number: (optional), number of comments to return. Default:
-1 returns all commen... | [
"Iterate",
"over",
"comments",
"for",
"a",
"single",
"commit",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1144-L1157 | [
"def",
"iter_comments_on_commit",
"(",
"self",
",",
"sha",
",",
"number",
"=",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'commits'",
",",
"sha",
",",
"'comments'",
",",
"base_url",
"=",
"self",
".",
"_api",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_commit_activity | Iterate over last year of commit activity by week.
See: http://developer.github.com/v3/repos/statistics/
:param int number: (optional), number of weeks to return. Default -1
will return all of the weeks.
:param str etag: (optional), ETag from a previous request to the same
... | aegea/packages/github3/repos/repo.py | def iter_commit_activity(self, number=-1, etag=None):
"""Iterate over last year of commit activity by week.
See: http://developer.github.com/v3/repos/statistics/
:param int number: (optional), number of weeks to return. Default -1
will return all of the weeks.
:param str et... | def iter_commit_activity(self, number=-1, etag=None):
"""Iterate over last year of commit activity by week.
See: http://developer.github.com/v3/repos/statistics/
:param int number: (optional), number of weeks to return. Default -1
will return all of the weeks.
:param str et... | [
"Iterate",
"over",
"last",
"year",
"of",
"commit",
"activity",
"by",
"week",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1159-L1179 | [
"def",
"iter_commit_activity",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'stats'",
",",
"'commit_activity'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"se... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_commits | Iterate over commits in this repository.
:param str sha: (optional), sha or branch to start listing commits
from
:param str path: (optional), commits containing this path will be
listed
:param str author: (optional), GitHub login, real name, or email to
filte... | aegea/packages/github3/repos/repo.py | def iter_commits(self, sha=None, path=None, author=None, number=-1,
etag=None, since=None, until=None):
"""Iterate over commits in this repository.
:param str sha: (optional), sha or branch to start listing commits
from
:param str path: (optional), commits conta... | def iter_commits(self, sha=None, path=None, author=None, number=-1,
etag=None, since=None, until=None):
"""Iterate over commits in this repository.
:param str sha: (optional), sha or branch to start listing commits
from
:param str path: (optional), commits conta... | [
"Iterate",
"over",
"commits",
"in",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1181-L1213 | [
"def",
"iter_commits",
"(",
"self",
",",
"sha",
"=",
"None",
",",
"path",
"=",
"None",
",",
"author",
"=",
"None",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
",",
"since",
"=",
"None",
",",
"until",
"=",
"None",
")",
":",
"params",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_contributors | Iterate over the contributors to this repository.
:param bool anon: (optional), True lists anonymous contributors as
well
:param int number: (optional), number of contributors to return.
Default: -1 returns all contributors
:param str etag: (optional), ETag from a previo... | aegea/packages/github3/repos/repo.py | def iter_contributors(self, anon=False, number=-1, etag=None):
"""Iterate over the contributors to this repository.
:param bool anon: (optional), True lists anonymous contributors as
well
:param int number: (optional), number of contributors to return.
Default: -1 return... | def iter_contributors(self, anon=False, number=-1, etag=None):
"""Iterate over the contributors to this repository.
:param bool anon: (optional), True lists anonymous contributors as
well
:param int number: (optional), number of contributors to return.
Default: -1 return... | [
"Iterate",
"over",
"the",
"contributors",
"to",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1215-L1230 | [
"def",
"iter_contributors",
"(",
"self",
",",
"anon",
"=",
"False",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'contributors'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"param... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_contributor_statistics | Iterate over the contributors list.
See also: http://developer.github.com/v3/repos/statistics/
:param int number: (optional), number of weeks to return. Default -1
will return all of the weeks.
:param str etag: (optional), ETag from a previous request to the same
endpoi... | aegea/packages/github3/repos/repo.py | def iter_contributor_statistics(self, number=-1, etag=None):
"""Iterate over the contributors list.
See also: http://developer.github.com/v3/repos/statistics/
:param int number: (optional), number of weeks to return. Default -1
will return all of the weeks.
:param str etag:... | def iter_contributor_statistics(self, number=-1, etag=None):
"""Iterate over the contributors list.
See also: http://developer.github.com/v3/repos/statistics/
:param int number: (optional), number of weeks to return. Default -1
will return all of the weeks.
:param str etag:... | [
"Iterate",
"over",
"the",
"contributors",
"list",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1232-L1253 | [
"def",
"iter_contributor_statistics",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'stats'",
",",
"'contributors'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_deployments | Iterate over deployments for this repository.
:param int number: (optional), number of deployments to return.
Default: -1, returns all available deployments
:param str etag: (optional), ETag from a previous request for all
deployments
:returns: generator of
:... | aegea/packages/github3/repos/repo.py | def iter_deployments(self, number=-1, etag=None):
"""Iterate over deployments for this repository.
:param int number: (optional), number of deployments to return.
Default: -1, returns all available deployments
:param str etag: (optional), ETag from a previous request for all
... | def iter_deployments(self, number=-1, etag=None):
"""Iterate over deployments for this repository.
:param int number: (optional), number of deployments to return.
Default: -1, returns all available deployments
:param str etag: (optional), ETag from a previous request for all
... | [
"Iterate",
"over",
"deployments",
"for",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1255-L1268 | [
"def",
"iter_deployments",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'deployments'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"i",
"=",
"self",
".",
"_iter",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_forks | Iterate over forks of this repository.
:param str sort: (optional), accepted values:
('newest', 'oldest', 'watchers'), API default: 'newest'
:param int number: (optional), number of forks to return. Default: -1
returns all forks
:param str etag: (optional), ETag from a p... | aegea/packages/github3/repos/repo.py | def iter_forks(self, sort='', number=-1, etag=None):
"""Iterate over forks of this repository.
:param str sort: (optional), accepted values:
('newest', 'oldest', 'watchers'), API default: 'newest'
:param int number: (optional), number of forks to return. Default: -1
retu... | def iter_forks(self, sort='', number=-1, etag=None):
"""Iterate over forks of this repository.
:param str sort: (optional), accepted values:
('newest', 'oldest', 'watchers'), API default: 'newest'
:param int number: (optional), number of forks to return. Default: -1
retu... | [
"Iterate",
"over",
"forks",
"of",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1282-L1297 | [
"def",
"iter_forks",
"(",
"self",
",",
"sort",
"=",
"''",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'forks'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"params",
"=",
"{",... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_hooks | Iterate over hooks registered on this repository.
:param int number: (optional), number of hoks to return. Default: -1
returns all hooks
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns: generator of :class:`Hook <github3.repos.hook... | aegea/packages/github3/repos/repo.py | def iter_hooks(self, number=-1, etag=None):
"""Iterate over hooks registered on this repository.
:param int number: (optional), number of hoks to return. Default: -1
returns all hooks
:param str etag: (optional), ETag from a previous request to the same
endpoint
... | def iter_hooks(self, number=-1, etag=None):
"""Iterate over hooks registered on this repository.
:param int number: (optional), number of hoks to return. Default: -1
returns all hooks
:param str etag: (optional), ETag from a previous request to the same
endpoint
... | [
"Iterate",
"over",
"hooks",
"registered",
"on",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1300-L1310 | [
"def",
"iter_hooks",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'hooks'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"self",
".",
"_iter",
"(",
"int",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_issues | Iterate over issues on this repo based upon parameters passed.
.. versionchanged:: 0.9.0
The ``state`` parameter now accepts 'all' in addition to 'open'
and 'closed'.
:param int milestone: (optional), 'none', or '*'
:param str state: (optional), accepted values: ('all'... | aegea/packages/github3/repos/repo.py | def iter_issues(self,
milestone=None,
state=None,
assignee=None,
mentioned=None,
labels=None,
sort=None,
direction=None,
since=None,
number=... | def iter_issues(self,
milestone=None,
state=None,
assignee=None,
mentioned=None,
labels=None,
sort=None,
direction=None,
since=None,
number=... | [
"Iterate",
"over",
"issues",
"on",
"this",
"repo",
"based",
"upon",
"parameters",
"passed",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1312-L1361 | [
"def",
"iter_issues",
"(",
"self",
",",
"milestone",
"=",
"None",
",",
"state",
"=",
"None",
",",
"assignee",
"=",
"None",
",",
"mentioned",
"=",
"None",
",",
"labels",
"=",
"None",
",",
"sort",
"=",
"None",
",",
"direction",
"=",
"None",
",",
"since... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_issue_events | Iterates over issue events on this repository.
:param int number: (optional), number of events to return. Default: -1
returns all available events
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns: generator of
:class:`Is... | aegea/packages/github3/repos/repo.py | def iter_issue_events(self, number=-1, etag=None):
"""Iterates over issue events on this repository.
:param int number: (optional), number of events to return. Default: -1
returns all available events
:param str etag: (optional), ETag from a previous request to the same
... | def iter_issue_events(self, number=-1, etag=None):
"""Iterates over issue events on this repository.
:param int number: (optional), number of events to return. Default: -1
returns all available events
:param str etag: (optional), ETag from a previous request to the same
... | [
"Iterates",
"over",
"issue",
"events",
"on",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1363-L1374 | [
"def",
"iter_issue_events",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'issues'",
",",
"'events'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"self",
".",... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_languages | Iterate over the programming languages used in the repository.
:param int number: (optional), number of languages to return. Default:
-1 returns all used languages
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns: generator of tuple... | aegea/packages/github3/repos/repo.py | def iter_languages(self, number=-1, etag=None):
"""Iterate over the programming languages used in the repository.
:param int number: (optional), number of languages to return. Default:
-1 returns all used languages
:param str etag: (optional), ETag from a previous request to the sam... | def iter_languages(self, number=-1, etag=None):
"""Iterate over the programming languages used in the repository.
:param int number: (optional), number of languages to return. Default:
-1 returns all used languages
:param str etag: (optional), ETag from a previous request to the sam... | [
"Iterate",
"over",
"the",
"programming",
"languages",
"used",
"in",
"the",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1401-L1411 | [
"def",
"iter_languages",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'languages'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"self",
".",
"_iter",
"(",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_milestones | Iterates over the milestones on this repository.
:param str state: (optional), state of the milestones, accepted
values: ('open', 'closed')
:param str sort: (optional), how to sort the milestones, accepted
values: ('due_date', 'completeness')
:param str direction: (optio... | aegea/packages/github3/repos/repo.py | def iter_milestones(self, state=None, sort=None, direction=None,
number=-1, etag=None):
"""Iterates over the milestones on this repository.
:param str state: (optional), state of the milestones, accepted
values: ('open', 'closed')
:param str sort: (optional),... | def iter_milestones(self, state=None, sort=None, direction=None,
number=-1, etag=None):
"""Iterates over the milestones on this repository.
:param str state: (optional), state of the milestones, accepted
values: ('open', 'closed')
:param str sort: (optional),... | [
"Iterates",
"over",
"the",
"milestones",
"on",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1413-L1440 | [
"def",
"iter_milestones",
"(",
"self",
",",
"state",
"=",
"None",
",",
"sort",
"=",
"None",
",",
"direction",
"=",
"None",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'milestones'",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_network_events | Iterates over events on a network of repositories.
:param int number: (optional), number of events to return. Default: -1
returns all available events
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns: generator of :class:`Event <git... | aegea/packages/github3/repos/repo.py | def iter_network_events(self, number=-1, etag=None):
"""Iterates over events on a network of repositories.
:param int number: (optional), number of events to return. Default: -1
returns all available events
:param str etag: (optional), ETag from a previous request to the same
... | def iter_network_events(self, number=-1, etag=None):
"""Iterates over events on a network of repositories.
:param int number: (optional), number of events to return. Default: -1
returns all available events
:param str etag: (optional), ETag from a previous request to the same
... | [
"Iterates",
"over",
"events",
"on",
"a",
"network",
"of",
"repositories",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1442-L1453 | [
"def",
"iter_network_events",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"base",
"=",
"self",
".",
"_api",
".",
"replace",
"(",
"'repos'",
",",
"'networks'",
",",
"1",
")",
"url",
"=",
"self",
".",
"_build_url",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_notifications | Iterates over the notifications for this repository.
:param bool all: (optional), show all notifications, including ones
marked as read
:param bool participating: (optional), show only the notifications the
user is participating in directly
:param since: (optional), filt... | aegea/packages/github3/repos/repo.py | def iter_notifications(self, all=False, participating=False, since=None,
number=-1, etag=None):
"""Iterates over the notifications for this repository.
:param bool all: (optional), show all notifications, including ones
marked as read
:param bool participa... | def iter_notifications(self, all=False, participating=False, since=None,
number=-1, etag=None):
"""Iterates over the notifications for this repository.
:param bool all: (optional), show all notifications, including ones
marked as read
:param bool participa... | [
"Iterates",
"over",
"the",
"notifications",
"for",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1456-L1481 | [
"def",
"iter_notifications",
"(",
"self",
",",
"all",
"=",
"False",
",",
"participating",
"=",
"False",
",",
"since",
"=",
"None",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'notific... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_pages_builds | Iterate over pages builds of this repository.
:returns: generator of :class:`PagesBuild
<github3.repos.pages.PagesBuild>` | aegea/packages/github3/repos/repo.py | def iter_pages_builds(self, number=-1, etag=None):
"""Iterate over pages builds of this repository.
:returns: generator of :class:`PagesBuild
<github3.repos.pages.PagesBuild>`
"""
url = self._build_url('pages', 'builds', base_url=self._api)
return self._iter(int(numb... | def iter_pages_builds(self, number=-1, etag=None):
"""Iterate over pages builds of this repository.
:returns: generator of :class:`PagesBuild
<github3.repos.pages.PagesBuild>`
"""
url = self._build_url('pages', 'builds', base_url=self._api)
return self._iter(int(numb... | [
"Iterate",
"over",
"pages",
"builds",
"of",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1484-L1491 | [
"def",
"iter_pages_builds",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'pages'",
",",
"'builds'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"self",
".",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_pulls | List pull requests on repository.
.. versionchanged:: 0.9.0
- The ``state`` parameter now accepts 'all' in addition to 'open'
and 'closed'.
- The ``sort`` parameter was added.
- The ``direction`` parameter was added.
:param str state: (optional), ac... | aegea/packages/github3/repos/repo.py | def iter_pulls(self, state=None, head=None, base=None, sort='created',
direction='desc', number=-1, etag=None):
"""List pull requests on repository.
.. versionchanged:: 0.9.0
- The ``state`` parameter now accepts 'all' in addition to 'open'
and 'closed'.
... | def iter_pulls(self, state=None, head=None, base=None, sort='created',
direction='desc', number=-1, etag=None):
"""List pull requests on repository.
.. versionchanged:: 0.9.0
- The ``state`` parameter now accepts 'all' in addition to 'open'
and 'closed'.
... | [
"List",
"pull",
"requests",
"on",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1493-L1529 | [
"def",
"iter_pulls",
"(",
"self",
",",
"state",
"=",
"None",
",",
"head",
"=",
"None",
",",
"base",
"=",
"None",
",",
"sort",
"=",
"'created'",
",",
"direction",
"=",
"'desc'",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"ur... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_refs | Iterates over references for this repository.
:param str subspace: (optional), e.g. 'tags', 'stashes', 'notes'
:param int number: (optional), number of refs to return. Default: -1
returns all available refs
:param str etag: (optional), ETag from a previous request to the same
... | aegea/packages/github3/repos/repo.py | def iter_refs(self, subspace='', number=-1, etag=None):
"""Iterates over references for this repository.
:param str subspace: (optional), e.g. 'tags', 'stashes', 'notes'
:param int number: (optional), number of refs to return. Default: -1
returns all available refs
:param st... | def iter_refs(self, subspace='', number=-1, etag=None):
"""Iterates over references for this repository.
:param str subspace: (optional), e.g. 'tags', 'stashes', 'notes'
:param int number: (optional), number of refs to return. Default: -1
returns all available refs
:param st... | [
"Iterates",
"over",
"references",
"for",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1531-L1546 | [
"def",
"iter_refs",
"(",
"self",
",",
"subspace",
"=",
"''",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"if",
"subspace",
":",
"args",
"=",
"(",
"'git'",
",",
"'refs'",
",",
"subspace",
")",
"else",
":",
"args",
"=",
"(",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_releases | Iterates over releases for this repository.
:param int number: (optional), number of refs to return. Default: -1
returns all available refs
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns: generator of
:class:`Release <... | aegea/packages/github3/repos/repo.py | def iter_releases(self, number=-1, etag=None):
"""Iterates over releases for this repository.
:param int number: (optional), number of refs to return. Default: -1
returns all available refs
:param str etag: (optional), ETag from a previous request to the same
endpoint
... | def iter_releases(self, number=-1, etag=None):
"""Iterates over releases for this repository.
:param int number: (optional), number of refs to return. Default: -1
returns all available refs
:param str etag: (optional), ETag from a previous request to the same
endpoint
... | [
"Iterates",
"over",
"releases",
"for",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1548-L1561 | [
"def",
"iter_releases",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'releases'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"iterator",
"=",
"self",
".",
"_iter",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_statuses | Iterates over the statuses for a specific SHA.
:param str sha: SHA of the commit to list the statuses of
:param int number: (optional), return up to number statuses. Default:
-1 returns all available statuses.
:param str etag: (optional), ETag from a previous request to the same
... | aegea/packages/github3/repos/repo.py | def iter_statuses(self, sha, number=-1, etag=None):
"""Iterates over the statuses for a specific SHA.
:param str sha: SHA of the commit to list the statuses of
:param int number: (optional), return up to number statuses. Default:
-1 returns all available statuses.
:param str... | def iter_statuses(self, sha, number=-1, etag=None):
"""Iterates over the statuses for a specific SHA.
:param str sha: SHA of the commit to list the statuses of
:param int number: (optional), return up to number statuses. Default:
-1 returns all available statuses.
:param str... | [
"Iterates",
"over",
"the",
"statuses",
"for",
"a",
"specific",
"SHA",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1587-L1600 | [
"def",
"iter_statuses",
"(",
"self",
",",
"sha",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"''",
"if",
"sha",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'statuses'",
",",
"sha",
",",
"base_url",
"=",
"se... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.iter_tags | Iterates over tags on this repository.
:param int number: (optional), return up to at most number tags.
Default: -1 returns all available tags.
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns: generator of :class:`RepoTag <github3.... | aegea/packages/github3/repos/repo.py | def iter_tags(self, number=-1, etag=None):
"""Iterates over tags on this repository.
:param int number: (optional), return up to at most number tags.
Default: -1 returns all available tags.
:param str etag: (optional), ETag from a previous request to the same
endpoint
... | def iter_tags(self, number=-1, etag=None):
"""Iterates over tags on this repository.
:param int number: (optional), return up to at most number tags.
Default: -1 returns all available tags.
:param str etag: (optional), ETag from a previous request to the same
endpoint
... | [
"Iterates",
"over",
"tags",
"on",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1602-L1612 | [
"def",
"iter_tags",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'tags'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"self",
".",
"_iter",
"(",
"int",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.mark_notifications | Mark all notifications in this repository as read.
:param str last_read: (optional), Describes the last point that
notifications were checked. Anything updated since this time will
not be updated. Default: Now. Expected in ISO 8601 format:
``YYYY-MM-DDTHH:MM:SSZ``. Example: ... | aegea/packages/github3/repos/repo.py | def mark_notifications(self, last_read=''):
"""Mark all notifications in this repository as read.
:param str last_read: (optional), Describes the last point that
notifications were checked. Anything updated since this time will
not be updated. Default: Now. Expected in ISO 8601 ... | def mark_notifications(self, last_read=''):
"""Mark all notifications in this repository as read.
:param str last_read: (optional), Describes the last point that
notifications were checked. Anything updated since this time will
not be updated. Default: Now. Expected in ISO 8601 ... | [
"Mark",
"all",
"notifications",
"in",
"this",
"repository",
"as",
"read",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1629-L1643 | [
"def",
"mark_notifications",
"(",
"self",
",",
"last_read",
"=",
"''",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'notifications'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"mark",
"=",
"{",
"'read'",
":",
"True",
"}",
"if",
"last_re... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.merge | Perform a merge from ``head`` into ``base``.
:param str base: (required), where you're merging into
:param str head: (required), where you're merging from
:param str message: (optional), message to be used for the commit
:returns: :class:`RepoCommit <github3.repos.commit.RepoCommit>` | aegea/packages/github3/repos/repo.py | def merge(self, base, head, message=''):
"""Perform a merge from ``head`` into ``base``.
:param str base: (required), where you're merging into
:param str head: (required), where you're merging from
:param str message: (optional), message to be used for the commit
:returns: :cla... | def merge(self, base, head, message=''):
"""Perform a merge from ``head`` into ``base``.
:param str base: (required), where you're merging into
:param str head: (required), where you're merging from
:param str message: (optional), message to be used for the commit
:returns: :cla... | [
"Perform",
"a",
"merge",
"from",
"head",
"into",
"base",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1646-L1659 | [
"def",
"merge",
"(",
"self",
",",
"base",
",",
"head",
",",
"message",
"=",
"''",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'merges'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"data",
"=",
"{",
"'base'",
":",
"base",
",",
"'he... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.milestone | Get the milestone indicated by ``number``.
:param int number: (required), unique id number of the milestone
:returns: :class:`Milestone <github3.issues.milestone.Milestone>` | aegea/packages/github3/repos/repo.py | def milestone(self, number):
"""Get the milestone indicated by ``number``.
:param int number: (required), unique id number of the milestone
:returns: :class:`Milestone <github3.issues.milestone.Milestone>`
"""
json = None
if int(number) > 0:
url = self._build... | def milestone(self, number):
"""Get the milestone indicated by ``number``.
:param int number: (required), unique id number of the milestone
:returns: :class:`Milestone <github3.issues.milestone.Milestone>`
"""
json = None
if int(number) > 0:
url = self._build... | [
"Get",
"the",
"milestone",
"indicated",
"by",
"number",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1661-L1672 | [
"def",
"milestone",
"(",
"self",
",",
"number",
")",
":",
"json",
"=",
"None",
"if",
"int",
"(",
"number",
")",
">",
"0",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'milestones'",
",",
"str",
"(",
"number",
")",
",",
"base_url",
"=",
"self",... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.pages | Get information about this repository's pages site.
:returns: :class:`PagesInfo <github3.repos.pages.PagesInfo>` | aegea/packages/github3/repos/repo.py | def pages(self):
"""Get information about this repository's pages site.
:returns: :class:`PagesInfo <github3.repos.pages.PagesInfo>`
"""
url = self._build_url('pages', base_url=self._api)
json = self._json(self._get(url), 200)
return PagesInfo(json) if json else None | def pages(self):
"""Get information about this repository's pages site.
:returns: :class:`PagesInfo <github3.repos.pages.PagesInfo>`
"""
url = self._build_url('pages', base_url=self._api)
json = self._json(self._get(url), 200)
return PagesInfo(json) if json else None | [
"Get",
"information",
"about",
"this",
"repository",
"s",
"pages",
"site",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1675-L1682 | [
"def",
"pages",
"(",
"self",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'pages'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"json",
"=",
"self",
".",
"_json",
"(",
"self",
".",
"_get",
"(",
"url",
")",
",",
"200",
")",
"return",... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.pull_request | Get the pull request indicated by ``number``.
:param int number: (required), number of the pull request.
:returns: :class:`PullRequest <github3.pulls.PullRequest>` | aegea/packages/github3/repos/repo.py | def pull_request(self, number):
"""Get the pull request indicated by ``number``.
:param int number: (required), number of the pull request.
:returns: :class:`PullRequest <github3.pulls.PullRequest>`
"""
json = None
if int(number) > 0:
url = self._build_url('p... | def pull_request(self, number):
"""Get the pull request indicated by ``number``.
:param int number: (required), number of the pull request.
:returns: :class:`PullRequest <github3.pulls.PullRequest>`
"""
json = None
if int(number) > 0:
url = self._build_url('p... | [
"Get",
"the",
"pull",
"request",
"indicated",
"by",
"number",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1684-L1694 | [
"def",
"pull_request",
"(",
"self",
",",
"number",
")",
":",
"json",
"=",
"None",
"if",
"int",
"(",
"number",
")",
">",
"0",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'pulls'",
",",
"str",
"(",
"number",
")",
",",
"base_url",
"=",
"self",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.readme | Get the README for this repository.
:returns: :class:`Contents <github3.repos.contents.Contents>` | aegea/packages/github3/repos/repo.py | def readme(self):
"""Get the README for this repository.
:returns: :class:`Contents <github3.repos.contents.Contents>`
"""
url = self._build_url('readme', base_url=self._api)
json = self._json(self._get(url), 200)
return Contents(json, self) if json else None | def readme(self):
"""Get the README for this repository.
:returns: :class:`Contents <github3.repos.contents.Contents>`
"""
url = self._build_url('readme', base_url=self._api)
json = self._json(self._get(url), 200)
return Contents(json, self) if json else None | [
"Get",
"the",
"README",
"for",
"this",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1696-L1703 | [
"def",
"readme",
"(",
"self",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'readme'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"json",
"=",
"self",
".",
"_json",
"(",
"self",
".",
"_get",
"(",
"url",
")",
",",
"200",
")",
"return... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.ref | Get a reference pointed to by ``ref``.
The most common will be branches and tags. For a branch, you must
specify 'heads/branchname' and for a tag, 'tags/tagname'. Essentially,
the system should return any reference you provide it in the namespace,
including notes and stashes (provided t... | aegea/packages/github3/repos/repo.py | def ref(self, ref):
"""Get a reference pointed to by ``ref``.
The most common will be branches and tags. For a branch, you must
specify 'heads/branchname' and for a tag, 'tags/tagname'. Essentially,
the system should return any reference you provide it in the namespace,
includin... | def ref(self, ref):
"""Get a reference pointed to by ``ref``.
The most common will be branches and tags. For a branch, you must
specify 'heads/branchname' and for a tag, 'tags/tagname'. Essentially,
the system should return any reference you provide it in the namespace,
includin... | [
"Get",
"a",
"reference",
"pointed",
"to",
"by",
"ref",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1705-L1720 | [
"def",
"ref",
"(",
"self",
",",
"ref",
")",
":",
"json",
"=",
"None",
"if",
"ref",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'git'",
",",
"'refs'",
",",
"ref",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"json",
"=",
"self",
".",
"_... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.release | Get a single release.
:param int id: (required), id of release
:returns: :class:`Release <github3.repos.release.Release>` | aegea/packages/github3/repos/repo.py | def release(self, id):
"""Get a single release.
:param int id: (required), id of release
:returns: :class:`Release <github3.repos.release.Release>`
"""
json = None
if int(id) > 0:
url = self._build_url('releases', str(id), base_url=self._api)
json... | def release(self, id):
"""Get a single release.
:param int id: (required), id of release
:returns: :class:`Release <github3.repos.release.Release>`
"""
json = None
if int(id) > 0:
url = self._build_url('releases', str(id), base_url=self._api)
json... | [
"Get",
"a",
"single",
"release",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1722-L1732 | [
"def",
"release",
"(",
"self",
",",
"id",
")",
":",
"json",
"=",
"None",
"if",
"int",
"(",
"id",
")",
">",
"0",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'releases'",
",",
"str",
"(",
"id",
")",
",",
"base_url",
"=",
"self",
".",
"_api"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.remove_collaborator | Remove collaborator ``login`` from the repository.
:param str login: (required), login name of the collaborator
:returns: bool | aegea/packages/github3/repos/repo.py | def remove_collaborator(self, login):
"""Remove collaborator ``login`` from the repository.
:param str login: (required), login name of the collaborator
:returns: bool
"""
resp = False
if login:
url = self._build_url('collaborators', login, base_url=self._api... | def remove_collaborator(self, login):
"""Remove collaborator ``login`` from the repository.
:param str login: (required), login name of the collaborator
:returns: bool
"""
resp = False
if login:
url = self._build_url('collaborators', login, base_url=self._api... | [
"Remove",
"collaborator",
"login",
"from",
"the",
"repository",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1735-L1745 | [
"def",
"remove_collaborator",
"(",
"self",
",",
"login",
")",
":",
"resp",
"=",
"False",
"if",
"login",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'collaborators'",
",",
"login",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"resp",
"=",
"self... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.tag | Get an annotated tag.
http://learn.github.com/p/tagging.html
:param str sha: (required), sha of the object for this tag
:returns: :class:`Tag <github3.git.Tag>` | aegea/packages/github3/repos/repo.py | def tag(self, sha):
"""Get an annotated tag.
http://learn.github.com/p/tagging.html
:param str sha: (required), sha of the object for this tag
:returns: :class:`Tag <github3.git.Tag>`
"""
json = None
if sha:
url = self._build_url('git', 'tags', sha, ... | def tag(self, sha):
"""Get an annotated tag.
http://learn.github.com/p/tagging.html
:param str sha: (required), sha of the object for this tag
:returns: :class:`Tag <github3.git.Tag>`
"""
json = None
if sha:
url = self._build_url('git', 'tags', sha, ... | [
"Get",
"an",
"annotated",
"tag",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1772-L1784 | [
"def",
"tag",
"(",
"self",
",",
"sha",
")",
":",
"json",
"=",
"None",
"if",
"sha",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'git'",
",",
"'tags'",
",",
"sha",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"json",
"=",
"self",
".",
"_... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.tree | Get a tree.
:param str sha: (required), sha of the object for this tree
:returns: :class:`Tree <github3.git.Tree>` | aegea/packages/github3/repos/repo.py | def tree(self, sha):
"""Get a tree.
:param str sha: (required), sha of the object for this tree
:returns: :class:`Tree <github3.git.Tree>`
"""
json = None
if sha:
url = self._build_url('git', 'trees', sha, base_url=self._api)
json = self._json(sel... | def tree(self, sha):
"""Get a tree.
:param str sha: (required), sha of the object for this tree
:returns: :class:`Tree <github3.git.Tree>`
"""
json = None
if sha:
url = self._build_url('git', 'trees', sha, base_url=self._api)
json = self._json(sel... | [
"Get",
"a",
"tree",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1786-L1796 | [
"def",
"tree",
"(",
"self",
",",
"sha",
")",
":",
"json",
"=",
"None",
"if",
"sha",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'git'",
",",
"'trees'",
",",
"sha",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"json",
"=",
"self",
".",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.update_label | Update the label ``name``.
:param str name: (required), name of the label
:param str color: (required), color code
:param str new_name: (optional), new name of the label
:returns: bool | aegea/packages/github3/repos/repo.py | def update_label(self, name, color, new_name=''):
"""Update the label ``name``.
:param str name: (required), name of the label
:param str color: (required), color code
:param str new_name: (optional), new name of the label
:returns: bool
"""
label = self.label(na... | def update_label(self, name, color, new_name=''):
"""Update the label ``name``.
:param str name: (required), name of the label
:param str color: (required), color code
:param str new_name: (optional), new name of the label
:returns: bool
"""
label = self.label(na... | [
"Update",
"the",
"label",
"name",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1840-L1853 | [
"def",
"update_label",
"(",
"self",
",",
"name",
",",
"color",
",",
"new_name",
"=",
"''",
")",
":",
"label",
"=",
"self",
".",
"label",
"(",
"name",
")",
"resp",
"=",
"False",
"if",
"label",
":",
"upd",
"=",
"label",
".",
"update",
"resp",
"=",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Repository.weekly_commit_count | Returns the total commit counts.
The dictionary returned has two entries: ``all`` and ``owner``. Each
has a fifty-two element long list of commit counts. (Note: ``all``
includes the owner.) ``d['all'][0]`` will be the oldest week,
``d['all'][51]`` will be the most recent.
:retu... | aegea/packages/github3/repos/repo.py | def weekly_commit_count(self):
"""Returns the total commit counts.
The dictionary returned has two entries: ``all`` and ``owner``. Each
has a fifty-two element long list of commit counts. (Note: ``all``
includes the owner.) ``d['all'][0]`` will be the oldest week,
``d['all'][51]... | def weekly_commit_count(self):
"""Returns the total commit counts.
The dictionary returned has two entries: ``all`` and ``owner``. Each
has a fifty-two element long list of commit counts. (Note: ``all``
includes the owner.) ``d['all'][0]`` will be the oldest week,
``d['all'][51]... | [
"Returns",
"the",
"total",
"commit",
"counts",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L1855-L1882 | [
"def",
"weekly_commit_count",
"(",
"self",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'stats'",
",",
"'participation'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"resp",
"=",
"self",
".",
"_get",
"(",
"url",
")",
"if",
"resp",
".",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | rename | Supply two names: Existing instance name or ID, and new name to assign to the instance. | aegea/instance_ctl.py | def rename(args):
"""Supply two names: Existing instance name or ID, and new name to assign to the instance."""
old_name, new_name = args.names
add_tags(resources.ec2.Instance(resolve_instance_id(old_name)), Name=new_name, dry_run=args.dry_run) | def rename(args):
"""Supply two names: Existing instance name or ID, and new name to assign to the instance."""
old_name, new_name = args.names
add_tags(resources.ec2.Instance(resolve_instance_id(old_name)), Name=new_name, dry_run=args.dry_run) | [
"Supply",
"two",
"names",
":",
"Existing",
"instance",
"name",
"or",
"ID",
"and",
"new",
"name",
"to",
"assign",
"to",
"the",
"instance",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/instance_ctl.py#L40-L43 | [
"def",
"rename",
"(",
"args",
")",
":",
"old_name",
",",
"new_name",
"=",
"args",
".",
"names",
"add_tags",
"(",
"resources",
".",
"ec2",
".",
"Instance",
"(",
"resolve_instance_id",
"(",
"old_name",
")",
")",
",",
"Name",
"=",
"new_name",
",",
"dry_run"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Deployment.create_status | Create a new deployment status for this deployment.
:param str state: (required), The state of the status. Can be one of
``pending``, ``success``, ``error``, or ``failure``.
:param str target_url: The target URL to associate with this status.
This URL should contain output to ke... | aegea/packages/github3/repos/deployment.py | def create_status(self, state, target_url='', description=''):
"""Create a new deployment status for this deployment.
:param str state: (required), The state of the status. Can be one of
``pending``, ``success``, ``error``, or ``failure``.
:param str target_url: The target URL to as... | def create_status(self, state, target_url='', description=''):
"""Create a new deployment status for this deployment.
:param str state: (required), The state of the status. Can be one of
``pending``, ``success``, ``error``, or ``failure``.
:param str target_url: The target URL to as... | [
"Create",
"a",
"new",
"deployment",
"status",
"for",
"this",
"deployment",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/deployment.py#L53-L74 | [
"def",
"create_status",
"(",
"self",
",",
"state",
",",
"target_url",
"=",
"''",
",",
"description",
"=",
"''",
")",
":",
"json",
"=",
"None",
"if",
"state",
"in",
"(",
"'pending'",
",",
"'success'",
",",
"'error'",
",",
"'failure'",
")",
":",
"data",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Deployment.iter_statuses | Iterate over the deployment statuses for this deployment.
:param int number: (optional), the number of statuses to return.
Default: -1, returns all statuses.
:param str etag: (optional), the ETag header value from the last time
you iterated over the statuses.
:returns: g... | aegea/packages/github3/repos/deployment.py | def iter_statuses(self, number=-1, etag=None):
"""Iterate over the deployment statuses for this deployment.
:param int number: (optional), the number of statuses to return.
Default: -1, returns all statuses.
:param str etag: (optional), the ETag header value from the last time
... | def iter_statuses(self, number=-1, etag=None):
"""Iterate over the deployment statuses for this deployment.
:param int number: (optional), the number of statuses to return.
Default: -1, returns all statuses.
:param str etag: (optional), the ETag header value from the last time
... | [
"Iterate",
"over",
"the",
"deployment",
"statuses",
"for",
"this",
"deployment",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/deployment.py#L76-L88 | [
"def",
"iter_statuses",
"(",
"self",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"i",
"=",
"self",
".",
"_iter",
"(",
"int",
"(",
"number",
")",
",",
"self",
".",
"statuses_url",
",",
"DeploymentStatus",
",",
"etag",
"=",
"eta... | 94957e9dba036eae3052e2662c208b259c08399a |
train | GistHistory.get_gist | Retrieve the gist at this version.
:returns: :class:`Gist <github3.gists.gist.Gist>` | aegea/packages/github3/gists/history.py | def get_gist(self):
"""Retrieve the gist at this version.
:returns: :class:`Gist <github3.gists.gist.Gist>`
"""
from .gist import Gist
json = self._json(self._get(self._api), 200)
return Gist(json, self) | def get_gist(self):
"""Retrieve the gist at this version.
:returns: :class:`Gist <github3.gists.gist.Gist>`
"""
from .gist import Gist
json = self._json(self._get(self._api), 200)
return Gist(json, self) | [
"Retrieve",
"the",
"gist",
"at",
"this",
"version",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/gists/history.py#L60-L68 | [
"def",
"get_gist",
"(",
"self",
")",
":",
"from",
".",
"gist",
"import",
"Gist",
"json",
"=",
"self",
".",
"_json",
"(",
"self",
".",
"_get",
"(",
"self",
".",
"_api",
")",
",",
"200",
")",
"return",
"Gist",
"(",
"json",
",",
"self",
")"
] | 94957e9dba036eae3052e2662c208b259c08399a |
train | Reference.update | Update this reference.
:param str sha: (required), sha of the reference
:param bool force: (optional), force the update or not
:returns: bool | aegea/packages/github3/git.py | def update(self, sha, force=False):
"""Update this reference.
:param str sha: (required), sha of the reference
:param bool force: (optional), force the update or not
:returns: bool
"""
data = {'sha': sha, 'force': force}
json = self._json(self._patch(self._api, ... | def update(self, sha, force=False):
"""Update this reference.
:param str sha: (required), sha of the reference
:param bool force: (optional), force the update or not
:returns: bool
"""
data = {'sha': sha, 'force': force}
json = self._json(self._patch(self._api, ... | [
"Update",
"this",
"reference",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/git.py#L148-L161 | [
"def",
"update",
"(",
"self",
",",
"sha",
",",
"force",
"=",
"False",
")",
":",
"data",
"=",
"{",
"'sha'",
":",
"sha",
",",
"'force'",
":",
"force",
"}",
"json",
"=",
"self",
".",
"_json",
"(",
"self",
".",
"_patch",
"(",
"self",
".",
"_api",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Tree.recurse | Recurse into the tree.
:returns: :class:`Tree <Tree>` | aegea/packages/github3/git.py | def recurse(self):
"""Recurse into the tree.
:returns: :class:`Tree <Tree>`
"""
json = self._json(self._get(self._api, params={'recursive': '1'}),
200)
return Tree(json, self._session) if json else None | def recurse(self):
"""Recurse into the tree.
:returns: :class:`Tree <Tree>`
"""
json = self._json(self._get(self._api, params={'recursive': '1'}),
200)
return Tree(json, self._session) if json else None | [
"Recurse",
"into",
"the",
"tree",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/git.py#L216-L223 | [
"def",
"recurse",
"(",
"self",
")",
":",
"json",
"=",
"self",
".",
"_json",
"(",
"self",
".",
"_get",
"(",
"self",
".",
"_api",
",",
"params",
"=",
"{",
"'recursive'",
":",
"'1'",
"}",
")",
",",
"200",
")",
"return",
"Tree",
"(",
"json",
",",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | format_table | Table pretty printer. Expects tables to be given as arrays of arrays::
print(format_table([[1, "2"], [3, "456"]], column_names=['A', 'B'])) | aegea/util/printing.py | def format_table(table, column_names=None, column_specs=None, max_col_width=32, auto_col_width=False):
"""
Table pretty printer. Expects tables to be given as arrays of arrays::
print(format_table([[1, "2"], [3, "456"]], column_names=['A', 'B']))
"""
orig_col_args = dict(column_names=column_nam... | def format_table(table, column_names=None, column_specs=None, max_col_width=32, auto_col_width=False):
"""
Table pretty printer. Expects tables to be given as arrays of arrays::
print(format_table([[1, "2"], [3, "456"]], column_names=['A', 'B']))
"""
orig_col_args = dict(column_names=column_nam... | [
"Table",
"pretty",
"printer",
".",
"Expects",
"tables",
"to",
"be",
"given",
"as",
"arrays",
"of",
"arrays",
"::"
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/util/printing.py#L81-L148 | [
"def",
"format_table",
"(",
"table",
",",
"column_names",
"=",
"None",
",",
"column_specs",
"=",
"None",
",",
"max_col_width",
"=",
"32",
",",
"auto_col_width",
"=",
"False",
")",
":",
"orig_col_args",
"=",
"dict",
"(",
"column_names",
"=",
"column_names",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | get | Get an Aegea configuration parameter by name | aegea/aegea_config.py | def get(args):
"""Get an Aegea configuration parameter by name"""
from . import config
for key in args.key.split("."):
config = getattr(config, key)
print(json.dumps(config)) | def get(args):
"""Get an Aegea configuration parameter by name"""
from . import config
for key in args.key.split("."):
config = getattr(config, key)
print(json.dumps(config)) | [
"Get",
"an",
"Aegea",
"configuration",
"parameter",
"by",
"name"
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/aegea_config.py#L37-L42 | [
"def",
"get",
"(",
"args",
")",
":",
"from",
".",
"import",
"config",
"for",
"key",
"in",
"args",
".",
"key",
".",
"split",
"(",
"\".\"",
")",
":",
"config",
"=",
"getattr",
"(",
"config",
",",
"key",
")",
"print",
"(",
"json",
".",
"dumps",
"(",... | 94957e9dba036eae3052e2662c208b259c08399a |
train | set | Set an Aegea configuration parameter to a given value | aegea/aegea_config.py | def set(args):
"""Set an Aegea configuration parameter to a given value"""
from . import config, tweak
class ConfigSaver(tweak.Config):
@property
def config_files(self):
return [config.config_files[2]]
config_saver = ConfigSaver(use_yaml=True, save_on_exit=False)
c = co... | def set(args):
"""Set an Aegea configuration parameter to a given value"""
from . import config, tweak
class ConfigSaver(tweak.Config):
@property
def config_files(self):
return [config.config_files[2]]
config_saver = ConfigSaver(use_yaml=True, save_on_exit=False)
c = co... | [
"Set",
"an",
"Aegea",
"configuration",
"parameter",
"to",
"a",
"given",
"value"
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/aegea_config.py#L47-L65 | [
"def",
"set",
"(",
"args",
")",
":",
"from",
".",
"import",
"config",
",",
"tweak",
"class",
"ConfigSaver",
"(",
"tweak",
".",
"Config",
")",
":",
"@",
"property",
"def",
"config_files",
"(",
"self",
")",
":",
"return",
"[",
"config",
".",
"config_file... | 94957e9dba036eae3052e2662c208b259c08399a |
train | authorize | Obtain an authorization token for the GitHub API.
:param str login: (required)
:param str password: (required)
:param list scopes: (required), areas you want this token to apply to,
i.e., 'gist', 'user'
:param str note: (optional), note about the authorization
:param str note_url: (optional... | aegea/packages/github3/api.py | def authorize(login, password, scopes, note='', note_url='', client_id='',
client_secret='', two_factor_callback=None):
"""Obtain an authorization token for the GitHub API.
:param str login: (required)
:param str password: (required)
:param list scopes: (required), areas you want this tok... | def authorize(login, password, scopes, note='', note_url='', client_id='',
client_secret='', two_factor_callback=None):
"""Obtain an authorization token for the GitHub API.
:param str login: (required)
:param str password: (required)
:param list scopes: (required), areas you want this tok... | [
"Obtain",
"an",
"authorization",
"token",
"for",
"the",
"GitHub",
"API",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/api.py#L16-L38 | [
"def",
"authorize",
"(",
"login",
",",
"password",
",",
"scopes",
",",
"note",
"=",
"''",
",",
"note_url",
"=",
"''",
",",
"client_id",
"=",
"''",
",",
"client_secret",
"=",
"''",
",",
"two_factor_callback",
"=",
"None",
")",
":",
"gh",
"=",
"GitHub",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | login | Construct and return an authenticated GitHub session.
This will return a GitHubEnterprise session if a url is provided.
:param str username: login name
:param str password: password for the login
:param str token: OAuth token
:param str url: (optional), URL of a GitHub Enterprise instance
:par... | aegea/packages/github3/api.py | def login(username=None, password=None, token=None, url=None,
two_factor_callback=None):
"""Construct and return an authenticated GitHub session.
This will return a GitHubEnterprise session if a url is provided.
:param str username: login name
:param str password: password for the login
... | def login(username=None, password=None, token=None, url=None,
two_factor_callback=None):
"""Construct and return an authenticated GitHub session.
This will return a GitHubEnterprise session if a url is provided.
:param str username: login name
:param str password: password for the login
... | [
"Construct",
"and",
"return",
"an",
"authenticated",
"GitHub",
"session",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/api.py#L41-L62 | [
"def",
"login",
"(",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"token",
"=",
"None",
",",
"url",
"=",
"None",
",",
"two_factor_callback",
"=",
"None",
")",
":",
"g",
"=",
"None",
"if",
"(",
"username",
"and",
"password",
")",
"or",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | iter_followers | List the followers of ``username``.
:param str username: (required), login of the person to list the followers
of
:param int number: (optional), number of followers to return, Default: -1,
return all of them
:param str etag: (optional), ETag from a previous request to the same
endpo... | aegea/packages/github3/api.py | def iter_followers(username, number=-1, etag=None):
"""List the followers of ``username``.
:param str username: (required), login of the person to list the followers
of
:param int number: (optional), number of followers to return, Default: -1,
return all of them
:param str etag: (option... | def iter_followers(username, number=-1, etag=None):
"""List the followers of ``username``.
:param str username: (required), login of the person to list the followers
of
:param int number: (optional), number of followers to return, Default: -1,
return all of them
:param str etag: (option... | [
"List",
"the",
"followers",
"of",
"username",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/api.py#L137-L149 | [
"def",
"iter_followers",
"(",
"username",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"return",
"gh",
".",
"iter_followers",
"(",
"username",
",",
"number",
",",
"etag",
")",
"if",
"username",
"else",
"[",
"]"
] | 94957e9dba036eae3052e2662c208b259c08399a |
train | iter_following | List the people ``username`` follows.
:param str username: (required), login of the user
:param int number: (optional), number of users being followed by username
to return. Default: -1, return all of them
:param str etag: (optional), ETag from a previous request to the same
endpoint
:r... | aegea/packages/github3/api.py | def iter_following(username, number=-1, etag=None):
"""List the people ``username`` follows.
:param str username: (required), login of the user
:param int number: (optional), number of users being followed by username
to return. Default: -1, return all of them
:param str etag: (optional), ETag ... | def iter_following(username, number=-1, etag=None):
"""List the people ``username`` follows.
:param str username: (required), login of the user
:param int number: (optional), number of users being followed by username
to return. Default: -1, return all of them
:param str etag: (optional), ETag ... | [
"List",
"the",
"people",
"username",
"follows",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/api.py#L152-L163 | [
"def",
"iter_following",
"(",
"username",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"return",
"gh",
".",
"iter_following",
"(",
"username",
",",
"number",
",",
"etag",
")",
"if",
"username",
"else",
"[",
"]"
] | 94957e9dba036eae3052e2662c208b259c08399a |
train | iter_repo_issues | List issues on owner/repository. Only owner and repository are
required.
.. versionchanged:: 0.9.0
- The ``state`` parameter now accepts 'all' in addition to 'open'
and 'closed'.
:param str owner: login of the owner of the repository
:param str repository: name of the repository
... | aegea/packages/github3/api.py | def iter_repo_issues(owner, repository, milestone=None, state=None,
assignee=None, mentioned=None, labels=None, sort=None,
direction=None, since=None, number=-1, etag=None):
"""List issues on owner/repository. Only owner and repository are
required.
.. versionchang... | def iter_repo_issues(owner, repository, milestone=None, state=None,
assignee=None, mentioned=None, labels=None, sort=None,
direction=None, since=None, number=-1, etag=None):
"""List issues on owner/repository. Only owner and repository are
required.
.. versionchang... | [
"List",
"issues",
"on",
"owner",
"/",
"repository",
".",
"Only",
"owner",
"and",
"repository",
"are",
"required",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/api.py#L181-L220 | [
"def",
"iter_repo_issues",
"(",
"owner",
",",
"repository",
",",
"milestone",
"=",
"None",
",",
"state",
"=",
"None",
",",
"assignee",
"=",
"None",
",",
"mentioned",
"=",
"None",
",",
"labels",
"=",
"None",
",",
"sort",
"=",
"None",
",",
"direction",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | iter_orgs | List the organizations associated with ``username``.
:param str username: (required), login of the user
:param int number: (optional), number of orgs to return. Default: -1,
return all of the issues
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns:... | aegea/packages/github3/api.py | def iter_orgs(username, number=-1, etag=None):
"""List the organizations associated with ``username``.
:param str username: (required), login of the user
:param int number: (optional), number of orgs to return. Default: -1,
return all of the issues
:param str etag: (optional), ETag from a previ... | def iter_orgs(username, number=-1, etag=None):
"""List the organizations associated with ``username``.
:param str username: (required), login of the user
:param int number: (optional), number of orgs to return. Default: -1,
return all of the issues
:param str etag: (optional), ETag from a previ... | [
"List",
"the",
"organizations",
"associated",
"with",
"username",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/api.py#L223-L235 | [
"def",
"iter_orgs",
"(",
"username",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"return",
"gh",
".",
"iter_orgs",
"(",
"username",
",",
"number",
",",
"etag",
")",
"if",
"username",
"else",
"[",
"]"
] | 94957e9dba036eae3052e2662c208b259c08399a |
train | iter_user_repos | List public repositories for the specified ``login``.
.. versionadded:: 0.6
.. note:: This replaces github3.iter_repos
:param str login: (required)
:param str type: (optional), accepted values:
('all', 'owner', 'member')
API default: 'all'
:param str sort: (optional), accepted val... | aegea/packages/github3/api.py | def iter_user_repos(login, type=None, sort=None, direction=None, number=-1,
etag=None):
"""List public repositories for the specified ``login``.
.. versionadded:: 0.6
.. note:: This replaces github3.iter_repos
:param str login: (required)
:param str type: (optional), accepted ... | def iter_user_repos(login, type=None, sort=None, direction=None, number=-1,
etag=None):
"""List public repositories for the specified ``login``.
.. versionadded:: 0.6
.. note:: This replaces github3.iter_repos
:param str login: (required)
:param str type: (optional), accepted ... | [
"List",
"public",
"repositories",
"for",
"the",
"specified",
"login",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/api.py#L238-L266 | [
"def",
"iter_user_repos",
"(",
"login",
",",
"type",
"=",
"None",
",",
"sort",
"=",
"None",
",",
"direction",
"=",
"None",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"if",
"login",
":",
"return",
"gh",
".",
"iter_user_repos",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | markdown | Render an arbitrary markdown document.
:param str text: (required), the text of the document to render
:param str mode: (optional), 'markdown' or 'gfm'
:param str context: (optional), only important when using mode 'gfm',
this is the repository to use as the context for the rendering
:param boo... | aegea/packages/github3/api.py | def markdown(text, mode='', context='', raw=False):
"""Render an arbitrary markdown document.
:param str text: (required), the text of the document to render
:param str mode: (optional), 'markdown' or 'gfm'
:param str context: (optional), only important when using mode 'gfm',
this is the reposi... | def markdown(text, mode='', context='', raw=False):
"""Render an arbitrary markdown document.
:param str text: (required), the text of the document to render
:param str mode: (optional), 'markdown' or 'gfm'
:param str context: (optional), only important when using mode 'gfm',
this is the reposi... | [
"Render",
"an",
"arbitrary",
"markdown",
"document",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/api.py#L323-L335 | [
"def",
"markdown",
"(",
"text",
",",
"mode",
"=",
"''",
",",
"context",
"=",
"''",
",",
"raw",
"=",
"False",
")",
":",
"return",
"gh",
".",
"markdown",
"(",
"text",
",",
"mode",
",",
"context",
",",
"raw",
")"
] | 94957e9dba036eae3052e2662c208b259c08399a |
train | search_repositories | Find repositories via various criteria.
.. warning::
You will only be able to make 5 calls with this or other search
functions. To raise the rate-limit on this set of endpoints, create an
authenticated :class:`GitHub <github3.github.GitHub>` Session with
``login``.
The query c... | aegea/packages/github3/api.py | def search_repositories(query, sort=None, order=None, per_page=None,
text_match=False, number=-1, etag=None):
"""Find repositories via various criteria.
.. warning::
You will only be able to make 5 calls with this or other search
functions. To raise the rate-limit on th... | def search_repositories(query, sort=None, order=None, per_page=None,
text_match=False, number=-1, etag=None):
"""Find repositories via various criteria.
.. warning::
You will only be able to make 5 calls with this or other search
functions. To raise the rate-limit on th... | [
"Find",
"repositories",
"via",
"various",
"criteria",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/api.py#L488-L537 | [
"def",
"search_repositories",
"(",
"query",
",",
"sort",
"=",
"None",
",",
"order",
"=",
"None",
",",
"per_page",
"=",
"None",
",",
"text_match",
"=",
"False",
",",
"number",
"=",
"-",
"1",
",",
"etag",
"=",
"None",
")",
":",
"return",
"gh",
".",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | limits | Describe limits in effect on your AWS account. See also https://console.aws.amazon.com/ec2/v2/home#Limits: | aegea/ls.py | def limits(args):
"""
Describe limits in effect on your AWS account. See also https://console.aws.amazon.com/ec2/v2/home#Limits:
"""
# https://aws.amazon.com/about-aws/whats-new/2014/06/19/amazon-ec2-service-limits-report-now-available/
# Console-only APIs: getInstanceLimits, getAccountLimits, getAu... | def limits(args):
"""
Describe limits in effect on your AWS account. See also https://console.aws.amazon.com/ec2/v2/home#Limits:
"""
# https://aws.amazon.com/about-aws/whats-new/2014/06/19/amazon-ec2-service-limits-report-now-available/
# Console-only APIs: getInstanceLimits, getAccountLimits, getAu... | [
"Describe",
"limits",
"in",
"effect",
"on",
"your",
"AWS",
"account",
".",
"See",
"also",
"https",
":",
"//",
"console",
".",
"aws",
".",
"amazon",
".",
"com",
"/",
"ec2",
"/",
"v2",
"/",
"home#Limits",
":"
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/ls.py#L271-L280 | [
"def",
"limits",
"(",
"args",
")",
":",
"# https://aws.amazon.com/about-aws/whats-new/2014/06/19/amazon-ec2-service-limits-report-now-available/",
"# Console-only APIs: getInstanceLimits, getAccountLimits, getAutoscalingLimits, getHostLimits",
"# http://boto3.readthedocs.io/en/latest/reference/servi... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Issue.add_labels | Add labels to this issue.
:param str args: (required), names of the labels you wish to add
:returns: list of :class:`Label`\ s | aegea/packages/github3/issues/issue.py | def add_labels(self, *args):
"""Add labels to this issue.
:param str args: (required), names of the labels you wish to add
:returns: list of :class:`Label`\ s
"""
url = self._build_url('labels', base_url=self._api)
json = self._json(self._post(url, data=args), 200)
... | def add_labels(self, *args):
"""Add labels to this issue.
:param str args: (required), names of the labels you wish to add
:returns: list of :class:`Label`\ s
"""
url = self._build_url('labels', base_url=self._api)
json = self._json(self._post(url, data=args), 200)
... | [
"Add",
"labels",
"to",
"this",
"issue",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/issues/issue.py#L105-L113 | [
"def",
"add_labels",
"(",
"self",
",",
"*",
"args",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'labels'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"json",
"=",
"self",
".",
"_json",
"(",
"self",
".",
"_post",
"(",
"url",
",",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Issue.assign | Assigns user ``login`` to this issue. This is a short cut for
``issue.edit``.
:param str login: username of the person to assign this issue to
:returns: bool | aegea/packages/github3/issues/issue.py | def assign(self, login):
"""Assigns user ``login`` to this issue. This is a short cut for
``issue.edit``.
:param str login: username of the person to assign this issue to
:returns: bool
"""
if not login:
return False
number = self.milestone.number if ... | def assign(self, login):
"""Assigns user ``login`` to this issue. This is a short cut for
``issue.edit``.
:param str login: username of the person to assign this issue to
:returns: bool
"""
if not login:
return False
number = self.milestone.number if ... | [
"Assigns",
"user",
"login",
"to",
"this",
"issue",
".",
"This",
"is",
"a",
"short",
"cut",
"for",
"issue",
".",
"edit",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/issues/issue.py#L116-L128 | [
"def",
"assign",
"(",
"self",
",",
"login",
")",
":",
"if",
"not",
"login",
":",
"return",
"False",
"number",
"=",
"self",
".",
"milestone",
".",
"number",
"if",
"self",
".",
"milestone",
"else",
"None",
"labels",
"=",
"[",
"str",
"(",
"l",
")",
"f... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Issue.comment | Get a single comment by its id.
The catch here is that id is NOT a simple number to obtain. If
you were to look at the comments on issue #15 in
sigmavirus24/Todo.txt-python, the first comment's id is 4150787.
:param int id_num: (required), comment id, see example above
:returns... | aegea/packages/github3/issues/issue.py | def comment(self, id_num):
"""Get a single comment by its id.
The catch here is that id is NOT a simple number to obtain. If
you were to look at the comments on issue #15 in
sigmavirus24/Todo.txt-python, the first comment's id is 4150787.
:param int id_num: (required), comment ... | def comment(self, id_num):
"""Get a single comment by its id.
The catch here is that id is NOT a simple number to obtain. If
you were to look at the comments on issue #15 in
sigmavirus24/Todo.txt-python, the first comment's id is 4150787.
:param int id_num: (required), comment ... | [
"Get",
"a",
"single",
"comment",
"by",
"its",
"id",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/issues/issue.py#L142-L158 | [
"def",
"comment",
"(",
"self",
",",
"id_num",
")",
":",
"json",
"=",
"None",
"if",
"int",
"(",
"id_num",
")",
">",
"0",
":",
"# Might as well check that it's positive",
"owner",
",",
"repo",
"=",
"self",
".",
"repository",
"url",
"=",
"self",
".",
"_buil... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Issue.create_comment | Create a comment on this issue.
:param str body: (required), comment body
:returns: :class:`IssueComment <github3.issues.comment.IssueComment>` | aegea/packages/github3/issues/issue.py | def create_comment(self, body):
"""Create a comment on this issue.
:param str body: (required), comment body
:returns: :class:`IssueComment <github3.issues.comment.IssueComment>`
"""
json = None
if body:
url = self._build_url('comments', base_url=self._api)
... | def create_comment(self, body):
"""Create a comment on this issue.
:param str body: (required), comment body
:returns: :class:`IssueComment <github3.issues.comment.IssueComment>`
"""
json = None
if body:
url = self._build_url('comments', base_url=self._api)
... | [
"Create",
"a",
"comment",
"on",
"this",
"issue",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/issues/issue.py#L161-L172 | [
"def",
"create_comment",
"(",
"self",
",",
"body",
")",
":",
"json",
"=",
"None",
"if",
"body",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'comments'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"json",
"=",
"self",
".",
"_json",
"(",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Issue.edit | Edit this issue.
:param str title: Title of the issue
:param str body: markdown formatted body (description) of the issue
:param str assignee: login name of user the issue should be assigned
to
:param str state: accepted values: ('open', 'closed')
:param int mileston... | aegea/packages/github3/issues/issue.py | def edit(self, title=None, body=None, assignee=None, state=None,
milestone=None, labels=None):
"""Edit this issue.
:param str title: Title of the issue
:param str body: markdown formatted body (description) of the issue
:param str assignee: login name of user the issue shou... | def edit(self, title=None, body=None, assignee=None, state=None,
milestone=None, labels=None):
"""Edit this issue.
:param str title: Title of the issue
:param str body: markdown formatted body (description) of the issue
:param str assignee: login name of user the issue shou... | [
"Edit",
"this",
"issue",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/issues/issue.py#L175-L203 | [
"def",
"edit",
"(",
"self",
",",
"title",
"=",
"None",
",",
"body",
"=",
"None",
",",
"assignee",
"=",
"None",
",",
"state",
"=",
"None",
",",
"milestone",
"=",
"None",
",",
"labels",
"=",
"None",
")",
":",
"json",
"=",
"None",
"data",
"=",
"{",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Issue.iter_comments | Iterate over the comments on this issue.
:param int number: (optional), number of comments to iterate over
:returns: iterator of
:class:`IssueComment <github3.issues.comment.IssueComment>`\ s | aegea/packages/github3/issues/issue.py | def iter_comments(self, number=-1):
"""Iterate over the comments on this issue.
:param int number: (optional), number of comments to iterate over
:returns: iterator of
:class:`IssueComment <github3.issues.comment.IssueComment>`\ s
"""
url = self._build_url('comments'... | def iter_comments(self, number=-1):
"""Iterate over the comments on this issue.
:param int number: (optional), number of comments to iterate over
:returns: iterator of
:class:`IssueComment <github3.issues.comment.IssueComment>`\ s
"""
url = self._build_url('comments'... | [
"Iterate",
"over",
"the",
"comments",
"on",
"this",
"issue",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/issues/issue.py#L214-L222 | [
"def",
"iter_comments",
"(",
"self",
",",
"number",
"=",
"-",
"1",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'comments'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"self",
".",
"_iter",
"(",
"int",
"(",
"number",
")",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Issue.iter_events | Iterate over events associated with this issue only.
:param int number: (optional), number of events to return. Default: -1
returns all events available.
:returns: generator of
:class:`IssueEvent <github3.issues.event.IssueEvent>`\ s | aegea/packages/github3/issues/issue.py | def iter_events(self, number=-1):
"""Iterate over events associated with this issue only.
:param int number: (optional), number of events to return. Default: -1
returns all events available.
:returns: generator of
:class:`IssueEvent <github3.issues.event.IssueEvent>`\ s
... | def iter_events(self, number=-1):
"""Iterate over events associated with this issue only.
:param int number: (optional), number of events to return. Default: -1
returns all events available.
:returns: generator of
:class:`IssueEvent <github3.issues.event.IssueEvent>`\ s
... | [
"Iterate",
"over",
"events",
"associated",
"with",
"this",
"issue",
"only",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/issues/issue.py#L224-L233 | [
"def",
"iter_events",
"(",
"self",
",",
"number",
"=",
"-",
"1",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'events'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"return",
"self",
".",
"_iter",
"(",
"int",
"(",
"number",
")",
",",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Issue.remove_label | Removes label ``name`` from this issue.
:param str name: (required), name of the label to remove
:returns: bool | aegea/packages/github3/issues/issue.py | def remove_label(self, name):
"""Removes label ``name`` from this issue.
:param str name: (required), name of the label to remove
:returns: bool
"""
url = self._build_url('labels', name, base_url=self._api)
# Docs say it should be a list of strings returned, practice say... | def remove_label(self, name):
"""Removes label ``name`` from this issue.
:param str name: (required), name of the label to remove
:returns: bool
"""
url = self._build_url('labels', name, base_url=self._api)
# Docs say it should be a list of strings returned, practice say... | [
"Removes",
"label",
"name",
"from",
"this",
"issue",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/issues/issue.py#L248-L258 | [
"def",
"remove_label",
"(",
"self",
",",
"name",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'labels'",
",",
"name",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"# Docs say it should be a list of strings returned, practice says it",
"# is just a 204/4... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Issue.replace_labels | Replace all labels on this issue with ``labels``.
:param list labels: label names
:returns: bool | aegea/packages/github3/issues/issue.py | def replace_labels(self, labels):
"""Replace all labels on this issue with ``labels``.
:param list labels: label names
:returns: bool
"""
url = self._build_url('labels', base_url=self._api)
json = self._json(self._put(url, data=dumps(labels)), 200)
return [Label(... | def replace_labels(self, labels):
"""Replace all labels on this issue with ``labels``.
:param list labels: label names
:returns: bool
"""
url = self._build_url('labels', base_url=self._api)
json = self._json(self._put(url, data=dumps(labels)), 200)
return [Label(... | [
"Replace",
"all",
"labels",
"on",
"this",
"issue",
"with",
"labels",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/issues/issue.py#L270-L278 | [
"def",
"replace_labels",
"(",
"self",
",",
"labels",
")",
":",
"url",
"=",
"self",
".",
"_build_url",
"(",
"'labels'",
",",
"base_url",
"=",
"self",
".",
"_api",
")",
"json",
"=",
"self",
".",
"_json",
"(",
"self",
".",
"_put",
"(",
"url",
",",
"da... | 94957e9dba036eae3052e2662c208b259c08399a |
train | Issue.reopen | Re-open a closed issue.
:returns: bool | aegea/packages/github3/issues/issue.py | def reopen(self):
"""Re-open a closed issue.
:returns: bool
"""
assignee = self.assignee.login if self.assignee else ''
number = self.milestone.number if self.milestone else None
labels = [str(l) for l in self.labels]
return self.edit(self.title, self.body, assig... | def reopen(self):
"""Re-open a closed issue.
:returns: bool
"""
assignee = self.assignee.login if self.assignee else ''
number = self.milestone.number if self.milestone else None
labels = [str(l) for l in self.labels]
return self.edit(self.title, self.body, assig... | [
"Re",
"-",
"open",
"a",
"closed",
"issue",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/issues/issue.py#L281-L290 | [
"def",
"reopen",
"(",
"self",
")",
":",
"assignee",
"=",
"self",
".",
"assignee",
".",
"login",
"if",
"self",
".",
"assignee",
"else",
"''",
"number",
"=",
"self",
".",
"milestone",
".",
"number",
"if",
"self",
".",
"milestone",
"else",
"None",
"labels... | 94957e9dba036eae3052e2662c208b259c08399a |
train | GitHubObject._strptime | Convert an ISO 8601 formatted string in UTC into a
timezone-aware datetime object. | aegea/packages/github3/models.py | def _strptime(self, time_str):
"""Convert an ISO 8601 formatted string in UTC into a
timezone-aware datetime object."""
if time_str:
# Parse UTC string into naive datetime, then add timezone
dt = datetime.strptime(time_str, __timeformat__)
return dt.replace(tz... | def _strptime(self, time_str):
"""Convert an ISO 8601 formatted string in UTC into a
timezone-aware datetime object."""
if time_str:
# Parse UTC string into naive datetime, then add timezone
dt = datetime.strptime(time_str, __timeformat__)
return dt.replace(tz... | [
"Convert",
"an",
"ISO",
"8601",
"formatted",
"string",
"in",
"UTC",
"into",
"a",
"timezone",
"-",
"aware",
"datetime",
"object",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/models.py#L39-L46 | [
"def",
"_strptime",
"(",
"self",
",",
"time_str",
")",
":",
"if",
"time_str",
":",
"# Parse UTC string into naive datetime, then add timezone",
"dt",
"=",
"datetime",
".",
"strptime",
"(",
"time_str",
",",
"__timeformat__",
")",
"return",
"dt",
".",
"replace",
"("... | 94957e9dba036eae3052e2662c208b259c08399a |
train | GitHubCore._iter | Generic iterator for this project.
:param int count: How many items to return.
:param int url: First URL to start with
:param class cls: cls to return an object of
:param params dict: (optional) Parameters for the request
:param str etag: (optional), ETag from the last call | aegea/packages/github3/models.py | def _iter(self, count, url, cls, params=None, etag=None):
"""Generic iterator for this project.
:param int count: How many items to return.
:param int url: First URL to start with
:param class cls: cls to return an object of
:param params dict: (optional) Parameters for the requ... | def _iter(self, count, url, cls, params=None, etag=None):
"""Generic iterator for this project.
:param int count: How many items to return.
:param int url: First URL to start with
:param class cls: cls to return an object of
:param params dict: (optional) Parameters for the requ... | [
"Generic",
"iterator",
"for",
"this",
"project",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/models.py#L163-L173 | [
"def",
"_iter",
"(",
"self",
",",
"count",
",",
"url",
",",
"cls",
",",
"params",
"=",
"None",
",",
"etag",
"=",
"None",
")",
":",
"from",
".",
"structs",
"import",
"GitHubIterator",
"return",
"GitHubIterator",
"(",
"count",
",",
"url",
",",
"cls",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | GitHubCore.ratelimit_remaining | Number of requests before GitHub imposes a ratelimit.
:returns: int | aegea/packages/github3/models.py | def ratelimit_remaining(self):
"""Number of requests before GitHub imposes a ratelimit.
:returns: int
"""
json = self._json(self._get(self._github_url + '/rate_limit'), 200)
core = json.get('resources', {}).get('core', {})
self._remaining = core.get('remaining', 0)
... | def ratelimit_remaining(self):
"""Number of requests before GitHub imposes a ratelimit.
:returns: int
"""
json = self._json(self._get(self._github_url + '/rate_limit'), 200)
core = json.get('resources', {}).get('core', {})
self._remaining = core.get('remaining', 0)
... | [
"Number",
"of",
"requests",
"before",
"GitHub",
"imposes",
"a",
"ratelimit",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/models.py#L176-L184 | [
"def",
"ratelimit_remaining",
"(",
"self",
")",
":",
"json",
"=",
"self",
".",
"_json",
"(",
"self",
".",
"_get",
"(",
"self",
".",
"_github_url",
"+",
"'/rate_limit'",
")",
",",
"200",
")",
"core",
"=",
"json",
".",
"get",
"(",
"'resources'",
",",
"... | 94957e9dba036eae3052e2662c208b259c08399a |
train | GitHubCore.refresh | Re-retrieve the information for this object and returns the
refreshed instance.
:param bool conditional: If True, then we will search for a stored
header ('Last-Modified', or 'ETag') on the object and send that
as described in the `Conditional Requests`_ section of the docs
... | aegea/packages/github3/models.py | def refresh(self, conditional=False):
"""Re-retrieve the information for this object and returns the
refreshed instance.
:param bool conditional: If True, then we will search for a stored
header ('Last-Modified', or 'ETag') on the object and send that
as described in the... | def refresh(self, conditional=False):
"""Re-retrieve the information for this object and returns the
refreshed instance.
:param bool conditional: If True, then we will search for a stored
header ('Last-Modified', or 'ETag') on the object and send that
as described in the... | [
"Re",
"-",
"retrieve",
"the",
"information",
"for",
"this",
"object",
"and",
"returns",
"the",
"refreshed",
"instance",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/models.py#L186-L223 | [
"def",
"refresh",
"(",
"self",
",",
"conditional",
"=",
"False",
")",
":",
"headers",
"=",
"{",
"}",
"if",
"conditional",
":",
"if",
"self",
".",
"last_modified",
":",
"headers",
"[",
"'If-Modified-Since'",
"]",
"=",
"self",
".",
"last_modified",
"elif",
... | 94957e9dba036eae3052e2662c208b259c08399a |
train | BaseComment.edit | Edit this comment.
:param str body: (required), new body of the comment, Markdown
formatted
:returns: bool | aegea/packages/github3/models.py | def edit(self, body):
"""Edit this comment.
:param str body: (required), new body of the comment, Markdown
formatted
:returns: bool
"""
if body:
json = self._json(self._patch(self._api,
data=dumps({'body': body})), 200)
... | def edit(self, body):
"""Edit this comment.
:param str body: (required), new body of the comment, Markdown
formatted
:returns: bool
"""
if body:
json = self._json(self._patch(self._api,
data=dumps({'body': body})), 200)
... | [
"Edit",
"this",
"comment",
"."
] | kislyuk/aegea | python | https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/models.py#L267-L280 | [
"def",
"edit",
"(",
"self",
",",
"body",
")",
":",
"if",
"body",
":",
"json",
"=",
"self",
".",
"_json",
"(",
"self",
".",
"_patch",
"(",
"self",
".",
"_api",
",",
"data",
"=",
"dumps",
"(",
"{",
"'body'",
":",
"body",
"}",
")",
")",
",",
"20... | 94957e9dba036eae3052e2662c208b259c08399a |
train | toplot | To plot formatter | dynts/formatters/tsplot.py | def toplot(ts,
filename=None,
grid=True,
legend=True,
pargs=(),
**kwargs):
'''To plot formatter'''
fig = plt.figure()
ax = fig.add_subplot(111)
dates = list(ts.dates())
ax.plot(dates, ts.values(), *pargs)
ax.grid(grid)
# ro... | def toplot(ts,
filename=None,
grid=True,
legend=True,
pargs=(),
**kwargs):
'''To plot formatter'''
fig = plt.figure()
ax = fig.add_subplot(111)
dates = list(ts.dates())
ax.plot(dates, ts.values(), *pargs)
ax.grid(grid)
# ro... | [
"To",
"plot",
"formatter"
] | quantmind/dynts | python | https://github.com/quantmind/dynts/blob/21ac57c648bfec402fa6b1fe569496cf098fb5e8/dynts/formatters/tsplot.py#L4-L33 | [
"def",
"toplot",
"(",
"ts",
",",
"filename",
"=",
"None",
",",
"grid",
"=",
"True",
",",
"legend",
"=",
"True",
",",
"pargs",
"=",
"(",
")",
",",
"*",
"*",
"kwargs",
")",
":",
"fig",
"=",
"plt",
".",
"figure",
"(",
")",
"ax",
"=",
"fig",
".",... | 21ac57c648bfec402fa6b1fe569496cf098fb5e8 |
train | check_table | Ensure the table is valid for converting to grid table.
* The table must a list of lists
* Each row must contain the same number of columns
* The table must not be empty
Parameters
----------
table : list of lists of str
The list of rows of strings to convert to a grid table
Retur... | dashtable/dashutils/check_table.py | def check_table(table):
"""
Ensure the table is valid for converting to grid table.
* The table must a list of lists
* Each row must contain the same number of columns
* The table must not be empty
Parameters
----------
table : list of lists of str
The list of rows of strings t... | def check_table(table):
"""
Ensure the table is valid for converting to grid table.
* The table must a list of lists
* Each row must contain the same number of columns
* The table must not be empty
Parameters
----------
table : list of lists of str
The list of rows of strings t... | [
"Ensure",
"the",
"table",
"is",
"valid",
"for",
"converting",
"to",
"grid",
"table",
"."
] | doakey3/DashTable | python | https://github.com/doakey3/DashTable/blob/744cfb6a717fa75a8092c83ebcd49b2668023681/dashtable/dashutils/check_table.py#L1-L32 | [
"def",
"check_table",
"(",
"table",
")",
":",
"if",
"not",
"type",
"(",
"table",
")",
"is",
"list",
":",
"return",
"\"Table must be a list of lists\"",
"if",
"len",
"(",
"table",
")",
"==",
"0",
":",
"return",
"\"Table must contain at least one row and one column\... | 744cfb6a717fa75a8092c83ebcd49b2668023681 |
train | get_span | Gets the span containing the [row, column] pair
Parameters
----------
spans : list of lists of lists
A list containing spans, which are lists of [row, column] pairs
that define where a span is inside a table.
Returns
-------
span : list of lists
A span containing the [r... | dashtable/dashutils/get_span.py | def get_span(spans, row, column):
"""
Gets the span containing the [row, column] pair
Parameters
----------
spans : list of lists of lists
A list containing spans, which are lists of [row, column] pairs
that define where a span is inside a table.
Returns
-------
span : ... | def get_span(spans, row, column):
"""
Gets the span containing the [row, column] pair
Parameters
----------
spans : list of lists of lists
A list containing spans, which are lists of [row, column] pairs
that define where a span is inside a table.
Returns
-------
span : ... | [
"Gets",
"the",
"span",
"containing",
"the",
"[",
"row",
"column",
"]",
"pair"
] | doakey3/DashTable | python | https://github.com/doakey3/DashTable/blob/744cfb6a717fa75a8092c83ebcd49b2668023681/dashtable/dashutils/get_span.py#L1-L20 | [
"def",
"get_span",
"(",
"spans",
",",
"row",
",",
"column",
")",
":",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"spans",
")",
")",
":",
"if",
"[",
"row",
",",
"column",
"]",
"in",
"spans",
"[",
"i",
"]",
":",
"return",
"spans",
"[",
"i",
"]... | 744cfb6a717fa75a8092c83ebcd49b2668023681 |
train | find_unassigned_table_cell | Search through a table and return the first [row, column] pair
who's value is None.
Parameters
----------
table : list of lists of str
Returns
-------
list of int
The row column pair of the None type cell | dashtable/html2data/find_unassigned_table_cell.py | def find_unassigned_table_cell(table):
"""
Search through a table and return the first [row, column] pair
who's value is None.
Parameters
----------
table : list of lists of str
Returns
-------
list of int
The row column pair of the None type cell
"""
for row in ran... | def find_unassigned_table_cell(table):
"""
Search through a table and return the first [row, column] pair
who's value is None.
Parameters
----------
table : list of lists of str
Returns
-------
list of int
The row column pair of the None type cell
"""
for row in ran... | [
"Search",
"through",
"a",
"table",
"and",
"return",
"the",
"first",
"[",
"row",
"column",
"]",
"pair",
"who",
"s",
"value",
"is",
"None",
"."
] | doakey3/DashTable | python | https://github.com/doakey3/DashTable/blob/744cfb6a717fa75a8092c83ebcd49b2668023681/dashtable/html2data/find_unassigned_table_cell.py#L1-L19 | [
"def",
"find_unassigned_table_cell",
"(",
"table",
")",
":",
"for",
"row",
"in",
"range",
"(",
"len",
"(",
"table",
")",
")",
":",
"for",
"column",
"in",
"range",
"(",
"len",
"(",
"table",
"[",
"row",
"]",
")",
")",
":",
"if",
"table",
"[",
"row",
... | 744cfb6a717fa75a8092c83ebcd49b2668023681 |
train | Numpy.insert | insert *values* at date *dte*. | dynts/backends/np.py | def insert(self, dte, values):
'''insert *values* at date *dte*.'''
if len(values):
dte = self.dateconvert(dte)
if not self:
self._date = np.array([dte])
self._data = np.array([values])
else:
# search for the date
... | def insert(self, dte, values):
'''insert *values* at date *dte*.'''
if len(values):
dte = self.dateconvert(dte)
if not self:
self._date = np.array([dte])
self._data = np.array([values])
else:
# search for the date
... | [
"insert",
"*",
"values",
"*",
"at",
"date",
"*",
"dte",
"*",
"."
] | quantmind/dynts | python | https://github.com/quantmind/dynts/blob/21ac57c648bfec402fa6b1fe569496cf098fb5e8/dynts/backends/np.py#L89-L110 | [
"def",
"insert",
"(",
"self",
",",
"dte",
",",
"values",
")",
":",
"if",
"len",
"(",
"values",
")",
":",
"dte",
"=",
"self",
".",
"dateconvert",
"(",
"dte",
")",
"if",
"not",
"self",
":",
"self",
".",
"_date",
"=",
"np",
".",
"array",
"(",
"[",... | 21ac57c648bfec402fa6b1fe569496cf098fb5e8 |
train | _translate_nodes | Convert node names into node instances... | toytree/etemini.py | def _translate_nodes(root, *nodes):
"""
Convert node names into node instances...
"""
#name2node = {[n, None] for n in nodes if type(n) is str}
name2node = dict([[n, None] for n in nodes if type(n) is str])
for n in root.traverse():
if n.name in name2node:
if name2node[n.name... | def _translate_nodes(root, *nodes):
"""
Convert node names into node instances...
"""
#name2node = {[n, None] for n in nodes if type(n) is str}
name2node = dict([[n, None] for n in nodes if type(n) is str])
for n in root.traverse():
if n.name in name2node:
if name2node[n.name... | [
"Convert",
"node",
"names",
"into",
"node",
"instances",
"..."
] | eaton-lab/toytree | python | https://github.com/eaton-lab/toytree/blob/0347ed2098acc5f707fadf52a0ecd411a6d1859c/toytree/etemini.py#L2075-L2104 | [
"def",
"_translate_nodes",
"(",
"root",
",",
"*",
"nodes",
")",
":",
"#name2node = {[n, None] for n in nodes if type(n) is str}",
"name2node",
"=",
"dict",
"(",
"[",
"[",
"n",
",",
"None",
"]",
"for",
"n",
"in",
"nodes",
"if",
"type",
"(",
"n",
")",
"is",
... | 0347ed2098acc5f707fadf52a0ecd411a6d1859c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.