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 | AuthenticatedUser.remove_from_subscriptions | :calls: `DELETE /user/subscriptions/:owner/:repo <http://developer.github.com/v3/activity/watching>`_
:param subscription: :class:`github.Repository.Repository`
:rtype: None | github/AuthenticatedUser.py | def remove_from_subscriptions(self, subscription):
"""
:calls: `DELETE /user/subscriptions/:owner/:repo <http://developer.github.com/v3/activity/watching>`_
:param subscription: :class:`github.Repository.Repository`
:rtype: None
"""
assert isinstance(subscription, github.... | def remove_from_subscriptions(self, subscription):
"""
:calls: `DELETE /user/subscriptions/:owner/:repo <http://developer.github.com/v3/activity/watching>`_
:param subscription: :class:`github.Repository.Repository`
:rtype: None
"""
assert isinstance(subscription, github.... | [
":",
"calls",
":",
"DELETE",
"/",
"user",
"/",
"subscriptions",
"/",
":",
"owner",
"/",
":",
"repo",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"activity",
"/",
"watching",
">",
"_",
":",
"param",
"subscription",
":",... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/AuthenticatedUser.py#L1117-L1127 | [
"def",
"remove_from_subscriptions",
"(",
"self",
",",
"subscription",
")",
":",
"assert",
"isinstance",
"(",
"subscription",
",",
"github",
".",
"Repository",
".",
"Repository",
")",
",",
"subscription",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | AuthenticatedUser.remove_from_watched | :calls: `DELETE /repos/:owner/:repo/subscription <http://developer.github.com/v3/activity/watching>`_
:param watched: :class:`github.Repository.Repository`
:rtype: None | github/AuthenticatedUser.py | def remove_from_watched(self, watched):
"""
:calls: `DELETE /repos/:owner/:repo/subscription <http://developer.github.com/v3/activity/watching>`_
:param watched: :class:`github.Repository.Repository`
:rtype: None
"""
assert isinstance(watched, github.Repository.Repository... | def remove_from_watched(self, watched):
"""
:calls: `DELETE /repos/:owner/:repo/subscription <http://developer.github.com/v3/activity/watching>`_
:param watched: :class:`github.Repository.Repository`
:rtype: None
"""
assert isinstance(watched, github.Repository.Repository... | [
":",
"calls",
":",
"DELETE",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"subscription",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"activity",
"/",
"watching",
">",
"_",
":",
"param",
"watched",
":",
":... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/AuthenticatedUser.py#L1129-L1139 | [
"def",
"remove_from_watched",
"(",
"self",
",",
"watched",
")",
":",
"assert",
"isinstance",
"(",
"watched",
",",
"github",
".",
"Repository",
".",
"Repository",
")",
",",
"watched",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
".",
"requestJsonAn... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | AuthenticatedUser.accept_invitation | :calls: `PATCH /user/repository_invitations/:invitation_id <https://developer.github.com/v3/repos/invitations/>`
:param invitation: :class:`github.Invitation.Invitation` or int
:rtype: None | github/AuthenticatedUser.py | def accept_invitation(self, invitation):
"""
:calls: `PATCH /user/repository_invitations/:invitation_id <https://developer.github.com/v3/repos/invitations/>`
:param invitation: :class:`github.Invitation.Invitation` or int
:rtype: None
"""
assert isinstance(invitation, git... | def accept_invitation(self, invitation):
"""
:calls: `PATCH /user/repository_invitations/:invitation_id <https://developer.github.com/v3/repos/invitations/>`
:param invitation: :class:`github.Invitation.Invitation` or int
:rtype: None
"""
assert isinstance(invitation, git... | [
":",
"calls",
":",
"PATCH",
"/",
"user",
"/",
"repository_invitations",
"/",
":",
"invitation_id",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"invitations",
"/",
">",
":",
"param",
"invitation",
":",
":",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/AuthenticatedUser.py#L1141-L1156 | [
"def",
"accept_invitation",
"(",
"self",
",",
"invitation",
")",
":",
"assert",
"isinstance",
"(",
"invitation",
",",
"github",
".",
"Invitation",
".",
"Invitation",
")",
"or",
"isinstance",
"(",
"invitation",
",",
"int",
")",
"if",
"isinstance",
"(",
"invit... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | AuthenticatedUser.create_migration | :calls: `POST /user/migrations`_
:param repos: list or tuple of str
:param lock_repositories: bool
:param exclude_attachments: bool
:rtype: :class:`github.Migration.Migration` | github/AuthenticatedUser.py | def create_migration(self, repos, lock_repositories=github.GithubObject.NotSet, exclude_attachments=github.GithubObject.NotSet):
"""
:calls: `POST /user/migrations`_
:param repos: list or tuple of str
:param lock_repositories: bool
:param exclude_attachments: bool
:rtype:... | def create_migration(self, repos, lock_repositories=github.GithubObject.NotSet, exclude_attachments=github.GithubObject.NotSet):
"""
:calls: `POST /user/migrations`_
:param repos: list or tuple of str
:param lock_repositories: bool
:param exclude_attachments: bool
:rtype:... | [
":",
"calls",
":",
"POST",
"/",
"user",
"/",
"migrations",
"_",
":",
"param",
"repos",
":",
"list",
"or",
"tuple",
"of",
"str",
":",
"param",
"lock_repositories",
":",
"bool",
":",
"param",
"exclude_attachments",
":",
"bool",
":",
"rtype",
":",
":",
"c... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/AuthenticatedUser.py#L1158-L1185 | [
"def",
"create_migration",
"(",
"self",
",",
"repos",
",",
"lock_repositories",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"exclude_attachments",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"isinstance",
"(",
"repos",
",... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Installation.get_repos | :calls: `GET /installation/repositories <https://developer.github.com/v3/integrations/installations/#list-repositories>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` | github/Installation.py | def get_repos(self):
"""
:calls: `GET /installation/repositories <https://developer.github.com/v3/integrations/installations/#list-repositories>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
url_parameters = dict()
ret... | def get_repos(self):
"""
:calls: `GET /installation/repositories <https://developer.github.com/v3/integrations/installations/#list-repositories>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
url_parameters = dict()
ret... | [
":",
"calls",
":",
"GET",
"/",
"installation",
"/",
"repositories",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"integrations",
"/",
"installations",
"/",
"#list",
"-",
"repositories",
">",
"_",
":",
"rtype",
":",
":",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Installation.py#L59-L73 | [
"def",
"get_repos",
"(",
"self",
")",
":",
"url_parameters",
"=",
"dict",
"(",
")",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"contentClass",
"=",
"github",
".",
"Repository",
".",
"Repository",
",",
"requester",
"=",
"self",
".",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | PullRequestComment.edit | :calls: `PATCH /repos/:owner/:repo/pulls/comments/:number <http://developer.github.com/v3/pulls/comments>`_
:param body: string
:rtype: None | github/PullRequestComment.py | def edit(self, body):
"""
:calls: `PATCH /repos/:owner/:repo/pulls/comments/:number <http://developer.github.com/v3/pulls/comments>`_
:param body: string
:rtype: None
"""
assert isinstance(body, (str, unicode)), body
post_parameters = {
"body": body,
... | def edit(self, body):
"""
:calls: `PATCH /repos/:owner/:repo/pulls/comments/:number <http://developer.github.com/v3/pulls/comments>`_
:param body: string
:rtype: None
"""
assert isinstance(body, (str, unicode)), body
post_parameters = {
"body": body,
... | [
":",
"calls",
":",
"PATCH",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"pulls",
"/",
"comments",
"/",
":",
"number",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"pulls",
"/",
"comments",
">",
"_",
":",... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/PullRequestComment.py#L180-L195 | [
"def",
"edit",
"(",
"self",
",",
"body",
")",
":",
"assert",
"isinstance",
"(",
"body",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"body",
"post_parameters",
"=",
"{",
"\"body\"",
":",
"body",
",",
"}",
"headers",
",",
"data",
"=",
"self",
"."... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Authorization.edit | :calls: `PATCH /authorizations/:id <http://developer.github.com/v3/oauth>`_
:param scopes: list of string
:param add_scopes: list of string
:param remove_scopes: list of string
:param note: string
:param note_url: string
:rtype: None | github/Authorization.py | def edit(self, scopes=github.GithubObject.NotSet, add_scopes=github.GithubObject.NotSet, remove_scopes=github.GithubObject.NotSet, note=github.GithubObject.NotSet, note_url=github.GithubObject.NotSet):
"""
:calls: `PATCH /authorizations/:id <http://developer.github.com/v3/oauth>`_
:param scopes:... | def edit(self, scopes=github.GithubObject.NotSet, add_scopes=github.GithubObject.NotSet, remove_scopes=github.GithubObject.NotSet, note=github.GithubObject.NotSet, note_url=github.GithubObject.NotSet):
"""
:calls: `PATCH /authorizations/:id <http://developer.github.com/v3/oauth>`_
:param scopes:... | [
":",
"calls",
":",
"PATCH",
"/",
"authorizations",
"/",
":",
"id",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"oauth",
">",
"_",
":",
"param",
"scopes",
":",
"list",
"of",
"string",
":",
"param",
"add_scopes",
":",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Authorization.py#L128-L159 | [
"def",
"edit",
"(",
"self",
",",
"scopes",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"add_scopes",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"remove_scopes",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"note",
"=",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | ProjectColumn.get_cards | :calls: `GET /projects/columns/:column_id/cards <https://developer.github.com/v3/projects/cards/#list-project-cards>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.ProjectCard.ProjectCard`
:param archived_state: string | github/ProjectColumn.py | def get_cards(self, archived_state=github.GithubObject.NotSet):
"""
:calls: `GET /projects/columns/:column_id/cards <https://developer.github.com/v3/projects/cards/#list-project-cards>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.ProjectCard.ProjectCard`
:param... | def get_cards(self, archived_state=github.GithubObject.NotSet):
"""
:calls: `GET /projects/columns/:column_id/cards <https://developer.github.com/v3/projects/cards/#list-project-cards>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.ProjectCard.ProjectCard`
:param... | [
":",
"calls",
":",
"GET",
"/",
"projects",
"/",
"columns",
"/",
":",
"column_id",
"/",
"cards",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"projects",
"/",
"cards",
"/",
"#list",
"-",
"project",
"-",
"cards",
">",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/ProjectColumn.py#L98-L116 | [
"def",
"get_cards",
"(",
"self",
",",
"archived_state",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"archived_state",
"is",
"github",
".",
"GithubObject",
".",
"NotSet",
"or",
"isinstance",
"(",
"archived_state",
",",
"(",
"str",
"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | ProjectColumn.create_card | :calls: `POST /projects/columns/:column_id/cards <https://developer.github.com/v3/projects/cards/#create-a-project-card>`_
:param note: string
:param content_id: integer
:param content_type: string | github/ProjectColumn.py | def create_card(self, note=github.GithubObject.NotSet,
content_id=github.GithubObject.NotSet,
content_type=github.GithubObject.NotSet):
"""
:calls: `POST /projects/columns/:column_id/cards <https://developer.github.com/v3/projects/cards/#create-a-project-card>`_
... | def create_card(self, note=github.GithubObject.NotSet,
content_id=github.GithubObject.NotSet,
content_type=github.GithubObject.NotSet):
"""
:calls: `POST /projects/columns/:column_id/cards <https://developer.github.com/v3/projects/cards/#create-a-project-card>`_
... | [
":",
"calls",
":",
"POST",
"/",
"projects",
"/",
"columns",
"/",
":",
"column_id",
"/",
"cards",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"projects",
"/",
"cards",
"/",
"#create",
"-",
"a",
"-",
"project",
"-",
"... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/ProjectColumn.py#L118-L147 | [
"def",
"create_card",
"(",
"self",
",",
"note",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"content_id",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"content_type",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"post... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Commit.create_comment | :calls: `POST /repos/:owner/:repo/commits/:sha/comments <http://developer.github.com/v3/repos/comments>`_
:param body: string
:param line: integer
:param path: string
:param position: integer
:rtype: :class:`github.CommitComment.CommitComment` | github/Commit.py | def create_comment(self, body, line=github.GithubObject.NotSet, path=github.GithubObject.NotSet, position=github.GithubObject.NotSet):
"""
:calls: `POST /repos/:owner/:repo/commits/:sha/comments <http://developer.github.com/v3/repos/comments>`_
:param body: string
:param line: integer
... | def create_comment(self, body, line=github.GithubObject.NotSet, path=github.GithubObject.NotSet, position=github.GithubObject.NotSet):
"""
:calls: `POST /repos/:owner/:repo/commits/:sha/comments <http://developer.github.com/v3/repos/comments>`_
:param body: string
:param line: integer
... | [
":",
"calls",
":",
"POST",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"commits",
"/",
":",
"sha",
"/",
"comments",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"comments",
">",
"_",
":",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Commit.py#L135-L162 | [
"def",
"create_comment",
"(",
"self",
",",
"body",
",",
"line",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"path",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"position",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Commit.create_status | :calls: `POST /repos/:owner/:repo/statuses/:sha <http://developer.github.com/v3/repos/statuses>`_
:param state: string
:param target_url: string
:param description: string
:param context: string
:rtype: :class:`github.CommitStatus.CommitStatus` | github/Commit.py | def create_status(self, state, target_url=github.GithubObject.NotSet, description=github.GithubObject.NotSet, context=github.GithubObject.NotSet):
"""
:calls: `POST /repos/:owner/:repo/statuses/:sha <http://developer.github.com/v3/repos/statuses>`_
:param state: string
:param target_url:... | def create_status(self, state, target_url=github.GithubObject.NotSet, description=github.GithubObject.NotSet, context=github.GithubObject.NotSet):
"""
:calls: `POST /repos/:owner/:repo/statuses/:sha <http://developer.github.com/v3/repos/statuses>`_
:param state: string
:param target_url:... | [
":",
"calls",
":",
"POST",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"statuses",
"/",
":",
"sha",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"statuses",
">",
"_",
":",
"param",
"state",... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Commit.py#L164-L191 | [
"def",
"create_status",
"(",
"self",
",",
"state",
",",
"target_url",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"description",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"context",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Commit.get_statuses | :calls: `GET /repos/:owner/:repo/statuses/:ref <http://developer.github.com/v3/repos/statuses>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitStatus.CommitStatus` | github/Commit.py | def get_statuses(self):
"""
:calls: `GET /repos/:owner/:repo/statuses/:ref <http://developer.github.com/v3/repos/statuses>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitStatus.CommitStatus`
"""
return github.PaginatedList.PaginatedList(
... | def get_statuses(self):
"""
:calls: `GET /repos/:owner/:repo/statuses/:ref <http://developer.github.com/v3/repos/statuses>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitStatus.CommitStatus`
"""
return github.PaginatedList.PaginatedList(
... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"statuses",
"/",
":",
"ref",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"statuses",
">",
"_",
":",
"rtype",
":",
":... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Commit.py#L205-L215 | [
"def",
"get_statuses",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"CommitStatus",
".",
"CommitStatus",
",",
"self",
".",
"_requester",
",",
"self",
".",
"_parentUrl",
"(",
"self",
".",
"_parentU... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Commit.get_combined_status | :calls: `GET /repos/:owner/:repo/commits/:ref/status/ <http://developer.github.com/v3/repos/statuses>`_
:rtype: :class:`github.CommitCombinedStatus.CommitCombinedStatus` | github/Commit.py | def get_combined_status(self):
"""
:calls: `GET /repos/:owner/:repo/commits/:ref/status/ <http://developer.github.com/v3/repos/statuses>`_
:rtype: :class:`github.CommitCombinedStatus.CommitCombinedStatus`
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",... | def get_combined_status(self):
"""
:calls: `GET /repos/:owner/:repo/commits/:ref/status/ <http://developer.github.com/v3/repos/statuses>`_
:rtype: :class:`github.CommitCombinedStatus.CommitCombinedStatus`
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"commits",
"/",
":",
"ref",
"/",
"status",
"/",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"statuses",
">",
"_",
":... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Commit.py#L217-L226 | [
"def",
"get_combined_status",
"(",
"self",
")",
":",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",
",",
"self",
".",
"url",
"+",
"\"/status\"",
")",
"return",
"github",
".",
"CommitCombinedStatus",
".",
"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Reaction.delete | :calls: `DELETE /reactions/:id <https://developer.github.com/v3/reactions/#delete-a-reaction>`_
:rtype: None | github/Reaction.py | def delete(self):
"""
:calls: `DELETE /reactions/:id <https://developer.github.com/v3/reactions/#delete-a-reaction>`_
:rtype: None
"""
self._requester.requestJsonAndCheck(
"DELETE",
self._parentUrl("") + "/reactions/" + str(self.id),
headers={'... | def delete(self):
"""
:calls: `DELETE /reactions/:id <https://developer.github.com/v3/reactions/#delete-a-reaction>`_
:rtype: None
"""
self._requester.requestJsonAndCheck(
"DELETE",
self._parentUrl("") + "/reactions/" + str(self.id),
headers={'... | [
":",
"calls",
":",
"DELETE",
"/",
"reactions",
"/",
":",
"id",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"reactions",
"/",
"#delete",
"-",
"a",
"-",
"reaction",
">",
"_",
":",
"rtype",
":",
"None"
] | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Reaction.py#L73-L82 | [
"def",
"delete",
"(",
"self",
")",
":",
"self",
".",
"_requester",
".",
"requestJsonAndCheck",
"(",
"\"DELETE\"",
",",
"self",
".",
"_parentUrl",
"(",
"\"\"",
")",
"+",
"\"/reactions/\"",
"+",
"str",
"(",
"self",
".",
"id",
")",
",",
"headers",
"=",
"{... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.get_protection | :calls: `GET /repos/:owner/:repo/branches/:branch/protection <https://developer.github.com/v3/repos/branches>`_ | github/Branch.py | def get_protection(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection <https://developer.github.com/v3/repos/branches>`_
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",
self.protection_url,
headers={'Accept': Consts... | def get_protection(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection <https://developer.github.com/v3/repos/branches>`_
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",
self.protection_url,
headers={'Accept': Consts... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"branches",
">",
"_"
] | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L97-L106 | [
"def",
"get_protection",
"(",
"self",
")",
":",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",
",",
"self",
".",
"protection_url",
",",
"headers",
"=",
"{",
"'Accept'",
":",
"Consts",
".",
"mediaTypeRequir... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.edit_protection | :calls: `PUT /repos/:owner/:repo/branches/:branch/protection <https://developer.github.com/v3/repos/branches>`_
:strict: bool
:contexts: list of strings
:enforce_admins: bool
:dismissal_users: list of strings
:dismissal_teams: list of strings
:dismiss_stale_reviews: bool
... | github/Branch.py | def edit_protection(self, strict=github.GithubObject.NotSet, contexts=github.GithubObject.NotSet, enforce_admins=github.GithubObject.NotSet, dismissal_users=github.GithubObject.NotSet, dismissal_teams=github.GithubObject.NotSet, dismiss_stale_reviews=github.GithubObject.NotSet, require_code_owner_reviews=github.GithubO... | def edit_protection(self, strict=github.GithubObject.NotSet, contexts=github.GithubObject.NotSet, enforce_admins=github.GithubObject.NotSet, dismissal_users=github.GithubObject.NotSet, dismissal_teams=github.GithubObject.NotSet, dismiss_stale_reviews=github.GithubObject.NotSet, require_code_owner_reviews=github.GithubO... | [
":",
"calls",
":",
"PUT",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"branches",
">",
"_",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L108-L180 | [
"def",
"edit_protection",
"(",
"self",
",",
"strict",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"contexts",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"enforce_admins",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"dismi... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.get_required_status_checks | :calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.RequiredStatusChecks.RequiredStatusChecks` | github/Branch.py | def get_required_status_checks(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.RequiredStatusChecks.RequiredStatusChecks`
"""
headers, data = self._requester.r... | def get_required_status_checks(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.RequiredStatusChecks.RequiredStatusChecks`
"""
headers, data = self._requester.r... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"/",
"required_status_checks",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L191-L200 | [
"def",
"get_required_status_checks",
"(",
"self",
")",
":",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",
",",
"self",
".",
"protection_url",
"+",
"\"/required_status_checks\"",
")",
"return",
"github",
".",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.edit_required_status_checks | :calls: `PATCH /repos/:owner/:repo/branches/:branch/protection/required_status_checks <https://developer.github.com/v3/repos/branches>`_
:strict: bool
:contexts: list of strings | github/Branch.py | def edit_required_status_checks(self, strict=github.GithubObject.NotSet, contexts=github.GithubObject.NotSet):
"""
:calls: `PATCH /repos/:owner/:repo/branches/:branch/protection/required_status_checks <https://developer.github.com/v3/repos/branches>`_
:strict: bool
:contexts: list of str... | def edit_required_status_checks(self, strict=github.GithubObject.NotSet, contexts=github.GithubObject.NotSet):
"""
:calls: `PATCH /repos/:owner/:repo/branches/:branch/protection/required_status_checks <https://developer.github.com/v3/repos/branches>`_
:strict: bool
:contexts: list of str... | [
":",
"calls",
":",
"PATCH",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"/",
"required_status_checks",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L202-L220 | [
"def",
"edit_required_status_checks",
"(",
"self",
",",
"strict",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"contexts",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"strict",
"is",
"github",
".",
"GithubObject",
".",
"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.get_required_pull_request_reviews | :calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.RequiredPullRequestReviews.RequiredPullRequestReviews` | github/Branch.py | def get_required_pull_request_reviews(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.RequiredPullRequestReviews.RequiredPullRequestReviews`
"""
headers... | def get_required_pull_request_reviews(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.RequiredPullRequestReviews.RequiredPullRequestReviews`
"""
headers... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"/",
"required_pull_request_reviews",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"rep... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L231-L241 | [
"def",
"get_required_pull_request_reviews",
"(",
"self",
")",
":",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",
",",
"self",
".",
"protection_url",
"+",
"\"/required_pull_request_reviews\"",
",",
"headers",
"=",... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.edit_required_pull_request_reviews | :calls: `PATCH /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews <https://developer.github.com/v3/repos/branches>`_
:dismissal_users: list of strings
:dismissal_teams: list of strings
:dismiss_stale_reviews: bool
:require_code_owner_reviews: bool
:requ... | github/Branch.py | def edit_required_pull_request_reviews(self, dismissal_users=github.GithubObject.NotSet, dismissal_teams=github.GithubObject.NotSet, dismiss_stale_reviews=github.GithubObject.NotSet, require_code_owner_reviews=github.GithubObject.NotSet, required_approving_review_count=github.GithubObject.NotSet):
"""
:... | def edit_required_pull_request_reviews(self, dismissal_users=github.GithubObject.NotSet, dismissal_teams=github.GithubObject.NotSet, dismiss_stale_reviews=github.GithubObject.NotSet, require_code_owner_reviews=github.GithubObject.NotSet, required_approving_review_count=github.GithubObject.NotSet):
"""
:... | [
":",
"calls",
":",
"PATCH",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"/",
"required_pull_request_reviews",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"r... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L243-L276 | [
"def",
"edit_required_pull_request_reviews",
"(",
"self",
",",
"dismissal_users",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"dismissal_teams",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"dismiss_stale_reviews",
"=",
"github",
".",
"GithubO... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.get_admin_enforcement | :calls: `GET /repos/:owner/:repo/branches/:branch/protection/enforce_admins <https://developer.github.com/v3/repos/branches>`_
:rtype: bool | github/Branch.py | def get_admin_enforcement(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/enforce_admins <https://developer.github.com/v3/repos/branches>`_
:rtype: bool
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",
self.protection... | def get_admin_enforcement(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/enforce_admins <https://developer.github.com/v3/repos/branches>`_
:rtype: bool
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",
self.protection... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"/",
"enforce_admins",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L287-L296 | [
"def",
"get_admin_enforcement",
"(",
"self",
")",
":",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",
",",
"self",
".",
"protection_url",
"+",
"\"/enforce_admins\"",
")",
"return",
"data",
"[",
"\"enabled\"",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.get_user_push_restrictions | :calls: `GET /repos/:owner/:repo/branches/:branch/protection/restrictions/users <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` | github/Branch.py | def get_user_push_restrictions(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/restrictions/users <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
return githu... | def get_user_push_restrictions(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/restrictions/users <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
return githu... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"/",
"restrictions",
"/",
"users",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"re... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L316-L326 | [
"def",
"get_user_push_restrictions",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"NamedUser",
".",
"NamedUser",
",",
"self",
".",
"_requester",
",",
"self",
".",
"protection_url",
"+",
"\"/restrictio... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.get_team_push_restrictions | :calls: `GET /repos/:owner/:repo/branches/:branch/protection/restrictions/teams <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team` | github/Branch.py | def get_team_push_restrictions(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/restrictions/teams <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
"""
return github.Paginate... | def get_team_push_restrictions(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/restrictions/teams <https://developer.github.com/v3/repos/branches>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
"""
return github.Paginate... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"/",
"restrictions",
"/",
"teams",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"re... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L328-L338 | [
"def",
"get_team_push_restrictions",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"Team",
".",
"Team",
",",
"self",
".",
"_requester",
",",
"self",
".",
"protection_url",
"+",
"\"/restrictions/teams\"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.edit_user_push_restrictions | :calls: `POST /repos/:owner/:repo/branches/:branch/protection/restrictions <https://developer.github.com/v3/repos/branches>`_
:users: list of strings | github/Branch.py | def edit_user_push_restrictions(self, *users):
"""
:calls: `POST /repos/:owner/:repo/branches/:branch/protection/restrictions <https://developer.github.com/v3/repos/branches>`_
:users: list of strings
"""
assert all(isinstance(element, (str, unicode)) or isinstance(element, (str,... | def edit_user_push_restrictions(self, *users):
"""
:calls: `POST /repos/:owner/:repo/branches/:branch/protection/restrictions <https://developer.github.com/v3/repos/branches>`_
:users: list of strings
"""
assert all(isinstance(element, (str, unicode)) or isinstance(element, (str,... | [
":",
"calls",
":",
"POST",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"/",
"restrictions",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"b... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L340-L351 | [
"def",
"edit_user_push_restrictions",
"(",
"self",
",",
"*",
"users",
")",
":",
"assert",
"all",
"(",
"isinstance",
"(",
"element",
",",
"(",
"str",
",",
"unicode",
")",
")",
"or",
"isinstance",
"(",
"element",
",",
"(",
"str",
",",
"unicode",
")",
")"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.edit_team_push_restrictions | :calls: `POST /repos/:owner/:repo/branches/:branch/protection/restrictions <https://developer.github.com/v3/repos/branches>`_
:teams: list of strings | github/Branch.py | def edit_team_push_restrictions(self, *teams):
"""
:calls: `POST /repos/:owner/:repo/branches/:branch/protection/restrictions <https://developer.github.com/v3/repos/branches>`_
:teams: list of strings
"""
assert all(isinstance(element, (str, unicode)) or isinstance(element, (str,... | def edit_team_push_restrictions(self, *teams):
"""
:calls: `POST /repos/:owner/:repo/branches/:branch/protection/restrictions <https://developer.github.com/v3/repos/branches>`_
:teams: list of strings
"""
assert all(isinstance(element, (str, unicode)) or isinstance(element, (str,... | [
":",
"calls",
":",
"POST",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"/",
"restrictions",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"b... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L353-L364 | [
"def",
"edit_team_push_restrictions",
"(",
"self",
",",
"*",
"teams",
")",
":",
"assert",
"all",
"(",
"isinstance",
"(",
"element",
",",
"(",
"str",
",",
"unicode",
")",
")",
"or",
"isinstance",
"(",
"element",
",",
"(",
"str",
",",
"unicode",
")",
")"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Branch.get_required_signatures | :calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_signatures <https://developer.github.com/v3/repos/branches>` | github/Branch.py | def get_required_signatures(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_signatures <https://developer.github.com/v3/repos/branches>`
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",
self.protection_url + "/requir... | def get_required_signatures(self):
"""
:calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_signatures <https://developer.github.com/v3/repos/branches>`
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",
self.protection_url + "/requir... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"branches",
"/",
":",
"branch",
"/",
"protection",
"/",
"required_signatures",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/"... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Branch.py#L375-L384 | [
"def",
"get_required_signatures",
"(",
"self",
")",
":",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",
",",
"self",
".",
"protection_url",
"+",
"\"/required_signatures\"",
",",
"headers",
"=",
"{",
"'Accept'"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Hook.edit | :calls: `PATCH /repos/:owner/:repo/hooks/:id <http://developer.github.com/v3/repos/hooks>`_
:param name: string
:param config: dict
:param events: list of string
:param add_events: list of string
:param remove_events: list of string
:param active: bool
:rtype: Non... | github/Hook.py | def edit(self, name, config, events=github.GithubObject.NotSet, add_events=github.GithubObject.NotSet, remove_events=github.GithubObject.NotSet, active=github.GithubObject.NotSet):
"""
:calls: `PATCH /repos/:owner/:repo/hooks/:id <http://developer.github.com/v3/repos/hooks>`_
:param name: string... | def edit(self, name, config, events=github.GithubObject.NotSet, add_events=github.GithubObject.NotSet, remove_events=github.GithubObject.NotSet, active=github.GithubObject.NotSet):
"""
:calls: `PATCH /repos/:owner/:repo/hooks/:id <http://developer.github.com/v3/repos/hooks>`_
:param name: string... | [
":",
"calls",
":",
"PATCH",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"hooks",
"/",
":",
"id",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"hooks",
">",
"_",
":",
"param",
"name",
":",... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Hook.py#L145-L179 | [
"def",
"edit",
"(",
"self",
",",
"name",
",",
"config",
",",
"events",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"add_events",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"remove_events",
"=",
"github",
".",
"GithubObject",
".",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | NamedUser.get_followers | :calls: `GET /users/:user/followers <http://developer.github.com/v3/users/followers>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` | github/NamedUser.py | def get_followers(self):
"""
:calls: `GET /users/:user/followers <http://developer.github.com/v3/users/followers>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
return github.PaginatedList.PaginatedList(
NamedUser,
... | def get_followers(self):
"""
:calls: `GET /users/:user/followers <http://developer.github.com/v3/users/followers>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
return github.PaginatedList.PaginatedList(
NamedUser,
... | [
":",
"calls",
":",
"GET",
"/",
"users",
"/",
":",
"user",
"/",
"followers",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"users",
"/",
"followers",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
"Pag... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/NamedUser.py#L400-L410 | [
"def",
"get_followers",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"NamedUser",
",",
"self",
".",
"_requester",
",",
"self",
".",
"url",
"+",
"\"/followers\"",
",",
"None",
")"
] | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | NamedUser.get_following | :calls: `GET /users/:user/following <http://developer.github.com/v3/users/followers>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` | github/NamedUser.py | def get_following(self):
"""
:calls: `GET /users/:user/following <http://developer.github.com/v3/users/followers>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
return github.PaginatedList.PaginatedList(
NamedUser,
... | def get_following(self):
"""
:calls: `GET /users/:user/following <http://developer.github.com/v3/users/followers>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
return github.PaginatedList.PaginatedList(
NamedUser,
... | [
":",
"calls",
":",
"GET",
"/",
"users",
"/",
":",
"user",
"/",
"following",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"users",
"/",
"followers",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
"Pag... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/NamedUser.py#L412-L422 | [
"def",
"get_following",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"NamedUser",
",",
"self",
".",
"_requester",
",",
"self",
".",
"url",
"+",
"\"/following\"",
",",
"None",
")"
] | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | NamedUser.get_keys | :calls: `GET /users/:user/keys <http://developer.github.com/v3/users/keys>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.UserKey.UserKey` | github/NamedUser.py | def get_keys(self):
"""
:calls: `GET /users/:user/keys <http://developer.github.com/v3/users/keys>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.UserKey.UserKey`
"""
return github.PaginatedList.PaginatedList(
github.UserKey.UserKey,
... | def get_keys(self):
"""
:calls: `GET /users/:user/keys <http://developer.github.com/v3/users/keys>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.UserKey.UserKey`
"""
return github.PaginatedList.PaginatedList(
github.UserKey.UserKey,
... | [
":",
"calls",
":",
"GET",
"/",
"users",
"/",
":",
"user",
"/",
"keys",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"users",
"/",
"keys",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
"PaginatedList... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/NamedUser.py#L441-L451 | [
"def",
"get_keys",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"UserKey",
".",
"UserKey",
",",
"self",
".",
"_requester",
",",
"self",
".",
"url",
"+",
"\"/keys\"",
",",
"None",
")"
] | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | NamedUser.get_public_events | :calls: `GET /users/:user/events/public <http://developer.github.com/v3/activity/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` | github/NamedUser.py | def get_public_events(self):
"""
:calls: `GET /users/:user/events/public <http://developer.github.com/v3/activity/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
"""
return github.PaginatedList.PaginatedList(
github.Event.E... | def get_public_events(self):
"""
:calls: `GET /users/:user/events/public <http://developer.github.com/v3/activity/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
"""
return github.PaginatedList.PaginatedList(
github.Event.E... | [
":",
"calls",
":",
"GET",
"/",
"users",
"/",
":",
"user",
"/",
"events",
"/",
"public",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"activity",
"/",
"events",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/NamedUser.py#L465-L475 | [
"def",
"get_public_events",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"Event",
".",
"Event",
",",
"self",
".",
"_requester",
",",
"self",
".",
"url",
"+",
"\"/events/public\"",
",",
"None",
"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | NamedUser.get_public_received_events | :calls: `GET /users/:user/received_events/public <http://developer.github.com/v3/activity/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` | github/NamedUser.py | def get_public_received_events(self):
"""
:calls: `GET /users/:user/received_events/public <http://developer.github.com/v3/activity/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
"""
return github.PaginatedList.PaginatedList(
... | def get_public_received_events(self):
"""
:calls: `GET /users/:user/received_events/public <http://developer.github.com/v3/activity/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
"""
return github.PaginatedList.PaginatedList(
... | [
":",
"calls",
":",
"GET",
"/",
"users",
"/",
":",
"user",
"/",
"received_events",
"/",
"public",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"activity",
"/",
"events",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/NamedUser.py#L477-L487 | [
"def",
"get_public_received_events",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"Event",
".",
"Event",
",",
"self",
".",
"_requester",
",",
"self",
".",
"url",
"+",
"\"/received_events/public\"",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | NamedUser.get_received_events | :calls: `GET /users/:user/received_events <http://developer.github.com/v3/activity/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` | github/NamedUser.py | def get_received_events(self):
"""
:calls: `GET /users/:user/received_events <http://developer.github.com/v3/activity/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
"""
return github.PaginatedList.PaginatedList(
github.Eve... | def get_received_events(self):
"""
:calls: `GET /users/:user/received_events <http://developer.github.com/v3/activity/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
"""
return github.PaginatedList.PaginatedList(
github.Eve... | [
":",
"calls",
":",
"GET",
"/",
"users",
"/",
":",
"user",
"/",
"received_events",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"activity",
"/",
"events",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/NamedUser.py#L489-L499 | [
"def",
"get_received_events",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"Event",
".",
"Event",
",",
"self",
".",
"_requester",
",",
"self",
".",
"url",
"+",
"\"/received_events\"",
",",
"None",... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | NamedUser.get_repos | :calls: `GET /users/:user/repos <http://developer.github.com/v3/repos>`_
:param type: string
:param sort: string
:param direction: string
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` | github/NamedUser.py | def get_repos(self, type=github.GithubObject.NotSet, sort=github.GithubObject.NotSet,
direction=github.GithubObject.NotSet):
"""
:calls: `GET /users/:user/repos <http://developer.github.com/v3/repos>`_
:param type: string
:param sort: string
:param direction: st... | def get_repos(self, type=github.GithubObject.NotSet, sort=github.GithubObject.NotSet,
direction=github.GithubObject.NotSet):
"""
:calls: `GET /users/:user/repos <http://developer.github.com/v3/repos>`_
:param type: string
:param sort: string
:param direction: st... | [
":",
"calls",
":",
"GET",
"/",
"users",
"/",
":",
"user",
"/",
"repos",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
">",
"_",
":",
"param",
"type",
":",
"string",
":",
"param",
"sort",
":",
"string",
":",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/NamedUser.py#L514-L538 | [
"def",
"get_repos",
"(",
"self",
",",
"type",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"sort",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"direction",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"typ... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | NamedUser.get_subscriptions | :calls: `GET /users/:user/subscriptions <http://developer.github.com/v3/activity/watching>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` | github/NamedUser.py | def get_subscriptions(self):
"""
:calls: `GET /users/:user/subscriptions <http://developer.github.com/v3/activity/watching>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
return github.PaginatedList.PaginatedList(
gi... | def get_subscriptions(self):
"""
:calls: `GET /users/:user/subscriptions <http://developer.github.com/v3/activity/watching>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
return github.PaginatedList.PaginatedList(
gi... | [
":",
"calls",
":",
"GET",
"/",
"users",
"/",
":",
"user",
"/",
"subscriptions",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"activity",
"/",
"watching",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/NamedUser.py#L552-L562 | [
"def",
"get_subscriptions",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"Repository",
".",
"Repository",
",",
"self",
".",
"_requester",
",",
"self",
".",
"url",
"+",
"\"/subscriptions\"",
",",
"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | NamedUser.get_watched | :calls: `GET /users/:user/watched <http://developer.github.com/v3/activity/starring>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` | github/NamedUser.py | def get_watched(self):
"""
:calls: `GET /users/:user/watched <http://developer.github.com/v3/activity/starring>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
return github.PaginatedList.PaginatedList(
github.Reposit... | def get_watched(self):
"""
:calls: `GET /users/:user/watched <http://developer.github.com/v3/activity/starring>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
return github.PaginatedList.PaginatedList(
github.Reposit... | [
":",
"calls",
":",
"GET",
"/",
"users",
"/",
":",
"user",
"/",
"watched",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"activity",
"/",
"starring",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
"Pag... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/NamedUser.py#L564-L574 | [
"def",
"get_watched",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"Repository",
".",
"Repository",
",",
"self",
".",
"_requester",
",",
"self",
".",
"url",
"+",
"\"/watched\"",
",",
"None",
")"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | GitRelease.update_release | :calls: `PATCH /repos/:owner/:repo/releases/:release_id <https://developer.github.com/v3/repos/releases/#edit-a-release>`_
:rtype: :class:`github.GitRelease.GitRelease` | github/GitRelease.py | def update_release(self, name, message, draft=False, prerelease=False,
tag_name=github.GithubObject.NotSet,
target_commitish=github.GithubObject.NotSet):
"""
:calls: `PATCH /repos/:owner/:repo/releases/:release_id <https://developer.github.com/v3/repos/relea... | def update_release(self, name, message, draft=False, prerelease=False,
tag_name=github.GithubObject.NotSet,
target_commitish=github.GithubObject.NotSet):
"""
:calls: `PATCH /repos/:owner/:repo/releases/:release_id <https://developer.github.com/v3/repos/relea... | [
":",
"calls",
":",
"PATCH",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"releases",
"/",
":",
"release_id",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"releases",
"/",
"#edit",
"-",
"a",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/GitRelease.py#L182-L217 | [
"def",
"update_release",
"(",
"self",
",",
"name",
",",
"message",
",",
"draft",
"=",
"False",
",",
"prerelease",
"=",
"False",
",",
"tag_name",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"target_commitish",
"=",
"github",
".",
"GithubObject",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | GitRelease.upload_asset | :calls: `POST https://<upload_url>/repos/:owner/:repo/releases/:release_id/assets?name=foo.zip <https://developer.github.com/v3/repos/releases/#upload-a-release-asset>`_
:rtype: :class:`github.GitReleaseAsset.GitReleaseAsset` | github/GitRelease.py | def upload_asset(self, path, label="", content_type=""):
"""
:calls: `POST https://<upload_url>/repos/:owner/:repo/releases/:release_id/assets?name=foo.zip <https://developer.github.com/v3/repos/releases/#upload-a-release-asset>`_
:rtype: :class:`github.GitReleaseAsset.GitReleaseAsset`
"... | def upload_asset(self, path, label="", content_type=""):
"""
:calls: `POST https://<upload_url>/repos/:owner/:repo/releases/:release_id/assets?name=foo.zip <https://developer.github.com/v3/repos/releases/#upload-a-release-asset>`_
:rtype: :class:`github.GitReleaseAsset.GitReleaseAsset`
"... | [
":",
"calls",
":",
"POST",
"https",
":",
"//",
"<upload_url",
">",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"releases",
"/",
":",
"release_id",
"/",
"assets?name",
"=",
"foo",
".",
"zip",
"<https",
":",
"//",
"developer",
".",
"github"... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/GitRelease.py#L219-L241 | [
"def",
"upload_asset",
"(",
"self",
",",
"path",
",",
"label",
"=",
"\"\"",
",",
"content_type",
"=",
"\"\"",
")",
":",
"assert",
"isinstance",
"(",
"path",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"path",
"assert",
"isinstance",
"(",
"label",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | GitRelease.get_assets | :calls: `GET /repos/:owner/:repo/releases/:release_id/assets <https://developer.github.com/v3/repos/releases/#list-assets-for-a-release>`_
:rtype: :class:`github.PaginatedList.PaginatedList` | github/GitRelease.py | def get_assets(self):
"""
:calls: `GET /repos/:owner/:repo/releases/:release_id/assets <https://developer.github.com/v3/repos/releases/#list-assets-for-a-release>`_
:rtype: :class:`github.PaginatedList.PaginatedList`
"""
return github.PaginatedList.PaginatedList(
gith... | def get_assets(self):
"""
:calls: `GET /repos/:owner/:repo/releases/:release_id/assets <https://developer.github.com/v3/repos/releases/#list-assets-for-a-release>`_
:rtype: :class:`github.PaginatedList.PaginatedList`
"""
return github.PaginatedList.PaginatedList(
gith... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"releases",
"/",
":",
"release_id",
"/",
"assets",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"releases",
"/",
"#list"... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/GitRelease.py#L243-L253 | [
"def",
"get_assets",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"GitReleaseAsset",
".",
"GitReleaseAsset",
",",
"self",
".",
"_requester",
",",
"self",
".",
"url",
"+",
"\"/assets\"",
",",
"None... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | GitRef.edit | :calls: `PATCH /repos/:owner/:repo/git/refs/:ref <http://developer.github.com/v3/git/refs>`_
:param sha: string
:param force: bool
:rtype: None | github/GitRef.py | def edit(self, sha, force=github.GithubObject.NotSet):
"""
:calls: `PATCH /repos/:owner/:repo/git/refs/:ref <http://developer.github.com/v3/git/refs>`_
:param sha: string
:param force: bool
:rtype: None
"""
assert isinstance(sha, (str, unicode)), sha
asser... | def edit(self, sha, force=github.GithubObject.NotSet):
"""
:calls: `PATCH /repos/:owner/:repo/git/refs/:ref <http://developer.github.com/v3/git/refs>`_
:param sha: string
:param force: bool
:rtype: None
"""
assert isinstance(sha, (str, unicode)), sha
asser... | [
":",
"calls",
":",
"PATCH",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"git",
"/",
"refs",
"/",
":",
"ref",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"git",
"/",
"refs",
">",
"_",
":",
"param",
"... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/GitRef.py#L80-L99 | [
"def",
"edit",
"(",
"self",
",",
"sha",
",",
"force",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"isinstance",
"(",
"sha",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"sha",
"assert",
"force",
"is",
"github",
".",
"G... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | enable_console_debug_logging | This function sets up a very simple logging configuration (log everything on standard output) that is useful for troubleshooting. | github/__init__.py | def enable_console_debug_logging(): # pragma no cover (Function useful only outside test environment)
"""
This function sets up a very simple logging configuration (log everything on standard output) that is useful for troubleshooting.
"""
logger = logging.getLogger("github")
logger.setLevel(loggi... | def enable_console_debug_logging(): # pragma no cover (Function useful only outside test environment)
"""
This function sets up a very simple logging configuration (log everything on standard output) that is useful for troubleshooting.
"""
logger = logging.getLogger("github")
logger.setLevel(loggi... | [
"This",
"function",
"sets",
"up",
"a",
"very",
"simple",
"logging",
"configuration",
"(",
"log",
"everything",
"on",
"standard",
"output",
")",
"that",
"is",
"useful",
"for",
"troubleshooting",
"."
] | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/__init__.py#L49-L56 | [
"def",
"enable_console_debug_logging",
"(",
")",
":",
"# pragma no cover (Function useful only outside test environment)",
"logger",
"=",
"logging",
".",
"getLogger",
"(",
"\"github\"",
")",
"logger",
".",
"setLevel",
"(",
"logging",
".",
"DEBUG",
")",
"logger",
".",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.rate_limiting | First value is requests remaining, second value is request limit.
:type: (int, int) | github/MainClass.py | def rate_limiting(self):
"""
First value is requests remaining, second value is request limit.
:type: (int, int)
"""
remaining, limit = self.__requester.rate_limiting
if limit < 0:
self.get_rate_limit()
return self.__requester.rate_limiting | def rate_limiting(self):
"""
First value is requests remaining, second value is request limit.
:type: (int, int)
"""
remaining, limit = self.__requester.rate_limiting
if limit < 0:
self.get_rate_limit()
return self.__requester.rate_limiting | [
"First",
"value",
"is",
"requests",
"remaining",
"second",
"value",
"is",
"request",
"limit",
"."
] | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L150-L159 | [
"def",
"rate_limiting",
"(",
"self",
")",
":",
"remaining",
",",
"limit",
"=",
"self",
".",
"__requester",
".",
"rate_limiting",
"if",
"limit",
"<",
"0",
":",
"self",
".",
"get_rate_limit",
"(",
")",
"return",
"self",
".",
"__requester",
".",
"rate_limitin... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.rate_limiting_resettime | Unix timestamp indicating when rate limiting will reset.
:type: int | github/MainClass.py | def rate_limiting_resettime(self):
"""
Unix timestamp indicating when rate limiting will reset.
:type: int
"""
if self.__requester.rate_limiting_resettime == 0:
self.get_rate_limit()
return self.__requester.rate_limiting_resettime | def rate_limiting_resettime(self):
"""
Unix timestamp indicating when rate limiting will reset.
:type: int
"""
if self.__requester.rate_limiting_resettime == 0:
self.get_rate_limit()
return self.__requester.rate_limiting_resettime | [
"Unix",
"timestamp",
"indicating",
"when",
"rate",
"limiting",
"will",
"reset",
"."
] | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L162-L170 | [
"def",
"rate_limiting_resettime",
"(",
"self",
")",
":",
"if",
"self",
".",
"__requester",
".",
"rate_limiting_resettime",
"==",
"0",
":",
"self",
".",
"get_rate_limit",
"(",
")",
"return",
"self",
".",
"__requester",
".",
"rate_limiting_resettime"
] | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_rate_limit | Rate limit status for different resources (core/search/graphql).
:calls: `GET /rate_limit <http://developer.github.com/v3/rate_limit>`_
:rtype: :class:`github.RateLimit.RateLimit` | github/MainClass.py | def get_rate_limit(self):
"""
Rate limit status for different resources (core/search/graphql).
:calls: `GET /rate_limit <http://developer.github.com/v3/rate_limit>`_
:rtype: :class:`github.RateLimit.RateLimit`
"""
headers, data = self.__requester.requestJsonAndCheck(
... | def get_rate_limit(self):
"""
Rate limit status for different resources (core/search/graphql).
:calls: `GET /rate_limit <http://developer.github.com/v3/rate_limit>`_
:rtype: :class:`github.RateLimit.RateLimit`
"""
headers, data = self.__requester.requestJsonAndCheck(
... | [
"Rate",
"limit",
"status",
"for",
"different",
"resources",
"(",
"core",
"/",
"search",
"/",
"graphql",
")",
"."
] | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L172-L183 | [
"def",
"get_rate_limit",
"(",
"self",
")",
":",
"headers",
",",
"data",
"=",
"self",
".",
"__requester",
".",
"requestJsonAndCheck",
"(",
"'GET'",
",",
"'/rate_limit'",
")",
"return",
"RateLimit",
".",
"RateLimit",
"(",
"self",
".",
"__requester",
",",
"head... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_license | :calls: `GET /license/:license <https://developer.github.com/v3/licenses/#get-an-individual-license>`_
:param key: string
:rtype: :class:`github.License.License` | github/MainClass.py | def get_license(self, key=github.GithubObject.NotSet):
"""
:calls: `GET /license/:license <https://developer.github.com/v3/licenses/#get-an-individual-license>`_
:param key: string
:rtype: :class:`github.License.License`
"""
assert isinstance(key, (str, unicode)), key
... | def get_license(self, key=github.GithubObject.NotSet):
"""
:calls: `GET /license/:license <https://developer.github.com/v3/licenses/#get-an-individual-license>`_
:param key: string
:rtype: :class:`github.License.License`
"""
assert isinstance(key, (str, unicode)), key
... | [
":",
"calls",
":",
"GET",
"/",
"license",
"/",
":",
"license",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"licenses",
"/",
"#get",
"-",
"an",
"-",
"individual",
"-",
"license",
">",
"_",
":",
"param",
"key",
":",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L192-L204 | [
"def",
"get_license",
"(",
"self",
",",
"key",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"isinstance",
"(",
"key",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"key",
"headers",
",",
"data",
"=",
"self",
".",
"__reques... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_licenses | :calls: `GET /licenses <https://developer.github.com/v3/licenses/#list-all-licenses>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.License.License` | github/MainClass.py | def get_licenses(self):
"""
:calls: `GET /licenses <https://developer.github.com/v3/licenses/#list-all-licenses>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.License.License`
"""
url_parameters = dict()
return github.PaginatedList.PaginatedLis... | def get_licenses(self):
"""
:calls: `GET /licenses <https://developer.github.com/v3/licenses/#list-all-licenses>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.License.License`
"""
url_parameters = dict()
return github.PaginatedList.PaginatedLis... | [
":",
"calls",
":",
"GET",
"/",
"licenses",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"licenses",
"/",
"#list",
"-",
"all",
"-",
"licenses",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
"Paginated... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L206-L219 | [
"def",
"get_licenses",
"(",
"self",
")",
":",
"url_parameters",
"=",
"dict",
"(",
")",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"License",
".",
"License",
",",
"self",
".",
"__requester",
",",
"\"/licenses\"",
",",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_user | :calls: `GET /users/:user <http://developer.github.com/v3/users>`_ or `GET /user <http://developer.github.com/v3/users>`_
:param login: string
:rtype: :class:`github.NamedUser.NamedUser` | github/MainClass.py | def get_user(self, login=github.GithubObject.NotSet):
"""
:calls: `GET /users/:user <http://developer.github.com/v3/users>`_ or `GET /user <http://developer.github.com/v3/users>`_
:param login: string
:rtype: :class:`github.NamedUser.NamedUser`
"""
assert login is github.... | def get_user(self, login=github.GithubObject.NotSet):
"""
:calls: `GET /users/:user <http://developer.github.com/v3/users>`_ or `GET /user <http://developer.github.com/v3/users>`_
:param login: string
:rtype: :class:`github.NamedUser.NamedUser`
"""
assert login is github.... | [
":",
"calls",
":",
"GET",
"/",
"users",
"/",
":",
"user",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"users",
">",
"_",
"or",
"GET",
"/",
"user",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L221-L235 | [
"def",
"get_user",
"(",
"self",
",",
"login",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"login",
"is",
"github",
".",
"GithubObject",
".",
"NotSet",
"or",
"isinstance",
"(",
"login",
",",
"(",
"str",
",",
"unicode",
")",
")... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_organization | :calls: `GET /orgs/:org <http://developer.github.com/v3/orgs>`_
:param login: string
:rtype: :class:`github.Organization.Organization` | github/MainClass.py | def get_organization(self, login):
"""
:calls: `GET /orgs/:org <http://developer.github.com/v3/orgs>`_
:param login: string
:rtype: :class:`github.Organization.Organization`
"""
assert isinstance(login, (str, unicode)), login
headers, data = self.__requester.reque... | def get_organization(self, login):
"""
:calls: `GET /orgs/:org <http://developer.github.com/v3/orgs>`_
:param login: string
:rtype: :class:`github.Organization.Organization`
"""
assert isinstance(login, (str, unicode)), login
headers, data = self.__requester.reque... | [
":",
"calls",
":",
"GET",
"/",
"orgs",
"/",
":",
"org",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"orgs",
">",
"_",
":",
"param",
"login",
":",
"string",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
"Or... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L254-L265 | [
"def",
"get_organization",
"(",
"self",
",",
"login",
")",
":",
"assert",
"isinstance",
"(",
"login",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"login",
"headers",
",",
"data",
"=",
"self",
".",
"__requester",
".",
"requestJsonAndCheck",
"(",
"\"GE... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_organizations | :calls: `GET /organizations <http://developer.github.com/v3/orgs#list-all-organizations>`_
:param since: integer
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization` | github/MainClass.py | def get_organizations(self, since=github.GithubObject.NotSet):
"""
:calls: `GET /organizations <http://developer.github.com/v3/orgs#list-all-organizations>`_
:param since: integer
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization`
"""... | def get_organizations(self, since=github.GithubObject.NotSet):
"""
:calls: `GET /organizations <http://developer.github.com/v3/orgs#list-all-organizations>`_
:param since: integer
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization`
"""... | [
":",
"calls",
":",
"GET",
"/",
"organizations",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"orgs#list",
"-",
"all",
"-",
"organizations",
">",
"_",
":",
"param",
"since",
":",
"integer",
":",
"rtype",
":",
":",
"class... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L267-L282 | [
"def",
"get_organizations",
"(",
"self",
",",
"since",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"since",
"is",
"github",
".",
"GithubObject",
".",
"NotSet",
"or",
"isinstance",
"(",
"since",
",",
"(",
"int",
",",
"long",
")"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_repo | :calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_ or `GET /repositories/:id <http://developer.github.com/v3/repos>`_
:rtype: :class:`github.Repository.Repository` | github/MainClass.py | def get_repo(self, full_name_or_id, lazy=False):
"""
:calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_ or `GET /repositories/:id <http://developer.github.com/v3/repos>`_
:rtype: :class:`github.Repository.Repository`
"""
assert isinstance(full_name_or_id, (... | def get_repo(self, full_name_or_id, lazy=False):
"""
:calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_ or `GET /repositories/:id <http://developer.github.com/v3/repos>`_
:rtype: :class:`github.Repository.Repository`
"""
assert isinstance(full_name_or_id, (... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
">",
"_",
"or",
"GET",
"/",
"repositories",
"/",
":",
"id",
"<http",
":",
"//",
"d... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L284-L298 | [
"def",
"get_repo",
"(",
"self",
",",
"full_name_or_id",
",",
"lazy",
"=",
"False",
")",
":",
"assert",
"isinstance",
"(",
"full_name_or_id",
",",
"(",
"str",
",",
"unicode",
",",
"int",
",",
"long",
")",
")",
",",
"full_name_or_id",
"url_base",
"=",
"\"/... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_repos | :calls: `GET /repositories <http://developer.github.com/v3/repos/#list-all-public-repositories>`_
:param since: integer
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` | github/MainClass.py | def get_repos(self, since=github.GithubObject.NotSet):
"""
:calls: `GET /repositories <http://developer.github.com/v3/repos/#list-all-public-repositories>`_
:param since: integer
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
... | def get_repos(self, since=github.GithubObject.NotSet):
"""
:calls: `GET /repositories <http://developer.github.com/v3/repos/#list-all-public-repositories>`_
:param since: integer
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
... | [
":",
"calls",
":",
"GET",
"/",
"repositories",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"#list",
"-",
"all",
"-",
"public",
"-",
"repositories",
">",
"_",
":",
"param",
"since",
":",
"integer",
":",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L300-L315 | [
"def",
"get_repos",
"(",
"self",
",",
"since",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"since",
"is",
"github",
".",
"GithubObject",
".",
"NotSet",
"or",
"isinstance",
"(",
"since",
",",
"(",
"int",
",",
"long",
")",
")",... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_project | :calls: `GET /projects/:project_id <https://developer.github.com/v3/projects/#get-a-project>`_
:rtype: :class:`github.Project.Project`
:param id: integer | github/MainClass.py | def get_project(self, id):
"""
:calls: `GET /projects/:project_id <https://developer.github.com/v3/projects/#get-a-project>`_
:rtype: :class:`github.Project.Project`
:param id: integer
"""
headers, data = self.__requester.requestJsonAndCheck(
"GET",
... | def get_project(self, id):
"""
:calls: `GET /projects/:project_id <https://developer.github.com/v3/projects/#get-a-project>`_
:rtype: :class:`github.Project.Project`
:param id: integer
"""
headers, data = self.__requester.requestJsonAndCheck(
"GET",
... | [
":",
"calls",
":",
"GET",
"/",
"projects",
"/",
":",
"project_id",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"projects",
"/",
"#get",
"-",
"a",
"-",
"project",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"gi... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L317-L328 | [
"def",
"get_project",
"(",
"self",
",",
"id",
")",
":",
"headers",
",",
"data",
"=",
"self",
".",
"__requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",
",",
"\"/projects/%d\"",
"%",
"(",
"id",
")",
",",
"headers",
"=",
"{",
"\"Accept\"",
":",
"Const... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_gist | :calls: `GET /gists/:id <http://developer.github.com/v3/gists>`_
:param id: string
:rtype: :class:`github.Gist.Gist` | github/MainClass.py | def get_gist(self, id):
"""
:calls: `GET /gists/:id <http://developer.github.com/v3/gists>`_
:param id: string
:rtype: :class:`github.Gist.Gist`
"""
assert isinstance(id, (str, unicode)), id
headers, data = self.__requester.requestJsonAndCheck(
"GET",
... | def get_gist(self, id):
"""
:calls: `GET /gists/:id <http://developer.github.com/v3/gists>`_
:param id: string
:rtype: :class:`github.Gist.Gist`
"""
assert isinstance(id, (str, unicode)), id
headers, data = self.__requester.requestJsonAndCheck(
"GET",
... | [
":",
"calls",
":",
"GET",
"/",
"gists",
"/",
":",
"id",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"gists",
">",
"_",
":",
"param",
"id",
":",
"string",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
"Gist... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L330-L341 | [
"def",
"get_gist",
"(",
"self",
",",
"id",
")",
":",
"assert",
"isinstance",
"(",
"id",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"id",
"headers",
",",
"data",
"=",
"self",
".",
"__requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",
",",
"\... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.search_users | :calls: `GET /search/users <http://developer.github.com/v3/search>`_
:param query: string
:param sort: string ('followers', 'repositories', 'joined')
:param order: string ('asc', 'desc')
:param qualifiers: keyword dict query qualifiers
:rtype: :class:`github.PaginatedList.Paginat... | github/MainClass.py | def search_users(self, query, sort=github.GithubObject.NotSet, order=github.GithubObject.NotSet, **qualifiers):
"""
:calls: `GET /search/users <http://developer.github.com/v3/search>`_
:param query: string
:param sort: string ('followers', 'repositories', 'joined')
:param order: ... | def search_users(self, query, sort=github.GithubObject.NotSet, order=github.GithubObject.NotSet, **qualifiers):
"""
:calls: `GET /search/users <http://developer.github.com/v3/search>`_
:param query: string
:param sort: string ('followers', 'repositories', 'joined')
:param order: ... | [
":",
"calls",
":",
"GET",
"/",
"search",
"/",
"users",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"search",
">",
"_",
":",
"param",
"query",
":",
"string",
":",
"param",
"sort",
":",
"string",
"(",
"followers",
"rep... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L395-L428 | [
"def",
"search_users",
"(",
"self",
",",
"query",
",",
"sort",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"order",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"*",
"*",
"qualifiers",
")",
":",
"assert",
"isinstance",
"(",
"query"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.search_code | :calls: `GET /search/code <http://developer.github.com/v3/search>`_
:param query: string
:param sort: string ('indexed')
:param order: string ('asc', 'desc')
:param highlight: boolean (True, False)
:param qualifiers: keyword dict query qualifiers
:rtype: :class:`github.Pa... | github/MainClass.py | def search_code(self, query, sort=github.GithubObject.NotSet, order=github.GithubObject.NotSet, highlight=False, **qualifiers):
"""
:calls: `GET /search/code <http://developer.github.com/v3/search>`_
:param query: string
:param sort: string ('indexed')
:param order: string ('asc'... | def search_code(self, query, sort=github.GithubObject.NotSet, order=github.GithubObject.NotSet, highlight=False, **qualifiers):
"""
:calls: `GET /search/code <http://developer.github.com/v3/search>`_
:param query: string
:param sort: string ('indexed')
:param order: string ('asc'... | [
":",
"calls",
":",
"GET",
"/",
"search",
"/",
"code",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"search",
">",
"_",
":",
"param",
"query",
":",
"string",
":",
"param",
"sort",
":",
"string",
"(",
"indexed",
")",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L465-L502 | [
"def",
"search_code",
"(",
"self",
",",
"query",
",",
"sort",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"order",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"highlight",
"=",
"False",
",",
"*",
"*",
"qualifiers",
")",
":",
"as... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.search_commits | :calls: `GET /search/commits <http://developer.github.com/v3/search>`_
:param query: string
:param sort: string ('author-date', 'committer-date')
:param order: string ('asc', 'desc')
:param qualifiers: keyword dict query qualifiers
:rtype: :class:`github.PaginatedList.PaginatedLi... | github/MainClass.py | def search_commits(self, query, sort=github.GithubObject.NotSet, order=github.GithubObject.NotSet, **qualifiers):
"""
:calls: `GET /search/commits <http://developer.github.com/v3/search>`_
:param query: string
:param sort: string ('author-date', 'committer-date')
:param order: st... | def search_commits(self, query, sort=github.GithubObject.NotSet, order=github.GithubObject.NotSet, **qualifiers):
"""
:calls: `GET /search/commits <http://developer.github.com/v3/search>`_
:param query: string
:param sort: string ('author-date', 'committer-date')
:param order: st... | [
":",
"calls",
":",
"GET",
"/",
"search",
"/",
"commits",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"search",
">",
"_",
":",
"param",
"query",
":",
"string",
":",
"param",
"sort",
":",
"string",
"(",
"author",
"-",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L504-L540 | [
"def",
"search_commits",
"(",
"self",
",",
"query",
",",
"sort",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"order",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"*",
"*",
"qualifiers",
")",
":",
"assert",
"isinstance",
"(",
"quer... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.search_topics | :calls: `GET /search/topics <http://developer.github.com/v3/search>`_
:param query: string
:param qualifiers: keyword dict query qualifiers
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Topic.Topic` | github/MainClass.py | def search_topics(self, query, **qualifiers):
"""
:calls: `GET /search/topics <http://developer.github.com/v3/search>`_
:param query: string
:param qualifiers: keyword dict query qualifiers
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Topic.Topic`
... | def search_topics(self, query, **qualifiers):
"""
:calls: `GET /search/topics <http://developer.github.com/v3/search>`_
:param query: string
:param qualifiers: keyword dict query qualifiers
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Topic.Topic`
... | [
":",
"calls",
":",
"GET",
"/",
"search",
"/",
"topics",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"search",
">",
"_",
":",
"param",
"query",
":",
"string",
":",
"param",
"qualifiers",
":",
"keyword",
"dict",
"query",... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L542-L570 | [
"def",
"search_topics",
"(",
"self",
",",
"query",
",",
"*",
"*",
"qualifiers",
")",
":",
"assert",
"isinstance",
"(",
"query",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"query",
"url_parameters",
"=",
"dict",
"(",
")",
"query_chunks",
"=",
"[",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.render_markdown | :calls: `POST /markdown <http://developer.github.com/v3/markdown>`_
:param text: string
:param context: :class:`github.Repository.Repository`
:rtype: string | github/MainClass.py | def render_markdown(self, text, context=github.GithubObject.NotSet):
"""
:calls: `POST /markdown <http://developer.github.com/v3/markdown>`_
:param text: string
:param context: :class:`github.Repository.Repository`
:rtype: string
"""
assert isinstance(text, (str, ... | def render_markdown(self, text, context=github.GithubObject.NotSet):
"""
:calls: `POST /markdown <http://developer.github.com/v3/markdown>`_
:param text: string
:param context: :class:`github.Repository.Repository`
:rtype: string
"""
assert isinstance(text, (str, ... | [
":",
"calls",
":",
"POST",
"/",
"markdown",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"markdown",
">",
"_",
":",
"param",
"text",
":",
"string",
":",
"param",
"context",
":",
":",
"class",
":",
"github",
".",
"Repo... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L572-L592 | [
"def",
"render_markdown",
"(",
"self",
",",
"text",
",",
"context",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"isinstance",
"(",
"text",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"text",
"assert",
"context",
"is",
"gi... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_hook | :calls: `GET /hooks/:name <http://developer.github.com/v3/repos/hooks/>`_
:param name: string
:rtype: :class:`github.HookDescription.HookDescription` | github/MainClass.py | def get_hook(self, name):
"""
:calls: `GET /hooks/:name <http://developer.github.com/v3/repos/hooks/>`_
:param name: string
:rtype: :class:`github.HookDescription.HookDescription`
"""
assert isinstance(name, (str, unicode)), name
headers, attributes = self.__reque... | def get_hook(self, name):
"""
:calls: `GET /hooks/:name <http://developer.github.com/v3/repos/hooks/>`_
:param name: string
:rtype: :class:`github.HookDescription.HookDescription`
"""
assert isinstance(name, (str, unicode)), name
headers, attributes = self.__reque... | [
":",
"calls",
":",
"GET",
"/",
"hooks",
"/",
":",
"name",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"hooks",
"/",
">",
"_",
":",
"param",
"name",
":",
"string",
":",
"rtype",
":",
":",
"class",
":... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L594-L605 | [
"def",
"get_hook",
"(",
"self",
",",
"name",
")",
":",
"assert",
"isinstance",
"(",
"name",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"name",
"headers",
",",
"attributes",
"=",
"self",
".",
"__requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_hooks | :calls: `GET /hooks <http://developer.github.com/v3/repos/hooks/>`_
:rtype: list of :class:`github.HookDescription.HookDescription` | github/MainClass.py | def get_hooks(self):
"""
:calls: `GET /hooks <http://developer.github.com/v3/repos/hooks/>`_
:rtype: list of :class:`github.HookDescription.HookDescription`
"""
headers, data = self.__requester.requestJsonAndCheck(
"GET",
"/hooks"
)
return ... | def get_hooks(self):
"""
:calls: `GET /hooks <http://developer.github.com/v3/repos/hooks/>`_
:rtype: list of :class:`github.HookDescription.HookDescription`
"""
headers, data = self.__requester.requestJsonAndCheck(
"GET",
"/hooks"
)
return ... | [
":",
"calls",
":",
"GET",
"/",
"hooks",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"hooks",
"/",
">",
"_",
":",
"rtype",
":",
"list",
"of",
":",
"class",
":",
"github",
".",
"HookDescription",
".",
"... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L607-L616 | [
"def",
"get_hooks",
"(",
"self",
")",
":",
"headers",
",",
"data",
"=",
"self",
".",
"__requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",
",",
"\"/hooks\"",
")",
"return",
"[",
"HookDescription",
".",
"HookDescription",
"(",
"self",
".",
"__requester",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.get_gitignore_template | :calls: `GET /gitignore/templates/:name <http://developer.github.com/v3/gitignore>`_
:rtype: :class:`github.GitignoreTemplate.GitignoreTemplate` | github/MainClass.py | def get_gitignore_template(self, name):
"""
:calls: `GET /gitignore/templates/:name <http://developer.github.com/v3/gitignore>`_
:rtype: :class:`github.GitignoreTemplate.GitignoreTemplate`
"""
assert isinstance(name, (str, unicode)), name
headers, attributes = self.__requ... | def get_gitignore_template(self, name):
"""
:calls: `GET /gitignore/templates/:name <http://developer.github.com/v3/gitignore>`_
:rtype: :class:`github.GitignoreTemplate.GitignoreTemplate`
"""
assert isinstance(name, (str, unicode)), name
headers, attributes = self.__requ... | [
":",
"calls",
":",
"GET",
"/",
"gitignore",
"/",
"templates",
"/",
":",
"name",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"gitignore",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
"GitignoreTemplate... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L629-L639 | [
"def",
"get_gitignore_template",
"(",
"self",
",",
"name",
")",
":",
"assert",
"isinstance",
"(",
"name",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"name",
"headers",
",",
"attributes",
"=",
"self",
".",
"__requester",
".",
"requestJsonAndCheck",
"("... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.create_from_raw_data | Creates an object from raw_data previously obtained by :attr:`github.GithubObject.GithubObject.raw_data`,
and optionaly headers previously obtained by :attr:`github.GithubObject.GithubObject.raw_headers`.
:param klass: the class of the object to create
:param raw_data: dict
:param heade... | github/MainClass.py | def create_from_raw_data(self, klass, raw_data, headers={}):
"""
Creates an object from raw_data previously obtained by :attr:`github.GithubObject.GithubObject.raw_data`,
and optionaly headers previously obtained by :attr:`github.GithubObject.GithubObject.raw_headers`.
:param klass: the... | def create_from_raw_data(self, klass, raw_data, headers={}):
"""
Creates an object from raw_data previously obtained by :attr:`github.GithubObject.GithubObject.raw_data`,
and optionaly headers previously obtained by :attr:`github.GithubObject.GithubObject.raw_headers`.
:param klass: the... | [
"Creates",
"an",
"object",
"from",
"raw_data",
"previously",
"obtained",
"by",
":",
"attr",
":",
"github",
".",
"GithubObject",
".",
"GithubObject",
".",
"raw_data",
"and",
"optionaly",
"headers",
"previously",
"obtained",
"by",
":",
"attr",
":",
"github",
"."... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L652-L662 | [
"def",
"create_from_raw_data",
"(",
"self",
",",
"klass",
",",
"raw_data",
",",
"headers",
"=",
"{",
"}",
")",
":",
"return",
"klass",
"(",
"self",
".",
"__requester",
",",
"headers",
",",
"raw_data",
",",
"completed",
"=",
"True",
")"
] | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Github.dump | Dumps (pickles) a PyGithub object to a file-like object.
Some effort is made to not pickle sensitive informations like the Github credentials used in the :class:`Github` instance.
But NO EFFORT is made to remove sensitive information from the object's attributes.
:param obj: the object to pickl... | github/MainClass.py | def dump(self, obj, file, protocol=0):
"""
Dumps (pickles) a PyGithub object to a file-like object.
Some effort is made to not pickle sensitive informations like the Github credentials used in the :class:`Github` instance.
But NO EFFORT is made to remove sensitive information from the ob... | def dump(self, obj, file, protocol=0):
"""
Dumps (pickles) a PyGithub object to a file-like object.
Some effort is made to not pickle sensitive informations like the Github credentials used in the :class:`Github` instance.
But NO EFFORT is made to remove sensitive information from the ob... | [
"Dumps",
"(",
"pickles",
")",
"a",
"PyGithub",
"object",
"to",
"a",
"file",
"-",
"like",
"object",
".",
"Some",
"effort",
"is",
"made",
"to",
"not",
"pickle",
"sensitive",
"informations",
"like",
"the",
"Github",
"credentials",
"used",
"in",
"the",
":",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L664-L674 | [
"def",
"dump",
"(",
"self",
",",
"obj",
",",
"file",
",",
"protocol",
"=",
"0",
")",
":",
"pickle",
".",
"dump",
"(",
"(",
"obj",
".",
"__class__",
",",
"obj",
".",
"raw_data",
",",
"obj",
".",
"raw_headers",
")",
",",
"file",
",",
"protocol",
")... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | GithubIntegration.create_jwt | Creates a signed JWT, valid for 60 seconds by default.
The expiration can be extended beyond this, to a maximum of 600 seconds.
:param expiration: int
:return: | github/MainClass.py | def create_jwt(self, expiration=60):
"""
Creates a signed JWT, valid for 60 seconds by default.
The expiration can be extended beyond this, to a maximum of 600 seconds.
:param expiration: int
:return:
"""
now = int(time.time())
payload = {
"ia... | def create_jwt(self, expiration=60):
"""
Creates a signed JWT, valid for 60 seconds by default.
The expiration can be extended beyond this, to a maximum of 600 seconds.
:param expiration: int
:return:
"""
now = int(time.time())
payload = {
"ia... | [
"Creates",
"a",
"signed",
"JWT",
"valid",
"for",
"60",
"seconds",
"by",
"default",
".",
"The",
"expiration",
"can",
"be",
"extended",
"beyond",
"this",
"to",
"a",
"maximum",
"of",
"600",
"seconds",
"."
] | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L707-L730 | [
"def",
"create_jwt",
"(",
"self",
",",
"expiration",
"=",
"60",
")",
":",
"now",
"=",
"int",
"(",
"time",
".",
"time",
"(",
")",
")",
"payload",
"=",
"{",
"\"iat\"",
":",
"now",
",",
"\"exp\"",
":",
"now",
"+",
"expiration",
",",
"\"iss\"",
":",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | GithubIntegration.get_access_token | Get an access token for the given installation id.
POSTs https://api.github.com/app/installations/<installation_id>/access_tokens
:param user_id: int
:param installation_id: int
:return: :class:`github.InstallationAuthorization.InstallationAuthorization` | github/MainClass.py | def get_access_token(self, installation_id, user_id=None):
"""
Get an access token for the given installation id.
POSTs https://api.github.com/app/installations/<installation_id>/access_tokens
:param user_id: int
:param installation_id: int
:return: :class:`github.Install... | def get_access_token(self, installation_id, user_id=None):
"""
Get an access token for the given installation id.
POSTs https://api.github.com/app/installations/<installation_id>/access_tokens
:param user_id: int
:param installation_id: int
:return: :class:`github.Install... | [
"Get",
"an",
"access",
"token",
"for",
"the",
"given",
"installation",
"id",
".",
"POSTs",
"https",
":",
"//",
"api",
".",
"github",
".",
"com",
"/",
"app",
"/",
"installations",
"/",
"<installation_id",
">",
"/",
"access_tokens",
":",
"param",
"user_id",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/MainClass.py#L732-L773 | [
"def",
"get_access_token",
"(",
"self",
",",
"installation_id",
",",
"user_id",
"=",
"None",
")",
":",
"body",
"=",
"{",
"}",
"if",
"user_id",
":",
"body",
"=",
"{",
"\"user_id\"",
":",
"user_id",
"}",
"response",
"=",
"requests",
".",
"post",
"(",
"\"... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Label.edit | :calls: `PATCH /repos/:owner/:repo/labels/:name <http://developer.github.com/v3/issues/labels>`_
:param name: string
:param color: string
:param description: string
:rtype: None | github/Label.py | def edit(self, name, color, description=github.GithubObject.NotSet):
"""
:calls: `PATCH /repos/:owner/:repo/labels/:name <http://developer.github.com/v3/issues/labels>`_
:param name: string
:param color: string
:param description: string
:rtype: None
"""
a... | def edit(self, name, color, description=github.GithubObject.NotSet):
"""
:calls: `PATCH /repos/:owner/:repo/labels/:name <http://developer.github.com/v3/issues/labels>`_
:param name: string
:param color: string
:param description: string
:rtype: None
"""
a... | [
":",
"calls",
":",
"PATCH",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"labels",
"/",
":",
"name",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"issues",
"/",
"labels",
">",
"_",
":",
"param",
"name",
... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Label.py#L91-L114 | [
"def",
"edit",
"(",
"self",
",",
"name",
",",
"color",
",",
"description",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"isinstance",
"(",
"name",
",",
"(",
"str",
",",
"unicode",
")",
")",
",",
"name",
"assert",
"isinstance",... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | ProjectCard.get_content | :calls: `GET /repos/:owner/:repo/pulls/:number <https://developer.github.com/v3/pulls/#get-a-single-pull-request>`_
:rtype: :class:`github.PullRequest.PullRequest` or :class:`github.Issue.Issue` | github/ProjectCard.py | def get_content(self, content_type=github.GithubObject.NotSet):
"""
:calls: `GET /repos/:owner/:repo/pulls/:number <https://developer.github.com/v3/pulls/#get-a-single-pull-request>`_
:rtype: :class:`github.PullRequest.PullRequest` or :class:`github.Issue.Issue`
"""
if self.conte... | def get_content(self, content_type=github.GithubObject.NotSet):
"""
:calls: `GET /repos/:owner/:repo/pulls/:number <https://developer.github.com/v3/pulls/#get-a-single-pull-request>`_
:rtype: :class:`github.PullRequest.PullRequest` or :class:`github.Issue.Issue`
"""
if self.conte... | [
":",
"calls",
":",
"GET",
"/",
"repos",
"/",
":",
"owner",
"/",
":",
"repo",
"/",
"pulls",
"/",
":",
"number",
"<https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"pulls",
"/",
"#get",
"-",
"a",
"-",
"single",
"-",
"pul... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/ProjectCard.py#L115-L136 | [
"def",
"get_content",
"(",
"self",
",",
"content_type",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"if",
"self",
".",
"content_url",
"==",
"None",
":",
"return",
"None",
"if",
"content_type",
"==",
"\"PullRequest\"",
":",
"headers",
",",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Gist.create_fork | :calls: `POST /gists/:id/forks <http://developer.github.com/v3/gists>`_
:rtype: :class:`github.Gist.Gist` | github/Gist.py | def create_fork(self):
"""
:calls: `POST /gists/:id/forks <http://developer.github.com/v3/gists>`_
:rtype: :class:`github.Gist.Gist`
"""
headers, data = self._requester.requestJsonAndCheck(
"POST",
self.url + "/forks"
)
return Gist(self._re... | def create_fork(self):
"""
:calls: `POST /gists/:id/forks <http://developer.github.com/v3/gists>`_
:rtype: :class:`github.Gist.Gist`
"""
headers, data = self._requester.requestJsonAndCheck(
"POST",
self.url + "/forks"
)
return Gist(self._re... | [
":",
"calls",
":",
"POST",
"/",
"gists",
"/",
":",
"id",
"/",
"forks",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"gists",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
"Gist",
".",
"Gist"
] | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Gist.py#L222-L231 | [
"def",
"create_fork",
"(",
"self",
")",
":",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
".",
"requestJsonAndCheck",
"(",
"\"POST\"",
",",
"self",
".",
"url",
"+",
"\"/forks\"",
")",
"return",
"Gist",
"(",
"self",
".",
"_requester",
",",
"hea... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Gist.edit | :calls: `PATCH /gists/:id <http://developer.github.com/v3/gists>`_
:param description: string
:param files: dict of string to :class:`github.InputFileContent.InputFileContent`
:rtype: None | github/Gist.py | def edit(self, description=github.GithubObject.NotSet, files=github.GithubObject.NotSet):
"""
:calls: `PATCH /gists/:id <http://developer.github.com/v3/gists>`_
:param description: string
:param files: dict of string to :class:`github.InputFileContent.InputFileContent`
:rtype: No... | def edit(self, description=github.GithubObject.NotSet, files=github.GithubObject.NotSet):
"""
:calls: `PATCH /gists/:id <http://developer.github.com/v3/gists>`_
:param description: string
:param files: dict of string to :class:`github.InputFileContent.InputFileContent`
:rtype: No... | [
":",
"calls",
":",
"PATCH",
"/",
"gists",
"/",
":",
"id",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"gists",
">",
"_",
":",
"param",
"description",
":",
"string",
":",
"param",
"files",
":",
"dict",
"of",
"string",... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Gist.py#L243-L262 | [
"def",
"edit",
"(",
"self",
",",
"description",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
",",
"files",
"=",
"github",
".",
"GithubObject",
".",
"NotSet",
")",
":",
"assert",
"description",
"is",
"github",
".",
"GithubObject",
".",
"NotSet",
"or",... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Gist.get_comment | :calls: `GET /gists/:gist_id/comments/:id <http://developer.github.com/v3/gists/comments>`_
:param id: integer
:rtype: :class:`github.GistComment.GistComment` | github/Gist.py | def get_comment(self, id):
"""
:calls: `GET /gists/:gist_id/comments/:id <http://developer.github.com/v3/gists/comments>`_
:param id: integer
:rtype: :class:`github.GistComment.GistComment`
"""
assert isinstance(id, (int, long)), id
headers, data = self._requester... | def get_comment(self, id):
"""
:calls: `GET /gists/:gist_id/comments/:id <http://developer.github.com/v3/gists/comments>`_
:param id: integer
:rtype: :class:`github.GistComment.GistComment`
"""
assert isinstance(id, (int, long)), id
headers, data = self._requester... | [
":",
"calls",
":",
"GET",
"/",
"gists",
"/",
":",
"gist_id",
"/",
"comments",
"/",
":",
"id",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"gists",
"/",
"comments",
">",
"_",
":",
"param",
"id",
":",
"integer",
":",... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Gist.py#L264-L275 | [
"def",
"get_comment",
"(",
"self",
",",
"id",
")",
":",
"assert",
"isinstance",
"(",
"id",
",",
"(",
"int",
",",
"long",
")",
")",
",",
"id",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
".",
"requestJsonAndCheck",
"(",
"\"GET\"",
",",
"se... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Gist.get_comments | :calls: `GET /gists/:gist_id/comments <http://developer.github.com/v3/gists/comments>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GistComment.GistComment` | github/Gist.py | def get_comments(self):
"""
:calls: `GET /gists/:gist_id/comments <http://developer.github.com/v3/gists/comments>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GistComment.GistComment`
"""
return github.PaginatedList.PaginatedList(
github.Gis... | def get_comments(self):
"""
:calls: `GET /gists/:gist_id/comments <http://developer.github.com/v3/gists/comments>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GistComment.GistComment`
"""
return github.PaginatedList.PaginatedList(
github.Gis... | [
":",
"calls",
":",
"GET",
"/",
"gists",
"/",
":",
"gist_id",
"/",
"comments",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"gists",
"/",
"comments",
">",
"_",
":",
"rtype",
":",
":",
"class",
":",
"github",
".",
"Pa... | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Gist.py#L277-L287 | [
"def",
"get_comments",
"(",
"self",
")",
":",
"return",
"github",
".",
"PaginatedList",
".",
"PaginatedList",
"(",
"github",
".",
"GistComment",
".",
"GistComment",
",",
"self",
".",
"_requester",
",",
"self",
".",
"url",
"+",
"\"/comments\"",
",",
"None",
... | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | Gist.is_starred | :calls: `GET /gists/:id/star <http://developer.github.com/v3/gists>`_
:rtype: bool | github/Gist.py | def is_starred(self):
"""
:calls: `GET /gists/:id/star <http://developer.github.com/v3/gists>`_
:rtype: bool
"""
status, headers, data = self._requester.requestJson(
"GET",
self.url + "/star"
)
return status == 204 | def is_starred(self):
"""
:calls: `GET /gists/:id/star <http://developer.github.com/v3/gists>`_
:rtype: bool
"""
status, headers, data = self._requester.requestJson(
"GET",
self.url + "/star"
)
return status == 204 | [
":",
"calls",
":",
"GET",
"/",
"gists",
"/",
":",
"id",
"/",
"star",
"<http",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"gists",
">",
"_",
":",
"rtype",
":",
"bool"
] | PyGithub/PyGithub | python | https://github.com/PyGithub/PyGithub/blob/f716df86bbe7dc276c6596699fa9712b61ef974c/github/Gist.py#L289-L298 | [
"def",
"is_starred",
"(",
"self",
")",
":",
"status",
",",
"headers",
",",
"data",
"=",
"self",
".",
"_requester",
".",
"requestJson",
"(",
"\"GET\"",
",",
"self",
".",
"url",
"+",
"\"/star\"",
")",
"return",
"status",
"==",
"204"
] | f716df86bbe7dc276c6596699fa9712b61ef974c |
train | VNCClient.send_KeyEvent | For most ordinary keys, the "keysym" is the same as the
corresponding ASCII value. Other common keys are shown in the
KEY_ constants. | universe/vncdriver/vnc_client.py | def send_KeyEvent(self, key, down):
"""For most ordinary keys, the "keysym" is the same as the
corresponding ASCII value. Other common keys are shown in the
KEY_ constants.
"""
self.sendMessage(struct.pack('!BBxxI', 4, down, key)) | def send_KeyEvent(self, key, down):
"""For most ordinary keys, the "keysym" is the same as the
corresponding ASCII value. Other common keys are shown in the
KEY_ constants.
"""
self.sendMessage(struct.pack('!BBxxI', 4, down, key)) | [
"For",
"most",
"ordinary",
"keys",
"the",
"keysym",
"is",
"the",
"same",
"as",
"the",
"corresponding",
"ASCII",
"value",
".",
"Other",
"common",
"keys",
"are",
"shown",
"in",
"the",
"KEY_",
"constants",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/vncdriver/vnc_client.py#L382-L387 | [
"def",
"send_KeyEvent",
"(",
"self",
",",
"key",
",",
"down",
")",
":",
"self",
".",
"sendMessage",
"(",
"struct",
".",
"pack",
"(",
"'!BBxxI'",
",",
"4",
",",
"down",
",",
"key",
")",
")"
] | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | VNCClient.send_PointerEvent | Indicates either pointer movement or a pointer button press or
release. The pointer is now at (x-position, y-position),
and the current state of buttons 1 to 8 are represented by
bits 0 to 7 of button-mask respectively, 0 meaning up, 1
meaning down (pressed). | universe/vncdriver/vnc_client.py | def send_PointerEvent(self, x, y, buttonmask=0):
"""Indicates either pointer movement or a pointer button press or
release. The pointer is now at (x-position, y-position),
and the current state of buttons 1 to 8 are represented by
bits 0 to 7 of button-mask respectively, 0 meani... | def send_PointerEvent(self, x, y, buttonmask=0):
"""Indicates either pointer movement or a pointer button press or
release. The pointer is now at (x-position, y-position),
and the current state of buttons 1 to 8 are represented by
bits 0 to 7 of button-mask respectively, 0 meani... | [
"Indicates",
"either",
"pointer",
"movement",
"or",
"a",
"pointer",
"button",
"press",
"or",
"release",
".",
"The",
"pointer",
"is",
"now",
"at",
"(",
"x",
"-",
"position",
"y",
"-",
"position",
")",
"and",
"the",
"current",
"state",
"of",
"buttons",
"1"... | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/vncdriver/vnc_client.py#L389-L396 | [
"def",
"send_PointerEvent",
"(",
"self",
",",
"x",
",",
"y",
",",
"buttonmask",
"=",
"0",
")",
":",
"self",
".",
"sendMessage",
"(",
"struct",
".",
"pack",
"(",
"'!BBHH'",
",",
"5",
",",
"buttonmask",
",",
"x",
",",
"y",
")",
")"
] | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | VNCClient.send_ClientCutText | The client has new text in its clipboard. | universe/vncdriver/vnc_client.py | def send_ClientCutText(self, message):
"""The client has new text in its clipboard.
"""
self.sendMessage(struct.pack("!BxxxI", 6, len(message)))
self.sendMessage(message) | def send_ClientCutText(self, message):
"""The client has new text in its clipboard.
"""
self.sendMessage(struct.pack("!BxxxI", 6, len(message)))
self.sendMessage(message) | [
"The",
"client",
"has",
"new",
"text",
"in",
"its",
"clipboard",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/vncdriver/vnc_client.py#L398-L402 | [
"def",
"send_ClientCutText",
"(",
"self",
",",
"message",
")",
":",
"self",
".",
"sendMessage",
"(",
"struct",
".",
"pack",
"(",
"\"!BxxxI\"",
",",
"6",
",",
"len",
"(",
"message",
")",
")",
")",
"self",
".",
"sendMessage",
"(",
"message",
")"
] | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | EnvStatus.set_env_info | Atomically set the environment state tracking variables. | universe/rewarder/env_status.py | def set_env_info(self, env_state=None, env_id=None, episode_id=None, bump_past=None, fps=None):
"""Atomically set the environment state tracking variables.
"""
with self.cv:
if env_id is None:
env_id = self._env_id
if env_state is None:
env... | def set_env_info(self, env_state=None, env_id=None, episode_id=None, bump_past=None, fps=None):
"""Atomically set the environment state tracking variables.
"""
with self.cv:
if env_id is None:
env_id = self._env_id
if env_state is None:
env... | [
"Atomically",
"set",
"the",
"environment",
"state",
"tracking",
"variables",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/rewarder/env_status.py#L47-L83 | [
"def",
"set_env_info",
"(",
"self",
",",
"env_state",
"=",
"None",
",",
"env_id",
"=",
"None",
",",
"episode_id",
"=",
"None",
",",
"bump_past",
"=",
"None",
",",
"fps",
"=",
"None",
")",
":",
"with",
"self",
".",
"cv",
":",
"if",
"env_id",
"is",
"... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | Container.from_ps | Construct a container object from the output of GET /containers/json. | universe/remotes/compose/container.py | def from_ps(cls, client, dictionary, **kwargs):
"""
Construct a container object from the output of GET /containers/json.
"""
name = get_container_name(dictionary)
if name is None:
return None
new_dictionary = {
'Id': dictionary['Id'],
... | def from_ps(cls, client, dictionary, **kwargs):
"""
Construct a container object from the output of GET /containers/json.
"""
name = get_container_name(dictionary)
if name is None:
return None
new_dictionary = {
'Id': dictionary['Id'],
... | [
"Construct",
"a",
"container",
"object",
"from",
"the",
"output",
"of",
"GET",
"/",
"containers",
"/",
"json",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/remotes/compose/container.py#L27-L40 | [
"def",
"from_ps",
"(",
"cls",
",",
"client",
",",
"dictionary",
",",
"*",
"*",
"kwargs",
")",
":",
"name",
"=",
"get_container_name",
"(",
"dictionary",
")",
"if",
"name",
"is",
"None",
":",
"return",
"None",
"new_dictionary",
"=",
"{",
"'Id'",
":",
"d... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | Container.attach_log_stream | A log stream can only be attached if the container uses a json-file
log driver. | universe/remotes/compose/container.py | def attach_log_stream(self):
"""A log stream can only be attached if the container uses a json-file
log driver.
"""
if self.has_api_logs:
self.log_stream = self.attach(stdout=True, stderr=True, stream=True) | def attach_log_stream(self):
"""A log stream can only be attached if the container uses a json-file
log driver.
"""
if self.has_api_logs:
self.log_stream = self.attach(stdout=True, stderr=True, stream=True) | [
"A",
"log",
"stream",
"can",
"only",
"be",
"attached",
"if",
"the",
"container",
"uses",
"a",
"json",
"-",
"file",
"log",
"driver",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/remotes/compose/container.py#L170-L175 | [
"def",
"attach_log_stream",
"(",
"self",
")",
":",
"if",
"self",
".",
"has_api_logs",
":",
"self",
".",
"log_stream",
"=",
"self",
".",
"attach",
"(",
"stdout",
"=",
"True",
",",
"stderr",
"=",
"True",
",",
"stream",
"=",
"True",
")"
] | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | Container.get | Return a value from the container or None if the value is not set.
:param key: a string using dotted notation for nested dictionary
lookups | universe/remotes/compose/container.py | def get(self, key):
"""Return a value from the container or None if the value is not set.
:param key: a string using dotted notation for nested dictionary
lookups
"""
self.inspect_if_not_inspected()
def get_value(dictionary, key):
return (diction... | def get(self, key):
"""Return a value from the container or None if the value is not set.
:param key: a string using dotted notation for nested dictionary
lookups
"""
self.inspect_if_not_inspected()
def get_value(dictionary, key):
return (diction... | [
"Return",
"a",
"value",
"from",
"the",
"container",
"or",
"None",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/remotes/compose/container.py#L177-L188 | [
"def",
"get",
"(",
"self",
",",
"key",
")",
":",
"self",
".",
"inspect_if_not_inspected",
"(",
")",
"def",
"get_value",
"(",
"dictionary",
",",
"key",
")",
":",
"return",
"(",
"dictionary",
"or",
"{",
"}",
")",
".",
"get",
"(",
"key",
")",
"return",
... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | Container.rename_to_tmp_name | Rename the container to a hopefully unique temporary container name
by prepending the short id. | universe/remotes/compose/container.py | def rename_to_tmp_name(self):
"""Rename the container to a hopefully unique temporary container name
by prepending the short id.
"""
self.client.rename(
self.id,
'%s_%s' % (self.short_id, self.name)
) | def rename_to_tmp_name(self):
"""Rename the container to a hopefully unique temporary container name
by prepending the short id.
"""
self.client.rename(
self.id,
'%s_%s' % (self.short_id, self.name)
) | [
"Rename",
"the",
"container",
"to",
"a",
"hopefully",
"unique",
"temporary",
"container",
"name",
"by",
"prepending",
"the",
"short",
"id",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/remotes/compose/container.py#L227-L234 | [
"def",
"rename_to_tmp_name",
"(",
"self",
")",
":",
"self",
".",
"client",
".",
"rename",
"(",
"self",
".",
"id",
",",
"'%s_%s'",
"%",
"(",
"self",
".",
"short_id",
",",
"self",
".",
"name",
")",
")"
] | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | KeyEvent.build | Build a key combination, such as:
ctrl-t | universe/spaces/vnc_event.py | def build(cls, keys, down=None):
"""Build a key combination, such as:
ctrl-t
"""
codes = []
for key in keys.split('-'):
key = keycode(key)
codes.append(key)
events = []
if down is None or down:
for code in codes:
... | def build(cls, keys, down=None):
"""Build a key combination, such as:
ctrl-t
"""
codes = []
for key in keys.split('-'):
key = keycode(key)
codes.append(key)
events = []
if down is None or down:
for code in codes:
... | [
"Build",
"a",
"key",
"combination",
"such",
"as",
":"
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/spaces/vnc_event.py#L24-L42 | [
"def",
"build",
"(",
"cls",
",",
"keys",
",",
"down",
"=",
"None",
")",
":",
"codes",
"=",
"[",
"]",
"for",
"key",
"in",
"keys",
".",
"split",
"(",
"'-'",
")",
":",
"key",
"=",
"keycode",
"(",
"key",
")",
"codes",
".",
"append",
"(",
"key",
"... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | Registry.runtime_spec | id is a string describing the runtime, e.g 'flashgames
Returns a configured DockerRuntime object | universe/runtimes/registration.py | def runtime_spec(self, id):
"""
id is a string describing the runtime, e.g 'flashgames
Returns a configured DockerRuntime object
"""
try:
return self.runtimes[id]
except KeyError:
raise UnregisteredRuntime('No registered runtime with name: {}'.for... | def runtime_spec(self, id):
"""
id is a string describing the runtime, e.g 'flashgames
Returns a configured DockerRuntime object
"""
try:
return self.runtimes[id]
except KeyError:
raise UnregisteredRuntime('No registered runtime with name: {}'.for... | [
"id",
"is",
"a",
"string",
"describing",
"the",
"runtime",
"e",
".",
"g",
"flashgames"
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/runtimes/registration.py#L100-L109 | [
"def",
"runtime_spec",
"(",
"self",
",",
"id",
")",
":",
"try",
":",
"return",
"self",
".",
"runtimes",
"[",
"id",
"]",
"except",
"KeyError",
":",
"raise",
"UnregisteredRuntime",
"(",
"'No registered runtime with name: {}'",
".",
"format",
"(",
"id",
")",
")... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | RewarderClient._manual_recv | Used in the tests | universe/rewarder/rewarder_client.py | def _manual_recv(self, method, body, headers={}):
"""Used in the tests"""
headers.setdefault('sent_at', time.time())
return self.recv(self._make_context(), {'method': method, 'body': body, 'headers': headers}) | def _manual_recv(self, method, body, headers={}):
"""Used in the tests"""
headers.setdefault('sent_at', time.time())
return self.recv(self._make_context(), {'method': method, 'body': body, 'headers': headers}) | [
"Used",
"in",
"the",
"tests"
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/rewarder/rewarder_client.py#L100-L103 | [
"def",
"_manual_recv",
"(",
"self",
",",
"method",
",",
"body",
",",
"headers",
"=",
"{",
"}",
")",
":",
"headers",
".",
"setdefault",
"(",
"'sent_at'",
",",
"time",
".",
"time",
"(",
")",
")",
"return",
"self",
".",
"recv",
"(",
"self",
".",
"_mak... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | exit_on_signal | Install a signal handler for HUP, INT, and TERM to call exit, allowing clean shutdown.
When running a universe environment, it's important to shut down the container when the
agent dies so you should either call this or otherwise arrange to exit on signals. | universe/utils/__init__.py | def exit_on_signal():
"""
Install a signal handler for HUP, INT, and TERM to call exit, allowing clean shutdown.
When running a universe environment, it's important to shut down the container when the
agent dies so you should either call this or otherwise arrange to exit on signals.
"""
def shut... | def exit_on_signal():
"""
Install a signal handler for HUP, INT, and TERM to call exit, allowing clean shutdown.
When running a universe environment, it's important to shut down the container when the
agent dies so you should either call this or otherwise arrange to exit on signals.
"""
def shut... | [
"Install",
"a",
"signal",
"handler",
"for",
"HUP",
"INT",
"and",
"TERM",
"to",
"call",
"exit",
"allowing",
"clean",
"shutdown",
".",
"When",
"running",
"a",
"universe",
"environment",
"it",
"s",
"important",
"to",
"shut",
"down",
"the",
"container",
"when",
... | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/utils/__init__.py#L198-L209 | [
"def",
"exit_on_signal",
"(",
")",
":",
"def",
"shutdown",
"(",
"signal",
",",
"frame",
")",
":",
"logger",
".",
"warn",
"(",
"'Received signal %s: exiting'",
",",
"signal",
")",
"sys",
".",
"exit",
"(",
"128",
"+",
"signal",
")",
"signal",
".",
"signal"... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | FBSReader.read_safe | We currently close our fbs files by killing them, so sometimes they end
up with bad data at the end. Close our reader if we expect `size` bytes
and get fewer.
This is a hack and should be removed when we cleanly close our
connections in fbs_writer.
https://github.com/openai/uni... | universe/vncdriver/fbs_reader.py | def read_safe(self, size=None):
"""
We currently close our fbs files by killing them, so sometimes they end
up with bad data at the end. Close our reader if we expect `size` bytes
and get fewer.
This is a hack and should be removed when we cleanly close our
connections i... | def read_safe(self, size=None):
"""
We currently close our fbs files by killing them, so sometimes they end
up with bad data at the end. Close our reader if we expect `size` bytes
and get fewer.
This is a hack and should be removed when we cleanly close our
connections i... | [
"We",
"currently",
"close",
"our",
"fbs",
"files",
"by",
"killing",
"them",
"so",
"sometimes",
"they",
"end",
"up",
"with",
"bad",
"data",
"at",
"the",
"end",
".",
"Close",
"our",
"reader",
"if",
"we",
"expect",
"size",
"bytes",
"and",
"get",
"fewer",
... | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/vncdriver/fbs_reader.py#L27-L43 | [
"def",
"read_safe",
"(",
"self",
",",
"size",
"=",
"None",
")",
":",
"bytes",
"=",
"self",
".",
"file",
".",
"read",
"(",
"size",
")",
"if",
"len",
"(",
"bytes",
")",
"!=",
"size",
":",
"# We unexpectedly got to the end of the file",
"self",
".",
"close"... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | AllocatorManager.pop | Call from main thread. Returns the list of newly-available (handle, env) pairs. | universe/remotes/allocator_remote.py | def pop(self, n=None):
"""Call from main thread. Returns the list of newly-available (handle, env) pairs."""
self.error_buffer.check()
envs = []
if n is None:
while True:
try:
envs += self.ready.get(block=False)
except que... | def pop(self, n=None):
"""Call from main thread. Returns the list of newly-available (handle, env) pairs."""
self.error_buffer.check()
envs = []
if n is None:
while True:
try:
envs += self.ready.get(block=False)
except que... | [
"Call",
"from",
"main",
"thread",
".",
"Returns",
"the",
"list",
"of",
"newly",
"-",
"available",
"(",
"handle",
"env",
")",
"pairs",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/remotes/allocator_remote.py#L136-L164 | [
"def",
"pop",
"(",
"self",
",",
"n",
"=",
"None",
")",
":",
"self",
".",
"error_buffer",
".",
"check",
"(",
")",
"envs",
"=",
"[",
"]",
"if",
"n",
"is",
"None",
":",
"while",
"True",
":",
"try",
":",
"envs",
"+=",
"self",
".",
"ready",
".",
"... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | AllocatorManager.allocate | Call from main thread. Initiate a request for more environments | universe/remotes/allocator_remote.py | def allocate(self, handles, initial=False, params={}):
"""Call from main thread. Initiate a request for more environments"""
assert all(re.search('^\d+$', h) for h in handles), "All handles must be numbers: {}".format(handles)
self.requests.put(('allocate', (handles, initial, params))) | def allocate(self, handles, initial=False, params={}):
"""Call from main thread. Initiate a request for more environments"""
assert all(re.search('^\d+$', h) for h in handles), "All handles must be numbers: {}".format(handles)
self.requests.put(('allocate', (handles, initial, params))) | [
"Call",
"from",
"main",
"thread",
".",
"Initiate",
"a",
"request",
"for",
"more",
"environments"
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/remotes/allocator_remote.py#L166-L169 | [
"def",
"allocate",
"(",
"self",
",",
"handles",
",",
"initial",
"=",
"False",
",",
"params",
"=",
"{",
"}",
")",
":",
"assert",
"all",
"(",
"re",
".",
"search",
"(",
"'^\\d+$'",
",",
"h",
")",
"for",
"h",
"in",
"handles",
")",
",",
"\"All handles m... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | VNCEnv.configure | Universe method to configure the environment.
Args:
ignore_clock_skew (bool): Assume remotes are on the same machine as us,
for the purposes of diagnostics measurement.
If true, we skip measuring the clock skew over the network,
and skip generating diagnostics wh... | universe/envs/vnc_env.py | def configure(self, remotes=None,
client_id=None,
start_timeout=None, docker_image=None,
ignore_clock_skew=False, disable_action_probes=False,
vnc_driver=None, vnc_kwargs=None,
rewarder_driver=None,
replace_on_cr... | def configure(self, remotes=None,
client_id=None,
start_timeout=None, docker_image=None,
ignore_clock_skew=False, disable_action_probes=False,
vnc_driver=None, vnc_kwargs=None,
rewarder_driver=None,
replace_on_cr... | [
"Universe",
"method",
"to",
"configure",
"the",
"environment",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/envs/vnc_env.py#L138-L255 | [
"def",
"configure",
"(",
"self",
",",
"remotes",
"=",
"None",
",",
"client_id",
"=",
"None",
",",
"start_timeout",
"=",
"None",
",",
"docker_image",
"=",
"None",
",",
"ignore_clock_skew",
"=",
"False",
",",
"disable_action_probes",
"=",
"False",
",",
"vnc_dr... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | DiagnosticsLogger.cpu_times | return {pid: {'user': 0.0, 'sys': 0.0}}, chrome_reset | example/system-diagnostics/system_diagnostics_logger.py | def cpu_times(self):
''' return {pid: {'user': 0.0, 'sys': 0.0}}, chrome_reset '''
chrome_procs = self.get_chrome_procs()
new_pids = {p.pid for p in chrome_procs}
old_pids = {pid for pid in self.last_cpu_times}
try:
cpu_times = {p.pid: p.cpu_times() for p in chrome_pr... | def cpu_times(self):
''' return {pid: {'user': 0.0, 'sys': 0.0}}, chrome_reset '''
chrome_procs = self.get_chrome_procs()
new_pids = {p.pid for p in chrome_procs}
old_pids = {pid for pid in self.last_cpu_times}
try:
cpu_times = {p.pid: p.cpu_times() for p in chrome_pr... | [
"return",
"{",
"pid",
":",
"{",
"user",
":",
"0",
".",
"0",
"sys",
":",
"0",
".",
"0",
"}}",
"chrome_reset"
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/example/system-diagnostics/system_diagnostics_logger.py#L32-L53 | [
"def",
"cpu_times",
"(",
"self",
")",
":",
"chrome_procs",
"=",
"self",
".",
"get_chrome_procs",
"(",
")",
"new_pids",
"=",
"{",
"p",
".",
"pid",
"for",
"p",
"in",
"chrome_procs",
"}",
"old_pids",
"=",
"{",
"pid",
"for",
"pid",
"in",
"self",
".",
"la... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | merge_infos | We often need to aggregate together multiple infos. Most keys can
just be clobbered by the new info, but e.g. any keys which contain
counts should be added. The merge schema is indicated by the key
namespace.
Namespaces:
- stats.timers: Timing
- stats.gauges: Gauge values
- stats.*: Counts... | universe/rewarder/merge.py | def merge_infos(info1, info2):
"""We often need to aggregate together multiple infos. Most keys can
just be clobbered by the new info, but e.g. any keys which contain
counts should be added. The merge schema is indicated by the key
namespace.
Namespaces:
- stats.timers: Timing
- stats.gaug... | def merge_infos(info1, info2):
"""We often need to aggregate together multiple infos. Most keys can
just be clobbered by the new info, but e.g. any keys which contain
counts should be added. The merge schema is indicated by the key
namespace.
Namespaces:
- stats.timers: Timing
- stats.gaug... | [
"We",
"often",
"need",
"to",
"aggregate",
"together",
"multiple",
"infos",
".",
"Most",
"keys",
"can",
"just",
"be",
"clobbered",
"by",
"the",
"new",
"info",
"but",
"e",
".",
"g",
".",
"any",
"keys",
"which",
"contain",
"counts",
"should",
"be",
"added",... | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/rewarder/merge.py#L4-L28 | [
"def",
"merge_infos",
"(",
"info1",
",",
"info2",
")",
":",
"for",
"key",
",",
"value",
"in",
"six",
".",
"iteritems",
"(",
"info2",
")",
":",
"if",
"key",
"in",
"info1",
"and",
"key",
".",
"startswith",
"(",
"'stats'",
")",
":",
"if",
"key",
".",
... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | _merge_observation | Old visual observation is discarded, because it is outdated frame.
Text observations are merged, because they are messages sent from the rewarder. | universe/rewarder/merge.py | def _merge_observation(accum_observation, observation):
"""
Old visual observation is discarded, because it is outdated frame.
Text observations are merged, because they are messages sent from the rewarder.
"""
if observation is None:
# We're currently masking. So accum_observation probably
... | def _merge_observation(accum_observation, observation):
"""
Old visual observation is discarded, because it is outdated frame.
Text observations are merged, because they are messages sent from the rewarder.
"""
if observation is None:
# We're currently masking. So accum_observation probably
... | [
"Old",
"visual",
"observation",
"is",
"discarded",
"because",
"it",
"is",
"outdated",
"frame",
".",
"Text",
"observations",
"are",
"merged",
"because",
"they",
"are",
"messages",
"sent",
"from",
"the",
"rewarder",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/rewarder/merge.py#L42-L58 | [
"def",
"_merge_observation",
"(",
"accum_observation",
",",
"observation",
")",
":",
"if",
"observation",
"is",
"None",
":",
"# We're currently masking. So accum_observation probably",
"# belongs to the previous episode. We may lose a \"text\"",
"# observation from the previous episode... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | RewardProxyServer.begin_recording | Open the file and write the metadata header to describe this recording. Called after we establish an end-to-end connection
This uses Version 1 of our protocol
Version 0 can be seen here: https://github.com/openai/universe/blob/f85a7779c3847fa86ec7bb513a1da0d3158dda78/bin/recording_agent.py | universe/rewarder/reward_proxy_server.py | def begin_recording(self):
"""
Open the file and write the metadata header to describe this recording. Called after we establish an end-to-end connection
This uses Version 1 of our protocol
Version 0 can be seen here: https://github.com/openai/universe/blob/f85a7779c3847fa86ec7bb513a1da... | def begin_recording(self):
"""
Open the file and write the metadata header to describe this recording. Called after we establish an end-to-end connection
This uses Version 1 of our protocol
Version 0 can be seen here: https://github.com/openai/universe/blob/f85a7779c3847fa86ec7bb513a1da... | [
"Open",
"the",
"file",
"and",
"write",
"the",
"metadata",
"header",
"to",
"describe",
"this",
"recording",
".",
"Called",
"after",
"we",
"establish",
"an",
"end",
"-",
"to",
"-",
"end",
"connection",
"This",
"uses",
"Version",
"1",
"of",
"our",
"protocol"
... | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/rewarder/reward_proxy_server.py#L83-L117 | [
"def",
"begin_recording",
"(",
"self",
")",
":",
"logger",
".",
"info",
"(",
"\"[RewardProxyServer] [%d] Starting recording\"",
",",
"self",
".",
"id",
")",
"if",
"self",
".",
"_closed",
":",
"logger",
".",
"error",
"(",
"\"[RewardProxyServer] [%d] Attempted to star... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | RewardProxyServer.record_message | Record a message to our rewards.demo file if it is has been opened | universe/rewarder/reward_proxy_server.py | def record_message(self, msg, from_rewarder):
"""Record a message to our rewards.demo file if it is has been opened"""
if self.file:
# Include an authoritative timestamp (because the `sent_at` from the server is likely to be different
timestamped_message = {
'time... | def record_message(self, msg, from_rewarder):
"""Record a message to our rewards.demo file if it is has been opened"""
if self.file:
# Include an authoritative timestamp (because the `sent_at` from the server is likely to be different
timestamped_message = {
'time... | [
"Record",
"a",
"message",
"to",
"our",
"rewards",
".",
"demo",
"file",
"if",
"it",
"is",
"has",
"been",
"opened"
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/rewarder/reward_proxy_server.py#L192-L203 | [
"def",
"record_message",
"(",
"self",
",",
"msg",
",",
"from_rewarder",
")",
":",
"if",
"self",
".",
"file",
":",
"# Include an authoritative timestamp (because the `sent_at` from the server is likely to be different",
"timestamped_message",
"=",
"{",
"'timestamp'",
":",
"t... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | display_timestamps_pair_compact | Takes a list of the following form: [(a1, b1), (a2, b2), ...] and
returns a string a_mean-b_mean, flooring out at 0. | universe/utils/display.py | def display_timestamps_pair_compact(time_m_2):
"""Takes a list of the following form: [(a1, b1), (a2, b2), ...] and
returns a string a_mean-b_mean, flooring out at 0.
"""
if len(time_m_2) == 0:
return '(empty)'
time_m_2 = np.array(time_m_2)
low = time_m_2[:, 0].mean()
high = time_m... | def display_timestamps_pair_compact(time_m_2):
"""Takes a list of the following form: [(a1, b1), (a2, b2), ...] and
returns a string a_mean-b_mean, flooring out at 0.
"""
if len(time_m_2) == 0:
return '(empty)'
time_m_2 = np.array(time_m_2)
low = time_m_2[:, 0].mean()
high = time_m... | [
"Takes",
"a",
"list",
"of",
"the",
"following",
"form",
":",
"[",
"(",
"a1",
"b1",
")",
"(",
"a2",
"b2",
")",
"...",
"]",
"and",
"returns",
"a",
"string",
"a_mean",
"-",
"b_mean",
"flooring",
"out",
"at",
"0",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/utils/display.py#L41-L59 | [
"def",
"display_timestamps_pair_compact",
"(",
"time_m_2",
")",
":",
"if",
"len",
"(",
"time_m_2",
")",
"==",
"0",
":",
"return",
"'(empty)'",
"time_m_2",
"=",
"np",
".",
"array",
"(",
"time_m_2",
")",
"low",
"=",
"time_m_2",
"[",
":",
",",
"0",
"]",
"... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | display_timestamps_pair | Takes a list of the following form: [(a1, b1), (a2, b2), ...] and
returns a string (a_mean+/-a_error, b_mean+/-b_error). | universe/utils/display.py | def display_timestamps_pair(time_m_2):
"""Takes a list of the following form: [(a1, b1), (a2, b2), ...] and
returns a string (a_mean+/-a_error, b_mean+/-b_error).
"""
if len(time_m_2) == 0:
return '(empty)'
time_m_2 = np.array(time_m_2)
return '({}, {})'.format(
display_timestam... | def display_timestamps_pair(time_m_2):
"""Takes a list of the following form: [(a1, b1), (a2, b2), ...] and
returns a string (a_mean+/-a_error, b_mean+/-b_error).
"""
if len(time_m_2) == 0:
return '(empty)'
time_m_2 = np.array(time_m_2)
return '({}, {})'.format(
display_timestam... | [
"Takes",
"a",
"list",
"of",
"the",
"following",
"form",
":",
"[",
"(",
"a1",
"b1",
")",
"(",
"a2",
"b2",
")",
"...",
"]",
"and",
"returns",
"a",
"string",
"(",
"a_mean",
"+",
"/",
"-",
"a_error",
"b_mean",
"+",
"/",
"-",
"b_error",
")",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/utils/display.py#L61-L72 | [
"def",
"display_timestamps_pair",
"(",
"time_m_2",
")",
":",
"if",
"len",
"(",
"time_m_2",
")",
"==",
"0",
":",
"return",
"'(empty)'",
"time_m_2",
"=",
"np",
".",
"array",
"(",
"time_m_2",
")",
"return",
"'({}, {})'",
".",
"format",
"(",
"display_timestamps"... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | modifiers_string | Return a string describing a set of modifiers.
Example::
>>> modifiers_string(MOD_SHIFT | MOD_CTRL)
'MOD_SHIFT|MOD_CTRL'
:Parameters:
`modifiers` : int
Bitwise combination of modifier constants.
:rtype: str | universe/envs/vnc_core_env/key.py | def modifiers_string(modifiers):
'''Return a string describing a set of modifiers.
Example::
>>> modifiers_string(MOD_SHIFT | MOD_CTRL)
'MOD_SHIFT|MOD_CTRL'
:Parameters:
`modifiers` : int
Bitwise combination of modifier constants.
:rtype: str
'''
mod_names... | def modifiers_string(modifiers):
'''Return a string describing a set of modifiers.
Example::
>>> modifiers_string(MOD_SHIFT | MOD_CTRL)
'MOD_SHIFT|MOD_CTRL'
:Parameters:
`modifiers` : int
Bitwise combination of modifier constants.
:rtype: str
'''
mod_names... | [
"Return",
"a",
"string",
"describing",
"a",
"set",
"of",
"modifiers",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/envs/vnc_core_env/key.py#L93-L126 | [
"def",
"modifiers_string",
"(",
"modifiers",
")",
":",
"mod_names",
"=",
"[",
"]",
"if",
"modifiers",
"&",
"MOD_SHIFT",
":",
"mod_names",
".",
"append",
"(",
"'MOD_SHIFT'",
")",
"if",
"modifiers",
"&",
"MOD_CTRL",
":",
"mod_names",
".",
"append",
"(",
"'MO... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | Diagnostics.add_metadata | Mutates the info_n dictionary. | universe/envs/diagnostics.py | def add_metadata(self, observation_n, info_n, available_at=None):
"""Mutates the info_n dictionary."""
if self.instance_n is None:
return
with pyprofile.push('vnc_env.diagnostics.Diagnostics.add_metadata'):
async = self.pool.imap_unordered(
self._add_meta... | def add_metadata(self, observation_n, info_n, available_at=None):
"""Mutates the info_n dictionary."""
if self.instance_n is None:
return
with pyprofile.push('vnc_env.diagnostics.Diagnostics.add_metadata'):
async = self.pool.imap_unordered(
self._add_meta... | [
"Mutates",
"the",
"info_n",
"dictionary",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/envs/diagnostics.py#L254-L263 | [
"def",
"add_metadata",
"(",
"self",
",",
"observation_n",
",",
"info_n",
",",
"available_at",
"=",
"None",
")",
":",
"if",
"self",
".",
"instance_n",
"is",
"None",
":",
"return",
"with",
"pyprofile",
".",
"push",
"(",
"'vnc_env.diagnostics.Diagnostics.add_metada... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | DiagnosticsInstance.add_metadata | Extract metadata from a pixel observation and add it to the info | universe/envs/diagnostics.py | def add_metadata(self, observation, info, available_at=None):
"""Extract metadata from a pixel observation and add it to the info
"""
observation = observation['vision']
if observation is None: return
if self.network is not None and not self.network.active():
return
... | def add_metadata(self, observation, info, available_at=None):
"""Extract metadata from a pixel observation and add it to the info
"""
observation = observation['vision']
if observation is None: return
if self.network is not None and not self.network.active():
return
... | [
"Extract",
"metadata",
"from",
"a",
"pixel",
"observation",
"and",
"add",
"it",
"to",
"the",
"info"
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/envs/diagnostics.py#L343-L450 | [
"def",
"add_metadata",
"(",
"self",
",",
"observation",
",",
"info",
",",
"available_at",
"=",
"None",
")",
":",
"observation",
"=",
"observation",
"[",
"'vision'",
"]",
"if",
"observation",
"is",
"None",
":",
"return",
"if",
"self",
".",
"network",
"is",
... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | Profile._print_if_needed | Assumes you hold the lock | universe/pyprofile/__init__.py | def _print_if_needed(self):
"""Assumes you hold the lock"""
if self._in_txn or self.print_frequency is None:
return
elif self.last_export is not None and \
self.last_export + self.print_frequency > time.time():
return
self.export() | def _print_if_needed(self):
"""Assumes you hold the lock"""
if self._in_txn or self.print_frequency is None:
return
elif self.last_export is not None and \
self.last_export + self.print_frequency > time.time():
return
self.export() | [
"Assumes",
"you",
"hold",
"the",
"lock"
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/pyprofile/__init__.py#L271-L279 | [
"def",
"_print_if_needed",
"(",
"self",
")",
":",
"if",
"self",
".",
"_in_txn",
"or",
"self",
".",
"print_frequency",
"is",
"None",
":",
"return",
"elif",
"self",
".",
"last_export",
"is",
"not",
"None",
"and",
"self",
".",
"last_export",
"+",
"self",
".... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
train | split_buffer | Given a generator which yields strings and a splitter function,
joins all input, splits on the separator and yields each chunk.
Unlike string.split(), each chunk includes the trailing
separator, except for the last one if none was found on the end
of the input. | universe/remotes/compose/utils.py | def split_buffer(stream, splitter=None, decoder=lambda a: a):
"""Given a generator which yields strings and a splitter function,
joins all input, splits on the separator and yields each chunk.
Unlike string.split(), each chunk includes the trailing
separator, except for the last one if none was found o... | def split_buffer(stream, splitter=None, decoder=lambda a: a):
"""Given a generator which yields strings and a splitter function,
joins all input, splits on the separator and yields each chunk.
Unlike string.split(), each chunk includes the trailing
separator, except for the last one if none was found o... | [
"Given",
"a",
"generator",
"which",
"yields",
"strings",
"and",
"a",
"splitter",
"function",
"joins",
"all",
"input",
"splits",
"on",
"the",
"separator",
"and",
"yields",
"each",
"chunk",
"."
] | openai/universe | python | https://github.com/openai/universe/blob/cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c/universe/remotes/compose/utils.py#L41-L63 | [
"def",
"split_buffer",
"(",
"stream",
",",
"splitter",
"=",
"None",
",",
"decoder",
"=",
"lambda",
"a",
":",
"a",
")",
":",
"splitter",
"=",
"splitter",
"or",
"line_splitter",
"buffered",
"=",
"six",
".",
"text_type",
"(",
"''",
")",
"for",
"data",
"in... | cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.