text stringlengths 81 112k |
|---|
Propagate a virtual loss up to the root node.
Args:
up_to: The node to propagate until. (Keep track of this! You'll
need it to reverse the virtual loss later.)
def add_virtual_loss(self, up_to):
"""Propagate a virtual loss up to the root node.
Args:
up_... |
Propagates a value estimation up to the root node.
Args:
value: the value to be propagated (1 = black wins, -1 = white wins)
up_to: the node to propagate until.
def backup_value(self, value, up_to):
"""Propagates a value estimation up to the root node.
Args:
... |
True if the last two moves were Pass or if the position is at a move
greater than the max depth.
def is_done(self):
"""True if the last two moves were Pass or if the position is at a move
greater than the max depth."""
return self.position.is_game_over() or self.position.n >= FLAGS.max_... |
Returns the child visit counts as a probability distribution, pi
If squash is true, exponentiate the probabilities by a temperature
slightly larger than unity to encourage diversity in early play and
hopefully to move away from 3-3s
def children_as_pi(self, squash=False):
"""Returns the... |
Returns most visited path in go-gui VAR format e.g. 'b r3 w c17...
def mvp_gg(self):
""" Returns most visited path in go-gui VAR format e.g. 'b r3 w c17..."""
output = []
for node in self.most_visited_path_nodes():
if max(node.child_N) <= 1:
break
output.... |
Convert a list of command arguments to types specified by the handler.
Args:
handler: a command handler function.
args: the list of string arguments to pass to handler.
Returns:
A new list containing `args` that have been converted to the expected type
for `handler`. For each function ... |
Registers a new command handler object.
All methods on `handler_obj` whose name starts with "cmd_" are
registered as a GTP command. For example, the method cmd_genmove will
be invoked when the engine receives a genmove command.
Args:
handler_obj: the handler object to registe... |
Pad x and y so that the results have the same length (second dimension).
def _pad_tensors_to_same_length(x, y):
"""Pad x and y so that the results have the same length (second dimension)."""
with tf.name_scope("pad_to_same_length"):
x_length = tf.shape(x)[1]
y_length = tf.shape(y)[1]
max_length = tf.m... |
Calculate cross entropy loss while ignoring padding.
Args:
logits: Tensor of size [batch_size, length_logits, vocab_size]
labels: Tensor of size [batch_size, length_labels]
smoothing: Label smoothing constant, used to determine the on and off values
vocab_size: int size of the vocabulary
Returns:
... |
Wrap a metric fn that returns scores and weights as an eval metric fn.
The input metric_fn returns values for the current batch. The wrapper
aggregates the return values collected over all of the batches evaluated.
Args:
metric_fn: function that returns scores and weights for the current batch's
logit... |
Return dictionary of model evaluation metrics.
def get_eval_metrics(logits, labels, params):
"""Return dictionary of model evaluation metrics."""
metrics = {
"accuracy": _convert_to_eval_metric(padded_accuracy)(logits, labels),
"accuracy_top5": _convert_to_eval_metric(padded_accuracy_top5)(
l... |
Percentage of times that predictions matches labels on non-0s.
def padded_accuracy(logits, labels):
"""Percentage of times that predictions matches labels on non-0s."""
with tf.variable_scope("padded_accuracy", values=[logits, labels]):
logits, labels = _pad_tensors_to_same_length(logits, labels)
weights =... |
Percentage of times that top-k predictions matches labels on non-0s.
def padded_accuracy_topk(logits, labels, k):
"""Percentage of times that top-k predictions matches labels on non-0s."""
with tf.variable_scope("padded_accuracy_topk", values=[logits, labels]):
logits, labels = _pad_tensors_to_same_length(logi... |
Percentage of times that predictions matches labels everywhere (non-0).
def padded_sequence_accuracy(logits, labels):
"""Percentage of times that predictions matches labels everywhere (non-0)."""
with tf.variable_scope("padded_sequence_accuracy", values=[logits, labels]):
logits, labels = _pad_tensors_to_same_... |
Average log-perplexity excluding padding 0s. No smoothing.
def padded_neg_log_perplexity(logits, labels, vocab_size):
"""Average log-perplexity excluding padding 0s. No smoothing."""
num, den = padded_cross_entropy_loss(logits, labels, 0, vocab_size)
return -num, den |
Approximate BLEU score computation between labels and predictions.
An approximate BLEU scoring method since we do not glue word pieces or
decode the ids and tokenize the output. By default, we use ngram order of 4
and use brevity penalty. Also, this does not have beam search.
Args:
logits: Tensor of size ... |
Extracts all n-grams up to a given maximum order from an input segment.
Args:
segment: text segment from which n-grams will be extracted.
max_order: maximum length in tokens of the n-grams returned by this
methods.
Returns:
The Counter containing all n-grams upto max_order in segment
with ... |
Computes BLEU score of translated segments against one or more references.
Args:
reference_corpus: list of references for each translation. Each
reference should be tokenized into a list of tokens.
translation_corpus: list of translations to score. Each translation
should be tokenized into a ... |
ROUGE-2 F1 score computation between labels and predictions.
This is an approximate ROUGE scoring method since we do not glue word pieces
or decode the ids and tokenize the output.
Args:
logits: tensor, model predictions
labels: tensor, gold output.
Returns:
rouge2_fscore: approx rouge-2 f1 score... |
Computes ROUGE-N f1 score of two text collections of sentences.
Source: https://www.microsoft.com/en-us/research/publication/
rouge-a-package-for-automatic-evaluation-of-summaries/
Args:
eval_sentences: Predicted sentences.
ref_sentences: Sentences from the reference set
n: Size of ngram. Defaults ... |
ROUGE scores computation between labels and predictions.
This is an approximate ROUGE scoring method since we do not glue word pieces
or decode the ids and tokenize the output.
Args:
predictions: tensor, model predictions
labels: tensor, gold output.
Returns:
rouge_l_fscore: approx rouge-l f1 sco... |
Helper function parsing the command line options
@retval ArgumentParser
def parse_args():
"""
Helper function parsing the command line options
@retval ArgumentParser
"""
parser = ArgumentParser(description="PyTorch distributed training launch "
"helper ut... |
Extract files from downloaded compressed archive file.
Args:
path: string directory where the files will be downloaded
url: url containing the compressed input and target files
input_filename: name of file containing data in source language
target_filename: name of file containing data in target lang... |
Obtain training and evaluation data for the Transformer model.
def main(unused_argv):
"""Obtain training and evaluation data for the Transformer model."""
make_dir(FLAGS.raw_dir)
make_dir(FLAGS.data_dir)
# Get paths of download/extracted training and evaluation files.
print("Step 1/4: Downloading data from ... |
Resign Threshold: -0.88
-0.0662
D4 (100) ==> D16 (14) ==> Q16 (3) ==> Q4 (1) ==> Q: -0.07149
move: action Q U P P-Dir N soft-N p-delta p-rel
D4 : -0.028, -0.048, 0.020, 0.048, 0.064, 100 0.1096 0.06127 1.27
D16 : -0.024, -0.043, 0.019, 0.044, 0.059, 96 0.1053 0.06135 1.40
def parse_comment_node(com... |
This method performs the positive/negative sampling, and return
the sampled proposals.
Note: this function keeps a state.
Arguments:
proposals (list[BoxList])
targets (list[BoxList])
def subsample(self, proposals, targets):
"""
This method performs the p... |
Execute the encoder.
:param inputs: tensor with indices from the vocabulary
:param lengths: vector with sequence lengths (excluding padding)
returns: tensor with encoded sequences
def forward(self, inputs, lengths):
"""
Execute the encoder.
:param inputs: tensor with ... |
Run the given subprocess command in a coroutine.
Args:
*cmd: the command to run and its arguments.
Returns:
The output that the command wrote to stdout.
Raises:
RuntimeError: if the command returns a non-zero result.
async def checked_run(*cmd):
"""Run the given subprocess command in a coroutine... |
Waits for all of the awaitable objects (e.g. coroutines) in aws to finish.
All the awaitable objects are waited for, even if one of them raises an
exception. When one or more awaitable raises an exception, the exception from
the awaitable with the lowest index in the aws list will be reraised.
Args:
aws: ... |
Return a list of (name, path) tuples of direct subdirectories of
parent_path, where each tuple corresponds to one subdirectory. Files
in the parent_path are excluded from the output.
def get_subdirs(parent_path):
"""Return a list of (name, path) tuples of direct subdirectories of
parent_path, where eac... |
Arguments:
x (list[Tensor]): feature maps for each level
boxes (list[BoxList]): boxes to be used to perform the pooling operation.
Returns:
result (Tensor)
def forward(self, x, boxes):
"""
Arguments:
x (list[Tensor]): feature maps for each level
... |
Changes tempo and gain of the recording with sox and loads it.
def augment_audio_with_sox(path, sample_rate, tempo, gain):
"""
Changes tempo and gain of the recording with sox and loads it.
"""
with NamedTemporaryFile(suffix=".wav") as augmented_file:
augmented_filename = augmented_file.name
... |
Picks tempo and gain uniformly, applies it to the utterance by using sox utility.
Returns the augmented utterance.
def load_randomly_augmented_audio(path, sample_rate=16000, tempo_range=(0.85, 1.15),
gain_range=(-6, 8)):
"""
Picks tempo and gain uniformly, applies it to th... |
Defines how to train, evaluate and predict from the transformer model.
def model_fn(features, labels, mode, params):
"""Defines how to train, evaluate and predict from the transformer model."""
with tf.variable_scope("model"):
inputs, targets = features, labels
# Create model and get output logits.
mo... |
Calculate learning rate with linear warmup and rsqrt decay.
def get_learning_rate(learning_rate, hidden_size, learning_rate_warmup_steps):
"""Calculate learning rate with linear warmup and rsqrt decay."""
with tf.name_scope("learning_rate"):
warmup_steps = tf.to_float(learning_rate_warmup_steps)
step = tf.... |
Generate training operation that updates variables based on loss.
def get_train_op(loss, params):
"""Generate training operation that updates variables based on loss."""
with tf.variable_scope("get_train_op"):
mlperf_log.transformer_print(
key=mlperf_log.OPT_LR_WARMUP_STEPS,
value=params.learni... |
Translate file and report the cased and uncased bleu scores.
def translate_and_compute_bleu(estimator, subtokenizer, bleu_source, bleu_ref):
"""Translate file and report the cased and uncased bleu scores."""
# Create temporary file to store translation.
tmp = tempfile.NamedTemporaryFile(delete=False)
tmp_filen... |
Calculate and record the BLEU score.
def evaluate_and_log_bleu(estimator, bleu_writer, bleu_source, bleu_ref):
"""Calculate and record the BLEU score."""
subtokenizer = tokenizer.Subtokenizer(
os.path.join(FLAGS.data_dir, FLAGS.vocab_file))
uncased_score, cased_score = translate_and_compute_bleu(
es... |
Train and evaluate model, and optionally compute model's BLEU score.
**Step vs. Epoch vs. Iteration**
Steps and epochs are canonical terms used in TensorFlow and general machine
learning. They are used to describe running a single process (train/eval):
- Step refers to running the process through a single o... |
:calls: `PUT /teams/:id/memberships/:user <http://developer.github.com/v3/orgs/teams>`_
:param member: :class:`github.Nameduser.NamedUser`
:param role: string
:rtype: None
def add_membership(self, member, role=github.GithubObject.NotSet):
"""
:calls: `PUT /teams/:id/memberships/... |
:calls: `PUT /teams/:id/repos/:org/:repo <http://developer.github.com/v3/orgs/teams>`_
:param repo: :class:`github.Repository.Repository`
:rtype: None
def add_to_repos(self, repo):
"""
:calls: `PUT /teams/:id/repos/:org/:repo <http://developer.github.com/v3/orgs/teams>`_
:param ... |
:calls: `PUT /teams/:id/repos/:org/:repo <http://developer.github.com/v3/orgs/teams>`_
:param repo: :class:`github.Repository.Repository`
:param permission: string
:rtype: None
def set_repo_permission(self, repo, permission):
"""
:calls: `PUT /teams/:id/repos/:org/:repo <http://... |
:calls: `PATCH /teams/:id <http://developer.github.com/v3/orgs/teams>`_
:param name: string
:param description: string
:param permission: string
:param privacy: string
:rtype: None
def edit(self, name, description=github.GithubObject.NotSet, permission=github.GithubObject.NotSet... |
:calls: `GET /teams/:id/members <https://developer.github.com/v3/teams/members/#list-team-members>`_
:param role: string
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
def get_members(self, role=github.GithubObject.NotSet):
"""
:calls: `GET /t... |
:calls: `GET /teams/:id/repos <http://developer.github.com/v3/orgs/teams>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
def get_repos(self):
"""
:calls: `GET /teams/:id/repos <http://developer.github.com/v3/orgs/teams>`_
:rtype: :class:`g... |
:calls: `GET /teams/:id/members/:user <http://developer.github.com/v3/orgs/teams>`_
:param member: :class:`github.NamedUser.NamedUser`
:rtype: bool
def has_in_members(self, member):
"""
:calls: `GET /teams/:id/members/:user <http://developer.github.com/v3/orgs/teams>`_
:param me... |
:calls: `GET /teams/:id/repos/:owner/:repo <http://developer.github.com/v3/orgs/teams>`_
:param repo: :class:`github.Repository.Repository`
:rtype: bool
def has_in_repos(self, repo):
"""
:calls: `GET /teams/:id/repos/:owner/:repo <http://developer.github.com/v3/orgs/teams>`_
:pa... |
Initialize a debug frame with requestHeader
Frame count is updated and will be attached to respond header
The structure of a frame: [requestHeader, statusCode, responseHeader, raw_data]
Some of them may be None
def NEW_DEBUG_FRAME(self, requestHeader):
"""
Initialize a debug fra... |
Update current frame with response
Current frame index will be attached to responseHeader
def DEBUG_ON_RESPONSE(self, statusCode, responseHeader, data):
'''
Update current frame with response
Current frame index will be attached to responseHeader
'''
if self.DEBUG_FLAG: ... |
:calls: `GET /repos/:owner/:repo/issues/:number <http://developer.github.com/v3/issues>`_
:rtype: :class:`github.Issue.Issue`
def as_issue(self):
"""
:calls: `GET /repos/:owner/:repo/issues/:number <http://developer.github.com/v3/issues>`_
:rtype: :class:`github.Issue.Issue`
"""... |
:calls: `POST /repos/:owner/:repo/pulls/:number/comments <http://developer.github.com/v3/pulls/comments>`_
:param body: string
:param commit_id: :class:`github.Commit.Commit`
:param path: string
:param position: integer
:rtype: :class:`github.PullRequestComment.PullRequestComment... |
:calls: `POST /repos/:owner/:repo/pulls/:number/comments <http://developer.github.com/v3/pulls/comments>`_
:param body: string
:param commit_id: :class:`github.Commit.Commit`
:param path: string
:param position: integer
:rtype: :class:`github.PullRequestComment.PullRequestComment... |
:calls: `POST /repos/:owner/:repo/issues/:number/comments <http://developer.github.com/v3/issues/comments>`_
:param body: string
:rtype: :class:`github.IssueComment.IssueComment`
def create_issue_comment(self, body):
"""
:calls: `POST /repos/:owner/:repo/issues/:number/comments <http://... |
:calls: `POST /repos/:owner/:repo/pulls/:number/reviews <https://developer.github.com/v3/pulls/reviews/>`_
:param commit: github.Commit.Commit
:param body: string
:param event: string
:param comments: list
:rtype: :class:`github.PullRequestReview.PullRequestReview`
def create_re... |
:calls: `DELETE /repos/:owner/:repo/pulls/:number/requested_reviewers <https://developer.github.com/v3/pulls/review_requests/>`_
:param reviewers: list of strings
:param team_reviewers: list of strings
:rtype: None
def delete_review_request(self, reviewers=github.GithubObject.NotSet, team_revie... |
:calls: `PATCH /repos/:owner/:repo/pulls/:number <http://developer.github.com/v3/pulls>`_
:param title: string
:param body: string
:param state: string
:param base: string
:rtype: None
def edit(self, title=github.GithubObject.NotSet, body=github.GithubObject.NotSet, state=github... |
:calls: `GET /repos/:owner/:repo/pulls/comments/:number <http://developer.github.com/v3/pulls/comments>`_
:param id: integer
:rtype: :class:`github.PullRequestComment.PullRequestComment`
def get_review_comment(self, id):
"""
:calls: `GET /repos/:owner/:repo/pulls/comments/:number <http:... |
:calls: `GET /repos/:owner/:repo/pulls/:number/comments <http://developer.github.com/v3/pulls/comments>`_
:param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment`
def get_review_comments(self... |
:calls: `GET /repos/:owner/:repo/pulls/:number/review/:id/comments <https://developer.github.com/v3/pulls/reviews/>`_
:param id: integer
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment`
def get_single_review_comments(self, id):
"""
... |
:calls: `GET /repos/:owner/:repo/pulls/:number/commits <http://developer.github.com/v3/pulls>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Commit.Commit`
def get_commits(self):
"""
:calls: `GET /repos/:owner/:repo/pulls/:number/commits <http://developer.github.com/v3/... |
:calls: `GET /repos/:owner/:repo/pulls/:number/files <http://developer.github.com/v3/pulls>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.File.File`
def get_files(self):
"""
:calls: `GET /repos/:owner/:repo/pulls/:number/files <http://developer.github.com/v3/pulls>`_
... |
:calls: `GET /repos/:owner/:repo/issues/comments/:id <http://developer.github.com/v3/issues/comments>`_
:param id: integer
:rtype: :class:`github.IssueComment.IssueComment`
def get_issue_comment(self, id):
"""
:calls: `GET /repos/:owner/:repo/issues/comments/:id <http://developer.github... |
:calls: `GET /repos/:owner/:repo/issues/:number/comments <http://developer.github.com/v3/issues/comments>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueComment.IssueComment`
def get_issue_comments(self):
"""
:calls: `GET /repos/:owner/:repo/issues/:number/comments... |
:calls: `GET /repos/:owner/:repo/pulls/:number/reviews/:id <https://developer.github.com/v3/pulls/reviews>`_
:param id: integer
:rtype: :class:`github.PullRequestReview.PullRequestReview`
def get_review(self, id):
"""
:calls: `GET /repos/:owner/:repo/pulls/:number/reviews/:id <https://d... |
:calls: `GET /repos/:owner/:repo/pulls/:number/reviews <https://developer.github.com/v3/pulls/reviews/>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestReview.PullRequestReview`
def get_reviews(self):
"""
:calls: `GET /repos/:owner/:repo/pulls/:number/reviews ... |
:calls: `GET /repos/:owner/:repo/pulls/:number/requested_reviewers <https://developer.github.com/v3/pulls/review_requests/>`_
:rtype: tuple of :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` and of :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
def g... |
:calls: `GET /repos/:owner/:repo/issues/:number/labels <http://developer.github.com/v3/issues/labels>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label`
def get_labels(self):
"""
:calls: `GET /repos/:owner/:repo/issues/:number/labels <http://developer.github.co... |
:calls: `DELETE /repos/:owner/:repo/issues/:number/labels/:name <http://developer.github.com/v3/issues/labels>`_
:param label: :class:`github.Label.Label` or string
:rtype: None
def remove_from_labels(self, label):
"""
:calls: `DELETE /repos/:owner/:repo/issues/:number/labels/:name <htt... |
:calls: `PUT /repos/:owner/:repo/issues/:number/labels <http://developer.github.com/v3/issues/labels>`_
:param labels: list of :class:`github.Label.Label` or strings
:rtype: None
def set_labels(self, *labels):
"""
:calls: `PUT /repos/:owner/:repo/issues/:number/labels <http://developer.... |
:calls: `GET /repos/:owner/:repo/pulls/:number/merge <http://developer.github.com/v3/pulls>`_
:rtype: bool
def is_merged(self):
"""
:calls: `GET /repos/:owner/:repo/pulls/:number/merge <http://developer.github.com/v3/pulls>`_
:rtype: bool
"""
status, headers, data = self... |
:calls: `PUT /repos/:owner/:repo/pulls/:number/merge <http://developer.github.com/v3/pulls>`_
:param commit_message: string
:rtype: :class:`github.PullRequestMergeStatus.PullRequestMergeStatus`
def merge(self, commit_message=github.GithubObject.NotSet, commit_title=github.GithubObject.NotSet, merge_met... |
:type: :class:`github.Repository.Repository`
def repository(self):
"""
:type: :class:`github.Repository.Repository`
"""
self._completeIfNotSet(self._repository)
if self._repository is github.GithubObject.NotSet:
# The repository was not set automatically, so it must ... |
:calls: `GET /repos/:owner/:repo/pulls/:number <http://developer.github.com/v3/pulls>`_
:rtype: :class:`github.PullRequest.PullRequest`
def as_pull_request(self):
"""
:calls: `GET /repos/:owner/:repo/pulls/:number <http://developer.github.com/v3/pulls>`_
:rtype: :class:`github.PullReque... |
:calls: `POST /repos/:owner/:repo/issues/:number/assignees <https://developer.github.com/v3/issues/assignees>`_
:param assignee: :class:`github.NamedUser.NamedUser` or string
:rtype: None
def add_to_assignees(self, *assignees):
"""
:calls: `POST /repos/:owner/:repo/issues/:number/assign... |
:calls: `POST /repos/:owner/:repo/issues/:number/comments <http://developer.github.com/v3/issues/comments>`_
:param body: string
:rtype: :class:`github.IssueComment.IssueComment`
def create_comment(self, body):
"""
:calls: `POST /repos/:owner/:repo/issues/:number/comments <http://develo... |
:calls: `PATCH /repos/:owner/:repo/issues/:number <http://developer.github.com/v3/issues>`_
:param title: string
:param body: string
:param assignee: string or :class:`github.NamedUser.NamedUser` or None
:param assignees: list (of string or :class:`github.NamedUser.NamedUser`)
:p... |
:calls: `GET /repos/:owner/:repo/issues/:number/comments <http://developer.github.com/v3/issues/comments>`_
:param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueComment.IssueComment`
def get_comments(self, since=github.Gi... |
:calls: `GET /repos/:owner/:repo/issues/:issue_number/events <http://developer.github.com/v3/issues/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent`
def get_events(self):
"""
:calls: `GET /repos/:owner/:repo/issues/:issue_number/events <http... |
:calls: `GET /repos/:owner/:repo/issues/:number/labels <http://developer.github.com/v3/issues/labels>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label`
def get_labels(self):
"""
:calls: `GET /repos/:owner/:repo/issues/:number/labels <http://developer.github.co... |
:calls: `GET /repos/:owner/:repo/issues/:number/reactions <https://developer.github.com/v3/reactions/#list-reactions-for-an-issue>`_
:return: :class: :class:`github.PaginatedList.PaginatedList` of :class:`github.Reaction.Reaction`
def get_reactions(self):
"""
:calls: `GET /repos/:owner/:repo/is... |
:calls: `POST /repos/:owner/:repo/issues/:number/reactions <https://developer.github.com/v3/reactions>`_
:param reaction_type: string
:rtype: :class:`github.Reaction.Reaction`
def create_reaction(self, reaction_type):
"""
:calls: `POST /repos/:owner/:repo/issues/:number/reactions <https... |
:calls: `PATCH /repos/:owner/:repo/milestones/:number <http://developer.github.com/v3/issues/milestones>`_
:param title: string
:param state: string
:param description: string
:param due_on: date
:rtype: None
def edit(self, title, state=github.GithubObject.NotSet, description=gi... |
:calls: `PUT /orgs/:org/public_members/:user <http://developer.github.com/v3/orgs/members>`_
:param public_member: :class:`github.NamedUser.NamedUser`
:rtype: None
def add_to_public_members(self, public_member):
"""
:calls: `PUT /orgs/:org/public_members/:user <http://developer.github.c... |
:calls: `POST /repos/:owner/:repo/forks <http://developer.github.com/v3/repos/forks>`_
:param repo: :class:`github.Repository.Repository`
:rtype: :class:`github.Repository.Repository`
def create_fork(self, repo):
"""
:calls: `POST /repos/:owner/:repo/forks <http://developer.github.com/v... |
:calls: `POST /orgs/:owner/hooks <http://developer.github.com/v3/orgs/hooks>`_
:param name: string
:param config: dict
:param events: list of string
:param active: bool
:rtype: :class:`github.Hook.Hook`
def create_hook(self, name, config, events=github.GithubObject.NotSet, activ... |
:calls: `POST /orgs/:org/teams <http://developer.github.com/v3/orgs/teams>`_
:param name: string
:param repo_names: list of :class:`github.Repository.Repository`
:param permission: string
:param privacy: string
:rtype: :class:`github.Team.Team`
def create_team(self, name, repo_n... |
:calls: `DELETE /orgs/:owner/hooks/:id <http://developer.github.com/v3/orgs/hooks>`_
:param id: integer
:rtype: None`
def delete_hook(self, id):
"""
:calls: `DELETE /orgs/:owner/hooks/:id <http://developer.github.com/v3/orgs/hooks>`_
:param id: integer
:rtype: None`
... |
:calls: `PATCH /orgs/:org <http://developer.github.com/v3/orgs>`_
:param billing_email: string
:param blog: string
:param company: string
:param description: string
:param email: string
:param location: string
:param name: string
:rtype: None
def edit(sel... |
:calls: `GET /orgs/:org/events <http://developer.github.com/v3/activity/events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
def get_events(self):
"""
:calls: `GET /orgs/:org/events <http://developer.github.com/v3/activity/events>`_
:rtype: :class... |
:calls: `GET /orgs/:owner/hooks/:id <http://developer.github.com/v3/orgs/hooks>`_
:param id: integer
:rtype: :class:`github.Hook.Hook`
def get_hook(self, id):
"""
:calls: `GET /orgs/:owner/hooks/:id <http://developer.github.com/v3/orgs/hooks>`_
:param id: integer
:rtype:... |
:calls: `GET /orgs/:owner/hooks <http://developer.github.com/v3/orgs/hooks>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Hook.Hook`
def get_hooks(self):
"""
:calls: `GET /orgs/:owner/hooks <http://developer.github.com/v3/orgs/hooks>`_
:rtype: :class:`github.Pa... |
:calls: `GET /orgs/:org/members <http://developer.github.com/v3/orgs/members>`_
:param filter_: string
:param role: string
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
def get_members(self, filter_=github.GithubObject.NotSet,
rol... |
:calls: `GET /orgs/:org/projects <https://developer.github.com/v3/projects/#list-organization-projects>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Project.Project`
:param state: string
def get_projects(self, state=github.GithubObject.NotSet):
"""
:calls: `GE... |
:calls: `GET /orgs/:org/public_members <http://developer.github.com/v3/orgs/members>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
def get_public_members(self):
"""
:calls: `GET /orgs/:org/public_members <http://developer.github.com/v3/orgs/members... |
:calls: `GET /orgs/:org/outside_collaborators <http://developer.github.com/v3/orgs/outside_collaborators>`_
:param filter_: string
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
def get_outside_collaborators(self, filter_=github.GithubObject.NotSet):
... |
:calls: `DELETE /orgs/:org/outside_collaborators/:username <https://developer.github.com/v3/orgs/outside_collaborators>`_
:param collaborator: :class:`github.NamedUser.NamedUser`
:rtype: None
def remove_outside_collaborator(self, collaborator):
"""
:calls: `DELETE /orgs/:org/outside_col... |
:calls: `PUT /orgs/:org/outside_collaborators/:username <https://developer.github.com/v3/orgs/outside_collaborators>`_
:param member: :class:`github.NamedUser.NamedUser`
:rtype: None
def convert_to_outside_collaborator(self, member):
"""
:calls: `PUT /orgs/:org/outside_collaborators/:us... |
:calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_
:param name: string
:rtype: :class:`github.Repository.Repository`
def get_repo(self, name):
"""
:calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_
:param name: string
:rtype:... |
:calls: `GET /orgs/:org/repos <http://developer.github.com/v3/repos>`_
:param type: string ('all', 'public', 'private', 'forks', 'sources', 'member')
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
def get_repos(self, type=github.GithubObject.NotSet):
... |
:calls: `GET /teams/:id <http://developer.github.com/v3/orgs/teams>`_
:param id: integer
:rtype: :class:`github.Team.Team`
def get_team(self, id):
"""
:calls: `GET /teams/:id <http://developer.github.com/v3/orgs/teams>`_
:param id: integer
:rtype: :class:`github.Team.Tea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.