_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_20500
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_20501
See torch.fmod()
doc_20502
Equivalent to gettext() and ngettext(), but the translation is returned as a byte string encoded in the preferred system encoding if no encoding was explicitly set with set_output_charset(). Warning These methods should be avoided in Python 3. See the warning for the lgettext() function. Deprecated since version 3.8...
doc_20503
The public identifier for the external subset of the document type definition. This will be a string or None.
doc_20504
Instances are a context manager that raises ResourceDenied if the specified exception type is raised. Any keyword arguments are treated as attribute/value pairs to be compared against any exception raised within the with statement. Only if all pairs match properly against attributes on the exception is ResourceDenied r...
doc_20505
class sklearn.linear_model.SGDRegressor(loss='squared_loss', *, penalty='l2', alpha=0.0001, l1_ratio=0.15, fit_intercept=True, max_iter=1000, tol=0.001, shuffle=True, verbose=0, epsilon=0.1, random_state=None, learning_rate='invscaling', eta0=0.01, power_t=0.25, early_stopping=False, validation_fraction=0.1, n_iter_no_...
doc_20506
Return dt + offset. The dt argument must be an aware datetime instance, with tzinfo set to self.
doc_20507
Set the artist's clip path. Parameters pathPatch or Path or TransformedPath or None The clip path. If given a Path, transform must be provided as well. If None, a previously set clip path is removed. transformTransform, optional Only used if path is a Path, in which case the given Path is converted to a Tra...
doc_20508
Convert y using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, y itself is returned.
doc_20509
types.BuiltinMethodType The type of built-in functions like len() or sys.exit(), and methods of built-in classes. (Here, the term “built-in” means “written in C”.)
doc_20510
Pick the best color depth for a display mode mode_ok(size, flags=0, depth=0, display=0) -> depth This function uses the same arguments as pygame.display.set_mode(). It is used to determine if a requested display mode is available. It will return 0 if the display mode cannot be set. Otherwise it will return a pixel de...
doc_20511
Send data to the server. This should be used directly only after the endheaders() method has been called and before getresponse() is called.
doc_20512
Returns True if all elements evaluate to True. Refer to numpy.all for full documentation. See also numpy.all equivalent function
doc_20513
Closes access to the shared memory from this instance. In order to ensure proper cleanup of resources, all instances should call close() once the instance is no longer needed. Note that calling close() does not cause the shared memory block itself to be destroyed.
doc_20514
Logarithm of the sum of exponentiations of the inputs. Calculates pointwise log⁡(ex+ey)\log\left(e^x + e^y\right) . This function is useful in statistics where the calculated probabilities of events may be so small as to exceed the range of normal floating point numbers. In such cases the logarithm of the calculated pr...
doc_20515
See Migration guide for more details. tf.compat.v1.signal.inverse_mdct tf.signal.inverse_mdct( mdcts, window_fn=tf.signal.vorbis_window, norm=None, name=None ) To reconstruct an original waveform, the same window function should be used with mdct and inverse_mdct. Example usage: @tf.function def compare_round_t...
doc_20516
run a FreeType rendering example freetype_misc.main() -> None A showcase of rendering features the pygame.freetype.Font class provides in addition to those available with pygame.font.Font. It is a demonstration of direct to surface rendering, with vertical text and rotated text, opaque text and semi transparent text,...
doc_20517
Get the artist's bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist windo...
doc_20518
A generic version of collections.OrderedDict. New in version 3.7.2. Deprecated since version 3.9: collections.OrderedDict now supports []. See PEP 585 and Generic Alias Type.
doc_20519
Send the contents of a file to the client. The first argument can be a file path or a file-like object. Paths are preferred in most cases because Werkzeug can manage the file and get extra information from the path. Passing a file-like object requires that the file is opened in binary mode, and is mostly useful when bu...
doc_20520
Scalar method identical to the corresponding array attribute. Please see ndarray.reshape.
doc_20521
Check if a header is an HTTP/1.1 “Hop-by-Hop” header. Changelog New in version 0.5. Parameters header (str) – the header to test. Returns True if it’s an HTTP/1.1 “Hop-by-Hop” header, False otherwise. Return type bool
doc_20522
class sklearn.cluster.AgglomerativeClustering(n_clusters=2, *, affinity='euclidean', memory=None, connectivity=None, compute_full_tree='auto', linkage='ward', distance_threshold=None, compute_distances=False) [source] Agglomerative Clustering Recursively merges the pair of clusters that minimally increases a given li...
doc_20523
Class for timing execution speed of small code snippets. The constructor takes a statement to be timed, an additional statement used for setup, and a timer function. Both statements default to 'pass'; the timer function is platform-dependent (see the module doc string). stmt and setup may also contain multiple statemen...
doc_20524
Ensures that enough disk space is allocated for the file specified by fd starting from offset and continuing for len bytes. Availability: Unix. New in version 3.3.
doc_20525
Stores a range of large integers. Based on a BigIntegerField. Represented by an int8range in the database and a NumericRange in Python. Regardless of the bounds specified when saving the data, PostgreSQL always returns a range in a canonical form that includes the lower bound and excludes the upper bound, that is [).
doc_20526
Fills self tensor with the specified value.
doc_20527
Set the ticks position. Parameters position{'top', 'bottom', 'both', 'default', 'none'} 'both' sets the ticks to appear on both positions, but does not change the tick labels. 'default' resets the tick positions to the default: ticks on both positions, labels at bottom. 'none' can be used if you don't want any ...
doc_20528
See Migration guide for more details. tf.compat.v1.ensure_shape tf.ensure_shape( x, shape, name=None ) For example: @tf.function(input_signature=[tf.TensorSpec(shape=None, dtype=tf.float32)]) def f(tensor): return tf.ensure_shape(tensor, [3, 3]) f(tf.zeros([3, 3])) # Passes <tf.Tensor: shape=(3, 3), dtype=fl...
doc_20529
The attribute name. In a namespace-using document it may include a colon.
doc_20530
See Migration guide for more details. tf.compat.v1.tpu.experimental.Topology tf.tpu.experimental.Topology( serialized=None, mesh_shape=None, device_coordinates=None ) Represents both the shape of the physical mesh, and the mapping between TensorFlow TPU devices to physical mesh coordinates. Args serialize...
doc_20531
Returns None as bytecode files have no source when this loader is used.
doc_20532
Size of the memory block in bytes (int).
doc_20533
Expands a basic dictionary with session attributes. accessed = True Some implementations can detect when session data is read or written and set this when that happens. The mixin default is hard coded to True. modified = True Some implementations can detect changes to the session and set this when that happen...
doc_20534
Alias for get_linewidth.
doc_20535
Flashes a message to the next request. In order to remove the flashed message from the session and to display it to the user, the template has to call get_flashed_messages(). Changelog Changed in version 0.3: category parameter added. Parameters message (str) – the message to be flashed. category (str) – the cat...
doc_20536
Copy a node from one graph into another. arg_transform needs to transform arguments from the graph of node to the graph of self. Example: # Copying all the nodes in `g` into `new_graph` g : torch.fx.Graph = ... new_graph = torch.fx.graph() value_remap = {} for node in g.nodes: value_remap[node] = new_graph.node_c...
doc_20537
A class implementing the descriptor protocol that is instantiated and assigned to the model instance attribute. The constructor must accept a single argument, the Field instance. Overriding this class attribute allows for customizing the get and set behavior.
doc_20538
Return a list of all the values for the field named name. If there are no such named headers in the message, failobj is returned (defaults to None).
doc_20539
Instructs writer objects to quote all fields.
doc_20540
Turn the minor ticks of the colorbar off.
doc_20541
Path to a custom template, used by history_view().
doc_20542
A data structure of functions to call at the end of each request, in the format {scope: [functions]}. The scope key is the name of a blueprint the functions are active for, or None for all requests. To register a function, use the after_request() decorator. This data structure is internal. It should not be modified dir...
doc_20543
Return an info dict for a given C library. The info dict contains the necessary options to use the C library. Parameters pkgnamestr Name of the package (should match the name of the .ini file, without the extension, e.g. foo for the file foo.ini). dirssequence, optional If given, should be a sequence of add...
doc_20544
Performs a single optimization step (parameter update). Parameters closure (callable) – A closure that reevaluates the model and returns the loss. Optional for most optimizers. Note Unless otherwise specified, this function should not modify the .grad field of the parameters.
doc_20545
Attributes key string key value string value
doc_20546
class sklearn.gaussian_process.GaussianProcessRegressor(kernel=None, *, alpha=1e-10, optimizer='fmin_l_bfgs_b', n_restarts_optimizer=0, normalize_y=False, copy_X_train=True, random_state=None) [source] Gaussian process regression (GPR). The implementation is based on Algorithm 2.1 of Gaussian Processes for Machine Le...
doc_20547
Register a custom template global function. Works exactly like the template_global() decorator. Changelog New in version 0.10. Parameters name (Optional[str]) – the optional name of the global function, otherwise the function name will be used. f (Callable[[], Any]) – Return type None
doc_20548
Returns a string of the data in query string format. For example: >>> q = QueryDict('a=2&b=3&b=5') >>> q.urlencode() 'a=2&b=3&b=5' Use the safe parameter to pass characters which don’t require encoding. For example: >>> q = QueryDict(mutable=True) >>> q['next'] = '/a&b/' >>> q.urlencode(safe='/') 'next=/a%26b/'
doc_20549
Returns numpy array of python datetime.date objects. Namely, the date part of Timestamps without time and timezone information.
doc_20550
Set the artist's visibility. Parameters bbool
doc_20551
See Migration guide for more details. tf.compat.v1.strings.unicode_transcode tf.strings.unicode_transcode( input, input_encoding, output_encoding, errors='replace', replacement_char=65533, replace_control_characters=False, name=None ) The input is a string tensor of any shape. The output is a string tensor o...
doc_20552
Bases: skimage.viewer.plugins.base.Plugin __init__(maxdist=10, **kwargs) [source] Initialize self. See help(type(self)) for accurate signature. attach(image_viewer) [source] Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the Ima...
doc_20553
Called when the XML declaration is parsed. The XML declaration is the (optional) declaration of the applicable version of the XML recommendation, the encoding of the document text, and an optional “standalone” declaration. version and encoding will be strings, and standalone will be 1 if the document is declared standa...
doc_20554
numpy.uint16 numpy.uint32 numpy.uint64 Alias for the unsigned integer types (one of numpy.ubyte, numpy.ushort, numpy.uintc, numpy.uint and numpy.ulonglong) with the specified number of bits. Compatible with the C99 uint8_t, uint16_t, uint32_t, and uint64_t, respectively.
doc_20555
See Migration guide for more details. tf.compat.v1.raw_ops.SparseReduceSum tf.raw_ops.SparseReduceSum( input_indices, input_values, input_shape, reduction_axes, keep_dims=False, name=None ) This Op takes a SparseTensor and is the sparse counterpart to tf.reduce_sum(). In particular, this Op also returns a de...
doc_20556
Return the dtype object of the underlying data.
doc_20557
Adds the HTTP header to an internal buffer which will be written to the output stream when either end_headers() or flush_headers() is invoked. keyword should specify the header keyword, with value specifying its value. Note that, after the send_header calls are done, end_headers() MUST BE called in order to complete th...
doc_20558
Return the clipbox.
doc_20559
See Migration guide for more details. tf.compat.v1.keras.layers.Cropping2D tf.keras.layers.Cropping2D( cropping=((0, 0), (0, 0)), data_format=None, **kwargs ) It crops along spatial dimensions, i.e. height and width. Examples: input_shape = (2, 28, 28, 3) x = np.arange(np.prod(input_shape)).reshape(input_shape)...
doc_20560
New in Django 4.0. The name of the template used when calling as_p(). By default this is 'django/forms/formsets/p.html'. This template renders the formset’s management form and then each form in the formset as per the form’s as_p() method.
doc_20561
A Signature object represents the call signature of a function and its return annotation. For each parameter accepted by the function it stores a Parameter object in its parameters collection. The optional parameters argument is a sequence of Parameter objects, which is validated to check that there are no parameters w...
doc_20562
Generate polygon perimeter coordinates. Parameters r(N,) ndarray Row coordinates of vertices of polygon. c(N,) ndarray Column coordinates of vertices of polygon. shapetuple, optional Image shape which is used to determine maximum extents of output pixel coordinates. This is useful for polygons that exce...
doc_20563
Perform classification on an array of test vectors X. Parameters Xarray-like of shape (n_samples, n_features) Returns Cndarray of shape (n_samples,) Predicted target values for X
doc_20564
Spawn a process, and connect its controlling terminal with the current process’s standard io. This is often used to baffle programs which insist on reading from the controlling terminal. It is expected that the process spawned behind the pty will eventually terminate, and when it does spawn will return. The functions m...
doc_20565
The socket family.
doc_20566
Return Integer division of series and other, element-wise (binary operator floordiv). Equivalent to series // other, but with support to substitute a fill_value for missing data in either one of the inputs. Parameters other:Series or scalar value fill_value:None or float value, default None (NaN) Fill existin...
doc_20567
Applied element-wise, as: SELU(x)=scale∗(max⁡(0,x)+min⁡(0,α∗(exp⁡(x)−1)))\text{SELU}(x) = \text{scale} * (\max(0,x) + \min(0, \alpha * (\exp(x) - 1))) with α=1.6732632423543772848170429916717\alpha = 1.6732632423543772848170429916717 and scale=1.0507009873554804934193349852946\text{scale} = 1.05070098735548049341...
doc_20568
Push the current view limits and position onto the stack.
doc_20569
>>> from pathlib import Path >>> afm_path = Path(mpl.get_data_path(), 'fonts', 'afm', 'ptmr8a.afm') >>> >>> from matplotlib.afm import AFM >>> with afm_path.open('rb') as fh: ... afm = AFM(fh) >>> afm.string_width_height('What the heck?') (6220.0, 694) >>> afm.get_fontname() 'Times-Roman' >>> afm.get_kern_dist('A',...
doc_20570
Send a break on file descriptor fd. A zero duration sends a break for 0.25–0.5 seconds; a nonzero duration has a system dependent meaning.
doc_20571
Returns a new instance of the TimedRotatingFileHandler class. The specified file is opened and used as the stream for logging. On rotating it also sets the filename suffix. Rotating happens based on the product of when and interval. You can use the when to specify the type of interval. The list of possible values is be...
doc_20572
Test that a file is provided and that the selection indicates an already existing file.
doc_20573
Loads the Torch serialized object at the given URL. If downloaded file is a zip file, it will be automatically decompressed. If the object is already present in model_dir, it’s deserialized and returned. The default value of model_dir is <hub_dir>/checkpoints where hub_dir is the directory returned by get_dir(). Param...
doc_20574
Process HTTP error responses. For 200 error codes, the response object is returned immediately. For non-200 error codes, this simply passes the job on to the http_error_<type>() handler methods, via OpenerDirector.error(). Eventually, HTTPDefaultErrorHandler will raise an HTTPError if no other handler handles the error...
doc_20575
Constructor for a StreamReader instance. All stream readers must provide this constructor interface. They are free to add additional keyword arguments, but only the ones defined here are used by the Python codec registry. The stream argument must be a file-like object open for reading text or binary data, as appropriat...
doc_20576
normalizes the vector in place so that its length is 1. normalize_ip() -> None Normalizes the vector so that it has length equal to 1. The direction of the vector is not changed.
doc_20577
See Migration guide for more details. tf.compat.v1.data.experimental.enumerate_dataset tf.data.experimental.enumerate_dataset( start=0 ) Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.data.Dataset.enumerate(). It is similar to python's enumerate. F...
doc_20578
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_20579
A floating-point positive infinity. (For negative infinity, use -math.inf.) Equivalent to the output of float('inf'). New in version 3.5.
doc_20580
header, which allows caching proxies to cache different pages for different users.
doc_20581
Perform a shutdown of the RPC agent, and then destroy the RPC agent. This stops the local agent from accepting outstanding requests, and shuts down the RPC framework by terminating all RPC threads. If graceful=True, this will block until all local and remote RPC processes reach this method and wait for all outstandin...
doc_20582
The true value of the bool type. Assignments to True are illegal and raise a SyntaxError.
doc_20583
Mark for refresh but wait. This function updates the data structure representing the desired state of the window, but does not force an update of the physical screen. To accomplish that, call doupdate().
doc_20584
tf.losses.SparseCategoricalCrossentropy Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.losses.SparseCategoricalCrossentropy tf.keras.losses.SparseCategoricalCrossentropy( from_logits=False, reduction=losses_utils.ReductionV2.AUTO, name='sparse_categorical_crossentropy' )...
doc_20585
turtle.bk(distance) turtle.backward(distance) Parameters distance – a number Move the turtle backward by distance, opposite to the direction the turtle is headed. Do not change the turtle’s heading. >>> turtle.position() (0.00,0.00) >>> turtle.backward(30) >>> turtle.position() (-30.00,0.00)
doc_20586
Applies alpha dropout to the input. See AlphaDropout for details.
doc_20587
true if the display is receiving keyboard input from the system get_focused() -> bool Returns True when the display window has keyboard focus from the system. If the display needs to ensure it does not lose keyboard focus, it can use pygame.event.set_grab() to grab all input.
doc_20588
This reads the buffered incoming data from the client into one bytes object. By default this is cached but that behavior can be changed by setting cache to False. Usually it’s a bad idea to call this method without checking the content length first as a client could send dozens of megabytes or more to cause memory prob...
doc_20589
Called for each declared attribute for an element type. If an attribute list declaration declares three attributes, this handler is called three times, once for each attribute. elname is the name of the element to which the declaration applies and attname is the name of the attribute declared. The attribute type is a s...
doc_20590
Return self+value.
doc_20591
Return a frozen copy of this transform node. The frozen copy will not be updated when its children change. Useful for storing a previously known state of a transform where copy.deepcopy() might normally be used.
doc_20592
Return the value for key if key is in the dictionary, else default. If default is not given, it defaults to None, so that this method never raises a KeyError.
doc_20593
Use UniqueConstraint with the constraints option instead. UniqueConstraint provides more functionality than unique_together. unique_together may be deprecated in the future. Sets of field names that, taken together, must be unique: unique_together = [['driver', 'restaurant']] This is a list of lists that must be uni...
doc_20594
The HTTP reason phrase for the response. It uses the HTTP standard’s default reason phrases. Unless explicitly set, reason_phrase is determined by the value of status_code.
doc_20595
alias of mpl_toolkits.axes_grid1.parasite_axes.AxesParasite
doc_20596
Read all data until EOF as bytes; block until connection closed.
doc_20597
Return the Colormap instance.
doc_20598
tf.experimental.numpy.ptp( a, axis=None, keepdims=None ) Unsupported arguments: out. See the NumPy documentation for numpy.ptp.
doc_20599
Remove “small” “trailing” coefficients from a polynomial. “Small” means “small in absolute value” and is controlled by the parameter tol; “trailing” means highest order coefficient(s), e.g., in [0, 1, 1, 0, 0] (which represents 0 + x + x**2 + 0*x**3 + 0*x**4) both the 3-rd and 4-th order coefficients would be “trimme...