_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_18300
spammish repetition': >>> import hashlib >>> m = hashlib.sha256() >>> m.update(b"Nobody inspects") >>> m.update(b" the spammish repetition") >>> m.digest() b'\x03\x1e\xdd}Ae\x15\x93\xc5\xfe\\\x00o\xa5u+7\xfd\xdf\xf7\xbcN\x84:\xa6\xaf\x0c\x95\x0fK\x94\x06' >>> m.digest_size 32 >>> m.block_size 64 More condensed: >>> ha...
doc_18301
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_18302
Implements Adadelta algorithm. It has been proposed in ADADELTA: An Adaptive Learning Rate Method. Parameters params (iterable) – iterable of parameters to optimize or dicts defining parameter groups rho (float, optional) – coefficient used for computing a running average of squared gradients (default: 0.9) eps...
doc_18303
See Migration guide for more details. tf.compat.v1.keras.utils.get_custom_objects tf.keras.utils.get_custom_objects() Updating and clearing custom objects using custom_object_scope is preferred, but get_custom_objects can be used to directly access the current collection of custom objects. Example: get_custom_object...
doc_18304
see torch.ravel()
doc_18305
Create a new response object from an application output. This works best if you pass it an application that returns a generator all the time. Sometimes applications may use the write() callable returned by the start_response function. This tries to resolve such edge cases automatically. But if you don’t get the expecte...
doc_18306
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
doc_18307
Return information about the filesystem containing the file associated with file descriptor fd, like statvfs(). As of Python 3.3, this is equivalent to os.statvfs(fd). Availability: Unix.
doc_18308
Make a box plot from DataFrame columns. Make a box-and-whisker plot from DataFrame columns, optionally grouped by some other columns. A box plot is a method for graphically depicting groups of numerical data through their quartiles. The box extends from the Q1 to Q3 quartile values of the data, with a line at the med...
doc_18309
Alias for set_family. One-way alias only: the getter differs. Parameters fontname{FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'} See also font_manager.FontProperties.set_family
doc_18310
Adds a blank line (indicating the end of the HTTP headers in the response) to the headers buffer and calls flush_headers(). Changed in version 3.2: The buffered headers are written to the output stream.
doc_18311
tf.compat.v1.app.run( main=None, argv=None )
doc_18312
Draw a glyph described by info to the reference point (ox, oy).
doc_18313
Skew coefficients used to georeference the raster, as a point object with x and y members. In case of north up images, these coefficients are both 0. >>> rst = GDALRaster({'width': 10, 'height': 20, 'srid': 4326}) >>> rst.skew [0.0, 0.0] >>> rst.skew.x = 3 >>> rst.skew [3.0, 0.0]
doc_18314
Return Multiplication of series and other, element-wise (binary operator rmul). Equivalent to other * series, 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 existing missi...
doc_18315
See Migration guide for more details. tf.compat.v1.raw_ops.StatefulTruncatedNormal tf.raw_ops.StatefulTruncatedNormal( resource, algorithm, shape, dtype=tf.dtypes.float32, name=None ) The generated values follow a normal distribution with mean 0 and standard deviation 1, except that values whose magnitude is mor...
doc_18316
Return whether any element is True, potentially over an axis. Returns False unless there is at least one element within a series or along a Dataframe axis that is True or equivalent (e.g. non-zero or non-empty). Parameters axis:{0 or ‘index’, 1 or ‘columns’, None}, default 0 Indicate which axis or axes should b...
doc_18317
opens, initializes, and starts capturing start() -> None Opens the camera device, attempts to initialize it, and begins recording images to a buffer. The camera must be started before any of the below functions can be used.
doc_18318
Compute the roots of a Chebyshev series. Return the roots (a.k.a. “zeros”) of the polynomial \[p(x) = \sum_i c[i] * T_i(x).\] Parameters c1-D array_like 1-D array of coefficients. Returns outndarray Array of the roots of the series. If all the roots are real, then out is also real, otherwise it is comp...
doc_18319
def login(): user = get_user(request.form['username']) if user.check_password(request.form['password']): login_user(user) app.logger.info('%s logged in successfully', user.username) return redirect(url_for('index')) else: app.logger.info('%s failed to log in', user.username)...
doc_18320
window.chgat(num, attr) window.chgat(y, x, attr) window.chgat(y, x, num, attr) Set the attributes of num characters at the current cursor position, or at position (y, x) if supplied. If num is not given or is -1, the attribute will be set on all the characters to the end of the line. This function moves cursor to...
doc_18321
One for clause in a comprehension. target is the reference to use for each element - typically a Name or Tuple node. iter is the object to iterate over. ifs is a list of test expressions: each for clause can have multiple ifs. is_async indicates a comprehension is asynchronous (using an async for instead of for). The v...
doc_18322
tf.compat.v1.keras.estimator.model_to_estimator( keras_model=None, keras_model_path=None, custom_objects=None, model_dir=None, config=None, checkpoint_format='saver', metric_names_map=None, export_outputs=None ) If you use infrastructure or other tooling that relies on Estimators, you can still build a Ker...
doc_18323
Normalize value data in the [vmin, vmax] interval into the [0.0, 1.0] interval and return it. Parameters value Data to normalize. clipbool If None, defaults to self.clip (which defaults to False). Notes If not already initialized, self.vmin and self.vmax are initialized using self.autoscale_None(value).
doc_18324
class ast.Nonlocal(names) global and nonlocal statements. names is a list of raw strings. >>> print(ast.dump(ast.parse('global x,y,z'), indent=4)) Module( body=[ Global( names=[ 'x', 'y', 'z'])], type_ignores=[]) >>> print(ast.dump(ast.parse...
doc_18325
class sklearn.exceptions.FitFailedWarning [source] Warning class used if there is an error while fitting the estimator. This Warning is used in meta estimators GridSearchCV and RandomizedSearchCV and the cross-validation helper function cross_val_score to warn when there is an error while fitting the estimator. Chan...
doc_18326
See Migration guide for more details. tf.compat.v1.raw_ops.SparseConditionalAccumulator tf.raw_ops.SparseConditionalAccumulator( dtype, shape, container='', shared_name='', reduction_type='MEAN', name=None ) The accumulator accepts gradients marked with local_step greater or equal to the most recent global_s...
doc_18327
class collections.abc.MutableSequence class collections.abc.ByteString ABCs for read-only and mutable sequences. Implementation note: Some of the mixin methods, such as __iter__(), __reversed__() and index(), make repeated calls to the underlying __getitem__() method. Consequently, if __getitem__() is implemented w...
doc_18328
Returns the 1-based index of the last object on the page, relative to all of the objects in the paginator’s list. For example, when paginating a list of 5 objects with 2 objects per page, the second page’s end_index() would return 4.
doc_18329
alias of torch.distributions.constraints._IntegerInterval
doc_18330
Local entropy. The entropy is computed using base 2 logarithm i.e. the filter returns the minimum number of bits needed to encode the local gray level distribution. Parameters image([P,] M, N) ndarray (uint8, uint16) Input image. selemndarray The neighborhood expressed as an ndarray of 1’s and 0’s. out([P...
doc_18331
see how held keys are repeated get_repeat() -> (delay, interval) Get the delay and interval keyboard repeat values. Refer to pygame.key.set_repeat() for a description of these values. New in pygame 1.8.
doc_18332
tf.compat.v1.data.experimental.SparseTensorStructure( dtype, shape ) Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.SparseTensorSpec instead.
doc_18333
Installs the citext extension.
doc_18334
Releases savepoint sid. The changes performed since the savepoint was created become part of the transaction.
doc_18335
This method does an unregister() followed by a register(). It is (a bit) more efficient that doing the same explicitly.
doc_18336
Returns a dictionary representing the template context. The keyword arguments provided will make up the returned context. Example usage: def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['number'] = random.randrange(1, 100) return context The template context of all...
doc_18337
Convert timezone-aware Timestamp to another time zone. Parameters tz:str, pytz.timezone, dateutil.tz.tzfile or None Time zone for time which Timestamp will be converted to. None will remove timezone holding UTC time. Returns converted:Timestamp Raises TypeError If Timestamp is tz-naive. Examples...
doc_18338
Alias for set_fontvariant.
doc_18339
“Preferred” blocksize for efficient file system I/O. Writing to a file in smaller chunks may cause an inefficient read-modify-rewrite.
doc_18340
Add an entire element. This is the same as calling start(), data(), and end() in sequence. The text argument can be omitted.
doc_18341
Transform X to ordinal codes. Parameters Xarray-like, shape [n_samples, n_features] The data to encode. Returns X_outsparse matrix or a 2-d array Transformed input.
doc_18342
Get the minimum priority value for policy. policy is one of the scheduling policy constants above.
doc_18343
Receive notification of a skipped entity. The Parser will invoke this method once for each entity skipped. Non-validating processors may skip entities if they have not seen the declarations (because, for example, the entity was declared in an external DTD subset). All processors may skip external entities, depending on...
doc_18344
Number of features seen during fit.
doc_18345
Define the widget layout for given style. If layoutspec is omitted, return the layout specification for given style. layoutspec, if specified, is expected to be a list or some other sequence type (excluding strings), where each item should be a tuple and the first item is the layout name and the second item should have...
doc_18346
Returns an element-wise indication of the sign of a number. The sign function returns -1 if x < 0, 0 if x==0, 1 if x > 0. nan is returned for nan inputs. For complex inputs, the sign function returns sign(x.real) + 0j if x.real != 0 else sign(x.imag) + 0j. complex(nan, 0) is returned for complex nan inputs. Paramete...
doc_18347
Export the styles applied to the current Styler. Can be applied to a second Styler with Styler.use. Returns styles:dict See also Styler.use Set the styles on the current Styler. Styler.copy Create a copy of the current Styler. Notes This method is designed to copy non-data dependent attributes of one ...
doc_18348
Return the exception that was set on this Future. The exception (or None if no exception was set) is returned only if the Future is done. If the Future has been cancelled, this method raises a CancelledError exception. If the Future isn’t done yet, this method raises an InvalidStateError exception.
doc_18349
Calculate the illumination intensity for the normal vectors of a surface using the defined azimuth and elevation for the light source. Imagine an artificial sun placed at infinity in some azimuth and elevation position illuminating our surface. The parts of the surface that slope toward the sun should brighten while ...
doc_18350
get the image of the mouse cursor get_cursor() -> (size, hotspot, xormasks, andmasks) Get the information about the mouse system cursor. The return value is the same data as the arguments passed into pygame.mouse.set_cursor(). Note This method is unavailable with pygame 2, as SDL2 does not provide the underlying cod...
doc_18351
Returns the indices that would sort an array. Perform an indirect sort along the given axis using the algorithm specified by the kind keyword. It returns an array of indices of the same shape as a that index data along the given axis in sorted order. Parameters aarray_like Array to sort. axisint or None, opti...
doc_18352
Split an array into multiple sub-arrays. Please refer to the split documentation. The only difference between these functions is that array_split allows indices_or_sections to be an integer that does not equally divide the axis. For an array of length l that should be split into n sections, it returns l % n sub-array...
doc_18353
Open the file path and set various flags according to flags and possibly its mode according to mode. When computing mode, the current umask value is first masked out. Return the file descriptor for the newly opened file. The new file descriptor is non-inheritable. For a description of the flag and mode values, see the ...
doc_18354
Evaluate a 3-D Chebyshev series at points (x, y, z). This function returns the values: \[p(x,y,z) = \sum_{i,j,k} c_{i,j,k} * T_i(x) * T_j(y) * T_k(z)\] The parameters x, y, and z are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars and they must have the same shape afte...
doc_18355
Truncate series to the given degree. Reduce the degree of the series to deg by discarding the high order terms. If deg is greater than the current degree a copy of the current series is returned. This can be useful in least squares where the coefficients of the high degree terms may be very small. New in version 1.5...
doc_18356
Cumulative product for each group. Returns Series or DataFrame See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column of a DataFrame.
doc_18357
Encode the contents of the binary input file and write the resulting base64 encoded data to the output file. input and output must be file objects. input will be read until input.read() returns an empty bytes object. encode() inserts a newline character (b'\n') after every 76 bytes of the output, as well as ensuring th...
doc_18358
Return the file descriptor or handle used by the connection.
doc_18359
Root module for the application, e.g. <module 'django.contrib.admin' from 'django/contrib/admin/__init__.py'>.
doc_18360
class UpdateCacheMiddleware class FetchFromCacheMiddleware Enable the site-wide cache. If these are enabled, each Django-powered page will be cached for as long as the CACHE_MIDDLEWARE_SECONDS setting defines. See the cache documentation. “Common” middleware class CommonMiddleware Adds a few conveniences for ...
doc_18361
exception resource.error A deprecated alias of OSError. Changed in version 3.3: Following PEP 3151, this class was made an alias of OSError. Resource Limits Resources usage can be limited using the setrlimit() function described below. Each resource is controlled by a pair of limits: a soft limit and a hard limit...
doc_18362
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatrixSparseCholesky tf.raw_ops.SparseMatrixSparseCholesky( input, permutation, type, name=None ) Computes the Sparse Cholesky decomposition of a sparse matrix, with the given fill-in reducing permutation. The input sparse matrix and the fill-in re...
doc_18363
In Babyl mailboxes, the headers of a message are not stored contiguously with the body of the message. To generate a file-like representation, the headers and body are copied together into an io.BytesIO instance, which has an API identical to that of a file. As a result, the file-like object is truly independent of the...
doc_18364
Self-training classifier. This class allows a given supervised classifier to function as a semi-supervised classifier, allowing it to learn from unlabeled data. It does this by iteratively predicting pseudo-labels for the unlabeled data and adding them to the training set. The classifier will continue iterating until...
doc_18365
Exhaust the stream. This consumes all the data left until the limit is reached. Parameters chunk_size (int) – the size for a chunk. It will read the chunk until the stream is exhausted and throw away the results. Return type None
doc_18366
Returns the next segment on the PATH_INFO or None if there is none. Works like pop_path_info() without modifying the environment: >>> env = {'SCRIPT_NAME': '/foo', 'PATH_INFO': '/a/b'} >>> peek_path_info(env) 'a' >>> peek_path_info(env) 'a' If the charset is set to None bytes are returned. Changelog Changed in versio...
doc_18367
Maximum size of a deque or None if unbounded. New in version 3.1.
doc_18368
Shape tuple of the sub-array if this data type describes a sub-array, and () otherwise. Examples >>> dt = np.dtype(('i4', 4)) >>> dt.shape (4,) >>> dt = np.dtype(('i4', (2, 3))) >>> dt.shape (2, 3)
doc_18369
See Migration guide for more details. tf.compat.v1.raw_ops.CacheDataset tf.raw_ops.CacheDataset( input_dataset, filename, output_types, output_shapes, name=None ) A CacheDataset will iterate over the input_dataset, and store tensors. If the cache already exists, the cache will be used. If the cache is inappropri...
doc_18370
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableFindV2 tf.raw_ops.LookupTableFindV2( table_handle, keys, default_value, name=None ) The tensor keys must of the same type as the keys of the table. The output values is of the type of the table values. The scalar default_value is the value out...
doc_18371
See Migration guide for more details. tf.compat.v1.erf, tf.compat.v1.math.erf tf.math.erf( x, name=None ) Args x A Tensor. Must be one of the following types: bfloat16, half, float32, float64. name A name for the operation (optional). Returns A Tensor. Has the same type as x. If x is a S...
doc_18372
Returns e ** x.
doc_18373
See Migration guide for more details. tf.compat.v1.debugging.is_numeric_tensor, tf.compat.v1.is_numeric_tensor tf.debugging.is_numeric_tensor( tensor ) Specifically, returns True if the dtype of tensor is one of the following: tf.float32 tf.float64 tf.int8 tf.int16 tf.int32 tf.int64 tf.uint8 tf.qint8 tf.qint32 ...
doc_18374
The name of a field or a list of field names in the model, typically DateField, DateTimeField, or IntegerField. This specifies the default field(s) to use in your model Manager’s latest() and earliest() methods. Example: # Latest by ascending order_date. get_latest_by = "order_date" # Latest by priority descending, or...
doc_18375
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceApplyCenteredRMSProp tf.raw_ops.ResourceApplyCenteredRMSProp( var, mg, ms, mom, lr, rho, momentum, epsilon, grad, use_locking=False, name=None ) The centered RMSProp algorithm uses an estimate of the centered second moment (i.e., the variance) fo...
doc_18376
Constructs a new unfitted estimator with the same parameters. Clone does a deep copy of the model in an estimator without actually copying attached data. It yields a new estimator with the same parameters that has not been fitted on any data. If the estimator’s random_state parameter is an integer (or if the estimato...
doc_18377
See Migration guide for more details. tf.compat.v1.raw_ops.IsInf tf.raw_ops.IsInf( x, name=None ) Example: x = tf.constant([5.0, np.inf, 6.8, np.inf]) tf.math.is_inf(x) ==> [False, True, False, True] Args x A Tensor. Must be one of the following types: bfloat16, half, float32, float64. name A nam...
doc_18378
tf.compat.v1.enable_eager_execution( config=None, device_policy=None, execution_mode=None ) Eager execution provides an imperative interface to TensorFlow. With eager execution enabled, TensorFlow functions execute operations immediately (as opposed to adding to a graph to be executed later in a tf.compat.v1.Sessi...
doc_18379
Event handler for double-click event on directory.
doc_18380
Return True if the transport is closing or is closed.
doc_18381
Return a new Document object (the root of the DOM), with a child Element object having the given namespaceUri and qualifiedName. The doctype must be a DocumentType object created by createDocumentType(), or None. In the Python DOM API, the first two arguments can also be None in order to indicate that no Element child ...
doc_18382
See Migration guide for more details. tf.compat.v1.raw_ops.DatasetCardinality tf.raw_ops.DatasetCardinality( input_dataset, name=None ) Returns the cardinality of input_dataset. Args input_dataset A Tensor of type variant. A variant tensor representing the dataset to return cardinality for. name A...
doc_18383
Acts like dict.items() for HTTP headers on the response.
doc_18384
class sklearn.semi_supervised.SelfTrainingClassifier(base_estimator, threshold=0.75, criterion='threshold', k_best=10, max_iter=10, verbose=False) [source] Self-training classifier. This class allows a given supervised classifier to function as a semi-supervised classifier, allowing it to learn from unlabeled data. I...
doc_18385
An immutable sequence providing access to the logical ancestors of the path: >>> p = PureWindowsPath('c:/foo/bar/setup.py') >>> p.parents[0] PureWindowsPath('c:/foo/bar') >>> p.parents[1] PureWindowsPath('c:/foo') >>> p.parents[2] PureWindowsPath('c:/')
doc_18386
Run a local development server. This server is for development purposes only. It does not provide the stability, security, or performance of production WSGI servers. The reloader and debugger are enabled by default if FLASK_ENV=development or FLASK_DEBUG=1. Parameters args (Any) – kwargs (Any) – Return type A...
doc_18387
Return the clip path.
doc_18388
Matrix of ones. Return a matrix of given shape and type, filled with ones. Parameters shape{sequence of ints, int} Shape of the matrix dtypedata-type, optional The desired data-type for the matrix, default is np.float64. order{‘C’, ‘F’}, optional Whether to store matrix in C- or Fortran-contiguous order...
doc_18389
Overloaded function. wait(self: torch._C._distributed_c10d.Store, arg0: List[str]) -> None Waits for each key in keys to be added to the store. If not all keys are set before the timeout (set during store initialization), then wait will throw an exception. Parameters keys (list) – List of keys on which to wait unti...
doc_18390
Signals the start of an element in non-namespace mode. The name parameter contains the raw XML 1.0 name of the element type as a string and the attrs parameter holds an object of the Attributes interface (see The Attributes Interface) containing the attributes of the element. The object passed as attrs may be re-used b...
doc_18391
Open for text reading the resource within package. By default, the resource is opened for reading as UTF-8. package is either a name or a module object which conforms to the Package requirements. resource is the name of the resource to open within package; it may not contain path separators and it may not have sub-reso...
doc_18392
Define default roll function to be called in apply method.
doc_18393
A weekly archive page showing all objects in a given week. Objects with a date in the future are not displayed unless you set allow_future to True. Ancestors (MRO) django.views.generic.list.MultipleObjectTemplateResponseMixin django.views.generic.base.TemplateResponseMixin django.views.generic.dates.BaseWeekArchiveVie...
doc_18394
Options that are passed to the Jinja environment in create_jinja_environment(). Changing these options after the environment is created (accessing jinja_env) will have no effect. Changelog Changed in version 1.1.0: This is a dict instead of an ImmutableDict to allow easier configuration.
doc_18395
tf.compat.v1.assign_sub( ref, value, use_locking=None, name=None ) This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value. Unlike tf.math.subtract, this op does not broadcast. ref and value must have the same shape. Args ref A mutable...
doc_18396
Thread-specific CPU-time clock. Availability: Unix. New in version 3.3.
doc_18397
Roll provided date backward to next offset only if not on offset. Returns TimeStamp Rolled timestamp if not on offset, otherwise unchanged timestamp.
doc_18398
A 32-bit number in little-endian format. Equivalent to REG_DWORD.
doc_18399
Called if get_json() parsing fails and isn’t silenced. If this method returns a value, it is used as the return value for get_json(). The default implementation raises BadRequest. Parameters e (Exception) – Return type NoReturn