_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_2200
Normalize a pathname by collapsing redundant separators and up-level references so that A//B, A/B/, A/./B and A/foo/../B all become A/B. This string manipulation may change the meaning of a path that contains symbolic links. On Windows, it converts forward slashes to backward slashes. To normalize case, use normcase()....
doc_2201
Parses an XML document from a sequence of string fragments. sequence is a list or other sequence containing XML data fragments. parser is an optional parser instance. If not given, the standard XMLParser parser is used. Returns an Element instance. New in version 3.2.
doc_2202
Add text to figure. Parameters x, yfloat The position to place the text. By default, this is in figure coordinates, floats in [0, 1]. The coordinate system can be changed using the transform keyword. sstr The text string. fontdictdict, optional A dictionary to override the default text properties. If no...
doc_2203
tf.compat.v1.layers.Conv3D( filters, kernel_size, strides=(1, 1, 1), padding='valid', data_format='channels_last', dilation_rate=(1, 1, 1), activation=None, use_bias=True, kernel_initializer=None, bias_initializer=tf.zeros_initializer(), kernel_regularizer=None, bias_regularizer=None, activity_regulariz...
doc_2204
class sklearn.feature_extraction.text.CountVectorizer(*, input='content', encoding='utf-8', decode_error='strict', strip_accents=None, lowercase=True, preprocessor=None, tokenizer=None, stop_words=None, token_pattern='(?u)\\b\\w\\w+\\b', ngram_range=(1, 1), analyzer='word', max_df=1.0, min_df=1, max_features=None, voca...
doc_2205
Check if types match. New in version 1.7.0. Parameters otherobject Class instance. Returns boolboolean True if other is same class as self
doc_2206
Computes the Maximum likelihood covariance estimator Parameters Xndarray of shape (n_samples, n_features) Data from which to compute the covariance estimate assume_centeredbool, default=False If True, data will not be centered before computation. Useful when working with data whose mean is almost, but not e...
doc_2207
bytearray.istitle() Return True if the sequence is ASCII titlecase and the sequence is not empty, False otherwise. See bytes.title() for more details on the definition of “titlecase”. For example: >>> b'Hello World'.istitle() True >>> b'Hello world'.istitle() False
doc_2208
New view of array with the same data. Note Passing None for dtype is different from omitting the parameter, since the former invokes dtype(None) which is an alias for dtype('float_'). Parameters dtypedata-type or ndarray sub-class, optional Data-type descriptor of the returned view, e.g., float32 or int16. Om...
doc_2209
Return the coordinate system to use for Annotation.xyann. See also xycoords in Annotation.
doc_2210
Return a dictionary of all the properties of the artist.
doc_2211
See Migration guide for more details. tf.compat.v1.raw_ops.SparseSparseMaximum tf.raw_ops.SparseSparseMaximum( a_indices, a_values, a_shape, b_indices, b_values, b_shape, name=None ) Assumes the two SparseTensors have the same shape, i.e., no broadcasting. Args a_indices A Tensor of type int64. 2-D. N x...
doc_2212
Number of dimensions of broadcasted result. Alias for nd. New in version 1.12.0. Examples >>> x = np.array([1, 2, 3]) >>> y = np.array([[4], [5], [6]]) >>> b = np.broadcast(x, y) >>> b.ndim 2
doc_2213
Set the length of the lines used to mark each event.
doc_2214
The tix commands provide access to miscellaneous elements of Tix’s internal state and the Tix application context. Most of the information manipulated by these methods pertains to the application as a whole, or to a screen or display, rather than to a particular window. To view the current settings, the common usage is...
doc_2215
operator.__and__(a, b) Return the bitwise and of a and b.
doc_2216
Remove the given parameter completely from the Content-Type header. The header will be re-written in place without the parameter or its value. All values will be quoted as necessary unless requote is False (the default is True). Optional header specifies an alternative to Content-Type.
doc_2217
operator.__index__(a) Return a converted to an integer. Equivalent to a.__index__().
doc_2218
This is an abstract base class for running WSGI applications. Each instance will handle a single HTTP request, although in principle you could create a subclass that was reusable for multiple requests. BaseHandler instances have only one method intended for external use: run(app) Run the specified WSGI application,...
doc_2219
See Migration guide for more details. tf.compat.v1.raw_ops.IsotonicRegression tf.raw_ops.IsotonicRegression( input, output_dtype=tf.dtypes.float32, name=None ) Args input A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uin...
doc_2220
Return the ConnectionStyle used.
doc_2221
An Interpreter executes an FX graph Node-by-Node. This pattern can be useful for many things, including writing code transformations as well as analysis passes. Methods in the Interpreter class can be overridden to customize the behavior of execution. The map of overrideable methods in terms of call hierarchy: run() ...
doc_2222
tkinter.filedialog.askopenfiles(mode="r", **options) The above two functions create an Open dialog and return the opened file object(s) in read-only mode.
doc_2223
See Migration guide for more details. tf.compat.v1.keras.layers.Cropping3D tf.keras.layers.Cropping3D( cropping=((1, 1), (1, 1), (1, 1)), data_format=None, **kwargs ) Examples: input_shape = (2, 28, 28, 10, 3) x = np.arange(np.prod(input_shape)).reshape(input_shape) y = tf.keras.layers.Cropping3D(cropping=(2, 4...
doc_2224
Return the group id.
doc_2225
An abstract base class which inherits from InspectLoader that, when implemented, helps a module to be executed as a script. The ABC represents an optional PEP 302 protocol. abstractmethod get_filename(fullname) An abstract method that is to return the value of __file__ for the specified module. If no path is availa...
doc_2226
Send a QUIT command and close the connection. Once this method has been called, no other methods of the NNTP object should be called.
doc_2227
Returns a view of the array with axes transposed. For a 1-D array this has no effect, as a transposed vector is simply the same vector. To convert a 1-D array into a 2D column vector, an additional dimension must be added. np.atleast2d(a).T achieves this, as does a[:, np.newaxis]. For a 2-D array, this is a standard ...
doc_2228
Return latex's rendering of the tex string as an rgba array. Examples >>> texmanager = TexManager() >>> s = r"\TeX\ is $\displaystyle\sum_n\frac{-e^{i\pi}}{2^n}$!" >>> Z = texmanager.get_rgba(s, fontsize=12, dpi=80, rgb=(1, 0, 0))
doc_2229
Estimate class weights for unbalanced datasets. Parameters class_weightdict, ‘balanced’ or None If ‘balanced’, class weights will be given by n_samples / (n_classes * np.bincount(y)). If a dictionary is given, keys are classes and values are corresponding class weights. If None is given, the class weights will ...
doc_2230
tf.experimental.numpy.bitwise_xor( x1, x2 ) Unsupported arguments: out, where, casting, order, dtype, subok, signature, extobj. See the NumPy documentation for numpy.bitwise_xor.
doc_2231
This is the entry point you will normally use. It accepts editing keystrokes until one of the termination keystrokes is entered. If validator is supplied, it must be a function. It will be called for each keystroke entered with the keystroke as a parameter; command dispatch is done on the result. This method returns th...
doc_2232
Reduce dimensionality through Gaussian random projection. The components of the random matrix are drawn from N(0, 1 / n_components). Read more in the User Guide. New in version 0.13. Parameters n_componentsint or ‘auto’, default=’auto’ Dimensionality of the target projection space. n_components can be automat...
doc_2233
Emit a ToolManagerMessageEvent.
doc_2234
Parameter A kind of Tensor that is to be considered a module parameter. UninitializedParameter A parameter that is not initialized. Containers Module Base class for all neural network modules. Sequential A sequential container. ModuleList Holds submodules in a list. ModuleDict Holds submodules i...
doc_2235
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_2236
Bases: mpl_toolkits.axes_grid1.axes_grid.ImageGrid Parameters figFigure The parent figure. rect(float, float, float, float) or int The axes position, as a (left, bottom, width, height) tuple or as a three-digit subplot position code (e.g., "121"). nrows_ncols(int, int) Number of rows and columns in the ...
doc_2237
Perform hexbin4 binary-to-ASCII translation and return the resulting string. The argument should already be RLE-coded, and have a length divisible by 3 (except possibly the last fragment). Deprecated since version 3.9.
doc_2238
alias of ConvTranspose1d
doc_2239
Add a new suppressing filter or apply it if the state is entered. Parameters categoryclass, optional Warning class to filter messagestring, optional Regular expression matching the warning message. modulemodule, optional Module to filter for. Note that the module (and its file) must match exactly and ca...
doc_2240
An invalid operation was performed. Indicates that an operation was requested that does not make sense. If not trapped, returns NaN. Possible causes include: Infinity - Infinity 0 * Infinity Infinity / Infinity x % 0 Infinity % x sqrt(-x) and x > 0 0 ** 0 x ** (non-integer) x ** Infinity
doc_2241
class calendar.Calendar(firstweekday=0) Creates a Calendar object. firstweekday is an integer specifying the first day of the week. 0 is Monday (the default), 6 is Sunday. A Calendar object provides several methods that can be used for preparing the calendar data for formatting. This class doesn’t do any formatting i...
doc_2242
Return the current hatching pattern.
doc_2243
Return the bottom coordinate of the rectangle.
doc_2244
Return either “new” (if the message should be stored in the new subdirectory) or “cur” (if the message should be stored in the cur subdirectory). Note A message is typically moved from new to cur after its mailbox has been accessed, whether or not the message is has been read. A message msg has been read if "S" in msg...
doc_2245
Return the clipbox.
doc_2246
Yield all direct child nodes of node, that is, all fields that are nodes and all items of fields that are lists of nodes.
doc_2247
Sets or resets the time zone search path (TZPATH) for the module. When called with no arguments, TZPATH is set to the default value. Calling reset_tzpath will not invalidate the ZoneInfo cache, and so calls to the primary ZoneInfo constructor will only use the new TZPATH in the case of a cache miss. The to parameter mu...
doc_2248
Regular slicing (on the form lower:upper or lower:upper:step). Can occur only inside the slice field of Subscript, either directly or as an element of Tuple. >>> print(ast.dump(ast.parse('l[1:2]', mode='eval'), indent=4)) Expression( body=Subscript( value=Name(id='l', ctx=Load()), slice=Slice( ...
doc_2249
tf.metrics.MeanSquaredError Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.metrics.MeanSquaredError tf.keras.metrics.MeanSquaredError( name='mean_squared_error', dtype=None ) Args name (Optional) string name of the metric instance. dtype (Optional) data type ...
doc_2250
One-dimensional linear interpolation for monotonically increasing sample points. Returns the one-dimensional piecewise linear interpolant to a function with given discrete data points (xp, fp), evaluated at x. Parameters xarray_like The x-coordinates at which to evaluate the interpolated values. xp1-D sequenc...
doc_2251
See Migration guide for more details. tf.compat.v1.raw_ops.ClipByValue tf.raw_ops.ClipByValue( t, clip_value_min, clip_value_max, name=None ) Given a tensor t, this operation returns a tensor of the same type and shape as t with its values clipped to clip_value_min and clip_value_max. Any values less than clip_v...
doc_2252
Close the control file descriptor of the kqueue object.
doc_2253
These control the range of values permitted in the field, and should be given as decimal.Decimal values.
doc_2254
sklearn.utils.sparsefuncs.inplace_column_scale(X, scale) [source] Inplace column scaling of a CSC/CSR matrix. Scale each feature of the data matrix by multiplying with specific scale provided by the caller assuming a (n_samples, n_features) shape. Parameters Xsparse matrix of shape (n_samples, n_features) Matri...
doc_2255
Returns a KML (Keyhole Markup Language) representation of the geometry. This should only be used for geometries with an SRID of 4326 (WGS84), but this restriction is not enforced.
doc_2256
Alias for set_fontstyle.
doc_2257
class sklearn.model_selection.TimeSeriesSplit(n_splits=5, *, max_train_size=None, test_size=None, gap=0) [source] Time Series cross-validator Provides train/test indices to split time series data samples that are observed at fixed time intervals, in train/test sets. In each split, test indices must be higher than bef...
doc_2258
Create a Series with both index and values equal to the index keys useful with map for returning an indexer based on an index. Parameters keep_tz:optional, defaults True Return the data keeping the timezone. If keep_tz is True: If the timezone is not set, the resulting Series will have a datetime64[ns] dtype....
doc_2259
In-place version of exp()
doc_2260
Compute the (multiplicative) inverse of a matrix. Given a square matrix a, return the matrix ainv satisfying dot(a, ainv) = dot(ainv, a) = eye(a.shape[0]). Parameters a(…, M, M) array_like Matrix to be inverted. Returns ainv(…, M, M) ndarray or matrix (Multiplicative) inverse of the matrix a. Raises ...
doc_2261
'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_2262
Compare two operands using their abstract representation rather than their value as in compare_total(), but ignoring the sign of each operand. x.compare_total_mag(y) is equivalent to x.copy_abs().compare_total(y.copy_abs()). This operation is unaffected by context and is quiet: no flags are changed and no rounding is p...
doc_2263
The largest year number allowed in a date or datetime object. MAXYEAR is 9999.
doc_2264
Returns the score of the prediction. This is a wrapper for estimator_.score(X, y). Parameters Xnumpy array or sparse matrix of shape [n_samples, n_features] Training data. yarray, shape = [n_samples] or [n_samples, n_targets] Target values. Returns zfloat Score of the prediction.
doc_2265
Using a probability density function (pdf), compute the relative likelihood that a random variable X will be near the given value x. Mathematically, it is the limit of the ratio P(x <= X < x+dx) / dx as dx approaches zero. The relative likelihood is computed as the probability of a sample occurring in a narrow range di...
doc_2266
Returns a string identifying the Python implementation. Possible return values are: ‘CPython’, ‘IronPython’, ‘Jython’, ‘PyPy’.
doc_2267
lambda is a minimal function definition that can be used inside an expression. Unlike FunctionDef, body holds a single node. >>> print(ast.dump(ast.parse('lambda x,y: ...'), indent=4)) Module( body=[ Expr( value=Lambda( args=arguments( posonlyargs=[], ...
doc_2268
Computes the log det jacobian log |dy/dx| given input and output.
doc_2269
Adds a success message attribute to FormView based classes get_success_message(cleaned_data) cleaned_data is the cleaned data from the form which is used for string formatting
doc_2270
Select features according to a percentile of the highest scores. Read more in the User Guide. Parameters score_funccallable, default=f_classif Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues) or a single array with scores. Default is f_classif (see below “See Also”). The defa...
doc_2271
name Returns the name of this field: >>> city['Name'].name 'Name' type Returns the OGR type of this field, as an integer. The FIELD_CLASSES dictionary maps these values onto subclasses of Field: >>> city['Density'].type 2 type_name Returns a string with the name of the data type of this field: >>> city['N...
doc_2272
Mini-batch Sparse Principal Components Analysis Finds the set of sparse components that can optimally reconstruct the data. The amount of sparseness is controllable by the coefficient of the L1 penalty, given by the parameter alpha. Read more in the User Guide. Parameters n_componentsint, default=None number of...
doc_2273
Add the current figure to the stack of views and positions.
doc_2274
Integer value to control debugging output. The initialize value is taken from the module variable Debug. Values greater than three trace each command.
doc_2275
Reduce learning rate when a metric has stopped improving. Models often benefit from reducing the learning rate by a factor of 2-10 once learning stagnates. This scheduler reads a metrics quantity and if no improvement is seen for a ‘patience’ number of epochs, the learning rate is reduced. Parameters optimizer (O...
doc_2276
Must be a subclass of django.forms.MultiWidget. Default value is TextInput, which probably is not very useful in this case.
doc_2277
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_2278
Randomly zero out entire channels (a channel is a 2D feature map, e.g., the jj -th channel of the ii -th sample in the batched input is a 2D tensor input[i,j]\text{input}[i, j] ). Each channel will be zeroed out independently on every forward call with probability p using samples from a Bernoulli distribution. Usuall...
doc_2279
Build a forest of trees from the training set (X, y). Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Internally, its dtype will be converted to dtype=np.float32. If a sparse matrix is provided, it will be converted into a sparse csc_matrix. yarray-like of ...
doc_2280
See Migration guide for more details. tf.compat.v1.keras.layers.Layer tf.keras.layers.Layer( trainable=True, name=None, dtype=None, dynamic=False, **kwargs ) A layer is a callable object that takes as input one or more tensors and that outputs one or more tensors. It involves computation, defined in the call() m...
doc_2281
Raised when a sequence subscript is out of range. (Slice indices are silently truncated to fall in the allowed range; if an index is not an integer, TypeError is raised.)
doc_2282
Alias for set_antialiased.
doc_2283
This should be the first call after the connection to the server has been made. It sends a line to the server consisting of the method string, the url string, and the HTTP version (HTTP/1.1). To disable automatic sending of Host: or Accept-Encoding: headers (for example to accept additional content encodings), specify ...
doc_2284
Fills the input Tensor with values according to the method described in Understanding the difficulty of training deep feedforward neural networks - Glorot, X. & Bengio, Y. (2010), using a normal distribution. The resulting tensor will have values sampled from N(0,std2)\mathcal{N}(0, \text{std}^2) where std=gain×2fa...
doc_2285
Install the control-c handler. When a signal.SIGINT is received (usually in response to the user pressing control-c) all registered results have stop() called.
doc_2286
Returns an iterator over module parameters, yielding both the name of the parameter as well as the parameter itself. Parameters prefix (str) – prefix to prepend to all parameter names. recurse (bool) – if True, then yields parameters of this module and all submodules. Otherwise, yields only parameters that are dir...
doc_2287
Update the template context with some commonly used variables. This injects request, session, config and g into the template context as well as everything template context processors want to inject. Note that the as of Flask 0.6, the original values in the context will not be overridden if a context processor decides t...
doc_2288
Set a label that will be displayed in the legend. Parameters sobject s will be converted to a string by calling str.
doc_2289
sklearn.covariance.oas(X, *, assume_centered=False) [source] Estimate covariance with the Oracle Approximating Shrinkage algorithm. Parameters Xarray-like of shape (n_samples, n_features) Data from which to compute the covariance estimate. assume_centeredbool, default=False If True, data will not be centere...
doc_2290
Call self as a function.
doc_2291
The last colorbar associated with this ScalarMappable. May be None.
doc_2292
See Migration guide for more details. tf.compat.v1.log1p, tf.compat.v1.math.log1p tf.math.log1p( x, name=None ) I.e., \(y = \log_e (1 + x)\). Example: x = tf.constant([0, 0.5, 1, 5]) tf.math.log1p(x) <tf.Tensor: shape=(4,), dtype=float32, numpy=array([0. , 0.4054651, 0.6931472, 1.7917595], dtype=float32)>...
doc_2293
Bases: matplotlib.backend_tools.ToolBase Base tool for figure saving. default_keymap=['s', 'ctrl+s'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas. description='Save the figure' Description of the Tool. str: Too...
doc_2294
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderSerializeStateV2 tf.raw_ops.ReaderSerializeStateV2( reader_handle, name=None ) Not all Readers support being serialized, so this can produce an Unimplemented error. Args reader_handle A Tensor of type resource. Handle to a Reader. name...
doc_2295
See Migration guide for more details. tf.compat.v1.io.gfile.rename tf.io.gfile.rename( src, dst, overwrite=False ) Args src string, pathname for a file dst string, pathname to which the file needs to be moved overwrite boolean, if false it's an error for dst to be occupied by an existing fil...
doc_2296
sklearn.metrics.precision_recall_curve(y_true, probas_pred, *, pos_label=None, sample_weight=None) [source] Compute precision-recall pairs for different probability thresholds. Note: this implementation is restricted to the binary classification task. The precision is the ratio tp / (tp + fp) where tp is the number o...
doc_2297
Fills the input Tensor with the value val\text{val} . Parameters tensor – an n-dimensional torch.Tensor val – the value to fill the tensor with Examples >>> w = torch.empty(3, 5) >>> nn.init.constant_(w, 0.3)
doc_2298
Computes the log-likelihood of a Gaussian data set with self.covariance_ as an estimator of its covariance matrix. Parameters X_testarray-like of shape (n_samples, n_features) Test data of which we compute the likelihood, where n_samples is the number of samples and n_features is the number of features. X_test ...
doc_2299
Similar to contextmanager(), but creates an asynchronous context manager. This function is a decorator that can be used to define a factory function for async with statement asynchronous context managers, without needing to create a class or separate __aenter__() and __aexit__() methods. It must be applied to an asynch...