body
stringlengths
26
98.2k
body_hash
int64
-9,222,864,604,528,158,000
9,221,803,474B
docstring
stringlengths
1
16.8k
path
stringlengths
5
230
name
stringlengths
1
96
repository_name
stringlengths
7
89
lang
stringclasses
1 value
body_without_docstring
stringlengths
20
98.2k
def get_dataframe(self, squeeze=True): '\n Cast recarrays for stress periods into single\n dataframe containing all stress periods.\n\n Parameters\n ----------\n squeeze : bool\n Reduce number of columns in dataframe to only include\n stress periods where a v...
6,324,942,353,991,596,000
Cast recarrays for stress periods into single dataframe containing all stress periods. Parameters ---------- squeeze : bool Reduce number of columns in dataframe to only include stress periods where a variable changes. Returns ------- df : dataframe Dataframe of shape nrow = ncells, ncol = nvar x nper. If...
flopy/utils/util_list.py
get_dataframe
aleaf/flopy
python
def get_dataframe(self, squeeze=True): '\n Cast recarrays for stress periods into single\n dataframe containing all stress periods.\n\n Parameters\n ----------\n squeeze : bool\n Reduce number of columns in dataframe to only include\n stress periods where a v...
def get_indices(self): '\n a helper function for plotting - get all unique indices\n ' names = self.dtype.names lnames = [] [lnames.append(name.lower()) for name in names] if (('k' not in lnames) or ('j' not in lnames)): raise NotImplementedError('MfList.get_indices require...
3,431,313,341,761,410,600
a helper function for plotting - get all unique indices
flopy/utils/util_list.py
get_indices
aleaf/flopy
python
def get_indices(self): '\n \n ' names = self.dtype.names lnames = [] [lnames.append(name.lower()) for name in names] if (('k' not in lnames) or ('j' not in lnames)): raise NotImplementedError('MfList.get_indices requires kij') kpers = list(self.data.keys()) kpers.so...
def plot(self, key=None, names=None, kper=0, filename_base=None, file_extension=None, mflay=None, **kwargs): "\n Plot stress period boundary condition (MfList) data for a specified\n stress period\n\n Parameters\n ----------\n key : str\n MfList dictionary key. (default...
7,490,638,837,416,212,000
Plot stress period boundary condition (MfList) data for a specified stress period Parameters ---------- key : str MfList dictionary key. (default is None) names : list List of names for figure titles. (default is None) kper : int MODFLOW zero-based stress period number to return. (default is zero) filename...
flopy/utils/util_list.py
plot
aleaf/flopy
python
def plot(self, key=None, names=None, kper=0, filename_base=None, file_extension=None, mflay=None, **kwargs): "\n Plot stress period boundary condition (MfList) data for a specified\n stress period\n\n Parameters\n ----------\n key : str\n MfList dictionary key. (default...
def to_shapefile(self, filename, kper=None): "\n Export stress period boundary condition (MfList) data for a specified\n stress period\n\n Parameters\n ----------\n filename : str\n Shapefile name to write\n kper : int\n MODFLOW zero-based stress perio...
-2,751,994,616,249,143,000
Export stress period boundary condition (MfList) data for a specified stress period Parameters ---------- filename : str Shapefile name to write kper : int MODFLOW zero-based stress period number to return. (default is None) Returns ---------- None See Also -------- Notes ----- Examples -------- >>> import...
flopy/utils/util_list.py
to_shapefile
aleaf/flopy
python
def to_shapefile(self, filename, kper=None): "\n Export stress period boundary condition (MfList) data for a specified\n stress period\n\n Parameters\n ----------\n filename : str\n Shapefile name to write\n kper : int\n MODFLOW zero-based stress perio...
def to_array(self, kper=0, mask=False): "\n Convert stress period boundary condition (MfList) data for a\n specified stress period to a 3-D numpy array\n\n Parameters\n ----------\n kper : int\n MODFLOW zero-based stress period number to return. (default is zero)\n ...
49,518,715,375,102,890
Convert stress period boundary condition (MfList) data for a specified stress period to a 3-D numpy array Parameters ---------- kper : int MODFLOW zero-based stress period number to return. (default is zero) mask : boolean return array with np.NaN instead of zero Returns ---------- out : dict of numpy.ndarrays...
flopy/utils/util_list.py
to_array
aleaf/flopy
python
def to_array(self, kper=0, mask=False): "\n Convert stress period boundary condition (MfList) data for a\n specified stress period to a 3-D numpy array\n\n Parameters\n ----------\n kper : int\n MODFLOW zero-based stress period number to return. (default is zero)\n ...
@classmethod def from_4d(cls, model, pak_name, m4ds): 'construct an MfList instance from a dict of\n (attribute_name,masked 4D ndarray\n Parameters\n ----------\n model : mbase derived type\n pak_name : str package name (e.g GHB)\n m4ds : {attribute name:4d mask...
7,955,611,825,442,068,000
construct an MfList instance from a dict of (attribute_name,masked 4D ndarray Parameters ---------- model : mbase derived type pak_name : str package name (e.g GHB) m4ds : {attribute name:4d masked numpy.ndarray} Returns ------- MfList instance
flopy/utils/util_list.py
from_4d
aleaf/flopy
python
@classmethod def from_4d(cls, model, pak_name, m4ds): 'construct an MfList instance from a dict of\n (attribute_name,masked 4D ndarray\n Parameters\n ----------\n model : mbase derived type\n pak_name : str package name (e.g GHB)\n m4ds : {attribute name:4d mask...
@staticmethod def masked4D_arrays_to_stress_period_data(dtype, m4ds): ' convert a dictionary of 4-dim masked arrays to\n a stress_period_data style dict of recarray\n Parameters\n ----------\n dtype : numpy dtype\n\n m4ds : dict {name:masked numpy 4-dim ndarray}\n ...
1,632,529,002,862,806,500
convert a dictionary of 4-dim masked arrays to a stress_period_data style dict of recarray Parameters ---------- dtype : numpy dtype m4ds : dict {name:masked numpy 4-dim ndarray} Returns ------- dict {kper:recarray}
flopy/utils/util_list.py
masked4D_arrays_to_stress_period_data
aleaf/flopy
python
@staticmethod def masked4D_arrays_to_stress_period_data(dtype, m4ds): ' convert a dictionary of 4-dim masked arrays to\n a stress_period_data style dict of recarray\n Parameters\n ----------\n dtype : numpy dtype\n\n m4ds : dict {name:masked numpy 4-dim ndarray}\n ...
@main_app.route('/api') def swagger(): '\n Responds with the OpenAPI specification for this application.\n ' return jsonify(spec.to_dict())
-3,434,190,599,110,189,000
Responds with the OpenAPI specification for this application.
flask_service/views.py
swagger
mwprog/atomist-flask-microservice
python
@main_app.route('/api') def swagger(): '\n \n ' return jsonify(spec.to_dict())
@main_app.route('/health') def health(): "\n Responds with the current's service health.\n\n Could be used by the liveness probe of a Kubernetes cluster for instance.\n " return ''
-8,312,535,159,261,387,000
Responds with the current's service health. Could be used by the liveness probe of a Kubernetes cluster for instance.
flask_service/views.py
health
mwprog/atomist-flask-microservice
python
@main_app.route('/health') def health(): "\n Responds with the current's service health.\n\n Could be used by the liveness probe of a Kubernetes cluster for instance.\n " return
@main_app.route('/status') def status(): "\n Responds with the current's service status.\n\n Could be used by the readiness probe of a Kubernetes cluster.\n " return ''
-83,078,368,568,048,130
Responds with the current's service status. Could be used by the readiness probe of a Kubernetes cluster.
flask_service/views.py
status
mwprog/atomist-flask-microservice
python
@main_app.route('/status') def status(): "\n Responds with the current's service status.\n\n Could be used by the readiness probe of a Kubernetes cluster.\n " return
def get_covariance(self): 'Compute data covariance with the generative model.\n\n ``cov = components_.T * S**2 * components_ + sigma2 * eye(n_features)``\n where S**2 contains the explained variances, and sigma2 contains the\n noise variances.\n\n Returns\n -------\n cov : ...
6,392,993,480,560,589,000
Compute data covariance with the generative model. ``cov = components_.T * S**2 * components_ + sigma2 * eye(n_features)`` where S**2 contains the explained variances, and sigma2 contains the noise variances. Returns ------- cov : array of shape=(n_features, n_features) Estimated covariance of data.
sklearn/decomposition/_base.py
get_covariance
40104/Scikit-Learn
python
def get_covariance(self): 'Compute data covariance with the generative model.\n\n ``cov = components_.T * S**2 * components_ + sigma2 * eye(n_features)``\n where S**2 contains the explained variances, and sigma2 contains the\n noise variances.\n\n Returns\n -------\n cov : ...
def get_precision(self): 'Compute data precision matrix with the generative model.\n\n Equals the inverse of the covariance but computed with\n the matrix inversion lemma for efficiency.\n\n Returns\n -------\n precision : array, shape=(n_features, n_features)\n Estimat...
316,780,617,108,224,700
Compute data precision matrix with the generative model. Equals the inverse of the covariance but computed with the matrix inversion lemma for efficiency. Returns ------- precision : array, shape=(n_features, n_features) Estimated precision of data.
sklearn/decomposition/_base.py
get_precision
40104/Scikit-Learn
python
def get_precision(self): 'Compute data precision matrix with the generative model.\n\n Equals the inverse of the covariance but computed with\n the matrix inversion lemma for efficiency.\n\n Returns\n -------\n precision : array, shape=(n_features, n_features)\n Estimat...
@abstractmethod def fit(self, X, y=None): 'Placeholder for fit. Subclasses should implement this method!\n\n Fit the model with X.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n Training data, where `n_samples` is the number of samples and\n ...
-3,515,658,082,423,659,500
Placeholder for fit. Subclasses should implement this method! Fit the model with X. Parameters ---------- X : array-like of shape (n_samples, n_features) Training data, where `n_samples` is the number of samples and `n_features` is the number of features. Returns ------- self : object Returns the instanc...
sklearn/decomposition/_base.py
fit
40104/Scikit-Learn
python
@abstractmethod def fit(self, X, y=None): 'Placeholder for fit. Subclasses should implement this method!\n\n Fit the model with X.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n Training data, where `n_samples` is the number of samples and\n ...
def transform(self, X): 'Apply dimensionality reduction to X.\n\n X is projected on the first principal components previously extracted\n from a training set.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n New data, where `n_samples` is ...
6,729,435,418,467,268,000
Apply dimensionality reduction to X. X is projected on the first principal components previously extracted from a training set. Parameters ---------- X : array-like of shape (n_samples, n_features) New data, where `n_samples` is the number of samples and `n_features` is the number of features. Returns ------...
sklearn/decomposition/_base.py
transform
40104/Scikit-Learn
python
def transform(self, X): 'Apply dimensionality reduction to X.\n\n X is projected on the first principal components previously extracted\n from a training set.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n New data, where `n_samples` is ...
def inverse_transform(self, X): 'Transform data back to its original space.\n\n In other words, return an input `X_original` whose transform would be X.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_components)\n New data, where `n_samples` is the number ...
-4,156,797,171,178,644,500
Transform data back to its original space. In other words, return an input `X_original` whose transform would be X. Parameters ---------- X : array-like of shape (n_samples, n_components) New data, where `n_samples` is the number of samples and `n_components` is the number of components. Returns ------- X_or...
sklearn/decomposition/_base.py
inverse_transform
40104/Scikit-Learn
python
def inverse_transform(self, X): 'Transform data back to its original space.\n\n In other words, return an input `X_original` whose transform would be X.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_components)\n New data, where `n_samples` is the number ...
@property def _n_features_out(self): 'Number of transformed output features.' return self.components_.shape[0]
-7,760,010,724,038,969,000
Number of transformed output features.
sklearn/decomposition/_base.py
_n_features_out
40104/Scikit-Learn
python
@property def _n_features_out(self): return self.components_.shape[0]
async def broadcast_avatar_position(room_channel_name, channel_name, json_data): "\n Sends the new avatar's position to the users of the room.\n " type = json_data['type'] payload = json_data['payload'] position = payload['position'] animate = payload['animate'] participant = (await sync_t...
-7,486,539,441,214,262,000
Sends the new avatar's position to the users of the room.
server/websockets/consumers/world/broadcasts/avatar.py
broadcast_avatar_position
Shadowsych/html5-msoy
python
async def broadcast_avatar_position(room_channel_name, channel_name, json_data): "\n \n " type = json_data['type'] payload = json_data['payload'] position = payload['position'] animate = payload['animate'] participant = (await sync_to_async(get_participant)(room_channel_name, channel_name)...
async def broadcast_avatar_state(room_channel_name, channel_name, json_data): "\n Sends the new avatar's state to the users of the room.\n " type = json_data['type'] payload = json_data['payload'] state = payload['value'] participant = (await sync_to_async(get_participant)(room_channel_name, c...
-5,717,356,674,393,249,000
Sends the new avatar's state to the users of the room.
server/websockets/consumers/world/broadcasts/avatar.py
broadcast_avatar_state
Shadowsych/html5-msoy
python
async def broadcast_avatar_state(room_channel_name, channel_name, json_data): "\n \n " type = json_data['type'] payload = json_data['payload'] state = payload['value'] participant = (await sync_to_async(get_participant)(room_channel_name, channel_name)) participant_id = (await sync_to_asyn...
def height(root): '\n DFS\n\n v = Vertices\n e = Edges\n d = Depth\n\n Time complexity: O(v + e)\n Space complexity: O(d)\n ' if root: return (1 + max(height(root.left), height(root.right))) else: return (- 1)
-1,252,895,384,553,899,300
DFS v = Vertices e = Edges d = Depth Time complexity: O(v + e) Space complexity: O(d)
HackerRank/Data Structures/Trees/height-of-a-binary-tree.py
height
danielfsousa/algorithms-solutions
python
def height(root): '\n DFS\n\n v = Vertices\n e = Edges\n d = Depth\n\n Time complexity: O(v + e)\n Space complexity: O(d)\n ' if root: return (1 + max(height(root.left), height(root.right))) else: return (- 1)
def set_random_seed(seed: Optional[int]=None) -> None: 'Set random seed for random, numpy, and pytorch.\n\n Args:\n seed: The random seed, defaults to `None` which select it randomly.\n ' max_value = np.iinfo(np.uint32).max min_value = np.iinfo(np.uint32).min try: seed = int(seed) ...
-7,442,857,920,851,555,000
Set random seed for random, numpy, and pytorch. Args: seed: The random seed, defaults to `None` which select it randomly.
src/emmental/utils/seed.py
set_random_seed
KeAWang/emmental
python
def set_random_seed(seed: Optional[int]=None) -> None: 'Set random seed for random, numpy, and pytorch.\n\n Args:\n seed: The random seed, defaults to `None` which select it randomly.\n ' max_value = np.iinfo(np.uint32).max min_value = np.iinfo(np.uint32).min try: seed = int(seed) ...
def setUp(self): 'Setup' super(TestName, self).setUp() self.collection.register(Name()) self.success_templates = ['fixtures/templates/good/outputs/name.yaml']
3,146,337,064,199,645,700
Setup
test/rules/outputs/test_name.py
setUp
SanderKnape/cfn-python-lint
python
def setUp(self): super(TestName, self).setUp() self.collection.register(Name()) self.success_templates = ['fixtures/templates/good/outputs/name.yaml']
def test_file_positive(self): 'Test Positive' self.helper_file_positive()
-1,556,978,985,838,885,400
Test Positive
test/rules/outputs/test_name.py
test_file_positive
SanderKnape/cfn-python-lint
python
def test_file_positive(self): self.helper_file_positive()
def test_file_negative(self): 'Test failure' self.helper_file_negative('fixtures/templates/bad/outputs/name.yaml', 1)
-4,366,943,575,606,948,000
Test failure
test/rules/outputs/test_name.py
test_file_negative
SanderKnape/cfn-python-lint
python
def test_file_negative(self): self.helper_file_negative('fixtures/templates/bad/outputs/name.yaml', 1)
def _infer_state_dtype(explicit_dtype, state): "Infer the dtype of an RNN state.\n\n Args:\n explicit_dtype: explicitly declared dtype or None.\n state: RNN's hidden state. Must be a Tensor or a nested iterable containing\n Tensors.\n\n Returns:\n dtype: inferred dtype of hidden state.\n\n Raises:\...
-5,892,994,636,942,259,000
Infer the dtype of an RNN state. Args: explicit_dtype: explicitly declared dtype or None. state: RNN's hidden state. Must be a Tensor or a nested iterable containing Tensors. Returns: dtype: inferred dtype of hidden state. Raises: ValueError: if `state` has heterogeneous dtypes or is empty.
tensorflow/python/ops/rnn.py
_infer_state_dtype
gameover27/hiptensorflow
python
def _infer_state_dtype(explicit_dtype, state): "Infer the dtype of an RNN state.\n\n Args:\n explicit_dtype: explicitly declared dtype or None.\n state: RNN's hidden state. Must be a Tensor or a nested iterable containing\n Tensors.\n\n Returns:\n dtype: inferred dtype of hidden state.\n\n Raises:\...
def _on_device(fn, device): "Build the subgraph defined by lambda `fn` on `device` if it's not None." if device: with ops.device(device): return fn() else: return fn()
-2,863,435,495,451,946,000
Build the subgraph defined by lambda `fn` on `device` if it's not None.
tensorflow/python/ops/rnn.py
_on_device
gameover27/hiptensorflow
python
def _on_device(fn, device): if device: with ops.device(device): return fn() else: return fn()
def _rnn_step(time, sequence_length, min_sequence_length, max_sequence_length, zero_output, state, call_cell, state_size, skip_conditionals=False): "Calculate one step of a dynamic RNN minibatch.\n\n Returns an (output, state) pair conditioned on the sequence_lengths.\n When skip_conditionals=False, the pseudocod...
-261,439,537,545,024,900
Calculate one step of a dynamic RNN minibatch. Returns an (output, state) pair conditioned on the sequence_lengths. When skip_conditionals=False, the pseudocode is something like: if t >= max_sequence_length: return (zero_output, state) if t < min_sequence_length: return call_cell() # Selectively output zeros or...
tensorflow/python/ops/rnn.py
_rnn_step
gameover27/hiptensorflow
python
def _rnn_step(time, sequence_length, min_sequence_length, max_sequence_length, zero_output, state, call_cell, state_size, skip_conditionals=False): "Calculate one step of a dynamic RNN minibatch.\n\n Returns an (output, state) pair conditioned on the sequence_lengths.\n When skip_conditionals=False, the pseudocod...
def _reverse_seq(input_seq, lengths): 'Reverse a list of Tensors up to specified lengths.\n\n Args:\n input_seq: Sequence of seq_len tensors of dimension (batch_size, n_features)\n or nested tuples of tensors.\n lengths: A `Tensor` of dimension batch_size, containing lengths for each\n ...
9,143,443,463,951,144,000
Reverse a list of Tensors up to specified lengths. Args: input_seq: Sequence of seq_len tensors of dimension (batch_size, n_features) or nested tuples of tensors. lengths: A `Tensor` of dimension batch_size, containing lengths for each sequence in the batch. If "None" is specified, simp...
tensorflow/python/ops/rnn.py
_reverse_seq
gameover27/hiptensorflow
python
def _reverse_seq(input_seq, lengths): 'Reverse a list of Tensors up to specified lengths.\n\n Args:\n input_seq: Sequence of seq_len tensors of dimension (batch_size, n_features)\n or nested tuples of tensors.\n lengths: A `Tensor` of dimension batch_size, containing lengths for each\n ...
def bidirectional_dynamic_rnn(cell_fw, cell_bw, inputs, sequence_length=None, initial_state_fw=None, initial_state_bw=None, dtype=None, parallel_iterations=None, swap_memory=False, time_major=False, scope=None): 'Creates a dynamic version of bidirectional recurrent neural network.\n\n Similar to the unidirectional...
-1,378,400,897,695,843,300
Creates a dynamic version of bidirectional recurrent neural network. Similar to the unidirectional case above (rnn) but takes input and builds independent forward and backward RNNs. The input_size of forward and backward cell must match. The initial state for both directions is zero by default (but can be set optional...
tensorflow/python/ops/rnn.py
bidirectional_dynamic_rnn
gameover27/hiptensorflow
python
def bidirectional_dynamic_rnn(cell_fw, cell_bw, inputs, sequence_length=None, initial_state_fw=None, initial_state_bw=None, dtype=None, parallel_iterations=None, swap_memory=False, time_major=False, scope=None): 'Creates a dynamic version of bidirectional recurrent neural network.\n\n Similar to the unidirectional...
def dynamic_rnn(cell, inputs, sequence_length=None, initial_state=None, dtype=None, parallel_iterations=None, swap_memory=False, time_major=False, scope=None): 'Creates a recurrent neural network specified by RNNCell `cell`.\n\n This function is functionally identical to the function `rnn` above, but\n performs f...
1,271,462,727,045,380,000
Creates a recurrent neural network specified by RNNCell `cell`. This function is functionally identical to the function `rnn` above, but performs fully dynamic unrolling of `inputs`. Unlike `rnn`, the input `inputs` is not a Python list of `Tensors`, one for each frame. Instead, `inputs` may be a single `Tensor` whe...
tensorflow/python/ops/rnn.py
dynamic_rnn
gameover27/hiptensorflow
python
def dynamic_rnn(cell, inputs, sequence_length=None, initial_state=None, dtype=None, parallel_iterations=None, swap_memory=False, time_major=False, scope=None): 'Creates a recurrent neural network specified by RNNCell `cell`.\n\n This function is functionally identical to the function `rnn` above, but\n performs f...
def _dynamic_rnn_loop(cell, inputs, initial_state, parallel_iterations, swap_memory, sequence_length=None, dtype=None): 'Internal implementation of Dynamic RNN.\n\n Args:\n cell: An instance of RNNCell.\n inputs: A `Tensor` of shape [time, batch_size, input_size], or a nested\n tuple of such elements.\n...
-1,497,298,739,967,970,000
Internal implementation of Dynamic RNN. Args: cell: An instance of RNNCell. inputs: A `Tensor` of shape [time, batch_size, input_size], or a nested tuple of such elements. initial_state: A `Tensor` of shape `[batch_size, state_size]`, or if `cell.state_size` is a tuple, then this should be a tuple of ...
tensorflow/python/ops/rnn.py
_dynamic_rnn_loop
gameover27/hiptensorflow
python
def _dynamic_rnn_loop(cell, inputs, initial_state, parallel_iterations, swap_memory, sequence_length=None, dtype=None): 'Internal implementation of Dynamic RNN.\n\n Args:\n cell: An instance of RNNCell.\n inputs: A `Tensor` of shape [time, batch_size, input_size], or a nested\n tuple of such elements.\n...
def raw_rnn(cell, loop_fn, parallel_iterations=None, swap_memory=False, scope=None): 'Creates an `RNN` specified by RNNCell `cell` and loop function `loop_fn`.\n\n **NOTE: This method is still in testing, and the API may change.**\n\n This function is a more primitive version of `dynamic_rnn` that provides\n mor...
-1,963,316,333,818,678,500
Creates an `RNN` specified by RNNCell `cell` and loop function `loop_fn`. **NOTE: This method is still in testing, and the API may change.** This function is a more primitive version of `dynamic_rnn` that provides more direct access to the inputs each iteration. It also provides more control over when to start and f...
tensorflow/python/ops/rnn.py
raw_rnn
gameover27/hiptensorflow
python
def raw_rnn(cell, loop_fn, parallel_iterations=None, swap_memory=False, scope=None): 'Creates an `RNN` specified by RNNCell `cell` and loop function `loop_fn`.\n\n **NOTE: This method is still in testing, and the API may change.**\n\n This function is a more primitive version of `dynamic_rnn` that provides\n mor...
def _maybe_copy_some_through(): 'Run RNN step. Pass through either no or some past state.' (new_output, new_state) = call_cell() nest.assert_same_structure(state, new_state) flat_new_state = nest.flatten(new_state) flat_new_output = nest.flatten(new_output) return control_flow_ops.cond((time < ...
-2,520,382,574,250,251,000
Run RNN step. Pass through either no or some past state.
tensorflow/python/ops/rnn.py
_maybe_copy_some_through
gameover27/hiptensorflow
python
def _maybe_copy_some_through(): (new_output, new_state) = call_cell() nest.assert_same_structure(state, new_state) flat_new_state = nest.flatten(new_state) flat_new_output = nest.flatten(new_output) return control_flow_ops.cond((time < min_sequence_length), (lambda : (flat_new_output + flat_new...
def _time_step(time, output_ta_t, state): 'Take a time step of the dynamic RNN.\n\n Args:\n time: int32 scalar Tensor.\n output_ta_t: List of `TensorArray`s that represent the output.\n state: nested tuple of vector tensors that represent the state.\n\n Returns:\n The tuple (time + 1, outp...
-4,486,669,498,042,699,000
Take a time step of the dynamic RNN. Args: time: int32 scalar Tensor. output_ta_t: List of `TensorArray`s that represent the output. state: nested tuple of vector tensors that represent the state. Returns: The tuple (time + 1, output_ta_t with updated flow, new_state).
tensorflow/python/ops/rnn.py
_time_step
gameover27/hiptensorflow
python
def _time_step(time, output_ta_t, state): 'Take a time step of the dynamic RNN.\n\n Args:\n time: int32 scalar Tensor.\n output_ta_t: List of `TensorArray`s that represent the output.\n state: nested tuple of vector tensors that represent the state.\n\n Returns:\n The tuple (time + 1, outp...
def body(time, elements_finished, current_input, emit_ta, state, loop_state): 'Internal while loop body for raw_rnn.\n\n Args:\n time: time scalar.\n elements_finished: batch-size vector.\n current_input: possibly nested tuple of input tensors.\n emit_ta: possibly nested tuple of ou...
1,539,779,915,144,872,400
Internal while loop body for raw_rnn. Args: time: time scalar. elements_finished: batch-size vector. current_input: possibly nested tuple of input tensors. emit_ta: possibly nested tuple of output TensorArrays. state: possibly nested tuple of state tensors. loop_state: possibly nested tuple of loop state t...
tensorflow/python/ops/rnn.py
body
gameover27/hiptensorflow
python
def body(time, elements_finished, current_input, emit_ta, state, loop_state): 'Internal while loop body for raw_rnn.\n\n Args:\n time: time scalar.\n elements_finished: batch-size vector.\n current_input: possibly nested tuple of input tensors.\n emit_ta: possibly nested tuple of ou...
def _copy_some_through(current, candidate): 'Copy some tensors through via array_ops.where.' current_flat = nest.flatten(current) candidate_flat = nest.flatten(candidate) result_flat = [_on_device((lambda : array_ops.where(elements_finished, current_i, candidate_i)), device=candidate_i.op.device) for (c...
4,694,326,597,159,489,000
Copy some tensors through via array_ops.where.
tensorflow/python/ops/rnn.py
_copy_some_through
gameover27/hiptensorflow
python
def _copy_some_through(current, candidate): current_flat = nest.flatten(current) candidate_flat = nest.flatten(candidate) result_flat = [_on_device((lambda : array_ops.where(elements_finished, current_i, candidate_i)), device=candidate_i.op.device) for (current_i, candidate_i) in zip(current_flat, cand...
def extract_app(self, arch): '\n\t\tReturn an `App` object from this TAB. You must specify the desired\n\t\tMCU architecture so the correct binary can be retrieved.\n\t\t' binary_tarinfo = self.tab.getmember('{}.bin'.format(arch)) binary = self.tab.extractfile(binary_tarinfo).read() tbfh = TBFHeader(bin...
-8,530,720,299,191,283,000
Return an `App` object from this TAB. You must specify the desired MCU architecture so the correct binary can be retrieved.
tockloader/tab.py
extract_app
torfmaster/tockloader
python
def extract_app(self, arch): '\n\t\tReturn an `App` object from this TAB. You must specify the desired\n\t\tMCU architecture so the correct binary can be retrieved.\n\t\t' binary_tarinfo = self.tab.getmember('{}.bin'.format(arch)) binary = self.tab.extractfile(binary_tarinfo).read() tbfh = TBFHeader(bin...
def is_compatible_with_board(self, board): '\n\t\tCheck if the Tock app is compatible with a particular Tock board.\n\t\t' metadata = self.parse_metadata() if (metadata['tab-version'] == 1): return (('only-for-boards' not in metadata) or (board in metadata['only-for-boards']) or (metadata['only-for-...
-8,559,294,918,589,570,000
Check if the Tock app is compatible with a particular Tock board.
tockloader/tab.py
is_compatible_with_board
torfmaster/tockloader
python
def is_compatible_with_board(self, board): '\n\t\t\n\t\t' metadata = self.parse_metadata() if (metadata['tab-version'] == 1): return (('only-for-boards' not in metadata) or (board in metadata['only-for-boards']) or (metadata['only-for-boards'] == )) else: raise TockLoaderException('Unabl...
def parse_metadata(self): '\n\t\tOpen and parse the included metadata file in the TAB.\n\t\t' metadata_tarinfo = self.tab.getmember('metadata.toml') metadata_str = self.tab.extractfile(metadata_tarinfo).read().decode('utf-8') return pytoml.loads(metadata_str)
-3,623,499,767,396,370,000
Open and parse the included metadata file in the TAB.
tockloader/tab.py
parse_metadata
torfmaster/tockloader
python
def parse_metadata(self): '\n\t\t\n\t\t' metadata_tarinfo = self.tab.getmember('metadata.toml') metadata_str = self.tab.extractfile(metadata_tarinfo).read().decode('utf-8') return pytoml.loads(metadata_str)
def get_supported_architectures(self): '\n\t\tReturn a list of architectures that this TAB has compiled binaries for.\n\t\t' contained_files = self.tab.getnames() return [i[:(- 4)] for i in contained_files if (i[(- 4):] == '.bin')]
-3,800,365,372,095,071,000
Return a list of architectures that this TAB has compiled binaries for.
tockloader/tab.py
get_supported_architectures
torfmaster/tockloader
python
def get_supported_architectures(self): '\n\t\t\n\t\t' contained_files = self.tab.getnames() return [i[:(- 4)] for i in contained_files if (i[(- 4):] == '.bin')]
def get_tbf_header(self): '\n\t\tReturn a TBFHeader object with the TBF header from the app in the TAB.\n\t\tTBF headers are not architecture specific, so we pull from a random\n\t\tbinary if there are multiple architectures supported.\n\t\t' for f in self.tab.getnames(): if (f[(- 4):] == '.bin'): ...
-604,436,729,304,759,000
Return a TBFHeader object with the TBF header from the app in the TAB. TBF headers are not architecture specific, so we pull from a random binary if there are multiple architectures supported.
tockloader/tab.py
get_tbf_header
torfmaster/tockloader
python
def get_tbf_header(self): '\n\t\tReturn a TBFHeader object with the TBF header from the app in the TAB.\n\t\tTBF headers are not architecture specific, so we pull from a random\n\t\tbinary if there are multiple architectures supported.\n\t\t' for f in self.tab.getnames(): if (f[(- 4):] == '.bin'): ...
def beta_create_ImageAnnotator_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): 'The Beta API is deprecated for 0.15.0 and later.\n\n It is recommended to use the GA API (classes and functions in this\n file not marked beta) for all further purposes. This function was\n...
-7,068,467,836,664,310,000
The Beta API is deprecated for 0.15.0 and later. It is recommended to use the GA API (classes and functions in this file not marked beta) for all further purposes. This function was generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0
vision/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2.py
beta_create_ImageAnnotator_server
Alexander-Minyushkin/google-cloud-python
python
def beta_create_ImageAnnotator_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): 'The Beta API is deprecated for 0.15.0 and later.\n\n It is recommended to use the GA API (classes and functions in this\n file not marked beta) for all further purposes. This function was\n...
def beta_create_ImageAnnotator_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): 'The Beta API is deprecated for 0.15.0 and later.\n\n It is recommended to use the GA API (classes and functions in this\n file not marked beta) for all further purposes. This function was\n gener...
2,554,020,353,311,455,000
The Beta API is deprecated for 0.15.0 and later. It is recommended to use the GA API (classes and functions in this file not marked beta) for all further purposes. This function was generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0
vision/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2.py
beta_create_ImageAnnotator_stub
Alexander-Minyushkin/google-cloud-python
python
def beta_create_ImageAnnotator_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): 'The Beta API is deprecated for 0.15.0 and later.\n\n It is recommended to use the GA API (classes and functions in this\n file not marked beta) for all further purposes. This function was\n gener...
def __init__(self, channel): 'Constructor.\n\n Args:\n channel: A grpc.Channel.\n ' self.BatchAnnotateImages = channel.unary_unary('/google.cloud.vision.v1p1beta1.ImageAnnotator/BatchAnnotateImages', request_serializer=BatchAnnotateImagesRequest.SerializeToString, response_deserializer=BatchAnn...
7,415,371,588,454,651,000
Constructor. Args: channel: A grpc.Channel.
vision/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2.py
__init__
Alexander-Minyushkin/google-cloud-python
python
def __init__(self, channel): 'Constructor.\n\n Args:\n channel: A grpc.Channel.\n ' self.BatchAnnotateImages = channel.unary_unary('/google.cloud.vision.v1p1beta1.ImageAnnotator/BatchAnnotateImages', request_serializer=BatchAnnotateImagesRequest.SerializeToString, response_deserializer=BatchAnn...
def BatchAnnotateImages(self, request, context): 'Run image detection and annotation for a batch of images.\n ' context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
3,685,372,308,543,791,600
Run image detection and annotation for a batch of images.
vision/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2.py
BatchAnnotateImages
Alexander-Minyushkin/google-cloud-python
python
def BatchAnnotateImages(self, request, context): '\n ' context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
def BatchAnnotateImages(self, request, context): 'Run image detection and annotation for a batch of images.\n ' context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
823,033,015,200,478,100
Run image detection and annotation for a batch of images.
vision/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2.py
BatchAnnotateImages
Alexander-Minyushkin/google-cloud-python
python
def BatchAnnotateImages(self, request, context): '\n ' context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def BatchAnnotateImages(self, request, timeout, metadata=None, with_call=False, protocol_options=None): 'Run image detection and annotation for a batch of images.\n ' raise NotImplementedError()
-2,228,279,714,628,205,600
Run image detection and annotation for a batch of images.
vision/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2.py
BatchAnnotateImages
Alexander-Minyushkin/google-cloud-python
python
def BatchAnnotateImages(self, request, timeout, metadata=None, with_call=False, protocol_options=None): '\n ' raise NotImplementedError()
@property def V_max(self): '[float] The designed maximum liquid volume, not accounting for increased volume due to aeration, in m^3.' return self._V_max
-3,506,608,882,236,248,600
[float] The designed maximum liquid volume, not accounting for increased volume due to aeration, in m^3.
qsdsan/sanunits/_suspended_growth_bioreactor.py
V_max
QSD-for-WaSH/sanitation
python
@property def V_max(self): return self._V_max
@property def aeration(self): '[:class:`Process` or float or NoneType] Aeration model.' return self._aeration
-4,594,160,389,946,629,000
[:class:`Process` or float or NoneType] Aeration model.
qsdsan/sanunits/_suspended_growth_bioreactor.py
aeration
QSD-for-WaSH/sanitation
python
@property def aeration(self): return self._aeration
@property def suspended_growth_model(self): '[:class:`CompiledProcesses` or NoneType] Suspended growth model.' return self._model
-1,955,942,594,984,201,000
[:class:`CompiledProcesses` or NoneType] Suspended growth model.
qsdsan/sanunits/_suspended_growth_bioreactor.py
suspended_growth_model
QSD-for-WaSH/sanitation
python
@property def suspended_growth_model(self): return self._model
@property def DO_ID(self): '[str] The `Component` ID for dissolved oxygen used in the suspended growth model and the aeration model.' return self._DO_ID
-6,349,589,402,538,691,000
[str] The `Component` ID for dissolved oxygen used in the suspended growth model and the aeration model.
qsdsan/sanunits/_suspended_growth_bioreactor.py
DO_ID
QSD-for-WaSH/sanitation
python
@property def DO_ID(self): return self._DO_ID
@property def split(self): '[numpy.1darray or NoneType] The volumetric split of outs.' return self._split
2,645,588,217,702,961,000
[numpy.1darray or NoneType] The volumetric split of outs.
qsdsan/sanunits/_suspended_growth_bioreactor.py
split
QSD-for-WaSH/sanitation
python
@property def split(self): return self._split
@property def state(self): 'The state of the CSTR, including component concentrations [mg/L] and flow rate [m^3/d].' if (self._state is None): return None else: return dict(zip((list(self.components.IDs) + ['Q']), self._state))
-5,897,520,368,430,410,000
The state of the CSTR, including component concentrations [mg/L] and flow rate [m^3/d].
qsdsan/sanunits/_suspended_growth_bioreactor.py
state
QSD-for-WaSH/sanitation
python
@property def state(self): if (self._state is None): return None else: return dict(zip((list(self.components.IDs) + ['Q']), self._state))
def set_init_conc(self, **kwargs): 'set the initial concentrations [mg/L] of the CSTR.' Cs = np.zeros(len(self.components)) cmpx = self.components.index for (k, v) in kwargs.items(): Cs[cmpx(k)] = v self._concs = Cs
2,782,257,569,388,788,700
set the initial concentrations [mg/L] of the CSTR.
qsdsan/sanunits/_suspended_growth_bioreactor.py
set_init_conc
QSD-for-WaSH/sanitation
python
def set_init_conc(self, **kwargs): Cs = np.zeros(len(self.components)) cmpx = self.components.index for (k, v) in kwargs.items(): Cs[cmpx(k)] = v self._concs = Cs
def _run(self): 'Only to converge volumetric flows.' mixed = self._mixed mixed.mix_from(self.ins) Q = mixed.F_vol if (self.split is None): self.outs[0].copy_like(mixed) else: for (ws, spl) in zip(self._outs, self.split): ws.copy_like(mixed) ws.set_total_fl...
8,490,941,481,928,547,000
Only to converge volumetric flows.
qsdsan/sanunits/_suspended_growth_bioreactor.py
_run
QSD-for-WaSH/sanitation
python
def _run(self): mixed = self._mixed mixed.mix_from(self.ins) Q = mixed.F_vol if (self.split is None): self.outs[0].copy_like(mixed) else: for (ws, spl) in zip(self._outs, self.split): ws.copy_like(mixed) ws.set_total_flow((Q * spl), 'm3/hr')
def docstring_values(values, indent=8): '\n Formats a dictionary of values for inclusion in a docstring.\n ' return ('\n' + (' ' * indent)).join((("* ``'%s'``" % k) for (k, v) in sorted(values.items(), key=itemgetter(1))))
8,566,033,594,727,782,000
Formats a dictionary of values for inclusion in a docstring.
picamera/camera.py
docstring_values
RobertLucian/picamera
python
def docstring_values(values, indent=8): '\n \n ' return ('\n' + (' ' * indent)).join((("* ``'%s'``" % k) for (k, v) in sorted(values.items(), key=itemgetter(1))))
def _check_camera_open(self): '\n Raise an exception if the camera is already closed, or if the camera\n has encountered a fatal error.\n ' (exc, self._camera_exception) = (self._camera_exception, None) if exc: raise exc if self.closed: raise PiCameraClosed('Camera i...
-7,220,415,521,090,356,000
Raise an exception if the camera is already closed, or if the camera has encountered a fatal error.
picamera/camera.py
_check_camera_open
RobertLucian/picamera
python
def _check_camera_open(self): '\n Raise an exception if the camera is already closed, or if the camera\n has encountered a fatal error.\n ' (exc, self._camera_exception) = (self._camera_exception, None) if exc: raise exc if self.closed: raise PiCameraClosed('Camera i...
def _check_recording_stopped(self): '\n Raise an exception if the camera is currently recording.\n ' if self.recording: raise PiCameraRuntimeError('Recording is currently running')
-6,894,281,195,436,221,000
Raise an exception if the camera is currently recording.
picamera/camera.py
_check_recording_stopped
RobertLucian/picamera
python
def _check_recording_stopped(self): '\n \n ' if self.recording: raise PiCameraRuntimeError('Recording is currently running')
def _get_ports(self, from_video_port, splitter_port): "\n Determine the camera and output ports for given capture options.\n\n See :ref:`camera_hardware` for more information on picamera's usage of\n camera, splitter, and encoder ports. The general idea here is that the\n capture (still)...
5,066,261,328,255,325,000
Determine the camera and output ports for given capture options. See :ref:`camera_hardware` for more information on picamera's usage of camera, splitter, and encoder ports. The general idea here is that the capture (still) port operates on its own, while the video port is always connected to a splitter component, so r...
picamera/camera.py
_get_ports
RobertLucian/picamera
python
def _get_ports(self, from_video_port, splitter_port): "\n Determine the camera and output ports for given capture options.\n\n See :ref:`camera_hardware` for more information on picamera's usage of\n camera, splitter, and encoder ports. The general idea here is that the\n capture (still)...
def _get_output_format(self, output): '\n Given an output object, attempt to determine the requested format.\n\n We attempt to determine the filename of the *output* object and derive\n a MIME type from the extension. If *output* has no filename, an error\n is raised.\n ' if i...
-5,423,043,728,053,178,000
Given an output object, attempt to determine the requested format. We attempt to determine the filename of the *output* object and derive a MIME type from the extension. If *output* has no filename, an error is raised.
picamera/camera.py
_get_output_format
RobertLucian/picamera
python
def _get_output_format(self, output): '\n Given an output object, attempt to determine the requested format.\n\n We attempt to determine the filename of the *output* object and derive\n a MIME type from the extension. If *output* has no filename, an error\n is raised.\n ' if i...
def _get_image_format(self, output, format=None): '\n Given an output object and an optional format, attempt to determine the\n requested image format.\n\n This method is used by all capture methods to determine the requested\n output format. If *format* is specified as a MIME-type the "...
-5,771,226,095,761,120,000
Given an output object and an optional format, attempt to determine the requested image format. This method is used by all capture methods to determine the requested output format. If *format* is specified as a MIME-type the "image/" prefix is stripped. If *format* is not specified, then :meth:`_get_output_format` wil...
picamera/camera.py
_get_image_format
RobertLucian/picamera
python
def _get_image_format(self, output, format=None): '\n Given an output object and an optional format, attempt to determine the\n requested image format.\n\n This method is used by all capture methods to determine the requested\n output format. If *format* is specified as a MIME-type the "...
def _get_video_format(self, output, format=None): '\n Given an output object and an optional format, attempt to determine the\n requested video format.\n\n This method is used by all recording methods to determine the requested\n output format. If *format* is specified as a MIME-type the...
2,566,541,926,593,424,400
Given an output object and an optional format, attempt to determine the requested video format. This method is used by all recording methods to determine the requested output format. If *format* is specified as a MIME-type the "video/" or "application/" prefix will be stripped. If *format* is not specified, then :meth...
picamera/camera.py
_get_video_format
RobertLucian/picamera
python
def _get_video_format(self, output, format=None): '\n Given an output object and an optional format, attempt to determine the\n requested video format.\n\n This method is used by all recording methods to determine the requested\n output format. If *format* is specified as a MIME-type the...
def _get_image_encoder(self, camera_port, output_port, format, resize, **options): "\n Construct an image encoder for the requested parameters.\n\n This method is called by :meth:`capture` and :meth:`capture_continuous`\n to construct an image encoder. The *camera_port* parameter gives the\n ...
-7,457,254,361,250,503,000
Construct an image encoder for the requested parameters. This method is called by :meth:`capture` and :meth:`capture_continuous` to construct an image encoder. The *camera_port* parameter gives the MMAL camera port that should be enabled for capture by the encoder. The *output_port* parameter gives the MMAL port that ...
picamera/camera.py
_get_image_encoder
RobertLucian/picamera
python
def _get_image_encoder(self, camera_port, output_port, format, resize, **options): "\n Construct an image encoder for the requested parameters.\n\n This method is called by :meth:`capture` and :meth:`capture_continuous`\n to construct an image encoder. The *camera_port* parameter gives the\n ...
def _get_images_encoder(self, camera_port, output_port, format, resize, **options): '\n Construct a multi-image encoder for the requested parameters.\n\n This method is largely equivalent to :meth:`_get_image_encoder` with\n the exception that the encoder returned should expect to be passed an\...
-3,635,200,426,073,873,400
Construct a multi-image encoder for the requested parameters. This method is largely equivalent to :meth:`_get_image_encoder` with the exception that the encoder returned should expect to be passed an iterable of outputs to its :meth:`~PiEncoder.start` method, rather than a single output object. This method is called ...
picamera/camera.py
_get_images_encoder
RobertLucian/picamera
python
def _get_images_encoder(self, camera_port, output_port, format, resize, **options): '\n Construct a multi-image encoder for the requested parameters.\n\n This method is largely equivalent to :meth:`_get_image_encoder` with\n the exception that the encoder returned should expect to be passed an\...
def _get_video_encoder(self, camera_port, output_port, format, resize, **options): "\n Construct a video encoder for the requested parameters.\n\n This method is called by :meth:`start_recording` and\n :meth:`record_sequence` to construct a video encoder. The\n *camera_port* parameter g...
6,569,485,216,671,746,000
Construct a video encoder for the requested parameters. This method is called by :meth:`start_recording` and :meth:`record_sequence` to construct a video encoder. The *camera_port* parameter gives the MMAL camera port that should be enabled for capture by the encoder. The *output_port* parameter gives the MMAL port t...
picamera/camera.py
_get_video_encoder
RobertLucian/picamera
python
def _get_video_encoder(self, camera_port, output_port, format, resize, **options): "\n Construct a video encoder for the requested parameters.\n\n This method is called by :meth:`start_recording` and\n :meth:`record_sequence` to construct a video encoder. The\n *camera_port* parameter g...
def close(self): '\n Finalizes the state of the camera.\n\n After successfully constructing a :class:`PiCamera` object, you should\n ensure you call the :meth:`close` method once you are finished with the\n camera (e.g. in the ``finally`` section of a ``try..finally`` block).\n Th...
-1,952,082,261,474,689,300
Finalizes the state of the camera. After successfully constructing a :class:`PiCamera` object, you should ensure you call the :meth:`close` method once you are finished with the camera (e.g. in the ``finally`` section of a ``try..finally`` block). This method stops all recording and preview activities and releases all...
picamera/camera.py
close
RobertLucian/picamera
python
def close(self): '\n Finalizes the state of the camera.\n\n After successfully constructing a :class:`PiCamera` object, you should\n ensure you call the :meth:`close` method once you are finished with the\n camera (e.g. in the ``finally`` section of a ``try..finally`` block).\n Th...
def start_preview(self, **options): '\n Displays the preview overlay.\n\n This method starts a camera preview as an overlay on the Pi\'s primary\n display (HDMI or composite). A :class:`PiRenderer` instance (more\n specifically, a :class:`PiPreviewRenderer`) is constructed with the\n ...
5,153,514,928,868,468,000
Displays the preview overlay. This method starts a camera preview as an overlay on the Pi's primary display (HDMI or composite). A :class:`PiRenderer` instance (more specifically, a :class:`PiPreviewRenderer`) is constructed with the keyword arguments captured in *options*, and is returned from the method (this instan...
picamera/camera.py
start_preview
RobertLucian/picamera
python
def start_preview(self, **options): '\n Displays the preview overlay.\n\n This method starts a camera preview as an overlay on the Pi\'s primary\n display (HDMI or composite). A :class:`PiRenderer` instance (more\n specifically, a :class:`PiPreviewRenderer`) is constructed with the\n ...
def stop_preview(self): '\n Hides the preview overlay.\n\n If :meth:`start_preview` has previously been called, this method shuts\n down the preview display which generally results in the underlying\n display becoming visible again. If a preview is not currently running,\n no exce...
3,200,172,221,825,403,400
Hides the preview overlay. If :meth:`start_preview` has previously been called, this method shuts down the preview display which generally results in the underlying display becoming visible again. If a preview is not currently running, no exception is raised - the method will simply do nothing.
picamera/camera.py
stop_preview
RobertLucian/picamera
python
def stop_preview(self): '\n Hides the preview overlay.\n\n If :meth:`start_preview` has previously been called, this method shuts\n down the preview display which generally results in the underlying\n display becoming visible again. If a preview is not currently running,\n no exce...
def add_overlay(self, source, size=None, format=None, **options): '\n Adds a static overlay to the preview output.\n\n This method creates a new static overlay using the same rendering\n mechanism as the preview. Overlays will appear on the Pi\'s video\n output, but will not appear in ca...
-4,768,258,809,790,032,000
Adds a static overlay to the preview output. This method creates a new static overlay using the same rendering mechanism as the preview. Overlays will appear on the Pi's video output, but will not appear in captures or video recordings. Multiple overlays can exist; each call to :meth:`add_overlay` returns a new :class...
picamera/camera.py
add_overlay
RobertLucian/picamera
python
def add_overlay(self, source, size=None, format=None, **options): '\n Adds a static overlay to the preview output.\n\n This method creates a new static overlay using the same rendering\n mechanism as the preview. Overlays will appear on the Pi\'s video\n output, but will not appear in ca...
def remove_overlay(self, overlay): '\n Removes a static overlay from the preview output.\n\n This method removes an overlay which was previously created by\n :meth:`add_overlay`. The *overlay* parameter specifies the\n :class:`PiRenderer` instance that was returned by :meth:`add_overlay`...
-4,147,339,455,242,650,600
Removes a static overlay from the preview output. This method removes an overlay which was previously created by :meth:`add_overlay`. The *overlay* parameter specifies the :class:`PiRenderer` instance that was returned by :meth:`add_overlay`. .. versionadded:: 1.8
picamera/camera.py
remove_overlay
RobertLucian/picamera
python
def remove_overlay(self, overlay): '\n Removes a static overlay from the preview output.\n\n This method removes an overlay which was previously created by\n :meth:`add_overlay`. The *overlay* parameter specifies the\n :class:`PiRenderer` instance that was returned by :meth:`add_overlay`...
def start_recording(self, output, format=None, resize=None, splitter_port=1, **options): '\n Start recording video from the camera, storing it in *output*.\n\n If *output* is a string, it will be treated as a filename for a new\n file which the video will be written to. If *output* is not a str...
-7,157,117,653,464,527,000
Start recording video from the camera, storing it in *output*. If *output* is a string, it will be treated as a filename for a new file which the video will be written to. If *output* is not a string, but is an object with a ``write`` method, it is assumed to be a file-like object and the video data is appended to it ...
picamera/camera.py
start_recording
RobertLucian/picamera
python
def start_recording(self, output, format=None, resize=None, splitter_port=1, **options): '\n Start recording video from the camera, storing it in *output*.\n\n If *output* is a string, it will be treated as a filename for a new\n file which the video will be written to. If *output* is not a str...
def split_recording(self, output, splitter_port=1, **options): '\n Continue the recording in the specified output; close existing output.\n\n When called, the video encoder will wait for the next appropriate\n split point (an inline SPS header), then will cease writing to the\n current o...
3,772,228,076,396,274,000
Continue the recording in the specified output; close existing output. When called, the video encoder will wait for the next appropriate split point (an inline SPS header), then will cease writing to the current output (and close it, if it was specified as a filename), and continue writing to the newly specified *outp...
picamera/camera.py
split_recording
RobertLucian/picamera
python
def split_recording(self, output, splitter_port=1, **options): '\n Continue the recording in the specified output; close existing output.\n\n When called, the video encoder will wait for the next appropriate\n split point (an inline SPS header), then will cease writing to the\n current o...
def request_key_frame(self, splitter_port=1): "\n Request the encoder generate a key-frame as soon as possible.\n\n When called, the video encoder running on the specified *splitter_port*\n will attempt to produce a key-frame (full-image frame) as soon as\n possible. The *splitter_port* ...
-5,464,494,046,034,014,000
Request the encoder generate a key-frame as soon as possible. When called, the video encoder running on the specified *splitter_port* will attempt to produce a key-frame (full-image frame) as soon as possible. The *splitter_port* defaults to ``1``. Valid values are between ``0`` and ``3`` inclusive. .. note:: Th...
picamera/camera.py
request_key_frame
RobertLucian/picamera
python
def request_key_frame(self, splitter_port=1): "\n Request the encoder generate a key-frame as soon as possible.\n\n When called, the video encoder running on the specified *splitter_port*\n will attempt to produce a key-frame (full-image frame) as soon as\n possible. The *splitter_port* ...
def wait_recording(self, timeout=0, splitter_port=1): '\n Wait on the video encoder for timeout seconds.\n\n It is recommended that this method is called while recording to check\n for exceptions. If an error occurs during recording (for example out of\n disk space) the recording will st...
5,793,073,833,200,230,000
Wait on the video encoder for timeout seconds. It is recommended that this method is called while recording to check for exceptions. If an error occurs during recording (for example out of disk space) the recording will stop, but an exception will only be raised when the :meth:`wait_recording` or :meth:`stop_recording...
picamera/camera.py
wait_recording
RobertLucian/picamera
python
def wait_recording(self, timeout=0, splitter_port=1): '\n Wait on the video encoder for timeout seconds.\n\n It is recommended that this method is called while recording to check\n for exceptions. If an error occurs during recording (for example out of\n disk space) the recording will st...
def stop_recording(self, splitter_port=1): '\n Stop recording video from the camera.\n\n After calling this method the video encoder will be shut down and\n output will stop being written to the file-like object specified with\n :meth:`start_recording`. If an error occurred during record...
3,910,143,239,972,328,000
Stop recording video from the camera. After calling this method the video encoder will be shut down and output will stop being written to the file-like object specified with :meth:`start_recording`. If an error occurred during recording and :meth:`wait_recording` has not been called since the error then this method wi...
picamera/camera.py
stop_recording
RobertLucian/picamera
python
def stop_recording(self, splitter_port=1): '\n Stop recording video from the camera.\n\n After calling this method the video encoder will be shut down and\n output will stop being written to the file-like object specified with\n :meth:`start_recording`. If an error occurred during record...
def record_sequence(self, outputs, format='h264', resize=None, splitter_port=1, **options): "\n Record a sequence of video clips from the camera.\n\n This method accepts a sequence or iterator of *outputs* each of which\n must either be a string specifying a filename for output, or a\n f...
7,498,983,051,958,845,000
Record a sequence of video clips from the camera. This method accepts a sequence or iterator of *outputs* each of which must either be a string specifying a filename for output, or a file-like object with a ``write`` method. The method acts as an iterator itself, yielding each item of the sequence in turn. In this wa...
picamera/camera.py
record_sequence
RobertLucian/picamera
python
def record_sequence(self, outputs, format='h264', resize=None, splitter_port=1, **options): "\n Record a sequence of video clips from the camera.\n\n This method accepts a sequence or iterator of *outputs* each of which\n must either be a string specifying a filename for output, or a\n f...
def capture(self, output, format=None, use_video_port=False, resize=None, splitter_port=0, bayer=False, **options): '\n Capture an image from the camera, storing it in *output*.\n\n If *output* is a string, it will be treated as a filename for a new\n file which the image will be written to. If...
-4,667,808,940,049,474,000
Capture an image from the camera, storing it in *output*. If *output* is a string, it will be treated as a filename for a new file which the image will be written to. If *output* is not a string, but is an object with a ``write`` method, it is assumed to be a file-like object and the image data is appended to it (the ...
picamera/camera.py
capture
RobertLucian/picamera
python
def capture(self, output, format=None, use_video_port=False, resize=None, splitter_port=0, bayer=False, **options): '\n Capture an image from the camera, storing it in *output*.\n\n If *output* is a string, it will be treated as a filename for a new\n file which the image will be written to. If...
def capture_sequence(self, outputs, format='jpeg', use_video_port=False, resize=None, splitter_port=0, burst=False, bayer=False, **options): "\n Capture a sequence of consecutive images from the camera.\n\n This method accepts a sequence or iterator of *outputs* each of which\n must either be a...
8,720,782,316,086,409,000
Capture a sequence of consecutive images from the camera. This method accepts a sequence or iterator of *outputs* each of which must either be a string specifying a filename for output, or a file-like object with a ``write`` method, or a writeable buffer object. For each item in the sequence or iterator of outputs, th...
picamera/camera.py
capture_sequence
RobertLucian/picamera
python
def capture_sequence(self, outputs, format='jpeg', use_video_port=False, resize=None, splitter_port=0, burst=False, bayer=False, **options): "\n Capture a sequence of consecutive images from the camera.\n\n This method accepts a sequence or iterator of *outputs* each of which\n must either be a...
def capture_continuous(self, output, format=None, use_video_port=False, resize=None, splitter_port=0, burst=False, bayer=False, **options): "\n Capture images continuously from the camera as an infinite iterator.\n\n This method returns an infinite iterator of images captured\n continuously fro...
-7,093,969,075,329,482,000
Capture images continuously from the camera as an infinite iterator. This method returns an infinite iterator of images captured continuously from the camera. If *output* is a string, each captured image is stored in a file named after *output* after substitution of two values with the :meth:`~str.format` method. Thos...
picamera/camera.py
capture_continuous
RobertLucian/picamera
python
def capture_continuous(self, output, format=None, use_video_port=False, resize=None, splitter_port=0, burst=False, bayer=False, **options): "\n Capture images continuously from the camera as an infinite iterator.\n\n This method returns an infinite iterator of images captured\n continuously fro...
@property def closed(self): '\n Returns ``True`` if the :meth:`close` method has been called.\n ' return (not self._camera)
3,284,690,800,250,654,000
Returns ``True`` if the :meth:`close` method has been called.
picamera/camera.py
closed
RobertLucian/picamera
python
@property def closed(self): '\n \n ' return (not self._camera)
@property def recording(self): '\n Returns ``True`` if the :meth:`start_recording` method has been called,\n and no :meth:`stop_recording` call has been made yet.\n ' return any(((isinstance(e, PiVideoEncoder) and e.active) for e in self._encoders.values()))
-7,456,034,436,530,100,000
Returns ``True`` if the :meth:`start_recording` method has been called, and no :meth:`stop_recording` call has been made yet.
picamera/camera.py
recording
RobertLucian/picamera
python
@property def recording(self): '\n Returns ``True`` if the :meth:`start_recording` method has been called,\n and no :meth:`stop_recording` call has been made yet.\n ' return any(((isinstance(e, PiVideoEncoder) and e.active) for e in self._encoders.values()))
@property def previewing(self): '\n Returns ``True`` if the :meth:`start_preview` method has been called,\n and no :meth:`stop_preview` call has been made yet.\n\n .. deprecated:: 1.8\n Test whether :attr:`preview` is ``None`` instead.\n ' warnings.warn(PiCameraDeprecated(...
1,968,703,755,299,582,700
Returns ``True`` if the :meth:`start_preview` method has been called, and no :meth:`stop_preview` call has been made yet. .. deprecated:: 1.8 Test whether :attr:`preview` is ``None`` instead.
picamera/camera.py
previewing
RobertLucian/picamera
python
@property def previewing(self): '\n Returns ``True`` if the :meth:`start_preview` method has been called,\n and no :meth:`stop_preview` call has been made yet.\n\n .. deprecated:: 1.8\n Test whether :attr:`preview` is ``None`` instead.\n ' warnings.warn(PiCameraDeprecated(...
@property def revision(self): "\n Returns a string representing the revision of the Pi's camera module.\n At the time of writing, the string returned is 'ov5647' for the V1\n module, and 'imx219' for the V2 module.\n " return self._revision
-4,425,374,092,435,434,000
Returns a string representing the revision of the Pi's camera module. At the time of writing, the string returned is 'ov5647' for the V1 module, and 'imx219' for the V2 module.
picamera/camera.py
revision
RobertLucian/picamera
python
@property def revision(self): "\n Returns a string representing the revision of the Pi's camera module.\n At the time of writing, the string returned is 'ov5647' for the V1\n module, and 'imx219' for the V2 module.\n " return self._revision
@property def exif_tags(self): "\n Holds a mapping of the Exif tags to apply to captured images.\n\n .. note::\n\n Please note that Exif tagging is only supported with the ``jpeg``\n format.\n\n By default several Exif tags are automatically applied to any images\n ...
-2,373,883,298,329,916,400
Holds a mapping of the Exif tags to apply to captured images. .. note:: Please note that Exif tagging is only supported with the ``jpeg`` format. By default several Exif tags are automatically applied to any images taken with the :meth:`capture` method: ``IFD0.Make`` (which is set to ``RaspberryPi``), ``IFD0...
picamera/camera.py
exif_tags
RobertLucian/picamera
python
@property def exif_tags(self): "\n Holds a mapping of the Exif tags to apply to captured images.\n\n .. note::\n\n Please note that Exif tagging is only supported with the ``jpeg``\n format.\n\n By default several Exif tags are automatically applied to any images\n ...
def _disable_camera(self): '\n An internal method for disabling the camera, e.g. for re-configuration.\n This disables the splitter and preview connections (if they exist).\n ' self._splitter.connection.disable() self._preview.renderer.connection.disable() self._camera.disable()
3,535,478,066,715,093,000
An internal method for disabling the camera, e.g. for re-configuration. This disables the splitter and preview connections (if they exist).
picamera/camera.py
_disable_camera
RobertLucian/picamera
python
def _disable_camera(self): '\n An internal method for disabling the camera, e.g. for re-configuration.\n This disables the splitter and preview connections (if they exist).\n ' self._splitter.connection.disable() self._preview.renderer.connection.disable() self._camera.disable()
def _enable_camera(self): '\n An internal method for enabling the camera after re-configuration.\n This ensures the splitter configuration is consistent, then re-enables\n the camera along with the splitter and preview connections.\n ' self._camera.enable() self._preview.renderer...
1,428,951,581,791,775,700
An internal method for enabling the camera after re-configuration. This ensures the splitter configuration is consistent, then re-enables the camera along with the splitter and preview connections.
picamera/camera.py
_enable_camera
RobertLucian/picamera
python
def _enable_camera(self): '\n An internal method for enabling the camera after re-configuration.\n This ensures the splitter configuration is consistent, then re-enables\n the camera along with the splitter and preview connections.\n ' self._camera.enable() self._preview.renderer...
def _configure_splitter(self): '\n Ensures all splitter output ports have a sensible format (I420) and\n buffer sizes.\n\n This method is used to ensure the splitter configuration is sane,\n typically after :meth:`_configure_camera` is called.\n ' self._splitter.inputs[0].copy...
-1,595,100,311,936,897,000
Ensures all splitter output ports have a sensible format (I420) and buffer sizes. This method is used to ensure the splitter configuration is sane, typically after :meth:`_configure_camera` is called.
picamera/camera.py
_configure_splitter
RobertLucian/picamera
python
def _configure_splitter(self): '\n Ensures all splitter output ports have a sensible format (I420) and\n buffer sizes.\n\n This method is used to ensure the splitter configuration is sane,\n typically after :meth:`_configure_camera` is called.\n ' self._splitter.inputs[0].copy...
def _configure_camera(self, sensor_mode, framerate, resolution, clock_mode, old_sensor_mode=0): "\n An internal method for setting a new camera mode, framerate,\n resolution, and/or clock_mode.\n\n This method is used by the setters of the :attr:`resolution`,\n :attr:`framerate`, and :at...
863,730,291,302,044,500
An internal method for setting a new camera mode, framerate, resolution, and/or clock_mode. This method is used by the setters of the :attr:`resolution`, :attr:`framerate`, and :attr:`sensor_mode` properties. It assumes the camera is currently disabled. The *old_mode* and *new_mode* arguments are required to ensure co...
picamera/camera.py
_configure_camera
RobertLucian/picamera
python
def _configure_camera(self, sensor_mode, framerate, resolution, clock_mode, old_sensor_mode=0): "\n An internal method for setting a new camera mode, framerate,\n resolution, and/or clock_mode.\n\n This method is used by the setters of the :attr:`resolution`,\n :attr:`framerate`, and :at...
@logical_and.register('Number', 'Number') def _logical_and_scala(x, y): '\n Return logical and operation result of x and y.\n\n Args:\n x(Number): Number.\n y(Number): Number.\n\n Returns:\n bool, Return logical and operation result of x and y.\n ' return F.bool_and(x.__bool__(), y....
-7,286,355,318,795,096,000
Return logical and operation result of x and y. Args: x(Number): Number. y(Number): Number. Returns: bool, Return logical and operation result of x and y.
mindspore/ops/composite/multitype_ops/logical_and_impl.py
_logical_and_scala
Gavin-Hoang/mindspore
python
@logical_and.register('Number', 'Number') def _logical_and_scala(x, y): '\n Return logical and operation result of x and y.\n\n Args:\n x(Number): Number.\n y(Number): Number.\n\n Returns:\n bool, Return logical and operation result of x and y.\n ' return F.bool_and(x.__bool__(), y....
@logical_and.register('Tensor', 'Tensor') def _logical_and_tensor(x, y): '\n Return logical and operation result of x and y.\n\n Args:\n x(Tensor): Tensor.\n y(Tensor): Tensor.\n\n Returns:\n Tensor, Return logical and operation result of x and y.\n ' return F.logical_and(x, y)
4,841,098,281,168,699,000
Return logical and operation result of x and y. Args: x(Tensor): Tensor. y(Tensor): Tensor. Returns: Tensor, Return logical and operation result of x and y.
mindspore/ops/composite/multitype_ops/logical_and_impl.py
_logical_and_tensor
Gavin-Hoang/mindspore
python
@logical_and.register('Tensor', 'Tensor') def _logical_and_tensor(x, y): '\n Return logical and operation result of x and y.\n\n Args:\n x(Tensor): Tensor.\n y(Tensor): Tensor.\n\n Returns:\n Tensor, Return logical and operation result of x and y.\n ' return F.logical_and(x, y)
def test_create_file(self): 'Test the creation of a simple XlsxWriter file.' workbook = Workbook(self.got_filename) worksheet = workbook.add_worksheet() chart = workbook.add_chart({'type': 'stock'}) date_format = workbook.add_format({'num_format': 14}) chart.axis_ids = [45740032, 45747200] d...
-3,457,937,152,193,595,000
Test the creation of a simple XlsxWriter file.
xlsxwriter/test/comparison/test_chart_data_labels17.py
test_create_file
hugovk/XlsxWriter
python
def test_create_file(self): workbook = Workbook(self.got_filename) worksheet = workbook.add_worksheet() chart = workbook.add_chart({'type': 'stock'}) date_format = workbook.add_format({'num_format': 14}) chart.axis_ids = [45740032, 45747200] data = [[39083, 39084, 39085, 39086, 39087], [27....
def get_key(node): 'Generate a fresh key on node\n\n Returns a named tuple of privkey, pubkey and all address and scripts.' addr = node.getnewaddress() pubkey = node.getaddressinfo(addr)['pubkey'] return Key(privkey=node.dumpprivkey(addr), pubkey=pubkey, p2pkh_script=key_to_p2pkh_script(pubkey).hex()...
-563,035,140,004,875,460
Generate a fresh key on node Returns a named tuple of privkey, pubkey and all address and scripts.
test/functional/test_framework/wallet_util.py
get_key
ludirium/ludirium
python
def get_key(node): 'Generate a fresh key on node\n\n Returns a named tuple of privkey, pubkey and all address and scripts.' addr = node.getnewaddress() pubkey = node.getaddressinfo(addr)['pubkey'] return Key(privkey=node.dumpprivkey(addr), pubkey=pubkey, p2pkh_script=key_to_p2pkh_script(pubkey).hex()...
def get_generate_key(): 'Generate a fresh key\n\n Returns a named tuple of privkey, pubkey and all address and scripts.' eckey = ECKey() eckey.generate() privkey = bytes_to_wif(eckey.get_bytes()) pubkey = eckey.get_pubkey().get_bytes().hex() return Key(privkey=privkey, pubkey=pubkey, p2pkh_sc...
787,008,133,391,978,900
Generate a fresh key Returns a named tuple of privkey, pubkey and all address and scripts.
test/functional/test_framework/wallet_util.py
get_generate_key
ludirium/ludirium
python
def get_generate_key(): 'Generate a fresh key\n\n Returns a named tuple of privkey, pubkey and all address and scripts.' eckey = ECKey() eckey.generate() privkey = bytes_to_wif(eckey.get_bytes()) pubkey = eckey.get_pubkey().get_bytes().hex() return Key(privkey=privkey, pubkey=pubkey, p2pkh_sc...
def get_multisig(node): 'Generate a fresh 2-of-3 multisig on node\n\n Returns a named tuple of privkeys, pubkeys and all address and scripts.' addrs = [] pubkeys = [] for _ in range(3): addr = node.getaddressinfo(node.getnewaddress()) addrs.append(addr['address']) pubkeys.appe...
-5,366,923,151,664,502,000
Generate a fresh 2-of-3 multisig on node Returns a named tuple of privkeys, pubkeys and all address and scripts.
test/functional/test_framework/wallet_util.py
get_multisig
ludirium/ludirium
python
def get_multisig(node): 'Generate a fresh 2-of-3 multisig on node\n\n Returns a named tuple of privkeys, pubkeys and all address and scripts.' addrs = [] pubkeys = [] for _ in range(3): addr = node.getaddressinfo(node.getnewaddress()) addrs.append(addr['address']) pubkeys.appe...
def test_address(node, address, **kwargs): 'Get address info for `address` and test whether the returned values are as expected.' addr_info = node.getaddressinfo(address) for (key, value) in kwargs.items(): if (value is None): if (key in addr_info.keys()): raise Assertion...
2,198,220,858,924,984,800
Get address info for `address` and test whether the returned values are as expected.
test/functional/test_framework/wallet_util.py
test_address
ludirium/ludirium
python
def test_address(node, address, **kwargs): addr_info = node.getaddressinfo(address) for (key, value) in kwargs.items(): if (value is None): if (key in addr_info.keys()): raise AssertionError('key {} unexpectedly returned in getaddressinfo.'.format(key)) elif (add...
def read_global_config(path: Text) -> Dict[(Text, Any)]: 'Read global Rasa configuration.\n\n Args:\n path: Path to the configuration\n Returns:\n The global configuration\n ' try: return rasa.shared.utils.io.read_config_file(path) except Exception: return {}
8,840,443,311,206,454,000
Read global Rasa configuration. Args: path: Path to the configuration Returns: The global configuration
rasa/utils/common.py
read_global_config
karen-white/rasa
python
def read_global_config(path: Text) -> Dict[(Text, Any)]: 'Read global Rasa configuration.\n\n Args:\n path: Path to the configuration\n Returns:\n The global configuration\n ' try: return rasa.shared.utils.io.read_config_file(path) except Exception: return {}
def set_log_level(log_level: Optional[int]=None): "Set log level of Rasa and Tensorflow either to the provided log level or\n to the log level specified in the environment variable 'LOG_LEVEL'. If none is set\n a default log level will be used." if (not log_level): log_level = os.environ.get(ENV_L...
7,298,357,630,811,053,000
Set log level of Rasa and Tensorflow either to the provided log level or to the log level specified in the environment variable 'LOG_LEVEL'. If none is set a default log level will be used.
rasa/utils/common.py
set_log_level
karen-white/rasa
python
def set_log_level(log_level: Optional[int]=None): "Set log level of Rasa and Tensorflow either to the provided log level or\n to the log level specified in the environment variable 'LOG_LEVEL'. If none is set\n a default log level will be used." if (not log_level): log_level = os.environ.get(ENV_L...
def update_tensorflow_log_level() -> None: "Set the log level of Tensorflow to the log level specified in the environment\n variable 'LOG_LEVEL_LIBRARIES'." os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf log_level = os.environ.get(ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_LIBRARIES...
-6,638,952,293,186,640,000
Set the log level of Tensorflow to the log level specified in the environment variable 'LOG_LEVEL_LIBRARIES'.
rasa/utils/common.py
update_tensorflow_log_level
karen-white/rasa
python
def update_tensorflow_log_level() -> None: "Set the log level of Tensorflow to the log level specified in the environment\n variable 'LOG_LEVEL_LIBRARIES'." os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf log_level = os.environ.get(ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_LIBRARIES...
def update_sanic_log_level(log_file: Optional[Text]=None): "Set the log level of sanic loggers to the log level specified in the environment\n variable 'LOG_LEVEL_LIBRARIES'." from sanic.log import logger, error_logger, access_logger log_level = os.environ.get(ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_L...
-5,810,610,133,777,619,000
Set the log level of sanic loggers to the log level specified in the environment variable 'LOG_LEVEL_LIBRARIES'.
rasa/utils/common.py
update_sanic_log_level
karen-white/rasa
python
def update_sanic_log_level(log_file: Optional[Text]=None): "Set the log level of sanic loggers to the log level specified in the environment\n variable 'LOG_LEVEL_LIBRARIES'." from sanic.log import logger, error_logger, access_logger log_level = os.environ.get(ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_L...
def update_asyncio_log_level() -> None: "Set the log level of asyncio to the log level specified in the environment\n variable 'LOG_LEVEL_LIBRARIES'." log_level = os.environ.get(ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_LIBRARIES) logging.getLogger('asyncio').setLevel(log_level)
-7,843,690,206,043,967,000
Set the log level of asyncio to the log level specified in the environment variable 'LOG_LEVEL_LIBRARIES'.
rasa/utils/common.py
update_asyncio_log_level
karen-white/rasa
python
def update_asyncio_log_level() -> None: "Set the log level of asyncio to the log level specified in the environment\n variable 'LOG_LEVEL_LIBRARIES'." log_level = os.environ.get(ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_LIBRARIES) logging.getLogger('asyncio').setLevel(log_level)
def set_log_and_warnings_filters() -> None: '\n Set log filters on the root logger, and duplicate filters for warnings.\n\n Filters only propagate on handlers, not loggers.\n ' for handler in logging.getLogger().handlers: handler.addFilter(RepeatedLogFilter()) warnings.filterwarnings('once'...
5,511,566,338,182,023,000
Set log filters on the root logger, and duplicate filters for warnings. Filters only propagate on handlers, not loggers.
rasa/utils/common.py
set_log_and_warnings_filters
karen-white/rasa
python
def set_log_and_warnings_filters() -> None: '\n Set log filters on the root logger, and duplicate filters for warnings.\n\n Filters only propagate on handlers, not loggers.\n ' for handler in logging.getLogger().handlers: handler.addFilter(RepeatedLogFilter()) warnings.filterwarnings('once'...