_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_1800
If set to true, sys.stdout and sys.stderr will be buffered in between startTest() and stopTest() being called. Collected output will only be echoed onto the real sys.stdout and sys.stderr if the test fails or errors. Any output is also attached to the failure / error message. New in version 3.2.
doc_1801
socket.SOCK_DGRAM socket.SOCK_RAW socket.SOCK_RDM socket.SOCK_SEQPACKET These constants represent the socket types, used for the second argument to socket(). More constants may be available depending on the system. (Only SOCK_STREAM and SOCK_DGRAM appear to be generally useful.)
doc_1802
Given a middleware class, returns a view decorator. This lets you use middleware functionality on a per-view basis. The middleware is created with no params passed. It assumes middleware that’s compatible with the old style of Django 1.9 and earlier (having methods like process_request(), process_exception(), and pro...
doc_1803
A string representing the current encoding used to decode form submission data (or None, which means the DEFAULT_CHARSET setting is used). You can write to this attribute to change the encoding used when accessing the form data. Any subsequent attribute accesses (such as reading from GET or POST) will use the new encod...
doc_1804
Returns True if the joystick module is initialized. get_init() -> bool Test if the pygame.joystick.init() function has been called.
doc_1805
Get a colormap instance, defaulting to rc values if name is None. Colormaps added with register_cmap() take precedence over built-in colormaps. Parameters namematplotlib.colors.Colormap or str or None, default: None If a Colormap instance, it will be returned. Otherwise, the name of a colormap known to Matplotl...
doc_1806
pygame constants This module contains various constants used by pygame. Its contents are automatically placed in the pygame module namespace. However, an application can use pygame.locals to include only the pygame constants with a from pygame.locals import *. Detailed descriptions of the various constants can be ...
doc_1807
Return True if the set has no elements in common with other. Sets are disjoint if and only if their intersection is the empty set.
doc_1808
A buffered binary stream providing higher-level access to a writeable, non seekable RawIOBase raw binary stream. It inherits BufferedIOBase. When writing to this object, data is normally placed into an internal buffer. The buffer will be written out to the underlying RawIOBase object under various conditions, including...
doc_1809
See Migration guide for more details. tf.compat.v1.io.gfile.mkdir tf.io.gfile.mkdir( path ) Args path string, name of the directory to be created Notes: The parent directories need to exist. Use tf.io.gfile.makedirs instead if there is the possibility that the parent dirs don't exist. Raises e...
doc_1810
Bases: matplotlib.patches.Polygon Like Arrow, but lets you set head width and head height independently. Parameters x, yfloat The x and y coordinates of the arrow base. dx, dyfloat The length of the arrow along x and y direction. widthfloat, default: 0.001 Width of full arrow tail. length_includes_hea...
doc_1811
Alias for set_fontproperties.
doc_1812
Bases: matplotlib.scale.ScaleBase Logit scale for data between zero and one, both excluded. This scale is similar to a log scale close to zero and to one, and almost linear around 0.5. It maps the interval ]0, 1[ onto ]-infty, +infty[. Parameters axismatplotlib.axis.Axis Currently unused. nonpositive{'mask', ...
doc_1813
Return a bytes object containing the terminfo long name field describing the current terminal. The maximum length of a verbose description is 128 characters. It is defined only after the call to initscr().
doc_1814
Provide a per-write equivalent of the O_DSYNC open(2) flag. This flag effect applies only to the data range written by the system call. Availability: Linux 4.7 and newer. New in version 3.7.
doc_1815
Return a proxy object that delegates method calls to a parent or sibling class of type. This is useful for accessing inherited methods that have been overridden in a class. The object-or-type determines the method resolution order to be searched. The search starts from the class right after the type. For example, if __...
doc_1816
Returns the same Decimal object x.
doc_1817
See Migration guide for more details. tf.compat.v1.keras.activations.selu tf.keras.activations.selu( x ) The Scaled Exponential Linear Unit (SELU) activation function is defined as: if x > 0: return scale * x if x < 0: return scale * alpha * (exp(x) - 1) where alpha and scale are pre-defined constants (alpha=1...
doc_1818
Open an encoded file using the given mode and return an instance of StreamReaderWriter, providing transparent encoding/decoding. The default file mode is 'r', meaning to open the file in read mode. Note Underlying encoded files are always opened in binary mode. No automatic conversion of '\n' is done on reading and wr...
doc_1819
Whether the OpenSSL library has built-in support for the TLS 1.1 protocol. New in version 3.7.
doc_1820
tf.compat.v1.to_bfloat16( x, name='ToBFloat16' ) Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.cast instead. Args x A Tensor or SparseTensor or IndexedSlices. name A name for the operation (optional). Returns A Tensor or Spa...
doc_1821
tf.compat.v1.squeeze( input, axis=None, name=None, squeeze_dims=None ) Warning: SOME ARGUMENTS ARE DEPRECATED: (squeeze_dims). They will be removed in a future version. Instructions for updating: Use the axis argument instead Given a tensor input, this operation returns a tensor of the same type with all dimension...
doc_1822
A Popen creationflags parameter to specify that a new process does not inherit the error mode of the calling process. Instead, the new process gets the default error mode. This feature is particularly useful for multithreaded shell applications that run with hard errors disabled. New in version 3.7.
doc_1823
tf.compat.v1.distribute.experimental.TPUStrategy( tpu_cluster_resolver=None, steps_per_run=None, device_assignment=None ) Args tpu_cluster_resolver A tf.distribute.cluster_resolver.TPUClusterResolver, which provides information about the TPU cluster. steps_per_run Number of steps to run on device be...
doc_1824
DateOffset increments between calendar year ends. Attributes base Returns a copy of the calling offset object with n=1 and all other attributes equal. freqstr kwds month n name nanos normalize rule_code Methods __call__(*args, **kwargs) Call self as a function. rollb...
doc_1825
A Modular Crypt Format method with 16 character salt and 86 character hash based on the SHA-512 hash function. This is the strongest method.
doc_1826
Return an antiderivative (indefinite integral) of this polynomial. Refer to polyint for full documentation. See also polyint equivalent function
doc_1827
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_1828
Copy a network object denoted by a URL to a local file. If the URL points to a local file, the object will not be copied unless filename is supplied. Return a tuple (filename, headers) where filename is the local file name under which the object can be found, and headers is whatever the info() method of the object retu...
doc_1829
Alias for set_facecolor.
doc_1830
An abstract method to return the source of a module. It is returned as a text string using universal newlines, translating all recognized line separators into '\n' characters. Returns None if no source is available (e.g. a built-in module). Raises ImportError if the loader cannot find the module specified. Changed in ...
doc_1831
Find the minimum value of an array over positive values Returns a huge value if none of the values are positive
doc_1832
Returns the largest representable number smaller than x.
doc_1833
Return the artist that this HandlerBase generates for the given original artist/handle. Parameters legendLegend The legend for which these legend artists are being created. orig_handlematplotlib.artist.Artist or similar The object for which these legend artists are being created. fontsizeint The fontsiz...
doc_1834
Remove an attribute by name. Note that it uses a localName, not a qname. No exception is raised if there is no matching attribute.
doc_1835
Convert escaped markup back into a text string. This replaces HTML entities with the characters they represent. >>> Markup("Main &raquo; <em>About</em>").unescape() 'Main » <em>About</em>' Return type str
doc_1836
Attach the watcher to an event loop. If the watcher was previously attached to an event loop, then it is first detached before attaching to the new loop. Note: loop may be None.
doc_1837
See Migration guide for more details. tf.compat.v1.raw_ops.ScalarSummary tf.raw_ops.ScalarSummary( tags, values, name=None ) The input tags and values must have the same shape. The generated summary has a summary value for each tag-value pair in tags and values. Args tags A Tensor of type string. Tags f...
doc_1838
The one and only root element of the document.
doc_1839
Test element-wise for finiteness (not infinity and not Not a Number). The result is returned as a boolean array. Parameters xarray_like Input values. outndarray, None, or tuple of ndarray and None, optional A location into which the result is stored. If provided, it must have a shape that the inputs broadca...
doc_1840
See Migration guide for more details. tf.compat.v1.raw_ops.QuantizeV2 tf.raw_ops.QuantizeV2( input, min_range, max_range, T, mode='MIN_COMBINED', round_mode='HALF_AWAY_FROM_ZERO', narrow_range=False, axis=-1, ensure_minimum_range=0.01, name=None ) [min_range, max_range] are scalar floats that specify the...
doc_1841
the hash function to use for the signature. The default is sha1
doc_1842
This signal is sent when the request context is set up, before any request processing happens. Because the request context is already bound, the subscriber can access the request with the standard global proxies such as request. Example subscriber: def log_request(sender, **extra): sender.logger.debug('Request cont...
doc_1843
Encodes obj using the codec registered for encoding. Errors may be given to set the desired error handling scheme. The default error handler is 'strict' meaning that encoding errors raise ValueError (or a more codec specific subclass, such as UnicodeEncodeError). Refer to Codec Base Classes for more information on code...
doc_1844
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_1845
Add label to the list of labels on the message.
doc_1846
skimage.data.astronaut() Color image of the astronaut Eileen Collins. skimage.data.binary_blobs([length, …]) Generate synthetic binary image with several rounded blob-like objects. skimage.data.brain() Subset of data from the University of North Carolina Volume Rendering Test Data Set. skimage.data.brick() Brick ...
doc_1847
Termination signal.
doc_1848
A special method to re-show the figure in the notebook.
doc_1849
Counts the number of non-zero values in the array a. The word “non-zero” is in reference to the Python 2.x built-in method __nonzero__() (renamed __bool__() in Python 3.x) of Python objects that tests an object’s “truthfulness”. For example, any number is considered truthful if it is nonzero, whereas any string is co...
doc_1850
Computes a partial inverse of MaxPool2d. MaxPool2d is not fully invertible, since the non-maximal values are lost. MaxUnpool2d takes in as input the output of MaxPool2d including the indices of the maximal values and computes a partial inverse in which all non-maximal values are set to zero. Note MaxPool2d can map s...
doc_1851
Plot the coherence between x and y. Plot the coherence between x and y. Coherence is the normalized cross spectral density: \[C_{xy} = \frac{|P_{xy}|^2}{P_{xx}P_{yy}}\] Parameters Fsfloat, default: 2 The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycl...
doc_1852
Connect the callback function func to button click events. Returns a connection id, which can be used to disconnect the callback.
doc_1853
Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig_kwargs are passed on to the savefig call that saves the figure.
doc_1854
Return an array of zeros with the same shape and type as a given array. Parameters aarray_like The shape and data-type of a define these same attributes of the returned array. dtypedata-type, optional Overrides the data type of the result. New in version 1.6.0. order{‘C’, ‘F’, ‘A’, or ‘K’}, optional O...
doc_1855
Set the message’s envelope header to unixfrom, which should be a string. (See mboxMessage for a brief description of this header.)
doc_1856
See Migration guide for more details. tf.compat.v1.raw_ops.FlushSummaryWriter tf.raw_ops.FlushSummaryWriter( writer, name=None ) Args writer A Tensor of type resource. name A name for the operation (optional). Returns The created Operation.
doc_1857
A 1-based range iterator of page numbers, e.g. yielding [1, 2, 3, 4].
doc_1858
Return True if func is a coroutine function. This method is different from inspect.iscoroutinefunction() because it returns True for generator-based coroutine functions decorated with @coroutine.
doc_1859
This method commits the current transaction. If you don’t call this method, anything you did since the last call to commit() is not visible from other database connections. If you wonder why you don’t see the data you’ve written to the database, please check you didn’t forget to call this method.
doc_1860
tf.profiler.experimental.ProfilerOptions( host_tracer_level=2, python_tracer_level=0, device_tracer_level=1, delay_ms=None ) Use tf.profiler.ProfilerOptions to control tf.profiler behavior. Fields: host_tracer_level: Adjust CPU tracing level. Values are: 1 - critical info only, 2 - info, 3 - verbose. [default va...
doc_1861
tf.distribute.DistributedValues( values ) A subclass instance of tf.distribute.DistributedValues is created when creating variables within a distribution strategy, iterating a tf.distribute.DistributedDataset or through tf.distribute.Strategy.run. This base class should never be instantiated directly. tf.distribut...
doc_1862
AnchoredLocatorBase(bbox_to_anchor, ...[, ...]) Parameters AnchoredSizeLocator(bbox_to_anchor, x_size, ...) Parameters AnchoredZoomLocator(parent_axes, zoom, loc) Parameters BboxConnector(bbox1, bbox2, loc1[, loc2]) Connect two bboxes with a straight line. BboxConnectorPatch(bbox1, bbox2, loc1a, ......
doc_1863
Start the playback of the music stream play(loops=0, start=0.0, fade_ms = 0) -> None This will play the loaded music stream. If the music is already playing it will be restarted. loops is an optional integer argument, which is 0 by default, it tells how many times to repeat the music. The music repeats indefinately i...
doc_1864
See Migration guide for more details. tf.compat.v1.math.special.bessel_y0 tf.math.special.bessel_y0( x, name=None ) Modified Bessel function of order 0. tf.math.special.bessel_y0([0.5, 1., 2., 4.]).numpy() array([-0.44451873, 0.08825696, 0.51037567, -0.01694074], dtype=float32) Args x A Tensor or Sp...
doc_1865
See Migration guide for more details. tf.compat.v1.raw_ops.DeepCopy tf.raw_ops.DeepCopy( x, name=None ) Args x A Tensor. The source tensor of type T. name A name for the operation (optional). Returns A Tensor. Has the same type as x.
doc_1866
See Migration guide for more details. tf.compat.v1.train.ClusterSpec tf.train.ClusterSpec( cluster ) A tf.train.ClusterSpec represents the set of processes that participate in a distributed TensorFlow computation. Every tf.distribute.Server is constructed in a particular cluster. To create a cluster with two job...
doc_1867
accessor for ‘no-transform’
doc_1868
See Migration guide for more details. tf.compat.v1.sparse.to_indicator, tf.compat.v1.sparse_to_indicator tf.sparse.to_indicator( sp_input, vocab_size, name=None ) The last dimension of sp_input.indices is discarded and replaced with the values of sp_input. If sp_input.dense_shape = [D0, D1, ..., Dn, K], then out...
doc_1869
Check if the object is dict-like. Parameters obj:The object to check Returns is_dict_like:bool Whether obj has dict-like properties. Examples >>> is_dict_like({1: 2}) True >>> is_dict_like([1, 2, 3]) False >>> is_dict_like(dict) False >>> is_dict_like(dict()) True
doc_1870
Return a derivative of this polynomial. Refer to polyder for full documentation. See also polyder equivalent function
doc_1871
tf.sqrt Compat aliases for migration See Migration guide for more details. tf.compat.v1.math.sqrt, tf.compat.v1.sqrt tf.math.sqrt( x, name=None ) Note: This operation does not support integer types. x = tf.constant([[4.0], [16.0]]) tf.sqrt(x) <tf.Tensor: shape=(2, 1), dtype=float32, numpy= array([[2.], ...
doc_1872
Predict using the linear model. Parameters Xarray-like or sparse matrix, shape (n_samples, n_features) Samples. Returns Carray, shape (n_samples,) Returns predicted values.
doc_1873
Define default roll function to be called in apply method.
doc_1874
Set parameters for this locator. Parameters nbinsint or 'auto', optional see MaxNLocator stepsarray-like, optional see MaxNLocator integerbool, optional see MaxNLocator symmetricbool, optional see MaxNLocator prune{'lower', 'upper', 'both', None}, optional see MaxNLocator min_n_ticksint, optio...
doc_1875
Open the file pointed to in text mode, write data to it, and close the file: >>> p = Path('my_text_file') >>> p.write_text('Text file contents') 18 >>> p.read_text() 'Text file contents' An existing file of the same name is overwritten. The optional parameters have the same meaning as in open(). New in version 3.5.
doc_1876
New in Django 4.0. The default command options to suppress in the help output. This should be a set of option names (e.g. '--verbosity'). The default values for the suppressed options are still passed.
doc_1877
Transform a method into a static method. A static method does not receive an implicit first argument. To declare a static method, use this idiom: class C: @staticmethod def f(arg1, arg2, ...): ... The @staticmethod form is a function decorator – see Function definitions for details. A static method can be call...
doc_1878
operator.__matmul__(a, b) Return a @ b. New in version 3.5.
doc_1879
Copy properties from other to self.
doc_1880
Return a function that converts a pdf file to a png file.
doc_1881
tf.compat.v1.data.experimental.choose_from_datasets( datasets, choice_dataset ) For example, given the following datasets: datasets = [tf.data.Dataset.from_tensors("foo").repeat(), tf.data.Dataset.from_tensors("bar").repeat(), tf.data.Dataset.from_tensors("baz").repeat()] # Define a datase...
doc_1882
The FileType factory creates objects that can be passed to the type argument of ArgumentParser.add_argument(). Arguments that have FileType objects as their type will open command-line arguments as files with the requested modes, buffer sizes, encodings and error handling (see the open() function for more details): >>>...
doc_1883
Return random floats in the half-open interval [0.0, 1.0). Results are from the “continuous uniform” distribution over the stated interval. To sample \(Unif[a, b), b > a\) multiply the output of random_sample by (b-a) and add a: (b - a) * random_sample() + a Note New code should use the random method of a default_r...
doc_1884
A string or list of strings specifying the ordering to apply to the queryset. Valid values are the same as those for order_by().
doc_1885
The CheckList widget displays a list of items to be selected by the user. CheckList acts similarly to the Tk checkbutton or radiobutton widgets, except it is capable of handling many more items than checkbuttons or radiobuttons.
doc_1886
Roll provided date backward to next offset only if not on offset. Returns TimeStamp Rolled timestamp if not on offset, otherwise unchanged timestamp.
doc_1887
calculates the Euclidean distance to a given vector. distance_to(Vector2) -> float
doc_1888
Return a normalized rgba array corresponding to x. In the normal case, x is a 1D or 2D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as mi...
doc_1889
A container for the objects defining tick position and format. Attributes locatormatplotlib.ticker.Locator subclass Determines the positions of the ticks. formattermatplotlib.ticker.Formatter subclass Determines the format of the tick labels.
doc_1890
LineString objects are instantiated using arguments that are either a sequence of coordinates or Point objects. For example, the following are equivalent: >>> ls = LineString((0, 0), (1, 1)) >>> ls = LineString(Point(0, 0), Point(1, 1)) In addition, LineString objects may also be created by passing in a single sequenc...
doc_1891
Applies the randomized leaky rectified liner unit function, element-wise, as described in the paper: Empirical Evaluation of Rectified Activations in Convolutional Network. The function is defined as: RReLU(x)={xif x≥0ax otherwise \text{RReLU}(x) = \begin{cases} x & \text{if } x \geq 0 \\ ax & \text{ otherwise } \en...
doc_1892
tf.experimental.numpy.int_ tf.experimental.numpy.int64( *args, **kwargs ) Character code: 'l'. Canonical name: np.int_. Alias on this platform: np.int64: 64-bit signed integer (-9223372036854775808 to 9223372036854775807). Alias on this platform: np.intp: Signed integer large enough to fit pointer, compatible wi...
doc_1893
Fit underlying estimators. Parameters X(sparse) array-like of shape (n_samples, n_features) Data. y(sparse) array-like of shape (n_samples,) or (n_samples, n_classes) Multi-class targets. An indicator matrix turns on multilabel classification. Returns self
doc_1894
Repeatedly issue a prompt, accept input, parse an initial prefix off the received input, and dispatch to action methods, passing them the remainder of the line as argument. The optional argument is a banner or intro string to be issued before the first prompt (this overrides the intro class attribute). If the readline ...
doc_1895
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_1896
IEEE 754 floating point representation of (positive) infinity. Use inf because Inf, Infinity, PINF and infty are aliases for inf. For more details, see inf. See Also inf
doc_1897
Apply dimensionality reduction to X. X is projected on the first principal components previously extracted from a training set. Parameters Xarray-like, shape (n_samples, n_features) New data, where n_samples is the number of samples and n_features is the number of features. Returns X_newarray-like, shape ...
doc_1898
Return whether the artist is animated.
doc_1899
Whether the OpenSSL library has built-in support for the SSL 3.0 protocol. New in version 3.7.