id int32 0 252k | repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 |
|---|---|---|---|---|---|---|---|---|---|---|---|
27,500 | EpistasisLab/tpot | tpot/base.py | TPOTBase.fit_predict | def fit_predict(self, features, target, sample_weight=None, groups=None):
"""Call fit and predict in sequence.
Parameters
----------
features: array-like {n_samples, n_features}
Feature matrix
target: array-like {n_samples}
List of class labels for predic... | python | def fit_predict(self, features, target, sample_weight=None, groups=None):
"""Call fit and predict in sequence.
Parameters
----------
features: array-like {n_samples, n_features}
Feature matrix
target: array-like {n_samples}
List of class labels for predic... | [
"def",
"fit_predict",
"(",
"self",
",",
"features",
",",
"target",
",",
"sample_weight",
"=",
"None",
",",
"groups",
"=",
"None",
")",
":",
"self",
".",
"fit",
"(",
"features",
",",
"target",
",",
"sample_weight",
"=",
"sample_weight",
",",
"groups",
"="... | Call fit and predict in sequence.
Parameters
----------
features: array-like {n_samples, n_features}
Feature matrix
target: array-like {n_samples}
List of class labels for prediction
sample_weight: array-like {n_samples}, optional
Per-sample w... | [
"Call",
"fit",
"and",
"predict",
"in",
"sequence",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L918-L942 |
27,501 | EpistasisLab/tpot | tpot/base.py | TPOTBase.score | def score(self, testing_features, testing_target):
"""Return the score on the given testing data using the user-specified scoring function.
Parameters
----------
testing_features: array-like {n_samples, n_features}
Feature matrix of the testing set
testing_target: ar... | python | def score(self, testing_features, testing_target):
"""Return the score on the given testing data using the user-specified scoring function.
Parameters
----------
testing_features: array-like {n_samples, n_features}
Feature matrix of the testing set
testing_target: ar... | [
"def",
"score",
"(",
"self",
",",
"testing_features",
",",
"testing_target",
")",
":",
"if",
"self",
".",
"fitted_pipeline_",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"'A pipeline has not yet been optimized. Please call fit() first.'",
")",
"testing_features",
"... | Return the score on the given testing data using the user-specified scoring function.
Parameters
----------
testing_features: array-like {n_samples, n_features}
Feature matrix of the testing set
testing_target: array-like {n_samples}
List of class labels for pred... | [
"Return",
"the",
"score",
"on",
"the",
"given",
"testing",
"data",
"using",
"the",
"user",
"-",
"specified",
"scoring",
"function",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L944-L972 |
27,502 | EpistasisLab/tpot | tpot/base.py | TPOTBase.predict_proba | def predict_proba(self, features):
"""Use the optimized pipeline to estimate the class probabilities for a feature set.
Parameters
----------
features: array-like {n_samples, n_features}
Feature matrix of the testing set
Returns
-------
array-like: {... | python | def predict_proba(self, features):
"""Use the optimized pipeline to estimate the class probabilities for a feature set.
Parameters
----------
features: array-like {n_samples, n_features}
Feature matrix of the testing set
Returns
-------
array-like: {... | [
"def",
"predict_proba",
"(",
"self",
",",
"features",
")",
":",
"if",
"not",
"self",
".",
"fitted_pipeline_",
":",
"raise",
"RuntimeError",
"(",
"'A pipeline has not yet been optimized. Please call fit() first.'",
")",
"else",
":",
"if",
"not",
"(",
"hasattr",
"(",
... | Use the optimized pipeline to estimate the class probabilities for a feature set.
Parameters
----------
features: array-like {n_samples, n_features}
Feature matrix of the testing set
Returns
-------
array-like: {n_samples, n_target}
The class pro... | [
"Use",
"the",
"optimized",
"pipeline",
"to",
"estimate",
"the",
"class",
"probabilities",
"for",
"a",
"feature",
"set",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L974-L996 |
27,503 | EpistasisLab/tpot | tpot/base.py | TPOTBase.clean_pipeline_string | def clean_pipeline_string(self, individual):
"""Provide a string of the individual without the parameter prefixes.
Parameters
----------
individual: individual
Individual which should be represented by a pretty string
Returns
-------
A string like st... | python | def clean_pipeline_string(self, individual):
"""Provide a string of the individual without the parameter prefixes.
Parameters
----------
individual: individual
Individual which should be represented by a pretty string
Returns
-------
A string like st... | [
"def",
"clean_pipeline_string",
"(",
"self",
",",
"individual",
")",
":",
"dirty_string",
"=",
"str",
"(",
"individual",
")",
"# There are many parameter prefixes in the pipeline strings, used solely for",
"# making the terminal name unique, eg. LinearSVC__.",
"parameter_prefixes",
... | Provide a string of the individual without the parameter prefixes.
Parameters
----------
individual: individual
Individual which should be represented by a pretty string
Returns
-------
A string like str(individual), but with parameter prefixes removed. | [
"Provide",
"a",
"string",
"of",
"the",
"individual",
"without",
"the",
"parameter",
"prefixes",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L999-L1021 |
27,504 | EpistasisLab/tpot | tpot/base.py | TPOTBase.export | def export(self, output_file_name, data_file_path=''):
"""Export the optimized pipeline as Python code.
Parameters
----------
output_file_name: string
String containing the path and file name of the desired output file
data_file_path: string (default: '')
... | python | def export(self, output_file_name, data_file_path=''):
"""Export the optimized pipeline as Python code.
Parameters
----------
output_file_name: string
String containing the path and file name of the desired output file
data_file_path: string (default: '')
... | [
"def",
"export",
"(",
"self",
",",
"output_file_name",
",",
"data_file_path",
"=",
"''",
")",
":",
"if",
"self",
".",
"_optimized_pipeline",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"'A pipeline has not yet been optimized. Please call fit() first.'",
")",
"to_... | Export the optimized pipeline as Python code.
Parameters
----------
output_file_name: string
String containing the path and file name of the desired output file
data_file_path: string (default: '')
By default, the path of input dataset is 'PATH/TO/DATA/FILE' by d... | [
"Export",
"the",
"optimized",
"pipeline",
"as",
"Python",
"code",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1086-L1113 |
27,505 | EpistasisLab/tpot | tpot/base.py | TPOTBase._impute_values | def _impute_values(self, features):
"""Impute missing values in a feature set.
Parameters
----------
features: array-like {n_samples, n_features}
A feature matrix
Returns
-------
array-like {n_samples, n_features}
"""
if self.verbosit... | python | def _impute_values(self, features):
"""Impute missing values in a feature set.
Parameters
----------
features: array-like {n_samples, n_features}
A feature matrix
Returns
-------
array-like {n_samples, n_features}
"""
if self.verbosit... | [
"def",
"_impute_values",
"(",
"self",
",",
"features",
")",
":",
"if",
"self",
".",
"verbosity",
">",
"1",
":",
"print",
"(",
"'Imputing missing values in feature set'",
")",
"if",
"self",
".",
"_fitted_imputer",
"is",
"None",
":",
"self",
".",
"_fitted_impute... | Impute missing values in a feature set.
Parameters
----------
features: array-like {n_samples, n_features}
A feature matrix
Returns
-------
array-like {n_samples, n_features} | [
"Impute",
"missing",
"values",
"in",
"a",
"feature",
"set",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1116-L1135 |
27,506 | EpistasisLab/tpot | tpot/base.py | TPOTBase._check_dataset | def _check_dataset(self, features, target, sample_weight=None):
"""Check if a dataset has a valid feature set and labels.
Parameters
----------
features: array-like {n_samples, n_features}
Feature matrix
target: array-like {n_samples} or None
List of clas... | python | def _check_dataset(self, features, target, sample_weight=None):
"""Check if a dataset has a valid feature set and labels.
Parameters
----------
features: array-like {n_samples, n_features}
Feature matrix
target: array-like {n_samples} or None
List of clas... | [
"def",
"_check_dataset",
"(",
"self",
",",
"features",
",",
"target",
",",
"sample_weight",
"=",
"None",
")",
":",
"# Check sample_weight",
"if",
"sample_weight",
"is",
"not",
"None",
":",
"try",
":",
"sample_weight",
"=",
"np",
".",
"array",
"(",
"sample_we... | Check if a dataset has a valid feature set and labels.
Parameters
----------
features: array-like {n_samples, n_features}
Feature matrix
target: array-like {n_samples} or None
List of class labels for prediction
sample_weight: array-like {n_samples} (opti... | [
"Check",
"if",
"a",
"dataset",
"has",
"a",
"valid",
"feature",
"set",
"and",
"labels",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1137-L1205 |
27,507 | EpistasisLab/tpot | tpot/base.py | TPOTBase._compile_to_sklearn | def _compile_to_sklearn(self, expr):
"""Compile a DEAP pipeline into a sklearn pipeline.
Parameters
----------
expr: DEAP individual
The DEAP pipeline to be compiled
Returns
-------
sklearn_pipeline: sklearn.pipeline.Pipeline
"""
skle... | python | def _compile_to_sklearn(self, expr):
"""Compile a DEAP pipeline into a sklearn pipeline.
Parameters
----------
expr: DEAP individual
The DEAP pipeline to be compiled
Returns
-------
sklearn_pipeline: sklearn.pipeline.Pipeline
"""
skle... | [
"def",
"_compile_to_sklearn",
"(",
"self",
",",
"expr",
")",
":",
"sklearn_pipeline_str",
"=",
"generate_pipeline_code",
"(",
"expr_to_tree",
"(",
"expr",
",",
"self",
".",
"_pset",
")",
",",
"self",
".",
"operators",
")",
"sklearn_pipeline",
"=",
"eval",
"(",... | Compile a DEAP pipeline into a sklearn pipeline.
Parameters
----------
expr: DEAP individual
The DEAP pipeline to be compiled
Returns
-------
sklearn_pipeline: sklearn.pipeline.Pipeline | [
"Compile",
"a",
"DEAP",
"pipeline",
"into",
"a",
"sklearn",
"pipeline",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1208-L1223 |
27,508 | EpistasisLab/tpot | tpot/base.py | TPOTBase._set_param_recursive | def _set_param_recursive(self, pipeline_steps, parameter, value):
"""Recursively iterate through all objects in the pipeline and set a given parameter.
Parameters
----------
pipeline_steps: array-like
List of (str, obj) tuples from a scikit-learn pipeline or related object
... | python | def _set_param_recursive(self, pipeline_steps, parameter, value):
"""Recursively iterate through all objects in the pipeline and set a given parameter.
Parameters
----------
pipeline_steps: array-like
List of (str, obj) tuples from a scikit-learn pipeline or related object
... | [
"def",
"_set_param_recursive",
"(",
"self",
",",
"pipeline_steps",
",",
"parameter",
",",
"value",
")",
":",
"for",
"(",
"_",
",",
"obj",
")",
"in",
"pipeline_steps",
":",
"recursive_attrs",
"=",
"[",
"'steps'",
",",
"'transformer_list'",
",",
"'estimators'",
... | Recursively iterate through all objects in the pipeline and set a given parameter.
Parameters
----------
pipeline_steps: array-like
List of (str, obj) tuples from a scikit-learn pipeline or related object
parameter: str
The parameter to assign a value for in each... | [
"Recursively",
"iterate",
"through",
"all",
"objects",
"in",
"the",
"pipeline",
"and",
"set",
"a",
"given",
"parameter",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1225-L1251 |
27,509 | EpistasisLab/tpot | tpot/base.py | TPOTBase._stop_by_max_time_mins | def _stop_by_max_time_mins(self):
"""Stop optimization process once maximum minutes have elapsed."""
if self.max_time_mins:
total_mins_elapsed = (datetime.now() - self._start_datetime).total_seconds() / 60.
if total_mins_elapsed >= self.max_time_mins:
raise Keyboa... | python | def _stop_by_max_time_mins(self):
"""Stop optimization process once maximum minutes have elapsed."""
if self.max_time_mins:
total_mins_elapsed = (datetime.now() - self._start_datetime).total_seconds() / 60.
if total_mins_elapsed >= self.max_time_mins:
raise Keyboa... | [
"def",
"_stop_by_max_time_mins",
"(",
"self",
")",
":",
"if",
"self",
".",
"max_time_mins",
":",
"total_mins_elapsed",
"=",
"(",
"datetime",
".",
"now",
"(",
")",
"-",
"self",
".",
"_start_datetime",
")",
".",
"total_seconds",
"(",
")",
"/",
"60.",
"if",
... | Stop optimization process once maximum minutes have elapsed. | [
"Stop",
"optimization",
"process",
"once",
"maximum",
"minutes",
"have",
"elapsed",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1253-L1258 |
27,510 | EpistasisLab/tpot | tpot/base.py | TPOTBase._combine_individual_stats | def _combine_individual_stats(self, operator_count, cv_score, individual_stats):
"""Combine the stats with operator count and cv score and preprare to be written to _evaluated_individuals
Parameters
----------
operator_count: int
number of components in the pipeline
... | python | def _combine_individual_stats(self, operator_count, cv_score, individual_stats):
"""Combine the stats with operator count and cv score and preprare to be written to _evaluated_individuals
Parameters
----------
operator_count: int
number of components in the pipeline
... | [
"def",
"_combine_individual_stats",
"(",
"self",
",",
"operator_count",
",",
"cv_score",
",",
"individual_stats",
")",
":",
"stats",
"=",
"deepcopy",
"(",
"individual_stats",
")",
"# Deepcopy, since the string reference to predecessor should be cloned",
"stats",
"[",
"'oper... | Combine the stats with operator count and cv score and preprare to be written to _evaluated_individuals
Parameters
----------
operator_count: int
number of components in the pipeline
cv_score: float
internal cross validation score
individual_stats: dictio... | [
"Combine",
"the",
"stats",
"with",
"operator",
"count",
"and",
"cv",
"score",
"and",
"preprare",
"to",
"be",
"written",
"to",
"_evaluated_individuals"
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1260-L1287 |
27,511 | EpistasisLab/tpot | tpot/base.py | TPOTBase._preprocess_individuals | def _preprocess_individuals(self, individuals):
"""Preprocess DEAP individuals before pipeline evaluation.
Parameters
----------
individuals: a list of DEAP individual
One individual is a list of pipeline operators and model parameters that can be
compiled by DEA... | python | def _preprocess_individuals(self, individuals):
"""Preprocess DEAP individuals before pipeline evaluation.
Parameters
----------
individuals: a list of DEAP individual
One individual is a list of pipeline operators and model parameters that can be
compiled by DEA... | [
"def",
"_preprocess_individuals",
"(",
"self",
",",
"individuals",
")",
":",
"# update self._pbar.total",
"if",
"not",
"(",
"self",
".",
"max_time_mins",
"is",
"None",
")",
"and",
"not",
"self",
".",
"_pbar",
".",
"disable",
"and",
"self",
".",
"_pbar",
".",... | Preprocess DEAP individuals before pipeline evaluation.
Parameters
----------
individuals: a list of DEAP individual
One individual is a list of pipeline operators and model parameters that can be
compiled by DEAP into a callable function
Returns
-------... | [
"Preprocess",
"DEAP",
"individuals",
"before",
"pipeline",
"evaluation",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1409-L1492 |
27,512 | EpistasisLab/tpot | tpot/base.py | TPOTBase._update_evaluated_individuals_ | def _update_evaluated_individuals_(self, result_score_list, eval_individuals_str, operator_counts, stats_dicts):
"""Update self.evaluated_individuals_ and error message during pipeline evaluation.
Parameters
----------
result_score_list: list
A list of CV scores for evaluate... | python | def _update_evaluated_individuals_(self, result_score_list, eval_individuals_str, operator_counts, stats_dicts):
"""Update self.evaluated_individuals_ and error message during pipeline evaluation.
Parameters
----------
result_score_list: list
A list of CV scores for evaluate... | [
"def",
"_update_evaluated_individuals_",
"(",
"self",
",",
"result_score_list",
",",
"eval_individuals_str",
",",
"operator_counts",
",",
"stats_dicts",
")",
":",
"for",
"result_score",
",",
"individual_str",
"in",
"zip",
"(",
"result_score_list",
",",
"eval_individuals... | Update self.evaluated_individuals_ and error message during pipeline evaluation.
Parameters
----------
result_score_list: list
A list of CV scores for evaluated pipelines
eval_individuals_str: list
A list of strings for evaluated pipelines
operator_counts... | [
"Update",
"self",
".",
"evaluated_individuals_",
"and",
"error",
"message",
"during",
"pipeline",
"evaluation",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1494-L1519 |
27,513 | EpistasisLab/tpot | tpot/base.py | TPOTBase._update_pbar | def _update_pbar(self, pbar_num=1, pbar_msg=None):
"""Update self._pbar and error message during pipeline evaluation.
Parameters
----------
pbar_num: int
How many pipelines has been processed
pbar_msg: None or string
Error message
Returns
... | python | def _update_pbar(self, pbar_num=1, pbar_msg=None):
"""Update self._pbar and error message during pipeline evaluation.
Parameters
----------
pbar_num: int
How many pipelines has been processed
pbar_msg: None or string
Error message
Returns
... | [
"def",
"_update_pbar",
"(",
"self",
",",
"pbar_num",
"=",
"1",
",",
"pbar_msg",
"=",
"None",
")",
":",
"if",
"not",
"isinstance",
"(",
"self",
".",
"_pbar",
",",
"type",
"(",
"None",
")",
")",
":",
"if",
"self",
".",
"verbosity",
">",
"2",
"and",
... | Update self._pbar and error message during pipeline evaluation.
Parameters
----------
pbar_num: int
How many pipelines has been processed
pbar_msg: None or string
Error message
Returns
-------
None | [
"Update",
"self",
".",
"_pbar",
"and",
"error",
"message",
"during",
"pipeline",
"evaluation",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1521-L1539 |
27,514 | EpistasisLab/tpot | tpot/base.py | TPOTBase._random_mutation_operator | def _random_mutation_operator(self, individual, allow_shrink=True):
"""Perform a replacement, insertion, or shrink mutation on an individual.
Parameters
----------
individual: DEAP individual
A list of pipeline operators and model parameters that can be
compiled ... | python | def _random_mutation_operator(self, individual, allow_shrink=True):
"""Perform a replacement, insertion, or shrink mutation on an individual.
Parameters
----------
individual: DEAP individual
A list of pipeline operators and model parameters that can be
compiled ... | [
"def",
"_random_mutation_operator",
"(",
"self",
",",
"individual",
",",
"allow_shrink",
"=",
"True",
")",
":",
"if",
"self",
".",
"tree_structure",
":",
"mutation_techniques",
"=",
"[",
"partial",
"(",
"gp",
".",
"mutInsert",
",",
"pset",
"=",
"self",
".",
... | Perform a replacement, insertion, or shrink mutation on an individual.
Parameters
----------
individual: DEAP individual
A list of pipeline operators and model parameters that can be
compiled by DEAP into a callable function
allow_shrink: bool (True)
... | [
"Perform",
"a",
"replacement",
"insertion",
"or",
"shrink",
"mutation",
"on",
"an",
"individual",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1564-L1623 |
27,515 | EpistasisLab/tpot | tpot/base.py | TPOTBase._gen_grow_safe | def _gen_grow_safe(self, pset, min_, max_, type_=None):
"""Generate an expression where each leaf might have a different depth between min_ and max_.
Parameters
----------
pset: PrimitiveSetTyped
Primitive set from which primitives are selected.
min_: int
... | python | def _gen_grow_safe(self, pset, min_, max_, type_=None):
"""Generate an expression where each leaf might have a different depth between min_ and max_.
Parameters
----------
pset: PrimitiveSetTyped
Primitive set from which primitives are selected.
min_: int
... | [
"def",
"_gen_grow_safe",
"(",
"self",
",",
"pset",
",",
"min_",
",",
"max_",
",",
"type_",
"=",
"None",
")",
":",
"def",
"condition",
"(",
"height",
",",
"depth",
",",
"type_",
")",
":",
"\"\"\"Stop when the depth is equal to height or when a node should be a term... | Generate an expression where each leaf might have a different depth between min_ and max_.
Parameters
----------
pset: PrimitiveSetTyped
Primitive set from which primitives are selected.
min_: int
Minimum height of the produced trees.
max_: int
... | [
"Generate",
"an",
"expression",
"where",
"each",
"leaf",
"might",
"have",
"a",
"different",
"depth",
"between",
"min_",
"and",
"max_",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1625-L1650 |
27,516 | EpistasisLab/tpot | tpot/base.py | TPOTBase._operator_count | def _operator_count(self, individual):
"""Count the number of pipeline operators as a measure of pipeline complexity.
Parameters
----------
individual: list
A grown tree with leaves at possibly different depths
dependending on the condition function.
Ret... | python | def _operator_count(self, individual):
"""Count the number of pipeline operators as a measure of pipeline complexity.
Parameters
----------
individual: list
A grown tree with leaves at possibly different depths
dependending on the condition function.
Ret... | [
"def",
"_operator_count",
"(",
"self",
",",
"individual",
")",
":",
"operator_count",
"=",
"0",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"individual",
")",
")",
":",
"node",
"=",
"individual",
"[",
"i",
"]",
"if",
"type",
"(",
"node",
")",
"is",
... | Count the number of pipeline operators as a measure of pipeline complexity.
Parameters
----------
individual: list
A grown tree with leaves at possibly different depths
dependending on the condition function.
Returns
-------
operator_count: int
... | [
"Count",
"the",
"number",
"of",
"pipeline",
"operators",
"as",
"a",
"measure",
"of",
"pipeline",
"complexity",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1653-L1672 |
27,517 | EpistasisLab/tpot | tpot/base.py | TPOTBase._update_val | def _update_val(self, val, result_score_list):
"""Update values in the list of result scores and self._pbar during pipeline evaluation.
Parameters
----------
val: float or "Timeout"
CV scores
result_score_list: list
A list of CV scores
Returns
... | python | def _update_val(self, val, result_score_list):
"""Update values in the list of result scores and self._pbar during pipeline evaluation.
Parameters
----------
val: float or "Timeout"
CV scores
result_score_list: list
A list of CV scores
Returns
... | [
"def",
"_update_val",
"(",
"self",
",",
"val",
",",
"result_score_list",
")",
":",
"self",
".",
"_update_pbar",
"(",
")",
"if",
"val",
"==",
"'Timeout'",
":",
"self",
".",
"_update_pbar",
"(",
"pbar_msg",
"=",
"(",
"'Skipped pipeline #{0} due to time out. '",
... | Update values in the list of result scores and self._pbar during pipeline evaluation.
Parameters
----------
val: float or "Timeout"
CV scores
result_score_list: list
A list of CV scores
Returns
-------
result_score_list: list
... | [
"Update",
"values",
"in",
"the",
"list",
"of",
"result",
"scores",
"and",
"self",
".",
"_pbar",
"during",
"pipeline",
"evaluation",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1674-L1696 |
27,518 | EpistasisLab/tpot | tpot/base.py | TPOTBase._generate | def _generate(self, pset, min_, max_, condition, type_=None):
"""Generate a Tree as a list of lists.
The tree is build from the root to the leaves, and it stop growing when
the condition is fulfilled.
Parameters
----------
pset: PrimitiveSetTyped
Primitive s... | python | def _generate(self, pset, min_, max_, condition, type_=None):
"""Generate a Tree as a list of lists.
The tree is build from the root to the leaves, and it stop growing when
the condition is fulfilled.
Parameters
----------
pset: PrimitiveSetTyped
Primitive s... | [
"def",
"_generate",
"(",
"self",
",",
"pset",
",",
"min_",
",",
"max_",
",",
"condition",
",",
"type_",
"=",
"None",
")",
":",
"if",
"type_",
"is",
"None",
":",
"type_",
"=",
"pset",
".",
"ret",
"expr",
"=",
"[",
"]",
"height",
"=",
"np",
".",
... | Generate a Tree as a list of lists.
The tree is build from the root to the leaves, and it stop growing when
the condition is fulfilled.
Parameters
----------
pset: PrimitiveSetTyped
Primitive set from which primitives are selected.
min_: int
Mini... | [
"Generate",
"a",
"Tree",
"as",
"a",
"list",
"of",
"lists",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/base.py#L1699-L1762 |
27,519 | EpistasisLab/tpot | tpot/builtins/feature_transformers.py | CategoricalSelector.transform | def transform(self, X):
"""Select categorical features and transform them using OneHotEncoder.
Parameters
----------
X: numpy ndarray, {n_samples, n_components}
New data, where n_samples is the number of samples and n_components is the number of components.
Returns
... | python | def transform(self, X):
"""Select categorical features and transform them using OneHotEncoder.
Parameters
----------
X: numpy ndarray, {n_samples, n_components}
New data, where n_samples is the number of samples and n_components is the number of components.
Returns
... | [
"def",
"transform",
"(",
"self",
",",
"X",
")",
":",
"selected",
"=",
"auto_select_categorical_features",
"(",
"X",
",",
"threshold",
"=",
"self",
".",
"threshold",
")",
"X_sel",
",",
"_",
",",
"n_selected",
",",
"_",
"=",
"_X_selected",
"(",
"X",
",",
... | Select categorical features and transform them using OneHotEncoder.
Parameters
----------
X: numpy ndarray, {n_samples, n_components}
New data, where n_samples is the number of samples and n_components is the number of components.
Returns
-------
array-like,... | [
"Select",
"categorical",
"features",
"and",
"transform",
"them",
"using",
"OneHotEncoder",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/builtins/feature_transformers.py#L63-L83 |
27,520 | EpistasisLab/tpot | tpot/builtins/feature_transformers.py | ContinuousSelector.transform | def transform(self, X):
"""Select continuous features and transform them using PCA.
Parameters
----------
X: numpy ndarray, {n_samples, n_components}
New data, where n_samples is the number of samples and n_components is the number of components.
Returns
---... | python | def transform(self, X):
"""Select continuous features and transform them using PCA.
Parameters
----------
X: numpy ndarray, {n_samples, n_components}
New data, where n_samples is the number of samples and n_components is the number of components.
Returns
---... | [
"def",
"transform",
"(",
"self",
",",
"X",
")",
":",
"selected",
"=",
"auto_select_categorical_features",
"(",
"X",
",",
"threshold",
"=",
"self",
".",
"threshold",
")",
"_",
",",
"X_sel",
",",
"n_selected",
",",
"_",
"=",
"_X_selected",
"(",
"X",
",",
... | Select continuous features and transform them using PCA.
Parameters
----------
X: numpy ndarray, {n_samples, n_components}
New data, where n_samples is the number of samples and n_components is the number of components.
Returns
-------
array-like, {n_samples... | [
"Select",
"continuous",
"features",
"and",
"transform",
"them",
"using",
"PCA",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/builtins/feature_transformers.py#L140-L160 |
27,521 | EpistasisLab/tpot | tpot/builtins/stacking_estimator.py | StackingEstimator.fit | def fit(self, X, y=None, **fit_params):
"""Fit the StackingEstimator meta-transformer.
Parameters
----------
X: array-like of shape (n_samples, n_features)
The training input samples.
y: array-like, shape (n_samples,)
The target values (integers that corr... | python | def fit(self, X, y=None, **fit_params):
"""Fit the StackingEstimator meta-transformer.
Parameters
----------
X: array-like of shape (n_samples, n_features)
The training input samples.
y: array-like, shape (n_samples,)
The target values (integers that corr... | [
"def",
"fit",
"(",
"self",
",",
"X",
",",
"y",
"=",
"None",
",",
"*",
"*",
"fit_params",
")",
":",
"self",
".",
"estimator",
".",
"fit",
"(",
"X",
",",
"y",
",",
"*",
"*",
"fit_params",
")",
"return",
"self"
] | Fit the StackingEstimator meta-transformer.
Parameters
----------
X: array-like of shape (n_samples, n_features)
The training input samples.
y: array-like, shape (n_samples,)
The target values (integers that correspond to classes in classification, real numbers i... | [
"Fit",
"the",
"StackingEstimator",
"meta",
"-",
"transformer",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/builtins/stacking_estimator.py#L50-L68 |
27,522 | EpistasisLab/tpot | tpot/builtins/zero_count.py | ZeroCount.transform | def transform(self, X, y=None):
"""Transform data by adding two virtual features.
Parameters
----------
X: numpy ndarray, {n_samples, n_components}
New data, where n_samples is the number of samples and n_components
is the number of components.
y: None
... | python | def transform(self, X, y=None):
"""Transform data by adding two virtual features.
Parameters
----------
X: numpy ndarray, {n_samples, n_components}
New data, where n_samples is the number of samples and n_components
is the number of components.
y: None
... | [
"def",
"transform",
"(",
"self",
",",
"X",
",",
"y",
"=",
"None",
")",
":",
"X",
"=",
"check_array",
"(",
"X",
")",
"n_features",
"=",
"X",
".",
"shape",
"[",
"1",
"]",
"X_transformed",
"=",
"np",
".",
"copy",
"(",
"X",
")",
"non_zero_vector",
"=... | Transform data by adding two virtual features.
Parameters
----------
X: numpy ndarray, {n_samples, n_components}
New data, where n_samples is the number of samples and n_components
is the number of components.
y: None
Unused
Returns
-... | [
"Transform",
"data",
"by",
"adding",
"two",
"virtual",
"features",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/builtins/zero_count.py#L38-L66 |
27,523 | EpistasisLab/tpot | tpot/operator_utils.py | source_decode | def source_decode(sourcecode, verbose=0):
"""Decode operator source and import operator class.
Parameters
----------
sourcecode: string
a string of operator source (e.g 'sklearn.feature_selection.RFE')
verbose: int, optional (default: 0)
How much information TPOT communicates while ... | python | def source_decode(sourcecode, verbose=0):
"""Decode operator source and import operator class.
Parameters
----------
sourcecode: string
a string of operator source (e.g 'sklearn.feature_selection.RFE')
verbose: int, optional (default: 0)
How much information TPOT communicates while ... | [
"def",
"source_decode",
"(",
"sourcecode",
",",
"verbose",
"=",
"0",
")",
":",
"tmp_path",
"=",
"sourcecode",
".",
"split",
"(",
"'.'",
")",
"op_str",
"=",
"tmp_path",
".",
"pop",
"(",
")",
"import_str",
"=",
"'.'",
".",
"join",
"(",
"tmp_path",
")",
... | Decode operator source and import operator class.
Parameters
----------
sourcecode: string
a string of operator source (e.g 'sklearn.feature_selection.RFE')
verbose: int, optional (default: 0)
How much information TPOT communicates while it's running.
0 = none, 1 = minimal, 2 = ... | [
"Decode",
"operator",
"source",
"and",
"import",
"operator",
"class",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/operator_utils.py#L47-L86 |
27,524 | EpistasisLab/tpot | tpot/operator_utils.py | set_sample_weight | def set_sample_weight(pipeline_steps, sample_weight=None):
"""Recursively iterates through all objects in the pipeline and sets sample weight.
Parameters
----------
pipeline_steps: array-like
List of (str, obj) tuples from a scikit-learn pipeline or related object
sample_weight: array-like
... | python | def set_sample_weight(pipeline_steps, sample_weight=None):
"""Recursively iterates through all objects in the pipeline and sets sample weight.
Parameters
----------
pipeline_steps: array-like
List of (str, obj) tuples from a scikit-learn pipeline or related object
sample_weight: array-like
... | [
"def",
"set_sample_weight",
"(",
"pipeline_steps",
",",
"sample_weight",
"=",
"None",
")",
":",
"sample_weight_dict",
"=",
"{",
"}",
"if",
"not",
"isinstance",
"(",
"sample_weight",
",",
"type",
"(",
"None",
")",
")",
":",
"for",
"(",
"pname",
",",
"obj",
... | Recursively iterates through all objects in the pipeline and sets sample weight.
Parameters
----------
pipeline_steps: array-like
List of (str, obj) tuples from a scikit-learn pipeline or related object
sample_weight: array-like
List of sample weight
Returns
-------
sample_w... | [
"Recursively",
"iterates",
"through",
"all",
"objects",
"in",
"the",
"pipeline",
"and",
"sets",
"sample",
"weight",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/operator_utils.py#L89-L114 |
27,525 | EpistasisLab/tpot | tpot/driver.py | positive_integer | def positive_integer(value):
"""Ensure that the provided value is a positive integer.
Parameters
----------
value: int
The number to evaluate
Returns
-------
value: int
Returns a positive integer
"""
try:
value = int(value)
except Exception:
rais... | python | def positive_integer(value):
"""Ensure that the provided value is a positive integer.
Parameters
----------
value: int
The number to evaluate
Returns
-------
value: int
Returns a positive integer
"""
try:
value = int(value)
except Exception:
rais... | [
"def",
"positive_integer",
"(",
"value",
")",
":",
"try",
":",
"value",
"=",
"int",
"(",
"value",
")",
"except",
"Exception",
":",
"raise",
"argparse",
".",
"ArgumentTypeError",
"(",
"'Invalid int value: \\'{}\\''",
".",
"format",
"(",
"value",
")",
")",
"if... | Ensure that the provided value is a positive integer.
Parameters
----------
value: int
The number to evaluate
Returns
-------
value: int
Returns a positive integer | [
"Ensure",
"that",
"the",
"provided",
"value",
"is",
"a",
"positive",
"integer",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/driver.py#L40-L59 |
27,526 | EpistasisLab/tpot | tpot/driver.py | load_scoring_function | def load_scoring_function(scoring_func):
"""
converts mymodule.myfunc in the myfunc
object itself so tpot receives a scoring function
"""
if scoring_func and ("." in scoring_func):
try:
module_name, func_name = scoring_func.rsplit('.', 1)
module_path = os.getcwd()
... | python | def load_scoring_function(scoring_func):
"""
converts mymodule.myfunc in the myfunc
object itself so tpot receives a scoring function
"""
if scoring_func and ("." in scoring_func):
try:
module_name, func_name = scoring_func.rsplit('.', 1)
module_path = os.getcwd()
... | [
"def",
"load_scoring_function",
"(",
"scoring_func",
")",
":",
"if",
"scoring_func",
"and",
"(",
"\".\"",
"in",
"scoring_func",
")",
":",
"try",
":",
"module_name",
",",
"func_name",
"=",
"scoring_func",
".",
"rsplit",
"(",
"'.'",
",",
"1",
")",
"module_path... | converts mymodule.myfunc in the myfunc
object itself so tpot receives a scoring function | [
"converts",
"mymodule",
".",
"myfunc",
"in",
"the",
"myfunc",
"object",
"itself",
"so",
"tpot",
"receives",
"a",
"scoring",
"function"
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/driver.py#L493-L513 |
27,527 | EpistasisLab/tpot | tpot/driver.py | tpot_driver | def tpot_driver(args):
"""Perform a TPOT run."""
if args.VERBOSITY >= 2:
_print_args(args)
input_data = _read_data_file(args)
features = input_data.drop(args.TARGET_NAME, axis=1)
training_features, testing_features, training_target, testing_target = \
train_test_split(features, inp... | python | def tpot_driver(args):
"""Perform a TPOT run."""
if args.VERBOSITY >= 2:
_print_args(args)
input_data = _read_data_file(args)
features = input_data.drop(args.TARGET_NAME, axis=1)
training_features, testing_features, training_target, testing_target = \
train_test_split(features, inp... | [
"def",
"tpot_driver",
"(",
"args",
")",
":",
"if",
"args",
".",
"VERBOSITY",
">=",
"2",
":",
"_print_args",
"(",
"args",
")",
"input_data",
"=",
"_read_data_file",
"(",
"args",
")",
"features",
"=",
"input_data",
".",
"drop",
"(",
"args",
".",
"TARGET_NA... | Perform a TPOT run. | [
"Perform",
"a",
"TPOT",
"run",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/driver.py#L516-L574 |
27,528 | EpistasisLab/tpot | tpot/builtins/feature_set_selector.py | FeatureSetSelector.fit | def fit(self, X, y=None):
"""Fit FeatureSetSelector for feature selection
Parameters
----------
X: array-like of shape (n_samples, n_features)
The training input samples.
y: array-like, shape (n_samples,)
The target values (integers that correspond to cla... | python | def fit(self, X, y=None):
"""Fit FeatureSetSelector for feature selection
Parameters
----------
X: array-like of shape (n_samples, n_features)
The training input samples.
y: array-like, shape (n_samples,)
The target values (integers that correspond to cla... | [
"def",
"fit",
"(",
"self",
",",
"X",
",",
"y",
"=",
"None",
")",
":",
"subset_df",
"=",
"pd",
".",
"read_csv",
"(",
"self",
".",
"subset_list",
",",
"header",
"=",
"0",
",",
"index_col",
"=",
"0",
")",
"if",
"isinstance",
"(",
"self",
".",
"sel_s... | Fit FeatureSetSelector for feature selection
Parameters
----------
X: array-like of shape (n_samples, n_features)
The training input samples.
y: array-like, shape (n_samples,)
The target values (integers that correspond to classes in classification, real numbers ... | [
"Fit",
"FeatureSetSelector",
"for",
"feature",
"selection"
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/builtins/feature_set_selector.py#L66-L114 |
27,529 | EpistasisLab/tpot | tpot/builtins/feature_set_selector.py | FeatureSetSelector.transform | def transform(self, X):
"""Make subset after fit
Parameters
----------
X: numpy ndarray, {n_samples, n_features}
New data, where n_samples is the number of samples and n_features is the number of features.
Returns
-------
X_transformed: array-like, s... | python | def transform(self, X):
"""Make subset after fit
Parameters
----------
X: numpy ndarray, {n_samples, n_features}
New data, where n_samples is the number of samples and n_features is the number of features.
Returns
-------
X_transformed: array-like, s... | [
"def",
"transform",
"(",
"self",
",",
"X",
")",
":",
"if",
"isinstance",
"(",
"X",
",",
"pd",
".",
"DataFrame",
")",
":",
"X_transformed",
"=",
"X",
"[",
"self",
".",
"feat_list",
"]",
".",
"values",
"elif",
"isinstance",
"(",
"X",
",",
"np",
".",
... | Make subset after fit
Parameters
----------
X: numpy ndarray, {n_samples, n_features}
New data, where n_samples is the number of samples and n_features is the number of features.
Returns
-------
X_transformed: array-like, shape (n_samples, n_features + 1) or... | [
"Make",
"subset",
"after",
"fit"
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/builtins/feature_set_selector.py#L116-L134 |
27,530 | EpistasisLab/tpot | tpot/gp_deap.py | pick_two_individuals_eligible_for_crossover | def pick_two_individuals_eligible_for_crossover(population):
"""Pick two individuals from the population which can do crossover, that is, they share a primitive.
Parameters
----------
population: array of individuals
Returns
----------
tuple: (individual, individual)
Two individual... | python | def pick_two_individuals_eligible_for_crossover(population):
"""Pick two individuals from the population which can do crossover, that is, they share a primitive.
Parameters
----------
population: array of individuals
Returns
----------
tuple: (individual, individual)
Two individual... | [
"def",
"pick_two_individuals_eligible_for_crossover",
"(",
"population",
")",
":",
"primitives_by_ind",
"=",
"[",
"set",
"(",
"[",
"node",
".",
"name",
"for",
"node",
"in",
"ind",
"if",
"isinstance",
"(",
"node",
",",
"gp",
".",
"Primitive",
")",
"]",
")",
... | Pick two individuals from the population which can do crossover, that is, they share a primitive.
Parameters
----------
population: array of individuals
Returns
----------
tuple: (individual, individual)
Two individuals which are not the same, but share at least one primitive.
... | [
"Pick",
"two",
"individuals",
"from",
"the",
"population",
"which",
"can",
"do",
"crossover",
"that",
"is",
"they",
"share",
"a",
"primitive",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/gp_deap.py#L41-L73 |
27,531 | EpistasisLab/tpot | tpot/gp_deap.py | mutate_random_individual | def mutate_random_individual(population, toolbox):
"""Picks a random individual from the population, and performs mutation on a copy of it.
Parameters
----------
population: array of individuals
Returns
----------
individual: individual
An individual which is a mutated copy of one ... | python | def mutate_random_individual(population, toolbox):
"""Picks a random individual from the population, and performs mutation on a copy of it.
Parameters
----------
population: array of individuals
Returns
----------
individual: individual
An individual which is a mutated copy of one ... | [
"def",
"mutate_random_individual",
"(",
"population",
",",
"toolbox",
")",
":",
"idx",
"=",
"np",
".",
"random",
".",
"randint",
"(",
"0",
",",
"len",
"(",
"population",
")",
")",
"ind",
"=",
"population",
"[",
"idx",
"]",
"ind",
",",
"=",
"toolbox",
... | Picks a random individual from the population, and performs mutation on a copy of it.
Parameters
----------
population: array of individuals
Returns
----------
individual: individual
An individual which is a mutated copy of one of the individuals in population,
the returned ind... | [
"Picks",
"a",
"random",
"individual",
"from",
"the",
"population",
"and",
"performs",
"mutation",
"on",
"a",
"copy",
"of",
"it",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/gp_deap.py#L76-L93 |
27,532 | EpistasisLab/tpot | tpot/export_utils.py | get_by_name | def get_by_name(opname, operators):
"""Return operator class instance by name.
Parameters
----------
opname: str
Name of the sklearn class that belongs to a TPOT operator
operators: list
List of operator classes from operator library
Returns
-------
ret_op_class: class
... | python | def get_by_name(opname, operators):
"""Return operator class instance by name.
Parameters
----------
opname: str
Name of the sklearn class that belongs to a TPOT operator
operators: list
List of operator classes from operator library
Returns
-------
ret_op_class: class
... | [
"def",
"get_by_name",
"(",
"opname",
",",
"operators",
")",
":",
"ret_op_classes",
"=",
"[",
"op",
"for",
"op",
"in",
"operators",
"if",
"op",
".",
"__name__",
"==",
"opname",
"]",
"if",
"len",
"(",
"ret_op_classes",
")",
"==",
"0",
":",
"raise",
"Type... | Return operator class instance by name.
Parameters
----------
opname: str
Name of the sklearn class that belongs to a TPOT operator
operators: list
List of operator classes from operator library
Returns
-------
ret_op_class: class
An operator class | [
"Return",
"operator",
"class",
"instance",
"by",
"name",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/export_utils.py#L25-L51 |
27,533 | EpistasisLab/tpot | tpot/export_utils.py | expr_to_tree | def expr_to_tree(ind, pset):
"""Convert the unstructured DEAP pipeline into a tree data-structure.
Parameters
----------
ind: deap.creator.Individual
The pipeline that is being exported
Returns
-------
pipeline_tree: list
List of operators in the current optimized pipeline
... | python | def expr_to_tree(ind, pset):
"""Convert the unstructured DEAP pipeline into a tree data-structure.
Parameters
----------
ind: deap.creator.Individual
The pipeline that is being exported
Returns
-------
pipeline_tree: list
List of operators in the current optimized pipeline
... | [
"def",
"expr_to_tree",
"(",
"ind",
",",
"pset",
")",
":",
"def",
"prim_to_list",
"(",
"prim",
",",
"args",
")",
":",
"if",
"isinstance",
"(",
"prim",
",",
"deap",
".",
"gp",
".",
"Terminal",
")",
":",
"if",
"prim",
".",
"name",
"in",
"pset",
".",
... | Convert the unstructured DEAP pipeline into a tree data-structure.
Parameters
----------
ind: deap.creator.Individual
The pipeline that is being exported
Returns
-------
pipeline_tree: list
List of operators in the current optimized pipeline
EXAMPLE:
pipeline:
... | [
"Convert",
"the",
"unstructured",
"DEAP",
"pipeline",
"into",
"a",
"tree",
"data",
"-",
"structure",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/export_utils.py#L125-L165 |
27,534 | EpistasisLab/tpot | tpot/export_utils.py | generate_pipeline_code | def generate_pipeline_code(pipeline_tree, operators):
"""Generate code specific to the construction of the sklearn Pipeline.
Parameters
----------
pipeline_tree: list
List of operators in the current optimized pipeline
Returns
-------
Source code for the sklearn pipeline
"""
... | python | def generate_pipeline_code(pipeline_tree, operators):
"""Generate code specific to the construction of the sklearn Pipeline.
Parameters
----------
pipeline_tree: list
List of operators in the current optimized pipeline
Returns
-------
Source code for the sklearn pipeline
"""
... | [
"def",
"generate_pipeline_code",
"(",
"pipeline_tree",
",",
"operators",
")",
":",
"steps",
"=",
"_process_operator",
"(",
"pipeline_tree",
",",
"operators",
")",
"pipeline_text",
"=",
"\"make_pipeline(\\n{STEPS}\\n)\"",
".",
"format",
"(",
"STEPS",
"=",
"_indent",
... | Generate code specific to the construction of the sklearn Pipeline.
Parameters
----------
pipeline_tree: list
List of operators in the current optimized pipeline
Returns
-------
Source code for the sklearn pipeline | [
"Generate",
"code",
"specific",
"to",
"the",
"construction",
"of",
"the",
"sklearn",
"Pipeline",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/export_utils.py#L275-L290 |
27,535 | EpistasisLab/tpot | tpot/export_utils.py | generate_export_pipeline_code | def generate_export_pipeline_code(pipeline_tree, operators):
"""Generate code specific to the construction of the sklearn Pipeline for export_pipeline.
Parameters
----------
pipeline_tree: list
List of operators in the current optimized pipeline
Returns
-------
Source code for the ... | python | def generate_export_pipeline_code(pipeline_tree, operators):
"""Generate code specific to the construction of the sklearn Pipeline for export_pipeline.
Parameters
----------
pipeline_tree: list
List of operators in the current optimized pipeline
Returns
-------
Source code for the ... | [
"def",
"generate_export_pipeline_code",
"(",
"pipeline_tree",
",",
"operators",
")",
":",
"steps",
"=",
"_process_operator",
"(",
"pipeline_tree",
",",
"operators",
")",
"# number of steps in a pipeline",
"num_step",
"=",
"len",
"(",
"steps",
")",
"if",
"num_step",
... | Generate code specific to the construction of the sklearn Pipeline for export_pipeline.
Parameters
----------
pipeline_tree: list
List of operators in the current optimized pipeline
Returns
-------
Source code for the sklearn pipeline | [
"Generate",
"code",
"specific",
"to",
"the",
"construction",
"of",
"the",
"sklearn",
"Pipeline",
"for",
"export_pipeline",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/export_utils.py#L293-L315 |
27,536 | EpistasisLab/tpot | tpot/export_utils.py | _indent | def _indent(text, amount):
"""Indent a multiline string by some number of spaces.
Parameters
----------
text: str
The text to be indented
amount: int
The number of spaces to indent the text
Returns
-------
indented_text
"""
indentation = amount * ' '
return... | python | def _indent(text, amount):
"""Indent a multiline string by some number of spaces.
Parameters
----------
text: str
The text to be indented
amount: int
The number of spaces to indent the text
Returns
-------
indented_text
"""
indentation = amount * ' '
return... | [
"def",
"_indent",
"(",
"text",
",",
"amount",
")",
":",
"indentation",
"=",
"amount",
"*",
"' '",
"return",
"indentation",
"+",
"(",
"'\\n'",
"+",
"indentation",
")",
".",
"join",
"(",
"text",
".",
"split",
"(",
"'\\n'",
")",
")"
] | Indent a multiline string by some number of spaces.
Parameters
----------
text: str
The text to be indented
amount: int
The number of spaces to indent the text
Returns
-------
indented_text | [
"Indent",
"a",
"multiline",
"string",
"by",
"some",
"number",
"of",
"spaces",
"."
] | b626271e6b5896a73fb9d7d29bebc7aa9100772e | https://github.com/EpistasisLab/tpot/blob/b626271e6b5896a73fb9d7d29bebc7aa9100772e/tpot/export_utils.py#L347-L363 |
27,537 | googleapis/google-cloud-python | api_core/google/api_core/page_iterator.py | Page.next | def next(self):
"""Get the next value in the page."""
item = six.next(self._item_iter)
result = self._item_to_value(self._parent, item)
# Since we've successfully got the next value from the
# iterator, we update the number of remaining.
self._remaining -= 1
retur... | python | def next(self):
"""Get the next value in the page."""
item = six.next(self._item_iter)
result = self._item_to_value(self._parent, item)
# Since we've successfully got the next value from the
# iterator, we update the number of remaining.
self._remaining -= 1
retur... | [
"def",
"next",
"(",
"self",
")",
":",
"item",
"=",
"six",
".",
"next",
"(",
"self",
".",
"_item_iter",
")",
"result",
"=",
"self",
".",
"_item_to_value",
"(",
"self",
".",
"_parent",
",",
"item",
")",
"# Since we've successfully got the next value from the",
... | Get the next value in the page. | [
"Get",
"the",
"next",
"value",
"in",
"the",
"page",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/page_iterator.py#L122-L129 |
27,538 | googleapis/google-cloud-python | api_core/google/api_core/page_iterator.py | HTTPIterator._verify_params | def _verify_params(self):
"""Verifies the parameters don't use any reserved parameter.
Raises:
ValueError: If a reserved parameter is used.
"""
reserved_in_use = self._RESERVED_PARAMS.intersection(self.extra_params)
if reserved_in_use:
raise ValueError("U... | python | def _verify_params(self):
"""Verifies the parameters don't use any reserved parameter.
Raises:
ValueError: If a reserved parameter is used.
"""
reserved_in_use = self._RESERVED_PARAMS.intersection(self.extra_params)
if reserved_in_use:
raise ValueError("U... | [
"def",
"_verify_params",
"(",
"self",
")",
":",
"reserved_in_use",
"=",
"self",
".",
"_RESERVED_PARAMS",
".",
"intersection",
"(",
"self",
".",
"extra_params",
")",
"if",
"reserved_in_use",
":",
"raise",
"ValueError",
"(",
"\"Using a reserved parameter\"",
",",
"r... | Verifies the parameters don't use any reserved parameter.
Raises:
ValueError: If a reserved parameter is used. | [
"Verifies",
"the",
"parameters",
"don",
"t",
"use",
"any",
"reserved",
"parameter",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/page_iterator.py#L343-L351 |
27,539 | googleapis/google-cloud-python | api_core/google/api_core/page_iterator.py | HTTPIterator._get_query_params | def _get_query_params(self):
"""Getter for query parameters for the next request.
Returns:
dict: A dictionary of query parameters.
"""
result = {}
if self.next_page_token is not None:
result[self._PAGE_TOKEN] = self.next_page_token
if self.max_res... | python | def _get_query_params(self):
"""Getter for query parameters for the next request.
Returns:
dict: A dictionary of query parameters.
"""
result = {}
if self.next_page_token is not None:
result[self._PAGE_TOKEN] = self.next_page_token
if self.max_res... | [
"def",
"_get_query_params",
"(",
"self",
")",
":",
"result",
"=",
"{",
"}",
"if",
"self",
".",
"next_page_token",
"is",
"not",
"None",
":",
"result",
"[",
"self",
".",
"_PAGE_TOKEN",
"]",
"=",
"self",
".",
"next_page_token",
"if",
"self",
".",
"max_resul... | Getter for query parameters for the next request.
Returns:
dict: A dictionary of query parameters. | [
"Getter",
"for",
"query",
"parameters",
"for",
"the",
"next",
"request",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/page_iterator.py#L385-L397 |
27,540 | googleapis/google-cloud-python | api_core/google/api_core/page_iterator.py | GRPCIterator._has_next_page | def _has_next_page(self):
"""Determines whether or not there are more pages with results.
Returns:
bool: Whether the iterator has more pages.
"""
if self.page_number == 0:
return True
if self.max_results is not None:
if self.num_results >= se... | python | def _has_next_page(self):
"""Determines whether or not there are more pages with results.
Returns:
bool: Whether the iterator has more pages.
"""
if self.page_number == 0:
return True
if self.max_results is not None:
if self.num_results >= se... | [
"def",
"_has_next_page",
"(",
"self",
")",
":",
"if",
"self",
".",
"page_number",
"==",
"0",
":",
"return",
"True",
"if",
"self",
".",
"max_results",
"is",
"not",
"None",
":",
"if",
"self",
".",
"num_results",
">=",
"self",
".",
"max_results",
":",
"re... | Determines whether or not there are more pages with results.
Returns:
bool: Whether the iterator has more pages. | [
"Determines",
"whether",
"or",
"not",
"there",
"are",
"more",
"pages",
"with",
"results",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/page_iterator.py#L534-L549 |
27,541 | googleapis/google-cloud-python | firestore/google/cloud/firestore_v1beta1/order.py | Order.compare | def compare(cls, left, right):
"""
Main comparison function for all Firestore types.
@return -1 is left < right, 0 if left == right, otherwise 1
"""
# First compare the types.
leftType = TypeOrder.from_value(left).value
rightType = TypeOrder.from_value(right).valu... | python | def compare(cls, left, right):
"""
Main comparison function for all Firestore types.
@return -1 is left < right, 0 if left == right, otherwise 1
"""
# First compare the types.
leftType = TypeOrder.from_value(left).value
rightType = TypeOrder.from_value(right).valu... | [
"def",
"compare",
"(",
"cls",
",",
"left",
",",
"right",
")",
":",
"# First compare the types.",
"leftType",
"=",
"TypeOrder",
".",
"from_value",
"(",
"left",
")",
".",
"value",
"rightType",
"=",
"TypeOrder",
".",
"from_value",
"(",
"right",
")",
".",
"val... | Main comparison function for all Firestore types.
@return -1 is left < right, 0 if left == right, otherwise 1 | [
"Main",
"comparison",
"function",
"for",
"all",
"Firestore",
"types",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/order.py#L62-L101 |
27,542 | googleapis/google-cloud-python | vision/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py | ImageAnnotatorClient.async_batch_annotate_images | def async_batch_annotate_images(
self,
requests,
output_config,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Run asynchronous image detection and annotation for a list of images.
... | python | def async_batch_annotate_images(
self,
requests,
output_config,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Run asynchronous image detection and annotation for a list of images.
... | [
"def",
"async_batch_annotate_images",
"(",
"self",
",",
"requests",
",",
"output_config",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"met... | Run asynchronous image detection and annotation for a list of images.
Progress and results can be retrieved through the
``google.longrunning.Operations`` interface. ``Operation.metadata``
contains ``OperationMetadata`` (metadata). ``Operation.response``
contains ``AsyncBatchAnnotateImag... | [
"Run",
"asynchronous",
"image",
"detection",
"and",
"annotation",
"for",
"a",
"list",
"of",
"images",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/vision/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py#L305-L399 |
27,543 | googleapis/google-cloud-python | bigquery/google/cloud/bigquery/__init__.py | load_ipython_extension | def load_ipython_extension(ipython):
"""Called by IPython when this module is loaded as an IPython extension."""
from google.cloud.bigquery.magics import _cell_magic
ipython.register_magic_function(
_cell_magic, magic_kind="cell", magic_name="bigquery"
) | python | def load_ipython_extension(ipython):
"""Called by IPython when this module is loaded as an IPython extension."""
from google.cloud.bigquery.magics import _cell_magic
ipython.register_magic_function(
_cell_magic, magic_kind="cell", magic_name="bigquery"
) | [
"def",
"load_ipython_extension",
"(",
"ipython",
")",
":",
"from",
"google",
".",
"cloud",
".",
"bigquery",
".",
"magics",
"import",
"_cell_magic",
"ipython",
".",
"register_magic_function",
"(",
"_cell_magic",
",",
"magic_kind",
"=",
"\"cell\"",
",",
"magic_name"... | Called by IPython when this module is loaded as an IPython extension. | [
"Called",
"by",
"IPython",
"when",
"this",
"module",
"is",
"loaded",
"as",
"an",
"IPython",
"extension",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/__init__.py#L131-L137 |
27,544 | googleapis/google-cloud-python | datastore/google/cloud/datastore/_http.py | _request | def _request(http, project, method, data, base_url):
"""Make a request over the Http transport to the Cloud Datastore API.
:type http: :class:`requests.Session`
:param http: HTTP object to make requests.
:type project: str
:param project: The project to make the request for.
:type method: str... | python | def _request(http, project, method, data, base_url):
"""Make a request over the Http transport to the Cloud Datastore API.
:type http: :class:`requests.Session`
:param http: HTTP object to make requests.
:type project: str
:param project: The project to make the request for.
:type method: str... | [
"def",
"_request",
"(",
"http",
",",
"project",
",",
"method",
",",
"data",
",",
"base_url",
")",
":",
"headers",
"=",
"{",
"\"Content-Type\"",
":",
"\"application/x-protobuf\"",
",",
"\"User-Agent\"",
":",
"connection_module",
".",
"DEFAULT_USER_AGENT",
",",
"c... | Make a request over the Http transport to the Cloud Datastore API.
:type http: :class:`requests.Session`
:param http: HTTP object to make requests.
:type project: str
:param project: The project to make the request for.
:type method: str
:param method: The API call method name (ie, ``runQuery... | [
"Make",
"a",
"request",
"over",
"the",
"Http",
"transport",
"to",
"the",
"Cloud",
"Datastore",
"API",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/_http.py#L38-L78 |
27,545 | googleapis/google-cloud-python | datastore/google/cloud/datastore/_http.py | _rpc | def _rpc(http, project, method, base_url, request_pb, response_pb_cls):
"""Make a protobuf RPC request.
:type http: :class:`requests.Session`
:param http: HTTP object to make requests.
:type project: str
:param project: The project to connect to. This is
usually your project na... | python | def _rpc(http, project, method, base_url, request_pb, response_pb_cls):
"""Make a protobuf RPC request.
:type http: :class:`requests.Session`
:param http: HTTP object to make requests.
:type project: str
:param project: The project to connect to. This is
usually your project na... | [
"def",
"_rpc",
"(",
"http",
",",
"project",
",",
"method",
",",
"base_url",
",",
"request_pb",
",",
"response_pb_cls",
")",
":",
"req_data",
"=",
"request_pb",
".",
"SerializeToString",
"(",
")",
"response",
"=",
"_request",
"(",
"http",
",",
"project",
",... | Make a protobuf RPC request.
:type http: :class:`requests.Session`
:param http: HTTP object to make requests.
:type project: str
:param project: The project to connect to. This is
usually your project name in the cloud console.
:type method: str
:param method: The name of ... | [
"Make",
"a",
"protobuf",
"RPC",
"request",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/_http.py#L81-L110 |
27,546 | googleapis/google-cloud-python | datastore/google/cloud/datastore/_http.py | build_api_url | def build_api_url(project, method, base_url):
"""Construct the URL for a particular API call.
This method is used internally to come up with the URL to use when
making RPCs to the Cloud Datastore API.
:type project: str
:param project: The project to connect to. This is
usually... | python | def build_api_url(project, method, base_url):
"""Construct the URL for a particular API call.
This method is used internally to come up with the URL to use when
making RPCs to the Cloud Datastore API.
:type project: str
:param project: The project to connect to. This is
usually... | [
"def",
"build_api_url",
"(",
"project",
",",
"method",
",",
"base_url",
")",
":",
"return",
"API_URL_TEMPLATE",
".",
"format",
"(",
"api_base",
"=",
"base_url",
",",
"api_version",
"=",
"API_VERSION",
",",
"project",
"=",
"project",
",",
"method",
"=",
"meth... | Construct the URL for a particular API call.
This method is used internally to come up with the URL to use when
making RPCs to the Cloud Datastore API.
:type project: str
:param project: The project to connect to. This is
usually your project name in the cloud console.
:type m... | [
"Construct",
"the",
"URL",
"for",
"a",
"particular",
"API",
"call",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/_http.py#L113-L134 |
27,547 | googleapis/google-cloud-python | datastore/google/cloud/datastore/_http.py | HTTPDatastoreAPI.lookup | def lookup(self, project_id, keys, read_options=None):
"""Perform a ``lookup`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type keys: List[.entity_pb2.Key]
:para... | python | def lookup(self, project_id, keys, read_options=None):
"""Perform a ``lookup`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type keys: List[.entity_pb2.Key]
:para... | [
"def",
"lookup",
"(",
"self",
",",
"project_id",
",",
"keys",
",",
"read_options",
"=",
"None",
")",
":",
"request_pb",
"=",
"_datastore_pb2",
".",
"LookupRequest",
"(",
"project_id",
"=",
"project_id",
",",
"read_options",
"=",
"read_options",
",",
"keys",
... | Perform a ``lookup`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type keys: List[.entity_pb2.Key]
:param keys: The keys to retrieve from the datastore.
:type re... | [
"Perform",
"a",
"lookup",
"request",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/_http.py#L149-L177 |
27,548 | googleapis/google-cloud-python | datastore/google/cloud/datastore/_http.py | HTTPDatastoreAPI.run_query | def run_query(
self, project_id, partition_id, read_options=None, query=None, gql_query=None
):
"""Perform a ``runQuery`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
... | python | def run_query(
self, project_id, partition_id, read_options=None, query=None, gql_query=None
):
"""Perform a ``runQuery`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
... | [
"def",
"run_query",
"(",
"self",
",",
"project_id",
",",
"partition_id",
",",
"read_options",
"=",
"None",
",",
"query",
"=",
"None",
",",
"gql_query",
"=",
"None",
")",
":",
"request_pb",
"=",
"_datastore_pb2",
".",
"RunQueryRequest",
"(",
"project_id",
"="... | Perform a ``runQuery`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type partition_id: :class:`.entity_pb2.PartitionId`
:param partition_id: Partition ID corresponding to... | [
"Perform",
"a",
"runQuery",
"request",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/_http.py#L179-L222 |
27,549 | googleapis/google-cloud-python | datastore/google/cloud/datastore/_http.py | HTTPDatastoreAPI.begin_transaction | def begin_transaction(self, project_id, transaction_options=None):
"""Perform a ``beginTransaction`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type transaction_options... | python | def begin_transaction(self, project_id, transaction_options=None):
"""Perform a ``beginTransaction`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type transaction_options... | [
"def",
"begin_transaction",
"(",
"self",
",",
"project_id",
",",
"transaction_options",
"=",
"None",
")",
":",
"request_pb",
"=",
"_datastore_pb2",
".",
"BeginTransactionRequest",
"(",
")",
"return",
"_rpc",
"(",
"self",
".",
"client",
".",
"_http",
",",
"proj... | Perform a ``beginTransaction`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type transaction_options: ~.datastore_v1.types.TransactionOptions
:param transaction_options: ... | [
"Perform",
"a",
"beginTransaction",
"request",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/_http.py#L224-L245 |
27,550 | googleapis/google-cloud-python | datastore/google/cloud/datastore/_http.py | HTTPDatastoreAPI.commit | def commit(self, project_id, mode, mutations, transaction=None):
"""Perform a ``commit`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type mode: :class:`.gapic.datastore.... | python | def commit(self, project_id, mode, mutations, transaction=None):
"""Perform a ``commit`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type mode: :class:`.gapic.datastore.... | [
"def",
"commit",
"(",
"self",
",",
"project_id",
",",
"mode",
",",
"mutations",
",",
"transaction",
"=",
"None",
")",
":",
"request_pb",
"=",
"_datastore_pb2",
".",
"CommitRequest",
"(",
"project_id",
"=",
"project_id",
",",
"mode",
"=",
"mode",
",",
"tran... | Perform a ``commit`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type mode: :class:`.gapic.datastore.v1.enums.CommitRequest.Mode`
:param mode: The type of commit to perf... | [
"Perform",
"a",
"commit",
"request",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/_http.py#L247-L283 |
27,551 | googleapis/google-cloud-python | datastore/google/cloud/datastore/_http.py | HTTPDatastoreAPI.rollback | def rollback(self, project_id, transaction):
"""Perform a ``rollback`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type transaction: bytes
:param transaction: Th... | python | def rollback(self, project_id, transaction):
"""Perform a ``rollback`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type transaction: bytes
:param transaction: Th... | [
"def",
"rollback",
"(",
"self",
",",
"project_id",
",",
"transaction",
")",
":",
"request_pb",
"=",
"_datastore_pb2",
".",
"RollbackRequest",
"(",
"project_id",
"=",
"project_id",
",",
"transaction",
"=",
"transaction",
")",
"# Response is empty (i.e. no fields) but w... | Perform a ``rollback`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type transaction: bytes
:param transaction: The transaction ID to rollback.
:rtype: :class:`.... | [
"Perform",
"a",
"rollback",
"request",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/_http.py#L285-L309 |
27,552 | googleapis/google-cloud-python | datastore/google/cloud/datastore/_http.py | HTTPDatastoreAPI.allocate_ids | def allocate_ids(self, project_id, keys):
"""Perform an ``allocateIds`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type keys: List[.entity_pb2.Key]
:param keys:... | python | def allocate_ids(self, project_id, keys):
"""Perform an ``allocateIds`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type keys: List[.entity_pb2.Key]
:param keys:... | [
"def",
"allocate_ids",
"(",
"self",
",",
"project_id",
",",
"keys",
")",
":",
"request_pb",
"=",
"_datastore_pb2",
".",
"AllocateIdsRequest",
"(",
"keys",
"=",
"keys",
")",
"return",
"_rpc",
"(",
"self",
".",
"client",
".",
"_http",
",",
"project_id",
",",... | Perform an ``allocateIds`` request.
:type project_id: str
:param project_id: The project to connect to. This is
usually your project name in the cloud console.
:type keys: List[.entity_pb2.Key]
:param keys: The keys for which the backend should allocate IDs.
... | [
"Perform",
"an",
"allocateIds",
"request",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/_http.py#L311-L332 |
27,553 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | _create_row_request | def _create_row_request(
table_name,
start_key=None,
end_key=None,
filter_=None,
limit=None,
end_inclusive=False,
app_profile_id=None,
row_set=None,
):
"""Creates a request to read rows in a table.
:type table_name: str
:param table_name: The name of the table to read from.
... | python | def _create_row_request(
table_name,
start_key=None,
end_key=None,
filter_=None,
limit=None,
end_inclusive=False,
app_profile_id=None,
row_set=None,
):
"""Creates a request to read rows in a table.
:type table_name: str
:param table_name: The name of the table to read from.
... | [
"def",
"_create_row_request",
"(",
"table_name",
",",
"start_key",
"=",
"None",
",",
"end_key",
"=",
"None",
",",
"filter_",
"=",
"None",
",",
"limit",
"=",
"None",
",",
"end_inclusive",
"=",
"False",
",",
"app_profile_id",
"=",
"None",
",",
"row_set",
"="... | Creates a request to read rows in a table.
:type table_name: str
:param table_name: The name of the table to read from.
:type start_key: bytes
:param start_key: (Optional) The beginning of a range of row keys to
read from. The range will include ``start_key``. If
... | [
"Creates",
"a",
"request",
"to",
"read",
"rows",
"in",
"a",
"table",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L862-L932 |
27,554 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | _mutate_rows_request | def _mutate_rows_request(table_name, rows, app_profile_id=None):
"""Creates a request to mutate rows in a table.
:type table_name: str
:param table_name: The name of the table to write to.
:type rows: list
:param rows: List or other iterable of :class:`.DirectRow` instances.
:type: app_profil... | python | def _mutate_rows_request(table_name, rows, app_profile_id=None):
"""Creates a request to mutate rows in a table.
:type table_name: str
:param table_name: The name of the table to write to.
:type rows: list
:param rows: List or other iterable of :class:`.DirectRow` instances.
:type: app_profil... | [
"def",
"_mutate_rows_request",
"(",
"table_name",
",",
"rows",
",",
"app_profile_id",
"=",
"None",
")",
":",
"request_pb",
"=",
"data_messages_v2_pb2",
".",
"MutateRowsRequest",
"(",
"table_name",
"=",
"table_name",
",",
"app_profile_id",
"=",
"app_profile_id",
")",... | Creates a request to mutate rows in a table.
:type table_name: str
:param table_name: The name of the table to write to.
:type rows: list
:param rows: List or other iterable of :class:`.DirectRow` instances.
:type: app_profile_id: str
:param app_profile_id: (Optional) The unique name of the A... | [
"Creates",
"a",
"request",
"to",
"mutate",
"rows",
"in",
"a",
"table",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L935-L966 |
27,555 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | _check_row_table_name | def _check_row_table_name(table_name, row):
"""Checks that a row belongs to a table.
:type table_name: str
:param table_name: The name of the table.
:type row: :class:`~google.cloud.bigtable.row.Row`
:param row: An instance of :class:`~google.cloud.bigtable.row.Row`
subclasses.
... | python | def _check_row_table_name(table_name, row):
"""Checks that a row belongs to a table.
:type table_name: str
:param table_name: The name of the table.
:type row: :class:`~google.cloud.bigtable.row.Row`
:param row: An instance of :class:`~google.cloud.bigtable.row.Row`
subclasses.
... | [
"def",
"_check_row_table_name",
"(",
"table_name",
",",
"row",
")",
":",
"if",
"row",
".",
"table",
"is",
"not",
"None",
"and",
"row",
".",
"table",
".",
"name",
"!=",
"table_name",
":",
"raise",
"TableMismatchError",
"(",
"\"Row %s is a part of %s table. Curren... | Checks that a row belongs to a table.
:type table_name: str
:param table_name: The name of the table.
:type row: :class:`~google.cloud.bigtable.row.Row`
:param row: An instance of :class:`~google.cloud.bigtable.row.Row`
subclasses.
:raises: :exc:`~.table.TableMismatchError` if the... | [
"Checks",
"that",
"a",
"row",
"belongs",
"to",
"a",
"table",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L969-L986 |
27,556 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.name | def name(self):
"""Table name used in requests.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_table_name]
:end-before: [END bigtable_table_name]
.. note::
This property will not change if ``table_id`` does not, but ... | python | def name(self):
"""Table name used in requests.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_table_name]
:end-before: [END bigtable_table_name]
.. note::
This property will not change if ``table_id`` does not, but ... | [
"def",
"name",
"(",
"self",
")",
":",
"project",
"=",
"self",
".",
"_instance",
".",
"_client",
".",
"project",
"instance_id",
"=",
"self",
".",
"_instance",
".",
"instance_id",
"table_client",
"=",
"self",
".",
"_instance",
".",
"_client",
".",
"table_dat... | Table name used in requests.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_table_name]
:end-before: [END bigtable_table_name]
.. note::
This property will not change if ``table_id`` does not, but the
return value ... | [
"Table",
"name",
"used",
"in",
"requests",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L113-L139 |
27,557 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.row | def row(self, row_key, filter_=None, append=False):
"""Factory to create a row associated with this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_table_row]
:end-before: [END bigtable_table_row]
.. warning::
... | python | def row(self, row_key, filter_=None, append=False):
"""Factory to create a row associated with this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_table_row]
:end-before: [END bigtable_table_row]
.. warning::
... | [
"def",
"row",
"(",
"self",
",",
"row_key",
",",
"filter_",
"=",
"None",
",",
"append",
"=",
"False",
")",
":",
"if",
"append",
"and",
"filter_",
"is",
"not",
"None",
":",
"raise",
"ValueError",
"(",
"\"At most one of filter_ and append can be set\"",
")",
"i... | Factory to create a row associated with this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_table_row]
:end-before: [END bigtable_table_row]
.. warning::
At most one of ``filter_`` and ``append`` can be used in a
... | [
"Factory",
"to",
"create",
"a",
"row",
"associated",
"with",
"this",
"table",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L163-L200 |
27,558 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.create | def create(self, initial_split_keys=[], column_families={}):
"""Creates this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_create_table]
:end-before: [END bigtable_create_table]
.. note::
A create request r... | python | def create(self, initial_split_keys=[], column_families={}):
"""Creates this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_create_table]
:end-before: [END bigtable_create_table]
.. note::
A create request r... | [
"def",
"create",
"(",
"self",
",",
"initial_split_keys",
"=",
"[",
"]",
",",
"column_families",
"=",
"{",
"}",
")",
":",
"table_client",
"=",
"self",
".",
"_instance",
".",
"_client",
".",
"table_admin_client",
"instance_name",
"=",
"self",
".",
"_instance",... | Creates this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_create_table]
:end-before: [END bigtable_create_table]
.. note::
A create request returns a
:class:`._generated.table_pb2.Table` but we don't u... | [
"Creates",
"this",
"table",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L210-L252 |
27,559 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.exists | def exists(self):
"""Check whether the table exists.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_check_table_exists]
:end-before: [END bigtable_check_table_exists]
:rtype: bool
:returns: True if the table exists, els... | python | def exists(self):
"""Check whether the table exists.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_check_table_exists]
:end-before: [END bigtable_check_table_exists]
:rtype: bool
:returns: True if the table exists, els... | [
"def",
"exists",
"(",
"self",
")",
":",
"table_client",
"=",
"self",
".",
"_instance",
".",
"_client",
".",
"table_admin_client",
"try",
":",
"table_client",
".",
"get_table",
"(",
"name",
"=",
"self",
".",
"name",
",",
"view",
"=",
"VIEW_NAME_ONLY",
")",
... | Check whether the table exists.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_check_table_exists]
:end-before: [END bigtable_check_table_exists]
:rtype: bool
:returns: True if the table exists, else False. | [
"Check",
"whether",
"the",
"table",
"exists",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L254-L271 |
27,560 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.delete | def delete(self):
"""Delete this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_delete_table]
:end-before: [END bigtable_delete_table]
"""
table_client = self._instance._client.table_admin_client
table_cl... | python | def delete(self):
"""Delete this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_delete_table]
:end-before: [END bigtable_delete_table]
"""
table_client = self._instance._client.table_admin_client
table_cl... | [
"def",
"delete",
"(",
"self",
")",
":",
"table_client",
"=",
"self",
".",
"_instance",
".",
"_client",
".",
"table_admin_client",
"table_client",
".",
"delete_table",
"(",
"name",
"=",
"self",
".",
"name",
")"
] | Delete this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_delete_table]
:end-before: [END bigtable_delete_table] | [
"Delete",
"this",
"table",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L273-L284 |
27,561 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.list_column_families | def list_column_families(self):
"""List the column families owned by this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_list_column_families]
:end-before: [END bigtable_list_column_families]
:rtype: dict
:return... | python | def list_column_families(self):
"""List the column families owned by this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_list_column_families]
:end-before: [END bigtable_list_column_families]
:rtype: dict
:return... | [
"def",
"list_column_families",
"(",
"self",
")",
":",
"table_client",
"=",
"self",
".",
"_instance",
".",
"_client",
".",
"table_admin_client",
"table_pb",
"=",
"table_client",
".",
"get_table",
"(",
"self",
".",
"name",
")",
"result",
"=",
"{",
"}",
"for",
... | List the column families owned by this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_list_column_families]
:end-before: [END bigtable_list_column_families]
:rtype: dict
:returns: Dictionary of column families attached t... | [
"List",
"the",
"column",
"families",
"owned",
"by",
"this",
"table",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L286-L311 |
27,562 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.get_cluster_states | def get_cluster_states(self):
"""List the cluster states owned by this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_get_cluster_states]
:end-before: [END bigtable_get_cluster_states]
:rtype: dict
:returns: Dict... | python | def get_cluster_states(self):
"""List the cluster states owned by this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_get_cluster_states]
:end-before: [END bigtable_get_cluster_states]
:rtype: dict
:returns: Dict... | [
"def",
"get_cluster_states",
"(",
"self",
")",
":",
"REPLICATION_VIEW",
"=",
"enums",
".",
"Table",
".",
"View",
".",
"REPLICATION_VIEW",
"table_client",
"=",
"self",
".",
"_instance",
".",
"_client",
".",
"table_admin_client",
"table_pb",
"=",
"table_client",
"... | List the cluster states owned by this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_get_cluster_states]
:end-before: [END bigtable_get_cluster_states]
:rtype: dict
:returns: Dictionary of cluster states for this table.
... | [
"List",
"the",
"cluster",
"states",
"owned",
"by",
"this",
"table",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L313-L335 |
27,563 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.read_row | def read_row(self, row_key, filter_=None):
"""Read a single row from this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_read_row]
:end-before: [END bigtable_read_row]
:type row_key: bytes
:param row_key: The key... | python | def read_row(self, row_key, filter_=None):
"""Read a single row from this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_read_row]
:end-before: [END bigtable_read_row]
:type row_key: bytes
:param row_key: The key... | [
"def",
"read_row",
"(",
"self",
",",
"row_key",
",",
"filter_",
"=",
"None",
")",
":",
"row_set",
"=",
"RowSet",
"(",
")",
"row_set",
".",
"add_row_key",
"(",
"row_key",
")",
"result_iter",
"=",
"iter",
"(",
"self",
".",
"read_rows",
"(",
"filter_",
"=... | Read a single row from this table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_read_row]
:end-before: [END bigtable_read_row]
:type row_key: bytes
:param row_key: The key of the row to read from.
:type filter_: :cla... | [
"Read",
"a",
"single",
"row",
"from",
"this",
"table",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L337-L365 |
27,564 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.mutate_rows | def mutate_rows(self, rows, retry=DEFAULT_RETRY):
"""Mutates multiple rows in bulk.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_mutate_rows]
:end-before: [END bigtable_mutate_rows]
The method tries to update all specified ro... | python | def mutate_rows(self, rows, retry=DEFAULT_RETRY):
"""Mutates multiple rows in bulk.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_mutate_rows]
:end-before: [END bigtable_mutate_rows]
The method tries to update all specified ro... | [
"def",
"mutate_rows",
"(",
"self",
",",
"rows",
",",
"retry",
"=",
"DEFAULT_RETRY",
")",
":",
"retryable_mutate_rows",
"=",
"_RetryableMutateRowsWorker",
"(",
"self",
".",
"_instance",
".",
"_client",
",",
"self",
".",
"name",
",",
"rows",
",",
"app_profile_id... | Mutates multiple rows in bulk.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_mutate_rows]
:end-before: [END bigtable_mutate_rows]
The method tries to update all specified rows.
If some of the rows weren't updated, it would not... | [
"Mutates",
"multiple",
"rows",
"in",
"bulk",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L479-L521 |
27,565 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.sample_row_keys | def sample_row_keys(self):
"""Read a sample of row keys in the table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_sample_row_keys]
:end-before: [END bigtable_sample_row_keys]
The returned row keys will delimit contiguous sec... | python | def sample_row_keys(self):
"""Read a sample of row keys in the table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_sample_row_keys]
:end-before: [END bigtable_sample_row_keys]
The returned row keys will delimit contiguous sec... | [
"def",
"sample_row_keys",
"(",
"self",
")",
":",
"data_client",
"=",
"self",
".",
"_instance",
".",
"_client",
".",
"table_data_client",
"response_iterator",
"=",
"data_client",
".",
"sample_row_keys",
"(",
"self",
".",
"name",
",",
"app_profile_id",
"=",
"self"... | Read a sample of row keys in the table.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_sample_row_keys]
:end-before: [END bigtable_sample_row_keys]
The returned row keys will delimit contiguous sections of the table of
approxim... | [
"Read",
"a",
"sample",
"of",
"row",
"keys",
"in",
"the",
"table",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L523-L565 |
27,566 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.truncate | def truncate(self, timeout=None):
"""Truncate the table
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_truncate_table]
:end-before: [END bigtable_truncate_table]
:type timeout: float
:param timeout: (Optional) The amoun... | python | def truncate(self, timeout=None):
"""Truncate the table
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_truncate_table]
:end-before: [END bigtable_truncate_table]
:type timeout: float
:param timeout: (Optional) The amoun... | [
"def",
"truncate",
"(",
"self",
",",
"timeout",
"=",
"None",
")",
":",
"client",
"=",
"self",
".",
"_instance",
".",
"_client",
"table_admin_client",
"=",
"client",
".",
"table_admin_client",
"if",
"timeout",
":",
"table_admin_client",
".",
"drop_row_range",
"... | Truncate the table
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_truncate_table]
:end-before: [END bigtable_truncate_table]
:type timeout: float
:param timeout: (Optional) The amount of time, in seconds, to wait
... | [
"Truncate",
"the",
"table"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L567-L595 |
27,567 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | Table.mutations_batcher | def mutations_batcher(self, flush_count=FLUSH_COUNT, max_row_bytes=MAX_ROW_BYTES):
"""Factory to create a mutation batcher associated with this instance.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_mutations_batcher]
:end-before: [EN... | python | def mutations_batcher(self, flush_count=FLUSH_COUNT, max_row_bytes=MAX_ROW_BYTES):
"""Factory to create a mutation batcher associated with this instance.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_mutations_batcher]
:end-before: [EN... | [
"def",
"mutations_batcher",
"(",
"self",
",",
"flush_count",
"=",
"FLUSH_COUNT",
",",
"max_row_bytes",
"=",
"MAX_ROW_BYTES",
")",
":",
"return",
"MutationsBatcher",
"(",
"self",
",",
"flush_count",
",",
"max_row_bytes",
")"
] | Factory to create a mutation batcher associated with this instance.
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_mutations_batcher]
:end-before: [END bigtable_mutations_batcher]
:type table: class
:param table: class:`~google... | [
"Factory",
"to",
"create",
"a",
"mutation",
"batcher",
"associated",
"with",
"this",
"instance",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L631-L655 |
27,568 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/table.py | _RetryableMutateRowsWorker._do_mutate_retryable_rows | def _do_mutate_retryable_rows(self):
"""Mutate all the rows that are eligible for retry.
A row is eligible for retry if it has not been tried or if it resulted
in a transient error in a previous call.
:rtype: list
:return: The responses statuses, which is a list of
... | python | def _do_mutate_retryable_rows(self):
"""Mutate all the rows that are eligible for retry.
A row is eligible for retry if it has not been tried or if it resulted
in a transient error in a previous call.
:rtype: list
:return: The responses statuses, which is a list of
... | [
"def",
"_do_mutate_retryable_rows",
"(",
"self",
")",
":",
"retryable_rows",
"=",
"[",
"]",
"index_into_all_rows",
"=",
"[",
"]",
"for",
"index",
",",
"status",
"in",
"enumerate",
"(",
"self",
".",
"responses_statuses",
")",
":",
"if",
"self",
".",
"_is_retr... | Mutate all the rows that are eligible for retry.
A row is eligible for retry if it has not been tried or if it resulted
in a transient error in a previous call.
:rtype: list
:return: The responses statuses, which is a list of
:class:`~google.rpc.status_pb2.Status`.
... | [
"Mutate",
"all",
"the",
"rows",
"that",
"are",
"eligible",
"for",
"retry",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/table.py#L712-L784 |
27,569 | googleapis/google-cloud-python | pubsub/google/cloud/pubsub_v1/subscriber/_protocol/heartbeater.py | Heartbeater.heartbeat | def heartbeat(self):
"""Periodically send heartbeats."""
while self._manager.is_active and not self._stop_event.is_set():
self._manager.heartbeat()
_LOGGER.debug("Sent heartbeat.")
self._stop_event.wait(timeout=self._period)
_LOGGER.info("%s exiting.", _HEART... | python | def heartbeat(self):
"""Periodically send heartbeats."""
while self._manager.is_active and not self._stop_event.is_set():
self._manager.heartbeat()
_LOGGER.debug("Sent heartbeat.")
self._stop_event.wait(timeout=self._period)
_LOGGER.info("%s exiting.", _HEART... | [
"def",
"heartbeat",
"(",
"self",
")",
":",
"while",
"self",
".",
"_manager",
".",
"is_active",
"and",
"not",
"self",
".",
"_stop_event",
".",
"is_set",
"(",
")",
":",
"self",
".",
"_manager",
".",
"heartbeat",
"(",
")",
"_LOGGER",
".",
"debug",
"(",
... | Periodically send heartbeats. | [
"Periodically",
"send",
"heartbeats",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/pubsub/google/cloud/pubsub_v1/subscriber/_protocol/heartbeater.py#L37-L44 |
27,570 | googleapis/google-cloud-python | error_reporting/google/cloud/errorreporting_v1beta1/gapic/report_errors_service_client.py | ReportErrorsServiceClient.report_error_event | def report_error_event(
self,
project_name,
event,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Report an individual error event.
Example:
>>> from google.clo... | python | def report_error_event(
self,
project_name,
event,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Report an individual error event.
Example:
>>> from google.clo... | [
"def",
"report_error_event",
"(",
"self",
",",
"project_name",
",",
"event",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
... | Report an individual error event.
Example:
>>> from google.cloud import errorreporting_v1beta1
>>>
>>> client = errorreporting_v1beta1.ReportErrorsServiceClient()
>>>
>>> project_name = client.project_path('[PROJECT]')
>>>
>>> ... | [
"Report",
"an",
"individual",
"error",
"event",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/errorreporting_v1beta1/gapic/report_errors_service_client.py#L188-L268 |
27,571 | googleapis/google-cloud-python | bigquery/google/cloud/bigquery/dbapi/_helpers.py | scalar_to_query_parameter | def scalar_to_query_parameter(value, name=None):
"""Convert a scalar value into a query parameter.
:type value: any
:param value: A scalar value to convert into a query parameter.
:type name: str
:param name: (Optional) Name of the query parameter.
:rtype: :class:`~google.cloud.bigquery.Scala... | python | def scalar_to_query_parameter(value, name=None):
"""Convert a scalar value into a query parameter.
:type value: any
:param value: A scalar value to convert into a query parameter.
:type name: str
:param name: (Optional) Name of the query parameter.
:rtype: :class:`~google.cloud.bigquery.Scala... | [
"def",
"scalar_to_query_parameter",
"(",
"value",
",",
"name",
"=",
"None",
")",
":",
"parameter_type",
"=",
"None",
"if",
"isinstance",
"(",
"value",
",",
"bool",
")",
":",
"parameter_type",
"=",
"\"BOOL\"",
"elif",
"isinstance",
"(",
"value",
",",
"numbers... | Convert a scalar value into a query parameter.
:type value: any
:param value: A scalar value to convert into a query parameter.
:type name: str
:param name: (Optional) Name of the query parameter.
:rtype: :class:`~google.cloud.bigquery.ScalarQueryParameter`
:returns:
A query parameter... | [
"Convert",
"a",
"scalar",
"value",
"into",
"a",
"query",
"parameter",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/dbapi/_helpers.py#L30-L72 |
27,572 | googleapis/google-cloud-python | bigquery/google/cloud/bigquery/dbapi/_helpers.py | to_query_parameters_dict | def to_query_parameters_dict(parameters):
"""Converts a dictionary of parameter values into query parameters.
:type parameters: Mapping[str, Any]
:param parameters: Dictionary of query parameter values.
:rtype: List[google.cloud.bigquery.query._AbstractQueryParameter]
:returns: A list of named que... | python | def to_query_parameters_dict(parameters):
"""Converts a dictionary of parameter values into query parameters.
:type parameters: Mapping[str, Any]
:param parameters: Dictionary of query parameter values.
:rtype: List[google.cloud.bigquery.query._AbstractQueryParameter]
:returns: A list of named que... | [
"def",
"to_query_parameters_dict",
"(",
"parameters",
")",
":",
"return",
"[",
"scalar_to_query_parameter",
"(",
"value",
",",
"name",
"=",
"name",
")",
"for",
"name",
",",
"value",
"in",
"six",
".",
"iteritems",
"(",
"parameters",
")",
"]"
] | Converts a dictionary of parameter values into query parameters.
:type parameters: Mapping[str, Any]
:param parameters: Dictionary of query parameter values.
:rtype: List[google.cloud.bigquery.query._AbstractQueryParameter]
:returns: A list of named query parameters. | [
"Converts",
"a",
"dictionary",
"of",
"parameter",
"values",
"into",
"query",
"parameters",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/dbapi/_helpers.py#L87-L99 |
27,573 | googleapis/google-cloud-python | bigquery/google/cloud/bigquery/dbapi/_helpers.py | to_query_parameters | def to_query_parameters(parameters):
"""Converts DB-API parameter values into query parameters.
:type parameters: Mapping[str, Any] or Sequence[Any]
:param parameters: A dictionary or sequence of query parameter values.
:rtype: List[google.cloud.bigquery.query._AbstractQueryParameter]
:returns: A ... | python | def to_query_parameters(parameters):
"""Converts DB-API parameter values into query parameters.
:type parameters: Mapping[str, Any] or Sequence[Any]
:param parameters: A dictionary or sequence of query parameter values.
:rtype: List[google.cloud.bigquery.query._AbstractQueryParameter]
:returns: A ... | [
"def",
"to_query_parameters",
"(",
"parameters",
")",
":",
"if",
"parameters",
"is",
"None",
":",
"return",
"[",
"]",
"if",
"isinstance",
"(",
"parameters",
",",
"collections_abc",
".",
"Mapping",
")",
":",
"return",
"to_query_parameters_dict",
"(",
"parameters"... | Converts DB-API parameter values into query parameters.
:type parameters: Mapping[str, Any] or Sequence[Any]
:param parameters: A dictionary or sequence of query parameter values.
:rtype: List[google.cloud.bigquery.query._AbstractQueryParameter]
:returns: A list of query parameters. | [
"Converts",
"DB",
"-",
"API",
"parameter",
"values",
"into",
"query",
"parameters",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/dbapi/_helpers.py#L102-L117 |
27,574 | googleapis/google-cloud-python | api_core/google/api_core/operation.py | _refresh_grpc | def _refresh_grpc(operations_stub, operation_name):
"""Refresh an operation using a gRPC client.
Args:
operations_stub (google.longrunning.operations_pb2.OperationsStub):
The gRPC operations stub.
operation_name (str): The name of the operation.
Returns:
google.longrunn... | python | def _refresh_grpc(operations_stub, operation_name):
"""Refresh an operation using a gRPC client.
Args:
operations_stub (google.longrunning.operations_pb2.OperationsStub):
The gRPC operations stub.
operation_name (str): The name of the operation.
Returns:
google.longrunn... | [
"def",
"_refresh_grpc",
"(",
"operations_stub",
",",
"operation_name",
")",
":",
"request_pb",
"=",
"operations_pb2",
".",
"GetOperationRequest",
"(",
"name",
"=",
"operation_name",
")",
"return",
"operations_stub",
".",
"GetOperation",
"(",
"request_pb",
")"
] | Refresh an operation using a gRPC client.
Args:
operations_stub (google.longrunning.operations_pb2.OperationsStub):
The gRPC operations stub.
operation_name (str): The name of the operation.
Returns:
google.longrunning.operations_pb2.Operation: The operation. | [
"Refresh",
"an",
"operation",
"using",
"a",
"gRPC",
"client",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/operation.py#L244-L256 |
27,575 | googleapis/google-cloud-python | api_core/google/api_core/operation.py | _cancel_grpc | def _cancel_grpc(operations_stub, operation_name):
"""Cancel an operation using a gRPC client.
Args:
operations_stub (google.longrunning.operations_pb2.OperationsStub):
The gRPC operations stub.
operation_name (str): The name of the operation.
"""
request_pb = operations_pb2... | python | def _cancel_grpc(operations_stub, operation_name):
"""Cancel an operation using a gRPC client.
Args:
operations_stub (google.longrunning.operations_pb2.OperationsStub):
The gRPC operations stub.
operation_name (str): The name of the operation.
"""
request_pb = operations_pb2... | [
"def",
"_cancel_grpc",
"(",
"operations_stub",
",",
"operation_name",
")",
":",
"request_pb",
"=",
"operations_pb2",
".",
"CancelOperationRequest",
"(",
"name",
"=",
"operation_name",
")",
"operations_stub",
".",
"CancelOperation",
"(",
"request_pb",
")"
] | Cancel an operation using a gRPC client.
Args:
operations_stub (google.longrunning.operations_pb2.OperationsStub):
The gRPC operations stub.
operation_name (str): The name of the operation. | [
"Cancel",
"an",
"operation",
"using",
"a",
"gRPC",
"client",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/operation.py#L259-L268 |
27,576 | googleapis/google-cloud-python | api_core/google/api_core/operation.py | from_grpc | def from_grpc(operation, operations_stub, result_type, **kwargs):
"""Create an operation future using a gRPC client.
This interacts with the long-running operations `service`_ (specific
to a given API) via gRPC.
.. _service: https://github.com/googleapis/googleapis/blob/\
050400df0fdb... | python | def from_grpc(operation, operations_stub, result_type, **kwargs):
"""Create an operation future using a gRPC client.
This interacts with the long-running operations `service`_ (specific
to a given API) via gRPC.
.. _service: https://github.com/googleapis/googleapis/blob/\
050400df0fdb... | [
"def",
"from_grpc",
"(",
"operation",
",",
"operations_stub",
",",
"result_type",
",",
"*",
"*",
"kwargs",
")",
":",
"refresh",
"=",
"functools",
".",
"partial",
"(",
"_refresh_grpc",
",",
"operations_stub",
",",
"operation",
".",
"name",
")",
"cancel",
"=",... | Create an operation future using a gRPC client.
This interacts with the long-running operations `service`_ (specific
to a given API) via gRPC.
.. _service: https://github.com/googleapis/googleapis/blob/\
050400df0fdb16f63b63e9dee53819044bffc857/\
google/longrunning/operat... | [
"Create",
"an",
"operation",
"future",
"using",
"a",
"gRPC",
"client",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/operation.py#L271-L294 |
27,577 | googleapis/google-cloud-python | api_core/google/api_core/operation.py | from_gapic | def from_gapic(operation, operations_client, result_type, **kwargs):
"""Create an operation future from a gapic client.
This interacts with the long-running operations `service`_ (specific
to a given API) via a gapic client.
.. _service: https://github.com/googleapis/googleapis/blob/\
... | python | def from_gapic(operation, operations_client, result_type, **kwargs):
"""Create an operation future from a gapic client.
This interacts with the long-running operations `service`_ (specific
to a given API) via a gapic client.
.. _service: https://github.com/googleapis/googleapis/blob/\
... | [
"def",
"from_gapic",
"(",
"operation",
",",
"operations_client",
",",
"result_type",
",",
"*",
"*",
"kwargs",
")",
":",
"refresh",
"=",
"functools",
".",
"partial",
"(",
"operations_client",
".",
"get_operation",
",",
"operation",
".",
"name",
")",
"cancel",
... | Create an operation future from a gapic client.
This interacts with the long-running operations `service`_ (specific
to a given API) via a gapic client.
.. _service: https://github.com/googleapis/googleapis/blob/\
050400df0fdb16f63b63e9dee53819044bffc857/\
google/longrunn... | [
"Create",
"an",
"operation",
"future",
"from",
"a",
"gapic",
"client",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/operation.py#L297-L320 |
27,578 | googleapis/google-cloud-python | api_core/google/api_core/operation.py | Operation._set_result_from_operation | def _set_result_from_operation(self):
"""Set the result or exception from the operation if it is complete."""
# This must be done in a lock to prevent the polling thread
# and main thread from both executing the completion logic
# at the same time.
with self._completion_lock:
... | python | def _set_result_from_operation(self):
"""Set the result or exception from the operation if it is complete."""
# This must be done in a lock to prevent the polling thread
# and main thread from both executing the completion logic
# at the same time.
with self._completion_lock:
... | [
"def",
"_set_result_from_operation",
"(",
"self",
")",
":",
"# This must be done in a lock to prevent the polling thread",
"# and main thread from both executing the completion logic",
"# at the same time.",
"with",
"self",
".",
"_completion_lock",
":",
"# If the operation isn't complete... | Set the result or exception from the operation if it is complete. | [
"Set",
"the",
"result",
"or",
"exception",
"from",
"the",
"operation",
"if",
"it",
"is",
"complete",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/operation.py#L116-L146 |
27,579 | googleapis/google-cloud-python | api_core/google/api_core/operation.py | Operation._refresh_and_update | def _refresh_and_update(self):
"""Refresh the operation and update the result if needed."""
# If the currently cached operation is done, no need to make another
# RPC as it will not change once done.
if not self._operation.done:
self._operation = self._refresh()
s... | python | def _refresh_and_update(self):
"""Refresh the operation and update the result if needed."""
# If the currently cached operation is done, no need to make another
# RPC as it will not change once done.
if not self._operation.done:
self._operation = self._refresh()
s... | [
"def",
"_refresh_and_update",
"(",
"self",
")",
":",
"# If the currently cached operation is done, no need to make another",
"# RPC as it will not change once done.",
"if",
"not",
"self",
".",
"_operation",
".",
"done",
":",
"self",
".",
"_operation",
"=",
"self",
".",
"_... | Refresh the operation and update the result if needed. | [
"Refresh",
"the",
"operation",
"and",
"update",
"the",
"result",
"if",
"needed",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/operation.py#L148-L154 |
27,580 | googleapis/google-cloud-python | api_core/google/api_core/operation.py | Operation.cancelled | def cancelled(self):
"""True if the operation was cancelled."""
self._refresh_and_update()
return (
self._operation.HasField("error")
and self._operation.error.code == code_pb2.CANCELLED
) | python | def cancelled(self):
"""True if the operation was cancelled."""
self._refresh_and_update()
return (
self._operation.HasField("error")
and self._operation.error.code == code_pb2.CANCELLED
) | [
"def",
"cancelled",
"(",
"self",
")",
":",
"self",
".",
"_refresh_and_update",
"(",
")",
"return",
"(",
"self",
".",
"_operation",
".",
"HasField",
"(",
"\"error\"",
")",
"and",
"self",
".",
"_operation",
".",
"error",
".",
"code",
"==",
"code_pb2",
".",... | True if the operation was cancelled. | [
"True",
"if",
"the",
"operation",
"was",
"cancelled",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/operation.py#L178-L184 |
27,581 | googleapis/google-cloud-python | storage/google/cloud/storage/acl.py | _ACLEntity.revoke | def revoke(self, role):
"""Remove a role from the entity.
:type role: str
:param role: The role to remove from the entity.
"""
if role in self.roles:
self.roles.remove(role) | python | def revoke(self, role):
"""Remove a role from the entity.
:type role: str
:param role: The role to remove from the entity.
"""
if role in self.roles:
self.roles.remove(role) | [
"def",
"revoke",
"(",
"self",
",",
"role",
")",
":",
"if",
"role",
"in",
"self",
".",
"roles",
":",
"self",
".",
"roles",
".",
"remove",
"(",
"role",
")"
] | Remove a role from the entity.
:type role: str
:param role: The role to remove from the entity. | [
"Remove",
"a",
"role",
"from",
"the",
"entity",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/acl.py#L133-L140 |
27,582 | googleapis/google-cloud-python | storage/google/cloud/storage/acl.py | ACL.validate_predefined | def validate_predefined(cls, predefined):
"""Ensures predefined is in list of predefined json values
:type predefined: str
:param predefined: name of a predefined acl
:type predefined: str
:param predefined: validated JSON name of predefined acl
:raises: :exc: `ValueEr... | python | def validate_predefined(cls, predefined):
"""Ensures predefined is in list of predefined json values
:type predefined: str
:param predefined: name of a predefined acl
:type predefined: str
:param predefined: validated JSON name of predefined acl
:raises: :exc: `ValueEr... | [
"def",
"validate_predefined",
"(",
"cls",
",",
"predefined",
")",
":",
"predefined",
"=",
"cls",
".",
"PREDEFINED_XML_ACLS",
".",
"get",
"(",
"predefined",
",",
"predefined",
")",
"if",
"predefined",
"and",
"predefined",
"not",
"in",
"cls",
".",
"PREDEFINED_JS... | Ensures predefined is in list of predefined json values
:type predefined: str
:param predefined: name of a predefined acl
:type predefined: str
:param predefined: validated JSON name of predefined acl
:raises: :exc: `ValueError`: If predefined is not a valid acl | [
"Ensures",
"predefined",
"is",
"in",
"list",
"of",
"predefined",
"json",
"values"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/acl.py#L215-L229 |
27,583 | googleapis/google-cloud-python | storage/google/cloud/storage/acl.py | ACL.entity_from_dict | def entity_from_dict(self, entity_dict):
"""Build an _ACLEntity object from a dictionary of data.
An entity is a mutable object that represents a list of roles
belonging to either a user or group or the special types for all
users and all authenticated users.
:type entity_dict:... | python | def entity_from_dict(self, entity_dict):
"""Build an _ACLEntity object from a dictionary of data.
An entity is a mutable object that represents a list of roles
belonging to either a user or group or the special types for all
users and all authenticated users.
:type entity_dict:... | [
"def",
"entity_from_dict",
"(",
"self",
",",
"entity_dict",
")",
":",
"entity",
"=",
"entity_dict",
"[",
"\"entity\"",
"]",
"role",
"=",
"entity_dict",
"[",
"\"role\"",
"]",
"if",
"entity",
"==",
"\"allUsers\"",
":",
"entity",
"=",
"self",
".",
"all",
"(",... | Build an _ACLEntity object from a dictionary of data.
An entity is a mutable object that represents a list of roles
belonging to either a user or group or the special types for all
users and all authenticated users.
:type entity_dict: dict
:param entity_dict: Dictionary full of... | [
"Build",
"an",
"_ACLEntity",
"object",
"from",
"a",
"dictionary",
"of",
"data",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/acl.py#L244-L274 |
27,584 | googleapis/google-cloud-python | storage/google/cloud/storage/acl.py | ACL.get_entity | def get_entity(self, entity, default=None):
"""Gets an entity object from the ACL.
:type entity: :class:`_ACLEntity` or string
:param entity: The entity to get lookup in the ACL.
:type default: anything
:param default: This value will be returned if the entity
... | python | def get_entity(self, entity, default=None):
"""Gets an entity object from the ACL.
:type entity: :class:`_ACLEntity` or string
:param entity: The entity to get lookup in the ACL.
:type default: anything
:param default: This value will be returned if the entity
... | [
"def",
"get_entity",
"(",
"self",
",",
"entity",
",",
"default",
"=",
"None",
")",
":",
"self",
".",
"_ensure_loaded",
"(",
")",
"return",
"self",
".",
"entities",
".",
"get",
"(",
"str",
"(",
"entity",
")",
",",
"default",
")"
] | Gets an entity object from the ACL.
:type entity: :class:`_ACLEntity` or string
:param entity: The entity to get lookup in the ACL.
:type default: anything
:param default: This value will be returned if the entity
doesn't exist.
:rtype: :class:`_ACLEnti... | [
"Gets",
"an",
"entity",
"object",
"from",
"the",
"ACL",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/acl.py#L288-L303 |
27,585 | googleapis/google-cloud-python | storage/google/cloud/storage/acl.py | ACL.add_entity | def add_entity(self, entity):
"""Add an entity to the ACL.
:type entity: :class:`_ACLEntity`
:param entity: The entity to add to this ACL.
"""
self._ensure_loaded()
self.entities[str(entity)] = entity | python | def add_entity(self, entity):
"""Add an entity to the ACL.
:type entity: :class:`_ACLEntity`
:param entity: The entity to add to this ACL.
"""
self._ensure_loaded()
self.entities[str(entity)] = entity | [
"def",
"add_entity",
"(",
"self",
",",
"entity",
")",
":",
"self",
".",
"_ensure_loaded",
"(",
")",
"self",
".",
"entities",
"[",
"str",
"(",
"entity",
")",
"]",
"=",
"entity"
] | Add an entity to the ACL.
:type entity: :class:`_ACLEntity`
:param entity: The entity to add to this ACL. | [
"Add",
"an",
"entity",
"to",
"the",
"ACL",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/acl.py#L305-L312 |
27,586 | googleapis/google-cloud-python | storage/google/cloud/storage/acl.py | ACL.entity | def entity(self, entity_type, identifier=None):
"""Factory method for creating an Entity.
If an entity with the same type and identifier already exists,
this will return a reference to that entity. If not, it will
create a new one and add it to the list of known entities for
th... | python | def entity(self, entity_type, identifier=None):
"""Factory method for creating an Entity.
If an entity with the same type and identifier already exists,
this will return a reference to that entity. If not, it will
create a new one and add it to the list of known entities for
th... | [
"def",
"entity",
"(",
"self",
",",
"entity_type",
",",
"identifier",
"=",
"None",
")",
":",
"entity",
"=",
"_ACLEntity",
"(",
"entity_type",
"=",
"entity_type",
",",
"identifier",
"=",
"identifier",
")",
"if",
"self",
".",
"has_entity",
"(",
"entity",
")",... | Factory method for creating an Entity.
If an entity with the same type and identifier already exists,
this will return a reference to that entity. If not, it will
create a new one and add it to the list of known entities for
this ACL.
:type entity_type: str
:param enti... | [
"Factory",
"method",
"for",
"creating",
"an",
"Entity",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/acl.py#L314-L338 |
27,587 | googleapis/google-cloud-python | storage/google/cloud/storage/acl.py | ACL.reload | def reload(self, client=None):
"""Reload the ACL data from Cloud Storage.
If :attr:`user_project` is set, bills the API request to that project.
:type client: :class:`~google.cloud.storage.client.Client` or
``NoneType``
:param client: Optional. The client to use. ... | python | def reload(self, client=None):
"""Reload the ACL data from Cloud Storage.
If :attr:`user_project` is set, bills the API request to that project.
:type client: :class:`~google.cloud.storage.client.Client` or
``NoneType``
:param client: Optional. The client to use. ... | [
"def",
"reload",
"(",
"self",
",",
"client",
"=",
"None",
")",
":",
"path",
"=",
"self",
".",
"reload_path",
"client",
"=",
"self",
".",
"_require_client",
"(",
"client",
")",
"query_params",
"=",
"{",
"}",
"if",
"self",
".",
"user_project",
"is",
"not... | Reload the ACL data from Cloud Storage.
If :attr:`user_project` is set, bills the API request to that project.
:type client: :class:`~google.cloud.storage.client.Client` or
``NoneType``
:param client: Optional. The client to use. If not passed, falls back
... | [
"Reload",
"the",
"ACL",
"data",
"from",
"Cloud",
"Storage",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/acl.py#L418-L442 |
27,588 | googleapis/google-cloud-python | storage/google/cloud/storage/acl.py | ACL.save | def save(self, acl=None, client=None):
"""Save this ACL for the current bucket.
If :attr:`user_project` is set, bills the API request to that project.
:type acl: :class:`google.cloud.storage.acl.ACL`, or a compatible list.
:param acl: The ACL object to save. If left blank, this will s... | python | def save(self, acl=None, client=None):
"""Save this ACL for the current bucket.
If :attr:`user_project` is set, bills the API request to that project.
:type acl: :class:`google.cloud.storage.acl.ACL`, or a compatible list.
:param acl: The ACL object to save. If left blank, this will s... | [
"def",
"save",
"(",
"self",
",",
"acl",
"=",
"None",
",",
"client",
"=",
"None",
")",
":",
"if",
"acl",
"is",
"None",
":",
"acl",
"=",
"self",
"save_to_backend",
"=",
"acl",
".",
"loaded",
"else",
":",
"save_to_backend",
"=",
"True",
"if",
"save_to_b... | Save this ACL for the current bucket.
If :attr:`user_project` is set, bills the API request to that project.
:type acl: :class:`google.cloud.storage.acl.ACL`, or a compatible list.
:param acl: The ACL object to save. If left blank, this will save
current entries.
... | [
"Save",
"this",
"ACL",
"for",
"the",
"current",
"bucket",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/acl.py#L483-L504 |
27,589 | googleapis/google-cloud-python | storage/google/cloud/storage/acl.py | ACL.save_predefined | def save_predefined(self, predefined, client=None):
"""Save this ACL for the current bucket using a predefined ACL.
If :attr:`user_project` is set, bills the API request to that project.
:type predefined: str
:param predefined: An identifier for a predefined ACL. Must be one
... | python | def save_predefined(self, predefined, client=None):
"""Save this ACL for the current bucket using a predefined ACL.
If :attr:`user_project` is set, bills the API request to that project.
:type predefined: str
:param predefined: An identifier for a predefined ACL. Must be one
... | [
"def",
"save_predefined",
"(",
"self",
",",
"predefined",
",",
"client",
"=",
"None",
")",
":",
"predefined",
"=",
"self",
".",
"validate_predefined",
"(",
"predefined",
")",
"self",
".",
"_save",
"(",
"None",
",",
"predefined",
",",
"client",
")"
] | Save this ACL for the current bucket using a predefined ACL.
If :attr:`user_project` is set, bills the API request to that project.
:type predefined: str
:param predefined: An identifier for a predefined ACL. Must be one
of the keys in :attr:`PREDEFINED_JSON_ACLS`
... | [
"Save",
"this",
"ACL",
"for",
"the",
"current",
"bucket",
"using",
"a",
"predefined",
"ACL",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/acl.py#L506-L524 |
27,590 | googleapis/google-cloud-python | irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py | IncidentServiceClient.incident_path | def incident_path(cls, project, incident):
"""Return a fully-qualified incident string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}",
project=project,
incident=incident,
) | python | def incident_path(cls, project, incident):
"""Return a fully-qualified incident string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}",
project=project,
incident=incident,
) | [
"def",
"incident_path",
"(",
"cls",
",",
"project",
",",
"incident",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/incidents/{incident}\"",
",",
"project",
"=",
"project",
",",
"incident",
"=",
"in... | Return a fully-qualified incident string. | [
"Return",
"a",
"fully",
"-",
"qualified",
"incident",
"string",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py#L82-L88 |
27,591 | googleapis/google-cloud-python | irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py | IncidentServiceClient.annotation_path | def annotation_path(cls, project, incident, annotation):
"""Return a fully-qualified annotation string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}/annotations/{annotation}",
project=project,
incident=incident,
... | python | def annotation_path(cls, project, incident, annotation):
"""Return a fully-qualified annotation string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}/annotations/{annotation}",
project=project,
incident=incident,
... | [
"def",
"annotation_path",
"(",
"cls",
",",
"project",
",",
"incident",
",",
"annotation",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/incidents/{incident}/annotations/{annotation}\"",
",",
"project",
"... | Return a fully-qualified annotation string. | [
"Return",
"a",
"fully",
"-",
"qualified",
"annotation",
"string",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py#L91-L98 |
27,592 | googleapis/google-cloud-python | irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py | IncidentServiceClient.artifact_path | def artifact_path(cls, project, incident, artifact):
"""Return a fully-qualified artifact string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}/artifacts/{artifact}",
project=project,
incident=incident,
artifact=a... | python | def artifact_path(cls, project, incident, artifact):
"""Return a fully-qualified artifact string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}/artifacts/{artifact}",
project=project,
incident=incident,
artifact=a... | [
"def",
"artifact_path",
"(",
"cls",
",",
"project",
",",
"incident",
",",
"artifact",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/incidents/{incident}/artifacts/{artifact}\"",
",",
"project",
"=",
"p... | Return a fully-qualified artifact string. | [
"Return",
"a",
"fully",
"-",
"qualified",
"artifact",
"string",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py#L101-L108 |
27,593 | googleapis/google-cloud-python | irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py | IncidentServiceClient.role_assignment_path | def role_assignment_path(cls, project, incident, role_assignment):
"""Return a fully-qualified role_assignment string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}/roleAssignments/{role_assignment}",
project=project,
inciden... | python | def role_assignment_path(cls, project, incident, role_assignment):
"""Return a fully-qualified role_assignment string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}/roleAssignments/{role_assignment}",
project=project,
inciden... | [
"def",
"role_assignment_path",
"(",
"cls",
",",
"project",
",",
"incident",
",",
"role_assignment",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/incidents/{incident}/roleAssignments/{role_assignment}\"",
",... | Return a fully-qualified role_assignment string. | [
"Return",
"a",
"fully",
"-",
"qualified",
"role_assignment",
"string",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py#L111-L118 |
27,594 | googleapis/google-cloud-python | irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py | IncidentServiceClient.subscription_path | def subscription_path(cls, project, incident, subscription):
"""Return a fully-qualified subscription string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}/subscriptions/{subscription}",
project=project,
incident=incident,
... | python | def subscription_path(cls, project, incident, subscription):
"""Return a fully-qualified subscription string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}/subscriptions/{subscription}",
project=project,
incident=incident,
... | [
"def",
"subscription_path",
"(",
"cls",
",",
"project",
",",
"incident",
",",
"subscription",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/incidents/{incident}/subscriptions/{subscription}\"",
",",
"proje... | Return a fully-qualified subscription string. | [
"Return",
"a",
"fully",
"-",
"qualified",
"subscription",
"string",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py#L121-L128 |
27,595 | googleapis/google-cloud-python | irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py | IncidentServiceClient.tag_path | def tag_path(cls, project, incident, tag):
"""Return a fully-qualified tag string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}/tags/{tag}",
project=project,
incident=incident,
tag=tag,
) | python | def tag_path(cls, project, incident, tag):
"""Return a fully-qualified tag string."""
return google.api_core.path_template.expand(
"projects/{project}/incidents/{incident}/tags/{tag}",
project=project,
incident=incident,
tag=tag,
) | [
"def",
"tag_path",
"(",
"cls",
",",
"project",
",",
"incident",
",",
"tag",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/incidents/{incident}/tags/{tag}\"",
",",
"project",
"=",
"project",
",",
"i... | Return a fully-qualified tag string. | [
"Return",
"a",
"fully",
"-",
"qualified",
"tag",
"string",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py#L131-L138 |
27,596 | googleapis/google-cloud-python | irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py | IncidentServiceClient.signal_path | def signal_path(cls, project, signal):
"""Return a fully-qualified signal string."""
return google.api_core.path_template.expand(
"projects/{project}/signals/{signal}", project=project, signal=signal
) | python | def signal_path(cls, project, signal):
"""Return a fully-qualified signal string."""
return google.api_core.path_template.expand(
"projects/{project}/signals/{signal}", project=project, signal=signal
) | [
"def",
"signal_path",
"(",
"cls",
",",
"project",
",",
"signal",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/signals/{signal}\"",
",",
"project",
"=",
"project",
",",
"signal",
"=",
"signal",
"... | Return a fully-qualified signal string. | [
"Return",
"a",
"fully",
"-",
"qualified",
"signal",
"string",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py#L141-L145 |
27,597 | googleapis/google-cloud-python | irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py | IncidentServiceClient.escalate_incident | def escalate_incident(
self,
incident,
update_mask=None,
subscriptions=None,
tags=None,
roles=None,
artifacts=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
... | python | def escalate_incident(
self,
incident,
update_mask=None,
subscriptions=None,
tags=None,
roles=None,
artifacts=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
... | [
"def",
"escalate_incident",
"(",
"self",
",",
"incident",
",",
"update_mask",
"=",
"None",
",",
"subscriptions",
"=",
"None",
",",
"tags",
"=",
"None",
",",
"roles",
"=",
"None",
",",
"artifacts",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core"... | Escalates an incident.
Example:
>>> from google.cloud import irm_v1alpha2
>>>
>>> client = irm_v1alpha2.IncidentServiceClient()
>>>
>>> # TODO: Initialize `incident`:
>>> incident = {}
>>>
>>> response = client.esca... | [
"Escalates",
"an",
"incident",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py#L1527-L1632 |
27,598 | googleapis/google-cloud-python | irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py | IncidentServiceClient.send_shift_handoff | def send_shift_handoff(
self,
parent,
recipients,
subject,
cc=None,
notes_content_type=None,
notes_content=None,
incidents=None,
preview_only=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.meth... | python | def send_shift_handoff(
self,
parent,
recipients,
subject,
cc=None,
notes_content_type=None,
notes_content=None,
incidents=None,
preview_only=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.meth... | [
"def",
"send_shift_handoff",
"(",
"self",
",",
"parent",
",",
"recipients",
",",
"subject",
",",
"cc",
"=",
"None",
",",
"notes_content_type",
"=",
"None",
",",
"notes_content",
"=",
"None",
",",
"incidents",
"=",
"None",
",",
"preview_only",
"=",
"None",
... | Sends a summary of the shift for oncall handoff.
Example:
>>> from google.cloud import irm_v1alpha2
>>>
>>> client = irm_v1alpha2.IncidentServiceClient()
>>>
>>> parent = client.project_path('[PROJECT]')
>>>
>>> # TODO: Initial... | [
"Sends",
"a",
"summary",
"of",
"the",
"shift",
"for",
"oncall",
"handoff",
"."
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py#L1964-L2066 |
27,599 | googleapis/google-cloud-python | bigtable/google/cloud/bigtable/policy.py | Policy.bigtable_admins | def bigtable_admins(self):
"""Access to bigtable.admin role memebers
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_admins_policy]
:end-before: [END bigtable_admins_policy]
"""
result = set()
for member in self._bindin... | python | def bigtable_admins(self):
"""Access to bigtable.admin role memebers
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_admins_policy]
:end-before: [END bigtable_admins_policy]
"""
result = set()
for member in self._bindin... | [
"def",
"bigtable_admins",
"(",
"self",
")",
":",
"result",
"=",
"set",
"(",
")",
"for",
"member",
"in",
"self",
".",
"_bindings",
".",
"get",
"(",
"BIGTABLE_ADMIN_ROLE",
",",
"(",
")",
")",
":",
"result",
".",
"add",
"(",
"member",
")",
"return",
"fr... | Access to bigtable.admin role memebers
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_admins_policy]
:end-before: [END bigtable_admins_policy] | [
"Access",
"to",
"bigtable",
".",
"admin",
"role",
"memebers"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/policy.py#L83-L95 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.