_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_9100
Remove the payload and all of the headers.
doc_9101
class sklearn.ensemble.RandomForestRegressor(n_estimators=100, *, criterion='mse', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, bootstrap=True, oob_score=False, n_jobs=None, random_sta...
doc_9102
See Migration guide for more details. tf.compat.v1.keras.callbacks.ModelCheckpoint tf.keras.callbacks.ModelCheckpoint( filepath, monitor='val_loss', verbose=0, save_best_only=False, save_weights_only=False, mode='auto', save_freq='epoch', options=None, **kwargs ) ModelCheckpoint callback is used in conju...
doc_9103
The process’s authentication key (a byte string). When multiprocessing is initialized the main process is assigned a random string using os.urandom(). When a Process object is created, it will inherit the authentication key of its parent process, although this may be changed by setting authkey to another byte string. S...
doc_9104
try blocks. All attributes are list of nodes to execute, except for handlers, which is a list of ExceptHandler nodes. >>> print(ast.dump(ast.parse(""" ... try: ... ... ... except Exception: ... ... ... except OtherException as e: ... ... ... else: ... ... ... finally: ... ... ... """), indent=4)) Module(...
doc_9105
create a new Surface that shares data inside a bytes buffer frombuffer(bytes, size, format) -> Surface Create a new Surface that shares pixel data directly from a bytes buffer. This method takes similar arguments to pygame.image.fromstring(), but is unable to vertically flip the source data. This will run much faster...
doc_9106
Bases: matplotlib.backend_bases._Backend Simple base class to generate a show() function in backends. Subclass must override mainloop() method.
doc_9107
The last colorbar associated with this ScalarMappable. May be None.
doc_9108
The fully qualified domain name associated with the website. For example, www.example.com.
doc_9109
Represents the C wchar_t * datatype, which must be a pointer to a zero-terminated wide character string. The constructor accepts an integer address, or a string.
doc_9110
Returns a tensor filled with random numbers from a normal distribution with mean 0 and variance 1 (also called the standard normal distribution). outi∼N(0,1)\text{out}_{i} \sim \mathcal{N}(0, 1) The shape of the tensor is defined by the variable argument size. Parameters size (int...) – a sequence of integers defi...
doc_9111
Return a flattened copy of the matrix. All N elements of the matrix are placed into a single row. Parameters order{‘C’, ‘F’, ‘A’, ‘K’}, optional ‘C’ means to flatten in row-major (C-style) order. ‘F’ means to flatten in column-major (Fortran-style) order. ‘A’ means to flatten in column-major order if m is Fortr...
doc_9112
Perform hierarchical merging of a RAG. Greedily merges the most similar pair of nodes until no edges lower than thresh remain. Parameters labelsndarray The array of labels. ragRAG The Region Adjacency Graph. threshfloat Regions connected by an edge with weight smaller than thresh are merged. rag_copyb...
doc_9113
Call self as a function.
doc_9114
URL encode a single string with the given encoding and convert whitespace to “+”. Parameters s – The string to quote. charset (str) – The charset to be used. safe (str) – An optional sequence of safe characters. string (str) – errors (str) – Return type str
doc_9115
Clears all headers.
doc_9116
Check if the object is list-like. Objects that are considered list-like are for example Python lists, tuples, sets, NumPy arrays, and Pandas Series. Strings and datetime objects, however, are not considered list-like. Parameters obj:object Object to check. allow_sets:bool, default True If this parameter is ...
doc_9117
Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise. Calls str.isalnum element-wise. For 8-bit strings, this method is locale-dependent. Parameters aarray_like of str or unicode Returns outndarray Output array of str or unicod...
doc_9118
Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outputs), default=None Target values (None for uns...
doc_9119
Draw the path with updated gc.
doc_9120
Return staged predictions for X. The predicted class of an input sample is computed as the weighted mean prediction of the classifiers in the ensemble. This generator method yields the ensemble prediction after each iteration of boosting and therefore allows monitoring, such as to determine the prediction on a test s...
doc_9121
alias of torch.distributions.constraints._HalfOpenInterval
doc_9122
IEEE 754 floating point representation of negative zero. Returns yfloat A floating point representation of negative zero. See Also PZERO : Defines positive zero. isinf : Shows which elements are positive or negative infinity. isposinf : Shows which elements are positive infinity. isneginf : Shows which elements ...
doc_9123
Draw the path with updated gc.
doc_9124
See Migration guide for more details. tf.compat.v1.estimator.experimental.call_logit_fn tf.estimator.experimental.call_logit_fn( logit_fn, features, mode, params, config ) THIS FUNCTION IS EXPERIMENTAL. Keras layers/models are the recommended APIs for logit and model composition. A utility function that calls th...
doc_9125
Set the colormap for luminance data. Parameters cmapColormap or str or None
doc_9126
Contains the request path. If query component of the URL is present, then path includes the query. Using the terminology of RFC 3986, path here includes hier-part and the query.
doc_9127
Color difference as given by the CIEDE 2000 standard. CIEDE 2000 is a major revision of CIDE94. The perceptual calibration is largely based on experience with automotive paint on smooth surfaces. Parameters lab1array_like reference color (Lab colorspace) lab2array_like comparison color (Lab colorspace) kL...
doc_9128
tf.debugging.assert_shapes( shapes, data=None, summarize=None, message=None, name=None ) This Op checks that a collection of tensors shape relationships satisfies given constraints. Example: n = 10 q = 3 d = 7 x = tf.zeros([n,q]) y = tf.ones([n,d]) param = tf.Variable([1.0, 2.0, 3.0]) scalar = 1.0 tf.debugging.as...
doc_9129
A list containing 2-tuples of TestCase instances and strings holding formatted tracebacks. Each tuple represents an expected failure or error of the test case.
doc_9130
Create a TarInfo object from the result of os.stat() or equivalent on an existing file. The file is either named by name, or specified as a file object fileobj with a file descriptor. name may be a path-like object. If given, arcname specifies an alternative name for the file in the archive, otherwise, the name is take...
doc_9131
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Estimator parameters. Returns...
doc_9132
alias of werkzeug.formparser.FormDataParser
doc_9133
Put the barrier into a broken state. This causes any active or future calls to wait() to fail with the BrokenBarrierError. Use this for example if one of the threads needs to abort, to avoid deadlocking the application. It may be preferable to simply create the barrier with a sensible timeout value to automatically gua...
doc_9134
Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
doc_9135
Add an Artist to the figure. Usually artists are added to Axes objects using Axes.add_artist; this method can be used in the rare cases where one needs to add artists directly to the figure instead. Parameters artistArtist The artist to add to the figure. If the added artist has no transform previously set, its...
doc_9136
a reference to the blueprint that created this setup state.
doc_9137
Other Members CXX11_ABI_FLAG 0 MONOLITHIC_BUILD 0
doc_9138
tf.summary.create_file_writer( logdir, max_queue=None, flush_millis=None, filename_suffix=None, name=None ) Args logdir a string specifying the directory in which to write an event file. max_queue the largest number of summaries to keep in a queue; will flush once the queue gets bigger than this. De...
doc_9139
If the value contains binary data, it is converted into a Header object using the unknown-8bit charset. Otherwise it is returned unmodified.
doc_9140
Set the alpha value used for blending - not supported on all backends. Parameters alphaarray-like or scalar or None All values must be within the 0-1 range, inclusive. Masked values and nans are not supported.
doc_9141
Checks if a given object is a null session. Null sessions are not asked to be saved. This checks if the object is an instance of null_session_class by default. Parameters obj (object) – Return type bool
doc_9142
Remove categories which are not used. Parameters inplace:bool, default False Whether or not to drop unused categories inplace or return a copy of this categorical with unused categories dropped. Deprecated since version 1.2.0. Returns cat:Categorical or None Categorical with unused categories dropped ...
doc_9143
Return the lowest index in the string where substring sub is found within the slice s[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 if sub is not found. Note The find() method should be used only if you need to know the position of sub. To check if sub is a substring or n...
doc_9144
Event handler for click event on directory.
doc_9145
Fill the array with a scalar value. Parameters valuescalar All elements of a will be assigned this value. Examples >>> a = np.array([1, 2]) >>> a.fill(0) >>> a array([0, 0]) >>> a = np.empty(2) >>> a.fill(1) >>> a array([1., 1.])
doc_9146
Generate a monic polynomial with given roots. Return the coefficients of the polynomial \[p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),\] where the r_n are the roots specified in roots. If a zero has multiplicity n, then it must appear in roots n times. For instance, if 2 is a root of multiplicity three and 3 is a...
doc_9147
See Migration guide for more details. tf.compat.v1.raw_ops.FakeQuantWithMinMaxVarsPerChannel tf.raw_ops.FakeQuantWithMinMaxVarsPerChannel( inputs, min, max, num_bits=8, narrow_range=False, name=None ) Fake-quantize the inputs tensor of type float per-channel and one of the shapes: [d], [b, d] [b, h, w, d] via pe...
doc_9148
Compute elastic net path with coordinate descent. The elastic net optimization function varies for mono and multi-outputs. For mono-output tasks it is: 1 / (2 * n_samples) * ||y - Xw||^2_2 + alpha * l1_ratio * ||w||_1 + 0.5 * alpha * (1 - l1_ratio) * ||w||^2_2 For multi-output tasks it is: (1 / (2 * n_samples)) * ||...
doc_9149
A convenience wrapper for warnings.catch_warnings() that makes it easier to test that a warning was correctly raised. It is approximately equivalent to calling warnings.catch_warnings(record=True) with warnings.simplefilter() set to always and with the option to automatically validate the results that are recorded. che...
doc_9150
class sklearn.ensemble.ExtraTreesRegressor(n_estimators=100, *, criterion='mse', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, bootstrap=False, oob_score=False, n_jobs=None, random_stat...
doc_9151
If set to true stop() will be called on the first failure or error, halting the test run. New in version 3.2.
doc_9152
Predicate: does the path need to be stroked (its outline drawn)? This tests for the various conditions that disable stroking the path, in which case it would presumably be filled.
doc_9153
Tuple of bytes to step in each dimension when traversing an array. The byte offset of element (i[0], i[1], ..., i[n]) in an array a is: offset = sum(np.array(i) * a.strides) A more detailed explanation of strides can be found in the “ndarray.rst” file in the NumPy reference guide. See also numpy.lib.stride_tricks....
doc_9154
Join one or more path components intelligently. The return value is the concatenation of path and any members of *paths with exactly one directory separator following each non-empty part except the last, meaning that the result will only end in a separator if the last part is empty. If a component is an absolute path, ...
doc_9155
Base object if memory is from some other object. Examples The base of an array that owns its memory is None: >>> x = np.array([1,2,3,4]) >>> x.base is None True Slicing creates a view, whose memory is shared with x: >>> y = x[2:] >>> y.base is x True
doc_9156
Enable or disable automatic calls to add_history() when reading input via readline. The enabled argument should be a Boolean value that when true, enables auto history, and that when false, disables auto history. New in version 3.6. CPython implementation detail: Auto history is enabled by default, and changes to th...
doc_9157
The error message or diagnostic string.
doc_9158
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Estimator parameters. Returns...
doc_9159
'blogs.blog': lambda o: "/blogs/%s/" % o.slug, 'news.story': lambda o: "/stories/%s/%s/" % (o.pub_year, o.slug), } The model name used in this setting should be all lowercase, regardless of the case of the actual model class name. ADMINS Default: [] (Empty list) A list of all the people who get code error noti...
doc_9160
Return staged scores for X, y. This generator method yields the ensemble score after each iteration of boosting and therefore allows monitoring, such as to determine the score on a test set after each boost. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Spa...
doc_9161
alias of matplotlib.backend_tools.SetCursorBase
doc_9162
Returns the currently selected language code. Returns None if translations are temporarily deactivated (by deactivate_all() or when None is passed to override()).
doc_9163
Return the subplot geometry as tuple (n_rows, n_cols, start, stop). The indices start and stop define the range of the subplot within the GridSpec. stop is inclusive (i.e. for a single cell start == stop).
doc_9164
Move a PEP 3147/PEP 488 pyc file to its legacy pyc location and return the file system path to the legacy pyc file. The source value is the file system path to the source file. It does not need to exist, however the PEP 3147/488 pyc file must exist.
doc_9165
Return a list of URLs, one for each element of the collection. The list contains None for elements without a URL. See Hyperlinks for an example.
doc_9166
alias of pandas._libs.tslibs.offsets.CustomBusinessMonthBegin
doc_9167
Returns True if the user has each of the specified permissions, where each perm is in the format "<app label>.<permission codename>". If User.is_active and is_superuser are both True, this method always returns True. If obj is passed in, this method won’t check for permissions for the model, but for the specific object...
doc_9168
Indicate that a formerly enqueued task is complete. Used by queue consumers. For each get() used to fetch a task, a subsequent call to task_done() tells the queue that the processing on the task is complete. If a join() is currently blocking, it will resume when all items have been processed (meaning that a task_done()...
doc_9169
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred) ** 2).sum() and \(v\) is the total sum of squares ((y_true - y_true.mean()) ** 2).sum(). The best possible score is 1.0 and it c...
doc_9170
Return the value for var if var has the value in the context object. Return default otherwise. If default is not given, return None.
doc_9171
from myapp.serializers import UserSerializer from rest_framework import generics from rest_framework.permissions import IsAdminUser class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer permission_classes = [IsAdminUser] For more complex cases you migh...
doc_9172
Do nothing and return the estimator unchanged. This method is just there to implement the usual API and hence work in pipelines. Parameters Xarray-like of shape (n_samples, n_features) Training data.
doc_9173
Deprecated since version 2.0: Will be removed in Werkzeug 2.1. Use key in data instead.
doc_9174
Create a new SMTPServer object, which binds to local address localaddr. It will treat remoteaddr as an upstream SMTP relayer. Both localaddr and remoteaddr should be a (host, port) tuple. The object inherits from asyncore.dispatcher, and so will insert itself into asyncore’s event loop on instantiation. data_size_limit...
doc_9175
Return the contingency table for all regions in matched segmentations. Parameters im_truendarray of int Ground-truth label image, same shape as im_test. im_testndarray of int Test image. ignore_labelssequence of int, optional Labels to ignore. Any part of the true image labeled with any of these values ...
doc_9176
Returns the numeric index of the tab specified by tab_id, or the total number of tabs if tab_id is the string “end”.
doc_9177
Only used in the definition of ManyToManyFields on self. Consider the following model: from django.db import models class Person(models.Model): friends = models.ManyToManyField("self") When Django processes this model, it identifies that it has a ManyToManyField on itself, and as a result, it doesn’t add a person...
doc_9178
Roll provided date backward to next offset only if not on offset. Returns TimeStamp Rolled timestamp if not on offset, otherwise unchanged timestamp.
doc_9179
(Must be defined as a class method.) Check whether subclass is considered a subclass of this ABC. This means that you can customize the behavior of issubclass further without the need to call register() on every class you want to consider a subclass of the ABC. (This class method is called from the __subclasscheck__() ...
doc_9180
See Migration guide for more details. tf.compat.v1.strings.lower tf.strings.lower( input, encoding='', name=None ) Example: tf.strings.lower("CamelCase string and ALL CAPS") <tf.Tensor: shape=(), dtype=string, numpy=b'camelcase string and all caps'> Args input A Tensor of type string. encoding A...
doc_9181
sklearn.preprocessing.normalize(X, norm='l2', *, axis=1, copy=True, return_norm=False) [source] Scale input vectors individually to unit norm (vector length). Read more in the User Guide. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The data to normalize, element by element. scipy.sp...
doc_9182
Get the line width of the Figure rectangle.
doc_9183
Run doctests found in the given file. By default rundocs raises an AssertionError on failure. Parameters filenamestr The path to the file for which the doctests are run. raise_on_errorbool Whether to raise an AssertionError when a doctest fails. Default is True. Notes The doctests can be run by the user...
doc_9184
sklearn.datasets.fetch_olivetti_faces(*, data_home=None, shuffle=False, random_state=0, download_if_missing=True, return_X_y=False) [source] Load the Olivetti faces data-set from AT&T (classification). Download it if necessary. Classes 40 Samples total 400 Dimensionality 4096 Features real, between 0 and 1 ...
doc_9185
Return True if the queue is full, False otherwise. Because of multithreading/multiprocessing semantics, this is not reliable.
doc_9186
Set the hatching pattern hatch can be one of: / - diagonal hatching \ - back diagonal | - vertical - - horizontal + - crossed x - crossed diagonal o - small circle O - large circle . - dots * - stars Letters can be combined, in which case all the specified hatchings are done. If same letter repea...
doc_9187
Checks for ASCII white-space characters; space, line feed, carriage return, form feed, horizontal tab, vertical tab.
doc_9188
See Migration guide for more details. tf.compat.v1.raw_ops.ScatterNdMax tf.raw_ops.ScatterNdMax( ref, indices, updates, use_locking=False, name=None ) Args ref A mutable Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bflo...
doc_9189
Bases: matplotlib.contour.ContourSet Create and store a set of contour lines or filled regions for a triangular grid. This class is typically not instantiated directly by the user but by tricontour and tricontourf. Attributes axAxes The Axes object in which the contours are drawn. collectionssilent_list of Pa...
doc_9190
Test whether the mouse event occurred in the collection. Returns bool, dict(ind=itemlist), where every item in itemlist contains the event.
doc_9191
operator.__setitem__(a, b, c) Set the value of a at index b to c.
doc_9192
draw a rectangle rect(surface, color, rect) -> Rect rect(surface, color, rect, width=0, border_radius=0, border_top_left_radius=-1, border_top_right_radius=-1, border_bottom_left_radius=-1, border_bottom_right_radius=-1) -> Rect Draws a rectangle on the given surface. Parameters: surface (Surface) -- surface ...
doc_9193
Set the description used in the generated HTML documentation. This description will appear as a paragraph, below the server name, in the documentation.
doc_9194
Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
doc_9195
See Migration guide for more details. tf.compat.v1.debugging.assert_all_finite tf.compat.v1.verify_tensor_all_finite( t=None, msg=None, name=None, x=None, message=None ) Args t Tensor to check. msg Message to log on failure. name A name for this operation (optional). x Alias for t. ...
doc_9196
tf.math.softsign Compat aliases for migration See Migration guide for more details. tf.compat.v1.math.softsign, tf.compat.v1.nn.softsign tf.nn.softsign( features, name=None ) Args features A Tensor. Must be one of the following types: half, bfloat16, float32, float64. name A name for the operation...
doc_9197
'blogs.blog': lambda o: "/blogs/%s/" % o.slug, 'news.story': lambda o: "/stories/%s/%s/" % (o.pub_year, o.slug), } The model name used in this setting should be all lowercase, regardless of the case of the actual model class name. ADMINS Default: [] (Empty list) A list of all the people who get code error noti...
doc_9198
A set containing the names of the hash algorithms that are available in the running Python interpreter. These names will be recognized when passed to new(). algorithms_guaranteed will always be a subset. The same algorithm may appear multiple times in this set under different names (thanks to OpenSSL). New in version ...
doc_9199
sklearn.datasets.fetch_20newsgroups_vectorized(*, subset='train', remove=(), data_home=None, download_if_missing=True, return_X_y=False, normalize=True, as_frame=False) [source] Load and vectorize the 20 newsgroups dataset (classification). Download it if necessary. This is a convenience function; the transformation ...