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 median(self, axis: Optional[Axis]=None, numeric_only: bool=None, accuracy: int=10000) -> Union[(Scalar, 'Series')]: "\n Return the median of the values for the requested axis.\n\n .. note:: Unlike pandas', the median in pandas-on-Spark is an approximated median based upon\n approximate ...
-876,830,135,422,874,200
Return the median of the values for the requested axis. .. note:: Unlike pandas', the median in pandas-on-Spark is an approximated median based upon approximate percentile computation because computing median across a large dataset is extremely expensive. Parameters ---------- axis : {index (0), columns (1)} ...
python/pyspark/pandas/generic.py
median
XpressAI/spark
python
def median(self, axis: Optional[Axis]=None, numeric_only: bool=None, accuracy: int=10000) -> Union[(Scalar, 'Series')]: "\n Return the median of the values for the requested axis.\n\n .. note:: Unlike pandas', the median in pandas-on-Spark is an approximated median based upon\n approximate ...
def sem(self, axis: Optional[Axis]=None, ddof: int=1, numeric_only: bool=None) -> Union[(Scalar, 'Series')]: '\n Return unbiased standard error of the mean over requested axis.\n\n Parameters\n ----------\n axis : {index (0), columns (1)}\n Axis for the function to be applied ...
4,448,271,079,385,983,500
Return unbiased standard error of the mean over requested axis. Parameters ---------- axis : {index (0), columns (1)} Axis for the function to be applied on. ddof : int, default 1 Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. numeric_only...
python/pyspark/pandas/generic.py
sem
XpressAI/spark
python
def sem(self, axis: Optional[Axis]=None, ddof: int=1, numeric_only: bool=None) -> Union[(Scalar, 'Series')]: '\n Return unbiased standard error of the mean over requested axis.\n\n Parameters\n ----------\n axis : {index (0), columns (1)}\n Axis for the function to be applied ...
@property def size(self) -> int: "\n Return an int representing the number of elements in this object.\n\n Return the number of rows if Series. Otherwise return the number of\n rows times number of columns if DataFrame.\n\n Examples\n --------\n >>> s = ps.Series({'a': 1, '...
-4,052,080,229,098,774,500
Return an int representing the number of elements in this object. Return the number of rows if Series. Otherwise return the number of rows times number of columns if DataFrame. Examples -------- >>> s = ps.Series({'a': 1, 'b': 2, 'c': None}) >>> s.size 3 >>> df = ps.DataFrame({'col1': [1, 2, None], 'col2': [3, 4, No...
python/pyspark/pandas/generic.py
size
XpressAI/spark
python
@property def size(self) -> int: "\n Return an int representing the number of elements in this object.\n\n Return the number of rows if Series. Otherwise return the number of\n rows times number of columns if DataFrame.\n\n Examples\n --------\n >>> s = ps.Series({'a': 1, '...
def abs(self: FrameLike) -> FrameLike: "\n Return a Series/DataFrame with absolute numeric value of each element.\n\n Returns\n -------\n abs : Series/DataFrame containing the absolute value of each element.\n\n Examples\n --------\n\n Absolute numeric values in a Se...
-8,096,641,240,787,788,000
Return a Series/DataFrame with absolute numeric value of each element. Returns ------- abs : Series/DataFrame containing the absolute value of each element. Examples -------- Absolute numeric values in a Series. >>> s = ps.Series([-1.10, 2, -3.33, 4]) >>> s.abs() 0 1.10 1 2.00 2 3.33 3 4.00 dtype: float...
python/pyspark/pandas/generic.py
abs
XpressAI/spark
python
def abs(self: FrameLike) -> FrameLike: "\n Return a Series/DataFrame with absolute numeric value of each element.\n\n Returns\n -------\n abs : Series/DataFrame containing the absolute value of each element.\n\n Examples\n --------\n\n Absolute numeric values in a Se...
def groupby(self: FrameLike, by: Union[(Any, Tuple, 'Series', List[Union[(Any, Tuple, 'Series')]])], axis: Axis=0, as_index: bool=True, dropna: bool=True) -> 'GroupBy[FrameLike]': '\n Group DataFrame or Series using a Series of columns.\n\n A groupby operation involves some combination of splitting th...
5,165,825,879,761,929,000
Group DataFrame or Series using a Series of columns. A groupby operation involves some combination of splitting the object, applying a function, and combining the results. This can be used to group large amounts of data and compute operations on these groups. Parameters ---------- by : Series, label, or list of label...
python/pyspark/pandas/generic.py
groupby
XpressAI/spark
python
def groupby(self: FrameLike, by: Union[(Any, Tuple, 'Series', List[Union[(Any, Tuple, 'Series')]])], axis: Axis=0, as_index: bool=True, dropna: bool=True) -> 'GroupBy[FrameLike]': '\n Group DataFrame or Series using a Series of columns.\n\n A groupby operation involves some combination of splitting th...
def bool(self) -> bool: "\n Return the bool of a single element in the current object.\n\n This must be a boolean scalar value, either True or False. Raise a ValueError if\n the object does not have exactly 1 element, or that element is not boolean\n\n Returns\n --------\n ...
-1,561,303,879,960,741,400
Return the bool of a single element in the current object. This must be a boolean scalar value, either True or False. Raise a ValueError if the object does not have exactly 1 element, or that element is not boolean Returns -------- bool Examples -------- >>> ps.DataFrame({'a': [True]}).bool() True >>> ps.Series([Fa...
python/pyspark/pandas/generic.py
bool
XpressAI/spark
python
def bool(self) -> bool: "\n Return the bool of a single element in the current object.\n\n This must be a boolean scalar value, either True or False. Raise a ValueError if\n the object does not have exactly 1 element, or that element is not boolean\n\n Returns\n --------\n ...
def first_valid_index(self) -> Optional[Union[(Scalar, Tuple[(Scalar, ...)])]]: "\n Retrieves the index of the first valid value.\n\n Returns\n -------\n scalar, tuple, or None\n\n Examples\n --------\n\n Support for DataFrame\n\n >>> psdf = ps.DataFrame({'a':...
-2,649,245,325,038,494,000
Retrieves the index of the first valid value. Returns ------- scalar, tuple, or None Examples -------- Support for DataFrame >>> psdf = ps.DataFrame({'a': [None, 2, 3, 2], ... 'b': [None, 2.0, 3.0, 1.0], ... 'c': [None, 200, 400, 200]}, ... index=['Q', 'W'...
python/pyspark/pandas/generic.py
first_valid_index
XpressAI/spark
python
def first_valid_index(self) -> Optional[Union[(Scalar, Tuple[(Scalar, ...)])]]: "\n Retrieves the index of the first valid value.\n\n Returns\n -------\n scalar, tuple, or None\n\n Examples\n --------\n\n Support for DataFrame\n\n >>> psdf = ps.DataFrame({'a':...
def last_valid_index(self) -> Optional[Union[(Scalar, Tuple[(Scalar, ...)])]]: "\n Return index for last non-NA/null value.\n\n Returns\n -------\n scalar, tuple, or None\n\n Notes\n -----\n This API only works with PySpark >= 3.0.\n\n Examples\n ------...
613,440,096,527,983,700
Return index for last non-NA/null value. Returns ------- scalar, tuple, or None Notes ----- This API only works with PySpark >= 3.0. Examples -------- Support for DataFrame >>> psdf = ps.DataFrame({'a': [1, 2, 3, None], ... 'b': [1.0, 2.0, 3.0, None], ... 'c': [100, 200, 400...
python/pyspark/pandas/generic.py
last_valid_index
XpressAI/spark
python
def last_valid_index(self) -> Optional[Union[(Scalar, Tuple[(Scalar, ...)])]]: "\n Return index for last non-NA/null value.\n\n Returns\n -------\n scalar, tuple, or None\n\n Notes\n -----\n This API only works with PySpark >= 3.0.\n\n Examples\n ------...
def rolling(self: FrameLike, window: int, min_periods: Optional[int]=None) -> 'Rolling[FrameLike]': "\n Provide rolling transformations.\n\n .. note:: 'min_periods' in pandas-on-Spark works as a fixed window size unlike pandas.\n Unlike pandas, NA is also counted as the period. This might b...
3,435,677,467,007,363,600
Provide rolling transformations. .. note:: 'min_periods' in pandas-on-Spark works as a fixed window size unlike pandas. Unlike pandas, NA is also counted as the period. This might be changed in the near future. Parameters ---------- window : int, or offset Size of the moving window. This is the number...
python/pyspark/pandas/generic.py
rolling
XpressAI/spark
python
def rolling(self: FrameLike, window: int, min_periods: Optional[int]=None) -> 'Rolling[FrameLike]': "\n Provide rolling transformations.\n\n .. note:: 'min_periods' in pandas-on-Spark works as a fixed window size unlike pandas.\n Unlike pandas, NA is also counted as the period. This might b...
def expanding(self: FrameLike, min_periods: int=1) -> 'Expanding[FrameLike]': "\n Provide expanding transformations.\n\n .. note:: 'min_periods' in pandas-on-Spark works as a fixed window size unlike pandas.\n Unlike pandas, NA is also counted as the period. This might be changed\n ...
-4,089,165,445,054,864,000
Provide expanding transformations. .. note:: 'min_periods' in pandas-on-Spark works as a fixed window size unlike pandas. Unlike pandas, NA is also counted as the period. This might be changed in the near future. Parameters ---------- min_periods : int, default 1 Minimum number of observations in window r...
python/pyspark/pandas/generic.py
expanding
XpressAI/spark
python
def expanding(self: FrameLike, min_periods: int=1) -> 'Expanding[FrameLike]': "\n Provide expanding transformations.\n\n .. note:: 'min_periods' in pandas-on-Spark works as a fixed window size unlike pandas.\n Unlike pandas, NA is also counted as the period. This might be changed\n ...
def get(self, key: Any, default: Optional[Any]=None) -> Any: "\n Get item from object for given key (DataFrame column, Panel slice,\n etc.). Returns default value if not found.\n\n Parameters\n ----------\n key : object\n\n Returns\n -------\n value : same typ...
1,690,284,315,299,788,500
Get item from object for given key (DataFrame column, Panel slice, etc.). Returns default value if not found. Parameters ---------- key : object Returns ------- value : same type as items contained in object Examples -------- >>> df = ps.DataFrame({'x':range(3), 'y':['a','b','b'], 'z':['a','b','b']}, ... ...
python/pyspark/pandas/generic.py
get
XpressAI/spark
python
def get(self, key: Any, default: Optional[Any]=None) -> Any: "\n Get item from object for given key (DataFrame column, Panel slice,\n etc.). Returns default value if not found.\n\n Parameters\n ----------\n key : object\n\n Returns\n -------\n value : same typ...
def squeeze(self, axis: Optional[Axis]=None) -> Union[(Scalar, 'DataFrame', 'Series')]: "\n Squeeze 1 dimensional axis objects into scalars.\n\n Series or DataFrames with a single element are squeezed to a scalar.\n DataFrames with a single column or a single row are squeezed to a\n Seri...
-1,916,325,584,634,146,800
Squeeze 1 dimensional axis objects into scalars. Series or DataFrames with a single element are squeezed to a scalar. DataFrames with a single column or a single row are squeezed to a Series. Otherwise the object is unchanged. This method is most useful when you don't know if your object is a Series or DataFrame, but...
python/pyspark/pandas/generic.py
squeeze
XpressAI/spark
python
def squeeze(self, axis: Optional[Axis]=None) -> Union[(Scalar, 'DataFrame', 'Series')]: "\n Squeeze 1 dimensional axis objects into scalars.\n\n Series or DataFrames with a single element are squeezed to a scalar.\n DataFrames with a single column or a single row are squeezed to a\n Seri...
def truncate(self, before: Optional[Any]=None, after: Optional[Any]=None, axis: Optional[Axis]=None, copy: bool_type=True) -> DataFrameOrSeries: '\n Truncate a Series or DataFrame before and after some index value.\n\n This is a useful shorthand for boolean indexing based on index\n values abov...
6,132,906,944,478,476,000
Truncate a Series or DataFrame before and after some index value. This is a useful shorthand for boolean indexing based on index values above or below certain thresholds. .. note:: This API is dependent on :meth:`Index.is_monotonic_increasing` which can be expensive. Parameters ---------- before : date, str, int...
python/pyspark/pandas/generic.py
truncate
XpressAI/spark
python
def truncate(self, before: Optional[Any]=None, after: Optional[Any]=None, axis: Optional[Axis]=None, copy: bool_type=True) -> DataFrameOrSeries: '\n Truncate a Series or DataFrame before and after some index value.\n\n This is a useful shorthand for boolean indexing based on index\n values abov...
def to_markdown(self, buf: Optional[Union[(IO[str], str)]]=None, mode: Optional[str]=None) -> str: '\n Print Series or DataFrame in Markdown-friendly format.\n\n .. note:: This method should only be used if the resulting pandas object is expected\n to be small, as all the data is load...
-2,431,315,716,865,093,000
Print Series or DataFrame in Markdown-friendly format. .. note:: This method should only be used if the resulting pandas object is expected to be small, as all the data is loaded into the driver's memory. Parameters ---------- buf : writable buffer, defaults to sys.stdout Where to send the output. By de...
python/pyspark/pandas/generic.py
to_markdown
XpressAI/spark
python
def to_markdown(self, buf: Optional[Union[(IO[str], str)]]=None, mode: Optional[str]=None) -> str: '\n Print Series or DataFrame in Markdown-friendly format.\n\n .. note:: This method should only be used if the resulting pandas object is expected\n to be small, as all the data is load...
def bfill(self: FrameLike, axis: Optional[Axis]=None, inplace: bool_type=False, limit: Optional[int]=None) -> FrameLike: "\n Synonym for `DataFrame.fillna()` or `Series.fillna()` with ``method=`bfill```.\n\n .. note:: the current implementation of 'bfill' uses Spark's Window\n without speci...
-4,754,868,684,147,332,000
Synonym for `DataFrame.fillna()` or `Series.fillna()` with ``method=`bfill```. .. note:: the current implementation of 'bfill' uses Spark's Window without specifying partition specification. This leads to move all data into single partition in single machine and could cause serious performance degradation....
python/pyspark/pandas/generic.py
bfill
XpressAI/spark
python
def bfill(self: FrameLike, axis: Optional[Axis]=None, inplace: bool_type=False, limit: Optional[int]=None) -> FrameLike: "\n Synonym for `DataFrame.fillna()` or `Series.fillna()` with ``method=`bfill```.\n\n .. note:: the current implementation of 'bfill' uses Spark's Window\n without speci...
def ffill(self: FrameLike, axis: Optional[Axis]=None, inplace: bool_type=False, limit: Optional[int]=None) -> FrameLike: "\n Synonym for `DataFrame.fillna()` or `Series.fillna()` with ``method=`ffill```.\n\n .. note:: the current implementation of 'ffill' uses Spark's Window\n without speci...
6,601,667,604,905,121,000
Synonym for `DataFrame.fillna()` or `Series.fillna()` with ``method=`ffill```. .. note:: the current implementation of 'ffill' uses Spark's Window without specifying partition specification. This leads to move all data into single partition in single machine and could cause serious performance degradation....
python/pyspark/pandas/generic.py
ffill
XpressAI/spark
python
def ffill(self: FrameLike, axis: Optional[Axis]=None, inplace: bool_type=False, limit: Optional[int]=None) -> FrameLike: "\n Synonym for `DataFrame.fillna()` or `Series.fillna()` with ``method=`ffill```.\n\n .. note:: the current implementation of 'ffill' uses Spark's Window\n without speci...
def clean_slug(slug): 'Clean a possible Slug string to remove dashes and lower case.' return slug.replace('-', '').lower()
8,895,740,661,734,946,000
Clean a possible Slug string to remove dashes and lower case.
src/coolbeans/plugins/sheetsaccount.py
clean_slug
runarp/coolbeans
python
def clean_slug(slug): return slug.replace('-', ).lower()
def coolbean_sheets(entries, context): 'Given a set of entries, pull out any slugs and add them to the context' settings = context.setdefault('coolbean-accounts', {}) for entry in entries: if isinstance(entry, data.Open): document = entry.meta.get('document_name', None) tab =...
5,413,436,553,337,824,000
Given a set of entries, pull out any slugs and add them to the context
src/coolbeans/plugins/sheetsaccount.py
coolbean_sheets
runarp/coolbeans
python
def coolbean_sheets(entries, context): settings = context.setdefault('coolbean-accounts', {}) for entry in entries: if isinstance(entry, data.Open): document = entry.meta.get('document_name', None) tab = entry.meta.get('document_tab', None) slug = entry.meta.get(...
def remote_entries(entries, options_map): '\n\n @param entries:\n @param options_map:\n @return:\n ' errors = [] settings = options_map['coolbeans'] secrets_file = get_setting('google-apis', settings) connection = google_connect(secrets_file) new_entries_path = None new_entries_f...
-2,312,854,070,579,368,400
@param entries: @param options_map: @return:
src/coolbeans/plugins/sheetsaccount.py
remote_entries
runarp/coolbeans
python
def remote_entries(entries, options_map): '\n\n @param entries:\n @param options_map:\n @return:\n ' errors = [] settings = options_map['coolbeans'] secrets_file = get_setting('google-apis', settings) connection = google_connect(secrets_file) new_entries_path = None new_entries_f...
def clean_record(record: typing.Dict[(str, str)]): "This is a bit of a hack. But using get_all_records doesn't leave many\n options" new_record = {} for (k, v) in record.items(): k = slugify.slugify(k.lower().strip()) v = str(v) for (field, names) in ALIASES.items(): ...
-8,839,127,115,597,063,000
This is a bit of a hack. But using get_all_records doesn't leave many options
src/coolbeans/plugins/sheetsaccount.py
clean_record
runarp/coolbeans
python
def clean_record(record: typing.Dict[(str, str)]): "This is a bit of a hack. But using get_all_records doesn't leave many\n options" new_record = {} for (k, v) in record.items(): k = slugify.slugify(k.lower().strip()) v = str(v) for (field, names) in ALIASES.items(): ...
def load_remote_account(connection: gspread.Client, errors: list, account: str, options: typing.Dict[(str, str)]): 'Try to Load Entries from URL into Account.\n\n options include:\n - document_name -- the Actual Google Doc name\n - document_tab -- the Tab name on the Doc\n - default_currency...
-5,359,603,005,264,168,000
Try to Load Entries from URL into Account. options include: - document_name -- the Actual Google Doc name - document_tab -- the Tab name on the Doc - default_currency - the entry currency if None is provided - reverse_amount - if true, assume positive entries are credits
src/coolbeans/plugins/sheetsaccount.py
load_remote_account
runarp/coolbeans
python
def load_remote_account(connection: gspread.Client, errors: list, account: str, options: typing.Dict[(str, str)]): 'Try to Load Entries from URL into Account.\n\n options include:\n - document_name -- the Actual Google Doc name\n - document_tab -- the Tab name on the Doc\n - default_currency...
def setUp(self): 'Setup' super(TestPropertyOnlyOne, self).setUp() self.collection.register(OnlyOne())
-8,261,507,296,794,374,000
Setup
test/unit/rules/resources/properties/test_onlyone.py
setUp
awkspace/cfn-python-lint
python
def setUp(self): super(TestPropertyOnlyOne, self).setUp() self.collection.register(OnlyOne())
def test_file_positive(self): 'Test Positive' self.helper_file_positive()
-1,556,978,985,838,885,400
Test Positive
test/unit/rules/resources/properties/test_onlyone.py
test_file_positive
awkspace/cfn-python-lint
python
def test_file_positive(self): self.helper_file_positive()
def test_file_negative(self): 'Test failure' self.helper_file_negative('test/fixtures/templates/bad/resources/properties/onlyone.yaml', 5)
4,632,762,795,947,568,000
Test failure
test/unit/rules/resources/properties/test_onlyone.py
test_file_negative
awkspace/cfn-python-lint
python
def test_file_negative(self): self.helper_file_negative('test/fixtures/templates/bad/resources/properties/onlyone.yaml', 5)
def testWhileTypeErrors(self): 'Test typing error messages for while.' tuple_treedef = tree_util.tree_structure((1.0, 1.0)) leaf_treedef = tree_util.tree_structure(0.0) with self.assertRaisesRegex(TypeError, re.escape(f'cond_fun must return a boolean scalar, but got pytree {tuple_treedef}.')): l...
-5,920,863,230,374,971,000
Test typing error messages for while.
tests/lax_control_flow_test.py
testWhileTypeErrors
cdfreeman-google/jax
python
def testWhileTypeErrors(self): tuple_treedef = tree_util.tree_structure((1.0, 1.0)) leaf_treedef = tree_util.tree_structure(0.0) with self.assertRaisesRegex(TypeError, re.escape(f'cond_fun must return a boolean scalar, but got pytree {tuple_treedef}.')): lax.while_loop((lambda c: (1.0, 1.0)), (...
def testForiLoopErrors(self): 'Test typing error messages for while.' with self.assertRaisesRegex(TypeError, 'arguments to fori_loop must have equal types'): lax.fori_loop(np.int16(0), jnp.int32(10), (lambda i, c: c), jnp.float32(7))
-5,943,806,257,004,347,000
Test typing error messages for while.
tests/lax_control_flow_test.py
testForiLoopErrors
cdfreeman-google/jax
python
def testForiLoopErrors(self): with self.assertRaisesRegex(TypeError, 'arguments to fori_loop must have equal types'): lax.fori_loop(np.int16(0), jnp.int32(10), (lambda i, c: c), jnp.float32(7))
def testCondTypeErrors(self): 'Test typing error messages for cond.' with self.assertRaisesRegex(TypeError, re.escape('Pred type must be either boolean or number, got <function')): lax.cond((lambda x: True), (lambda top: 2.0), (lambda fop: 3.0), 1.0) with self.assertRaisesRegex(TypeError, re.escape...
-5,686,292,944,912,370,000
Test typing error messages for cond.
tests/lax_control_flow_test.py
testCondTypeErrors
cdfreeman-google/jax
python
def testCondTypeErrors(self): with self.assertRaisesRegex(TypeError, re.escape('Pred type must be either boolean or number, got <function')): lax.cond((lambda x: True), (lambda top: 2.0), (lambda fop: 3.0), 1.0) with self.assertRaisesRegex(TypeError, re.escape("Pred must be a scalar, got foo of typ...
def testSwitchErrors(self): 'Test typing error messages for switch.' with self.assertRaisesRegex(TypeError, re.escape('Index type must be an integer, got <function')): lax.switch((lambda x: True), [(lambda _: 2.0), (lambda _: 3.0)], 1.0) with self.assertRaisesRegex(TypeError, re.escape('Index type m...
-1,112,016,817,928,494,600
Test typing error messages for switch.
tests/lax_control_flow_test.py
testSwitchErrors
cdfreeman-google/jax
python
def testSwitchErrors(self): with self.assertRaisesRegex(TypeError, re.escape('Index type must be an integer, got <function')): lax.switch((lambda x: True), [(lambda _: 2.0), (lambda _: 3.0)], 1.0) with self.assertRaisesRegex(TypeError, re.escape('Index type must be an integer, got foo.')): ...
def testScanTypeErrors(self): 'Test typing error messages for scan.' a = jnp.arange(5) with self.assertRaisesRegex(TypeError, re.escape('scan body output must be a pair, got ShapedArray(float32[]).')): lax.scan((lambda c, x: np.float32(0.0)), 0, a) with self.assertRaisesRegex(TypeError, re.escap...
-7,095,610,930,942,497,000
Test typing error messages for scan.
tests/lax_control_flow_test.py
testScanTypeErrors
cdfreeman-google/jax
python
def testScanTypeErrors(self): a = jnp.arange(5) with self.assertRaisesRegex(TypeError, re.escape('scan body output must be a pair, got ShapedArray(float32[]).')): lax.scan((lambda c, x: np.float32(0.0)), 0, a) with self.assertRaisesRegex(TypeError, re.escape(f'scan carry output and input must h...
@jtu.skip_on_flag('jax_skip_slow_tests', True) def test_custom_linear_solve_pytree(self): 'Test custom linear solve with inputs and outputs that are pytrees.' def unrolled_matvec(mat, x): 'Apply a Python list of lists of scalars to a list of scalars.' result = [] for i in range(len(mat)...
-7,709,107,645,537,896,000
Test custom linear solve with inputs and outputs that are pytrees.
tests/lax_control_flow_test.py
test_custom_linear_solve_pytree
cdfreeman-google/jax
python
@jtu.skip_on_flag('jax_skip_slow_tests', True) def test_custom_linear_solve_pytree(self): def unrolled_matvec(mat, x): 'Apply a Python list of lists of scalars to a list of scalars.' result = [] for i in range(len(mat)): v = 0 for j in range(len(x)): ...
def unrolled_matvec(mat, x): 'Apply a Python list of lists of scalars to a list of scalars.' result = [] for i in range(len(mat)): v = 0 for j in range(len(x)): if (mat[i][j] is not None): v += (mat[i][j] * x[j]) result.append(v) return result
-1,598,892,281,679,112,400
Apply a Python list of lists of scalars to a list of scalars.
tests/lax_control_flow_test.py
unrolled_matvec
cdfreeman-google/jax
python
def unrolled_matvec(mat, x): result = [] for i in range(len(mat)): v = 0 for j in range(len(x)): if (mat[i][j] is not None): v += (mat[i][j] * x[j]) result.append(v) return result
def unrolled_substitution_solve(matvec, b, lower_tri): 'Solve a triangular unrolled system with fwd/back substitution.' zero = jnp.zeros(()) one = jnp.ones(()) x = [zero for _ in b] ordering = (range(len(b)) if lower_tri else range((len(b) - 1), (- 1), (- 1))) for i in ordering: residual...
146,545,813,991,085,980
Solve a triangular unrolled system with fwd/back substitution.
tests/lax_control_flow_test.py
unrolled_substitution_solve
cdfreeman-google/jax
python
def unrolled_substitution_solve(matvec, b, lower_tri): zero = jnp.zeros(()) one = jnp.ones(()) x = [zero for _ in b] ordering = (range(len(b)) if lower_tri else range((len(b) - 1), (- 1), (- 1))) for i in ordering: residual = (b[i] - matvec(x)[i]) diagonal = matvec([(one if (i =...
def nodeset(self): 'set of all node idxs' raise NotImplementedError()
-6,226,151,121,687,879,000
set of all node idxs
LocalMercurial/mercurial/dagutil.py
nodeset
l2dy/machg
python
def nodeset(self): raise NotImplementedError()
def heads(self): 'list of head ixs' raise NotImplementedError()
-2,098,944,108,082,554,600
list of head ixs
LocalMercurial/mercurial/dagutil.py
heads
l2dy/machg
python
def heads(self): raise NotImplementedError()
def parents(self, ix): 'list of parents ixs of ix' raise NotImplementedError()
2,204,374,004,237,189,400
list of parents ixs of ix
LocalMercurial/mercurial/dagutil.py
parents
l2dy/machg
python
def parents(self, ix): raise NotImplementedError()
def inverse(self): 'inverse DAG, where parents becomes children, etc.' raise NotImplementedError()
1,920,263,474,415,640,000
inverse DAG, where parents becomes children, etc.
LocalMercurial/mercurial/dagutil.py
inverse
l2dy/machg
python
def inverse(self): raise NotImplementedError()
def ancestorset(self, starts, stops=None): '\n set of all ancestors of starts (incl), but stop walk at stops (excl)\n ' raise NotImplementedError()
5,984,893,086,663,339,000
set of all ancestors of starts (incl), but stop walk at stops (excl)
LocalMercurial/mercurial/dagutil.py
ancestorset
l2dy/machg
python
def ancestorset(self, starts, stops=None): '\n \n ' raise NotImplementedError()
def descendantset(self, starts, stops=None): '\n set of all descendants of starts (incl), but stop walk at stops (excl)\n ' return self.inverse().ancestorset(starts, stops)
8,106,918,935,212,782,000
set of all descendants of starts (incl), but stop walk at stops (excl)
LocalMercurial/mercurial/dagutil.py
descendantset
l2dy/machg
python
def descendantset(self, starts, stops=None): '\n \n ' return self.inverse().ancestorset(starts, stops)
def headsetofconnecteds(self, ixs): '\n subset of connected list of ixs so that no node has a descendant in it\n\n By "connected list" we mean that if an ancestor and a descendant are in\n the list, then so is at least one path connecting them.\n ' raise NotImplementedError()
3,914,432,140,549,609,500
subset of connected list of ixs so that no node has a descendant in it By "connected list" we mean that if an ancestor and a descendant are in the list, then so is at least one path connecting them.
LocalMercurial/mercurial/dagutil.py
headsetofconnecteds
l2dy/machg
python
def headsetofconnecteds(self, ixs): '\n subset of connected list of ixs so that no node has a descendant in it\n\n By "connected list" we mean that if an ancestor and a descendant are in\n the list, then so is at least one path connecting them.\n ' raise NotImplementedError()
def externalize(self, ix): 'return a list of (or set if given a set) of node ids' return self._externalize(ix)
-5,374,513,761,426,537,000
return a list of (or set if given a set) of node ids
LocalMercurial/mercurial/dagutil.py
externalize
l2dy/machg
python
def externalize(self, ix): return self._externalize(ix)
def externalizeall(self, ixs): 'return a list of (or set if given a set) of node ids' ids = self._externalizeall(ixs) if isinstance(ixs, set): return set(ids) return list(ids)
-807,789,611,213,240,000
return a list of (or set if given a set) of node ids
LocalMercurial/mercurial/dagutil.py
externalizeall
l2dy/machg
python
def externalizeall(self, ixs): ids = self._externalizeall(ixs) if isinstance(ixs, set): return set(ids) return list(ids)
def internalize(self, id): 'return a list of (or set if given a set) of node ixs' return self._internalize(id)
2,039,032,217,749,656,000
return a list of (or set if given a set) of node ixs
LocalMercurial/mercurial/dagutil.py
internalize
l2dy/machg
python
def internalize(self, id): return self._internalize(id)
def internalizeall(self, ids, filterunknown=False): 'return a list of (or set if given a set) of node ids' ixs = self._internalizeall(ids, filterunknown) if isinstance(ids, set): return set(ixs) return list(ixs)
-8,972,105,589,571,481,000
return a list of (or set if given a set) of node ids
LocalMercurial/mercurial/dagutil.py
internalizeall
l2dy/machg
python
def internalizeall(self, ids, filterunknown=False): ixs = self._internalizeall(ids, filterunknown) if isinstance(ids, set): return set(ixs) return list(ixs)
def linearize(self, ixs): 'linearize and topologically sort a list of revisions\n\n The linearization process tries to create long runs of revs where\n a child rev comes immediately after its first parent. This is done by\n visiting the heads of the given revs in inverse topological order,\n ...
-5,283,142,161,144,543,000
linearize and topologically sort a list of revisions The linearization process tries to create long runs of revs where a child rev comes immediately after its first parent. This is done by visiting the heads of the given revs in inverse topological order, and for each visited rev, visiting its second parent, then its ...
LocalMercurial/mercurial/dagutil.py
linearize
l2dy/machg
python
def linearize(self, ixs): 'linearize and topologically sort a list of revisions\n\n The linearization process tries to create long runs of revs where\n a child rev comes immediately after its first parent. This is done by\n visiting the heads of the given revs in inverse topological order,\n ...
def test_login_required_to_view_ingredients(self): 'Test that authentication is needed to view the ingredients.' res = self.client.get(INGREDIENTS_URL) self.assertEqual(res.status_code, status.HTTP_401_UNAUTHORIZED)
1,475,239,166,932,663,800
Test that authentication is needed to view the ingredients.
app/recipe_app/tests/test_ingredients_api.py
test_login_required_to_view_ingredients
oyekanmiayo/recipe-app-api
python
def test_login_required_to_view_ingredients(self): res = self.client.get(INGREDIENTS_URL) self.assertEqual(res.status_code, status.HTTP_401_UNAUTHORIZED)
def test_retrieve_ingredients_is_successful(self): 'Test retrieve ingredients' Ingredient.objects.create(user=self.user, name='Carrot') Ingredient.objects.create(user=self.user, name='Lemon') res = self.client.get(INGREDIENTS_URL) ingredients = Ingredient.objects.all().order_by('-name') serializ...
6,252,634,421,779,660,000
Test retrieve ingredients
app/recipe_app/tests/test_ingredients_api.py
test_retrieve_ingredients_is_successful
oyekanmiayo/recipe-app-api
python
def test_retrieve_ingredients_is_successful(self): Ingredient.objects.create(user=self.user, name='Carrot') Ingredient.objects.create(user=self.user, name='Lemon') res = self.client.get(INGREDIENTS_URL) ingredients = Ingredient.objects.all().order_by('-name') serializer = IngredientSerializer(i...
def test_retrieved_ingredients_limited_to_user(self): "Tests that only the user's ingredients are retrieved" user2 = create_user(fname='Test2', lname='User2', email='example@example.com', password='test2pass') Ingredient.objects.create(user=user2, name='Carrot') ingredient = Ingredient.objects.create(us...
6,069,663,110,617,207,000
Tests that only the user's ingredients are retrieved
app/recipe_app/tests/test_ingredients_api.py
test_retrieved_ingredients_limited_to_user
oyekanmiayo/recipe-app-api
python
def test_retrieved_ingredients_limited_to_user(self): user2 = create_user(fname='Test2', lname='User2', email='example@example.com', password='test2pass') Ingredient.objects.create(user=user2, name='Carrot') ingredient = Ingredient.objects.create(user=self.user, name='Lemon') res = self.client.get(...
def test_create_ingredient_is_successful(self): 'Test that creating a new ingredient is successful.' payload = {'name': 'Lemon'} self.client.post(INGREDIENTS_URL, payload) exists = Ingredient.objects.filter(user=self.user, name=payload['name']).exists() self.assertTrue(exists)
-6,702,414,564,749,636,000
Test that creating a new ingredient is successful.
app/recipe_app/tests/test_ingredients_api.py
test_create_ingredient_is_successful
oyekanmiayo/recipe-app-api
python
def test_create_ingredient_is_successful(self): payload = {'name': 'Lemon'} self.client.post(INGREDIENTS_URL, payload) exists = Ingredient.objects.filter(user=self.user, name=payload['name']).exists() self.assertTrue(exists)
def test_create_ingredient_with_invalid_details_invalid(self): 'Test that ingredients is not created with invalid details' payload = {'name': ''} res = self.client.post(INGREDIENTS_URL, payload) self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST)
-1,150,530,564,363,053,600
Test that ingredients is not created with invalid details
app/recipe_app/tests/test_ingredients_api.py
test_create_ingredient_with_invalid_details_invalid
oyekanmiayo/recipe-app-api
python
def test_create_ingredient_with_invalid_details_invalid(self): payload = {'name': } res = self.client.post(INGREDIENTS_URL, payload) self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST)
@property def priority(self): 'Priority.' try: return self._priority except Exception as e: raise e
4,155,562,068,715,867,000
Priority.
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
priority
HanseMerkur/nitro-python
python
@property def priority(self): try: return self._priority except Exception as e: raise e
@priority.setter def priority(self, priority): 'Priority.\n\n :param priority: \n\n ' try: self._priority = priority except Exception as e: raise e
4,503,601,667,460,624,400
Priority. :param priority:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
priority
HanseMerkur/nitro-python
python
@priority.setter def priority(self, priority): 'Priority.\n\n :param priority: \n\n ' try: self._priority = priority except Exception as e: raise e
@property def gotopriorityexpression(self): 'Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.' try: return self._gotopriorityexpression except Exception as e: raise e
8,059,722,376,498,583,000
Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
gotopriorityexpression
HanseMerkur/nitro-python
python
@property def gotopriorityexpression(self): try: return self._gotopriorityexpression except Exception as e: raise e
@gotopriorityexpression.setter def gotopriorityexpression(self, gotopriorityexpression): 'Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.\n\n :param gotopriorityexpression: \n\n ' try: self._gotopriorityexpression...
-6,898,664,913,910,547,000
Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE. :param gotopriorityexpression:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
gotopriorityexpression
HanseMerkur/nitro-python
python
@gotopriorityexpression.setter def gotopriorityexpression(self, gotopriorityexpression): 'Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.\n\n :param gotopriorityexpression: \n\n ' try: self._gotopriorityexpression...
@property def policyname(self): 'Name of the policy bound to the LB vserver.' try: return self._policyname except Exception as e: raise e
-5,365,522,352,492,252,000
Name of the policy bound to the LB vserver.
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
policyname
HanseMerkur/nitro-python
python
@property def policyname(self): try: return self._policyname except Exception as e: raise e
@policyname.setter def policyname(self, policyname): 'Name of the policy bound to the LB vserver.\n\n :param policyname: \n\n ' try: self._policyname = policyname except Exception as e: raise e
-1,122,037,315,034,263,200
Name of the policy bound to the LB vserver. :param policyname:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
policyname
HanseMerkur/nitro-python
python
@policyname.setter def policyname(self, policyname): 'Name of the policy bound to the LB vserver.\n\n :param policyname: \n\n ' try: self._policyname = policyname except Exception as e: raise e
@property def name(self): 'Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed after the virtual server is ...
6,946,818,036,726,950,000
Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed after the virtual server is created. CLI Users: If the name...
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
name
HanseMerkur/nitro-python
python
@property def name(self): 'Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed after the virtual server is ...
@name.setter def name(self, name): 'Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed after the virtual s...
4,977,305,799,432,753,000
Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed after the virtual server is created. CLI Users: If the name...
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
name
HanseMerkur/nitro-python
python
@name.setter def name(self, name): 'Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed after the virtual s...
@property def bindpoint(self): 'The bindpoint to which the policy is bound.<br/>Possible values = REQUEST, RESPONSE.' try: return self._bindpoint except Exception as e: raise e
-4,716,883,532,547,503,000
The bindpoint to which the policy is bound.<br/>Possible values = REQUEST, RESPONSE.
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
bindpoint
HanseMerkur/nitro-python
python
@property def bindpoint(self): try: return self._bindpoint except Exception as e: raise e
@bindpoint.setter def bindpoint(self, bindpoint): 'The bindpoint to which the policy is bound.<br/>Possible values = REQUEST, RESPONSE\n\n :param bindpoint: \n\n ' try: self._bindpoint = bindpoint except Exception as e: raise e
-1,073,388,628,172,473,000
The bindpoint to which the policy is bound.<br/>Possible values = REQUEST, RESPONSE :param bindpoint:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
bindpoint
HanseMerkur/nitro-python
python
@bindpoint.setter def bindpoint(self, bindpoint): 'The bindpoint to which the policy is bound.<br/>Possible values = REQUEST, RESPONSE\n\n :param bindpoint: \n\n ' try: self._bindpoint = bindpoint except Exception as e: raise e
@property def labeltype(self): 'The invocation type.<br/>Possible values = reqvserver, resvserver, policylabel.' try: return self._labeltype except Exception as e: raise e
3,900,809,274,961,790,000
The invocation type.<br/>Possible values = reqvserver, resvserver, policylabel.
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
labeltype
HanseMerkur/nitro-python
python
@property def labeltype(self): try: return self._labeltype except Exception as e: raise e
@labeltype.setter def labeltype(self, labeltype): 'The invocation type.<br/>Possible values = reqvserver, resvserver, policylabel\n\n :param labeltype: \n\n ' try: self._labeltype = labeltype except Exception as e: raise e
4,802,778,948,420,752,000
The invocation type.<br/>Possible values = reqvserver, resvserver, policylabel :param labeltype:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
labeltype
HanseMerkur/nitro-python
python
@labeltype.setter def labeltype(self, labeltype): 'The invocation type.<br/>Possible values = reqvserver, resvserver, policylabel\n\n :param labeltype: \n\n ' try: self._labeltype = labeltype except Exception as e: raise e
@property def labelname(self): 'Name of the label invoked.' try: return self._labelname except Exception as e: raise e
-1,357,503,408,469,624,600
Name of the label invoked.
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
labelname
HanseMerkur/nitro-python
python
@property def labelname(self): try: return self._labelname except Exception as e: raise e
@labelname.setter def labelname(self, labelname): 'Name of the label invoked.\n\n :param labelname: \n\n ' try: self._labelname = labelname except Exception as e: raise e
8,556,602,361,713,529,000
Name of the label invoked. :param labelname:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
labelname
HanseMerkur/nitro-python
python
@labelname.setter def labelname(self, labelname): 'Name of the label invoked.\n\n :param labelname: \n\n ' try: self._labelname = labelname except Exception as e: raise e
@property def invoke(self): 'Invoke policies bound to a virtual server or policy label.' try: return self._invoke except Exception as e: raise e
-2,666,846,950,919,318,000
Invoke policies bound to a virtual server or policy label.
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
invoke
HanseMerkur/nitro-python
python
@property def invoke(self): try: return self._invoke except Exception as e: raise e
@invoke.setter def invoke(self, invoke): 'Invoke policies bound to a virtual server or policy label.\n\n :param invoke: \n\n ' try: self._invoke = invoke except Exception as e: raise e
1,051,209,353,183,409,900
Invoke policies bound to a virtual server or policy label. :param invoke:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
invoke
HanseMerkur/nitro-python
python
@invoke.setter def invoke(self, invoke): 'Invoke policies bound to a virtual server or policy label.\n\n :param invoke: \n\n ' try: self._invoke = invoke except Exception as e: raise e
@property def sc(self): 'Use SureConnect on the virtual server.<br/>Default value: OFF<br/>Possible values = ON, OFF.' try: return self._sc except Exception as e: raise e
-6,716,229,637,475,839,000
Use SureConnect on the virtual server.<br/>Default value: OFF<br/>Possible values = ON, OFF.
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
sc
HanseMerkur/nitro-python
python
@property def sc(self): try: return self._sc except Exception as e: raise e
def _get_nitro_response(self, service, response): 'converts nitro response into object and returns the object array in case of get request.\n\n :param service: \n :param response: \n\n ' try: result = service.payload_formatter.string_to_resource(lbvserver_appfwpolicy_binding_respons...
-8,598,073,818,403,330,000
converts nitro response into object and returns the object array in case of get request. :param service: :param response:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
_get_nitro_response
HanseMerkur/nitro-python
python
def _get_nitro_response(self, service, response): 'converts nitro response into object and returns the object array in case of get request.\n\n :param service: \n :param response: \n\n ' try: result = service.payload_formatter.string_to_resource(lbvserver_appfwpolicy_binding_respons...
def _get_object_name(self): 'Returns the value of object identifier argument' try: if (self.name is not None): return str(self.name) return None except Exception as e: raise e
2,555,744,638,475,687,000
Returns the value of object identifier argument
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
_get_object_name
HanseMerkur/nitro-python
python
def _get_object_name(self): try: if (self.name is not None): return str(self.name) return None except Exception as e: raise e
@classmethod def add(cls, client, resource): '\n\n :param client: \n :param resource: \n\n ' try: if (resource and (type(resource) is not list)): updateresource = lbvserver_appfwpolicy_binding() updateresource.name = resource.name updateresource.p...
-1,235,520,822,178,636,500
:param client: :param resource:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
add
HanseMerkur/nitro-python
python
@classmethod def add(cls, client, resource): '\n\n :param client: \n :param resource: \n\n ' try: if (resource and (type(resource) is not list)): updateresource = lbvserver_appfwpolicy_binding() updateresource.name = resource.name updateresource.p...
@classmethod def delete(cls, client, resource): '\n\n :param client: \n :param resource: \n\n ' try: if (resource and (type(resource) is not list)): deleteresource = lbvserver_appfwpolicy_binding() deleteresource.name = resource.name deleteresourc...
5,475,910,030,271,163,000
:param client: :param resource:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
delete
HanseMerkur/nitro-python
python
@classmethod def delete(cls, client, resource): '\n\n :param client: \n :param resource: \n\n ' try: if (resource and (type(resource) is not list)): deleteresource = lbvserver_appfwpolicy_binding() deleteresource.name = resource.name deleteresourc...
@classmethod def get(cls, service, name): 'Use this API to fetch lbvserver_appfwpolicy_binding resources.\n\n :param service: \n :param name: \n\n ' try: obj = lbvserver_appfwpolicy_binding() obj.name = name response = obj.get_resources(service) return respon...
3,176,071,130,034,916,400
Use this API to fetch lbvserver_appfwpolicy_binding resources. :param service: :param name:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
get
HanseMerkur/nitro-python
python
@classmethod def get(cls, service, name): 'Use this API to fetch lbvserver_appfwpolicy_binding resources.\n\n :param service: \n :param name: \n\n ' try: obj = lbvserver_appfwpolicy_binding() obj.name = name response = obj.get_resources(service) return respon...
@classmethod def get_filtered(cls, service, name, filter_): 'Use this API to fetch filtered set of lbvserver_appfwpolicy_binding resources.\n Filter string should be in JSON format.eg: "port:80,servicetype:HTTP".\n\n :param service: \n :param name: \n :param filter_: \n\n ' tr...
-2,542,339,016,633,254,000
Use this API to fetch filtered set of lbvserver_appfwpolicy_binding resources. Filter string should be in JSON format.eg: "port:80,servicetype:HTTP". :param service: :param name: :param filter_:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
get_filtered
HanseMerkur/nitro-python
python
@classmethod def get_filtered(cls, service, name, filter_): 'Use this API to fetch filtered set of lbvserver_appfwpolicy_binding resources.\n Filter string should be in JSON format.eg: "port:80,servicetype:HTTP".\n\n :param service: \n :param name: \n :param filter_: \n\n ' tr...
@classmethod def count(cls, service, name): 'Use this API to count lbvserver_appfwpolicy_binding resources configued on NetScaler.\n\n :param service: \n :param name: \n\n ' try: obj = lbvserver_appfwpolicy_binding() obj.name = name option_ = options() option...
7,837,158,330,813,566,000
Use this API to count lbvserver_appfwpolicy_binding resources configued on NetScaler. :param service: :param name:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
count
HanseMerkur/nitro-python
python
@classmethod def count(cls, service, name): 'Use this API to count lbvserver_appfwpolicy_binding resources configued on NetScaler.\n\n :param service: \n :param name: \n\n ' try: obj = lbvserver_appfwpolicy_binding() obj.name = name option_ = options() option...
@classmethod def count_filtered(cls, service, name, filter_): 'Use this API to count the filtered set of lbvserver_appfwpolicy_binding resources.\n Filter string should be in JSON format.eg: "port:80,servicetype:HTTP".\n\n :param service: \n :param name: \n :param filter_: \n\n ' ...
7,667,054,189,601,754,000
Use this API to count the filtered set of lbvserver_appfwpolicy_binding resources. Filter string should be in JSON format.eg: "port:80,servicetype:HTTP". :param service: :param name: :param filter_:
nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py
count_filtered
HanseMerkur/nitro-python
python
@classmethod def count_filtered(cls, service, name, filter_): 'Use this API to count the filtered set of lbvserver_appfwpolicy_binding resources.\n Filter string should be in JSON format.eg: "port:80,servicetype:HTTP".\n\n :param service: \n :param name: \n :param filter_: \n\n ' ...
async def ping(self, ctx): '\n Args:\n ctx: FContext\n ' pass
2,692,111,709,897,499,000
Args: ctx: FContext
test/expected/python.asyncio/service_extension_same_file/f_Pinger.py
ping
trevorackerman-wk/frugal
python
async def ping(self, ctx): '\n Args:\n ctx: FContext\n ' pass
def __init__(self, provider, middleware=None): '\n Create a new Client with an FServiceProvider containing a transport\n and protocol factory.\n\n Args:\n provider: FServiceProvider\n middleware: ServiceMiddleware or list of ServiceMiddleware\n ' middleware = (m...
6,234,326,604,996,853,000
Create a new Client with an FServiceProvider containing a transport and protocol factory. Args: provider: FServiceProvider middleware: ServiceMiddleware or list of ServiceMiddleware
test/expected/python.asyncio/service_extension_same_file/f_Pinger.py
__init__
trevorackerman-wk/frugal
python
def __init__(self, provider, middleware=None): '\n Create a new Client with an FServiceProvider containing a transport\n and protocol factory.\n\n Args:\n provider: FServiceProvider\n middleware: ServiceMiddleware or list of ServiceMiddleware\n ' middleware = (m...
async def ping(self, ctx): '\n Args:\n ctx: FContext\n ' return (await self._methods['ping']([ctx]))
-7,926,762,067,287,352,000
Args: ctx: FContext
test/expected/python.asyncio/service_extension_same_file/f_Pinger.py
ping
trevorackerman-wk/frugal
python
async def ping(self, ctx): '\n Args:\n ctx: FContext\n ' return (await self._methods['ping']([ctx]))
def __init__(self, handler, middleware=None): '\n Create a new Processor.\n\n Args:\n handler: Iface\n ' if (middleware and (not isinstance(middleware, list))): middleware = [middleware] super(Processor, self).__init__(handler, middleware=middleware) self.add_to_p...
-6,148,350,140,761,615,000
Create a new Processor. Args: handler: Iface
test/expected/python.asyncio/service_extension_same_file/f_Pinger.py
__init__
trevorackerman-wk/frugal
python
def __init__(self, handler, middleware=None): '\n Create a new Processor.\n\n Args:\n handler: Iface\n ' if (middleware and (not isinstance(middleware, list))): middleware = [middleware] super(Processor, self).__init__(handler, middleware=middleware) self.add_to_p...
def final_eos_is_already_included(header_block: Union[(UnfinishedHeaderBlock, UnfinishedBlock, HeaderBlock, FullBlock)], blocks: BlockchainInterface, sub_slot_iters: uint64) -> bool: '\n Args:\n header_block: An overflow block, with potentially missing information about the new sub slot\n blocks: a...
1,981,469,205,373,613,600
Args: header_block: An overflow block, with potentially missing information about the new sub slot blocks: all blocks that have been included before header_block sub_slot_iters: sub_slot_iters at the header_block Returns: True iff the missing sub slot was already included in a previous block. Returns False...
cactus/consensus/get_block_challenge.py
final_eos_is_already_included
Cactus-Network/cactus-blockchain
python
def final_eos_is_already_included(header_block: Union[(UnfinishedHeaderBlock, UnfinishedBlock, HeaderBlock, FullBlock)], blocks: BlockchainInterface, sub_slot_iters: uint64) -> bool: '\n Args:\n header_block: An overflow block, with potentially missing information about the new sub slot\n blocks: a...
@property def color(self): "\n The 'color' property is a color and may be specified as:\n - A hex string (e.g. '#ff0000')\n - An rgb/rgba string (e.g. 'rgb(255,0,0)')\n - An hsl/hsla string (e.g. 'hsl(0,100%,50%)')\n - An hsv/hsva string (e.g. 'hsv(0,100%,100%)')\n ...
-6,704,044,870,786,772,000
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, ...
packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py
color
1abner1/plotly.py
python
@property def color(self): "\n The 'color' property is a color and may be specified as:\n - A hex string (e.g. '#ff0000')\n - An rgb/rgba string (e.g. 'rgb(255,0,0)')\n - An hsl/hsla string (e.g. 'hsl(0,100%,50%)')\n - An hsv/hsva string (e.g. 'hsv(0,100%,100%)')\n ...
@property def family(self): '\n HTML font family - the typeface that will be applied by the web\n browser. The web browser will only be able to apply a font if\n it is available on the system which it operates. Provide\n multiple font families, separated by commas, to indicate the\n ...
3,791,649,582,837,001,000
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. T...
packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py
family
1abner1/plotly.py
python
@property def family(self): '\n HTML font family - the typeface that will be applied by the web\n browser. The web browser will only be able to apply a font if\n it is available on the system which it operates. Provide\n multiple font families, separated by commas, to indicate the\n ...
@property def size(self): "\n The 'size' property is a number and may be specified as:\n - An int or float in the interval [1, inf]\n\n Returns\n -------\n int|float\n " return self['size']
4,214,108,177,685,330,000
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float
packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py
size
1abner1/plotly.py
python
@property def size(self): "\n The 'size' property is a number and may be specified as:\n - An int or float in the interval [1, inf]\n\n Returns\n -------\n int|float\n " return self['size']
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): '\n Construct a new Tickfont object\n \n Sets the color bar\'s tick label font\n\n Parameters\n ----------\n arg\n dict of properties compatible with this constructor or\n an i...
7,054,196,890,296,316,000
Construct a new Tickfont object Sets the color bar's tick label font Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatterternary .marker.colorbar.Tickfont` color family HTML font family - the typeface that will be applied by...
packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py
__init__
1abner1/plotly.py
python
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): '\n Construct a new Tickfont object\n \n Sets the color bar\'s tick label font\n\n Parameters\n ----------\n arg\n dict of properties compatible with this constructor or\n an i...
def print_localconfvalue(name): 'Syntax: [storm localconfvalue conf-name]\n\n Prints out the value for conf-name in the local Storm configs.\n The local Storm configs are the ones in ~/.storm/storm.yaml merged\n in with the configs in defaults.yaml.\n ' print(((name + ': ') + confvalue(name, [USER_C...
4,783,880,202,942,562,000
Syntax: [storm localconfvalue conf-name] Prints out the value for conf-name in the local Storm configs. The local Storm configs are the ones in ~/.storm/storm.yaml merged in with the configs in defaults.yaml.
bin/storm.py
print_localconfvalue
JamiesZhang/Storm
python
def print_localconfvalue(name): 'Syntax: [storm localconfvalue conf-name]\n\n Prints out the value for conf-name in the local Storm configs.\n The local Storm configs are the ones in ~/.storm/storm.yaml merged\n in with the configs in defaults.yaml.\n ' print(((name + ': ') + confvalue(name, [USER_C...
def print_remoteconfvalue(name): "Syntax: [storm remoteconfvalue conf-name]\n\n Prints out the value for conf-name in the cluster's Storm configs.\n The cluster's Storm configs are the ones in $STORM-PATH/conf/storm.yaml\n merged in with the configs in defaults.yaml.\n\n This command must be run on a cl...
5,267,290,543,717,283,000
Syntax: [storm remoteconfvalue conf-name] Prints out the value for conf-name in the cluster's Storm configs. The cluster's Storm configs are the ones in $STORM-PATH/conf/storm.yaml merged in with the configs in defaults.yaml. This command must be run on a cluster machine.
bin/storm.py
print_remoteconfvalue
JamiesZhang/Storm
python
def print_remoteconfvalue(name): "Syntax: [storm remoteconfvalue conf-name]\n\n Prints out the value for conf-name in the cluster's Storm configs.\n The cluster's Storm configs are the ones in $STORM-PATH/conf/storm.yaml\n merged in with the configs in defaults.yaml.\n\n This command must be run on a cl...
def parse_args(string): 'Takes a string of whitespace-separated tokens and parses it into a list.\n Whitespace inside tokens may be quoted with single quotes, double quotes or\n backslash (similar to command-line arguments in bash).\n\n >>> parse_args(r\'\'\'"a a" \'b b\' c\\ c "d\'d" \'e"e\' \'f\'f\' "g"g...
-1,373,043,317,218,771,500
Takes a string of whitespace-separated tokens and parses it into a list. Whitespace inside tokens may be quoted with single quotes, double quotes or backslash (similar to command-line arguments in bash). >>> parse_args(r'''"a a" 'b b' c\ c "d'd" 'e"e' 'f'f' "g"g" "i""i" 'j''j' k" "k l' l' mm n\n''') ['...
bin/storm.py
parse_args
JamiesZhang/Storm
python
def parse_args(string): 'Takes a string of whitespace-separated tokens and parses it into a list.\n Whitespace inside tokens may be quoted with single quotes, double quotes or\n backslash (similar to command-line arguments in bash).\n\n >>> parse_args(r\'\'\'"a a" \'b b\' c\\ c "d\'d" \'e"e\' \'f\'f\' "g"g...
def local(jarfile, klass, *args): 'Syntax: [storm local topology-jar-path class ...]\n\n Runs the main method of class with the specified arguments but pointing to a local cluster\n The storm jars and configs in ~/.storm are put on the classpath.\n The process is configured so that StormSubmitter\n (htt...
-86,530,798,587,278,830
Syntax: [storm local topology-jar-path class ...] Runs the main method of class with the specified arguments but pointing to a local cluster The storm jars and configs in ~/.storm are put on the classpath. The process is configured so that StormSubmitter (http://storm.apache.org/releases/current/javadocs/org/apache/st...
bin/storm.py
local
JamiesZhang/Storm
python
def local(jarfile, klass, *args): 'Syntax: [storm local topology-jar-path class ...]\n\n Runs the main method of class with the specified arguments but pointing to a local cluster\n The storm jars and configs in ~/.storm are put on the classpath.\n The process is configured so that StormSubmitter\n (htt...
def jar(jarfile, klass, *args): 'Syntax: [storm jar topology-jar-path class ...]\n\n Runs the main method of class with the specified arguments.\n The storm worker dependencies and configs in ~/.storm are put on the classpath.\n The process is configured so that StormSubmitter\n (http://storm.apache.org...
-5,195,932,568,094,356,000
Syntax: [storm jar topology-jar-path class ...] Runs the main method of class with the specified arguments. The storm worker dependencies and configs in ~/.storm are put on the classpath. The process is configured so that StormSubmitter (http://storm.apache.org/releases/current/javadocs/org/apache/storm/StormSubmitter...
bin/storm.py
jar
JamiesZhang/Storm
python
def jar(jarfile, klass, *args): 'Syntax: [storm jar topology-jar-path class ...]\n\n Runs the main method of class with the specified arguments.\n The storm worker dependencies and configs in ~/.storm are put on the classpath.\n The process is configured so that StormSubmitter\n (http://storm.apache.org...
def sql(sql_file, topology_name): 'Syntax: [storm sql sql-file topology-name], or [storm sql sql-file --explain] when activating explain mode\n\n Compiles the SQL statements into a Trident topology and submits it to Storm.\n If user activates explain mode, SQL Runner analyzes each query statement and shows qu...
4,051,998,150,311,554,000
Syntax: [storm sql sql-file topology-name], or [storm sql sql-file --explain] when activating explain mode Compiles the SQL statements into a Trident topology and submits it to Storm. If user activates explain mode, SQL Runner analyzes each query statement and shows query plan instead of submitting topology. --jars a...
bin/storm.py
sql
JamiesZhang/Storm
python
def sql(sql_file, topology_name): 'Syntax: [storm sql sql-file topology-name], or [storm sql sql-file --explain] when activating explain mode\n\n Compiles the SQL statements into a Trident topology and submits it to Storm.\n If user activates explain mode, SQL Runner analyzes each query statement and shows qu...
def kill(*args): "Syntax: [storm kill topology-name [-w wait-time-secs]]\n\n Kills the topology with the name topology-name. Storm will\n first deactivate the topology's spouts for the duration of\n the topology's message timeout to allow all messages currently\n being processed to finish processing. St...
7,946,931,335,110,760,000
Syntax: [storm kill topology-name [-w wait-time-secs]] Kills the topology with the name topology-name. Storm will first deactivate the topology's spouts for the duration of the topology's message timeout to allow all messages currently being processed to finish processing. Storm will then shutdown the workers and clea...
bin/storm.py
kill
JamiesZhang/Storm
python
def kill(*args): "Syntax: [storm kill topology-name [-w wait-time-secs]]\n\n Kills the topology with the name topology-name. Storm will\n first deactivate the topology's spouts for the duration of\n the topology's message timeout to allow all messages currently\n being processed to finish processing. St...
def upload_credentials(*args): 'Syntax: [storm upload-credentials topology-name [credkey credvalue]*]\n\n Uploads a new set of credentials to a running topology\n ' if (not args): print_usage(command='upload-credentials') sys.exit(2) exec_storm_class('org.apache.storm.command.UploadCre...
3,213,165,739,736,285,000
Syntax: [storm upload-credentials topology-name [credkey credvalue]*] Uploads a new set of credentials to a running topology
bin/storm.py
upload_credentials
JamiesZhang/Storm
python
def upload_credentials(*args): 'Syntax: [storm upload-credentials topology-name [credkey credvalue]*]\n\n Uploads a new set of credentials to a running topology\n ' if (not args): print_usage(command='upload-credentials') sys.exit(2) exec_storm_class('org.apache.storm.command.UploadCre...
def blobstore(*args): 'Syntax: [storm blobstore cmd]\n\n list [KEY...] - lists blobs currently in the blob store\n cat [-f FILE] KEY - read a blob and then either write it to a file, or STDOUT (requires read access).\n create [-f FILE] [-a ACL ...] [--replication-factor NUMBER] KEY - create a new blob. Con...
-7,622,729,085,902,317,000
Syntax: [storm blobstore cmd] list [KEY...] - lists blobs currently in the blob store cat [-f FILE] KEY - read a blob and then either write it to a file, or STDOUT (requires read access). create [-f FILE] [-a ACL ...] [--replication-factor NUMBER] KEY - create a new blob. Contents comes from a FILE or STDIN. ACL ...
bin/storm.py
blobstore
JamiesZhang/Storm
python
def blobstore(*args): 'Syntax: [storm blobstore cmd]\n\n list [KEY...] - lists blobs currently in the blob store\n cat [-f FILE] KEY - read a blob and then either write it to a file, or STDOUT (requires read access).\n create [-f FILE] [-a ACL ...] [--replication-factor NUMBER] KEY - create a new blob. Con...
def heartbeats(*args): 'Syntax: [storm heartbeats [cmd]]\n\n list PATH - lists heartbeats nodes under PATH currently in the ClusterState.\n get PATH - Get the heartbeat data at PATH\n ' exec_storm_class('org.apache.storm.command.Heartbeats', args=args, jvmtype='-client', extrajars=[USER_CONF_DIR, STOR...
5,319,599,684,336,833,000
Syntax: [storm heartbeats [cmd]] list PATH - lists heartbeats nodes under PATH currently in the ClusterState. get PATH - Get the heartbeat data at PATH
bin/storm.py
heartbeats
JamiesZhang/Storm
python
def heartbeats(*args): 'Syntax: [storm heartbeats [cmd]]\n\n list PATH - lists heartbeats nodes under PATH currently in the ClusterState.\n get PATH - Get the heartbeat data at PATH\n ' exec_storm_class('org.apache.storm.command.Heartbeats', args=args, jvmtype='-client', extrajars=[USER_CONF_DIR, STOR...
def activate(*args): "Syntax: [storm activate topology-name]\n\n Activates the specified topology's spouts.\n " if (not args): print_usage(command='activate') sys.exit(2) exec_storm_class('org.apache.storm.command.Activate', args=args, jvmtype='-client', extrajars=[USER_CONF_DIR, STORM...
-5,705,921,422,986,034,000
Syntax: [storm activate topology-name] Activates the specified topology's spouts.
bin/storm.py
activate
JamiesZhang/Storm
python
def activate(*args): "Syntax: [storm activate topology-name]\n\n Activates the specified topology's spouts.\n " if (not args): print_usage(command='activate') sys.exit(2) exec_storm_class('org.apache.storm.command.Activate', args=args, jvmtype='-client', extrajars=[USER_CONF_DIR, STORM...
def set_log_level(*args): "\n Dynamically change topology log levels\n\n Syntax: [storm set_log_level -l [logger name]=[log level][:optional timeout] -r [logger name] topology-name]\n where log level is one of:\n ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF\n and timeout is integer seconds.\n...
1,301,626,724,388,236,500
Dynamically change topology log levels Syntax: [storm set_log_level -l [logger name]=[log level][:optional timeout] -r [logger name] topology-name] where log level is one of: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF and timeout is integer seconds. e.g. ./bin/storm set_log_level -l ROOT=DEBUG:30 topolo...
bin/storm.py
set_log_level
JamiesZhang/Storm
python
def set_log_level(*args): "\n Dynamically change topology log levels\n\n Syntax: [storm set_log_level -l [logger name]=[log level][:optional timeout] -r [logger name] topology-name]\n where log level is one of:\n ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF\n and timeout is integer seconds.\n...
def listtopos(*args): 'Syntax: [storm list]\n\n List the running topologies and their statuses.\n ' exec_storm_class('org.apache.storm.command.ListTopologies', args=args, jvmtype='-client', extrajars=[USER_CONF_DIR, STORM_BIN_DIR])
715,366,473,802,686,500
Syntax: [storm list] List the running topologies and their statuses.
bin/storm.py
listtopos
JamiesZhang/Storm
python
def listtopos(*args): 'Syntax: [storm list]\n\n List the running topologies and their statuses.\n ' exec_storm_class('org.apache.storm.command.ListTopologies', args=args, jvmtype='-client', extrajars=[USER_CONF_DIR, STORM_BIN_DIR])
def deactivate(*args): "Syntax: [storm deactivate topology-name]\n\n Deactivates the specified topology's spouts.\n " if (not args): print_usage(command='deactivate') sys.exit(2) exec_storm_class('org.apache.storm.command.Deactivate', args=args, jvmtype='-client', extrajars=[USER_CONF_...
7,762,466,626,678,783,000
Syntax: [storm deactivate topology-name] Deactivates the specified topology's spouts.
bin/storm.py
deactivate
JamiesZhang/Storm
python
def deactivate(*args): "Syntax: [storm deactivate topology-name]\n\n Deactivates the specified topology's spouts.\n " if (not args): print_usage(command='deactivate') sys.exit(2) exec_storm_class('org.apache.storm.command.Deactivate', args=args, jvmtype='-client', extrajars=[USER_CONF_...
def rebalance(*args): 'Syntax: [storm rebalance topology-name [-w wait-time-secs] [-n new-num-workers] [-e component=parallelism]* [-r \'{"component1": {"resource1": new_amount, "resource2": new_amount, ... }*}\'] [-t \'{"conf1": newValue, *}\']]\n\n Sometimes you may wish to spread out the workers for a runnin...
-8,924,590,559,328,843,000
Syntax: [storm rebalance topology-name [-w wait-time-secs] [-n new-num-workers] [-e component=parallelism]* [-r '{"component1": {"resource1": new_amount, "resource2": new_amount, ... }*}'] [-t '{"conf1": newValue, *}']] Sometimes you may wish to spread out the workers for a running topology. For example, let's say yo...
bin/storm.py
rebalance
JamiesZhang/Storm
python
def rebalance(*args): 'Syntax: [storm rebalance topology-name [-w wait-time-secs] [-n new-num-workers] [-e component=parallelism]* [-r \'{"component1": {"resource1": new_amount, "resource2": new_amount, ... }*}\'] [-t \'{"conf1": newValue, *}\']]\n\n Sometimes you may wish to spread out the workers for a runnin...
def get_errors(*args): 'Syntax: [storm get-errors topology-name]\n\n Get the latest error from the running topology. The returned result contains\n the key value pairs for component-name and component-error for the components in error.\n The result is returned in json format.\n ' if (not args): ...
-7,079,342,827,459,128,000
Syntax: [storm get-errors topology-name] Get the latest error from the running topology. The returned result contains the key value pairs for component-name and component-error for the components in error. The result is returned in json format.
bin/storm.py
get_errors
JamiesZhang/Storm
python
def get_errors(*args): 'Syntax: [storm get-errors topology-name]\n\n Get the latest error from the running topology. The returned result contains\n the key value pairs for component-name and component-error for the components in error.\n The result is returned in json format.\n ' if (not args): ...
def healthcheck(*args): 'Syntax: [storm node-health-check]\n\n Run health checks on the local supervisor.\n ' exec_storm_class('org.apache.storm.command.HealthCheck', args=args, jvmtype='-client', extrajars=[USER_CONF_DIR, os.path.join(STORM_DIR, 'bin')])
-5,369,723,348,416,531,000
Syntax: [storm node-health-check] Run health checks on the local supervisor.
bin/storm.py
healthcheck
JamiesZhang/Storm
python
def healthcheck(*args): 'Syntax: [storm node-health-check]\n\n Run health checks on the local supervisor.\n ' exec_storm_class('org.apache.storm.command.HealthCheck', args=args, jvmtype='-client', extrajars=[USER_CONF_DIR, os.path.join(STORM_DIR, 'bin')])