_id stringlengths 5 9 | text stringlengths 5 385k | title stringclasses 1
value |
|---|---|---|
doc_19000 | Get the current event loop. If there is no current event loop set in the current OS thread, the OS thread is main, and set_event_loop() has not yet been called, asyncio will create a new event loop and set it as the current one. Because this function has rather complex behavior (especially when custom event loop polici... | |
doc_19001 | The entry’s base filename, relative to the scandir() path argument. The name attribute will be bytes if the scandir() path argument is of type bytes and str otherwise. Use fsdecode() to decode byte filenames. | |
doc_19002 | The CreateView page displayed to a GET request uses a template_name_suffix of '_form'. For example, changing this attribute to '_create_form' for a view creating objects for the example Author model would cause the default template_name to be 'myapp/author_create_form.html'. | |
doc_19003 |
Create a stem plot. A stem plot draws lines perpendicular to a baseline at each location locs from the baseline to heads, and places a marker there. For vertical stem plots (the default), the locs are x positions, and the heads are y values. For horizontal stem plots, the locs are y positions, and the heads are x val... | |
doc_19004 | Set view_on_site to control whether or not to display the “View on site” link. This link should bring you to a URL where you can display the saved object. This value can be either a boolean flag or a callable. If True (the default), the object’s get_absolute_url() method will be used to generate the url. If your model ... | |
doc_19005 | Pass the response body directly through as the WSGI iterable. This can be used when the body is a binary file or other iterator of bytes, to skip some unnecessary checks. Use send_file() instead of setting this manually. | |
doc_19006 | draw a straight antialiased line aaline(surface, color, start_pos, end_pos) -> Rect aaline(surface, color, start_pos, end_pos, blend=1) -> Rect Draws a straight antialiased line on the given surface. The line has a thickness of one pixel and the endpoints have a height and width of one pixel each. The way a line and... | |
doc_19007 | See Migration guide for more details. tf.compat.v1.raw_ops.RebatchDatasetV2
tf.raw_ops.RebatchDatasetV2(
input_dataset, batch_sizes, drop_remainder, output_types, output_shapes,
name=None
)
Creates a dataset that rebatches elements from input_dataset into new batch sizes.
Args
input_dataset A Tensor... | |
doc_19008 | Return the number of objects in the permanent generation. New in version 3.7. | |
doc_19009 | This attribute should be set to a true value if the handler’s _write() and _flush() are being used to communicate directly to the client, rather than via a CGI-like gateway protocol that wants the HTTP status in a special Status: header. This attribute’s default value is true in BaseHandler, but false in BaseCGIHandler... | |
doc_19010 | Defaults to False. If enabled, stripping will be applied before the regex validation. | |
doc_19011 | The list of HTTP method names that this view will accept. Default: ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace'] | |
doc_19012 | Returns the result of filter() on a given model manager cast to a list, raising Http404 if the resulting list is empty. | |
doc_19013 | This decorator allows individual views to be excluded from APPEND_SLASH URL normalization. | |
doc_19014 |
Return the character for the minimum-size type to which given types can be safely cast. The returned type character must represent the smallest size dtype such that an array of the returned type can handle the data from an array of all types in typechars (or if typechars is an array, then its dtype.char). Parameters... | |
doc_19015 | (default: ' [...]') String that will appear at the end of the output text if it has been truncated. New in version 3.4. | |
doc_19016 |
Return whether the Artist has an explicitly set transform. This is True after set_transform has been called. | |
doc_19017 | Return the value of the named header field. name does not include the colon field separator. If the header is missing, None is returned; a KeyError is never raised. Note that if the named field appears more than once in the message’s headers, exactly which of those field values will be returned is undefined. Use the ge... | |
doc_19018 |
Online computation of max absolute value of X for later scaling. All of X is processed as a single batch. This is intended for cases when fit is not feasible due to very large number of n_samples or because X is read from a continuous stream. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features... | |
doc_19019 |
Provides a convenient view on arrays of string and unicode values. Note The chararray class exists for backwards compatibility with Numarray, it is not recommended for new development. Starting from numpy 1.4, if one needs arrays of strings, it is recommended to use arrays of dtype object_, string_ or unicode_, and ... | |
doc_19020 | This is the object passed to the constructor’s template argument. In general, you shouldn’t change it, but read-only access is not enforced. | |
doc_19021 |
alias of pandas._libs.tslibs.offsets.CustomBusinessDay | |
doc_19022 |
tuple of iterators along self’s “components.” Returns a tuple of numpy.flatiter objects, one for each “component” of self. See also numpy.flatiter
Examples >>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> row, col = b.iters
>>> next(row), next(col)
(1, 4) | |
doc_19023 |
Bases: object Manager for actions triggered by user interactions (key press, toolbar clicks, ...) on a Figure. Attributes
figureFigure
Figure that holds the canvas.
keypresslockLockDraw
LockDraw object to know if the canvas key_press_event is locked.
messagelockLockDraw
LockDraw object to know if the me... | |
doc_19024 |
Predict class probabilities at each stage for X. This method allows monitoring (i.e. determine error on testing set) after each stage. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provid... | |
doc_19025 | The file may not be renamed or deleted. | |
doc_19026 |
Bases: matplotlib.artist.Artist, matplotlib.text._AnnotationBase Container for an OffsetBox referring to a specific position xy. Optionally an arrow pointing from the offsetbox to xy can be drawn. This is like Annotation, but with OffsetBox instead of Text. Parameters
offsetboxOffsetBox
xy(float, float)
The p... | |
doc_19027 | The name of the operating system dependent module imported. The following names have currently been registered: 'posix', 'nt', 'java'. See also sys.platform has a finer granularity. os.uname() gives system-dependent version information. The platform module provides detailed checks for the system’s identity. | |
doc_19028 | assertGreaterEqual(first, second, msg=None)
assertLess(first, second, msg=None)
assertLessEqual(first, second, msg=None)
Test that first is respectively >, >=, < or <= than second depending on the method name. If not, the test will fail: >>> self.assertGreaterEqual(3, 4)
AssertionError: "3" unexpectedly not great... | |
doc_19029 | The default timer, which is always time.perf_counter(). Changed in version 3.3: time.perf_counter() is now the default timer. | |
doc_19030 | Return True if socket is in blocking mode, False if in non-blocking. This is equivalent to checking socket.gettimeout() == 0. New in version 3.7. | |
doc_19031 | (default: False) If true, TextWrapper attempts to detect sentence endings and ensure that sentences are always separated by exactly two spaces. This is generally desired for text in a monospaced font. However, the sentence detection algorithm is imperfect: it assumes that a sentence ending consists of a lowercase lette... | |
doc_19032 | See Migration guide for more details. tf.compat.v1.raw_ops.MatrixTriangularSolve
tf.raw_ops.MatrixTriangularSolve(
matrix, rhs, lower=True, adjoint=False, name=None
)
matrix is a tensor of shape [..., M, M] whose inner-most 2 dimensions form square matrices. If lower is True then the strictly upper triangular pa... | |
doc_19033 | from numpy.random import RandomState
rs = RandomState(12345)
mt19937 = MT19937()
mt19937.state = rs.get_state()
rs2 = RandomState(mt19937)
# Same output
rs.standard_normal()
rs2.standard_normal()
rs.random()
rs2.random()
rs.standard_exponential()
rs2.standard_exponential()
class numpy.random.RandomState(seed=Non... | |
doc_19034 | Truncate the file corresponding to file descriptor fd, so that it is at most length bytes in size. As of Python 3.3, this is equivalent to os.truncate(fd, length). Raises an auditing event os.truncate with arguments fd, length. Availability: Unix, Windows. Changed in version 3.5: Added support for Windows | |
doc_19035 | Disassemble the x object. x can denote either a module, a class, a method, a function, a generator, an asynchronous generator, a coroutine, a code object, a string of source code or a byte sequence of raw bytecode. For a module, it disassembles all functions. For a class, it disassembles all methods (including class an... | |
doc_19036 | Returns the previous page number. Raises InvalidPage if previous page doesn’t exist. | |
doc_19037 | window.insch(y, x, ch[, attr])
Paint character ch at (y, x) with attributes attr, moving the line from position x right by one character. | |
doc_19038 | tf.strings.split(
input, sep=None, maxsplit=-1, name=None
)
Let N be the size of input (typically N will be the batch size). Split each element of input based on sep and return a RaggedTensor containing the split tokens. Empty tokens are ignored. Example:
tf.strings.split('hello world').numpy()
array([b'hello', ... | |
doc_19039 | The HTTP headers used for error responses. This should be a list of WSGI response headers ((name, value) tuples), as described in PEP 3333. The default list just sets the content type to text/plain. | |
doc_19040 | exception select.error
A deprecated alias of OSError. Changed in version 3.3: Following PEP 3151, this class was made an alias of OSError.
select.devpoll()
(Only supported on Solaris and derivatives.) Returns a /dev/poll polling object; see section /dev/poll Polling Objects below for the methods supported by ... | |
doc_19041 | Return the approximate size of the queue. Because of multithreading/multiprocessing semantics, this number is not reliable. Note that this may raise NotImplementedError on Unix platforms like Mac OS X where sem_getvalue() is not implemented. | |
doc_19042 | Force use of CRAM-MD5 authentication when identifying the client to protect the password. Will only work if the server CAPABILITY response includes the phrase AUTH=CRAM-MD5. | |
doc_19043 |
Return the cumulative product of the elements along the given axis. Refer to numpy.cumprod for full documentation. See also numpy.cumprod
equivalent function | |
doc_19044 | <data>
<country name="Liechtenstein">
<rank>1</rank>
<year>2008</year>
<gdppc>141100</gdppc>
<neighbor name="Austria" direction="E"/>
<neighbor name="Switzerland" direction="W"/>
</country>
<country name="Singapore">
<rank>4</rank>
<year>2011</year>
... | |
doc_19045 | tf.compat.v1.metrics.mean_squared_error(
labels, predictions, weights=None, metrics_collections=None,
updates_collections=None, name=None
)
The mean_squared_error function creates two local variables, total and count that are used to compute the mean squared error. This average is weighted by weights, and it i... | |
doc_19046 |
Uninstall the Matplotlib display hook. Warning Need IPython >= 2 for this to work. For IPython < 2 will raise a NotImplementedError Warning If you are using vanilla python and have installed another display hook, this will reset sys.displayhook to what ever function was there when Matplotlib installed its displayh... | |
doc_19047 | An optional boolean argument that determines if array values will be distinct. Defaults to False. | |
doc_19048 | Return a new path with the stem changed. If the original path doesn’t have a name, ValueError is raised: >>> p = PureWindowsPath('c:/Downloads/draft.txt')
>>> p.with_stem('final')
PureWindowsPath('c:/Downloads/final.txt')
>>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')
>>> p.with_stem('lib')
PureWindowsPath('c:/... | |
doc_19049 |
Bases: torch.distributions.exp_family.ExponentialFamily Creates a Dirichlet distribution parameterized by concentration concentration. Example: >>> m = Dirichlet(torch.tensor([0.5, 0.5]))
>>> m.sample() # Dirichlet distributed with concentrarion concentration
tensor([ 0.1046, 0.8954])
Parameters
concentration (T... | |
doc_19050 |
Automatically extract clusters according to the Xi-steep method. Parameters
reachabilityndarray of shape (n_samples,)
Reachability distances calculated by OPTICS (reachability_)
predecessorndarray of shape (n_samples,)
Predecessors calculated by OPTICS.
orderingndarray of shape (n_samples,)
OPTICS order... | |
doc_19051 | Run the test, collecting the result into the TestResult object passed as result. If result is omitted or None, a temporary result object is created (by calling the defaultTestResult() method) and used. The result object is returned to run()’s caller. The same effect may be had by simply calling the TestCase instance. ... | |
doc_19052 | Time number executions of the main statement. This executes the setup statement once, and then returns the time it takes to execute the main statement a number of times, measured in seconds as a float. The argument is the number of times through the loop, defaulting to one million. The main statement, the setup stateme... | |
doc_19053 | The root of the numeric hierarchy. If you just want to check if an argument x is a number, without caring what kind, use isinstance(x, Number). | |
doc_19054 |
Generate indices to split data into training and test set. Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples,), default=None
The target variable for supervised learning pro... | |
doc_19055 | Returns the decimal value assigned to the character chr as integer. If no such value is defined, default is returned, or, if not given, ValueError is raised. | |
doc_19056 | See Migration guide for more details. tf.compat.v1.raw_ops.TensorArrayUnpack
tf.raw_ops.TensorArrayUnpack(
handle, value, flow_in, name=None
)
Args
handle A Tensor of type mutable string.
value A Tensor.
flow_in A Tensor of type float32.
name A name for the operation (optional).
... | |
doc_19057 | String of ASCII characters which are considered printable. This is a combination of digits, ascii_letters, punctuation, and whitespace. | |
doc_19058 | True if this is a session cookie. | |
doc_19059 |
alias of mpl_toolkits.axisartist.axes_grid.ImageGrid | |
doc_19060 |
Return the url. | |
doc_19061 | See Migration guide for more details. tf.compat.v1.raw_ops.TextLineReader
tf.raw_ops.TextLineReader(
skip_header_lines=0, container='', shared_name='', name=None
)
Args
skip_header_lines An optional int. Defaults to 0. Number of lines to skip from the beginning of every file.
container An optional... | |
doc_19062 | Add elements in the root (i.e. feed/channel) element. Called from write(). | |
doc_19063 | The final path component, without its suffix: >>> PurePosixPath('my/library.tar.gz').stem
'library.tar'
>>> PurePosixPath('my/library.tar').stem
'library'
>>> PurePosixPath('my/library').stem
'library' | |
doc_19064 |
input_type: 'email'
template_name: 'django/forms/widgets/email.html'
Renders as: <input type="email" ...> | |
doc_19065 | Robust test CGI script, usable as main program. Writes minimal HTTP headers and formats all information provided to the script in HTML form. | |
doc_19066 | stat.S_ISDIR(mode)
Return non-zero if the mode is from a directory.
stat.S_ISCHR(mode)
Return non-zero if the mode is from a character special device file.
stat.S_ISBLK(mode)
Return non-zero if the mode is from a block special device file.
stat.S_ISREG(mode)
Return non-zero if the mode is from a reg... | |
doc_19067 | The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. | |
doc_19068 |
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_19069 |
An enum-like class of available backends: GLOO, NCCL, MPI, and other registered backends. The values of this class are lowercase strings, e.g., "gloo". They can be accessed as attributes, e.g., Backend.NCCL. This class can be directly called to parse the string, e.g., Backend(backend_str) will check if backend_str is... | |
doc_19070 |
Parameters
shorthand_namestr
A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True. | |
doc_19071 | Parameters
canvwidth – positive integer, new width of canvas in pixels
canvheight – positive integer, new height of canvas in pixels
bg – colorstring or color-tuple, new background color If no arguments are given, return current (canvaswidth, canvasheight). Else resize the canvas the turtles are drawing on. Do... | |
doc_19072 |
ctypes interface Returns
interfacenamedtuple
Named tuple containing ctypes wrapper state_address - Memory address of the state struct state - pointer to the state struct next_uint64 - function pointer to produce 64 bit integers next_uint32 - function pointer to produce 32 bit integers next_double - function po... | |
doc_19073 |
Call self as a function. | |
doc_19074 |
Return the default savefig file format as specified in rcParams["savefig.format"] (default: 'png'). The returned string does not include a period. This method is overridden in backends that only support a single file type. | |
doc_19075 | The Max-Forwards request-header field provides a mechanism with the TRACE and OPTIONS methods to limit the number of proxies or gateways that can forward the request to the next inbound server. | |
doc_19076 | rotates the vector by a given angle in degrees in place. rotate_ip(angle) -> None Rotates the vector counterclockwise by the given angle in degrees. The length of the vector is not changed. | |
doc_19077 |
[Deprecated] dpi_cor is currently used for linewidth-related things and shrink factor. Mutation scale is affected by this. Parameters
dpi_corfloat
Notes Deprecated since version 3.4. | |
doc_19078 | Create a new module based on spec and spec.loader.create_module. If spec.loader.create_module does not return None, then any pre-existing attributes will not be reset. Also, no AttributeError will be raised if triggered while accessing spec or setting an attribute on the module. This function is preferred over using ty... | |
doc_19079 | Returns a Polygon that represents the bounding envelope of this geometry. Note that it can also return a Point if the input geometry is a point. | |
doc_19080 |
Build a decision tree classifier from the training set (X, y). Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The training input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csc_matrix.
yarray-like of shape (n_samples,) ... | |
doc_19081 |
Return the integer indices that would sort the Series values. Override ndarray.argsort. Argsorts the value, omitting NA/null values, and places the result in the same locations as the non-NA values. Parameters
axis:{0 or “index”}
Has no effect but is accepted for compatibility with numpy.
kind:{‘mergesort’, ‘... | |
doc_19082 | See Migration guide for more details. tf.compat.v1.raw_ops.StringUpper
tf.raw_ops.StringUpper(
input, encoding='', name=None
)
Example:
tf.strings.upper("CamelCase string and ALL CAPS")
<tf.Tensor: shape=(), dtype=string, numpy=b'CAMELCASE STRING AND ALL CAPS'>
Args
input A Tensor of type string.
... | |
doc_19083 | The same as http_error_301(), but called for the ‘found’ response. | |
doc_19084 | pixel buffer address _pixels_address -> int The starting address of the surface's raw pixel bytes. New in pygame 1.9.2. | |
doc_19085 |
Constructs a transformer from an arbitrary callable. A FunctionTransformer forwards its X (and optionally y) arguments to a user-defined function or function object and returns the result of this function. This is useful for stateless transformations such as taking the log of frequencies, doing custom scaling, etc. N... | |
doc_19086 |
Call function producing a like-indexed Series on each group and return a Series with the transformed values. Parameters
arg:function
To apply to each group. Should return a Series with the same index. Returns
transformed:Series
Examples
>>> s = pd.Series([1, 2],
... index=pd.date_range(... | |
doc_19087 |
Generate a random regression problem with sparse uncorrelated design. This dataset is described in Celeux et al [1]. as: X ~ N(0, 1)
y(X) = X[:, 0] + 2 * X[:, 1] - 2 * X[:, 2] - 1.5 * X[:, 3]
Only the first 4 features are informative. The remaining features are useless. Read more in the User Guide. Parameters
n_... | |
doc_19088 | 'default': {
'ENGINE': 'django.db.backends.postgresql',
'OPTIONS': {
'service': 'my_service',
'passfile': '.my_pgpass',
},
}
}
.pg_service.conf [my_service]
host=localhost
user=USER
dbname=NAME
port=5432
.my_pgpass localhost:5432:NAME:USER:PASSWORD
Change... | |
doc_19089 | Opens a connection to the SQLite database file database. By default returns a Connection object, unless a custom factory is given. database is a path-like object giving the pathname (absolute or relative to the current working directory) of the database file to be opened. You can use ":memory:" to open a database conne... | |
doc_19090 |
Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. | |
doc_19091 | Applies a 2D adaptive max pooling over an input signal composed of several input planes. See AdaptiveMaxPool2d for details and output shape. Parameters
output_size – the target output size (single integer or double-integer tuple)
return_indices – whether to return pooling indices. Default: False | |
doc_19092 | The template used to render the map widget. | |
doc_19093 | turtle.width(width=None)
Parameters
width – a positive number Set the line thickness to width or return it. If resizemode is set to “auto” and turtleshape is a polygon, that polygon is drawn with the same line thickness. If no argument is given, the current pensize is returned. >>> turtle.pensize()
1
>>> turtle.p... | |
doc_19094 |
Use LaTeX to compile a pgf generated figure to pdf. | |
doc_19095 |
Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy. | |
doc_19096 | See Migration guide for more details. tf.compat.v1.raw_ops.Prelinearize
tf.raw_ops.Prelinearize(
input, shape=[], layout=[], name=None
)
Args
input A Tensor. A tensor that will be linearized.
shape An optional tf.TensorShape or list of ints. Defaults to []. The shape of the tensor.
layout An... | |
doc_19097 | self.where(condition, y) is equivalent to torch.where(condition, self, y). See torch.where() | |
doc_19098 | See Migration guide for more details. tf.compat.v1.raw_ops.RsqrtGrad
tf.raw_ops.RsqrtGrad(
y, dy, name=None
)
Specifically, grad = dy * -0.5 * y^3, where y = rsqrt(x), and dy is the corresponding input gradient.
Args
y A Tensor. Must be one of the following types: bfloat16, half, float32, float64, compl... | |
doc_19099 |
Alias for get_linestyle. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.