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
Hook.edit
Edit this hook. :param dict config: (optional), key-value pairs of settings for this hook :param list events: (optional), which events should this be triggered for :param list add_events: (optional), events to be added to the list of events that this hook trig...
aegea/packages/github3/repos/hook.py
def edit(self, config={}, events=[], add_events=[], rm_events=[], active=True): """Edit this hook. :param dict config: (optional), key-value pairs of settings for this hook :param list events: (optional), which events should this be triggered for :pa...
def edit(self, config={}, events=[], add_events=[], rm_events=[], active=True): """Edit this hook. :param dict config: (optional), key-value pairs of settings for this hook :param list events: (optional), which events should this be triggered for :pa...
[ "Edit", "this", "hook", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/hook.py#L65-L96
[ "def", "edit", "(", "self", ",", "config", "=", "{", "}", ",", "events", "=", "[", "]", ",", "add_events", "=", "[", "]", ",", "rm_events", "=", "[", "]", ",", "active", "=", "True", ")", ":", "data", "=", "{", "'config'", ":", "config", ",", ...
94957e9dba036eae3052e2662c208b259c08399a
train
Hook.ping
Ping this hook. :returns: bool
aegea/packages/github3/repos/hook.py
def ping(self): """Ping this hook. :returns: bool """ url = self._build_url('pings', base_url=self._api) return self._boolean(self._post(url), 204, 404)
def ping(self): """Ping this hook. :returns: bool """ url = self._build_url('pings', base_url=self._api) return self._boolean(self._post(url), 204, 404)
[ "Ping", "this", "hook", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/hook.py#L99-L105
[ "def", "ping", "(", "self", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'pings'", ",", "base_url", "=", "self", ".", "_api", ")", "return", "self", ".", "_boolean", "(", "self", ".", "_post", "(", "url", ")", ",", "204", ",", "404", ")...
94957e9dba036eae3052e2662c208b259c08399a
train
requires_auth
Decorator to note which object methods require authorization.
aegea/packages/github3/decorators.py
def requires_auth(func): """Decorator to note which object methods require authorization.""" @wraps(func) def auth_wrapper(self, *args, **kwargs): auth = False if hasattr(self, '_session'): auth = (self._session.auth or self._session.headers.get('Authorization...
def requires_auth(func): """Decorator to note which object methods require authorization.""" @wraps(func) def auth_wrapper(self, *args, **kwargs): auth = False if hasattr(self, '_session'): auth = (self._session.auth or self._session.headers.get('Authorization...
[ "Decorator", "to", "note", "which", "object", "methods", "require", "authorization", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/decorators.py#L28-L46
[ "def", "requires_auth", "(", "func", ")", ":", "@", "wraps", "(", "func", ")", "def", "auth_wrapper", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "auth", "=", "False", "if", "hasattr", "(", "self", ",", "'_session'", ")", ":",...
94957e9dba036eae3052e2662c208b259c08399a
train
requires_basic_auth
Specific (basic) authentication decorator. This is used to note which object methods require username/password authorization and won't work with token based authorization.
aegea/packages/github3/decorators.py
def requires_basic_auth(func): """Specific (basic) authentication decorator. This is used to note which object methods require username/password authorization and won't work with token based authorization. """ @wraps(func) def auth_wrapper(self, *args, **kwargs): if hasattr(self, '_ses...
def requires_basic_auth(func): """Specific (basic) authentication decorator. This is used to note which object methods require username/password authorization and won't work with token based authorization. """ @wraps(func) def auth_wrapper(self, *args, **kwargs): if hasattr(self, '_ses...
[ "Specific", "(", "basic", ")", "authentication", "decorator", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/decorators.py#L49-L67
[ "def", "requires_basic_auth", "(", "func", ")", ":", "@", "wraps", "(", "func", ")", "def", "auth_wrapper", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "hasattr", "(", "self", ",", "'_session'", ")", "and", "self", ".", ...
94957e9dba036eae3052e2662c208b259c08399a
train
requires_app_credentials
Require client_id and client_secret to be associated. This is used to note and enforce which methods require a client_id and client_secret to be used.
aegea/packages/github3/decorators.py
def requires_app_credentials(func): """Require client_id and client_secret to be associated. This is used to note and enforce which methods require a client_id and client_secret to be used. """ @wraps(func) def auth_wrapper(self, *args, **kwargs): client_id, client_secret = self._sessi...
def requires_app_credentials(func): """Require client_id and client_secret to be associated. This is used to note and enforce which methods require a client_id and client_secret to be used. """ @wraps(func) def auth_wrapper(self, *args, **kwargs): client_id, client_secret = self._sessi...
[ "Require", "client_id", "and", "client_secret", "to", "be", "associated", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/decorators.py#L70-L90
[ "def", "requires_app_credentials", "(", "func", ")", ":", "@", "wraps", "(", "func", ")", "def", "auth_wrapper", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "client_id", ",", "client_secret", "=", "self", ".", "_session", ".", "re...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_1_1
1.1 Avoid the use of the "root" account (Scored)
aegea/audit.py
def audit_1_1(self): """1.1 Avoid the use of the "root" account (Scored)""" for row in self.credential_report: if row["user"] == "<root_account>": for field in "password_last_used", "access_key_1_last_used_date", "access_key_2_last_used_date": if row[field...
def audit_1_1(self): """1.1 Avoid the use of the "root" account (Scored)""" for row in self.credential_report: if row["user"] == "<root_account>": for field in "password_last_used", "access_key_1_last_used_date", "access_key_2_last_used_date": if row[field...
[ "1", ".", "1", "Avoid", "the", "use", "of", "the", "root", "account", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L54-L60
[ "def", "audit_1_1", "(", "self", ")", ":", "for", "row", "in", "self", ".", "credential_report", ":", "if", "row", "[", "\"user\"", "]", "==", "\"<root_account>\"", ":", "for", "field", "in", "\"password_last_used\"", ",", "\"access_key_1_last_used_date\"", ",",...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_1_2
1.2 Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password (Scored)
aegea/audit.py
def audit_1_2(self): """1.2 Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password (Scored)""" # noqa for row in self.credential_report: if row["user"] == "<root_account>" or json.loads(row["password_enabled"]): if not json.loads(r...
def audit_1_2(self): """1.2 Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password (Scored)""" # noqa for row in self.credential_report: if row["user"] == "<root_account>" or json.loads(row["password_enabled"]): if not json.loads(r...
[ "1", ".", "2", "Ensure", "multi", "-", "factor", "authentication", "(", "MFA", ")", "is", "enabled", "for", "all", "IAM", "users", "that", "have", "a", "console", "password", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L62-L67
[ "def", "audit_1_2", "(", "self", ")", ":", "# noqa", "for", "row", "in", "self", ".", "credential_report", ":", "if", "row", "[", "\"user\"", "]", "==", "\"<root_account>\"", "or", "json", ".", "loads", "(", "row", "[", "\"password_enabled\"", "]", ")", ...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_1_3
1.3 Ensure credentials unused for 90 days or greater are disabled (Scored)
aegea/audit.py
def audit_1_3(self): """1.3 Ensure credentials unused for 90 days or greater are disabled (Scored)""" for row in self.credential_report: for access_key in "1", "2": if json.loads(row["access_key_{}_active".format(access_key)]): last_used = row["access_key_...
def audit_1_3(self): """1.3 Ensure credentials unused for 90 days or greater are disabled (Scored)""" for row in self.credential_report: for access_key in "1", "2": if json.loads(row["access_key_{}_active".format(access_key)]): last_used = row["access_key_...
[ "1", ".", "3", "Ensure", "credentials", "unused", "for", "90", "days", "or", "greater", "are", "disabled", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L69-L77
[ "def", "audit_1_3", "(", "self", ")", ":", "for", "row", "in", "self", ".", "credential_report", ":", "for", "access_key", "in", "\"1\"", ",", "\"2\"", ":", "if", "json", ".", "loads", "(", "row", "[", "\"access_key_{}_active\"", ".", "format", "(", "acc...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_1_4
1.4 Ensure access keys are rotated every 90 days or less (Scored)
aegea/audit.py
def audit_1_4(self): """1.4 Ensure access keys are rotated every 90 days or less (Scored)""" for row in self.credential_report: for access_key in "1", "2": if json.loads(row["access_key_{}_active".format(access_key)]): last_rotated = row["access_key_{}_las...
def audit_1_4(self): """1.4 Ensure access keys are rotated every 90 days or less (Scored)""" for row in self.credential_report: for access_key in "1", "2": if json.loads(row["access_key_{}_active".format(access_key)]): last_rotated = row["access_key_{}_las...
[ "1", ".", "4", "Ensure", "access", "keys", "are", "rotated", "every", "90", "days", "or", "less", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L79-L87
[ "def", "audit_1_4", "(", "self", ")", ":", "for", "row", "in", "self", ".", "credential_report", ":", "for", "access_key", "in", "\"1\"", ",", "\"2\"", ":", "if", "json", ".", "loads", "(", "row", "[", "\"access_key_{}_active\"", ".", "format", "(", "acc...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_1_12
1.12 Ensure no root account access key exists (Scored)
aegea/audit.py
def audit_1_12(self): """1.12 Ensure no root account access key exists (Scored)""" for row in self.credential_report: if row["user"] == "<root_account>": self.assertFalse(json.loads(row["access_key_1_active"])) self.assertFalse(json.loads(row["access_key_2_act...
def audit_1_12(self): """1.12 Ensure no root account access key exists (Scored)""" for row in self.credential_report: if row["user"] == "<root_account>": self.assertFalse(json.loads(row["access_key_1_active"])) self.assertFalse(json.loads(row["access_key_2_act...
[ "1", ".", "12", "Ensure", "no", "root", "account", "access", "key", "exists", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L117-L122
[ "def", "audit_1_12", "(", "self", ")", ":", "for", "row", "in", "self", ".", "credential_report", ":", "if", "row", "[", "\"user\"", "]", "==", "\"<root_account>\"", ":", "self", ".", "assertFalse", "(", "json", ".", "loads", "(", "row", "[", "\"access_k...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_1_13
1.13 Ensure hardware MFA is enabled for the "root" account (Scored)
aegea/audit.py
def audit_1_13(self): """1.13 Ensure hardware MFA is enabled for the "root" account (Scored)""" for row in self.credential_report: if row["user"] == "<root_account>": self.assertTrue(json.loads(row["mfa_active"]))
def audit_1_13(self): """1.13 Ensure hardware MFA is enabled for the "root" account (Scored)""" for row in self.credential_report: if row["user"] == "<root_account>": self.assertTrue(json.loads(row["mfa_active"]))
[ "1", ".", "13", "Ensure", "hardware", "MFA", "is", "enabled", "for", "the", "root", "account", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L124-L128
[ "def", "audit_1_13", "(", "self", ")", ":", "for", "row", "in", "self", ".", "credential_report", ":", "if", "row", "[", "\"user\"", "]", "==", "\"<root_account>\"", ":", "self", ".", "assertTrue", "(", "json", ".", "loads", "(", "row", "[", "\"mfa_activ...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_1_15
1.15 Ensure IAM policies are attached only to groups or roles (Scored)
aegea/audit.py
def audit_1_15(self): """1.15 Ensure IAM policies are attached only to groups or roles (Scored)""" for policy in resources.iam.policies.all(): self.assertEqual(len(list(policy.attached_users.all())), 0, "{} has users attached to it".format(policy))
def audit_1_15(self): """1.15 Ensure IAM policies are attached only to groups or roles (Scored)""" for policy in resources.iam.policies.all(): self.assertEqual(len(list(policy.attached_users.all())), 0, "{} has users attached to it".format(policy))
[ "1", ".", "15", "Ensure", "IAM", "policies", "are", "attached", "only", "to", "groups", "or", "roles", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L133-L136
[ "def", "audit_1_15", "(", "self", ")", ":", "for", "policy", "in", "resources", ".", "iam", ".", "policies", ".", "all", "(", ")", ":", "self", ".", "assertEqual", "(", "len", "(", "list", "(", "policy", ".", "attached_users", ".", "all", "(", ")", ...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_2_2
2.2 Ensure CloudTrail log file validation is enabled (Scored)
aegea/audit.py
def audit_2_2(self): """2.2 Ensure CloudTrail log file validation is enabled (Scored)""" self.assertGreater(len(self.trails), 0, "No CloudTrail trails configured") self.assertTrue(all(trail["LogFileValidationEnabled"] for trail in self.trails), "Some CloudTrail trails don...
def audit_2_2(self): """2.2 Ensure CloudTrail log file validation is enabled (Scored)""" self.assertGreater(len(self.trails), 0, "No CloudTrail trails configured") self.assertTrue(all(trail["LogFileValidationEnabled"] for trail in self.trails), "Some CloudTrail trails don...
[ "2", ".", "2", "Ensure", "CloudTrail", "log", "file", "validation", "is", "enabled", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L142-L146
[ "def", "audit_2_2", "(", "self", ")", ":", "self", ".", "assertGreater", "(", "len", "(", "self", ".", "trails", ")", ",", "0", ",", "\"No CloudTrail trails configured\"", ")", "self", ".", "assertTrue", "(", "all", "(", "trail", "[", "\"LogFileValidationEna...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_2_3
2.3 Ensure the S3 bucket CloudTrail logs to is not publicly accessible (Scored)
aegea/audit.py
def audit_2_3(self): """2.3 Ensure the S3 bucket CloudTrail logs to is not publicly accessible (Scored)""" raise NotImplementedError() import boto3 s3 = boto3.session.Session(region_name="us-east-1").resource("s3") # s3 = boto3.resource("s3") # for trail in self.trails: ...
def audit_2_3(self): """2.3 Ensure the S3 bucket CloudTrail logs to is not publicly accessible (Scored)""" raise NotImplementedError() import boto3 s3 = boto3.session.Session(region_name="us-east-1").resource("s3") # s3 = boto3.resource("s3") # for trail in self.trails: ...
[ "2", ".", "3", "Ensure", "the", "S3", "bucket", "CloudTrail", "logs", "to", "is", "not", "publicly", "accessible", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L148-L167
[ "def", "audit_2_3", "(", "self", ")", ":", "raise", "NotImplementedError", "(", ")", "import", "boto3", "s3", "=", "boto3", ".", "session", ".", "Session", "(", "region_name", "=", "\"us-east-1\"", ")", ".", "resource", "(", "\"s3\"", ")", "# s3 = boto3.reso...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_2_4
2.4 Ensure CloudTrail trails are integrated with CloudWatch Logs (Scored)
aegea/audit.py
def audit_2_4(self): """2.4 Ensure CloudTrail trails are integrated with CloudWatch Logs (Scored)""" for trail in self.trails: self.assertIn("CloudWatchLogsLogGroupArn", trail) trail_status = clients.cloudtrail.get_trail_status(Name=trail["TrailARN"]) self.assertGreat...
def audit_2_4(self): """2.4 Ensure CloudTrail trails are integrated with CloudWatch Logs (Scored)""" for trail in self.trails: self.assertIn("CloudWatchLogsLogGroupArn", trail) trail_status = clients.cloudtrail.get_trail_status(Name=trail["TrailARN"]) self.assertGreat...
[ "2", ".", "4", "Ensure", "CloudTrail", "trails", "are", "integrated", "with", "CloudWatch", "Logs", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L169-L175
[ "def", "audit_2_4", "(", "self", ")", ":", "for", "trail", "in", "self", ".", "trails", ":", "self", ".", "assertIn", "(", "\"CloudWatchLogsLogGroupArn\"", ",", "trail", ")", "trail_status", "=", "clients", ".", "cloudtrail", ".", "get_trail_status", "(", "N...
94957e9dba036eae3052e2662c208b259c08399a
train
Auditor.audit_2_5
2.5 Ensure AWS Config is enabled in all regions (Scored)
aegea/audit.py
def audit_2_5(self): """2.5 Ensure AWS Config is enabled in all regions (Scored)""" import boto3 for region in boto3.Session().get_available_regions("config"): aws_config = boto3.session.Session(region_name=region).client("config") res = aws_config.describe_configuration_...
def audit_2_5(self): """2.5 Ensure AWS Config is enabled in all regions (Scored)""" import boto3 for region in boto3.Session().get_available_regions("config"): aws_config = boto3.session.Session(region_name=region).client("config") res = aws_config.describe_configuration_...
[ "2", ".", "5", "Ensure", "AWS", "Config", "is", "enabled", "in", "all", "regions", "(", "Scored", ")" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/audit.py#L177-L183
[ "def", "audit_2_5", "(", "self", ")", ":", "import", "boto3", "for", "region", "in", "boto3", ".", "Session", "(", ")", ".", "get_available_regions", "(", "\"config\"", ")", ":", "aws_config", "=", "boto3", ".", "session", ".", "Session", "(", "region_name...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.authorization
Get information about authorization ``id``. :param int id_num: (required), unique id of the authorization :returns: :class:`Authorization <Authorization>`
aegea/packages/github3/github.py
def authorization(self, id_num): """Get information about authorization ``id``. :param int id_num: (required), unique id of the authorization :returns: :class:`Authorization <Authorization>` """ json = None if int(id_num) > 0: url = self._build_url('authoriza...
def authorization(self, id_num): """Get information about authorization ``id``. :param int id_num: (required), unique id of the authorization :returns: :class:`Authorization <Authorization>` """ json = None if int(id_num) > 0: url = self._build_url('authoriza...
[ "Get", "information", "about", "authorization", "id", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L76-L86
[ "def", "authorization", "(", "self", ",", "id_num", ")", ":", "json", "=", "None", "if", "int", "(", "id_num", ")", ">", "0", ":", "url", "=", "self", ".", "_build_url", "(", "'authorizations'", ",", "str", "(", "id_num", ")", ")", "json", "=", "se...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.authorize
Obtain an authorization token from the GitHub API for the GitHub API. :param str login: (required) :param str password: (required) :param list scopes: (optional), areas you want this token to apply to, i.e., 'gist', 'user' :param str note: (optional), note about the ...
aegea/packages/github3/github.py
def authorize(self, login, password, scopes=None, note='', note_url='', client_id='', client_secret=''): """Obtain an authorization token from the GitHub API for the GitHub API. :param str login: (required) :param str password: (required) :param list scopes: (o...
def authorize(self, login, password, scopes=None, note='', note_url='', client_id='', client_secret=''): """Obtain an authorization token from the GitHub API for the GitHub API. :param str login: (required) :param str password: (required) :param list scopes: (o...
[ "Obtain", "an", "authorization", "token", "from", "the", "GitHub", "API", "for", "the", "GitHub", "API", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L88-L123
[ "def", "authorize", "(", "self", ",", "login", ",", "password", ",", "scopes", "=", "None", ",", "note", "=", "''", ",", "note_url", "=", "''", ",", "client_id", "=", "''", ",", "client_secret", "=", "''", ")", ":", "json", "=", "None", "# TODO: Brea...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.check_authorization
OAuth applications can use this method to check token validity without hitting normal rate limits because of failed login attempts. If the token is valid, it will return True, otherwise it will return False. :returns: bool
aegea/packages/github3/github.py
def check_authorization(self, access_token): """OAuth applications can use this method to check token validity without hitting normal rate limits because of failed login attempts. If the token is valid, it will return True, otherwise it will return False. :returns: bool ...
def check_authorization(self, access_token): """OAuth applications can use this method to check token validity without hitting normal rate limits because of failed login attempts. If the token is valid, it will return True, otherwise it will return False. :returns: bool ...
[ "OAuth", "applications", "can", "use", "this", "method", "to", "check", "token", "validity", "without", "hitting", "normal", "rate", "limits", "because", "of", "failed", "login", "attempts", ".", "If", "the", "token", "is", "valid", "it", "will", "return", "...
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L125-L142
[ "def", "check_authorization", "(", "self", ",", "access_token", ")", ":", "p", "=", "self", ".", "_session", ".", "params", "auth", "=", "(", "p", ".", "get", "(", "'client_id'", ")", ",", "p", ".", "get", "(", "'client_secret'", ")", ")", "if", "acc...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.create_gist
Create a new gist. If no login was provided, it will be anonymous. :param str description: (required), description of gist :param dict files: (required), file names with associated dictionaries for content, e.g. ``{'spam.txt': {'content': 'File contents ...'}}`` ...
aegea/packages/github3/github.py
def create_gist(self, description, files, public=True): """Create a new gist. If no login was provided, it will be anonymous. :param str description: (required), description of gist :param dict files: (required), file names with associated dictionaries for content, e.g. ``{...
def create_gist(self, description, files, public=True): """Create a new gist. If no login was provided, it will be anonymous. :param str description: (required), description of gist :param dict files: (required), file names with associated dictionaries for content, e.g. ``{...
[ "Create", "a", "new", "gist", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L144-L160
[ "def", "create_gist", "(", "self", ",", "description", ",", "files", ",", "public", "=", "True", ")", ":", "new_gist", "=", "{", "'description'", ":", "description", ",", "'public'", ":", "public", ",", "'files'", ":", "files", "}", "url", "=", "self", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.create_issue
Create an issue on the project 'repository' owned by 'owner' with title 'title'. body, assignee, milestone, labels are all optional. :param str owner: (required), login of the owner :param str repository: (required), repository name :param str title: (required), Title of issue ...
aegea/packages/github3/github.py
def create_issue(self, owner, repository, title, body=None, assignee=None, milestone=None, labels=[]): """Create an issue on the project 'repository' owned by 'owner...
def create_issue(self, owner, repository, title, body=None, assignee=None, milestone=None, labels=[]): """Create an issue on the project 'repository' owned by 'owner...
[ "Create", "an", "issue", "on", "the", "project", "repository", "owned", "by", "owner", "with", "title", "title", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L163-L200
[ "def", "create_issue", "(", "self", ",", "owner", ",", "repository", ",", "title", ",", "body", "=", "None", ",", "assignee", "=", "None", ",", "milestone", "=", "None", ",", "labels", "=", "[", "]", ")", ":", "repo", "=", "None", "if", "owner", "a...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.create_key
Create a new key for the authenticated user. :param str title: (required), key title :param key: (required), actual key contents, accepts path as a string or file-like object :returns: :class:`Key <github3.users.Key>`
aegea/packages/github3/github.py
def create_key(self, title, key): """Create a new key for the authenticated user. :param str title: (required), key title :param key: (required), actual key contents, accepts path as a string or file-like object :returns: :class:`Key <github3.users.Key>` """ ...
def create_key(self, title, key): """Create a new key for the authenticated user. :param str title: (required), key title :param key: (required), actual key contents, accepts path as a string or file-like object :returns: :class:`Key <github3.users.Key>` """ ...
[ "Create", "a", "new", "key", "for", "the", "authenticated", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L203-L219
[ "def", "create_key", "(", "self", ",", "title", ",", "key", ")", ":", "created", "=", "None", "if", "title", "and", "key", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'keys'", ")", "req", "=", "self", ".", "_post", "(", "url", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.delete_key
Delete user key pointed to by ``key_id``. :param int key_id: (required), unique id used by Github :returns: bool
aegea/packages/github3/github.py
def delete_key(self, key_id): """Delete user key pointed to by ``key_id``. :param int key_id: (required), unique id used by Github :returns: bool """ key = self.key(key_id) if key: return key.delete() return False
def delete_key(self, key_id): """Delete user key pointed to by ``key_id``. :param int key_id: (required), unique id used by Github :returns: bool """ key = self.key(key_id) if key: return key.delete() return False
[ "Delete", "user", "key", "pointed", "to", "by", "key_id", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L262-L271
[ "def", "delete_key", "(", "self", ",", "key_id", ")", ":", "key", "=", "self", ".", "key", "(", "key_id", ")", "if", "key", ":", "return", "key", ".", "delete", "(", ")", "return", "False" ]
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.emojis
Retrieves a dictionary of all of the emojis that GitHub supports. :returns: dictionary where the key is what would be in between the colons and the value is the URL to the image, e.g., :: { '+1': 'https://github.global.ssl.fastly.net/images/...', ...
aegea/packages/github3/github.py
def emojis(self): """Retrieves a dictionary of all of the emojis that GitHub supports. :returns: dictionary where the key is what would be in between the colons and the value is the URL to the image, e.g., :: { '+1': 'https://github.global.ssl.fastly.net...
def emojis(self): """Retrieves a dictionary of all of the emojis that GitHub supports. :returns: dictionary where the key is what would be in between the colons and the value is the URL to the image, e.g., :: { '+1': 'https://github.global.ssl.fastly.net...
[ "Retrieves", "a", "dictionary", "of", "all", "of", "the", "emojis", "that", "GitHub", "supports", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L273-L285
[ "def", "emojis", "(", "self", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'emojis'", ")", "return", "self", ".", "_json", "(", "self", ".", "_get", "(", "url", ")", ",", "200", ")" ]
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.feeds
List GitHub's timeline resources in Atom format. :returns: dictionary parsed to include URITemplates
aegea/packages/github3/github.py
def feeds(self): """List GitHub's timeline resources in Atom format. :returns: dictionary parsed to include URITemplates """ url = self._build_url('feeds') json = self._json(self._get(url), 200) del json['ETag'] del json['Last-Modified'] urls = [ ...
def feeds(self): """List GitHub's timeline resources in Atom format. :returns: dictionary parsed to include URITemplates """ url = self._build_url('feeds') json = self._json(self._get(url), 200) del json['ETag'] del json['Last-Modified'] urls = [ ...
[ "List", "GitHub", "s", "timeline", "resources", "in", "Atom", "format", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L288-L311
[ "def", "feeds", "(", "self", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'feeds'", ")", "json", "=", "self", ".", "_json", "(", "self", ".", "_get", "(", "url", ")", ",", "200", ")", "del", "json", "[", "'ETag'", "]", "del", "json", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.follow
Make the authenticated user follow login. :param str login: (required), user to follow :returns: bool
aegea/packages/github3/github.py
def follow(self, login): """Make the authenticated user follow login. :param str login: (required), user to follow :returns: bool """ resp = False if login: url = self._build_url('user', 'following', login) resp = self._boolean(self._put(url), 204...
def follow(self, login): """Make the authenticated user follow login. :param str login: (required), user to follow :returns: bool """ resp = False if login: url = self._build_url('user', 'following', login) resp = self._boolean(self._put(url), 204...
[ "Make", "the", "authenticated", "user", "follow", "login", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L314-L324
[ "def", "follow", "(", "self", ",", "login", ")", ":", "resp", "=", "False", "if", "login", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'following'", ",", "login", ")", "resp", "=", "self", ".", "_boolean", "(", "self", ".", "_p...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.gist
Gets the gist using the specified id number. :param int id_num: (required), unique id of the gist :returns: :class:`Gist <github3.gists.Gist>`
aegea/packages/github3/github.py
def gist(self, id_num): """Gets the gist using the specified id number. :param int id_num: (required), unique id of the gist :returns: :class:`Gist <github3.gists.Gist>` """ url = self._build_url('gists', str(id_num)) json = self._json(self._get(url), 200) return...
def gist(self, id_num): """Gets the gist using the specified id number. :param int id_num: (required), unique id of the gist :returns: :class:`Gist <github3.gists.Gist>` """ url = self._build_url('gists', str(id_num)) json = self._json(self._get(url), 200) return...
[ "Gets", "the", "gist", "using", "the", "specified", "id", "number", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L326-L334
[ "def", "gist", "(", "self", ",", "id_num", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'gists'", ",", "str", "(", "id_num", ")", ")", "json", "=", "self", ".", "_json", "(", "self", ".", "_get", "(", "url", ")", ",", "200", ")", "ret...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.gitignore_template
Returns the template for language. :returns: str
aegea/packages/github3/github.py
def gitignore_template(self, language): """Returns the template for language. :returns: str """ url = self._build_url('gitignore', 'templates', language) json = self._json(self._get(url), 200) if not json: return '' return json.get('source', '')
def gitignore_template(self, language): """Returns the template for language. :returns: str """ url = self._build_url('gitignore', 'templates', language) json = self._json(self._get(url), 200) if not json: return '' return json.get('source', '')
[ "Returns", "the", "template", "for", "language", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L336-L345
[ "def", "gitignore_template", "(", "self", ",", "language", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'gitignore'", ",", "'templates'", ",", "language", ")", "json", "=", "self", ".", "_json", "(", "self", ".", "_get", "(", "url", ")", ",",...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.gitignore_templates
Returns the list of available templates. :returns: list of template names
aegea/packages/github3/github.py
def gitignore_templates(self): """Returns the list of available templates. :returns: list of template names """ url = self._build_url('gitignore', 'templates') return self._json(self._get(url), 200) or []
def gitignore_templates(self): """Returns the list of available templates. :returns: list of template names """ url = self._build_url('gitignore', 'templates') return self._json(self._get(url), 200) or []
[ "Returns", "the", "list", "of", "available", "templates", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L347-L353
[ "def", "gitignore_templates", "(", "self", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'gitignore'", ",", "'templates'", ")", "return", "self", ".", "_json", "(", "self", ".", "_get", "(", "url", ")", ",", "200", ")", "or", "[", "]" ]
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.is_following
Check if the authenticated user is following login. :param str login: (required), login of the user to check if the authenticated user is checking :returns: bool
aegea/packages/github3/github.py
def is_following(self, login): """Check if the authenticated user is following login. :param str login: (required), login of the user to check if the authenticated user is checking :returns: bool """ json = False if login: url = self._build_url('u...
def is_following(self, login): """Check if the authenticated user is following login. :param str login: (required), login of the user to check if the authenticated user is checking :returns: bool """ json = False if login: url = self._build_url('u...
[ "Check", "if", "the", "authenticated", "user", "is", "following", "login", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L356-L367
[ "def", "is_following", "(", "self", ",", "login", ")", ":", "json", "=", "False", "if", "login", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'following'", ",", "login", ")", "json", "=", "self", ".", "_boolean", "(", "self", ".",...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.is_subscribed
Check if the authenticated user is subscribed to login/repo. :param str login: (required), owner of repository :param str repo: (required), name of repository :returns: bool
aegea/packages/github3/github.py
def is_subscribed(self, login, repo): """Check if the authenticated user is subscribed to login/repo. :param str login: (required), owner of repository :param str repo: (required), name of repository :returns: bool """ json = False if login and repo: ...
def is_subscribed(self, login, repo): """Check if the authenticated user is subscribed to login/repo. :param str login: (required), owner of repository :param str repo: (required), name of repository :returns: bool """ json = False if login and repo: ...
[ "Check", "if", "the", "authenticated", "user", "is", "subscribed", "to", "login", "/", "repo", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L384-L395
[ "def", "is_subscribed", "(", "self", ",", "login", ",", "repo", ")", ":", "json", "=", "False", "if", "login", "and", "repo", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'subscriptions'", ",", "login", ",", "repo", ")", "json", "...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.issue
Fetch issue #:number: from https://github.com/:owner:/:repository: :param str owner: (required), owner of the repository :param str repository: (required), name of the repository :param int number: (required), issue number :return: :class:`Issue <github3.issues.Issue>`
aegea/packages/github3/github.py
def issue(self, owner, repository, number): """Fetch issue #:number: from https://github.com/:owner:/:repository: :param str owner: (required), owner of the repository :param str repository: (required), name of the repository :param int number: (required), issue number :return: ...
def issue(self, owner, repository, number): """Fetch issue #:number: from https://github.com/:owner:/:repository: :param str owner: (required), owner of the repository :param str repository: (required), name of the repository :param int number: (required), issue number :return: ...
[ "Fetch", "issue", "#", ":", "number", ":", "from", "https", ":", "//", "github", ".", "com", "/", ":", "owner", ":", "/", ":", "repository", ":" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L397-L408
[ "def", "issue", "(", "self", ",", "owner", ",", "repository", ",", "number", ")", ":", "repo", "=", "self", ".", "repository", "(", "owner", ",", "repository", ")", "if", "repo", ":", "return", "repo", ".", "issue", "(", "number", ")", "return", "Non...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_all_repos
Iterate over every repository in the order they were created. :param int number: (optional), number of repositories to return. Default: -1, returns all of them :param int since: (optional), last repository id seen (allows restarting this iteration) :param str etag: (opti...
aegea/packages/github3/github.py
def iter_all_repos(self, number=-1, since=None, etag=None, per_page=None): """Iterate over every repository in the order they were created. :param int number: (optional), number of repositories to return. Default: -1, returns all of them :param int since: (optional), last repository...
def iter_all_repos(self, number=-1, since=None, etag=None, per_page=None): """Iterate over every repository in the order they were created. :param int number: (optional), number of repositories to return. Default: -1, returns all of them :param int since: (optional), last repository...
[ "Iterate", "over", "every", "repository", "in", "the", "order", "they", "were", "created", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L410-L426
[ "def", "iter_all_repos", "(", "self", ",", "number", "=", "-", "1", ",", "since", "=", "None", ",", "etag", "=", "None", ",", "per_page", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'repositories'", ")", "return", "self", ".",...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_all_users
Iterate over every user in the order they signed up for GitHub. :param int number: (optional), number of users to return. Default: -1, returns all of them :param str etag: (optional), ETag from a previous request to the same endpoint :param int per_page: (optional), numb...
aegea/packages/github3/github.py
def iter_all_users(self, number=-1, etag=None, per_page=None): """Iterate over every user in the order they signed up for GitHub. :param int number: (optional), number of users to return. Default: -1, returns all of them :param str etag: (optional), ETag from a previous request to t...
def iter_all_users(self, number=-1, etag=None, per_page=None): """Iterate over every user in the order they signed up for GitHub. :param int number: (optional), number of users to return. Default: -1, returns all of them :param str etag: (optional), ETag from a previous request to t...
[ "Iterate", "over", "every", "user", "in", "the", "order", "they", "signed", "up", "for", "GitHub", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L428-L440
[ "def", "iter_all_users", "(", "self", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ",", "per_page", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'users'", ")", "return", "self", ".", "_iter", "(", "int", "(", "numb...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_authorizations
Iterate over authorizations for the authenticated user. This will return a 404 if you are using a token for authentication. :param int number: (optional), number of authorizations to return. Default: -1 returns all available authorizations :param str etag: (optional), ETag from a pr...
aegea/packages/github3/github.py
def iter_authorizations(self, number=-1, etag=None): """Iterate over authorizations for the authenticated user. This will return a 404 if you are using a token for authentication. :param int number: (optional), number of authorizations to return. Default: -1 returns all available au...
def iter_authorizations(self, number=-1, etag=None): """Iterate over authorizations for the authenticated user. This will return a 404 if you are using a token for authentication. :param int number: (optional), number of authorizations to return. Default: -1 returns all available au...
[ "Iterate", "over", "authorizations", "for", "the", "authenticated", "user", ".", "This", "will", "return", "a", "404", "if", "you", "are", "using", "a", "token", "for", "authentication", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L443-L454
[ "def", "iter_authorizations", "(", "self", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'authorizations'", ")", "return", "self", ".", "_iter", "(", "int", "(", "number", ")", ",", "ur...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_emails
Iterate over email addresses for the authenticated user. :param int number: (optional), number of email addresses to return. Default: -1 returns all available email addresses :param str etag: (optional), ETag from a previous request to the same endpoint :returns: generat...
aegea/packages/github3/github.py
def iter_emails(self, number=-1, etag=None): """Iterate over email addresses for the authenticated user. :param int number: (optional), number of email addresses to return. Default: -1 returns all available email addresses :param str etag: (optional), ETag from a previous request to...
def iter_emails(self, number=-1, etag=None): """Iterate over email addresses for the authenticated user. :param int number: (optional), number of email addresses to return. Default: -1 returns all available email addresses :param str etag: (optional), ETag from a previous request to...
[ "Iterate", "over", "email", "addresses", "for", "the", "authenticated", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L457-L467
[ "def", "iter_emails", "(", "self", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'emails'", ")", "return", "self", ".", "_iter", "(", "int", "(", "number", ")", ",", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_events
Iterate over public events. :param int number: (optional), number of events to return. Default: -1 returns all available events :param str etag: (optional), ETag from a previous request to the same endpoint :returns: generator of :class:`Event <github3.events.Event>`\ s
aegea/packages/github3/github.py
def iter_events(self, number=-1, etag=None): """Iterate over public events. :param int number: (optional), number of events to return. Default: -1 returns all available events :param str etag: (optional), ETag from a previous request to the same endpoint :returns...
def iter_events(self, number=-1, etag=None): """Iterate over public events. :param int number: (optional), number of events to return. Default: -1 returns all available events :param str etag: (optional), ETag from a previous request to the same endpoint :returns...
[ "Iterate", "over", "public", "events", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L469-L479
[ "def", "iter_events", "(", "self", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'events'", ")", "return", "self", ".", "_iter", "(", "int", "(", "number", ")", ",", "url", ",", "Ev...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_followers
If login is provided, iterate over a generator of followers of that login name; otherwise return a generator of followers of the authenticated user. :param str login: (optional), login of the user to check :param int number: (optional), number of followers to return. Default: ...
aegea/packages/github3/github.py
def iter_followers(self, login=None, number=-1, etag=None): """If login is provided, iterate over a generator of followers of that login name; otherwise return a generator of followers of the authenticated user. :param str login: (optional), login of the user to check :param int...
def iter_followers(self, login=None, number=-1, etag=None): """If login is provided, iterate over a generator of followers of that login name; otherwise return a generator of followers of the authenticated user. :param str login: (optional), login of the user to check :param int...
[ "If", "login", "is", "provided", "iterate", "over", "a", "generator", "of", "followers", "of", "that", "login", "name", ";", "otherwise", "return", "a", "generator", "of", "followers", "of", "the", "authenticated", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L481-L495
[ "def", "iter_followers", "(", "self", ",", "login", "=", "None", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "if", "login", ":", "return", "self", ".", "user", "(", "login", ")", ".", "iter_followers", "(", ")", "return", "sel...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_following
If login is provided, iterate over a generator of users being followed by login; otherwise return a generator of people followed by the authenticated user. :param str login: (optional), login of the user to check :param int number: (optional), number of people to return. Default: -1 ...
aegea/packages/github3/github.py
def iter_following(self, login=None, number=-1, etag=None): """If login is provided, iterate over a generator of users being followed by login; otherwise return a generator of people followed by the authenticated user. :param str login: (optional), login of the user to check :pa...
def iter_following(self, login=None, number=-1, etag=None): """If login is provided, iterate over a generator of users being followed by login; otherwise return a generator of people followed by the authenticated user. :param str login: (optional), login of the user to check :pa...
[ "If", "login", "is", "provided", "iterate", "over", "a", "generator", "of", "users", "being", "followed", "by", "login", ";", "otherwise", "return", "a", "generator", "of", "people", "followed", "by", "the", "authenticated", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L497-L511
[ "def", "iter_following", "(", "self", ",", "login", "=", "None", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "if", "login", ":", "return", "self", ".", "user", "(", "login", ")", ".", "iter_following", "(", ")", "return", "sel...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_gists
If no username is specified, GET /gists, otherwise GET /users/:username/gists :param str login: (optional), login of the user to check :param int number: (optional), number of gists to return. Default: -1 returns all available gists :param str etag: (optional), ETag from a p...
aegea/packages/github3/github.py
def iter_gists(self, username=None, number=-1, etag=None): """If no username is specified, GET /gists, otherwise GET /users/:username/gists :param str login: (optional), login of the user to check :param int number: (optional), number of gists to return. Default: -1 returns ...
def iter_gists(self, username=None, number=-1, etag=None): """If no username is specified, GET /gists, otherwise GET /users/:username/gists :param str login: (optional), login of the user to check :param int number: (optional), number of gists to return. Default: -1 returns ...
[ "If", "no", "username", "is", "specified", "GET", "/", "gists", "otherwise", "GET", "/", "users", "/", ":", "username", "/", "gists" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L513-L528
[ "def", "iter_gists", "(", "self", ",", "username", "=", "None", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "if", "username", ":", "url", "=", "self", ".", "_build_url", "(", "'users'", ",", "username", ",", "'gists'", ")", "e...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_notifications
Iterate over the user's notification. :param bool all: (optional), iterate over all notifications :param bool participating: (optional), only iterate over notifications in which the user is participating :param int number: (optional), how many notifications to return :param ...
aegea/packages/github3/github.py
def iter_notifications(self, all=False, participating=False, number=-1, etag=None): """Iterate over the user's notification. :param bool all: (optional), iterate over all notifications :param bool participating: (optional), only iterate over notifications ...
def iter_notifications(self, all=False, participating=False, number=-1, etag=None): """Iterate over the user's notification. :param bool all: (optional), iterate over all notifications :param bool participating: (optional), only iterate over notifications ...
[ "Iterate", "over", "the", "user", "s", "notification", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L531-L551
[ "def", "iter_notifications", "(", "self", ",", "all", "=", "False", ",", "participating", "=", "False", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "params", "=", "None", "if", "all", ":", "params", "=", "{", "'all'", ":", "al...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_org_issues
Iterate over the organnization's issues if the authenticated user belongs to it. :param str name: (required), name of the organization :param str filter: accepted values: ('assigned', 'created', 'mentioned', 'subscribed') api-default: 'assigned' :param str state:...
aegea/packages/github3/github.py
def iter_org_issues(self, name, filter='', state='', labels='', sort='', direction='', since=None, number=-1, etag=None): """Iterate over the organnization's issues if the authenticated user belongs to it. :param str name: (required), name of the organization :pa...
def iter_org_issues(self, name, filter='', state='', labels='', sort='', direction='', since=None, number=-1, etag=None): """Iterate over the organnization's issues if the authenticated user belongs to it. :param str name: (required), name of the organization :pa...
[ "Iterate", "over", "the", "organnization", "s", "issues", "if", "the", "authenticated", "user", "belongs", "to", "it", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L554-L584
[ "def", "iter_org_issues", "(", "self", ",", "name", ",", "filter", "=", "''", ",", "state", "=", "''", ",", "labels", "=", "''", ",", "sort", "=", "''", ",", "direction", "=", "''", ",", "since", "=", "None", ",", "number", "=", "-", "1", ",", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_repo_issues
List issues on owner/repository. Only owner and repository are required. .. versionchanged:: 0.9.0 - The ``state`` parameter now accepts 'all' in addition to 'open' and 'closed'. :param str owner: login of the owner of the repository :param str repository: na...
aegea/packages/github3/github.py
def iter_repo_issues(self, owner, repository, milestone=None, state=None, assignee=None, mentioned=None, labels=None, sort=None, direction=None, since=None, number=-1, etag=None): """List issues on owner/repository. Only owner and reposi...
def iter_repo_issues(self, owner, repository, milestone=None, state=None, assignee=None, mentioned=None, labels=None, sort=None, direction=None, since=None, number=-1, etag=None): """List issues on owner/repository. Only owner and reposi...
[ "List", "issues", "on", "owner", "/", "repository", ".", "Only", "owner", "and", "repository", "are", "required", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L659-L699
[ "def", "iter_repo_issues", "(", "self", ",", "owner", ",", "repository", ",", "milestone", "=", "None", ",", "state", "=", "None", ",", "assignee", "=", "None", ",", "mentioned", "=", "None", ",", "labels", "=", "None", ",", "sort", "=", "None", ",", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_orgs
Iterate over public organizations for login if provided; otherwise iterate over public and private organizations for the authenticated user. :param str login: (optional), user whose orgs you wish to list :param int number: (optional), number of organizations to return. Defau...
aegea/packages/github3/github.py
def iter_orgs(self, login=None, number=-1, etag=None): """Iterate over public organizations for login if provided; otherwise iterate over public and private organizations for the authenticated user. :param str login: (optional), user whose orgs you wish to list :param int number...
def iter_orgs(self, login=None, number=-1, etag=None): """Iterate over public organizations for login if provided; otherwise iterate over public and private organizations for the authenticated user. :param str login: (optional), user whose orgs you wish to list :param int number...
[ "Iterate", "over", "public", "organizations", "for", "login", "if", "provided", ";", "otherwise", "iterate", "over", "public", "and", "private", "organizations", "for", "the", "authenticated", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L714-L732
[ "def", "iter_orgs", "(", "self", ",", "login", "=", "None", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "if", "login", ":", "url", "=", "self", ".", "_build_url", "(", "'users'", ",", "login", ",", "'orgs'", ")", "else", ":"...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_repos
List public repositories for the authenticated user. .. versionchanged:: 0.6 Removed the login parameter for correctness. Use iter_user_repos instead :param str type: (optional), accepted values: ('all', 'owner', 'public', 'private', 'member') API default:...
aegea/packages/github3/github.py
def iter_repos(self, type=None, sort=None, direction=None, number=-1, etag=None): """List public repositories for the authenticated user. .. versionchanged:: 0.6 Removed the login parameter for correctness. Use iter_user_repos instead :param str type: (...
def iter_repos(self, type=None, sort=None, direction=None, number=-1, etag=None): """List public repositories for the authenticated user. .. versionchanged:: 0.6 Removed the login parameter for correctness. Use iter_user_repos instead :param str type: (...
[ "List", "public", "repositories", "for", "the", "authenticated", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L735-L769
[ "def", "iter_repos", "(", "self", ",", "type", "=", "None", ",", "sort", "=", "None", ",", "direction", "=", "None", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'re...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_starred
Iterate over repositories starred by ``login`` or the authenticated user. .. versionchanged:: 0.5 Added sort and direction parameters (optional) as per the change in GitHub's API. :param str login: (optional), name of user whose stars you want to see :param str so...
aegea/packages/github3/github.py
def iter_starred(self, login=None, sort=None, direction=None, number=-1, etag=None): """Iterate over repositories starred by ``login`` or the authenticated user. .. versionchanged:: 0.5 Added sort and direction parameters (optional) as per the change in ...
def iter_starred(self, login=None, sort=None, direction=None, number=-1, etag=None): """Iterate over repositories starred by ``login`` or the authenticated user. .. versionchanged:: 0.5 Added sort and direction parameters (optional) as per the change in ...
[ "Iterate", "over", "repositories", "starred", "by", "login", "or", "the", "authenticated", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L771-L797
[ "def", "iter_starred", "(", "self", ",", "login", "=", "None", ",", "sort", "=", "None", ",", "direction", "=", "None", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "if", "login", ":", "return", "self", ".", "user", "(", "log...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_subscriptions
Iterate over repositories subscribed to by ``login`` or the authenticated user. :param str login: (optional), name of user whose subscriptions you want to see :param int number: (optional), number of repositories to return. Default: -1 returns all repositories :p...
aegea/packages/github3/github.py
def iter_subscriptions(self, login=None, number=-1, etag=None): """Iterate over repositories subscribed to by ``login`` or the authenticated user. :param str login: (optional), name of user whose subscriptions you want to see :param int number: (optional), number of reposito...
def iter_subscriptions(self, login=None, number=-1, etag=None): """Iterate over repositories subscribed to by ``login`` or the authenticated user. :param str login: (optional), name of user whose subscriptions you want to see :param int number: (optional), number of reposito...
[ "Iterate", "over", "repositories", "subscribed", "to", "by", "login", "or", "the", "authenticated", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L799-L815
[ "def", "iter_subscriptions", "(", "self", ",", "login", "=", "None", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "if", "login", ":", "return", "self", ".", "user", "(", "login", ")", ".", "iter_subscriptions", "(", ")", "url", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.iter_user_teams
Gets the authenticated user's teams across all of organizations. List all of the teams across all of the organizations to which the authenticated user belongs. This method requires user or repo scope when authenticating via OAuth. :returns: generator of :class:`Team <github3.orgs.Team>...
aegea/packages/github3/github.py
def iter_user_teams(self, number=-1, etag=None): """Gets the authenticated user's teams across all of organizations. List all of the teams across all of the organizations to which the authenticated user belongs. This method requires user or repo scope when authenticating via OAuth. ...
def iter_user_teams(self, number=-1, etag=None): """Gets the authenticated user's teams across all of organizations. List all of the teams across all of the organizations to which the authenticated user belongs. This method requires user or repo scope when authenticating via OAuth. ...
[ "Gets", "the", "authenticated", "user", "s", "teams", "across", "all", "of", "organizations", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L853-L863
[ "def", "iter_user_teams", "(", "self", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'teams'", ")", "return", "self", ".", "_iter", "(", "int", "(", "number", ")", ",",...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.login
Logs the user into GitHub for protected API calls. :param str username: login name :param str password: password for the login :param str token: OAuth token :param func two_factor_callback: (optional), function you implement to provide the Two Factor Authentication code to G...
aegea/packages/github3/github.py
def login(self, username=None, password=None, token=None, two_factor_callback=None): """Logs the user into GitHub for protected API calls. :param str username: login name :param str password: password for the login :param str token: OAuth token :param func two_fact...
def login(self, username=None, password=None, token=None, two_factor_callback=None): """Logs the user into GitHub for protected API calls. :param str username: login name :param str password: password for the login :param str token: OAuth token :param func two_fact...
[ "Logs", "the", "user", "into", "GitHub", "for", "protected", "API", "calls", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L878-L894
[ "def", "login", "(", "self", ",", "username", "=", "None", ",", "password", "=", "None", ",", "token", "=", "None", ",", "two_factor_callback", "=", "None", ")", ":", "if", "username", "and", "password", ":", "self", ".", "_session", ".", "basic_auth", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.markdown
Render an arbitrary markdown document. :param str text: (required), the text of the document to render :param str mode: (optional), 'markdown' or 'gfm' :param str context: (optional), only important when using mode 'gfm', this is the repository to use as the context for the renderin...
aegea/packages/github3/github.py
def markdown(self, text, mode='', context='', raw=False): """Render an arbitrary markdown document. :param str text: (required), the text of the document to render :param str mode: (optional), 'markdown' or 'gfm' :param str context: (optional), only important when using mode 'gfm', ...
def markdown(self, text, mode='', context='', raw=False): """Render an arbitrary markdown document. :param str text: (required), the text of the document to render :param str mode: (optional), 'markdown' or 'gfm' :param str context: (optional), only important when using mode 'gfm', ...
[ "Render", "an", "arbitrary", "markdown", "document", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L896-L932
[ "def", "markdown", "(", "self", ",", "text", ",", "mode", "=", "''", ",", "context", "=", "''", ",", "raw", "=", "False", ")", ":", "data", "=", "None", "json", "=", "False", "headers", "=", "{", "}", "if", "raw", ":", "url", "=", "self", ".", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.membership_in
Retrieve the user's membership in the specified organization.
aegea/packages/github3/github.py
def membership_in(self, organization): """Retrieve the user's membership in the specified organization.""" url = self._build_url('user', 'memberships', 'orgs', str(organization)) json = self._json(self._get(url), 200) return Membership(json, self)
def membership_in(self, organization): """Retrieve the user's membership in the specified organization.""" url = self._build_url('user', 'memberships', 'orgs', str(organization)) json = self._json(self._get(url), 200) return Membership(json, self)
[ "Retrieve", "the", "user", "s", "membership", "in", "the", "specified", "organization", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L935-L940
[ "def", "membership_in", "(", "self", ",", "organization", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'memberships'", ",", "'orgs'", ",", "str", "(", "organization", ")", ")", "json", "=", "self", ".", "_json", "(", "self", "....
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.meta
Returns a dictionary with arrays of addresses in CIDR format specifying theaddresses that the incoming service hooks will originate from. .. versionadded:: 0.5
aegea/packages/github3/github.py
def meta(self): """Returns a dictionary with arrays of addresses in CIDR format specifying theaddresses that the incoming service hooks will originate from. .. versionadded:: 0.5 """ url = self._build_url('meta') return self._json(self._get(url), 200)
def meta(self): """Returns a dictionary with arrays of addresses in CIDR format specifying theaddresses that the incoming service hooks will originate from. .. versionadded:: 0.5 """ url = self._build_url('meta') return self._json(self._get(url), 200)
[ "Returns", "a", "dictionary", "with", "arrays", "of", "addresses", "in", "CIDR", "format", "specifying", "theaddresses", "that", "the", "incoming", "service", "hooks", "will", "originate", "from", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L942-L950
[ "def", "meta", "(", "self", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'meta'", ")", "return", "self", ".", "_json", "(", "self", ".", "_get", "(", "url", ")", ",", "200", ")" ]
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.octocat
Returns an easter egg of the API. :params str say: (optional), pass in what you'd like Octocat to say :returns: ascii art of Octocat
aegea/packages/github3/github.py
def octocat(self, say=None): """Returns an easter egg of the API. :params str say: (optional), pass in what you'd like Octocat to say :returns: ascii art of Octocat """ url = self._build_url('octocat') req = self._get(url, params={'s': say}) return req.content if...
def octocat(self, say=None): """Returns an easter egg of the API. :params str say: (optional), pass in what you'd like Octocat to say :returns: ascii art of Octocat """ url = self._build_url('octocat') req = self._get(url, params={'s': say}) return req.content if...
[ "Returns", "an", "easter", "egg", "of", "the", "API", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L952-L960
[ "def", "octocat", "(", "self", ",", "say", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'octocat'", ")", "req", "=", "self", ".", "_get", "(", "url", ",", "params", "=", "{", "'s'", ":", "say", "}", ")", "return", "req", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.organization
Returns a Organization object for the login name :param str login: (required), login name of the org :returns: :class:`Organization <github3.orgs.Organization>`
aegea/packages/github3/github.py
def organization(self, login): """Returns a Organization object for the login name :param str login: (required), login name of the org :returns: :class:`Organization <github3.orgs.Organization>` """ url = self._build_url('orgs', login) json = self._json(self._get(url), 2...
def organization(self, login): """Returns a Organization object for the login name :param str login: (required), login name of the org :returns: :class:`Organization <github3.orgs.Organization>` """ url = self._build_url('orgs', login) json = self._json(self._get(url), 2...
[ "Returns", "a", "Organization", "object", "for", "the", "login", "name" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L963-L971
[ "def", "organization", "(", "self", ",", "login", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'orgs'", ",", "login", ")", "json", "=", "self", ".", "_json", "(", "self", ".", "_get", "(", "url", ")", ",", "200", ")", "return", "Organizat...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.organization_memberships
List organizations of which the user is a current or pending member. :param str state: (option), state of the membership, i.e., active, pending :returns: iterator of :class:`Membership <github3.orgs.Membership>`
aegea/packages/github3/github.py
def organization_memberships(self, state=None, number=-1, etag=None): """List organizations of which the user is a current or pending member. :param str state: (option), state of the membership, i.e., active, pending :returns: iterator of :class:`Membership <github3.orgs.Membership>...
def organization_memberships(self, state=None, number=-1, etag=None): """List organizations of which the user is a current or pending member. :param str state: (option), state of the membership, i.e., active, pending :returns: iterator of :class:`Membership <github3.orgs.Membership>...
[ "List", "organizations", "of", "which", "the", "user", "is", "a", "current", "or", "pending", "member", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L974-L987
[ "def", "organization_memberships", "(", "self", ",", "state", "=", "None", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "params", "=", "None", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'memberships'", ",", "'orgs'...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.pubsubhubbub
Create/update a pubsubhubbub hook. :param str mode: (required), accepted values: ('subscribe', 'unsubscribe') :param str topic: (required), form: https://github.com/:user/:repo/events/:event :param str callback: (required), the URI that receives the updates :para...
aegea/packages/github3/github.py
def pubsubhubbub(self, mode, topic, callback, secret=''): """Create/update a pubsubhubbub hook. :param str mode: (required), accepted values: ('subscribe', 'unsubscribe') :param str topic: (required), form: https://github.com/:user/:repo/events/:event :param str ...
def pubsubhubbub(self, mode, topic, callback, secret=''): """Create/update a pubsubhubbub hook. :param str mode: (required), accepted values: ('subscribe', 'unsubscribe') :param str topic: (required), form: https://github.com/:user/:repo/events/:event :param str ...
[ "Create", "/", "update", "a", "pubsubhubbub", "hook", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L990-L1016
[ "def", "pubsubhubbub", "(", "self", ",", "mode", ",", "topic", ",", "callback", ",", "secret", "=", "''", ")", ":", "from", "re", "import", "match", "m", "=", "match", "(", "'https?://[\\w\\d\\-\\.\\:]+/\\w+/[\\w\\._-]+/events/\\w+'", ",", "topic", ")", "statu...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.pull_request
Fetch pull_request #:number: from :owner:/:repository :param str owner: (required), owner of the repository :param str repository: (required), name of the repository :param int number: (required), issue number :return: :class:`Issue <github3.issues.Issue>`
aegea/packages/github3/github.py
def pull_request(self, owner, repository, number): """Fetch pull_request #:number: from :owner:/:repository :param str owner: (required), owner of the repository :param str repository: (required), name of the repository :param int number: (required), issue number :return: :class...
def pull_request(self, owner, repository, number): """Fetch pull_request #:number: from :owner:/:repository :param str owner: (required), owner of the repository :param str repository: (required), name of the repository :param int number: (required), issue number :return: :class...
[ "Fetch", "pull_request", "#", ":", "number", ":", "from", ":", "owner", ":", "/", ":", "repository" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1018-L1027
[ "def", "pull_request", "(", "self", ",", "owner", ",", "repository", ",", "number", ")", ":", "r", "=", "self", ".", "repository", "(", "owner", ",", "repository", ")", "return", "r", ".", "pull_request", "(", "number", ")", "if", "r", "else", "None" ]
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.rate_limit
Returns a dictionary with information from /rate_limit. The dictionary has two keys: ``resources`` and ``rate``. In ``resources`` you can access information about ``core`` or ``search``. Note: the ``rate`` key will be deprecated before version 3 of the GitHub API is finalized. Do not r...
aegea/packages/github3/github.py
def rate_limit(self): """Returns a dictionary with information from /rate_limit. The dictionary has two keys: ``resources`` and ``rate``. In ``resources`` you can access information about ``core`` or ``search``. Note: the ``rate`` key will be deprecated before version 3 of the ...
def rate_limit(self): """Returns a dictionary with information from /rate_limit. The dictionary has two keys: ``resources`` and ``rate``. In ``resources`` you can access information about ``core`` or ``search``. Note: the ``rate`` key will be deprecated before version 3 of the ...
[ "Returns", "a", "dictionary", "with", "information", "from", "/", "rate_limit", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1029-L1050
[ "def", "rate_limit", "(", "self", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'rate_limit'", ")", "return", "self", ".", "_json", "(", "self", ".", "_get", "(", "url", ")", ",", "200", ")" ]
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.repository
Returns a Repository object for the specified combination of owner and repository :param str owner: (required) :param str repository: (required) :returns: :class:`Repository <github3.repos.Repository>`
aegea/packages/github3/github.py
def repository(self, owner, repository): """Returns a Repository object for the specified combination of owner and repository :param str owner: (required) :param str repository: (required) :returns: :class:`Repository <github3.repos.Repository>` """ json = None ...
def repository(self, owner, repository): """Returns a Repository object for the specified combination of owner and repository :param str owner: (required) :param str repository: (required) :returns: :class:`Repository <github3.repos.Repository>` """ json = None ...
[ "Returns", "a", "Repository", "object", "for", "the", "specified", "combination", "of", "owner", "and", "repository" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1052-L1064
[ "def", "repository", "(", "self", ",", "owner", ",", "repository", ")", ":", "json", "=", "None", "if", "owner", "and", "repository", ":", "url", "=", "self", ".", "_build_url", "(", "'repos'", ",", "owner", ",", "repository", ")", "json", "=", "self",...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.revoke_authorization
Revoke specified authorization for an OAuth application. Revoke all authorization tokens created by your application. This will only work if you have already called ``set_client_id``. :param str access_token: (required), the access_token to revoke :returns: bool -- True if successful, ...
aegea/packages/github3/github.py
def revoke_authorization(self, access_token): """Revoke specified authorization for an OAuth application. Revoke all authorization tokens created by your application. This will only work if you have already called ``set_client_id``. :param str access_token: (required), the access_token...
def revoke_authorization(self, access_token): """Revoke specified authorization for an OAuth application. Revoke all authorization tokens created by your application. This will only work if you have already called ``set_client_id``. :param str access_token: (required), the access_token...
[ "Revoke", "specified", "authorization", "for", "an", "OAuth", "application", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1067-L1083
[ "def", "revoke_authorization", "(", "self", ",", "access_token", ")", ":", "client_id", ",", "client_secret", "=", "self", ".", "_session", ".", "retrieve_client_credentials", "(", ")", "url", "=", "self", ".", "_build_url", "(", "'applications'", ",", "str", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.search_code
Find code via the code search API. The query can contain any combination of the following supported qualifiers: - ``in`` Qualifies which fields are searched. With this qualifier you can restrict the search to just the file contents, the file path, or both. - ``langu...
aegea/packages/github3/github.py
def search_code(self, query, sort=None, order=None, per_page=None, text_match=False, number=-1, etag=None): """Find code via the code search API. The query can contain any combination of the following supported qualifiers: - ``in`` Qualifies which fields are searche...
def search_code(self, query, sort=None, order=None, per_page=None, text_match=False, number=-1, etag=None): """Find code via the code search API. The query can contain any combination of the following supported qualifiers: - ``in`` Qualifies which fields are searche...
[ "Find", "code", "via", "the", "code", "search", "API", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1103-L1156
[ "def", "search_code", "(", "self", ",", "query", ",", "sort", "=", "None", ",", "order", "=", "None", ",", "per_page", "=", "None", ",", "text_match", "=", "False", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "params", "=", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.search_issues
Find issues by state and keyword The query can contain any combination of the following supported qualifers: - ``type`` With this qualifier you can restrict the search to issues or pull request only. - ``in`` Qualifies which fields are searched. With this qualifier you ...
aegea/packages/github3/github.py
def search_issues(self, query, sort=None, order=None, per_page=None, text_match=False, number=-1, etag=None): """Find issues by state and keyword The query can contain any combination of the following supported qualifers: - ``type`` With this qualifier you can res...
def search_issues(self, query, sort=None, order=None, per_page=None, text_match=False, number=-1, etag=None): """Find issues by state and keyword The query can contain any combination of the following supported qualifers: - ``type`` With this qualifier you can res...
[ "Find", "issues", "by", "state", "and", "keyword" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1158-L1221
[ "def", "search_issues", "(", "self", ",", "query", ",", "sort", "=", "None", ",", "order", "=", "None", ",", "per_page", "=", "None", ",", "text_match", "=", "False", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "params", "=", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.search_repositories
Find repositories via various criteria. The query can contain any combination of the following supported qualifers: - ``in`` Qualifies which fields are searched. With this qualifier you can restrict the search to just the repository name, description, readme, or any combina...
aegea/packages/github3/github.py
def search_repositories(self, query, sort=None, order=None, per_page=None, text_match=False, number=-1, etag=None): """Find repositories via various criteria. The query can contain any combination of the following supported qualifers: ...
def search_repositories(self, query, sort=None, order=None, per_page=None, text_match=False, number=-1, etag=None): """Find repositories via various criteria. The query can contain any combination of the following supported qualifers: ...
[ "Find", "repositories", "via", "various", "criteria", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1223-L1281
[ "def", "search_repositories", "(", "self", ",", "query", ",", "sort", "=", "None", ",", "order", "=", "None", ",", "per_page", "=", "None", ",", "text_match", "=", "False", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "params", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.search_users
Find users via the Search API. The query can contain any combination of the following supported qualifers: - ``type`` With this qualifier you can restrict the search to just personal accounts or just organization accounts. - ``in`` Qualifies which fields are searched. With t...
aegea/packages/github3/github.py
def search_users(self, query, sort=None, order=None, per_page=None, text_match=False, number=-1, etag=None): """Find users via the Search API. The query can contain any combination of the following supported qualifers: - ``type`` With this qualifier you can restri...
def search_users(self, query, sort=None, order=None, per_page=None, text_match=False, number=-1, etag=None): """Find users via the Search API. The query can contain any combination of the following supported qualifers: - ``type`` With this qualifier you can restri...
[ "Find", "users", "via", "the", "Search", "API", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1283-L1340
[ "def", "search_users", "(", "self", ",", "query", ",", "sort", "=", "None", ",", "order", "=", "None", ",", "per_page", "=", "None", ",", "text_match", "=", "False", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "params", "=", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.star
Star to login/repo :param str login: (required), owner of the repo :param str repo: (required), name of the repo :return: bool
aegea/packages/github3/github.py
def star(self, login, repo): """Star to login/repo :param str login: (required), owner of the repo :param str repo: (required), name of the repo :return: bool """ resp = False if login and repo: url = self._build_url('user', 'starred', login, repo) ...
def star(self, login, repo): """Star to login/repo :param str login: (required), owner of the repo :param str repo: (required), name of the repo :return: bool """ resp = False if login and repo: url = self._build_url('user', 'starred', login, repo) ...
[ "Star", "to", "login", "/", "repo" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1364-L1375
[ "def", "star", "(", "self", ",", "login", ",", "repo", ")", ":", "resp", "=", "False", "if", "login", "and", "repo", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'starred'", ",", "login", ",", "repo", ")", "resp", "=", "self", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.unfollow
Make the authenticated user stop following login :param str login: (required) :returns: bool
aegea/packages/github3/github.py
def unfollow(self, login): """Make the authenticated user stop following login :param str login: (required) :returns: bool """ resp = False if login: url = self._build_url('user', 'following', login) resp = self._boolean(self._delete(url), 204, 40...
def unfollow(self, login): """Make the authenticated user stop following login :param str login: (required) :returns: bool """ resp = False if login: url = self._build_url('user', 'following', login) resp = self._boolean(self._delete(url), 204, 40...
[ "Make", "the", "authenticated", "user", "stop", "following", "login" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1392-L1402
[ "def", "unfollow", "(", "self", ",", "login", ")", ":", "resp", "=", "False", "if", "login", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'following'", ",", "login", ")", "resp", "=", "self", ".", "_boolean", "(", "self", ".", "...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.unstar
Unstar to login/repo :param str login: (required), owner of the repo :param str repo: (required), name of the repo :return: bool
aegea/packages/github3/github.py
def unstar(self, login, repo): """Unstar to login/repo :param str login: (required), owner of the repo :param str repo: (required), name of the repo :return: bool """ resp = False if login and repo: url = self._build_url('user', 'starred', login, repo...
def unstar(self, login, repo): """Unstar to login/repo :param str login: (required), owner of the repo :param str repo: (required), name of the repo :return: bool """ resp = False if login and repo: url = self._build_url('user', 'starred', login, repo...
[ "Unstar", "to", "login", "/", "repo" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1405-L1416
[ "def", "unstar", "(", "self", ",", "login", ",", "repo", ")", ":", "resp", "=", "False", "if", "login", "and", "repo", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'starred'", ",", "login", ",", "repo", ")", "resp", "=", "self",...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.update_user
If authenticated as this user, update the information with the information provided in the parameters. All parameters are optional. :param str name: e.g., 'John Smith', not login name :param str email: e.g., 'john.smith@example.com' :param str blog: e.g., 'http://www.example.com...
aegea/packages/github3/github.py
def update_user(self, name=None, email=None, blog=None, company=None, location=None, hireable=False, bio=None): """If authenticated as this user, update the information with the information provided in the parameters. All parameters are optional. :param str name: e.g...
def update_user(self, name=None, email=None, blog=None, company=None, location=None, hireable=False, bio=None): """If authenticated as this user, update the information with the information provided in the parameters. All parameters are optional. :param str name: e.g...
[ "If", "authenticated", "as", "this", "user", "update", "the", "information", "with", "the", "information", "provided", "in", "the", "parameters", ".", "All", "parameters", "are", "optional", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1433-L1450
[ "def", "update_user", "(", "self", ",", "name", "=", "None", ",", "email", "=", "None", ",", "blog", "=", "None", ",", "company", "=", "None", ",", "location", "=", "None", ",", "hireable", "=", "False", ",", "bio", "=", "None", ")", ":", "user", ...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.user
Returns a User object for the specified login name if provided. If no login name is provided, this will return a User object for the authenticated user. :param str login: (optional) :returns: :class:`User <github3.users.User>`
aegea/packages/github3/github.py
def user(self, login=None): """Returns a User object for the specified login name if provided. If no login name is provided, this will return a User object for the authenticated user. :param str login: (optional) :returns: :class:`User <github3.users.User>` """ i...
def user(self, login=None): """Returns a User object for the specified login name if provided. If no login name is provided, this will return a User object for the authenticated user. :param str login: (optional) :returns: :class:`User <github3.users.User>` """ i...
[ "Returns", "a", "User", "object", "for", "the", "specified", "login", "name", "if", "provided", ".", "If", "no", "login", "name", "is", "provided", "this", "will", "return", "a", "User", "object", "for", "the", "authenticated", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1452-L1466
[ "def", "user", "(", "self", ",", "login", "=", "None", ")", ":", "if", "login", ":", "url", "=", "self", ".", "_build_url", "(", "'users'", ",", "login", ")", "else", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ")", "json", "=", "s...
94957e9dba036eae3052e2662c208b259c08399a
train
GitHub.zen
Returns a quote from the Zen of GitHub. Yet another API Easter Egg :returns: str
aegea/packages/github3/github.py
def zen(self): """Returns a quote from the Zen of GitHub. Yet another API Easter Egg :returns: str """ url = self._build_url('zen') resp = self._get(url) return resp.content if resp.status_code == 200 else ''
def zen(self): """Returns a quote from the Zen of GitHub. Yet another API Easter Egg :returns: str """ url = self._build_url('zen') resp = self._get(url) return resp.content if resp.status_code == 200 else ''
[ "Returns", "a", "quote", "from", "the", "Zen", "of", "GitHub", ".", "Yet", "another", "API", "Easter", "Egg" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1468-L1475
[ "def", "zen", "(", "self", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'zen'", ")", "resp", "=", "self", ".", "_get", "(", "url", ")", "return", "resp", ".", "content", "if", "resp", ".", "status_code", "==", "200", "else", "''" ]
94957e9dba036eae3052e2662c208b259c08399a
train
GitHubEnterprise.admin_stats
This is a simple way to get statistics about your system. :param str option: (required), accepted values: ('all', 'repos', 'hooks', 'pages', 'orgs', 'users', 'pulls', 'issues', 'milestones', 'gists', 'comments') :returns: dict
aegea/packages/github3/github.py
def admin_stats(self, option): """This is a simple way to get statistics about your system. :param str option: (required), accepted values: ('all', 'repos', 'hooks', 'pages', 'orgs', 'users', 'pulls', 'issues', 'milestones', 'gists', 'comments') :returns: dict ""...
def admin_stats(self, option): """This is a simple way to get statistics about your system. :param str option: (required), accepted values: ('all', 'repos', 'hooks', 'pages', 'orgs', 'users', 'pulls', 'issues', 'milestones', 'gists', 'comments') :returns: dict ""...
[ "This", "is", "a", "simple", "way", "to", "get", "statistics", "about", "your", "system", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/github.py#L1499-L1513
[ "def", "admin_stats", "(", "self", ",", "option", ")", ":", "stats", "=", "{", "}", "if", "option", ".", "lower", "(", ")", "in", "(", "'all'", ",", "'repos'", ",", "'hooks'", ",", "'pages'", ",", "'orgs'", ",", "'users'", ",", "'pulls'", ",", "'is...
94957e9dba036eae3052e2662c208b259c08399a
train
Key.update
Update this key. :param str title: (required), title of the key :param str key: (required), text of the key file :returns: bool
aegea/packages/github3/users.py
def update(self, title, key): """Update this key. :param str title: (required), title of the key :param str key: (required), text of the key file :returns: bool """ json = None if title and key: data = {'title': title, 'key': key} json = s...
def update(self, title, key): """Update this key. :param str title: (required), title of the key :param str key: (required), text of the key file :returns: bool """ json = None if title and key: data = {'title': title, 'key': key} json = s...
[ "Update", "this", "key", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L57-L71
[ "def", "update", "(", "self", ",", "title", ",", "key", ")", ":", "json", "=", "None", "if", "title", "and", "key", ":", "data", "=", "{", "'title'", ":", "title", ",", "'key'", ":", "key", "}", "json", "=", "self", ".", "_json", "(", "self", "...
94957e9dba036eae3052e2662c208b259c08399a
train
User.add_email_addresses
Add the email addresses in ``addresses`` to the authenticated user's account. :param list addresses: (optional), email addresses to be added :returns: list of email addresses
aegea/packages/github3/users.py
def add_email_addresses(self, addresses=[]): """Add the email addresses in ``addresses`` to the authenticated user's account. :param list addresses: (optional), email addresses to be added :returns: list of email addresses """ json = [] if addresses: ...
def add_email_addresses(self, addresses=[]): """Add the email addresses in ``addresses`` to the authenticated user's account. :param list addresses: (optional), email addresses to be added :returns: list of email addresses """ json = [] if addresses: ...
[ "Add", "the", "email", "addresses", "in", "addresses", "to", "the", "authenticated", "user", "s", "account", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L200-L211
[ "def", "add_email_addresses", "(", "self", ",", "addresses", "=", "[", "]", ")", ":", "json", "=", "[", "]", "if", "addresses", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'emails'", ")", "json", "=", "self", ".", "_json", "(", ...
94957e9dba036eae3052e2662c208b259c08399a
train
User.delete_email_addresses
Delete the email addresses in ``addresses`` from the authenticated user's account. :param list addresses: (optional), email addresses to be removed :returns: bool
aegea/packages/github3/users.py
def delete_email_addresses(self, addresses=[]): """Delete the email addresses in ``addresses`` from the authenticated user's account. :param list addresses: (optional), email addresses to be removed :returns: bool """ url = self._build_url('user', 'emails') retur...
def delete_email_addresses(self, addresses=[]): """Delete the email addresses in ``addresses`` from the authenticated user's account. :param list addresses: (optional), email addresses to be removed :returns: bool """ url = self._build_url('user', 'emails') retur...
[ "Delete", "the", "email", "addresses", "in", "addresses", "from", "the", "authenticated", "user", "s", "account", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L223-L232
[ "def", "delete_email_addresses", "(", "self", ",", "addresses", "=", "[", "]", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'user'", ",", "'emails'", ")", "return", "self", ".", "_boolean", "(", "self", ".", "_delete", "(", "url", ",", "data"...
94957e9dba036eae3052e2662c208b259c08399a
train
User.is_assignee_on
Checks if this user can be assigned to issues on login/repository. :returns: :class:`bool`
aegea/packages/github3/users.py
def is_assignee_on(self, login, repository): """Checks if this user can be assigned to issues on login/repository. :returns: :class:`bool` """ url = self._build_url('repos', login, repository, 'assignees', self.login) return self._boolean(self._get(...
def is_assignee_on(self, login, repository): """Checks if this user can be assigned to issues on login/repository. :returns: :class:`bool` """ url = self._build_url('repos', login, repository, 'assignees', self.login) return self._boolean(self._get(...
[ "Checks", "if", "this", "user", "can", "be", "assigned", "to", "issues", "on", "login", "/", "repository", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L234-L241
[ "def", "is_assignee_on", "(", "self", ",", "login", ",", "repository", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'repos'", ",", "login", ",", "repository", ",", "'assignees'", ",", "self", ".", "login", ")", "return", "self", ".", "_boolean"...
94957e9dba036eae3052e2662c208b259c08399a
train
User.is_following
Checks if this user is following ``login``. :param str login: (required) :returns: bool
aegea/packages/github3/users.py
def is_following(self, login): """Checks if this user is following ``login``. :param str login: (required) :returns: bool """ url = self.following_urlt.expand(other_user=login) return self._boolean(self._get(url), 204, 404)
def is_following(self, login): """Checks if this user is following ``login``. :param str login: (required) :returns: bool """ url = self.following_urlt.expand(other_user=login) return self._boolean(self._get(url), 204, 404)
[ "Checks", "if", "this", "user", "is", "following", "login", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L243-L251
[ "def", "is_following", "(", "self", ",", "login", ")", ":", "url", "=", "self", ".", "following_urlt", ".", "expand", "(", "other_user", "=", "login", ")", "return", "self", ".", "_boolean", "(", "self", ".", "_get", "(", "url", ")", ",", "204", ",",...
94957e9dba036eae3052e2662c208b259c08399a
train
User.iter_events
Iterate over events performed by this user. :param bool public: (optional), only list public events for the authenticated user :param int number: (optional), number of events to return. Default: -1 returns all available events. :param str etag: (optional), ETag from a pr...
aegea/packages/github3/users.py
def iter_events(self, public=False, number=-1, etag=None): """Iterate over events performed by this user. :param bool public: (optional), only list public events for the authenticated user :param int number: (optional), number of events to return. Default: -1 returns all...
def iter_events(self, public=False, number=-1, etag=None): """Iterate over events performed by this user. :param bool public: (optional), only list public events for the authenticated user :param int number: (optional), number of events to return. Default: -1 returns all...
[ "Iterate", "over", "events", "performed", "by", "this", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L253-L268
[ "def", "iter_events", "(", "self", ",", "public", "=", "False", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "path", "=", "[", "'events'", "]", "if", "public", ":", "path", ".", "append", "(", "'public'", ")", "url", "=", "se...
94957e9dba036eae3052e2662c208b259c08399a
train
User.iter_followers
Iterate over the followers of this user. :param int number: (optional), number of followers to return. Default: -1 returns all available :param str etag: (optional), ETag from a previous request to the same endpoint :returns: generator of :class:`User <User>`\ s
aegea/packages/github3/users.py
def iter_followers(self, number=-1, etag=None): """Iterate over the followers of this user. :param int number: (optional), number of followers to return. Default: -1 returns all available :param str etag: (optional), ETag from a previous request to the same endpoint ...
def iter_followers(self, number=-1, etag=None): """Iterate over the followers of this user. :param int number: (optional), number of followers to return. Default: -1 returns all available :param str etag: (optional), ETag from a previous request to the same endpoint ...
[ "Iterate", "over", "the", "followers", "of", "this", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L270-L280
[ "def", "iter_followers", "(", "self", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'followers'", ",", "base_url", "=", "self", ".", "_api", ")", "return", "self", ".", "_iter", "(", ...
94957e9dba036eae3052e2662c208b259c08399a
train
User.iter_keys
Iterate over the public keys of this user. .. versionadded:: 0.5 :param int number: (optional), number of keys to return. Default: -1 returns all available keys :param str etag: (optional), ETag from a previous request to the same endpoint :returns: generator of...
aegea/packages/github3/users.py
def iter_keys(self, number=-1, etag=None): """Iterate over the public keys of this user. .. versionadded:: 0.5 :param int number: (optional), number of keys to return. Default: -1 returns all available keys :param str etag: (optional), ETag from a previous request to the sa...
def iter_keys(self, number=-1, etag=None): """Iterate over the public keys of this user. .. versionadded:: 0.5 :param int number: (optional), number of keys to return. Default: -1 returns all available keys :param str etag: (optional), ETag from a previous request to the sa...
[ "Iterate", "over", "the", "public", "keys", "of", "this", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L294-L306
[ "def", "iter_keys", "(", "self", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'keys'", ",", "base_url", "=", "self", ".", "_api", ")", "return", "self", ".", "_iter", "(", "int", "...
94957e9dba036eae3052e2662c208b259c08399a
train
User.iter_org_events
Iterate over events as they appear on the user's organization dashboard. You must be authenticated to view this. :param str org: (required), name of the organization :param int number: (optional), number of events to return. Default: -1 returns all available events :param st...
aegea/packages/github3/users.py
def iter_org_events(self, org, number=-1, etag=None): """Iterate over events as they appear on the user's organization dashboard. You must be authenticated to view this. :param str org: (required), name of the organization :param int number: (optional), number of events to return. Defau...
def iter_org_events(self, org, number=-1, etag=None): """Iterate over events as they appear on the user's organization dashboard. You must be authenticated to view this. :param str org: (required), name of the organization :param int number: (optional), number of events to return. Defau...
[ "Iterate", "over", "events", "as", "they", "appear", "on", "the", "user", "s", "organization", "dashboard", ".", "You", "must", "be", "authenticated", "to", "view", "this", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L308-L322
[ "def", "iter_org_events", "(", "self", ",", "org", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "url", "=", "''", "if", "org", ":", "url", "=", "self", ".", "_build_url", "(", "'events'", ",", "'orgs'", ",", "org", ",", "base...
94957e9dba036eae3052e2662c208b259c08399a
train
User.iter_orgs
Iterate over organizations the user is member of :param int number: (optional), number of organizations to return. Default: -1 returns all available organization :param str etag: (optional), ETag from a previous request to the same endpoint :returns: list of :class:`Even...
aegea/packages/github3/users.py
def iter_orgs(self, number=-1, etag=None): """Iterate over organizations the user is member of :param int number: (optional), number of organizations to return. Default: -1 returns all available organization :param str etag: (optional), ETag from a previous request to the same ...
def iter_orgs(self, number=-1, etag=None): """Iterate over organizations the user is member of :param int number: (optional), number of organizations to return. Default: -1 returns all available organization :param str etag: (optional), ETag from a previous request to the same ...
[ "Iterate", "over", "organizations", "the", "user", "is", "member", "of" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L343-L355
[ "def", "iter_orgs", "(", "self", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "# Import here, because a toplevel import causes an import loop", "from", ".", "orgs", "import", "Organization", "url", "=", "self", ".", "_build_url", "(", "'orgs...
94957e9dba036eae3052e2662c208b259c08399a
train
User.iter_starred
Iterate over repositories starred by this user. .. versionchanged:: 0.5 Added sort and direction parameters (optional) as per the change in GitHub's API. :param int number: (optional), number of starred repos to return. Default: -1, returns all available repos ...
aegea/packages/github3/users.py
def iter_starred(self, sort=None, direction=None, number=-1, etag=None): """Iterate over repositories starred by this user. .. versionchanged:: 0.5 Added sort and direction parameters (optional) as per the change in GitHub's API. :param int number: (optional), number of s...
def iter_starred(self, sort=None, direction=None, number=-1, etag=None): """Iterate over repositories starred by this user. .. versionchanged:: 0.5 Added sort and direction parameters (optional) as per the change in GitHub's API. :param int number: (optional), number of s...
[ "Iterate", "over", "repositories", "starred", "by", "this", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L357-L379
[ "def", "iter_starred", "(", "self", ",", "sort", "=", "None", ",", "direction", "=", "None", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "from", ".", "repos", "import", "Repository", "params", "=", "{", "'sort'", ":", "sort", ...
94957e9dba036eae3052e2662c208b259c08399a
train
User.iter_subscriptions
Iterate over repositories subscribed to by this user. :param int number: (optional), number of subscriptions to return. Default: -1, returns all available :param str etag: (optional), ETag from a previous request to the same endpoint :returns: generator of :class:`Reposi...
aegea/packages/github3/users.py
def iter_subscriptions(self, number=-1, etag=None): """Iterate over repositories subscribed to by this user. :param int number: (optional), number of subscriptions to return. Default: -1, returns all available :param str etag: (optional), ETag from a previous request to the same ...
def iter_subscriptions(self, number=-1, etag=None): """Iterate over repositories subscribed to by this user. :param int number: (optional), number of subscriptions to return. Default: -1, returns all available :param str etag: (optional), ETag from a previous request to the same ...
[ "Iterate", "over", "repositories", "subscribed", "to", "by", "this", "user", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L381-L392
[ "def", "iter_subscriptions", "(", "self", ",", "number", "=", "-", "1", ",", "etag", "=", "None", ")", ":", "from", ".", "repos", "import", "Repository", "url", "=", "self", ".", "_build_url", "(", "'subscriptions'", ",", "base_url", "=", "self", ".", ...
94957e9dba036eae3052e2662c208b259c08399a
train
User.update
If authenticated as this user, update the information with the information provided in the parameters. :param str name: e.g., 'John Smith', not login name :param str email: e.g., 'john.smith@example.com' :param str blog: e.g., 'http://www.example.com/jsmith/blog' :param str comp...
aegea/packages/github3/users.py
def update(self, name=None, email=None, blog=None, company=None, location=None, hireable=False, bio=None): """If authenticated as this user, update the information with the information provided in the parameters. :param str name: e.g., 'John Smith', not login name :param ...
def update(self, name=None, email=None, blog=None, company=None, location=None, hireable=False, bio=None): """If authenticated as this user, update the information with the information provided in the parameters. :param str name: e.g., 'John Smith', not login name :param ...
[ "If", "authenticated", "as", "this", "user", "update", "the", "information", "with", "the", "information", "provided", "in", "the", "parameters", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/users.py#L395-L418
[ "def", "update", "(", "self", ",", "name", "=", "None", ",", "email", "=", "None", ",", "blog", "=", "None", ",", "company", "=", "None", ",", "location", "=", "None", ",", "hireable", "=", "False", ",", "bio", "=", "None", ")", ":", "user", "=",...
94957e9dba036eae3052e2662c208b259c08399a
train
Thread.delete_subscription
Delete subscription for this thread. :returns: bool
aegea/packages/github3/notifications.py
def delete_subscription(self): """Delete subscription for this thread. :returns: bool """ url = self._build_url('subscription', base_url=self._api) return self._boolean(self._delete(url), 204, 404)
def delete_subscription(self): """Delete subscription for this thread. :returns: bool """ url = self._build_url('subscription', base_url=self._api) return self._boolean(self._delete(url), 204, 404)
[ "Delete", "subscription", "for", "this", "thread", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/notifications.py#L63-L69
[ "def", "delete_subscription", "(", "self", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'subscription'", ",", "base_url", "=", "self", ".", "_api", ")", "return", "self", ".", "_boolean", "(", "self", ".", "_delete", "(", "url", ")", ",", "20...
94957e9dba036eae3052e2662c208b259c08399a
train
Thread.set_subscription
Set the user's subscription for this thread :param bool subscribed: (required), determines if notifications should be received from this thread. :param bool ignored: (required), determines if notifications should be ignored from this thread. :returns: :class:`Subscriptio...
aegea/packages/github3/notifications.py
def set_subscription(self, subscribed, ignored): """Set the user's subscription for this thread :param bool subscribed: (required), determines if notifications should be received from this thread. :param bool ignored: (required), determines if notifications should be ign...
def set_subscription(self, subscribed, ignored): """Set the user's subscription for this thread :param bool subscribed: (required), determines if notifications should be received from this thread. :param bool ignored: (required), determines if notifications should be ign...
[ "Set", "the", "user", "s", "subscription", "for", "this", "thread" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/notifications.py#L82-L94
[ "def", "set_subscription", "(", "self", ",", "subscribed", ",", "ignored", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'subscription'", ",", "base_url", "=", "self", ".", "_api", ")", "sub", "=", "{", "'subscribed'", ":", "subscribed", ",", "'...
94957e9dba036eae3052e2662c208b259c08399a
train
Thread.subscription
Checks the status of the user's subscription to this thread. :returns: :class:`Subscription <Subscription>`
aegea/packages/github3/notifications.py
def subscription(self): """Checks the status of the user's subscription to this thread. :returns: :class:`Subscription <Subscription>` """ url = self._build_url('subscription', base_url=self._api) json = self._json(self._get(url), 200) return Subscription(json, self) if ...
def subscription(self): """Checks the status of the user's subscription to this thread. :returns: :class:`Subscription <Subscription>` """ url = self._build_url('subscription', base_url=self._api) json = self._json(self._get(url), 200) return Subscription(json, self) if ...
[ "Checks", "the", "status", "of", "the", "user", "s", "subscription", "to", "this", "thread", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/notifications.py#L96-L103
[ "def", "subscription", "(", "self", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'subscription'", ",", "base_url", "=", "self", ".", "_api", ")", "json", "=", "self", ".", "_json", "(", "self", ".", "_get", "(", "url", ")", ",", "200", ")...
94957e9dba036eae3052e2662c208b259c08399a
train
Subscription.set
Set the user's subscription for this subscription :param bool subscribed: (required), determines if notifications should be received from this thread. :param bool ignored: (required), determines if notifications should be ignored from this thread.
aegea/packages/github3/notifications.py
def set(self, subscribed, ignored): """Set the user's subscription for this subscription :param bool subscribed: (required), determines if notifications should be received from this thread. :param bool ignored: (required), determines if notifications should be ignored fr...
def set(self, subscribed, ignored): """Set the user's subscription for this subscription :param bool subscribed: (required), determines if notifications should be received from this thread. :param bool ignored: (required), determines if notifications should be ignored fr...
[ "Set", "the", "user", "s", "subscription", "for", "this", "subscription" ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/notifications.py#L139-L149
[ "def", "set", "(", "self", ",", "subscribed", ",", "ignored", ")", ":", "sub", "=", "{", "'subscribed'", ":", "subscribed", ",", "'ignored'", ":", "ignored", "}", "json", "=", "self", ".", "_json", "(", "self", ".", "_put", "(", "self", ".", "_api", ...
94957e9dba036eae3052e2662c208b259c08399a
train
locate_ami
Examples:: locate_ami(product="com.ubuntu.cloud:server:16.04:amd64", channel="daily", stream="daily", region="us-west-2") locate_ami(product="Amazon Linux AMI 2016.09")
aegea/util/aws/__init__.py
def locate_ami(product, region=None, channel="releases", stream="released", root_store="ssd", virt="hvm"): """ Examples:: locate_ami(product="com.ubuntu.cloud:server:16.04:amd64", channel="daily", stream="daily", region="us-west-2") locate_ami(product="Amazon Linux AMI 2016.09") """ if r...
def locate_ami(product, region=None, channel="releases", stream="released", root_store="ssd", virt="hvm"): """ Examples:: locate_ami(product="com.ubuntu.cloud:server:16.04:amd64", channel="daily", stream="daily", region="us-west-2") locate_ami(product="Amazon Linux AMI 2016.09") """ if r...
[ "Examples", "::", "locate_ami", "(", "product", "=", "com", ".", "ubuntu", ".", "cloud", ":", "server", ":", "16", ".", "04", ":", "amd64", "channel", "=", "daily", "stream", "=", "daily", "region", "=", "us", "-", "west", "-", "2", ")", "locate_ami"...
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/util/aws/__init__.py#L30-L66
[ "def", "locate_ami", "(", "product", ",", "region", "=", "None", ",", "channel", "=", "\"releases\"", ",", "stream", "=", "\"released\"", ",", "root_store", "=", "\"ssd\"", ",", "virt", "=", "\"hvm\"", ")", ":", "if", "region", "is", "None", ":", "region...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.add_collaborator
Add ``login`` as a collaborator to a repository. :param str login: (required), login of the user :returns: bool -- True if successful, False otherwise
aegea/packages/github3/repos/repo.py
def add_collaborator(self, login): """Add ``login`` as a collaborator to a repository. :param str login: (required), login of the user :returns: bool -- True if successful, False otherwise """ resp = False if login: url = self._build_url('collaborators', logi...
def add_collaborator(self, login): """Add ``login`` as a collaborator to a repository. :param str login: (required), login of the user :returns: bool -- True if successful, False otherwise """ resp = False if login: url = self._build_url('collaborators', logi...
[ "Add", "login", "as", "a", "collaborator", "to", "a", "repository", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L302-L312
[ "def", "add_collaborator", "(", "self", ",", "login", ")", ":", "resp", "=", "False", "if", "login", ":", "url", "=", "self", ".", "_build_url", "(", "'collaborators'", ",", "login", ",", "base_url", "=", "self", ".", "_api", ")", "resp", "=", "self", ...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.archive
Get the tarball or zipball archive for this repo at ref. See: http://developer.github.com/v3/repos/contents/#get-archive-link :param str format: (required), accepted values: ('tarball', 'zipball') :param path: (optional), path where the file should be saved to, default ...
aegea/packages/github3/repos/repo.py
def archive(self, format, path='', ref='master'): """Get the tarball or zipball archive for this repo at ref. See: http://developer.github.com/v3/repos/contents/#get-archive-link :param str format: (required), accepted values: ('tarball', 'zipball') :param path: (optional),...
def archive(self, format, path='', ref='master'): """Get the tarball or zipball archive for this repo at ref. See: http://developer.github.com/v3/repos/contents/#get-archive-link :param str format: (required), accepted values: ('tarball', 'zipball') :param path: (optional),...
[ "Get", "the", "tarball", "or", "zipball", "archive", "for", "this", "repo", "at", "ref", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L314-L338
[ "def", "archive", "(", "self", ",", "format", ",", "path", "=", "''", ",", "ref", "=", "'master'", ")", ":", "resp", "=", "None", "if", "format", "in", "(", "'tarball'", ",", "'zipball'", ")", ":", "url", "=", "self", ".", "_build_url", "(", "forma...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.asset
Returns a single Asset. :param int id: (required), id of the asset :returns: :class:`Asset <github3.repos.release.Asset>`
aegea/packages/github3/repos/repo.py
def asset(self, id): """Returns a single Asset. :param int id: (required), id of the asset :returns: :class:`Asset <github3.repos.release.Asset>` """ data = None if int(id) > 0: url = self._build_url('releases', 'assets', str(id), ...
def asset(self, id): """Returns a single Asset. :param int id: (required), id of the asset :returns: :class:`Asset <github3.repos.release.Asset>` """ data = None if int(id) > 0: url = self._build_url('releases', 'assets', str(id), ...
[ "Returns", "a", "single", "Asset", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L340-L352
[ "def", "asset", "(", "self", ",", "id", ")", ":", "data", "=", "None", "if", "int", "(", "id", ")", ">", "0", ":", "url", "=", "self", ".", "_build_url", "(", "'releases'", ",", "'assets'", ",", "str", "(", "id", ")", ",", "base_url", "=", "sel...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.blob
Get the blob indicated by ``sha``. :param str sha: (required), sha of the blob :returns: :class:`Blob <github3.git.Blob>` if successful, otherwise None
aegea/packages/github3/repos/repo.py
def blob(self, sha): """Get the blob indicated by ``sha``. :param str sha: (required), sha of the blob :returns: :class:`Blob <github3.git.Blob>` if successful, otherwise None """ url = self._build_url('git', 'blobs', sha, base_url=self._api) json = self._jso...
def blob(self, sha): """Get the blob indicated by ``sha``. :param str sha: (required), sha of the blob :returns: :class:`Blob <github3.git.Blob>` if successful, otherwise None """ url = self._build_url('git', 'blobs', sha, base_url=self._api) json = self._jso...
[ "Get", "the", "blob", "indicated", "by", "sha", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L354-L363
[ "def", "blob", "(", "self", ",", "sha", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'git'", ",", "'blobs'", ",", "sha", ",", "base_url", "=", "self", ".", "_api", ")", "json", "=", "self", ".", "_json", "(", "self", ".", "_get", "(", ...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.branch
Get the branch ``name`` of this repository. :param str name: (required), branch name :type name: str :returns: :class:`Branch <github3.repos.branch.Branch>`
aegea/packages/github3/repos/repo.py
def branch(self, name): """Get the branch ``name`` of this repository. :param str name: (required), branch name :type name: str :returns: :class:`Branch <github3.repos.branch.Branch>` """ json = None if name: url = self._build_url('branches', name, ba...
def branch(self, name): """Get the branch ``name`` of this repository. :param str name: (required), branch name :type name: str :returns: :class:`Branch <github3.repos.branch.Branch>` """ json = None if name: url = self._build_url('branches', name, ba...
[ "Get", "the", "branch", "name", "of", "this", "repository", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L365-L376
[ "def", "branch", "(", "self", ",", "name", ")", ":", "json", "=", "None", "if", "name", ":", "url", "=", "self", ".", "_build_url", "(", "'branches'", ",", "name", ",", "base_url", "=", "self", ".", "_api", ")", "json", "=", "self", ".", "_json", ...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.commit
Get a single (repo) commit. See :func:`git_commit` for the Git Data Commit. :param str sha: (required), sha of the commit :returns: :class:`RepoCommit <github3.repos.commit.RepoCommit>` if successful, otherwise None
aegea/packages/github3/repos/repo.py
def commit(self, sha): """Get a single (repo) commit. See :func:`git_commit` for the Git Data Commit. :param str sha: (required), sha of the commit :returns: :class:`RepoCommit <github3.repos.commit.RepoCommit>` if successful, otherwise None """ url = self._b...
def commit(self, sha): """Get a single (repo) commit. See :func:`git_commit` for the Git Data Commit. :param str sha: (required), sha of the commit :returns: :class:`RepoCommit <github3.repos.commit.RepoCommit>` if successful, otherwise None """ url = self._b...
[ "Get", "a", "single", "(", "repo", ")", "commit", ".", "See", ":", "func", ":", "git_commit", "for", "the", "Git", "Data", "Commit", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L378-L388
[ "def", "commit", "(", "self", ",", "sha", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'commits'", ",", "sha", ",", "base_url", "=", "self", ".", "_api", ")", "json", "=", "self", ".", "_json", "(", "self", ".", "_get", "(", "url", ")",...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.commit_comment
Get a single commit comment. :param int comment_id: (required), id of the comment used by GitHub :returns: :class:`RepoComment <github3.repos.comment.RepoComment>` if successful, otherwise None
aegea/packages/github3/repos/repo.py
def commit_comment(self, comment_id): """Get a single commit comment. :param int comment_id: (required), id of the comment used by GitHub :returns: :class:`RepoComment <github3.repos.comment.RepoComment>` if successful, otherwise None """ url = self._build_url('comme...
def commit_comment(self, comment_id): """Get a single commit comment. :param int comment_id: (required), id of the comment used by GitHub :returns: :class:`RepoComment <github3.repos.comment.RepoComment>` if successful, otherwise None """ url = self._build_url('comme...
[ "Get", "a", "single", "commit", "comment", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L390-L399
[ "def", "commit_comment", "(", "self", ",", "comment_id", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'comments'", ",", "str", "(", "comment_id", ")", ",", "base_url", "=", "self", ".", "_api", ")", "json", "=", "self", ".", "_json", "(", "...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.compare_commits
Compare two commits. :param str base: (required), base for the comparison :param str head: (required), compare this against base :returns: :class:`Comparison <github3.repos.comparison.Comparison>` if successful, else None
aegea/packages/github3/repos/repo.py
def compare_commits(self, base, head): """Compare two commits. :param str base: (required), base for the comparison :param str head: (required), compare this against base :returns: :class:`Comparison <github3.repos.comparison.Comparison>` if successful, else None """...
def compare_commits(self, base, head): """Compare two commits. :param str base: (required), base for the comparison :param str head: (required), compare this against base :returns: :class:`Comparison <github3.repos.comparison.Comparison>` if successful, else None """...
[ "Compare", "two", "commits", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L401-L412
[ "def", "compare_commits", "(", "self", ",", "base", ",", "head", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'compare'", ",", "base", "+", "'...'", "+", "head", ",", "base_url", "=", "self", ".", "_api", ")", "json", "=", "self", ".", "_...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.contents
Get the contents of the file pointed to by ``path``. If the path provided is actually a directory, you will receive a dictionary back of the form:: { 'filename.md': Contents(), # Where Contents an instance 'github.py': Contents(), } :pa...
aegea/packages/github3/repos/repo.py
def contents(self, path, ref=None): """Get the contents of the file pointed to by ``path``. If the path provided is actually a directory, you will receive a dictionary back of the form:: { 'filename.md': Contents(), # Where Contents an instance 'git...
def contents(self, path, ref=None): """Get the contents of the file pointed to by ``path``. If the path provided is actually a directory, you will receive a dictionary back of the form:: { 'filename.md': Contents(), # Where Contents an instance 'git...
[ "Get", "the", "contents", "of", "the", "file", "pointed", "to", "by", "path", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L414-L438
[ "def", "contents", "(", "self", ",", "path", ",", "ref", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'contents'", ",", "path", ",", "base_url", "=", "self", ".", "_api", ")", "json", "=", "self", ".", "_json", "(", "self", ...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.create_blob
Create a blob with ``content``. :param str content: (required), content of the blob :param str encoding: (required), ('base64', 'utf-8') :returns: string of the SHA returned
aegea/packages/github3/repos/repo.py
def create_blob(self, content, encoding): """Create a blob with ``content``. :param str content: (required), content of the blob :param str encoding: (required), ('base64', 'utf-8') :returns: string of the SHA returned """ sha = '' if encoding in ('base64', 'utf-...
def create_blob(self, content, encoding): """Create a blob with ``content``. :param str content: (required), content of the blob :param str encoding: (required), ('base64', 'utf-8') :returns: string of the SHA returned """ sha = '' if encoding in ('base64', 'utf-...
[ "Create", "a", "blob", "with", "content", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L441-L455
[ "def", "create_blob", "(", "self", ",", "content", ",", "encoding", ")", ":", "sha", "=", "''", "if", "encoding", "in", "(", "'base64'", ",", "'utf-8'", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'git'", ",", "'blobs'", ",", "base_url", "...
94957e9dba036eae3052e2662c208b259c08399a
train
Repository.create_comment
Create a comment on a commit. :param str body: (required), body of the message :param str sha: (required), commit id :param str path: (optional), relative path of the file to comment on :param str position: (optional), line index in the diff to comment on :param int ...
aegea/packages/github3/repos/repo.py
def create_comment(self, body, sha, path=None, position=None, line=1): """Create a comment on a commit. :param str body: (required), body of the message :param str sha: (required), commit id :param str path: (optional), relative path of the file to comment on :param ...
def create_comment(self, body, sha, path=None, position=None, line=1): """Create a comment on a commit. :param str body: (required), body of the message :param str sha: (required), commit id :param str path: (optional), relative path of the file to comment on :param ...
[ "Create", "a", "comment", "on", "a", "commit", "." ]
kislyuk/aegea
python
https://github.com/kislyuk/aegea/blob/94957e9dba036eae3052e2662c208b259c08399a/aegea/packages/github3/repos/repo.py#L458-L480
[ "def", "create_comment", "(", "self", ",", "body", ",", "sha", ",", "path", "=", "None", ",", "position", "=", "None", ",", "line", "=", "1", ")", ":", "json", "=", "None", "if", "body", "and", "sha", "and", "(", "line", "and", "int", "(", "line"...
94957e9dba036eae3052e2662c208b259c08399a