body
stringlengths
26
98.2k
body_hash
int64
-9,222,864,604,528,158,000
9,221,803,474B
docstring
stringlengths
1
16.8k
path
stringlengths
5
230
name
stringlengths
1
96
repository_name
stringlengths
7
89
lang
stringclasses
1 value
body_without_docstring
stringlengths
20
98.2k
def _make_fake_dataset_fn(): 'Returns a dataset that emulates a remote storage data source.\n\n Returns a dataset factory which creates a dataset with 100 elements that\n emulates the performance characteristic of a file-based dataset stored in a\n remote storage. In particular, the first element will take an or...
-4,219,913,051,384,786,400
Returns a dataset that emulates a remote storage data source. Returns a dataset factory which creates a dataset with 100 elements that emulates the performance characteristic of a file-based dataset stored in a remote storage. In particular, the first element will take an order of magnitude longer to produce than the ...
tensorflow/python/data/experimental/benchmarks/parallel_interleave_benchmark.py
_make_fake_dataset_fn
1244783394/tensorflow
python
def _make_fake_dataset_fn(): 'Returns a dataset that emulates a remote storage data source.\n\n Returns a dataset factory which creates a dataset with 100 elements that\n emulates the performance characteristic of a file-based dataset stored in a\n remote storage. In particular, the first element will take an or...
def benchmark_parallel_interleave_v1(self): 'Benchmark for parallel interleave that does not support autotuning.' def dataset_fn(): return dataset_ops.Dataset.range(1).repeat().apply(interleave_ops.parallel_interleave(_make_fake_dataset_fn(), cycle_length=10)) self._benchmark(dataset_fn=dataset_fn,...
6,597,294,758,033,310,000
Benchmark for parallel interleave that does not support autotuning.
tensorflow/python/data/experimental/benchmarks/parallel_interleave_benchmark.py
benchmark_parallel_interleave_v1
1244783394/tensorflow
python
def benchmark_parallel_interleave_v1(self): def dataset_fn(): return dataset_ops.Dataset.range(1).repeat().apply(interleave_ops.parallel_interleave(_make_fake_dataset_fn(), cycle_length=10)) self._benchmark(dataset_fn=dataset_fn, iters=100, num_elements=1000)
def benchmark_parallel_interleave_v2(self): 'Benchmark for parallel interleave that supports autotuning.' def dataset_fn(): return dataset_ops.Dataset.range(1).repeat().interleave(_make_fake_dataset_fn(), cycle_length=10, num_parallel_calls=dataset_ops.AUTOTUNE) self._benchmark(dataset_fn=dataset_f...
-5,564,878,944,003,852,000
Benchmark for parallel interleave that supports autotuning.
tensorflow/python/data/experimental/benchmarks/parallel_interleave_benchmark.py
benchmark_parallel_interleave_v2
1244783394/tensorflow
python
def benchmark_parallel_interleave_v2(self): def dataset_fn(): return dataset_ops.Dataset.range(1).repeat().interleave(_make_fake_dataset_fn(), cycle_length=10, num_parallel_calls=dataset_ops.AUTOTUNE) self._benchmark(dataset_fn=dataset_fn, iters=100, num_elements=1000)
def MA(ma, close): 'Compute Moving Average\n\n Args:\n ma (float): MA value\n close (float): Close value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (ma < close): return Recommendation.buy elif (ma > close): return Recommend...
-8,902,239,209,966,890,000
Compute Moving Average Args: ma (float): MA value close (float): Close value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
MA
Chizkiyahu/python-tradingview-ta
python
def MA(ma, close): 'Compute Moving Average\n\n Args:\n ma (float): MA value\n close (float): Close value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (ma < close): return Recommendation.buy elif (ma > close): return Recommend...
def RSI(rsi, rsi1): 'Compute Relative Strength Index\n\n Args:\n rsi (float): RSI value\n rsi1 (float): RSI[1] value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if ((rsi < 30) and (rsi1 > rsi)): return Recommendation.buy elif ((rsi > 7...
-4,906,149,037,489,024,000
Compute Relative Strength Index Args: rsi (float): RSI value rsi1 (float): RSI[1] value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
RSI
Chizkiyahu/python-tradingview-ta
python
def RSI(rsi, rsi1): 'Compute Relative Strength Index\n\n Args:\n rsi (float): RSI value\n rsi1 (float): RSI[1] value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if ((rsi < 30) and (rsi1 > rsi)): return Recommendation.buy elif ((rsi > 7...
def Stoch(k, d, k1, d1): 'Compute Stochastic\n\n Args:\n k (float): Stoch.K value\n d (float): Stoch.D value\n k1 (float): Stoch.K[1] value\n d1 (float): Stoch.D[1] value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if ((k < 2...
-4,613,719,220,800,345,000
Compute Stochastic Args: k (float): Stoch.K value d (float): Stoch.D value k1 (float): Stoch.K[1] value d1 (float): Stoch.D[1] value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
Stoch
Chizkiyahu/python-tradingview-ta
python
def Stoch(k, d, k1, d1): 'Compute Stochastic\n\n Args:\n k (float): Stoch.K value\n d (float): Stoch.D value\n k1 (float): Stoch.K[1] value\n d1 (float): Stoch.D[1] value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if ((k < 2...
def CCI20(cci20, cci201): 'Compute Commodity Channel Index 20\n\n Args:\n cci20 (float): CCI20 value\n cci201 ([type]): CCI20[1] value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if ((cci20 < (- 100)) and (cci20 > cci201)): return Recommen...
7,493,960,804,903,274,000
Compute Commodity Channel Index 20 Args: cci20 (float): CCI20 value cci201 ([type]): CCI20[1] value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
CCI20
Chizkiyahu/python-tradingview-ta
python
def CCI20(cci20, cci201): 'Compute Commodity Channel Index 20\n\n Args:\n cci20 (float): CCI20 value\n cci201 ([type]): CCI20[1] value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if ((cci20 < (- 100)) and (cci20 > cci201)): return Recommen...
def ADX(adx, adxpdi, adxndi, adxpdi1, adxndi1): 'Compute Average Directional Index\n\n Args:\n adx (float): ADX value\n adxpdi (float): ADX+DI value\n adxndi (float): ADX-DI value\n adxpdi1 (float): ADX+DI[1] value\n adxndi1 (float): ADX-DI[1] value\n\n ...
8,872,061,564,006,650,000
Compute Average Directional Index Args: adx (float): ADX value adxpdi (float): ADX+DI value adxndi (float): ADX-DI value adxpdi1 (float): ADX+DI[1] value adxndi1 (float): ADX-DI[1] value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
ADX
Chizkiyahu/python-tradingview-ta
python
def ADX(adx, adxpdi, adxndi, adxpdi1, adxndi1): 'Compute Average Directional Index\n\n Args:\n adx (float): ADX value\n adxpdi (float): ADX+DI value\n adxndi (float): ADX-DI value\n adxpdi1 (float): ADX+DI[1] value\n adxndi1 (float): ADX-DI[1] value\n\n ...
def AO(ao, ao1): 'Compute Awesome Oscillator\n\n Args:\n ao (float): AO value\n ao1 (float): AO[1] value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (((ao > 0) and (ao1 < 0)) or ((ao > 0) and (ao1 > 0) and (ao > ao1))): return Recommend...
-6,713,277,984,516,991,000
Compute Awesome Oscillator Args: ao (float): AO value ao1 (float): AO[1] value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
AO
Chizkiyahu/python-tradingview-ta
python
def AO(ao, ao1): 'Compute Awesome Oscillator\n\n Args:\n ao (float): AO value\n ao1 (float): AO[1] value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (((ao > 0) and (ao1 < 0)) or ((ao > 0) and (ao1 > 0) and (ao > ao1))): return Recommend...
def Mom(mom, mom1): 'Compute Momentum\n\n Args:\n mom (float): Mom value\n mom1 (float): Mom[1] value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (mom < mom1): return Recommendation.buy elif (mom > mom1): return Recommendati...
-8,346,860,407,921,247,000
Compute Momentum Args: mom (float): Mom value mom1 (float): Mom[1] value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
Mom
Chizkiyahu/python-tradingview-ta
python
def Mom(mom, mom1): 'Compute Momentum\n\n Args:\n mom (float): Mom value\n mom1 (float): Mom[1] value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (mom < mom1): return Recommendation.buy elif (mom > mom1): return Recommendati...
def MACD(macd, signal): 'Compute Moving Average Convergence/Divergence\n\n Args:\n macd (float): MACD.macd value\n signal (float): MACD.signal value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (macd > signal): return Recommendation.buy ...
-7,220,129,794,616,158,000
Compute Moving Average Convergence/Divergence Args: macd (float): MACD.macd value signal (float): MACD.signal value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
MACD
Chizkiyahu/python-tradingview-ta
python
def MACD(macd, signal): 'Compute Moving Average Convergence/Divergence\n\n Args:\n macd (float): MACD.macd value\n signal (float): MACD.signal value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (macd > signal): return Recommendation.buy ...
def BBBuy(close, bblower): 'Compute Bull Bear Buy\n\n Args:\n close (float): close value\n bblower (float): BB.lower value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (close < bblower): return Recommendation.buy else: return...
3,170,778,078,137,031,000
Compute Bull Bear Buy Args: close (float): close value bblower (float): BB.lower value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
BBBuy
Chizkiyahu/python-tradingview-ta
python
def BBBuy(close, bblower): 'Compute Bull Bear Buy\n\n Args:\n close (float): close value\n bblower (float): BB.lower value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (close < bblower): return Recommendation.buy else: return...
def BBSell(close, bbupper): 'Compute Bull Bear Sell\n\n Args:\n close (float): close value\n bbupper (float): BB.upper value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (close > bbupper): return Recommendation.sell else: ret...
-1,134,133,646,265,981,600
Compute Bull Bear Sell Args: close (float): close value bbupper (float): BB.upper value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
BBSell
Chizkiyahu/python-tradingview-ta
python
def BBSell(close, bbupper): 'Compute Bull Bear Sell\n\n Args:\n close (float): close value\n bbupper (float): BB.upper value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (close > bbupper): return Recommendation.sell else: ret...
def PSAR(psar, open): 'Compute Parabolic Stop-And-Reverse\n\n Args:\n psar (float): P.SAR value\n open (float): open value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (psar < open): return Recommendation.buy elif (psar > open): ...
2,251,847,869,837,323,800
Compute Parabolic Stop-And-Reverse Args: psar (float): P.SAR value open (float): open value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
PSAR
Chizkiyahu/python-tradingview-ta
python
def PSAR(psar, open): 'Compute Parabolic Stop-And-Reverse\n\n Args:\n psar (float): P.SAR value\n open (float): open value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (psar < open): return Recommendation.buy elif (psar > open): ...
def Recommend(value): 'Compute Recommend\n\n Args:\n value (float): recommend value\n\n Returns:\n string: "STRONG_BUY", "BUY", "NEUTRAL", "SELL", "STRONG_SELL", or "ERROR"\n ' if ((value >= (- 1)) and (value < (- 0.5))): return Recommendation.strong_sell e...
-4,807,892,968,998,064,000
Compute Recommend Args: value (float): recommend value Returns: string: "STRONG_BUY", "BUY", "NEUTRAL", "SELL", "STRONG_SELL", or "ERROR"
tradingview_ta/technicals.py
Recommend
Chizkiyahu/python-tradingview-ta
python
def Recommend(value): 'Compute Recommend\n\n Args:\n value (float): recommend value\n\n Returns:\n string: "STRONG_BUY", "BUY", "NEUTRAL", "SELL", "STRONG_SELL", or "ERROR"\n ' if ((value >= (- 1)) and (value < (- 0.5))): return Recommendation.strong_sell e...
def Simple(value): 'Compute Simple\n\n Args:\n value (float): Rec.X value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (value == (- 1)): return Recommendation.sell elif (value == 1): return Recommendation.buy else: return Re...
-4,654,071,787,963,070,000
Compute Simple Args: value (float): Rec.X value Returns: string: "BUY", "SELL", or "NEUTRAL"
tradingview_ta/technicals.py
Simple
Chizkiyahu/python-tradingview-ta
python
def Simple(value): 'Compute Simple\n\n Args:\n value (float): Rec.X value\n\n Returns:\n string: "BUY", "SELL", or "NEUTRAL"\n ' if (value == (- 1)): return Recommendation.sell elif (value == 1): return Recommendation.buy else: return Re...
def matmul(x, y, transpose_x=False, transpose_y=False, name=None): "\n Applies matrix multiplication to two tensors. `matmul` follows\n the complete broadcast rules,\n and its behavior is consistent with `np.matmul`.\n\n Currently, the input tensors' number of dimensions can be any, `matmul` can be used...
-2,043,395,450,413,527,600
Applies matrix multiplication to two tensors. `matmul` follows the complete broadcast rules, and its behavior is consistent with `np.matmul`. Currently, the input tensors' number of dimensions can be any, `matmul` can be used to achieve the `dot`, `matmul` and `batchmatmul`. The actual behavior depends on the shapes ...
python/paddle/tensor/linalg.py
matmul
DevilCarp/Paddle
python
def matmul(x, y, transpose_x=False, transpose_y=False, name=None): "\n Applies matrix multiplication to two tensors. `matmul` follows\n the complete broadcast rules,\n and its behavior is consistent with `np.matmul`.\n\n Currently, the input tensors' number of dimensions can be any, `matmul` can be used...
def norm(x, p='fro', axis=None, keepdim=False, name=None): "\n\n Returns the matrix norm (Frobenius) or vector norm (the 1-norm, the Euclidean\n or 2-norm, and in general the p-norm for p > 0) of a given tensor.\n\n .. note::\n This norm API is different from `numpy.linalg.norm`.\n This api s...
2,276,984,511,793,815,300
Returns the matrix norm (Frobenius) or vector norm (the 1-norm, the Euclidean or 2-norm, and in general the p-norm for p > 0) of a given tensor. .. note:: This norm API is different from `numpy.linalg.norm`. This api supports high-order input tensors (rank >= 3), and certain axis need to be pointed out to calc...
python/paddle/tensor/linalg.py
norm
DevilCarp/Paddle
python
def norm(x, p='fro', axis=None, keepdim=False, name=None): "\n\n Returns the matrix norm (Frobenius) or vector norm (the 1-norm, the Euclidean\n or 2-norm, and in general the p-norm for p > 0) of a given tensor.\n\n .. note::\n This norm API is different from `numpy.linalg.norm`.\n This api s...
def dist(x, y, p=2, name=None): '\n\n This OP returns the p-norm of (x - y). It is not a norm in a strict sense, only as a measure\n of distance. The shapes of x and y must be broadcastable. The definition is as follows, for\n details, please refer to the `numpy\'s broadcasting <https://docs.scipy.org/doc/...
-1,655,034,432,683,055,400
This OP returns the p-norm of (x - y). It is not a norm in a strict sense, only as a measure of distance. The shapes of x and y must be broadcastable. The definition is as follows, for details, please refer to the `numpy's broadcasting <https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html>`_: - Each input ha...
python/paddle/tensor/linalg.py
dist
DevilCarp/Paddle
python
def dist(x, y, p=2, name=None): '\n\n This OP returns the p-norm of (x - y). It is not a norm in a strict sense, only as a measure\n of distance. The shapes of x and y must be broadcastable. The definition is as follows, for\n details, please refer to the `numpy\'s broadcasting <https://docs.scipy.org/doc/...
def cond(x, p=None, name=None): "\n\n Computes the condition number of a matrix or batches of matrices with respect to a matrix norm ``p``.\n\n Args:\n x (Tensor): The input tensor could be tensor of shape ``(*, m, n)`` where ``*`` is zero or more batch dimensions\n for ``p`` in ``(2, -2)``,...
-8,999,208,571,252,141,000
Computes the condition number of a matrix or batches of matrices with respect to a matrix norm ``p``. Args: x (Tensor): The input tensor could be tensor of shape ``(*, m, n)`` where ``*`` is zero or more batch dimensions for ``p`` in ``(2, -2)``, or of shape ``(*, n, n)`` where every matrix is invertible f...
python/paddle/tensor/linalg.py
cond
DevilCarp/Paddle
python
def cond(x, p=None, name=None): "\n\n Computes the condition number of a matrix or batches of matrices with respect to a matrix norm ``p``.\n\n Args:\n x (Tensor): The input tensor could be tensor of shape ``(*, m, n)`` where ``*`` is zero or more batch dimensions\n for ``p`` in ``(2, -2)``,...
def dot(x, y, name=None): "\n This operator calculates inner product for vectors.\n\n .. note::\n Support 1-d and 2-d Tensor. When it is 2d, the first dimension of this matrix\n is the batch dimension, which means that the vectors of multiple batches are dotted.\n\n Parameters:\n x(Tenso...
-8,485,889,732,085,839,000
This operator calculates inner product for vectors. .. note:: Support 1-d and 2-d Tensor. When it is 2d, the first dimension of this matrix is the batch dimension, which means that the vectors of multiple batches are dotted. Parameters: x(Tensor): 1-D or 2-D ``Tensor``. Its dtype should be ``float32``, ``fl...
python/paddle/tensor/linalg.py
dot
DevilCarp/Paddle
python
def dot(x, y, name=None): "\n This operator calculates inner product for vectors.\n\n .. note::\n Support 1-d and 2-d Tensor. When it is 2d, the first dimension of this matrix\n is the batch dimension, which means that the vectors of multiple batches are dotted.\n\n Parameters:\n x(Tenso...
def cov(x, rowvar=True, ddof=True, fweights=None, aweights=None, name=None): "\n Estimate the covariance matrix of the input variables, given data and weights.\n\n A covariance matrix is a square matrix, indicate the covariance of each pair variables in the input matrix.\n For example, for an N-dimensional...
4,961,629,382,206,763,000
Estimate the covariance matrix of the input variables, given data and weights. A covariance matrix is a square matrix, indicate the covariance of each pair variables in the input matrix. For example, for an N-dimensional samples X=[x1,x2,…xN]T, then the covariance matrix element Cij is the covariance of xi and xj. Th...
python/paddle/tensor/linalg.py
cov
DevilCarp/Paddle
python
def cov(x, rowvar=True, ddof=True, fweights=None, aweights=None, name=None): "\n Estimate the covariance matrix of the input variables, given data and weights.\n\n A covariance matrix is a square matrix, indicate the covariance of each pair variables in the input matrix.\n For example, for an N-dimensional...
def t(input, name=None): "\n Transpose <=2-D tensor.\n 0-D and 1-D tensors are returned as it is and 2-D tensor is equal to\n the paddle.transpose function which perm dimensions set 0 and 1.\n\n Args:\n input (Tensor): The input Tensor. It is a N-D (N<=2) Tensor of data types float16, float32, fl...
3,878,725,866,431,119,400
Transpose <=2-D tensor. 0-D and 1-D tensors are returned as it is and 2-D tensor is equal to the paddle.transpose function which perm dimensions set 0 and 1. Args: input (Tensor): The input Tensor. It is a N-D (N<=2) Tensor of data types float16, float32, float64, int32. name(str, optional): The default value ...
python/paddle/tensor/linalg.py
t
DevilCarp/Paddle
python
def t(input, name=None): "\n Transpose <=2-D tensor.\n 0-D and 1-D tensors are returned as it is and 2-D tensor is equal to\n the paddle.transpose function which perm dimensions set 0 and 1.\n\n Args:\n input (Tensor): The input Tensor. It is a N-D (N<=2) Tensor of data types float16, float32, fl...
def cross(x, y, axis=None, name=None): '\n Computes the cross product between two tensors along an axis.\n\n Inputs must have the same shape, and the length of their axes should be equal to 3.\n If `axis` is not given, it defaults to the first axis found with the length 3.\n\n Args:\n x (Tensor):...
-527,705,269,943,561,300
Computes the cross product between two tensors along an axis. Inputs must have the same shape, and the length of their axes should be equal to 3. If `axis` is not given, it defaults to the first axis found with the length 3. Args: x (Tensor): The first input tensor. y (Tensor): The second input tensor. ax...
python/paddle/tensor/linalg.py
cross
DevilCarp/Paddle
python
def cross(x, y, axis=None, name=None): '\n Computes the cross product between two tensors along an axis.\n\n Inputs must have the same shape, and the length of their axes should be equal to 3.\n If `axis` is not given, it defaults to the first axis found with the length 3.\n\n Args:\n x (Tensor):...
def cholesky(x, upper=False, name=None): '\n Computes the Cholesky decomposition of one symmetric positive-definite\n matrix or batches of symmetric positive-definite matrice.\n\n If `upper` is `True`, the decomposition has the form :math:`A = U^{T}U` ,\n and the returned matrix :math:`U` is upper-trian...
-1,156,870,987,024,628,700
Computes the Cholesky decomposition of one symmetric positive-definite matrix or batches of symmetric positive-definite matrice. If `upper` is `True`, the decomposition has the form :math:`A = U^{T}U` , and the returned matrix :math:`U` is upper-triangular. Otherwise, the decomposition has the form :math:`A = LL^{T}`...
python/paddle/tensor/linalg.py
cholesky
DevilCarp/Paddle
python
def cholesky(x, upper=False, name=None): '\n Computes the Cholesky decomposition of one symmetric positive-definite\n matrix or batches of symmetric positive-definite matrice.\n\n If `upper` is `True`, the decomposition has the form :math:`A = U^{T}U` ,\n and the returned matrix :math:`U` is upper-trian...
def matrix_rank(x, tol=None, hermitian=False, name=None): '\n Computes the rank of a matrix.\n\n The rank of a matrix is the number of singular values that are greater than the specified `tol` threshold when hermitian=False,\n or the number of eigenvalues in absolute value that are greater than the specifi...
1,160,058,177,991,084,800
Computes the rank of a matrix. The rank of a matrix is the number of singular values that are greater than the specified `tol` threshold when hermitian=False, or the number of eigenvalues in absolute value that are greater than the specified `tol` threshold when hermitian=True. Args: x (Tensor): The input tensor....
python/paddle/tensor/linalg.py
matrix_rank
DevilCarp/Paddle
python
def matrix_rank(x, tol=None, hermitian=False, name=None): '\n Computes the rank of a matrix.\n\n The rank of a matrix is the number of singular values that are greater than the specified `tol` threshold when hermitian=False,\n or the number of eigenvalues in absolute value that are greater than the specifi...
def bmm(x, y, name=None): '\n Applies batched matrix multiplication to two tensors.\n\n Both of the two input tensors must be three-dementional and share the same batch size.\n\n if x is a (b, m, k) tensor, y is a (b, k, n) tensor, the output will be a (b, m, n) tensor.\n\n Args:\n x (Tensor): Th...
-4,711,183,802,654,545,000
Applies batched matrix multiplication to two tensors. Both of the two input tensors must be three-dementional and share the same batch size. if x is a (b, m, k) tensor, y is a (b, k, n) tensor, the output will be a (b, m, n) tensor. Args: x (Tensor): The input Tensor. y (Tensor): The input Tensor. name(s...
python/paddle/tensor/linalg.py
bmm
DevilCarp/Paddle
python
def bmm(x, y, name=None): '\n Applies batched matrix multiplication to two tensors.\n\n Both of the two input tensors must be three-dementional and share the same batch size.\n\n if x is a (b, m, k) tensor, y is a (b, k, n) tensor, the output will be a (b, m, n) tensor.\n\n Args:\n x (Tensor): Th...
def histogram(input, bins=100, min=0, max=0, name=None): '\n Computes the histogram of a tensor. The elements are sorted into equal width bins between min and max.\n If min and max are both zero, the minimum and maximum values of the data are used.\n\n Args:\n input (Tensor): A Tensor(or LoDTensor) ...
8,785,959,902,747,494,000
Computes the histogram of a tensor. The elements are sorted into equal width bins between min and max. If min and max are both zero, the minimum and maximum values of the data are used. Args: input (Tensor): A Tensor(or LoDTensor) with shape :math:`[N_1, N_2,..., N_k]` . The data type of the input Tensor s...
python/paddle/tensor/linalg.py
histogram
DevilCarp/Paddle
python
def histogram(input, bins=100, min=0, max=0, name=None): '\n Computes the histogram of a tensor. The elements are sorted into equal width bins between min and max.\n If min and max are both zero, the minimum and maximum values of the data are used.\n\n Args:\n input (Tensor): A Tensor(or LoDTensor) ...
def bincount(x, weights=None, minlength=0, name=None): '\n Computes frequency of each value in the input tensor. \n\n Args:\n x (Tensor): A Tensor with non-negative integer. Should be 1-D tensor.\n weights (Tensor, optional): Weight for each value in the input tensor. Should have the same shape ...
-7,411,482,120,546,404,000
Computes frequency of each value in the input tensor. Args: x (Tensor): A Tensor with non-negative integer. Should be 1-D tensor. weights (Tensor, optional): Weight for each value in the input tensor. Should have the same shape as input. Default is None. minlength (int, optional): Minimum number of bins. ...
python/paddle/tensor/linalg.py
bincount
DevilCarp/Paddle
python
def bincount(x, weights=None, minlength=0, name=None): '\n Computes frequency of each value in the input tensor. \n\n Args:\n x (Tensor): A Tensor with non-negative integer. Should be 1-D tensor.\n weights (Tensor, optional): Weight for each value in the input tensor. Should have the same shape ...
def mv(x, vec, name=None): '\n Performs a matrix-vector product of the matrix x and the vector vec.\n\n Args:\n x (Tensor): A tensor with shape :math:`[M, N]` , The data type of the input Tensor x\n should be one of float32, float64.\n vec (Tensor): A tensor with shape :math:`[N]` , T...
7,252,601,793,221,310,000
Performs a matrix-vector product of the matrix x and the vector vec. Args: x (Tensor): A tensor with shape :math:`[M, N]` , The data type of the input Tensor x should be one of float32, float64. vec (Tensor): A tensor with shape :math:`[N]` , The data type of the input Tensor x should be one of...
python/paddle/tensor/linalg.py
mv
DevilCarp/Paddle
python
def mv(x, vec, name=None): '\n Performs a matrix-vector product of the matrix x and the vector vec.\n\n Args:\n x (Tensor): A tensor with shape :math:`[M, N]` , The data type of the input Tensor x\n should be one of float32, float64.\n vec (Tensor): A tensor with shape :math:`[N]` , T...
def det(x, name=None): '\n Calculates determinant value of a square matrix or batches of square matrices.\n Args:\n x (Tensor): input (Tensor): the input matrix of size `(n, n)` or the batch of matrices of size\n `(*, n, n)` where `*` is one or more batch dimensions.\n Returns:\n ...
4,513,317,354,980,321,000
Calculates determinant value of a square matrix or batches of square matrices. Args: x (Tensor): input (Tensor): the input matrix of size `(n, n)` or the batch of matrices of size `(*, n, n)` where `*` is one or more batch dimensions. Returns: y (Tensor):the determinant value of a square matrix ...
python/paddle/tensor/linalg.py
det
DevilCarp/Paddle
python
def det(x, name=None): '\n Calculates determinant value of a square matrix or batches of square matrices.\n Args:\n x (Tensor): input (Tensor): the input matrix of size `(n, n)` or the batch of matrices of size\n `(*, n, n)` where `*` is one or more batch dimensions.\n Returns:\n ...
def slogdet(x, name=None): "\n Calculates the sign and natural logarithm of the absolute value of a square matrix's or batches square matrices' determinant.\n The determinant can be computed with ``sign * exp(logabsdet)\n\n Supports input of float, double\n\n Note that for matrices that have zero determ...
9,101,923,281,703,332,000
Calculates the sign and natural logarithm of the absolute value of a square matrix's or batches square matrices' determinant. The determinant can be computed with ``sign * exp(logabsdet) Supports input of float, double Note that for matrices that have zero determinant, this returns ``(0, -inf)`` Args: x (Tensor):...
python/paddle/tensor/linalg.py
slogdet
DevilCarp/Paddle
python
def slogdet(x, name=None): "\n Calculates the sign and natural logarithm of the absolute value of a square matrix's or batches square matrices' determinant.\n The determinant can be computed with ``sign * exp(logabsdet)\n\n Supports input of float, double\n\n Note that for matrices that have zero determ...
def svd(x, full_matrices=False, name=None): "\n Computes the singular value decomposition of one matrix or a batch of regular matrices.\n\n Let :math:`X` be the input matrix or a batch of input matrices, the output should satisfies:\n\n .. math::\n X = U * diag(S) * VT\n\n Args:\n x (Tenso...
7,655,087,064,594,550,000
Computes the singular value decomposition of one matrix or a batch of regular matrices. Let :math:`X` be the input matrix or a batch of input matrices, the output should satisfies: .. math:: X = U * diag(S) * VT Args: x (Tensor): The input tensor. Its shape should be `[..., N, M]`, where `...` is zer...
python/paddle/tensor/linalg.py
svd
DevilCarp/Paddle
python
def svd(x, full_matrices=False, name=None): "\n Computes the singular value decomposition of one matrix or a batch of regular matrices.\n\n Let :math:`X` be the input matrix or a batch of input matrices, the output should satisfies:\n\n .. math::\n X = U * diag(S) * VT\n\n Args:\n x (Tenso...
def matrix_power(x, n, name=None): "\n Computes the n-th power of a square matrix or a batch of square matrices.\n\n Let :math:`X` be a sqaure matrix or a batch of square matrices, :math:`n` be\n an exponent, the equation should be:\n\n .. math::\n Out = X ^ {n}\n\n Specifically,\n\n - If `...
-4,744,617,923,970,205,000
Computes the n-th power of a square matrix or a batch of square matrices. Let :math:`X` be a sqaure matrix or a batch of square matrices, :math:`n` be an exponent, the equation should be: .. math:: Out = X ^ {n} Specifically, - If `n > 0`, it returns the matrix or a batch of matrices raised to the power of `n`....
python/paddle/tensor/linalg.py
matrix_power
DevilCarp/Paddle
python
def matrix_power(x, n, name=None): "\n Computes the n-th power of a square matrix or a batch of square matrices.\n\n Let :math:`X` be a sqaure matrix or a batch of square matrices, :math:`n` be\n an exponent, the equation should be:\n\n .. math::\n Out = X ^ {n}\n\n Specifically,\n\n - If `...
def qr(x, mode='reduced', name=None): '\n Computes the QR decomposition of one matrix or batches of matrice (backward is unsupported now).\n\n Args:\n x (Tensor): The input tensor. Its shape should be `[..., M, N]`,\n where ... is zero or more batch dimensions. M and N can be arbitrary\n ...
-753,448,886,194,518,700
Computes the QR decomposition of one matrix or batches of matrice (backward is unsupported now). Args: x (Tensor): The input tensor. Its shape should be `[..., M, N]`, where ... is zero or more batch dimensions. M and N can be arbitrary positive number. The data type of x should be float32 or float...
python/paddle/tensor/linalg.py
qr
DevilCarp/Paddle
python
def qr(x, mode='reduced', name=None): '\n Computes the QR decomposition of one matrix or batches of matrice (backward is unsupported now).\n\n Args:\n x (Tensor): The input tensor. Its shape should be `[..., M, N]`,\n where ... is zero or more batch dimensions. M and N can be arbitrary\n ...
def lu(x, pivot=True, get_infos=False, name=None): "\n Computes the LU factorization of an N-D(N>=2) matrix x. \n\n Returns the LU factorization(inplace x) and Pivots. low triangular matrix L and \n upper triangular matrix U are combined to a single LU matrix.\n\n Pivoting is done if pivot is set to Tru...
-1,885,591,820,543,059,200
Computes the LU factorization of an N-D(N>=2) matrix x. Returns the LU factorization(inplace x) and Pivots. low triangular matrix L and upper triangular matrix U are combined to a single LU matrix. Pivoting is done if pivot is set to True. P mat can be get by pivots: # ones = eye(rows) #eye matrix of rank rows # fo...
python/paddle/tensor/linalg.py
lu
DevilCarp/Paddle
python
def lu(x, pivot=True, get_infos=False, name=None): "\n Computes the LU factorization of an N-D(N>=2) matrix x. \n\n Returns the LU factorization(inplace x) and Pivots. low triangular matrix L and \n upper triangular matrix U are combined to a single LU matrix.\n\n Pivoting is done if pivot is set to Tru...
def lu_unpack(x, y, unpack_ludata=True, unpack_pivots=True, name=None): "\n Unpack L U and P to single matrix tensor . \n unpack L and U matrix from LU, unpack permutation matrix P from Pivtos .\n\n P mat can be get by pivots:\n # ones = eye(rows) #eye matrix of rank rows\n # for i in range(cols):\n ...
-8,822,091,043,951,989,000
Unpack L U and P to single matrix tensor . unpack L and U matrix from LU, unpack permutation matrix P from Pivtos . P mat can be get by pivots: # ones = eye(rows) #eye matrix of rank rows # for i in range(cols): # swap(ones[i], ones[pivots[i]]) Args: x (Tensor): The LU tensor get from paddle.linalg.lu, whic...
python/paddle/tensor/linalg.py
lu_unpack
DevilCarp/Paddle
python
def lu_unpack(x, y, unpack_ludata=True, unpack_pivots=True, name=None): "\n Unpack L U and P to single matrix tensor . \n unpack L and U matrix from LU, unpack permutation matrix P from Pivtos .\n\n P mat can be get by pivots:\n # ones = eye(rows) #eye matrix of rank rows\n # for i in range(cols):\n ...
def eig(x, name=None): '\n This API performs the eigenvalue decomposition of a square matrix or a batch of square matrices.\n\n .. note::\n If the matrix is a Hermitian or a real symmetric matrix, please use :ref:`paddle.linalg.eigh` instead, which is much faster.\n If only eigenvalues is needed...
4,681,175,119,224,986,000
This API performs the eigenvalue decomposition of a square matrix or a batch of square matrices. .. note:: If the matrix is a Hermitian or a real symmetric matrix, please use :ref:`paddle.linalg.eigh` instead, which is much faster. If only eigenvalues is needed, please use :ref:`paddle.linalg.eigvals` instead....
python/paddle/tensor/linalg.py
eig
DevilCarp/Paddle
python
def eig(x, name=None): '\n This API performs the eigenvalue decomposition of a square matrix or a batch of square matrices.\n\n .. note::\n If the matrix is a Hermitian or a real symmetric matrix, please use :ref:`paddle.linalg.eigh` instead, which is much faster.\n If only eigenvalues is needed...
def eigvals(x, name=None): '\n Compute the eigenvalues of one or more general matrices.\n\n Warning:\n The gradient kernel of this operator does not yet developed.\n If you need back propagation through this operator, please replace it with paddle.linalg.eig.\n\n Args:\n x (Tensor): A ...
-910,280,352,137,155,100
Compute the eigenvalues of one or more general matrices. Warning: The gradient kernel of this operator does not yet developed. If you need back propagation through this operator, please replace it with paddle.linalg.eig. Args: x (Tensor): A square matrix or a batch of square matrices whose eigenvalues wil...
python/paddle/tensor/linalg.py
eigvals
DevilCarp/Paddle
python
def eigvals(x, name=None): '\n Compute the eigenvalues of one or more general matrices.\n\n Warning:\n The gradient kernel of this operator does not yet developed.\n If you need back propagation through this operator, please replace it with paddle.linalg.eig.\n\n Args:\n x (Tensor): A ...
def multi_dot(x, name=None): '\n Multi_dot is an operator that calculates multiple matrix multiplications.\n\n Supports inputs of float16(only GPU support), float32 and float64 dtypes. This function does not\n support batched inputs.\n\n The input tensor in [x] must be 2-D except for the first and last ...
1,592,148,319,123,424,000
Multi_dot is an operator that calculates multiple matrix multiplications. Supports inputs of float16(only GPU support), float32 and float64 dtypes. This function does not support batched inputs. The input tensor in [x] must be 2-D except for the first and last can be 1-D. If the first tensor is a 1-D vector of shape(...
python/paddle/tensor/linalg.py
multi_dot
DevilCarp/Paddle
python
def multi_dot(x, name=None): '\n Multi_dot is an operator that calculates multiple matrix multiplications.\n\n Supports inputs of float16(only GPU support), float32 and float64 dtypes. This function does not\n support batched inputs.\n\n The input tensor in [x] must be 2-D except for the first and last ...
def eigh(x, UPLO='L', name=None): '\n Compute the eigenvalues and eigenvectors of a\n complex Hermitian (conjugate symmetric) or a real symmetric matrix.\n\n Args:\n x (Tensor): A tensor with shape :math:`[*, N, N]` , The data type of the input Tensor x\n should be one of float32, float64...
-1,568,547,505,044,493,800
Compute the eigenvalues and eigenvectors of a complex Hermitian (conjugate symmetric) or a real symmetric matrix. Args: x (Tensor): A tensor with shape :math:`[*, N, N]` , The data type of the input Tensor x should be one of float32, float64, complex64, complex128. UPLO(str, optional): (string, default...
python/paddle/tensor/linalg.py
eigh
DevilCarp/Paddle
python
def eigh(x, UPLO='L', name=None): '\n Compute the eigenvalues and eigenvectors of a\n complex Hermitian (conjugate symmetric) or a real symmetric matrix.\n\n Args:\n x (Tensor): A tensor with shape :math:`[*, N, N]` , The data type of the input Tensor x\n should be one of float32, float64...
def pinv(x, rcond=1e-15, hermitian=False, name=None): "\n Calculate pseudo inverse via SVD(singular value decomposition)\n of one matrix or batches of regular matrix.\n\n .. math::\n\n if hermitian == False:\n x = u * s * vt (SVD)\n out = v * 1/s * ut\n else:\n ...
9,053,780,694,763,835,000
Calculate pseudo inverse via SVD(singular value decomposition) of one matrix or batches of regular matrix. .. math:: if hermitian == False: x = u * s * vt (SVD) out = v * 1/s * ut else: x = u * s * ut (eigh) out = u * 1/s * u.conj().transpose(-2,-1) If x is hermitian or symm...
python/paddle/tensor/linalg.py
pinv
DevilCarp/Paddle
python
def pinv(x, rcond=1e-15, hermitian=False, name=None): "\n Calculate pseudo inverse via SVD(singular value decomposition)\n of one matrix or batches of regular matrix.\n\n .. math::\n\n if hermitian == False:\n x = u * s * vt (SVD)\n out = v * 1/s * ut\n else:\n ...
def solve(x, y, name=None): '\n Computes the solution of a square system of linear equations with a unique solution for input \'X\' and \'Y\'.\n Let :math: `X` be a sqaure matrix or a batch of square matrices, :math:`Y` be\n a vector/matrix or a batch of vectors/matrices, the equation should be:\n\n .. ...
-3,942,150,556,993,506,300
Computes the solution of a square system of linear equations with a unique solution for input 'X' and 'Y'. Let :math: `X` be a sqaure matrix or a batch of square matrices, :math:`Y` be a vector/matrix or a batch of vectors/matrices, the equation should be: .. math:: Out = X^-1 * Y Specifically, - This system of li...
python/paddle/tensor/linalg.py
solve
DevilCarp/Paddle
python
def solve(x, y, name=None): '\n Computes the solution of a square system of linear equations with a unique solution for input \'X\' and \'Y\'.\n Let :math: `X` be a sqaure matrix or a batch of square matrices, :math:`Y` be\n a vector/matrix or a batch of vectors/matrices, the equation should be:\n\n .. ...
def triangular_solve(x, y, upper=True, transpose=False, unitriangular=False, name=None): '\n Computes the solution of a system of equations with a triangular coefficient matrix `x` and\n multiple right-hand sides `y` .\n\n Input `x` and `y` is 2D matrices or batches of 2D matrices. If the inputs are batche...
-3,320,546,878,268,656,600
Computes the solution of a system of equations with a triangular coefficient matrix `x` and multiple right-hand sides `y` . Input `x` and `y` is 2D matrices or batches of 2D matrices. If the inputs are batches, the outputs is also batches. Args: x (Tensor): The input triangular coefficient matrix. Its shape shoul...
python/paddle/tensor/linalg.py
triangular_solve
DevilCarp/Paddle
python
def triangular_solve(x, y, upper=True, transpose=False, unitriangular=False, name=None): '\n Computes the solution of a system of equations with a triangular coefficient matrix `x` and\n multiple right-hand sides `y` .\n\n Input `x` and `y` is 2D matrices or batches of 2D matrices. If the inputs are batche...
def cholesky_solve(x, y, upper=False, name=None): '\n Solves a linear system of equations A @ X = B, given A\'s Cholesky factor matrix u and matrix B.\n\n Input `x` and `y` is 2D matrices or batches of 2D matrices. If the inputs are batches, the outputs\n is also batches.\n\n Args:\n x (Tensor):...
-8,255,322,614,350,314,000
Solves a linear system of equations A @ X = B, given A's Cholesky factor matrix u and matrix B. Input `x` and `y` is 2D matrices or batches of 2D matrices. If the inputs are batches, the outputs is also batches. Args: x (Tensor): The input matrix which is upper or lower triangular Cholesky factor of square matri...
python/paddle/tensor/linalg.py
cholesky_solve
DevilCarp/Paddle
python
def cholesky_solve(x, y, upper=False, name=None): '\n Solves a linear system of equations A @ X = B, given A\'s Cholesky factor matrix u and matrix B.\n\n Input `x` and `y` is 2D matrices or batches of 2D matrices. If the inputs are batches, the outputs\n is also batches.\n\n Args:\n x (Tensor):...
def eigvalsh(x, UPLO='L', name=None): "\n Computes the eigenvalues of a \n complex Hermitian (conjugate symmetric) or a real symmetric matrix.\n\n Args:\n x (Tensor): A tensor with shape :math:`[_, M, M]` , The data type of the input Tensor x\n should be one of float32, float64, complex64...
-352,417,534,785,145,600
Computes the eigenvalues of a complex Hermitian (conjugate symmetric) or a real symmetric matrix. Args: x (Tensor): A tensor with shape :math:`[_, M, M]` , The data type of the input Tensor x should be one of float32, float64, complex64, complex128. UPLO(str, optional): Lower triangular part of a (‘L’...
python/paddle/tensor/linalg.py
eigvalsh
DevilCarp/Paddle
python
def eigvalsh(x, UPLO='L', name=None): "\n Computes the eigenvalues of a \n complex Hermitian (conjugate symmetric) or a real symmetric matrix.\n\n Args:\n x (Tensor): A tensor with shape :math:`[_, M, M]` , The data type of the input Tensor x\n should be one of float32, float64, complex64...
def lstsq(x, y, rcond=None, driver=None, name=None): '\n Computes a solution to\n the least squares problem of a system of linear equations.\n\n Args:\n x (Tensor): A tensor with shape ``(*, M, N)`` , the data type of the input Tensor ``x``\n should be one of float32, float64.\n y ...
7,536,901,320,083,422,000
Computes a solution to the least squares problem of a system of linear equations. Args: x (Tensor): A tensor with shape ``(*, M, N)`` , the data type of the input Tensor ``x`` should be one of float32, float64. y (Tensor): A tensor with shape ``(*, M, K)`` , the data type of the input Tensor ``y`` ...
python/paddle/tensor/linalg.py
lstsq
DevilCarp/Paddle
python
def lstsq(x, y, rcond=None, driver=None, name=None): '\n Computes a solution to\n the least squares problem of a system of linear equations.\n\n Args:\n x (Tensor): A tensor with shape ``(*, M, N)`` , the data type of the input Tensor ``x``\n should be one of float32, float64.\n y ...
def frobenius_norm(input, dim=None, keepdim=False, name=None): '\n The frobenius norm OP is to calculate the frobenius norm of certain two dimensions of Tensor `input`.\n Args:\n input (Variable): Tensor, data type float32, float64.\n dim (list, optional): None for last two dimension...
8,133,598,796,588,167,000
The frobenius norm OP is to calculate the frobenius norm of certain two dimensions of Tensor `input`. Args: input (Variable): Tensor, data type float32, float64. dim (list, optional): None for last two dimensions. keepdim (bool, optional): Whether keep the dimensions as the `input`, Default False.
python/paddle/tensor/linalg.py
frobenius_norm
DevilCarp/Paddle
python
def frobenius_norm(input, dim=None, keepdim=False, name=None): '\n The frobenius norm OP is to calculate the frobenius norm of certain two dimensions of Tensor `input`.\n Args:\n input (Variable): Tensor, data type float32, float64.\n dim (list, optional): None for last two dimension...
def vector_norm(input, porder=None, axis=None, keepdim=False, asvector=False, name=None): '\n Calculate the p-order vector norm for certain dimension of Tensor `input`.\n Args:\n input (Variable): Tensor, data type float32, float64.\n porder (float, optional): None for porder=2.0.\n...
-1,317,694,213,258,792,200
Calculate the p-order vector norm for certain dimension of Tensor `input`. Args: input (Variable): Tensor, data type float32, float64. porder (float, optional): None for porder=2.0. axis (int, optional): None for last dimension. keepdim (bool, optional): Whether keep the dimensions as the `input`, Default Fals...
python/paddle/tensor/linalg.py
vector_norm
DevilCarp/Paddle
python
def vector_norm(input, porder=None, axis=None, keepdim=False, asvector=False, name=None): '\n Calculate the p-order vector norm for certain dimension of Tensor `input`.\n Args:\n input (Variable): Tensor, data type float32, float64.\n porder (float, optional): None for porder=2.0.\n...
def p_matrix_norm(input, porder=1.0, axis=axis, keepdim=False, name=None): '\n NOTE:\n This function actually treats the matrix as flattened vector to calculate vector norm instead of matrix norm.\n ' block = LayerHelper('norm', **locals()) out = block.create_variable_for_type_infer...
-4,288,087,778,360,846,000
NOTE: This function actually treats the matrix as flattened vector to calculate vector norm instead of matrix norm.
python/paddle/tensor/linalg.py
p_matrix_norm
DevilCarp/Paddle
python
def p_matrix_norm(input, porder=1.0, axis=axis, keepdim=False, name=None): '\n NOTE:\n This function actually treats the matrix as flattened vector to calculate vector norm instead of matrix norm.\n ' block = LayerHelper('norm', **locals()) out = block.create_variable_for_type_infer...
def mat_norm(input, porder=1.0, axis=None): '\n NOTE:\n Calculate the matrix norm of a square matrix or batches of square matrices,\n when porder is in (1, -1, inf, -inf)\n ' reduce_all = (True if ((axis is None) or (axis == [])) else False) axis = (axis if ((axis != None...
1,976,357,735,964,301,800
NOTE: Calculate the matrix norm of a square matrix or batches of square matrices, when porder is in (1, -1, inf, -inf)
python/paddle/tensor/linalg.py
mat_norm
DevilCarp/Paddle
python
def mat_norm(input, porder=1.0, axis=None): '\n NOTE:\n Calculate the matrix norm of a square matrix or batches of square matrices,\n when porder is in (1, -1, inf, -inf)\n ' reduce_all = (True if ((axis is None) or (axis == [])) else False) axis = (axis if ((axis != None...
def fro_norm(input, porder=2, axis=[(- 1)]): '\n NOTE:\n Calculate the frobenius norm of a square matrix or batches of square matrices.\n ' reduce_all = (True if ((axis is None) or (axis == [])) else False) keepdim = False if paddle.in_dynamic_mode(): pow_out = _C_ops.po...
-7,539,193,297,382,894,000
NOTE: Calculate the frobenius norm of a square matrix or batches of square matrices.
python/paddle/tensor/linalg.py
fro_norm
DevilCarp/Paddle
python
def fro_norm(input, porder=2, axis=[(- 1)]): '\n NOTE:\n Calculate the frobenius norm of a square matrix or batches of square matrices.\n ' reduce_all = (True if ((axis is None) or (axis == [])) else False) keepdim = False if paddle.in_dynamic_mode(): pow_out = _C_ops.po...
def svd_norm(input, porder, axis=[(- 1)]): '\n NOTE:\n Calculate the matrix norm, which is related to singular values, of a matrix\n or batches of matrices, including nuclear norm, 2-norm and (-2)-norm.\n ' reduce_all = (True if ((axis is None) or (axis == [])) else False) ...
-4,169,968,877,713,200,600
NOTE: Calculate the matrix norm, which is related to singular values, of a matrix or batches of matrices, including nuclear norm, 2-norm and (-2)-norm.
python/paddle/tensor/linalg.py
svd_norm
DevilCarp/Paddle
python
def svd_norm(input, porder, axis=[(- 1)]): '\n NOTE:\n Calculate the matrix norm, which is related to singular values, of a matrix\n or batches of matrices, including nuclear norm, 2-norm and (-2)-norm.\n ' reduce_all = (True if ((axis is None) or (axis == [])) else False) ...
def testV1ScaleIOPersistentVolumeSource(self): '\n Test V1ScaleIOPersistentVolumeSource\n ' pass
5,658,198,493,830,950,000
Test V1ScaleIOPersistentVolumeSource
kubernetes/test/test_v1_scale_io_persistent_volume_source.py
testV1ScaleIOPersistentVolumeSource
MiaoRachelYu/python
python
def testV1ScaleIOPersistentVolumeSource(self): '\n \n ' pass
def compute_positivity(dico): " This computes the positivity score of each statement. \n Takes a dictionary with each statement as liste item and the corresponding interlocutor's name in names item \n \n " dico_score = defaultdict((lambda : list())) for (name, liste) in dico.items(): neg_...
1,236,163,244,579,036,700
This computes the positivity score of each statement. Takes a dictionary with each statement as liste item and the corresponding interlocutor's name in names item
RA_project/code_python/image_score_posi.py
compute_positivity
erialc-cal/NLP-FOMC
python
def compute_positivity(dico): " This computes the positivity score of each statement. \n Takes a dictionary with each statement as liste item and the corresponding interlocutor's name in names item \n \n " dico_score = defaultdict((lambda : list())) for (name, liste) in dico.items(): neg_...
def __init__(self, code): 'code: int - index of macro to run' self.code = code
-4,599,207,852,549,858,300
code: int - index of macro to run
homevision_netio_controller/controller.py
__init__
jackoson/homevision-netio-controller
python
def __init__(self, code): self.code = code
def __init__(self, command): 'command: string - command to send' self.command = command
-6,435,207,489,040,474,000
command: string - command to send
homevision_netio_controller/controller.py
__init__
jackoson/homevision-netio-controller
python
def __init__(self, command): self.command = command
def __init__(self, ip_address, port, auth, on_off_appliance_codes={}, actions={}, process_actions={}, var_queries={}, flag_queries={}, flag_return_values={True: ['True', 'On', 'Yes', 'Occupied', 'Set', '1'], False: ['False', 'Off', 'No', 'Vacant', 'Clear', '0']}, on_off_commands=None): '\n Args:\n ip_addres...
-5,714,372,172,230,657,000
Args: ip_address: string port: int auth: string - key for authenticating with netio on_off_appliance_codes: dict[string] => int - codes to be fed to 'on_off_commands' for each appliance actions: dict[string] => Macro/Command/(_, _, ...) - named actions to be completed process_actions: dict[string] => {"...
homevision_netio_controller/controller.py
__init__
jackoson/homevision-netio-controller
python
def __init__(self, ip_address, port, auth, on_off_appliance_codes={}, actions={}, process_actions={}, var_queries={}, flag_queries={}, flag_return_values={True: ['True', 'On', 'Yes', 'Occupied', 'Set', '1'], False: ['False', 'Off', 'No', 'Vacant', 'Clear', '0']}, on_off_commands=None): '\n Args:\n ip_addres...
def on_off_command(self, details): 'Send an on or off command to an appliance\n \n Sends the specified command to the homevision through netio interface to control the specified appliance.\n \n Args:\n details: {"appliance": string, "state": string} \n ' if ('appliance' not in details): ...
-79,934,147,174,809,070
Send an on or off command to an appliance Sends the specified command to the homevision through netio interface to control the specified appliance. Args: details: {"appliance": string, "state": string}
homevision_netio_controller/controller.py
on_off_command
jackoson/homevision-netio-controller
python
def on_off_command(self, details): 'Send an on or off command to an appliance\n \n Sends the specified command to the homevision through netio interface to control the specified appliance.\n \n Args:\n details: {"appliance": string, "state": string} \n ' if ('appliance' not in details): ...
def action_command(self, details): 'Send an action command\n \n Sends the specified command to the homevision through netio interface.\n \n Args:\n details: {"command": string} \n ' if ('command' not in details): raise Exception('Command not specified') if (details['command'] not...
-232,058,001,206,219,100
Send an action command Sends the specified command to the homevision through netio interface. Args: details: {"command": string}
homevision_netio_controller/controller.py
action_command
jackoson/homevision-netio-controller
python
def action_command(self, details): 'Send an action command\n \n Sends the specified command to the homevision through netio interface.\n \n Args:\n details: {"command": string} \n ' if ('command' not in details): raise Exception('Command not specified') if (details['command'] not...
def start_stop_command(self, details): 'Starts or stops a process\n \n Sends the specified command to the homevision through netio interface to control the specified process.\n \n Args:\n details: {"action": string, "process": string} \n ' if ('action' not in details): raise Exceptio...
-596,609,483,046,554,400
Starts or stops a process Sends the specified command to the homevision through netio interface to control the specified process. Args: details: {"action": string, "process": string}
homevision_netio_controller/controller.py
start_stop_command
jackoson/homevision-netio-controller
python
def start_stop_command(self, details): 'Starts or stops a process\n \n Sends the specified command to the homevision through netio interface to control the specified process.\n \n Args:\n details: {"action": string, "process": string} \n ' if ('action' not in details): raise Exceptio...
def var_query(self, details): 'Returns the answer to a query on variable\n \n Returns the answer to a query on the specified variable using netio\n \n Args:\n details: {"query": string} \n ' if ('query' not in details): raise Exception('query not specified') if (details['query'] ...
-7,702,968,477,016,100,000
Returns the answer to a query on variable Returns the answer to a query on the specified variable using netio Args: details: {"query": string}
homevision_netio_controller/controller.py
var_query
jackoson/homevision-netio-controller
python
def var_query(self, details): 'Returns the answer to a query on variable\n \n Returns the answer to a query on the specified variable using netio\n \n Args:\n details: {"query": string} \n ' if ('query' not in details): raise Exception('query not specified') if (details['query'] ...
def flag_query(self, details): 'Returns the answer to a query on flag\n \n Returns the answer to a query on the specified variable using netio\n \n Args:\n details: {"query": string} \n ' if ('query' not in details): raise Exception('query not specified') if (details['query'] not...
-8,740,578,671,466,509,000
Returns the answer to a query on flag Returns the answer to a query on the specified variable using netio Args: details: {"query": string}
homevision_netio_controller/controller.py
flag_query
jackoson/homevision-netio-controller
python
def flag_query(self, details): 'Returns the answer to a query on flag\n \n Returns the answer to a query on the specified variable using netio\n \n Args:\n details: {"query": string} \n ' if ('query' not in details): raise Exception('query not specified') if (details['query'] not...
def I(): 'Identity operator.' return np.identity(2)
4,501,568,749,302,991,000
Identity operator.
quantum.py
I
duboviy/misc
python
def I(): return np.identity(2)
def X(): 'X-rotation, negation operator.' return np.identity(2)[..., ::(- 1)]
-164,720,657,164,185,280
X-rotation, negation operator.
quantum.py
X
duboviy/misc
python
def X(): return np.identity(2)[..., ::(- 1)]
def H(): 'Adamara operator, superposition.' return (np.array([[1, 1], [1, (- 1)]]) / np.sqrt(2))
-3,200,611,757,409,645,600
Adamara operator, superposition.
quantum.py
H
duboviy/misc
python
def H(): return (np.array([[1, 1], [1, (- 1)]]) / np.sqrt(2))
def SWAP(): 'Swap 2 qubits' m = np.identity(4) m[[1, 2]] = m[[2, 1]] return m
-3,730,938,159,623,653,400
Swap 2 qubits
quantum.py
SWAP
duboviy/misc
python
def SWAP(): m = np.identity(4) m[[1, 2]] = m[[2, 1]] return m
def CX(): 'Controlled negation.' m = np.identity(4) m[[3, 2]] = m[[2, 3]] return m
-5,465,632,063,229,900,000
Controlled negation.
quantum.py
CX
duboviy/misc
python
def CX(): m = np.identity(4) m[[3, 2]] = m[[2, 3]] return m
@classmethod def schema(cls) -> dict: "we're overriding the schema classmethod to enable some post-processing" schema = super().schema() schema = cls.change_format_to_oneOf(schema) return cls.resolve_refs(schema)
2,795,126,804,326,684,700
we're overriding the schema classmethod to enable some post-processing
airbyte-integrations/connectors/source-tiktok-marketing/source_tiktok_marketing/spec.py
schema
99designs/airbyte
python
@classmethod def schema(cls) -> dict: schema = super().schema() schema = cls.change_format_to_oneOf(schema) return cls.resolve_refs(schema)
@javaConstructorOverload(java_imports['Long'], (make_sig(['long'], 'void'), (metaLong,)), (make_sig([java_imports['String']], 'void'), (str,))) def __init__(self, *args, **kwargs): '\n Instantiates a new Long\n\n Signatures:\n\n Long(long value)\n Long(String s)\n\n Arguments:\n\n...
9,194,312,380,020,609,000
Instantiates a new Long Signatures: Long(long value) Long(String s) Arguments: Long(long value) value -- The long to wrap in the object Long (String s) s -- The string representing the long
TASSELpy/java/lang/Long.py
__init__
er432/TASSELpy
python
@javaConstructorOverload(java_imports['Long'], (make_sig(['long'], 'void'), (metaLong,)), (make_sig([java_imports['String']], 'void'), (str,))) def __init__(self, *args, **kwargs): '\n Instantiates a new Long\n\n Signatures:\n\n Long(long value)\n Long(String s)\n\n Arguments:\n\n...
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities) -> None: 'Set up discovered lights.' devs = [] for dev in hass.data[AQUALINK_DOMAIN][DOMAIN]: devs.append(HassAqualinkLight(dev)) async_add_entities(devs, True)
4,148,767,531,453,222,000
Set up discovered lights.
homeassistant/components/iaqualink/light.py
async_setup_entry
0xFEEDC0DE64/homeassistant-core
python
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities) -> None: devs = [] for dev in hass.data[AQUALINK_DOMAIN][DOMAIN]: devs.append(HassAqualinkLight(dev)) async_add_entities(devs, True)
@property def name(self) -> str: 'Return the name of the light.' return self.dev.label
331,499,236,811,538,800
Return the name of the light.
homeassistant/components/iaqualink/light.py
name
0xFEEDC0DE64/homeassistant-core
python
@property def name(self) -> str: return self.dev.label
@property def is_on(self) -> bool: 'Return whether the light is on or off.' return self.dev.is_on
-7,804,622,775,240,501,000
Return whether the light is on or off.
homeassistant/components/iaqualink/light.py
is_on
0xFEEDC0DE64/homeassistant-core
python
@property def is_on(self) -> bool: return self.dev.is_on
@refresh_system async def async_turn_on(self, **kwargs) -> None: 'Turn on the light.\n\n This handles brightness and light effects for lights that do support\n them.\n ' brightness = kwargs.get(ATTR_BRIGHTNESS) effect = kwargs.get(ATTR_EFFECT) if effect: effect = AqualinkLig...
-9,093,624,857,957,879,000
Turn on the light. This handles brightness and light effects for lights that do support them.
homeassistant/components/iaqualink/light.py
async_turn_on
0xFEEDC0DE64/homeassistant-core
python
@refresh_system async def async_turn_on(self, **kwargs) -> None: 'Turn on the light.\n\n This handles brightness and light effects for lights that do support\n them.\n ' brightness = kwargs.get(ATTR_BRIGHTNESS) effect = kwargs.get(ATTR_EFFECT) if effect: effect = AqualinkLig...
@refresh_system async def async_turn_off(self, **kwargs) -> None: 'Turn off the light.' (await self.dev.turn_off())
-5,875,403,621,456,464,000
Turn off the light.
homeassistant/components/iaqualink/light.py
async_turn_off
0xFEEDC0DE64/homeassistant-core
python
@refresh_system async def async_turn_off(self, **kwargs) -> None: (await self.dev.turn_off())
@property def brightness(self) -> int: 'Return current brightness of the light.\n\n The scale needs converting between 0-100 and 0-255.\n ' return ((self.dev.brightness * 255) / 100)
-8,752,403,519,390,625,000
Return current brightness of the light. The scale needs converting between 0-100 and 0-255.
homeassistant/components/iaqualink/light.py
brightness
0xFEEDC0DE64/homeassistant-core
python
@property def brightness(self) -> int: 'Return current brightness of the light.\n\n The scale needs converting between 0-100 and 0-255.\n ' return ((self.dev.brightness * 255) / 100)
@property def effect(self) -> str: 'Return the current light effect if supported.' return AqualinkLightEffect(self.dev.effect).name
4,174,574,449,923,972,600
Return the current light effect if supported.
homeassistant/components/iaqualink/light.py
effect
0xFEEDC0DE64/homeassistant-core
python
@property def effect(self) -> str: return AqualinkLightEffect(self.dev.effect).name
@property def effect_list(self) -> list: 'Return supported light effects.' return list(AqualinkLightEffect.__members__)
9,045,013,550,262,554,000
Return supported light effects.
homeassistant/components/iaqualink/light.py
effect_list
0xFEEDC0DE64/homeassistant-core
python
@property def effect_list(self) -> list: return list(AqualinkLightEffect.__members__)
@property def supported_features(self) -> int: 'Return the list of features supported by the light.' if self.dev.is_dimmer: return SUPPORT_BRIGHTNESS if self.dev.is_color: return SUPPORT_EFFECT return 0
2,749,345,628,372,254,700
Return the list of features supported by the light.
homeassistant/components/iaqualink/light.py
supported_features
0xFEEDC0DE64/homeassistant-core
python
@property def supported_features(self) -> int: if self.dev.is_dimmer: return SUPPORT_BRIGHTNESS if self.dev.is_color: return SUPPORT_EFFECT return 0
def is_language(self, s, expected_lang): ' Check if the language of the segment cannot be reliably identified\n as another language. If another than the expected language is\n detected return False ' expected_lang = expected_lang.lower() if self.valid_languages: assert (expected_lang i...
5,011,547,454,327,538,000
Check if the language of the segment cannot be reliably identified as another language. If another than the expected language is detected return False
baseline/filter_hunalign_bitext.py
is_language
christianbuck/CorpusMining
python
def is_language(self, s, expected_lang): ' Check if the language of the segment cannot be reliably identified\n as another language. If another than the expected language is\n detected return False ' expected_lang = expected_lang.lower() if self.valid_languages: assert (expected_lang i...
@abstractmethod def find_files(self, directory: Union[(str, Path)], extensions: Optional[Union[(Sequence, str)]]=None, keywords: Optional[Union[(list, str)]]=None, hemisphere: Optional[str]=None, stimulation: Optional[str]=None, medication: Optional[str]=None, exclude: Optional[Union[(str, list)]]=None, verbose: bool=F...
3,752,076,389,859,590,700
Find files in directory with optional keywords and extensions.
src/pte/filetools/filefinder_abc.py
find_files
richardkoehler/pte
python
@abstractmethod def find_files(self, directory: Union[(str, Path)], extensions: Optional[Union[(Sequence, str)]]=None, keywords: Optional[Union[(list, str)]]=None, hemisphere: Optional[str]=None, stimulation: Optional[str]=None, medication: Optional[str]=None, exclude: Optional[Union[(str, list)]]=None, verbose: bool=F...
@abstractmethod def filter_files(self, keywords: Optional[Union[(str, list)]]=None, hemisphere: Optional[str]=None, stimulation: Optional[str]=None, medication: Optional[str]=None, exclude: Optional[Union[(str, list)]]=None, verbose: bool=False) -> None: 'Filter list of filepaths for given parameters.'
-1,411,756,026,739,772,400
Filter list of filepaths for given parameters.
src/pte/filetools/filefinder_abc.py
filter_files
richardkoehler/pte
python
@abstractmethod def filter_files(self, keywords: Optional[Union[(str, list)]]=None, hemisphere: Optional[str]=None, stimulation: Optional[str]=None, medication: Optional[str]=None, exclude: Optional[Union[(str, list)]]=None, verbose: bool=False) -> None:
def _find_files(self, directory: Union[(Path, str)], extensions: Optional[Union[(list, str)]]=None) -> None: 'Find files in directory with optional extensions.\n\n Args:\n directory (string)\n keywords (list): e.g. ["SelfpacedRota", "ButtonPress] (optional)\n extensions (list...
56,373,943,236,067,064
Find files in directory with optional extensions. Args: directory (string) keywords (list): e.g. ["SelfpacedRota", "ButtonPress] (optional) extensions (list): e.g. [".json" or "tsv"] (optional) verbose (bool): verbosity level (optional, default=True)
src/pte/filetools/filefinder_abc.py
_find_files
richardkoehler/pte
python
def _find_files(self, directory: Union[(Path, str)], extensions: Optional[Union[(list, str)]]=None) -> None: 'Find files in directory with optional extensions.\n\n Args:\n directory (string)\n keywords (list): e.g. ["SelfpacedRota", "ButtonPress] (optional)\n extensions (list...
def _filter_files(self, keywords: Optional[Union[(str, list[str])]]=None, hemisphere: Optional[str]=None, stimulation: Optional[str]=None, medication: Optional[str]=None, exclude: Optional[Union[(str, list[str])]]=None) -> None: 'Filter filepaths for given parameters.' filtered_files = self.files if exclude...
7,211,439,597,194,100,000
Filter filepaths for given parameters.
src/pte/filetools/filefinder_abc.py
_filter_files
richardkoehler/pte
python
def _filter_files(self, keywords: Optional[Union[(str, list[str])]]=None, hemisphere: Optional[str]=None, stimulation: Optional[str]=None, medication: Optional[str]=None, exclude: Optional[Union[(str, list[str])]]=None) -> None: filtered_files = self.files if exclude: if (not isinstance(exclude, li...
def irfft2(a, s=None, axes=((- 2), (- 1)), norm=None): '\n Compute the 2-dimensional inverse FFT of a real array.\n\n Parameters\n ----------\n a : array_like\n The input tensor\n s : sequence of ints, optional\n Shape of the inverse FFT.\n axes : sequence of ints, optional\n ...
31,699,221,590,624,984
Compute the 2-dimensional inverse FFT of a real array. Parameters ---------- a : array_like The input tensor s : sequence of ints, optional Shape of the inverse FFT. axes : sequence of ints, optional The axes over which to compute the inverse fft. Default is the last two axes. norm : {None, "ortho"}, o...
mars/tensor/fft/irfft2.py
irfft2
JeffroMF/mars
python
def irfft2(a, s=None, axes=((- 2), (- 1)), norm=None): '\n Compute the 2-dimensional inverse FFT of a real array.\n\n Parameters\n ----------\n a : array_like\n The input tensor\n s : sequence of ints, optional\n Shape of the inverse FFT.\n axes : sequence of ints, optional\n ...
def __init__(self, conf, router_conf, db, agent): 'Create a new Router' self.conf = conf self.router_conf = router_conf self.db = db self.agent = agent
7,695,343,446,000,534,000
Create a new Router
autopush/router/webpush.py
__init__
Acidburn0zzz/autopush
python
def __init__(self, conf, router_conf, db, agent): self.conf = conf self.router_conf = router_conf self.db = db self.agent = agent
def register(self, uaid, router_data, app_id, *args, **kwargs): 'No additional routing data'
-4,153,625,044,012,655,000
No additional routing data
autopush/router/webpush.py
register
Acidburn0zzz/autopush
python
def register(self, uaid, router_data, app_id, *args, **kwargs):
def amend_endpoint_response(self, response, router_data): 'Stubbed out for this router'
4,586,840,260,404,607,500
Stubbed out for this router
autopush/router/webpush.py
amend_endpoint_response
Acidburn0zzz/autopush
python
def amend_endpoint_response(self, response, router_data):
@inlineCallbacks def route_notification(self, notification, uaid_data): "Route a notification to an internal node, and store it if the node\n can't deliver immediately or is no longer a valid node\n " node_id = uaid_data.get('node_id') uaid = uaid_data['uaid'] router = self.db.router i...
3,801,602,032,211,172,400
Route a notification to an internal node, and store it if the node can't deliver immediately or is no longer a valid node
autopush/router/webpush.py
route_notification
Acidburn0zzz/autopush
python
@inlineCallbacks def route_notification(self, notification, uaid_data): "Route a notification to an internal node, and store it if the node\n can't deliver immediately or is no longer a valid node\n " node_id = uaid_data.get('node_id') uaid = uaid_data['uaid'] router = self.db.router i...
def _send_notification(self, uaid, node_id, notification): 'Send a notification to a specific node_id\n\n This version of the overriden method includes the necessary crypto\n headers for the notification.\n\n :type notification: autopush.utils.WebPushNotification\n\n ' payload = noti...
4,112,651,449,687,784,400
Send a notification to a specific node_id This version of the overriden method includes the necessary crypto headers for the notification. :type notification: autopush.utils.WebPushNotification
autopush/router/webpush.py
_send_notification
Acidburn0zzz/autopush
python
def _send_notification(self, uaid, node_id, notification): 'Send a notification to a specific node_id\n\n This version of the overriden method includes the necessary crypto\n headers for the notification.\n\n :type notification: autopush.utils.WebPushNotification\n\n ' payload = noti...
def _send_notification_check(self, uaid, node_id): 'Send a command to the node to check for notifications' url = ((node_id + '/notif/') + uaid) return self.agent.request('PUT', url.encode('utf8')).addCallback(IgnoreBody.ignore)
4,989,087,466,341,468,000
Send a command to the node to check for notifications
autopush/router/webpush.py
_send_notification_check
Acidburn0zzz/autopush
python
def _send_notification_check(self, uaid, node_id): url = ((node_id + '/notif/') + uaid) return self.agent.request('PUT', url.encode('utf8')).addCallback(IgnoreBody.ignore)
def _save_notification(self, uaid_data, notification): 'Saves a notification, returns a deferred.\n\n This version of the overridden method saves each individual message\n to the message table along with relevant request headers if\n available.\n\n :type uaid_data: dict\n\n ' ...
-1,176,066,011,258,479,600
Saves a notification, returns a deferred. This version of the overridden method saves each individual message to the message table along with relevant request headers if available. :type uaid_data: dict
autopush/router/webpush.py
_save_notification
Acidburn0zzz/autopush
python
def _save_notification(self, uaid_data, notification): 'Saves a notification, returns a deferred.\n\n This version of the overridden method saves each individual message\n to the message table along with relevant request headers if\n available.\n\n :type uaid_data: dict\n\n ' ...
def _eat_db_err(self, fail): 'errBack for ignoring provisioned throughput errors' fail.trap(ClientError)
-5,169,902,337,626,011,000
errBack for ignoring provisioned throughput errors
autopush/router/webpush.py
_eat_db_err
Acidburn0zzz/autopush
python
def _eat_db_err(self, fail): fail.trap(ClientError)
def save_bloguser_extra_profile(backend, user, response, *args, **kwargs): '\n see more:\n http://python-social-auth.readthedocs.io/en/latest/use_cases.html#retrieve-google-friends\n http://python-social-auth.readthedocs.io/en/latest/pipeline.html\n :param backend:\n :param user:\n :param ...
8,284,591,256,816,238,000
see more: http://python-social-auth.readthedocs.io/en/latest/use_cases.html#retrieve-google-friends http://python-social-auth.readthedocs.io/en/latest/pipeline.html :param backend: :param user: :param response: :param args: :param kwargs: :return:
apps/bloguser/pipline.py
save_bloguser_extra_profile
Jennei/MyBlog
python
def save_bloguser_extra_profile(backend, user, response, *args, **kwargs): '\n see more:\n http://python-social-auth.readthedocs.io/en/latest/use_cases.html#retrieve-google-friends\n http://python-social-auth.readthedocs.io/en/latest/pipeline.html\n :param backend:\n :param user:\n :param ...
def extractMichilunWordpressCom(item): "\n\tParser for 'michilun.wordpress.com'\n\t" bad = ['Recommendations and Reviews'] if any([(tmp in item['tags']) for tmp in bad]): return None (vol, chp, frag, postfix) = extractVolChapterFragmentPostfix(item['title']) if ((not (chp or vol)) or ('previ...
2,736,643,888,499,868,000
Parser for 'michilun.wordpress.com'
WebMirror/management/rss_parser_funcs/feed_parse_extractMichilunWordpressCom.py
extractMichilunWordpressCom
fake-name/ReadableWebProxy
python
def extractMichilunWordpressCom(item): "\n\t\n\t" bad = ['Recommendations and Reviews'] if any([(tmp in item['tags']) for tmp in bad]): return None (vol, chp, frag, postfix) = extractVolChapterFragmentPostfix(item['title']) if ((not (chp or vol)) or ('preview' in item['title'].lower())): ...
def _recursive_apply(self, block): '\n This function is "applied" to every child in the block. This function in turn\n registers the forward hook to each module. It helps logging the input output tensors\n of that module.\n ' if (block in self.registered_blocks): self.logger....
8,230,639,869,853,194,000
This function is "applied" to every child in the block. This function in turn registers the forward hook to each module. It helps logging the input output tensors of that module.
smdebug/mxnet/hook.py
_recursive_apply
arjkesh/sagemaker-debugger
python
def _recursive_apply(self, block): '\n This function is "applied" to every child in the block. This function in turn\n registers the forward hook to each module. It helps logging the input output tensors\n of that module.\n ' if (block in self.registered_blocks): self.logger....
@error_handling_agent.catch_smdebug_errors() def register_block(self, block): '\n This function registers the forward hook. If user wants to register the hook\n for every child in the given block, then the function calls "apply" API for\n registration of the hook.\n The hook is registere...
3,938,190,178,072,743,400
This function registers the forward hook. If user wants to register the hook for every child in the given block, then the function calls "apply" API for registration of the hook. The hook is registered recursively, if user has specified the collections that are more than the default collectors viz. gradients, weight an...
smdebug/mxnet/hook.py
register_block
arjkesh/sagemaker-debugger
python
@error_handling_agent.catch_smdebug_errors() def register_block(self, block): '\n This function registers the forward hook. If user wants to register the hook\n for every child in the given block, then the function calls "apply" API for\n registration of the hook.\n The hook is registere...
def get_virtual_machine_scale_set(expand: Optional[str]=None, resource_group_name: Optional[str]=None, vm_scale_set_name: Optional[str]=None, opts: Optional[pulumi.InvokeOptions]=None) -> AwaitableGetVirtualMachineScaleSetResult: "\n Describes a Virtual Machine Scale Set.\n API Version: 2021-03-01.\n\n\n :...
-7,936,196,944,535,669,000
Describes a Virtual Machine Scale Set. API Version: 2021-03-01. :param str expand: The expand expression to apply on the operation. 'UserData' retrieves the UserData property of the VM scale set that was provided by the user during the VM scale set Create/Update operation :param str resource_group_name: The name of t...
sdk/python/pulumi_azure_native/compute/get_virtual_machine_scale_set.py
get_virtual_machine_scale_set
polivbr/pulumi-azure-native
python
def get_virtual_machine_scale_set(expand: Optional[str]=None, resource_group_name: Optional[str]=None, vm_scale_set_name: Optional[str]=None, opts: Optional[pulumi.InvokeOptions]=None) -> AwaitableGetVirtualMachineScaleSetResult: "\n Describes a Virtual Machine Scale Set.\n API Version: 2021-03-01.\n\n\n :...
@property @pulumi.getter(name='additionalCapabilities') def additional_capabilities(self) -> Optional['outputs.AdditionalCapabilitiesResponse']: '\n Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have ...
-4,984,097,992,721,295,000
Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
sdk/python/pulumi_azure_native/compute/get_virtual_machine_scale_set.py
additional_capabilities
polivbr/pulumi-azure-native
python
@property @pulumi.getter(name='additionalCapabilities') def additional_capabilities(self) -> Optional['outputs.AdditionalCapabilitiesResponse']: '\n \n ' return pulumi.get(self, 'additional_capabilities')
@property @pulumi.getter(name='automaticRepairsPolicy') def automatic_repairs_policy(self) -> Optional['outputs.AutomaticRepairsPolicyResponse']: '\n Policy for automatic repairs.\n ' return pulumi.get(self, 'automatic_repairs_policy')
-5,255,793,026,184,793,000
Policy for automatic repairs.
sdk/python/pulumi_azure_native/compute/get_virtual_machine_scale_set.py
automatic_repairs_policy
polivbr/pulumi-azure-native
python
@property @pulumi.getter(name='automaticRepairsPolicy') def automatic_repairs_policy(self) -> Optional['outputs.AutomaticRepairsPolicyResponse']: '\n \n ' return pulumi.get(self, 'automatic_repairs_policy')