body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
571b59323833c280e77b16239e63bdcdded2b8237b795111a87ad8a655b28909
def log_step(func=None, *, time_taken=True, shape=True, shape_delta=False, names=False, dtypes=False, print_fn=print, display_args=True): '\n Decorates a function that transforms a pandas dataframe to add automated logging statements\n\n :param func: callable, function to log, defaults to None\n :param time_taken: bool, log the time it took to run a function, defaults to True\n :param shape: bool, log the shape of the output result, defaults to True\n :param shape_delta: bool, log the difference in shape of input and output, defaults to False\n :param names: bool, log the names of the columns of the result, defaults to False\n :param dtypes: bool, log the dtypes of the results, defaults to False\n :param print_fn: callable, print function (e.g. print or logger.info), defaults to print\n :param print_args: bool, whether or not to print the arguments given to the function.\n :returns: the result of the function\n\n :Example:\n >>> @log_step\n ... def remove_outliers(df, min_obs=5):\n ... pass\n\n >>> @log_step(print_fn=logging.info, shape_delta=True)\n ... def remove_outliers(df, min_obs=5):\n ... pass\n\n ' if (func is None): return partial(log_step, time_taken=time_taken, shape=shape, shape_delta=shape_delta, names=names, dtypes=dtypes, print_fn=print_fn, display_args=display_args) names = (False if dtypes else names) @wraps(func) def wrapper(*args, **kwargs): if shape_delta: old_shape = args[0].shape tic = dt.datetime.now() result = func(*args, **kwargs) optional_strings = [(f'time={(dt.datetime.now() - tic)}' if time_taken else None), (f'n_obs={result.shape[0]}, n_col={result.shape[1]}' if shape else None), (_get_shape_delta(old_shape, result.shape) if shape_delta else None), (f'names={result.columns.to_list()}' if names else None), (f'dtypes={result.dtypes.to_dict()}' if dtypes else None)] combined = ' '.join([s for s in optional_strings if s]) if display_args: func_args = inspect.signature(func).bind(*args, **kwargs).arguments func_args_str = ''.join((', {} = {!r}'.format(*item) for item in list(func_args.items())[1:])) print_fn((f'[{func.__name__}(df{func_args_str})] ' + combined)) else: print_fn((f'[{func.__name__}]' + combined)) return result return wrapper
Decorates a function that transforms a pandas dataframe to add automated logging statements :param func: callable, function to log, defaults to None :param time_taken: bool, log the time it took to run a function, defaults to True :param shape: bool, log the shape of the output result, defaults to True :param shape_delta: bool, log the difference in shape of input and output, defaults to False :param names: bool, log the names of the columns of the result, defaults to False :param dtypes: bool, log the dtypes of the results, defaults to False :param print_fn: callable, print function (e.g. print or logger.info), defaults to print :param print_args: bool, whether or not to print the arguments given to the function. :returns: the result of the function :Example: >>> @log_step ... def remove_outliers(df, min_obs=5): ... pass >>> @log_step(print_fn=logging.info, shape_delta=True) ... def remove_outliers(df, min_obs=5): ... pass
sklego/pandas_utils.py
log_step
quendee/scikit-lego
784
python
def log_step(func=None, *, time_taken=True, shape=True, shape_delta=False, names=False, dtypes=False, print_fn=print, display_args=True): '\n Decorates a function that transforms a pandas dataframe to add automated logging statements\n\n :param func: callable, function to log, defaults to None\n :param time_taken: bool, log the time it took to run a function, defaults to True\n :param shape: bool, log the shape of the output result, defaults to True\n :param shape_delta: bool, log the difference in shape of input and output, defaults to False\n :param names: bool, log the names of the columns of the result, defaults to False\n :param dtypes: bool, log the dtypes of the results, defaults to False\n :param print_fn: callable, print function (e.g. print or logger.info), defaults to print\n :param print_args: bool, whether or not to print the arguments given to the function.\n :returns: the result of the function\n\n :Example:\n >>> @log_step\n ... def remove_outliers(df, min_obs=5):\n ... pass\n\n >>> @log_step(print_fn=logging.info, shape_delta=True)\n ... def remove_outliers(df, min_obs=5):\n ... pass\n\n ' if (func is None): return partial(log_step, time_taken=time_taken, shape=shape, shape_delta=shape_delta, names=names, dtypes=dtypes, print_fn=print_fn, display_args=display_args) names = (False if dtypes else names) @wraps(func) def wrapper(*args, **kwargs): if shape_delta: old_shape = args[0].shape tic = dt.datetime.now() result = func(*args, **kwargs) optional_strings = [(f'time={(dt.datetime.now() - tic)}' if time_taken else None), (f'n_obs={result.shape[0]}, n_col={result.shape[1]}' if shape else None), (_get_shape_delta(old_shape, result.shape) if shape_delta else None), (f'names={result.columns.to_list()}' if names else None), (f'dtypes={result.dtypes.to_dict()}' if dtypes else None)] combined = ' '.join([s for s in optional_strings if s]) if display_args: func_args = inspect.signature(func).bind(*args, **kwargs).arguments func_args_str = .join((', {} = {!r}'.format(*item) for item in list(func_args.items())[1:])) print_fn((f'[{func.__name__}(df{func_args_str})] ' + combined)) else: print_fn((f'[{func.__name__}]' + combined)) return result return wrapper
def log_step(func=None, *, time_taken=True, shape=True, shape_delta=False, names=False, dtypes=False, print_fn=print, display_args=True): '\n Decorates a function that transforms a pandas dataframe to add automated logging statements\n\n :param func: callable, function to log, defaults to None\n :param time_taken: bool, log the time it took to run a function, defaults to True\n :param shape: bool, log the shape of the output result, defaults to True\n :param shape_delta: bool, log the difference in shape of input and output, defaults to False\n :param names: bool, log the names of the columns of the result, defaults to False\n :param dtypes: bool, log the dtypes of the results, defaults to False\n :param print_fn: callable, print function (e.g. print or logger.info), defaults to print\n :param print_args: bool, whether or not to print the arguments given to the function.\n :returns: the result of the function\n\n :Example:\n >>> @log_step\n ... def remove_outliers(df, min_obs=5):\n ... pass\n\n >>> @log_step(print_fn=logging.info, shape_delta=True)\n ... def remove_outliers(df, min_obs=5):\n ... pass\n\n ' if (func is None): return partial(log_step, time_taken=time_taken, shape=shape, shape_delta=shape_delta, names=names, dtypes=dtypes, print_fn=print_fn, display_args=display_args) names = (False if dtypes else names) @wraps(func) def wrapper(*args, **kwargs): if shape_delta: old_shape = args[0].shape tic = dt.datetime.now() result = func(*args, **kwargs) optional_strings = [(f'time={(dt.datetime.now() - tic)}' if time_taken else None), (f'n_obs={result.shape[0]}, n_col={result.shape[1]}' if shape else None), (_get_shape_delta(old_shape, result.shape) if shape_delta else None), (f'names={result.columns.to_list()}' if names else None), (f'dtypes={result.dtypes.to_dict()}' if dtypes else None)] combined = ' '.join([s for s in optional_strings if s]) if display_args: func_args = inspect.signature(func).bind(*args, **kwargs).arguments func_args_str = .join((', {} = {!r}'.format(*item) for item in list(func_args.items())[1:])) print_fn((f'[{func.__name__}(df{func_args_str})] ' + combined)) else: print_fn((f'[{func.__name__}]' + combined)) return result return wrapper<|docstring|>Decorates a function that transforms a pandas dataframe to add automated logging statements :param func: callable, function to log, defaults to None :param time_taken: bool, log the time it took to run a function, defaults to True :param shape: bool, log the shape of the output result, defaults to True :param shape_delta: bool, log the difference in shape of input and output, defaults to False :param names: bool, log the names of the columns of the result, defaults to False :param dtypes: bool, log the dtypes of the results, defaults to False :param print_fn: callable, print function (e.g. print or logger.info), defaults to print :param print_args: bool, whether or not to print the arguments given to the function. :returns: the result of the function :Example: >>> @log_step ... def remove_outliers(df, min_obs=5): ... pass >>> @log_step(print_fn=logging.info, shape_delta=True) ... def remove_outliers(df, min_obs=5): ... pass<|endoftext|>
d132f35d1d6e8faaf988753d606eb8248be16cace6b6601e51a0bdab1c067f43
def log_step_extra(*log_functions, print_fn=print, **log_func_kwargs): '\n Decorates a function that transforms a pandas dataframe to add automated logging statements\n\n :param *log_functions: callable(s), functions that take the output of the decorated function and turn it into a log.\n Note that the output of each log_function is casted to string using `str()`\n :param print_fn: callable, print function (e.g. print or logger.info), defaults to print\n :param **log_func_kwargs: keyword arguments to be passed to log_functions\n :returns: the result of the function\n\n :Example:\n >>> @log_step_extra(lambda d: d["some_column"].value_counts())\n ... def remove_outliers(df, min_obs=5):\n ... pass\n\n ' if (not log_functions): raise ValueError('Supply at least one log_function for log_step_extra') def _log_step_extra(func): @wraps(func) def wrapper(*args, **kwargs): result = func(*args, **kwargs) func_args = inspect.signature(func).bind(*args, **kwargs).arguments func_args_str = ''.join((', {} = {!r}'.format(*item) for item in list(func_args.items())[1:])) try: extra_logs = ' '.join([str(log_f(result, **log_func_kwargs)) for log_f in log_functions]) except TypeError: raise ValueError(f'All log functions should be callable, got {[type(log_f) for log_f in log_functions]}') print_fn((f'[{func.__name__}(df{func_args_str})] ' + extra_logs)) return result return wrapper return _log_step_extra
Decorates a function that transforms a pandas dataframe to add automated logging statements :param *log_functions: callable(s), functions that take the output of the decorated function and turn it into a log. Note that the output of each log_function is casted to string using `str()` :param print_fn: callable, print function (e.g. print or logger.info), defaults to print :param **log_func_kwargs: keyword arguments to be passed to log_functions :returns: the result of the function :Example: >>> @log_step_extra(lambda d: d["some_column"].value_counts()) ... def remove_outliers(df, min_obs=5): ... pass
sklego/pandas_utils.py
log_step_extra
quendee/scikit-lego
784
python
def log_step_extra(*log_functions, print_fn=print, **log_func_kwargs): '\n Decorates a function that transforms a pandas dataframe to add automated logging statements\n\n :param *log_functions: callable(s), functions that take the output of the decorated function and turn it into a log.\n Note that the output of each log_function is casted to string using `str()`\n :param print_fn: callable, print function (e.g. print or logger.info), defaults to print\n :param **log_func_kwargs: keyword arguments to be passed to log_functions\n :returns: the result of the function\n\n :Example:\n >>> @log_step_extra(lambda d: d["some_column"].value_counts())\n ... def remove_outliers(df, min_obs=5):\n ... pass\n\n ' if (not log_functions): raise ValueError('Supply at least one log_function for log_step_extra') def _log_step_extra(func): @wraps(func) def wrapper(*args, **kwargs): result = func(*args, **kwargs) func_args = inspect.signature(func).bind(*args, **kwargs).arguments func_args_str = .join((', {} = {!r}'.format(*item) for item in list(func_args.items())[1:])) try: extra_logs = ' '.join([str(log_f(result, **log_func_kwargs)) for log_f in log_functions]) except TypeError: raise ValueError(f'All log functions should be callable, got {[type(log_f) for log_f in log_functions]}') print_fn((f'[{func.__name__}(df{func_args_str})] ' + extra_logs)) return result return wrapper return _log_step_extra
def log_step_extra(*log_functions, print_fn=print, **log_func_kwargs): '\n Decorates a function that transforms a pandas dataframe to add automated logging statements\n\n :param *log_functions: callable(s), functions that take the output of the decorated function and turn it into a log.\n Note that the output of each log_function is casted to string using `str()`\n :param print_fn: callable, print function (e.g. print or logger.info), defaults to print\n :param **log_func_kwargs: keyword arguments to be passed to log_functions\n :returns: the result of the function\n\n :Example:\n >>> @log_step_extra(lambda d: d["some_column"].value_counts())\n ... def remove_outliers(df, min_obs=5):\n ... pass\n\n ' if (not log_functions): raise ValueError('Supply at least one log_function for log_step_extra') def _log_step_extra(func): @wraps(func) def wrapper(*args, **kwargs): result = func(*args, **kwargs) func_args = inspect.signature(func).bind(*args, **kwargs).arguments func_args_str = .join((', {} = {!r}'.format(*item) for item in list(func_args.items())[1:])) try: extra_logs = ' '.join([str(log_f(result, **log_func_kwargs)) for log_f in log_functions]) except TypeError: raise ValueError(f'All log functions should be callable, got {[type(log_f) for log_f in log_functions]}') print_fn((f'[{func.__name__}(df{func_args_str})] ' + extra_logs)) return result return wrapper return _log_step_extra<|docstring|>Decorates a function that transforms a pandas dataframe to add automated logging statements :param *log_functions: callable(s), functions that take the output of the decorated function and turn it into a log. Note that the output of each log_function is casted to string using `str()` :param print_fn: callable, print function (e.g. print or logger.info), defaults to print :param **log_func_kwargs: keyword arguments to be passed to log_functions :returns: the result of the function :Example: >>> @log_step_extra(lambda d: d["some_column"].value_counts()) ... def remove_outliers(df, min_obs=5): ... pass<|endoftext|>
10c29218950658761c2747209a14f760386b1ff27630bf0f795bb03706984e26
def add_lags(X, cols, lags, drop_na=True): "\n Appends lag column(s).\n\n :param X: array-like, shape=(n_columns, n_samples,) training data.\n :param cols: column name(s) or index (indices).\n :param lags: the amount of lag for each col.\n :param drop_na: remove rows that contain NA values.\n :returns: ``pd.DataFrame | np.ndarray`` with only the selected cols.\n\n :Example:\n\n >>> import pandas as pd\n >>> df = pd.DataFrame([[1, 2, 3],\n ... [4, 5, 6],\n ... [7, 8, 9]],\n ... columns=['a', 'b', 'c'],\n ... index=[1, 2, 3])\n\n >>> add_lags(df, 'a', [1]) # doctest: +NORMALIZE_WHITESPACE\n a b c a1\n 1 1 2 3 4.0\n 2 4 5 6 7.0\n\n >>> add_lags(df, ['a', 'b'], 2) # doctest: +NORMALIZE_WHITESPACE\n a b c a2 b2\n 1 1 2 3 7.0 8.0\n\n >>> import numpy as np\n >>> X = np.array([[1, 2, 3],\n ... [4, 5, 6],\n ... [7, 8, 9]])\n\n >>> add_lags(X, 0, [1])\n array([[1, 2, 3, 4],\n [4, 5, 6, 7]])\n\n >>> add_lags(X, 1, [-1, 1])\n array([[4, 5, 6, 2, 8]])\n " lags = as_list(lags) if (not all((isinstance(x, int) for x in lags))): raise ValueError(('lags must be a list of type: ' + str(int))) allowed_inputs = {pd.core.frame.DataFrame: _add_lagged_pandas_columns, np.ndarray: _add_lagged_numpy_columns} for (allowed_input, handler) in allowed_inputs.items(): if isinstance(X, allowed_input): return handler(X, cols, lags, drop_na) allowed_input_names = list(allowed_inputs.keys()) raise ValueError('X type should be one of:', allowed_input_names)
Appends lag column(s). :param X: array-like, shape=(n_columns, n_samples,) training data. :param cols: column name(s) or index (indices). :param lags: the amount of lag for each col. :param drop_na: remove rows that contain NA values. :returns: ``pd.DataFrame | np.ndarray`` with only the selected cols. :Example: >>> import pandas as pd >>> df = pd.DataFrame([[1, 2, 3], ... [4, 5, 6], ... [7, 8, 9]], ... columns=['a', 'b', 'c'], ... index=[1, 2, 3]) >>> add_lags(df, 'a', [1]) # doctest: +NORMALIZE_WHITESPACE a b c a1 1 1 2 3 4.0 2 4 5 6 7.0 >>> add_lags(df, ['a', 'b'], 2) # doctest: +NORMALIZE_WHITESPACE a b c a2 b2 1 1 2 3 7.0 8.0 >>> import numpy as np >>> X = np.array([[1, 2, 3], ... [4, 5, 6], ... [7, 8, 9]]) >>> add_lags(X, 0, [1]) array([[1, 2, 3, 4], [4, 5, 6, 7]]) >>> add_lags(X, 1, [-1, 1]) array([[4, 5, 6, 2, 8]])
sklego/pandas_utils.py
add_lags
quendee/scikit-lego
784
python
def add_lags(X, cols, lags, drop_na=True): "\n Appends lag column(s).\n\n :param X: array-like, shape=(n_columns, n_samples,) training data.\n :param cols: column name(s) or index (indices).\n :param lags: the amount of lag for each col.\n :param drop_na: remove rows that contain NA values.\n :returns: ``pd.DataFrame | np.ndarray`` with only the selected cols.\n\n :Example:\n\n >>> import pandas as pd\n >>> df = pd.DataFrame([[1, 2, 3],\n ... [4, 5, 6],\n ... [7, 8, 9]],\n ... columns=['a', 'b', 'c'],\n ... index=[1, 2, 3])\n\n >>> add_lags(df, 'a', [1]) # doctest: +NORMALIZE_WHITESPACE\n a b c a1\n 1 1 2 3 4.0\n 2 4 5 6 7.0\n\n >>> add_lags(df, ['a', 'b'], 2) # doctest: +NORMALIZE_WHITESPACE\n a b c a2 b2\n 1 1 2 3 7.0 8.0\n\n >>> import numpy as np\n >>> X = np.array([[1, 2, 3],\n ... [4, 5, 6],\n ... [7, 8, 9]])\n\n >>> add_lags(X, 0, [1])\n array([[1, 2, 3, 4],\n [4, 5, 6, 7]])\n\n >>> add_lags(X, 1, [-1, 1])\n array([[4, 5, 6, 2, 8]])\n " lags = as_list(lags) if (not all((isinstance(x, int) for x in lags))): raise ValueError(('lags must be a list of type: ' + str(int))) allowed_inputs = {pd.core.frame.DataFrame: _add_lagged_pandas_columns, np.ndarray: _add_lagged_numpy_columns} for (allowed_input, handler) in allowed_inputs.items(): if isinstance(X, allowed_input): return handler(X, cols, lags, drop_na) allowed_input_names = list(allowed_inputs.keys()) raise ValueError('X type should be one of:', allowed_input_names)
def add_lags(X, cols, lags, drop_na=True): "\n Appends lag column(s).\n\n :param X: array-like, shape=(n_columns, n_samples,) training data.\n :param cols: column name(s) or index (indices).\n :param lags: the amount of lag for each col.\n :param drop_na: remove rows that contain NA values.\n :returns: ``pd.DataFrame | np.ndarray`` with only the selected cols.\n\n :Example:\n\n >>> import pandas as pd\n >>> df = pd.DataFrame([[1, 2, 3],\n ... [4, 5, 6],\n ... [7, 8, 9]],\n ... columns=['a', 'b', 'c'],\n ... index=[1, 2, 3])\n\n >>> add_lags(df, 'a', [1]) # doctest: +NORMALIZE_WHITESPACE\n a b c a1\n 1 1 2 3 4.0\n 2 4 5 6 7.0\n\n >>> add_lags(df, ['a', 'b'], 2) # doctest: +NORMALIZE_WHITESPACE\n a b c a2 b2\n 1 1 2 3 7.0 8.0\n\n >>> import numpy as np\n >>> X = np.array([[1, 2, 3],\n ... [4, 5, 6],\n ... [7, 8, 9]])\n\n >>> add_lags(X, 0, [1])\n array([[1, 2, 3, 4],\n [4, 5, 6, 7]])\n\n >>> add_lags(X, 1, [-1, 1])\n array([[4, 5, 6, 2, 8]])\n " lags = as_list(lags) if (not all((isinstance(x, int) for x in lags))): raise ValueError(('lags must be a list of type: ' + str(int))) allowed_inputs = {pd.core.frame.DataFrame: _add_lagged_pandas_columns, np.ndarray: _add_lagged_numpy_columns} for (allowed_input, handler) in allowed_inputs.items(): if isinstance(X, allowed_input): return handler(X, cols, lags, drop_na) allowed_input_names = list(allowed_inputs.keys()) raise ValueError('X type should be one of:', allowed_input_names)<|docstring|>Appends lag column(s). :param X: array-like, shape=(n_columns, n_samples,) training data. :param cols: column name(s) or index (indices). :param lags: the amount of lag for each col. :param drop_na: remove rows that contain NA values. :returns: ``pd.DataFrame | np.ndarray`` with only the selected cols. :Example: >>> import pandas as pd >>> df = pd.DataFrame([[1, 2, 3], ... [4, 5, 6], ... [7, 8, 9]], ... columns=['a', 'b', 'c'], ... index=[1, 2, 3]) >>> add_lags(df, 'a', [1]) # doctest: +NORMALIZE_WHITESPACE a b c a1 1 1 2 3 4.0 2 4 5 6 7.0 >>> add_lags(df, ['a', 'b'], 2) # doctest: +NORMALIZE_WHITESPACE a b c a2 b2 1 1 2 3 7.0 8.0 >>> import numpy as np >>> X = np.array([[1, 2, 3], ... [4, 5, 6], ... [7, 8, 9]]) >>> add_lags(X, 0, [1]) array([[1, 2, 3, 4], [4, 5, 6, 7]]) >>> add_lags(X, 1, [-1, 1]) array([[4, 5, 6, 2, 8]])<|endoftext|>
936436f385a6e55885f282e43809d08976e9a47982f0b9704f8cc9dcf24b9dfb
def _add_lagged_numpy_columns(X, cols, lags, drop_na): '\n Append a lag columns.\n\n :param df: the input ``np.ndarray``.\n :param cols: column index / indices.\n :param drop_na: remove rows that contain NA values.\n :returns: ``np.ndarray`` with the concatenated lagged cols.\n ' cols = as_list(cols) if (not all([isinstance(col, int) for col in cols])): raise ValueError('Matrix columns are indexed by integers') if (not all([(col < X.shape[1]) for col in cols])): raise KeyError('The column does not exist') combos = (shift(X[(:, col)], (- lag), cval=np.NaN) for col in cols for lag in lags) original_type = X.dtype X = np.asarray(X, dtype=float) answer = np.column_stack((X, *combos)) if drop_na: answer = answer[(~ np.isnan(answer).any(axis=1))] answer = np.asarray(answer, dtype=original_type) return answer
Append a lag columns. :param df: the input ``np.ndarray``. :param cols: column index / indices. :param drop_na: remove rows that contain NA values. :returns: ``np.ndarray`` with the concatenated lagged cols.
sklego/pandas_utils.py
_add_lagged_numpy_columns
quendee/scikit-lego
784
python
def _add_lagged_numpy_columns(X, cols, lags, drop_na): '\n Append a lag columns.\n\n :param df: the input ``np.ndarray``.\n :param cols: column index / indices.\n :param drop_na: remove rows that contain NA values.\n :returns: ``np.ndarray`` with the concatenated lagged cols.\n ' cols = as_list(cols) if (not all([isinstance(col, int) for col in cols])): raise ValueError('Matrix columns are indexed by integers') if (not all([(col < X.shape[1]) for col in cols])): raise KeyError('The column does not exist') combos = (shift(X[(:, col)], (- lag), cval=np.NaN) for col in cols for lag in lags) original_type = X.dtype X = np.asarray(X, dtype=float) answer = np.column_stack((X, *combos)) if drop_na: answer = answer[(~ np.isnan(answer).any(axis=1))] answer = np.asarray(answer, dtype=original_type) return answer
def _add_lagged_numpy_columns(X, cols, lags, drop_na): '\n Append a lag columns.\n\n :param df: the input ``np.ndarray``.\n :param cols: column index / indices.\n :param drop_na: remove rows that contain NA values.\n :returns: ``np.ndarray`` with the concatenated lagged cols.\n ' cols = as_list(cols) if (not all([isinstance(col, int) for col in cols])): raise ValueError('Matrix columns are indexed by integers') if (not all([(col < X.shape[1]) for col in cols])): raise KeyError('The column does not exist') combos = (shift(X[(:, col)], (- lag), cval=np.NaN) for col in cols for lag in lags) original_type = X.dtype X = np.asarray(X, dtype=float) answer = np.column_stack((X, *combos)) if drop_na: answer = answer[(~ np.isnan(answer).any(axis=1))] answer = np.asarray(answer, dtype=original_type) return answer<|docstring|>Append a lag columns. :param df: the input ``np.ndarray``. :param cols: column index / indices. :param drop_na: remove rows that contain NA values. :returns: ``np.ndarray`` with the concatenated lagged cols.<|endoftext|>
946e0be359113958377f3e3cf677f9ebfed9869aa260c324780807d63da6da8d
def _add_lagged_pandas_columns(df, cols, lags, drop_na): '\n Append a lag columns.\n\n :param df: the input ``pd.DataFrame``.\n :param cols: column name(s).\n :param drop_na: remove rows that contain NA values.\n :returns: ``pd.DataFrame`` with the concatenated lagged cols.\n ' cols = as_list(cols) if (not all([(col in df.columns.values) for col in cols])): raise KeyError('The column does not exist') combos = (df[col].shift((- lag)).rename((col + str(lag))) for col in cols for lag in lags) answer = pd.concat([df, *combos], axis=1) if drop_na: answer = answer.dropna() return answer
Append a lag columns. :param df: the input ``pd.DataFrame``. :param cols: column name(s). :param drop_na: remove rows that contain NA values. :returns: ``pd.DataFrame`` with the concatenated lagged cols.
sklego/pandas_utils.py
_add_lagged_pandas_columns
quendee/scikit-lego
784
python
def _add_lagged_pandas_columns(df, cols, lags, drop_na): '\n Append a lag columns.\n\n :param df: the input ``pd.DataFrame``.\n :param cols: column name(s).\n :param drop_na: remove rows that contain NA values.\n :returns: ``pd.DataFrame`` with the concatenated lagged cols.\n ' cols = as_list(cols) if (not all([(col in df.columns.values) for col in cols])): raise KeyError('The column does not exist') combos = (df[col].shift((- lag)).rename((col + str(lag))) for col in cols for lag in lags) answer = pd.concat([df, *combos], axis=1) if drop_na: answer = answer.dropna() return answer
def _add_lagged_pandas_columns(df, cols, lags, drop_na): '\n Append a lag columns.\n\n :param df: the input ``pd.DataFrame``.\n :param cols: column name(s).\n :param drop_na: remove rows that contain NA values.\n :returns: ``pd.DataFrame`` with the concatenated lagged cols.\n ' cols = as_list(cols) if (not all([(col in df.columns.values) for col in cols])): raise KeyError('The column does not exist') combos = (df[col].shift((- lag)).rename((col + str(lag))) for col in cols for lag in lags) answer = pd.concat([df, *combos], axis=1) if drop_na: answer = answer.dropna() return answer<|docstring|>Append a lag columns. :param df: the input ``pd.DataFrame``. :param cols: column name(s). :param drop_na: remove rows that contain NA values. :returns: ``pd.DataFrame`` with the concatenated lagged cols.<|endoftext|>
39f9bee3cf3510ceeb7655b86801c064e2647bdb3293adc249ecc467ced7c9d2
def test_simple(self): '\n This test reads in a small number of particles and verifies the result of one of the particles.\n ' with open(os.path.join(RESOURCE_PATH, 'first_data.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) particles = parser.get_records(4) self.assert_particles(particles, 'first_four.yml', RESOURCE_PATH)
This test reads in a small number of particles and verifies the result of one of the particles.
mi/dataset/parser/test/test_vel3d_a_mmp_cds.py
test_simple
krosburg/mi-instrument
1
python
def test_simple(self): '\n \n ' with open(os.path.join(RESOURCE_PATH, 'first_data.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) particles = parser.get_records(4) self.assert_particles(particles, 'first_four.yml', RESOURCE_PATH)
def test_simple(self): '\n \n ' with open(os.path.join(RESOURCE_PATH, 'first_data.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) particles = parser.get_records(4) self.assert_particles(particles, 'first_four.yml', RESOURCE_PATH)<|docstring|>This test reads in a small number of particles and verifies the result of one of the particles.<|endoftext|>
0efc9a7703f8e9dd52b68ec233946074b9bcbd3a8092f6fdb5f1975e52c0329f
def test_get_many(self): '\n This test exercises retrieving 20 particles, verifying the particles, then retrieves 30 particles\n and verifies the 30 particles.\n ' with open(os.path.join(RESOURCE_PATH, 'first_data.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) particles = parser.get_records(193) self.assertTrue((len(particles) == 193)) self.assert_particles(particles, 'first_data.yml', RESOURCE_PATH)
This test exercises retrieving 20 particles, verifying the particles, then retrieves 30 particles and verifies the 30 particles.
mi/dataset/parser/test/test_vel3d_a_mmp_cds.py
test_get_many
krosburg/mi-instrument
1
python
def test_get_many(self): '\n This test exercises retrieving 20 particles, verifying the particles, then retrieves 30 particles\n and verifies the 30 particles.\n ' with open(os.path.join(RESOURCE_PATH, 'first_data.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) particles = parser.get_records(193) self.assertTrue((len(particles) == 193)) self.assert_particles(particles, 'first_data.yml', RESOURCE_PATH)
def test_get_many(self): '\n This test exercises retrieving 20 particles, verifying the particles, then retrieves 30 particles\n and verifies the 30 particles.\n ' with open(os.path.join(RESOURCE_PATH, 'first_data.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) particles = parser.get_records(193) self.assertTrue((len(particles) == 193)) self.assert_particles(particles, 'first_data.yml', RESOURCE_PATH)<|docstring|>This test exercises retrieving 20 particles, verifying the particles, then retrieves 30 particles and verifies the 30 particles.<|endoftext|>
6c71e0967e626fcc329d789db0a67c18faad95be22bbe33ab9544439d804484c
def test_long_stream(self): '\n This test exercises retrieve approximately 200 particles.\n ' with open(os.path.join(RESOURCE_PATH, 'acm_concat.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) particles = parser.get_records(400) self.assertTrue((len(particles) == 386))
This test exercises retrieve approximately 200 particles.
mi/dataset/parser/test/test_vel3d_a_mmp_cds.py
test_long_stream
krosburg/mi-instrument
1
python
def test_long_stream(self): '\n \n ' with open(os.path.join(RESOURCE_PATH, 'acm_concat.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) particles = parser.get_records(400) self.assertTrue((len(particles) == 386))
def test_long_stream(self): '\n \n ' with open(os.path.join(RESOURCE_PATH, 'acm_concat.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) particles = parser.get_records(400) self.assertTrue((len(particles) == 386))<|docstring|>This test exercises retrieve approximately 200 particles.<|endoftext|>
3d7057d518119a3d48304efdd9456ee31d2b1d529c751067af7af110fe0ddc5b
def test_bad_data_one(self): '\n This test verifies that a SampleException is raised when msgpack data is malformed.\n ' with open(os.path.join(RESOURCE_PATH, 'acm_1_20131124T005004_458-BAD.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) parser.get_records(1) self.assertEqual(len(self.exception_callback_value), 1) self.assert_(isinstance(self.exception_callback_value[0], SampleException))
This test verifies that a SampleException is raised when msgpack data is malformed.
mi/dataset/parser/test/test_vel3d_a_mmp_cds.py
test_bad_data_one
krosburg/mi-instrument
1
python
def test_bad_data_one(self): '\n \n ' with open(os.path.join(RESOURCE_PATH, 'acm_1_20131124T005004_458-BAD.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) parser.get_records(1) self.assertEqual(len(self.exception_callback_value), 1) self.assert_(isinstance(self.exception_callback_value[0], SampleException))
def test_bad_data_one(self): '\n \n ' with open(os.path.join(RESOURCE_PATH, 'acm_1_20131124T005004_458-BAD.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) parser.get_records(1) self.assertEqual(len(self.exception_callback_value), 1) self.assert_(isinstance(self.exception_callback_value[0], SampleException))<|docstring|>This test verifies that a SampleException is raised when msgpack data is malformed.<|endoftext|>
bcaa6e969cca6d7a8929cd67d0a495ecbe5b81a50402ce6a2e04199b0466471a
def test_bad_data_two(self): '\n This test verifies that a SampleException is raised when an entire msgpack buffer is not msgpack.\n ' with open(os.path.join(RESOURCE_PATH, 'not-msg-pack.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) parser.get_records(1) self.assertTrue((len(self.exception_callback_value) >= 1)) self.assert_(isinstance(self.exception_callback_value[0], SampleException))
This test verifies that a SampleException is raised when an entire msgpack buffer is not msgpack.
mi/dataset/parser/test/test_vel3d_a_mmp_cds.py
test_bad_data_two
krosburg/mi-instrument
1
python
def test_bad_data_two(self): '\n \n ' with open(os.path.join(RESOURCE_PATH, 'not-msg-pack.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) parser.get_records(1) self.assertTrue((len(self.exception_callback_value) >= 1)) self.assert_(isinstance(self.exception_callback_value[0], SampleException))
def test_bad_data_two(self): '\n \n ' with open(os.path.join(RESOURCE_PATH, 'not-msg-pack.mpk'), 'rb') as stream_handle: parser = MmpCdsParser(self.config, stream_handle, self.exception_callback) parser.get_records(1) self.assertTrue((len(self.exception_callback_value) >= 1)) self.assert_(isinstance(self.exception_callback_value[0], SampleException))<|docstring|>This test verifies that a SampleException is raised when an entire msgpack buffer is not msgpack.<|endoftext|>
ef26aa11fcbf953bec35573720a746617a46b7eae190f642f2f2693af385e854
def calculateBearing(coord1, coord2): '\n calculates the azimuth in degrees from start point to end point\n\n :param coord1: start point [lat, lng]\n :param coord2: end point [lat, lng]\n :rtype: azimuth in degrees\n ' startLat = math.radians(coord1[0]) startLong = math.radians(coord1[1]) endLat = math.radians(coord2[0]) endLong = math.radians(coord2[1]) dLong = (endLong - startLong) dPhi = math.log((math.tan(((endLat / 2.0) + (math.pi / 4.0))) / math.tan(((startLat / 2.0) + (math.pi / 4.0))))) if (abs(dLong) > math.pi): if (dLong > 0.0): dLong = (- ((2.0 * math.pi) - dLong)) else: dLong = ((2.0 * math.pi) + dLong) bearing = ((math.degrees(math.atan2(dLong, dPhi)) + 360.0) % 360.0) return bearing
calculates the azimuth in degrees from start point to end point :param coord1: start point [lat, lng] :param coord2: end point [lat, lng] :rtype: azimuth in degrees
loutilities/geo.py
calculateBearing
louking/loutilities
1
python
def calculateBearing(coord1, coord2): '\n calculates the azimuth in degrees from start point to end point\n\n :param coord1: start point [lat, lng]\n :param coord2: end point [lat, lng]\n :rtype: azimuth in degrees\n ' startLat = math.radians(coord1[0]) startLong = math.radians(coord1[1]) endLat = math.radians(coord2[0]) endLong = math.radians(coord2[1]) dLong = (endLong - startLong) dPhi = math.log((math.tan(((endLat / 2.0) + (math.pi / 4.0))) / math.tan(((startLat / 2.0) + (math.pi / 4.0))))) if (abs(dLong) > math.pi): if (dLong > 0.0): dLong = (- ((2.0 * math.pi) - dLong)) else: dLong = ((2.0 * math.pi) + dLong) bearing = ((math.degrees(math.atan2(dLong, dPhi)) + 360.0) % 360.0) return bearing
def calculateBearing(coord1, coord2): '\n calculates the azimuth in degrees from start point to end point\n\n :param coord1: start point [lat, lng]\n :param coord2: end point [lat, lng]\n :rtype: azimuth in degrees\n ' startLat = math.radians(coord1[0]) startLong = math.radians(coord1[1]) endLat = math.radians(coord2[0]) endLong = math.radians(coord2[1]) dLong = (endLong - startLong) dPhi = math.log((math.tan(((endLat / 2.0) + (math.pi / 4.0))) / math.tan(((startLat / 2.0) + (math.pi / 4.0))))) if (abs(dLong) > math.pi): if (dLong > 0.0): dLong = (- ((2.0 * math.pi) - dLong)) else: dLong = ((2.0 * math.pi) + dLong) bearing = ((math.degrees(math.atan2(dLong, dPhi)) + 360.0) % 360.0) return bearing<|docstring|>calculates the azimuth in degrees from start point to end point :param coord1: start point [lat, lng] :param coord2: end point [lat, lng] :rtype: azimuth in degrees<|endoftext|>
b089094e7bddc0c57608e72ae2ad5748bdb38468de6b6740da585932b3c67374
def elevation_gain(elevations, isMiles=True, upthreshold=8, downthreshold=8, debug=False): '\n calculate elevation gain over a series of elevation points\n\n NOTE: thresholds of 8 meters approximately matches strava\n\n :param elevations: list of elevation points in meters\n :param isMiles: if True return feet, if False return m\n :param upthreshold: threshold of increase when to decide climbing, meters\n :param downthreshold: threshold of decrease when to decide descending, meters\n :param debug: if True, return tuple with gain, debuginfo\n :rtype: gain[, debuginfo] - gain in meters or feet depending on isMiles\n ' if debug: debuginfo = ['ele,state,highup,lowdown,totclimb\n'] state = 'unknown' thisel = elevations[0] highup = thisel lowdown = thisel totclimb = 0.0 if debug: debuginfo.append('{},{},{},{},{}\n'.format(thisel, state, highup, lowdown, totclimb)) for thisel in elevations[1:]: if (state == 'unknown'): if (thisel >= (highup + upthreshold)): state = 'climbing' highup = thisel elif (thisel <= (lowdown - downthreshold)): state = 'descending' lowdown = thisel elif (state == 'climbing'): if (thisel > highup): highup = thisel elif (thisel <= (highup - downthreshold)): state = 'descending' totclimb += (highup - lowdown) lowdown = thisel elif (state == 'descending'): if (thisel < lowdown): lowdown = thisel elif (thisel >= (lowdown + upthreshold)): state = 'climbing' highup = thisel if debug: debuginfo.append('{},{},{},{},{}\n'.format(thisel, state, highup, lowdown, totclimb)) if (state == 'climbing'): totclimb += (highup - lowdown) if debug: debuginfo.pop() debuginfo.append('{},{},{},{},{}\n'.format(thisel, state, highup, lowdown, totclimb)) if isMiles: totclimb = ((totclimb / 1609.344) * 5280) if debug: return (totclimb, debuginfo) return totclimb
calculate elevation gain over a series of elevation points NOTE: thresholds of 8 meters approximately matches strava :param elevations: list of elevation points in meters :param isMiles: if True return feet, if False return m :param upthreshold: threshold of increase when to decide climbing, meters :param downthreshold: threshold of decrease when to decide descending, meters :param debug: if True, return tuple with gain, debuginfo :rtype: gain[, debuginfo] - gain in meters or feet depending on isMiles
loutilities/geo.py
elevation_gain
louking/loutilities
1
python
def elevation_gain(elevations, isMiles=True, upthreshold=8, downthreshold=8, debug=False): '\n calculate elevation gain over a series of elevation points\n\n NOTE: thresholds of 8 meters approximately matches strava\n\n :param elevations: list of elevation points in meters\n :param isMiles: if True return feet, if False return m\n :param upthreshold: threshold of increase when to decide climbing, meters\n :param downthreshold: threshold of decrease when to decide descending, meters\n :param debug: if True, return tuple with gain, debuginfo\n :rtype: gain[, debuginfo] - gain in meters or feet depending on isMiles\n ' if debug: debuginfo = ['ele,state,highup,lowdown,totclimb\n'] state = 'unknown' thisel = elevations[0] highup = thisel lowdown = thisel totclimb = 0.0 if debug: debuginfo.append('{},{},{},{},{}\n'.format(thisel, state, highup, lowdown, totclimb)) for thisel in elevations[1:]: if (state == 'unknown'): if (thisel >= (highup + upthreshold)): state = 'climbing' highup = thisel elif (thisel <= (lowdown - downthreshold)): state = 'descending' lowdown = thisel elif (state == 'climbing'): if (thisel > highup): highup = thisel elif (thisel <= (highup - downthreshold)): state = 'descending' totclimb += (highup - lowdown) lowdown = thisel elif (state == 'descending'): if (thisel < lowdown): lowdown = thisel elif (thisel >= (lowdown + upthreshold)): state = 'climbing' highup = thisel if debug: debuginfo.append('{},{},{},{},{}\n'.format(thisel, state, highup, lowdown, totclimb)) if (state == 'climbing'): totclimb += (highup - lowdown) if debug: debuginfo.pop() debuginfo.append('{},{},{},{},{}\n'.format(thisel, state, highup, lowdown, totclimb)) if isMiles: totclimb = ((totclimb / 1609.344) * 5280) if debug: return (totclimb, debuginfo) return totclimb
def elevation_gain(elevations, isMiles=True, upthreshold=8, downthreshold=8, debug=False): '\n calculate elevation gain over a series of elevation points\n\n NOTE: thresholds of 8 meters approximately matches strava\n\n :param elevations: list of elevation points in meters\n :param isMiles: if True return feet, if False return m\n :param upthreshold: threshold of increase when to decide climbing, meters\n :param downthreshold: threshold of decrease when to decide descending, meters\n :param debug: if True, return tuple with gain, debuginfo\n :rtype: gain[, debuginfo] - gain in meters or feet depending on isMiles\n ' if debug: debuginfo = ['ele,state,highup,lowdown,totclimb\n'] state = 'unknown' thisel = elevations[0] highup = thisel lowdown = thisel totclimb = 0.0 if debug: debuginfo.append('{},{},{},{},{}\n'.format(thisel, state, highup, lowdown, totclimb)) for thisel in elevations[1:]: if (state == 'unknown'): if (thisel >= (highup + upthreshold)): state = 'climbing' highup = thisel elif (thisel <= (lowdown - downthreshold)): state = 'descending' lowdown = thisel elif (state == 'climbing'): if (thisel > highup): highup = thisel elif (thisel <= (highup - downthreshold)): state = 'descending' totclimb += (highup - lowdown) lowdown = thisel elif (state == 'descending'): if (thisel < lowdown): lowdown = thisel elif (thisel >= (lowdown + upthreshold)): state = 'climbing' highup = thisel if debug: debuginfo.append('{},{},{},{},{}\n'.format(thisel, state, highup, lowdown, totclimb)) if (state == 'climbing'): totclimb += (highup - lowdown) if debug: debuginfo.pop() debuginfo.append('{},{},{},{},{}\n'.format(thisel, state, highup, lowdown, totclimb)) if isMiles: totclimb = ((totclimb / 1609.344) * 5280) if debug: return (totclimb, debuginfo) return totclimb<|docstring|>calculate elevation gain over a series of elevation points NOTE: thresholds of 8 meters approximately matches strava :param elevations: list of elevation points in meters :param isMiles: if True return feet, if False return m :param upthreshold: threshold of increase when to decide climbing, meters :param downthreshold: threshold of decrease when to decide descending, meters :param debug: if True, return tuple with gain, debuginfo :rtype: gain[, debuginfo] - gain in meters or feet depending on isMiles<|endoftext|>
01d133b565789475a74810868492c8336199aa422e33c98d89a366197a4185f4
def haversineDistance(self, coords1, coords2, isMiles=True): '\n calculate the distance between two lat,lng,ele coordinates\n\n Note: the ele item in the coordinate tuple is optional\n\n :param coords1: [lat, lng, ele] or [lat, lng] lat,lng dec degrees, ele meters\n :param coords2: [lat, lng, ele] or [lat, lng]\n :param isMiles: if True return miles, if False return km\n :rtype: distance between the points\n ' lat1 = coords1[0] lon1 = coords1[1] ele1 = (coords1[2] if (len(coords1) >= 3) else 0.0) lat2 = coords2[0] lon2 = coords2[1] ele2 = (coords2[2] if (len(coords2) >= 3) else 0.0) x1 = (lat2 - lat1) dLat = math.radians(x1) x2 = (lon2 - lon1) dLon = math.radians(x2) a = ((math.sin((dLat / 2)) * math.sin((dLat / 2))) + (((math.cos(math.radians(lat1)) * math.cos(math.radians(lat2))) * math.sin((dLon / 2))) * math.sin((dLon / 2)))) c = (2 * math.atan2(math.sqrt(a), math.sqrt((1 - a)))) d = (self.R * c) if isMiles: d /= 1.609344 if isMiles: ele1 /= 5280 ele2 /= 5280 else: ele1 /= 1000 ele2 /= 1000 de = (ele2 - ele1) d = math.sqrt(((d * d) + (de * de))) return d
calculate the distance between two lat,lng,ele coordinates Note: the ele item in the coordinate tuple is optional :param coords1: [lat, lng, ele] or [lat, lng] lat,lng dec degrees, ele meters :param coords2: [lat, lng, ele] or [lat, lng] :param isMiles: if True return miles, if False return km :rtype: distance between the points
loutilities/geo.py
haversineDistance
louking/loutilities
1
python
def haversineDistance(self, coords1, coords2, isMiles=True): '\n calculate the distance between two lat,lng,ele coordinates\n\n Note: the ele item in the coordinate tuple is optional\n\n :param coords1: [lat, lng, ele] or [lat, lng] lat,lng dec degrees, ele meters\n :param coords2: [lat, lng, ele] or [lat, lng]\n :param isMiles: if True return miles, if False return km\n :rtype: distance between the points\n ' lat1 = coords1[0] lon1 = coords1[1] ele1 = (coords1[2] if (len(coords1) >= 3) else 0.0) lat2 = coords2[0] lon2 = coords2[1] ele2 = (coords2[2] if (len(coords2) >= 3) else 0.0) x1 = (lat2 - lat1) dLat = math.radians(x1) x2 = (lon2 - lon1) dLon = math.radians(x2) a = ((math.sin((dLat / 2)) * math.sin((dLat / 2))) + (((math.cos(math.radians(lat1)) * math.cos(math.radians(lat2))) * math.sin((dLon / 2))) * math.sin((dLon / 2)))) c = (2 * math.atan2(math.sqrt(a), math.sqrt((1 - a)))) d = (self.R * c) if isMiles: d /= 1.609344 if isMiles: ele1 /= 5280 ele2 /= 5280 else: ele1 /= 1000 ele2 /= 1000 de = (ele2 - ele1) d = math.sqrt(((d * d) + (de * de))) return d
def haversineDistance(self, coords1, coords2, isMiles=True): '\n calculate the distance between two lat,lng,ele coordinates\n\n Note: the ele item in the coordinate tuple is optional\n\n :param coords1: [lat, lng, ele] or [lat, lng] lat,lng dec degrees, ele meters\n :param coords2: [lat, lng, ele] or [lat, lng]\n :param isMiles: if True return miles, if False return km\n :rtype: distance between the points\n ' lat1 = coords1[0] lon1 = coords1[1] ele1 = (coords1[2] if (len(coords1) >= 3) else 0.0) lat2 = coords2[0] lon2 = coords2[1] ele2 = (coords2[2] if (len(coords2) >= 3) else 0.0) x1 = (lat2 - lat1) dLat = math.radians(x1) x2 = (lon2 - lon1) dLon = math.radians(x2) a = ((math.sin((dLat / 2)) * math.sin((dLat / 2))) + (((math.cos(math.radians(lat1)) * math.cos(math.radians(lat2))) * math.sin((dLon / 2))) * math.sin((dLon / 2)))) c = (2 * math.atan2(math.sqrt(a), math.sqrt((1 - a)))) d = (self.R * c) if isMiles: d /= 1.609344 if isMiles: ele1 /= 5280 ele2 /= 5280 else: ele1 /= 1000 ele2 /= 1000 de = (ele2 - ele1) d = math.sqrt(((d * d) + (de * de))) return d<|docstring|>calculate the distance between two lat,lng,ele coordinates Note: the ele item in the coordinate tuple is optional :param coords1: [lat, lng, ele] or [lat, lng] lat,lng dec degrees, ele meters :param coords2: [lat, lng, ele] or [lat, lng] :param isMiles: if True return miles, if False return km :rtype: distance between the points<|endoftext|>
fbebb85c33f7f7d9a3377e8355c9fa65f14479989a639cd80e32ba9c0711e081
def getDestinationLatLng(self, coord, azimuth, distance): '\n returns the lat and lng of destination point \n given the start lat, long, azimuth, and distance\n\n :param coord: [lat,lng]\n :param azimuth: direction in degrees\n :param distance: distance in meters\n :rtype: [lat, lng]\n ' brng = math.radians(azimuth) d = (distance / 1000) lat1 = math.radians(coord[0]) lon1 = math.radians(coord[1]) lat2 = math.asin(((math.sin(lat1) * math.cos((d / self.R))) + ((math.cos(lat1) * math.sin((d / self.R))) * math.cos(brng)))) lon2 = (lon1 + math.atan2(((math.sin(brng) * math.sin((d / self.R))) * math.cos(lat1)), (math.cos((d / self.R)) - (math.sin(lat1) * math.sin(lat2))))) lat2 = math.degrees(lat2) lon2 = math.degrees(lon2) return [lat2, lon2]
returns the lat and lng of destination point given the start lat, long, azimuth, and distance :param coord: [lat,lng] :param azimuth: direction in degrees :param distance: distance in meters :rtype: [lat, lng]
loutilities/geo.py
getDestinationLatLng
louking/loutilities
1
python
def getDestinationLatLng(self, coord, azimuth, distance): '\n returns the lat and lng of destination point \n given the start lat, long, azimuth, and distance\n\n :param coord: [lat,lng]\n :param azimuth: direction in degrees\n :param distance: distance in meters\n :rtype: [lat, lng]\n ' brng = math.radians(azimuth) d = (distance / 1000) lat1 = math.radians(coord[0]) lon1 = math.radians(coord[1]) lat2 = math.asin(((math.sin(lat1) * math.cos((d / self.R))) + ((math.cos(lat1) * math.sin((d / self.R))) * math.cos(brng)))) lon2 = (lon1 + math.atan2(((math.sin(brng) * math.sin((d / self.R))) * math.cos(lat1)), (math.cos((d / self.R)) - (math.sin(lat1) * math.sin(lat2))))) lat2 = math.degrees(lat2) lon2 = math.degrees(lon2) return [lat2, lon2]
def getDestinationLatLng(self, coord, azimuth, distance): '\n returns the lat and lng of destination point \n given the start lat, long, azimuth, and distance\n\n :param coord: [lat,lng]\n :param azimuth: direction in degrees\n :param distance: distance in meters\n :rtype: [lat, lng]\n ' brng = math.radians(azimuth) d = (distance / 1000) lat1 = math.radians(coord[0]) lon1 = math.radians(coord[1]) lat2 = math.asin(((math.sin(lat1) * math.cos((d / self.R))) + ((math.cos(lat1) * math.sin((d / self.R))) * math.cos(brng)))) lon2 = (lon1 + math.atan2(((math.sin(brng) * math.sin((d / self.R))) * math.cos(lat1)), (math.cos((d / self.R)) - (math.sin(lat1) * math.sin(lat2))))) lat2 = math.degrees(lat2) lon2 = math.degrees(lon2) return [lat2, lon2]<|docstring|>returns the lat and lng of destination point given the start lat, long, azimuth, and distance :param coord: [lat,lng] :param azimuth: direction in degrees :param distance: distance in meters :rtype: [lat, lng]<|endoftext|>
fe253a5d44db9b89f808fa1def50fc3cad2a43f02c5dd9fbb2dc182c90f0bd5c
def __init__(self, url: str, browser: HandshakeBrowser): '\n Create a page object for the given URL\n\n :param url: the url of the page to initialize\n :type url: str\n :param browser: a HandshakeBrowser that is logged in to Handshake\n :type browser: HandshakeBrowser\n ' self._validate_url(url) self._url = url self._browser = browser self._browser.get(url) self._wait_until_page_is_loaded()
Create a page object for the given URL :param url: the url of the page to initialize :type url: str :param browser: a HandshakeBrowser that is logged in to Handshake :type browser: HandshakeBrowser
autohandshake/src/Pages/Page.py
__init__
cedwards036/autohandshake
3
python
def __init__(self, url: str, browser: HandshakeBrowser): '\n Create a page object for the given URL\n\n :param url: the url of the page to initialize\n :type url: str\n :param browser: a HandshakeBrowser that is logged in to Handshake\n :type browser: HandshakeBrowser\n ' self._validate_url(url) self._url = url self._browser = browser self._browser.get(url) self._wait_until_page_is_loaded()
def __init__(self, url: str, browser: HandshakeBrowser): '\n Create a page object for the given URL\n\n :param url: the url of the page to initialize\n :type url: str\n :param browser: a HandshakeBrowser that is logged in to Handshake\n :type browser: HandshakeBrowser\n ' self._validate_url(url) self._url = url self._browser = browser self._browser.get(url) self._wait_until_page_is_loaded()<|docstring|>Create a page object for the given URL :param url: the url of the page to initialize :type url: str :param browser: a HandshakeBrowser that is logged in to Handshake :type browser: HandshakeBrowser<|endoftext|>
d4d0130f9ec964dde5582d586af90621f1b9ac14216dbaf5a612e9fbaafb63de
@abstractmethod def _wait_until_page_is_loaded(self): 'Wait until the page has finished loading.\n\n For pages without complex javascript involved in the load, simply\n returning immediately is sufficient.\n ' raise NotImplementedError
Wait until the page has finished loading. For pages without complex javascript involved in the load, simply returning immediately is sufficient.
autohandshake/src/Pages/Page.py
_wait_until_page_is_loaded
cedwards036/autohandshake
3
python
@abstractmethod def _wait_until_page_is_loaded(self): 'Wait until the page has finished loading.\n\n For pages without complex javascript involved in the load, simply\n returning immediately is sufficient.\n ' raise NotImplementedError
@abstractmethod def _wait_until_page_is_loaded(self): 'Wait until the page has finished loading.\n\n For pages without complex javascript involved in the load, simply\n returning immediately is sufficient.\n ' raise NotImplementedError<|docstring|>Wait until the page has finished loading. For pages without complex javascript involved in the load, simply returning immediately is sufficient.<|endoftext|>
c1c98963d9ddb6d40a1a2e4fdbff74d540fe750a17349d0daa7edfcf79b64597
def validate_current_page(self): 'Ensure that the browser is on the correct page before calling a method.\n\n To be used to make sure methods on this page are not called while the\n browser is on a different page\n ' try: self._validate_url(self._browser.current_url) self._wait_until_page_is_loaded() except InvalidURLError: raise WrongPageForMethodError()
Ensure that the browser is on the correct page before calling a method. To be used to make sure methods on this page are not called while the browser is on a different page
autohandshake/src/Pages/Page.py
validate_current_page
cedwards036/autohandshake
3
python
def validate_current_page(self): 'Ensure that the browser is on the correct page before calling a method.\n\n To be used to make sure methods on this page are not called while the\n browser is on a different page\n ' try: self._validate_url(self._browser.current_url) self._wait_until_page_is_loaded() except InvalidURLError: raise WrongPageForMethodError()
def validate_current_page(self): 'Ensure that the browser is on the correct page before calling a method.\n\n To be used to make sure methods on this page are not called while the\n browser is on a different page\n ' try: self._validate_url(self._browser.current_url) self._wait_until_page_is_loaded() except InvalidURLError: raise WrongPageForMethodError()<|docstring|>Ensure that the browser is on the correct page before calling a method. To be used to make sure methods on this page are not called while the browser is on a different page<|endoftext|>
f1e082befb72cecfd021eb8ea9e397cba11bfeb5160d67de942ca4c08bf48cdd
@abstractmethod def _validate_url(self, url): '\n Ensure that the given URL is a valid URL for this page type\n\n :param url: the url to validate\n :type url: str\n ' raise NotImplementedError
Ensure that the given URL is a valid URL for this page type :param url: the url to validate :type url: str
autohandshake/src/Pages/Page.py
_validate_url
cedwards036/autohandshake
3
python
@abstractmethod def _validate_url(self, url): '\n Ensure that the given URL is a valid URL for this page type\n\n :param url: the url to validate\n :type url: str\n ' raise NotImplementedError
@abstractmethod def _validate_url(self, url): '\n Ensure that the given URL is a valid URL for this page type\n\n :param url: the url to validate\n :type url: str\n ' raise NotImplementedError<|docstring|>Ensure that the given URL is a valid URL for this page type :param url: the url to validate :type url: str<|endoftext|>
1e994fc0f462ef93b59206c7c81ce3de50b9d2e495937fdbe088883e38f978e9
@classmethod def require_user_type(cls, user_type: UserType): '\n Throw an error if the browser is not currently logged in as the required user type.\n\n To be used as a decorator for Page subclass methods that require the\n browser to be logged in as a specific user type.\n\n :param func: a page method\n :type func: function\n :param user_type: the user type to require\n :type user_type: UserType\n ' def require_user_type_decorator(func: Callable): def inner_func(self, *args, **kwargs): if (not (self._browser.user_type == user_type)): raise InvalidUserTypeError('Invalid user type for method') return func(self, *args, **kwargs) inner_func.__doc__ = func.__doc__ return inner_func return require_user_type_decorator
Throw an error if the browser is not currently logged in as the required user type. To be used as a decorator for Page subclass methods that require the browser to be logged in as a specific user type. :param func: a page method :type func: function :param user_type: the user type to require :type user_type: UserType
autohandshake/src/Pages/Page.py
require_user_type
cedwards036/autohandshake
3
python
@classmethod def require_user_type(cls, user_type: UserType): '\n Throw an error if the browser is not currently logged in as the required user type.\n\n To be used as a decorator for Page subclass methods that require the\n browser to be logged in as a specific user type.\n\n :param func: a page method\n :type func: function\n :param user_type: the user type to require\n :type user_type: UserType\n ' def require_user_type_decorator(func: Callable): def inner_func(self, *args, **kwargs): if (not (self._browser.user_type == user_type)): raise InvalidUserTypeError('Invalid user type for method') return func(self, *args, **kwargs) inner_func.__doc__ = func.__doc__ return inner_func return require_user_type_decorator
@classmethod def require_user_type(cls, user_type: UserType): '\n Throw an error if the browser is not currently logged in as the required user type.\n\n To be used as a decorator for Page subclass methods that require the\n browser to be logged in as a specific user type.\n\n :param func: a page method\n :type func: function\n :param user_type: the user type to require\n :type user_type: UserType\n ' def require_user_type_decorator(func: Callable): def inner_func(self, *args, **kwargs): if (not (self._browser.user_type == user_type)): raise InvalidUserTypeError('Invalid user type for method') return func(self, *args, **kwargs) inner_func.__doc__ = func.__doc__ return inner_func return require_user_type_decorator<|docstring|>Throw an error if the browser is not currently logged in as the required user type. To be used as a decorator for Page subclass methods that require the browser to be logged in as a specific user type. :param func: a page method :type func: function :param user_type: the user type to require :type user_type: UserType<|endoftext|>
da5a793b77082491eff5a525059a9a9027aa5f4edd62604e89608a709d4b6e16
@property def url(self): "Get the page's url" return self._url
Get the page's url
autohandshake/src/Pages/Page.py
url
cedwards036/autohandshake
3
python
@property def url(self): return self._url
@property def url(self): return self._url<|docstring|>Get the page's url<|endoftext|>
d4e4d7bf0feca78d1c5ac40e54cd53faa353e245fe76bd05757b2dd02f213f4c
def __str__(self): ' Return circle name ' return self.name
Return circle name
cride/circles/models/circles.py
__str__
daecazu/platziride
0
python
def __str__(self): ' ' return self.name
def __str__(self): ' ' return self.name<|docstring|>Return circle name<|endoftext|>
11f37b92d42a8e176ae6f118bbe0dd0282bf4dfa80ebf7215a6f382054bff7fc
def __init__(__self__, *, cluster_name: pulumi.Input[str], data_disk_size_gb: pulumi.Input[int], is_primary: pulumi.Input[bool], resource_group_name: pulumi.Input[str], vm_instance_count: pulumi.Input[int], application_ports: Optional[pulumi.Input['EndpointRangeDescriptionArgs']]=None, capacities: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, data_disk_type: Optional[pulumi.Input[Union[(str, 'DiskType')]]]=None, ephemeral_ports: Optional[pulumi.Input['EndpointRangeDescriptionArgs']]=None, is_stateless: Optional[pulumi.Input[bool]]=None, multiple_placement_groups: Optional[pulumi.Input[bool]]=None, node_type_name: Optional[pulumi.Input[str]]=None, placement_properties: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, vm_extensions: Optional[pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]]]=None, vm_image_offer: Optional[pulumi.Input[str]]=None, vm_image_publisher: Optional[pulumi.Input[str]]=None, vm_image_sku: Optional[pulumi.Input[str]]=None, vm_image_version: Optional[pulumi.Input[str]]=None, vm_managed_identity: Optional[pulumi.Input['VmManagedIdentityArgs']]=None, vm_secrets: Optional[pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]]]=None, vm_size: Optional[pulumi.Input[str]]=None): "\n The set of arguments for constructing a NodeType resource.\n :param pulumi.Input[str] cluster_name: The name of the cluster resource.\n :param pulumi.Input[int] data_disk_size_gb: Disk size for each vm in the node type in GBs.\n :param pulumi.Input[bool] is_primary: The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input[int] vm_instance_count: The number of nodes in the node type.\n :param pulumi.Input['EndpointRangeDescriptionArgs'] application_ports: The range of ports from which cluster assigned port to Service Fabric applications.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] capacities: The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.\n :param pulumi.Input[Union[str, 'DiskType']] data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.\n :param pulumi.Input['EndpointRangeDescriptionArgs'] ephemeral_ports: The range of ephemeral ports that nodes in this node type should be configured with.\n :param pulumi.Input[bool] is_stateless: Indicates if the node type can only host Stateless workloads.\n :param pulumi.Input[bool] multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups.\n :param pulumi.Input[str] node_type_name: The name of the node type.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Azure resource tags.\n :param pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]] vm_extensions: Set of extensions that should be installed onto the virtual machines.\n :param pulumi.Input[str] vm_image_offer: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.\n :param pulumi.Input[str] vm_image_publisher: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.\n :param pulumi.Input[str] vm_image_sku: The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.\n :param pulumi.Input[str] vm_image_version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.\n :param pulumi.Input['VmManagedIdentityArgs'] vm_managed_identity: Identities for the virtual machine scale set under the node type.\n :param pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]] vm_secrets: The secrets to install in the virtual machines.\n :param pulumi.Input[str] vm_size: The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.\n " pulumi.set(__self__, 'cluster_name', cluster_name) pulumi.set(__self__, 'data_disk_size_gb', data_disk_size_gb) pulumi.set(__self__, 'is_primary', is_primary) pulumi.set(__self__, 'resource_group_name', resource_group_name) pulumi.set(__self__, 'vm_instance_count', vm_instance_count) if (application_ports is not None): pulumi.set(__self__, 'application_ports', application_ports) if (capacities is not None): pulumi.set(__self__, 'capacities', capacities) if (data_disk_type is not None): pulumi.set(__self__, 'data_disk_type', data_disk_type) if (ephemeral_ports is not None): pulumi.set(__self__, 'ephemeral_ports', ephemeral_ports) if (is_stateless is None): is_stateless = False if (is_stateless is not None): pulumi.set(__self__, 'is_stateless', is_stateless) if (multiple_placement_groups is None): multiple_placement_groups = False if (multiple_placement_groups is not None): pulumi.set(__self__, 'multiple_placement_groups', multiple_placement_groups) if (node_type_name is not None): pulumi.set(__self__, 'node_type_name', node_type_name) if (placement_properties is not None): pulumi.set(__self__, 'placement_properties', placement_properties) if (tags is not None): pulumi.set(__self__, 'tags', tags) if (vm_extensions is not None): pulumi.set(__self__, 'vm_extensions', vm_extensions) if (vm_image_offer is not None): pulumi.set(__self__, 'vm_image_offer', vm_image_offer) if (vm_image_publisher is not None): pulumi.set(__self__, 'vm_image_publisher', vm_image_publisher) if (vm_image_sku is not None): pulumi.set(__self__, 'vm_image_sku', vm_image_sku) if (vm_image_version is not None): pulumi.set(__self__, 'vm_image_version', vm_image_version) if (vm_managed_identity is not None): pulumi.set(__self__, 'vm_managed_identity', vm_managed_identity) if (vm_secrets is not None): pulumi.set(__self__, 'vm_secrets', vm_secrets) if (vm_size is not None): pulumi.set(__self__, 'vm_size', vm_size)
The set of arguments for constructing a NodeType resource. :param pulumi.Input[str] cluster_name: The name of the cluster resource. :param pulumi.Input[int] data_disk_size_gb: Disk size for each vm in the node type in GBs. :param pulumi.Input[bool] is_primary: The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters. :param pulumi.Input[str] resource_group_name: The name of the resource group. :param pulumi.Input[int] vm_instance_count: The number of nodes in the node type. :param pulumi.Input['EndpointRangeDescriptionArgs'] application_ports: The range of ports from which cluster assigned port to Service Fabric applications. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] capacities: The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has. :param pulumi.Input[Union[str, 'DiskType']] data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. :param pulumi.Input['EndpointRangeDescriptionArgs'] ephemeral_ports: The range of ephemeral ports that nodes in this node type should be configured with. :param pulumi.Input[bool] is_stateless: Indicates if the node type can only host Stateless workloads. :param pulumi.Input[bool] multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups. :param pulumi.Input[str] node_type_name: The name of the node type. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Azure resource tags. :param pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]] vm_extensions: Set of extensions that should be installed onto the virtual machines. :param pulumi.Input[str] vm_image_offer: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer. :param pulumi.Input[str] vm_image_publisher: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer. :param pulumi.Input[str] vm_image_sku: The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter. :param pulumi.Input[str] vm_image_version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. :param pulumi.Input['VmManagedIdentityArgs'] vm_managed_identity: Identities for the virtual machine scale set under the node type. :param pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]] vm_secrets: The secrets to install in the virtual machines. :param pulumi.Input[str] vm_size: The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
__init__
polivbr/pulumi-azure-native
0
python
def __init__(__self__, *, cluster_name: pulumi.Input[str], data_disk_size_gb: pulumi.Input[int], is_primary: pulumi.Input[bool], resource_group_name: pulumi.Input[str], vm_instance_count: pulumi.Input[int], application_ports: Optional[pulumi.Input['EndpointRangeDescriptionArgs']]=None, capacities: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, data_disk_type: Optional[pulumi.Input[Union[(str, 'DiskType')]]]=None, ephemeral_ports: Optional[pulumi.Input['EndpointRangeDescriptionArgs']]=None, is_stateless: Optional[pulumi.Input[bool]]=None, multiple_placement_groups: Optional[pulumi.Input[bool]]=None, node_type_name: Optional[pulumi.Input[str]]=None, placement_properties: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, vm_extensions: Optional[pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]]]=None, vm_image_offer: Optional[pulumi.Input[str]]=None, vm_image_publisher: Optional[pulumi.Input[str]]=None, vm_image_sku: Optional[pulumi.Input[str]]=None, vm_image_version: Optional[pulumi.Input[str]]=None, vm_managed_identity: Optional[pulumi.Input['VmManagedIdentityArgs']]=None, vm_secrets: Optional[pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]]]=None, vm_size: Optional[pulumi.Input[str]]=None): "\n The set of arguments for constructing a NodeType resource.\n :param pulumi.Input[str] cluster_name: The name of the cluster resource.\n :param pulumi.Input[int] data_disk_size_gb: Disk size for each vm in the node type in GBs.\n :param pulumi.Input[bool] is_primary: The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input[int] vm_instance_count: The number of nodes in the node type.\n :param pulumi.Input['EndpointRangeDescriptionArgs'] application_ports: The range of ports from which cluster assigned port to Service Fabric applications.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] capacities: The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.\n :param pulumi.Input[Union[str, 'DiskType']] data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.\n :param pulumi.Input['EndpointRangeDescriptionArgs'] ephemeral_ports: The range of ephemeral ports that nodes in this node type should be configured with.\n :param pulumi.Input[bool] is_stateless: Indicates if the node type can only host Stateless workloads.\n :param pulumi.Input[bool] multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups.\n :param pulumi.Input[str] node_type_name: The name of the node type.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Azure resource tags.\n :param pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]] vm_extensions: Set of extensions that should be installed onto the virtual machines.\n :param pulumi.Input[str] vm_image_offer: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.\n :param pulumi.Input[str] vm_image_publisher: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.\n :param pulumi.Input[str] vm_image_sku: The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.\n :param pulumi.Input[str] vm_image_version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.\n :param pulumi.Input['VmManagedIdentityArgs'] vm_managed_identity: Identities for the virtual machine scale set under the node type.\n :param pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]] vm_secrets: The secrets to install in the virtual machines.\n :param pulumi.Input[str] vm_size: The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.\n " pulumi.set(__self__, 'cluster_name', cluster_name) pulumi.set(__self__, 'data_disk_size_gb', data_disk_size_gb) pulumi.set(__self__, 'is_primary', is_primary) pulumi.set(__self__, 'resource_group_name', resource_group_name) pulumi.set(__self__, 'vm_instance_count', vm_instance_count) if (application_ports is not None): pulumi.set(__self__, 'application_ports', application_ports) if (capacities is not None): pulumi.set(__self__, 'capacities', capacities) if (data_disk_type is not None): pulumi.set(__self__, 'data_disk_type', data_disk_type) if (ephemeral_ports is not None): pulumi.set(__self__, 'ephemeral_ports', ephemeral_ports) if (is_stateless is None): is_stateless = False if (is_stateless is not None): pulumi.set(__self__, 'is_stateless', is_stateless) if (multiple_placement_groups is None): multiple_placement_groups = False if (multiple_placement_groups is not None): pulumi.set(__self__, 'multiple_placement_groups', multiple_placement_groups) if (node_type_name is not None): pulumi.set(__self__, 'node_type_name', node_type_name) if (placement_properties is not None): pulumi.set(__self__, 'placement_properties', placement_properties) if (tags is not None): pulumi.set(__self__, 'tags', tags) if (vm_extensions is not None): pulumi.set(__self__, 'vm_extensions', vm_extensions) if (vm_image_offer is not None): pulumi.set(__self__, 'vm_image_offer', vm_image_offer) if (vm_image_publisher is not None): pulumi.set(__self__, 'vm_image_publisher', vm_image_publisher) if (vm_image_sku is not None): pulumi.set(__self__, 'vm_image_sku', vm_image_sku) if (vm_image_version is not None): pulumi.set(__self__, 'vm_image_version', vm_image_version) if (vm_managed_identity is not None): pulumi.set(__self__, 'vm_managed_identity', vm_managed_identity) if (vm_secrets is not None): pulumi.set(__self__, 'vm_secrets', vm_secrets) if (vm_size is not None): pulumi.set(__self__, 'vm_size', vm_size)
def __init__(__self__, *, cluster_name: pulumi.Input[str], data_disk_size_gb: pulumi.Input[int], is_primary: pulumi.Input[bool], resource_group_name: pulumi.Input[str], vm_instance_count: pulumi.Input[int], application_ports: Optional[pulumi.Input['EndpointRangeDescriptionArgs']]=None, capacities: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, data_disk_type: Optional[pulumi.Input[Union[(str, 'DiskType')]]]=None, ephemeral_ports: Optional[pulumi.Input['EndpointRangeDescriptionArgs']]=None, is_stateless: Optional[pulumi.Input[bool]]=None, multiple_placement_groups: Optional[pulumi.Input[bool]]=None, node_type_name: Optional[pulumi.Input[str]]=None, placement_properties: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, vm_extensions: Optional[pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]]]=None, vm_image_offer: Optional[pulumi.Input[str]]=None, vm_image_publisher: Optional[pulumi.Input[str]]=None, vm_image_sku: Optional[pulumi.Input[str]]=None, vm_image_version: Optional[pulumi.Input[str]]=None, vm_managed_identity: Optional[pulumi.Input['VmManagedIdentityArgs']]=None, vm_secrets: Optional[pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]]]=None, vm_size: Optional[pulumi.Input[str]]=None): "\n The set of arguments for constructing a NodeType resource.\n :param pulumi.Input[str] cluster_name: The name of the cluster resource.\n :param pulumi.Input[int] data_disk_size_gb: Disk size for each vm in the node type in GBs.\n :param pulumi.Input[bool] is_primary: The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input[int] vm_instance_count: The number of nodes in the node type.\n :param pulumi.Input['EndpointRangeDescriptionArgs'] application_ports: The range of ports from which cluster assigned port to Service Fabric applications.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] capacities: The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.\n :param pulumi.Input[Union[str, 'DiskType']] data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.\n :param pulumi.Input['EndpointRangeDescriptionArgs'] ephemeral_ports: The range of ephemeral ports that nodes in this node type should be configured with.\n :param pulumi.Input[bool] is_stateless: Indicates if the node type can only host Stateless workloads.\n :param pulumi.Input[bool] multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups.\n :param pulumi.Input[str] node_type_name: The name of the node type.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Azure resource tags.\n :param pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]] vm_extensions: Set of extensions that should be installed onto the virtual machines.\n :param pulumi.Input[str] vm_image_offer: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.\n :param pulumi.Input[str] vm_image_publisher: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.\n :param pulumi.Input[str] vm_image_sku: The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.\n :param pulumi.Input[str] vm_image_version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.\n :param pulumi.Input['VmManagedIdentityArgs'] vm_managed_identity: Identities for the virtual machine scale set under the node type.\n :param pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]] vm_secrets: The secrets to install in the virtual machines.\n :param pulumi.Input[str] vm_size: The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.\n " pulumi.set(__self__, 'cluster_name', cluster_name) pulumi.set(__self__, 'data_disk_size_gb', data_disk_size_gb) pulumi.set(__self__, 'is_primary', is_primary) pulumi.set(__self__, 'resource_group_name', resource_group_name) pulumi.set(__self__, 'vm_instance_count', vm_instance_count) if (application_ports is not None): pulumi.set(__self__, 'application_ports', application_ports) if (capacities is not None): pulumi.set(__self__, 'capacities', capacities) if (data_disk_type is not None): pulumi.set(__self__, 'data_disk_type', data_disk_type) if (ephemeral_ports is not None): pulumi.set(__self__, 'ephemeral_ports', ephemeral_ports) if (is_stateless is None): is_stateless = False if (is_stateless is not None): pulumi.set(__self__, 'is_stateless', is_stateless) if (multiple_placement_groups is None): multiple_placement_groups = False if (multiple_placement_groups is not None): pulumi.set(__self__, 'multiple_placement_groups', multiple_placement_groups) if (node_type_name is not None): pulumi.set(__self__, 'node_type_name', node_type_name) if (placement_properties is not None): pulumi.set(__self__, 'placement_properties', placement_properties) if (tags is not None): pulumi.set(__self__, 'tags', tags) if (vm_extensions is not None): pulumi.set(__self__, 'vm_extensions', vm_extensions) if (vm_image_offer is not None): pulumi.set(__self__, 'vm_image_offer', vm_image_offer) if (vm_image_publisher is not None): pulumi.set(__self__, 'vm_image_publisher', vm_image_publisher) if (vm_image_sku is not None): pulumi.set(__self__, 'vm_image_sku', vm_image_sku) if (vm_image_version is not None): pulumi.set(__self__, 'vm_image_version', vm_image_version) if (vm_managed_identity is not None): pulumi.set(__self__, 'vm_managed_identity', vm_managed_identity) if (vm_secrets is not None): pulumi.set(__self__, 'vm_secrets', vm_secrets) if (vm_size is not None): pulumi.set(__self__, 'vm_size', vm_size)<|docstring|>The set of arguments for constructing a NodeType resource. :param pulumi.Input[str] cluster_name: The name of the cluster resource. :param pulumi.Input[int] data_disk_size_gb: Disk size for each vm in the node type in GBs. :param pulumi.Input[bool] is_primary: The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters. :param pulumi.Input[str] resource_group_name: The name of the resource group. :param pulumi.Input[int] vm_instance_count: The number of nodes in the node type. :param pulumi.Input['EndpointRangeDescriptionArgs'] application_ports: The range of ports from which cluster assigned port to Service Fabric applications. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] capacities: The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has. :param pulumi.Input[Union[str, 'DiskType']] data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. :param pulumi.Input['EndpointRangeDescriptionArgs'] ephemeral_ports: The range of ephemeral ports that nodes in this node type should be configured with. :param pulumi.Input[bool] is_stateless: Indicates if the node type can only host Stateless workloads. :param pulumi.Input[bool] multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups. :param pulumi.Input[str] node_type_name: The name of the node type. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Azure resource tags. :param pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]] vm_extensions: Set of extensions that should be installed onto the virtual machines. :param pulumi.Input[str] vm_image_offer: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer. :param pulumi.Input[str] vm_image_publisher: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer. :param pulumi.Input[str] vm_image_sku: The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter. :param pulumi.Input[str] vm_image_version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. :param pulumi.Input['VmManagedIdentityArgs'] vm_managed_identity: Identities for the virtual machine scale set under the node type. :param pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]] vm_secrets: The secrets to install in the virtual machines. :param pulumi.Input[str] vm_size: The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.<|endoftext|>
91f4159503f65aa2c19cbdb220479ebe1abdbad7324c11f0317a9dec94517d30
@property @pulumi.getter(name='clusterName') def cluster_name(self) -> pulumi.Input[str]: '\n The name of the cluster resource.\n ' return pulumi.get(self, 'cluster_name')
The name of the cluster resource.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
cluster_name
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='clusterName') def cluster_name(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'cluster_name')
@property @pulumi.getter(name='clusterName') def cluster_name(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'cluster_name')<|docstring|>The name of the cluster resource.<|endoftext|>
79cc409019ca85f22cc9c09ca9897e6472090b0dc0e700bca14d70887f08c9c7
@property @pulumi.getter(name='dataDiskSizeGB') def data_disk_size_gb(self) -> pulumi.Input[int]: '\n Disk size for each vm in the node type in GBs.\n ' return pulumi.get(self, 'data_disk_size_gb')
Disk size for each vm in the node type in GBs.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
data_disk_size_gb
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='dataDiskSizeGB') def data_disk_size_gb(self) -> pulumi.Input[int]: '\n \n ' return pulumi.get(self, 'data_disk_size_gb')
@property @pulumi.getter(name='dataDiskSizeGB') def data_disk_size_gb(self) -> pulumi.Input[int]: '\n \n ' return pulumi.get(self, 'data_disk_size_gb')<|docstring|>Disk size for each vm in the node type in GBs.<|endoftext|>
641d6423197655fbd9fb4cdcbed921e371dc3515cb257e3aaca493fb97059063
@property @pulumi.getter(name='isPrimary') def is_primary(self) -> pulumi.Input[bool]: '\n The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.\n ' return pulumi.get(self, 'is_primary')
The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
is_primary
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='isPrimary') def is_primary(self) -> pulumi.Input[bool]: '\n \n ' return pulumi.get(self, 'is_primary')
@property @pulumi.getter(name='isPrimary') def is_primary(self) -> pulumi.Input[bool]: '\n \n ' return pulumi.get(self, 'is_primary')<|docstring|>The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.<|endoftext|>
98eb6c85f4a5186d9d5e838be1c375ba32ee58272931f0c5f93ad28266f15668
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> pulumi.Input[str]: '\n The name of the resource group.\n ' return pulumi.get(self, 'resource_group_name')
The name of the resource group.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
resource_group_name
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'resource_group_name')
@property @pulumi.getter(name='resourceGroupName') def resource_group_name(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'resource_group_name')<|docstring|>The name of the resource group.<|endoftext|>
505384660705b1f96b62ac7acffc4e7d859d3c785f4eadb66711a679e292e97b
@property @pulumi.getter(name='vmInstanceCount') def vm_instance_count(self) -> pulumi.Input[int]: '\n The number of nodes in the node type.\n ' return pulumi.get(self, 'vm_instance_count')
The number of nodes in the node type.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_instance_count
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmInstanceCount') def vm_instance_count(self) -> pulumi.Input[int]: '\n \n ' return pulumi.get(self, 'vm_instance_count')
@property @pulumi.getter(name='vmInstanceCount') def vm_instance_count(self) -> pulumi.Input[int]: '\n \n ' return pulumi.get(self, 'vm_instance_count')<|docstring|>The number of nodes in the node type.<|endoftext|>
fe3f0fa4305cbe5cf888b197e60f53f9cb2092c70284ee7c631c7d552fde373c
@property @pulumi.getter(name='applicationPorts') def application_ports(self) -> Optional[pulumi.Input['EndpointRangeDescriptionArgs']]: '\n The range of ports from which cluster assigned port to Service Fabric applications.\n ' return pulumi.get(self, 'application_ports')
The range of ports from which cluster assigned port to Service Fabric applications.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
application_ports
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='applicationPorts') def application_ports(self) -> Optional[pulumi.Input['EndpointRangeDescriptionArgs']]: '\n \n ' return pulumi.get(self, 'application_ports')
@property @pulumi.getter(name='applicationPorts') def application_ports(self) -> Optional[pulumi.Input['EndpointRangeDescriptionArgs']]: '\n \n ' return pulumi.get(self, 'application_ports')<|docstring|>The range of ports from which cluster assigned port to Service Fabric applications.<|endoftext|>
9f0de8a27421626b8b6eeff669603b61fab0d8d9a2adb47d6abd7281f8e2c81e
@property @pulumi.getter def capacities(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.\n ' return pulumi.get(self, 'capacities')
The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
capacities
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter def capacities(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n \n ' return pulumi.get(self, 'capacities')
@property @pulumi.getter def capacities(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n \n ' return pulumi.get(self, 'capacities')<|docstring|>The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.<|endoftext|>
81a042ea63c84b24ea4e7b91c7a4608c0091d5c10bf1d6d104e774d8825b31a1
@property @pulumi.getter(name='dataDiskType') def data_disk_type(self) -> Optional[pulumi.Input[Union[(str, 'DiskType')]]]: '\n Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.\n ' return pulumi.get(self, 'data_disk_type')
Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
data_disk_type
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='dataDiskType') def data_disk_type(self) -> Optional[pulumi.Input[Union[(str, 'DiskType')]]]: '\n \n ' return pulumi.get(self, 'data_disk_type')
@property @pulumi.getter(name='dataDiskType') def data_disk_type(self) -> Optional[pulumi.Input[Union[(str, 'DiskType')]]]: '\n \n ' return pulumi.get(self, 'data_disk_type')<|docstring|>Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.<|endoftext|>
7b9b8b89c756dac4fbe2abdb15e5886ba23aef8aed731a044cb2ef102f61b133
@property @pulumi.getter(name='ephemeralPorts') def ephemeral_ports(self) -> Optional[pulumi.Input['EndpointRangeDescriptionArgs']]: '\n The range of ephemeral ports that nodes in this node type should be configured with.\n ' return pulumi.get(self, 'ephemeral_ports')
The range of ephemeral ports that nodes in this node type should be configured with.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
ephemeral_ports
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='ephemeralPorts') def ephemeral_ports(self) -> Optional[pulumi.Input['EndpointRangeDescriptionArgs']]: '\n \n ' return pulumi.get(self, 'ephemeral_ports')
@property @pulumi.getter(name='ephemeralPorts') def ephemeral_ports(self) -> Optional[pulumi.Input['EndpointRangeDescriptionArgs']]: '\n \n ' return pulumi.get(self, 'ephemeral_ports')<|docstring|>The range of ephemeral ports that nodes in this node type should be configured with.<|endoftext|>
a684f9d341f65e4eca61fa6373baf3f6aef5cc7b739b371c387d83079636d59d
@property @pulumi.getter(name='isStateless') def is_stateless(self) -> Optional[pulumi.Input[bool]]: '\n Indicates if the node type can only host Stateless workloads.\n ' return pulumi.get(self, 'is_stateless')
Indicates if the node type can only host Stateless workloads.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
is_stateless
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='isStateless') def is_stateless(self) -> Optional[pulumi.Input[bool]]: '\n \n ' return pulumi.get(self, 'is_stateless')
@property @pulumi.getter(name='isStateless') def is_stateless(self) -> Optional[pulumi.Input[bool]]: '\n \n ' return pulumi.get(self, 'is_stateless')<|docstring|>Indicates if the node type can only host Stateless workloads.<|endoftext|>
a54242b267561cf04647a943dd91d62d782ebee43c586771e98eba31bc8bd3db
@property @pulumi.getter(name='multiplePlacementGroups') def multiple_placement_groups(self) -> Optional[pulumi.Input[bool]]: '\n Indicates if scale set associated with the node type can be composed of multiple placement groups.\n ' return pulumi.get(self, 'multiple_placement_groups')
Indicates if scale set associated with the node type can be composed of multiple placement groups.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
multiple_placement_groups
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='multiplePlacementGroups') def multiple_placement_groups(self) -> Optional[pulumi.Input[bool]]: '\n \n ' return pulumi.get(self, 'multiple_placement_groups')
@property @pulumi.getter(name='multiplePlacementGroups') def multiple_placement_groups(self) -> Optional[pulumi.Input[bool]]: '\n \n ' return pulumi.get(self, 'multiple_placement_groups')<|docstring|>Indicates if scale set associated with the node type can be composed of multiple placement groups.<|endoftext|>
891934ce1055c19f8e0f71b0a42af02a6d1401cbb7f9d8dd9af34b16eddd75f6
@property @pulumi.getter(name='nodeTypeName') def node_type_name(self) -> Optional[pulumi.Input[str]]: '\n The name of the node type.\n ' return pulumi.get(self, 'node_type_name')
The name of the node type.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
node_type_name
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='nodeTypeName') def node_type_name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'node_type_name')
@property @pulumi.getter(name='nodeTypeName') def node_type_name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'node_type_name')<|docstring|>The name of the node type.<|endoftext|>
a744587bb29fa2e3b0226aa5e65515e385297164fe324094e35364f191d94875
@property @pulumi.getter(name='placementProperties') def placement_properties(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.\n ' return pulumi.get(self, 'placement_properties')
The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
placement_properties
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='placementProperties') def placement_properties(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n \n ' return pulumi.get(self, 'placement_properties')
@property @pulumi.getter(name='placementProperties') def placement_properties(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n \n ' return pulumi.get(self, 'placement_properties')<|docstring|>The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.<|endoftext|>
d2ad48d74500be2ed95374dcf56b8b21ea5acdf9b7e1eb9474a2c3a845a3f7de
@property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n Azure resource tags.\n ' return pulumi.get(self, 'tags')
Azure resource tags.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
tags
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n \n ' return pulumi.get(self, 'tags')
@property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]: '\n \n ' return pulumi.get(self, 'tags')<|docstring|>Azure resource tags.<|endoftext|>
6be4e233af5e9d3c2f7f98ad597c98b3e3ffc9b0966d0094ee7738edc087a5ce
@property @pulumi.getter(name='vmExtensions') def vm_extensions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]]]: '\n Set of extensions that should be installed onto the virtual machines.\n ' return pulumi.get(self, 'vm_extensions')
Set of extensions that should be installed onto the virtual machines.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_extensions
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmExtensions') def vm_extensions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]]]: '\n \n ' return pulumi.get(self, 'vm_extensions')
@property @pulumi.getter(name='vmExtensions') def vm_extensions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['VMSSExtensionArgs']]]]: '\n \n ' return pulumi.get(self, 'vm_extensions')<|docstring|>Set of extensions that should be installed onto the virtual machines.<|endoftext|>
3029b89dc22a2b31b4e7fb463827989648eec5ef66f60d761ce58128992a0b5c
@property @pulumi.getter(name='vmImageOffer') def vm_image_offer(self) -> Optional[pulumi.Input[str]]: '\n The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.\n ' return pulumi.get(self, 'vm_image_offer')
The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_image_offer
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmImageOffer') def vm_image_offer(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'vm_image_offer')
@property @pulumi.getter(name='vmImageOffer') def vm_image_offer(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'vm_image_offer')<|docstring|>The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.<|endoftext|>
5918c58052f4581d39ed325a3dc63810e602937d9b81d20b1245df2bc87d6b76
@property @pulumi.getter(name='vmImagePublisher') def vm_image_publisher(self) -> Optional[pulumi.Input[str]]: '\n The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.\n ' return pulumi.get(self, 'vm_image_publisher')
The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_image_publisher
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmImagePublisher') def vm_image_publisher(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'vm_image_publisher')
@property @pulumi.getter(name='vmImagePublisher') def vm_image_publisher(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'vm_image_publisher')<|docstring|>The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.<|endoftext|>
dc6c1ee3a898075440ca5a4f57d657e17ed276caf4438f1ac01d3d840edf415d
@property @pulumi.getter(name='vmImageSku') def vm_image_sku(self) -> Optional[pulumi.Input[str]]: '\n The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.\n ' return pulumi.get(self, 'vm_image_sku')
The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_image_sku
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmImageSku') def vm_image_sku(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'vm_image_sku')
@property @pulumi.getter(name='vmImageSku') def vm_image_sku(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'vm_image_sku')<|docstring|>The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.<|endoftext|>
69b7d7088910c346e00e615882132def15e5fd32ff6968eed5ea412e799350d2
@property @pulumi.getter(name='vmImageVersion') def vm_image_version(self) -> Optional[pulumi.Input[str]]: "\n The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.\n " return pulumi.get(self, 'vm_image_version')
The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_image_version
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmImageVersion') def vm_image_version(self) -> Optional[pulumi.Input[str]]: "\n \n " return pulumi.get(self, 'vm_image_version')
@property @pulumi.getter(name='vmImageVersion') def vm_image_version(self) -> Optional[pulumi.Input[str]]: "\n \n " return pulumi.get(self, 'vm_image_version')<|docstring|>The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.<|endoftext|>
6ca43c36959668a402475f236bd191238f3d3da12efa22e21f6e33b8ffc175ba
@property @pulumi.getter(name='vmManagedIdentity') def vm_managed_identity(self) -> Optional[pulumi.Input['VmManagedIdentityArgs']]: '\n Identities for the virtual machine scale set under the node type.\n ' return pulumi.get(self, 'vm_managed_identity')
Identities for the virtual machine scale set under the node type.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_managed_identity
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmManagedIdentity') def vm_managed_identity(self) -> Optional[pulumi.Input['VmManagedIdentityArgs']]: '\n \n ' return pulumi.get(self, 'vm_managed_identity')
@property @pulumi.getter(name='vmManagedIdentity') def vm_managed_identity(self) -> Optional[pulumi.Input['VmManagedIdentityArgs']]: '\n \n ' return pulumi.get(self, 'vm_managed_identity')<|docstring|>Identities for the virtual machine scale set under the node type.<|endoftext|>
acf51520c66562a15df7d8624bdd1980276107981009967001e6d58606093bfa
@property @pulumi.getter(name='vmSecrets') def vm_secrets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]]]: '\n The secrets to install in the virtual machines.\n ' return pulumi.get(self, 'vm_secrets')
The secrets to install in the virtual machines.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_secrets
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmSecrets') def vm_secrets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]]]: '\n \n ' return pulumi.get(self, 'vm_secrets')
@property @pulumi.getter(name='vmSecrets') def vm_secrets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['VaultSecretGroupArgs']]]]: '\n \n ' return pulumi.get(self, 'vm_secrets')<|docstring|>The secrets to install in the virtual machines.<|endoftext|>
63f8bff09bda1900e5623d1dc959c8c14f709783fcb6b9086ffa0b2c73a40f73
@property @pulumi.getter(name='vmSize') def vm_size(self) -> Optional[pulumi.Input[str]]: '\n The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.\n ' return pulumi.get(self, 'vm_size')
The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_size
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmSize') def vm_size(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'vm_size')
@property @pulumi.getter(name='vmSize') def vm_size(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'vm_size')<|docstring|>The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.<|endoftext|>
8fc8619722876f25f85cd4f57dfb8e17afb9f6153946d9fdcc5a2d9de9c15e8a
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, application_ports: Optional[pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']]]=None, capacities: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, cluster_name: Optional[pulumi.Input[str]]=None, data_disk_size_gb: Optional[pulumi.Input[int]]=None, data_disk_type: Optional[pulumi.Input[Union[(str, 'DiskType')]]]=None, ephemeral_ports: Optional[pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']]]=None, is_primary: Optional[pulumi.Input[bool]]=None, is_stateless: Optional[pulumi.Input[bool]]=None, multiple_placement_groups: Optional[pulumi.Input[bool]]=None, node_type_name: Optional[pulumi.Input[str]]=None, placement_properties: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, vm_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VMSSExtensionArgs']]]]]=None, vm_image_offer: Optional[pulumi.Input[str]]=None, vm_image_publisher: Optional[pulumi.Input[str]]=None, vm_image_sku: Optional[pulumi.Input[str]]=None, vm_image_version: Optional[pulumi.Input[str]]=None, vm_instance_count: Optional[pulumi.Input[int]]=None, vm_managed_identity: Optional[pulumi.Input[pulumi.InputType['VmManagedIdentityArgs']]]=None, vm_secrets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VaultSecretGroupArgs']]]]]=None, vm_size: Optional[pulumi.Input[str]]=None, __props__=None): "\n Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.\n\n :param str resource_name: The name of the resource.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']] application_ports: The range of ports from which cluster assigned port to Service Fabric applications.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] capacities: The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.\n :param pulumi.Input[str] cluster_name: The name of the cluster resource.\n :param pulumi.Input[int] data_disk_size_gb: Disk size for each vm in the node type in GBs.\n :param pulumi.Input[Union[str, 'DiskType']] data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.\n :param pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']] ephemeral_ports: The range of ephemeral ports that nodes in this node type should be configured with.\n :param pulumi.Input[bool] is_primary: The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.\n :param pulumi.Input[bool] is_stateless: Indicates if the node type can only host Stateless workloads.\n :param pulumi.Input[bool] multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups.\n :param pulumi.Input[str] node_type_name: The name of the node type.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Azure resource tags.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VMSSExtensionArgs']]]] vm_extensions: Set of extensions that should be installed onto the virtual machines.\n :param pulumi.Input[str] vm_image_offer: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.\n :param pulumi.Input[str] vm_image_publisher: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.\n :param pulumi.Input[str] vm_image_sku: The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.\n :param pulumi.Input[str] vm_image_version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.\n :param pulumi.Input[int] vm_instance_count: The number of nodes in the node type.\n :param pulumi.Input[pulumi.InputType['VmManagedIdentityArgs']] vm_managed_identity: Identities for the virtual machine scale set under the node type.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VaultSecretGroupArgs']]]] vm_secrets: The secrets to install in the virtual machines.\n :param pulumi.Input[str] vm_size: The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.\n " ...
Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']] application_ports: The range of ports from which cluster assigned port to Service Fabric applications. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] capacities: The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has. :param pulumi.Input[str] cluster_name: The name of the cluster resource. :param pulumi.Input[int] data_disk_size_gb: Disk size for each vm in the node type in GBs. :param pulumi.Input[Union[str, 'DiskType']] data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. :param pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']] ephemeral_ports: The range of ephemeral ports that nodes in this node type should be configured with. :param pulumi.Input[bool] is_primary: The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters. :param pulumi.Input[bool] is_stateless: Indicates if the node type can only host Stateless workloads. :param pulumi.Input[bool] multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups. :param pulumi.Input[str] node_type_name: The name of the node type. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. :param pulumi.Input[str] resource_group_name: The name of the resource group. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Azure resource tags. :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VMSSExtensionArgs']]]] vm_extensions: Set of extensions that should be installed onto the virtual machines. :param pulumi.Input[str] vm_image_offer: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer. :param pulumi.Input[str] vm_image_publisher: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer. :param pulumi.Input[str] vm_image_sku: The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter. :param pulumi.Input[str] vm_image_version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. :param pulumi.Input[int] vm_instance_count: The number of nodes in the node type. :param pulumi.Input[pulumi.InputType['VmManagedIdentityArgs']] vm_managed_identity: Identities for the virtual machine scale set under the node type. :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VaultSecretGroupArgs']]]] vm_secrets: The secrets to install in the virtual machines. :param pulumi.Input[str] vm_size: The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
__init__
polivbr/pulumi-azure-native
0
python
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, application_ports: Optional[pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']]]=None, capacities: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, cluster_name: Optional[pulumi.Input[str]]=None, data_disk_size_gb: Optional[pulumi.Input[int]]=None, data_disk_type: Optional[pulumi.Input[Union[(str, 'DiskType')]]]=None, ephemeral_ports: Optional[pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']]]=None, is_primary: Optional[pulumi.Input[bool]]=None, is_stateless: Optional[pulumi.Input[bool]]=None, multiple_placement_groups: Optional[pulumi.Input[bool]]=None, node_type_name: Optional[pulumi.Input[str]]=None, placement_properties: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, vm_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VMSSExtensionArgs']]]]]=None, vm_image_offer: Optional[pulumi.Input[str]]=None, vm_image_publisher: Optional[pulumi.Input[str]]=None, vm_image_sku: Optional[pulumi.Input[str]]=None, vm_image_version: Optional[pulumi.Input[str]]=None, vm_instance_count: Optional[pulumi.Input[int]]=None, vm_managed_identity: Optional[pulumi.Input[pulumi.InputType['VmManagedIdentityArgs']]]=None, vm_secrets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VaultSecretGroupArgs']]]]]=None, vm_size: Optional[pulumi.Input[str]]=None, __props__=None): "\n Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.\n\n :param str resource_name: The name of the resource.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']] application_ports: The range of ports from which cluster assigned port to Service Fabric applications.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] capacities: The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.\n :param pulumi.Input[str] cluster_name: The name of the cluster resource.\n :param pulumi.Input[int] data_disk_size_gb: Disk size for each vm in the node type in GBs.\n :param pulumi.Input[Union[str, 'DiskType']] data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.\n :param pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']] ephemeral_ports: The range of ephemeral ports that nodes in this node type should be configured with.\n :param pulumi.Input[bool] is_primary: The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.\n :param pulumi.Input[bool] is_stateless: Indicates if the node type can only host Stateless workloads.\n :param pulumi.Input[bool] multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups.\n :param pulumi.Input[str] node_type_name: The name of the node type.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Azure resource tags.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VMSSExtensionArgs']]]] vm_extensions: Set of extensions that should be installed onto the virtual machines.\n :param pulumi.Input[str] vm_image_offer: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.\n :param pulumi.Input[str] vm_image_publisher: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.\n :param pulumi.Input[str] vm_image_sku: The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.\n :param pulumi.Input[str] vm_image_version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.\n :param pulumi.Input[int] vm_instance_count: The number of nodes in the node type.\n :param pulumi.Input[pulumi.InputType['VmManagedIdentityArgs']] vm_managed_identity: Identities for the virtual machine scale set under the node type.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VaultSecretGroupArgs']]]] vm_secrets: The secrets to install in the virtual machines.\n :param pulumi.Input[str] vm_size: The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.\n " ...
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, application_ports: Optional[pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']]]=None, capacities: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, cluster_name: Optional[pulumi.Input[str]]=None, data_disk_size_gb: Optional[pulumi.Input[int]]=None, data_disk_type: Optional[pulumi.Input[Union[(str, 'DiskType')]]]=None, ephemeral_ports: Optional[pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']]]=None, is_primary: Optional[pulumi.Input[bool]]=None, is_stateless: Optional[pulumi.Input[bool]]=None, multiple_placement_groups: Optional[pulumi.Input[bool]]=None, node_type_name: Optional[pulumi.Input[str]]=None, placement_properties: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, vm_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VMSSExtensionArgs']]]]]=None, vm_image_offer: Optional[pulumi.Input[str]]=None, vm_image_publisher: Optional[pulumi.Input[str]]=None, vm_image_sku: Optional[pulumi.Input[str]]=None, vm_image_version: Optional[pulumi.Input[str]]=None, vm_instance_count: Optional[pulumi.Input[int]]=None, vm_managed_identity: Optional[pulumi.Input[pulumi.InputType['VmManagedIdentityArgs']]]=None, vm_secrets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VaultSecretGroupArgs']]]]]=None, vm_size: Optional[pulumi.Input[str]]=None, __props__=None): "\n Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.\n\n :param str resource_name: The name of the resource.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']] application_ports: The range of ports from which cluster assigned port to Service Fabric applications.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] capacities: The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.\n :param pulumi.Input[str] cluster_name: The name of the cluster resource.\n :param pulumi.Input[int] data_disk_size_gb: Disk size for each vm in the node type in GBs.\n :param pulumi.Input[Union[str, 'DiskType']] data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.\n :param pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']] ephemeral_ports: The range of ephemeral ports that nodes in this node type should be configured with.\n :param pulumi.Input[bool] is_primary: The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.\n :param pulumi.Input[bool] is_stateless: Indicates if the node type can only host Stateless workloads.\n :param pulumi.Input[bool] multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups.\n :param pulumi.Input[str] node_type_name: The name of the node type.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Azure resource tags.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VMSSExtensionArgs']]]] vm_extensions: Set of extensions that should be installed onto the virtual machines.\n :param pulumi.Input[str] vm_image_offer: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.\n :param pulumi.Input[str] vm_image_publisher: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.\n :param pulumi.Input[str] vm_image_sku: The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.\n :param pulumi.Input[str] vm_image_version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.\n :param pulumi.Input[int] vm_instance_count: The number of nodes in the node type.\n :param pulumi.Input[pulumi.InputType['VmManagedIdentityArgs']] vm_managed_identity: Identities for the virtual machine scale set under the node type.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VaultSecretGroupArgs']]]] vm_secrets: The secrets to install in the virtual machines.\n :param pulumi.Input[str] vm_size: The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.\n " ...<|docstring|>Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']] application_ports: The range of ports from which cluster assigned port to Service Fabric applications. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] capacities: The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has. :param pulumi.Input[str] cluster_name: The name of the cluster resource. :param pulumi.Input[int] data_disk_size_gb: Disk size for each vm in the node type in GBs. :param pulumi.Input[Union[str, 'DiskType']] data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. :param pulumi.Input[pulumi.InputType['EndpointRangeDescriptionArgs']] ephemeral_ports: The range of ephemeral ports that nodes in this node type should be configured with. :param pulumi.Input[bool] is_primary: The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters. :param pulumi.Input[bool] is_stateless: Indicates if the node type can only host Stateless workloads. :param pulumi.Input[bool] multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups. :param pulumi.Input[str] node_type_name: The name of the node type. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. :param pulumi.Input[str] resource_group_name: The name of the resource group. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Azure resource tags. :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VMSSExtensionArgs']]]] vm_extensions: Set of extensions that should be installed onto the virtual machines. :param pulumi.Input[str] vm_image_offer: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer. :param pulumi.Input[str] vm_image_publisher: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer. :param pulumi.Input[str] vm_image_sku: The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter. :param pulumi.Input[str] vm_image_version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. :param pulumi.Input[int] vm_instance_count: The number of nodes in the node type. :param pulumi.Input[pulumi.InputType['VmManagedIdentityArgs']] vm_managed_identity: Identities for the virtual machine scale set under the node type. :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VaultSecretGroupArgs']]]] vm_secrets: The secrets to install in the virtual machines. :param pulumi.Input[str] vm_size: The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.<|endoftext|>
f7a46d6476023bbe6170d33ac3a817587452a3e253f04068a60ceb68c7b6ea2a
@overload def __init__(__self__, resource_name: str, args: NodeTypeArgs, opts: Optional[pulumi.ResourceOptions]=None): "\n Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.\n\n :param str resource_name: The name of the resource.\n :param NodeTypeArgs args: The arguments to use to populate this resource's properties.\n :param pulumi.ResourceOptions opts: Options for the resource.\n " ...
Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. :param str resource_name: The name of the resource. :param NodeTypeArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
__init__
polivbr/pulumi-azure-native
0
python
@overload def __init__(__self__, resource_name: str, args: NodeTypeArgs, opts: Optional[pulumi.ResourceOptions]=None): "\n Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.\n\n :param str resource_name: The name of the resource.\n :param NodeTypeArgs args: The arguments to use to populate this resource's properties.\n :param pulumi.ResourceOptions opts: Options for the resource.\n " ...
@overload def __init__(__self__, resource_name: str, args: NodeTypeArgs, opts: Optional[pulumi.ResourceOptions]=None): "\n Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.\n\n :param str resource_name: The name of the resource.\n :param NodeTypeArgs args: The arguments to use to populate this resource's properties.\n :param pulumi.ResourceOptions opts: Options for the resource.\n " ...<|docstring|>Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. :param str resource_name: The name of the resource. :param NodeTypeArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource.<|endoftext|>
d02e442e725031dc51aef18497aa22e64d97228db241b7847d2ff5572ce81d7b
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'NodeType': "\n Get an existing NodeType resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The unique name of the resulting resource.\n :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.\n :param pulumi.ResourceOptions opts: Options for the resource.\n " opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = NodeTypeArgs.__new__(NodeTypeArgs) __props__.__dict__['application_ports'] = None __props__.__dict__['capacities'] = None __props__.__dict__['data_disk_size_gb'] = None __props__.__dict__['data_disk_type'] = None __props__.__dict__['ephemeral_ports'] = None __props__.__dict__['is_primary'] = None __props__.__dict__['is_stateless'] = None __props__.__dict__['multiple_placement_groups'] = None __props__.__dict__['name'] = None __props__.__dict__['placement_properties'] = None __props__.__dict__['provisioning_state'] = None __props__.__dict__['system_data'] = None __props__.__dict__['tags'] = None __props__.__dict__['type'] = None __props__.__dict__['vm_extensions'] = None __props__.__dict__['vm_image_offer'] = None __props__.__dict__['vm_image_publisher'] = None __props__.__dict__['vm_image_sku'] = None __props__.__dict__['vm_image_version'] = None __props__.__dict__['vm_instance_count'] = None __props__.__dict__['vm_managed_identity'] = None __props__.__dict__['vm_secrets'] = None __props__.__dict__['vm_size'] = None return NodeType(resource_name, opts=opts, __props__=__props__)
Get an existing NodeType resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
get
polivbr/pulumi-azure-native
0
python
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'NodeType': "\n Get an existing NodeType resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The unique name of the resulting resource.\n :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.\n :param pulumi.ResourceOptions opts: Options for the resource.\n " opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = NodeTypeArgs.__new__(NodeTypeArgs) __props__.__dict__['application_ports'] = None __props__.__dict__['capacities'] = None __props__.__dict__['data_disk_size_gb'] = None __props__.__dict__['data_disk_type'] = None __props__.__dict__['ephemeral_ports'] = None __props__.__dict__['is_primary'] = None __props__.__dict__['is_stateless'] = None __props__.__dict__['multiple_placement_groups'] = None __props__.__dict__['name'] = None __props__.__dict__['placement_properties'] = None __props__.__dict__['provisioning_state'] = None __props__.__dict__['system_data'] = None __props__.__dict__['tags'] = None __props__.__dict__['type'] = None __props__.__dict__['vm_extensions'] = None __props__.__dict__['vm_image_offer'] = None __props__.__dict__['vm_image_publisher'] = None __props__.__dict__['vm_image_sku'] = None __props__.__dict__['vm_image_version'] = None __props__.__dict__['vm_instance_count'] = None __props__.__dict__['vm_managed_identity'] = None __props__.__dict__['vm_secrets'] = None __props__.__dict__['vm_size'] = None return NodeType(resource_name, opts=opts, __props__=__props__)
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'NodeType': "\n Get an existing NodeType resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The unique name of the resulting resource.\n :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.\n :param pulumi.ResourceOptions opts: Options for the resource.\n " opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = NodeTypeArgs.__new__(NodeTypeArgs) __props__.__dict__['application_ports'] = None __props__.__dict__['capacities'] = None __props__.__dict__['data_disk_size_gb'] = None __props__.__dict__['data_disk_type'] = None __props__.__dict__['ephemeral_ports'] = None __props__.__dict__['is_primary'] = None __props__.__dict__['is_stateless'] = None __props__.__dict__['multiple_placement_groups'] = None __props__.__dict__['name'] = None __props__.__dict__['placement_properties'] = None __props__.__dict__['provisioning_state'] = None __props__.__dict__['system_data'] = None __props__.__dict__['tags'] = None __props__.__dict__['type'] = None __props__.__dict__['vm_extensions'] = None __props__.__dict__['vm_image_offer'] = None __props__.__dict__['vm_image_publisher'] = None __props__.__dict__['vm_image_sku'] = None __props__.__dict__['vm_image_version'] = None __props__.__dict__['vm_instance_count'] = None __props__.__dict__['vm_managed_identity'] = None __props__.__dict__['vm_secrets'] = None __props__.__dict__['vm_size'] = None return NodeType(resource_name, opts=opts, __props__=__props__)<|docstring|>Get an existing NodeType resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource.<|endoftext|>
8edbb27f5ab5da248ce538753d15f8067fdf0dcad09e08e52230111fdecc1bff
@property @pulumi.getter(name='applicationPorts') def application_ports(self) -> pulumi.Output[Optional['outputs.EndpointRangeDescriptionResponse']]: '\n The range of ports from which cluster assigned port to Service Fabric applications.\n ' return pulumi.get(self, 'application_ports')
The range of ports from which cluster assigned port to Service Fabric applications.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
application_ports
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='applicationPorts') def application_ports(self) -> pulumi.Output[Optional['outputs.EndpointRangeDescriptionResponse']]: '\n \n ' return pulumi.get(self, 'application_ports')
@property @pulumi.getter(name='applicationPorts') def application_ports(self) -> pulumi.Output[Optional['outputs.EndpointRangeDescriptionResponse']]: '\n \n ' return pulumi.get(self, 'application_ports')<|docstring|>The range of ports from which cluster assigned port to Service Fabric applications.<|endoftext|>
4acdf9c15d3b307d5460bd2304c1d4b078115c7208206dfac918ea283fac2df3
@property @pulumi.getter def capacities(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.\n ' return pulumi.get(self, 'capacities')
The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
capacities
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter def capacities(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n \n ' return pulumi.get(self, 'capacities')
@property @pulumi.getter def capacities(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n \n ' return pulumi.get(self, 'capacities')<|docstring|>The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.<|endoftext|>
84f3a767f698bdd6ab77411d80bdb238739c21585b418f4901ce6f992439fb5b
@property @pulumi.getter(name='dataDiskSizeGB') def data_disk_size_gb(self) -> pulumi.Output[int]: '\n Disk size for each vm in the node type in GBs.\n ' return pulumi.get(self, 'data_disk_size_gb')
Disk size for each vm in the node type in GBs.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
data_disk_size_gb
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='dataDiskSizeGB') def data_disk_size_gb(self) -> pulumi.Output[int]: '\n \n ' return pulumi.get(self, 'data_disk_size_gb')
@property @pulumi.getter(name='dataDiskSizeGB') def data_disk_size_gb(self) -> pulumi.Output[int]: '\n \n ' return pulumi.get(self, 'data_disk_size_gb')<|docstring|>Disk size for each vm in the node type in GBs.<|endoftext|>
b8f8d2f0ffb45eb36c89af837ace3f50f6511fe61c78b6e20fdffd89a6b202ae
@property @pulumi.getter(name='dataDiskType') def data_disk_type(self) -> pulumi.Output[Optional[str]]: '\n Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.\n ' return pulumi.get(self, 'data_disk_type')
Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
data_disk_type
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='dataDiskType') def data_disk_type(self) -> pulumi.Output[Optional[str]]: '\n \n ' return pulumi.get(self, 'data_disk_type')
@property @pulumi.getter(name='dataDiskType') def data_disk_type(self) -> pulumi.Output[Optional[str]]: '\n \n ' return pulumi.get(self, 'data_disk_type')<|docstring|>Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.<|endoftext|>
df7c5037daf4e73db536995eb83bae04c0cf0fd94d129117c27e511f5a4247ac
@property @pulumi.getter(name='ephemeralPorts') def ephemeral_ports(self) -> pulumi.Output[Optional['outputs.EndpointRangeDescriptionResponse']]: '\n The range of ephemeral ports that nodes in this node type should be configured with.\n ' return pulumi.get(self, 'ephemeral_ports')
The range of ephemeral ports that nodes in this node type should be configured with.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
ephemeral_ports
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='ephemeralPorts') def ephemeral_ports(self) -> pulumi.Output[Optional['outputs.EndpointRangeDescriptionResponse']]: '\n \n ' return pulumi.get(self, 'ephemeral_ports')
@property @pulumi.getter(name='ephemeralPorts') def ephemeral_ports(self) -> pulumi.Output[Optional['outputs.EndpointRangeDescriptionResponse']]: '\n \n ' return pulumi.get(self, 'ephemeral_ports')<|docstring|>The range of ephemeral ports that nodes in this node type should be configured with.<|endoftext|>
ec9433a1dff92a3849979e5271b125f46198b3fedbd47227fd1c719594046e4b
@property @pulumi.getter(name='isPrimary') def is_primary(self) -> pulumi.Output[bool]: '\n The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.\n ' return pulumi.get(self, 'is_primary')
The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
is_primary
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='isPrimary') def is_primary(self) -> pulumi.Output[bool]: '\n \n ' return pulumi.get(self, 'is_primary')
@property @pulumi.getter(name='isPrimary') def is_primary(self) -> pulumi.Output[bool]: '\n \n ' return pulumi.get(self, 'is_primary')<|docstring|>The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.<|endoftext|>
7423ae33d09dc294dce63a3ea6476b0765c4f4649d252967bb39355b4034e74e
@property @pulumi.getter(name='isStateless') def is_stateless(self) -> pulumi.Output[Optional[bool]]: '\n Indicates if the node type can only host Stateless workloads.\n ' return pulumi.get(self, 'is_stateless')
Indicates if the node type can only host Stateless workloads.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
is_stateless
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='isStateless') def is_stateless(self) -> pulumi.Output[Optional[bool]]: '\n \n ' return pulumi.get(self, 'is_stateless')
@property @pulumi.getter(name='isStateless') def is_stateless(self) -> pulumi.Output[Optional[bool]]: '\n \n ' return pulumi.get(self, 'is_stateless')<|docstring|>Indicates if the node type can only host Stateless workloads.<|endoftext|>
488ba4369fa9b3041b52a7794259d85c1244de1ba8bd3b775413c6ba4004b863
@property @pulumi.getter(name='multiplePlacementGroups') def multiple_placement_groups(self) -> pulumi.Output[Optional[bool]]: '\n Indicates if scale set associated with the node type can be composed of multiple placement groups.\n ' return pulumi.get(self, 'multiple_placement_groups')
Indicates if scale set associated with the node type can be composed of multiple placement groups.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
multiple_placement_groups
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='multiplePlacementGroups') def multiple_placement_groups(self) -> pulumi.Output[Optional[bool]]: '\n \n ' return pulumi.get(self, 'multiple_placement_groups')
@property @pulumi.getter(name='multiplePlacementGroups') def multiple_placement_groups(self) -> pulumi.Output[Optional[bool]]: '\n \n ' return pulumi.get(self, 'multiple_placement_groups')<|docstring|>Indicates if scale set associated with the node type can be composed of multiple placement groups.<|endoftext|>
721c782f20ef337abdf9d991847b51dec0a2b625da009bd6b13fc31a3e4def2c
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n Azure resource name.\n ' return pulumi.get(self, 'name')
Azure resource name.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
name
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>Azure resource name.<|endoftext|>
5d581ab538c20150462d627bc644d44f3c44802d7f87e205e413694a88bba688
@property @pulumi.getter(name='placementProperties') def placement_properties(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.\n ' return pulumi.get(self, 'placement_properties')
The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
placement_properties
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='placementProperties') def placement_properties(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n \n ' return pulumi.get(self, 'placement_properties')
@property @pulumi.getter(name='placementProperties') def placement_properties(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n \n ' return pulumi.get(self, 'placement_properties')<|docstring|>The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.<|endoftext|>
73cbe380fa9be9eb1083fe2e96416ce5b7fb4d6baa3095d4508bcf2f90753a5b
@property @pulumi.getter(name='provisioningState') def provisioning_state(self) -> pulumi.Output[str]: '\n The provisioning state of the managed cluster resource.\n ' return pulumi.get(self, 'provisioning_state')
The provisioning state of the managed cluster resource.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
provisioning_state
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='provisioningState') def provisioning_state(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'provisioning_state')
@property @pulumi.getter(name='provisioningState') def provisioning_state(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'provisioning_state')<|docstring|>The provisioning state of the managed cluster resource.<|endoftext|>
77ff99fdf31084d6af0c9b83478af9b5fb69a279c25c4cddc7c5a4234772fe27
@property @pulumi.getter(name='systemData') def system_data(self) -> pulumi.Output['outputs.SystemDataResponse']: '\n Metadata pertaining to creation and last modification of the resource.\n ' return pulumi.get(self, 'system_data')
Metadata pertaining to creation and last modification of the resource.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
system_data
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='systemData') def system_data(self) -> pulumi.Output['outputs.SystemDataResponse']: '\n \n ' return pulumi.get(self, 'system_data')
@property @pulumi.getter(name='systemData') def system_data(self) -> pulumi.Output['outputs.SystemDataResponse']: '\n \n ' return pulumi.get(self, 'system_data')<|docstring|>Metadata pertaining to creation and last modification of the resource.<|endoftext|>
6d1a452a09c56b6d2867db287f8270888723c247484107467350fd171695df4a
@property @pulumi.getter def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n Azure resource tags.\n ' return pulumi.get(self, 'tags')
Azure resource tags.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
tags
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n \n ' return pulumi.get(self, 'tags')
@property @pulumi.getter def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]: '\n \n ' return pulumi.get(self, 'tags')<|docstring|>Azure resource tags.<|endoftext|>
a6fb1638d2453686fcfbc8b0f024490117759c5d17387bfce58d44117d9f21d5
@property @pulumi.getter def type(self) -> pulumi.Output[str]: '\n Azure resource type.\n ' return pulumi.get(self, 'type')
Azure resource type.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
type
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter def type(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'type')
@property @pulumi.getter def type(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'type')<|docstring|>Azure resource type.<|endoftext|>
f0e05de2e9ee77db2b043a61527207c5df020e591dc48dccc4720791c0828c85
@property @pulumi.getter(name='vmExtensions') def vm_extensions(self) -> pulumi.Output[Optional[Sequence['outputs.VMSSExtensionResponse']]]: '\n Set of extensions that should be installed onto the virtual machines.\n ' return pulumi.get(self, 'vm_extensions')
Set of extensions that should be installed onto the virtual machines.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_extensions
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmExtensions') def vm_extensions(self) -> pulumi.Output[Optional[Sequence['outputs.VMSSExtensionResponse']]]: '\n \n ' return pulumi.get(self, 'vm_extensions')
@property @pulumi.getter(name='vmExtensions') def vm_extensions(self) -> pulumi.Output[Optional[Sequence['outputs.VMSSExtensionResponse']]]: '\n \n ' return pulumi.get(self, 'vm_extensions')<|docstring|>Set of extensions that should be installed onto the virtual machines.<|endoftext|>
268b2360b366a90cc9a53afc747dfe656ef65a62154aa78d675eedf8dbec28bd
@property @pulumi.getter(name='vmImageOffer') def vm_image_offer(self) -> pulumi.Output[Optional[str]]: '\n The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.\n ' return pulumi.get(self, 'vm_image_offer')
The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_image_offer
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmImageOffer') def vm_image_offer(self) -> pulumi.Output[Optional[str]]: '\n \n ' return pulumi.get(self, 'vm_image_offer')
@property @pulumi.getter(name='vmImageOffer') def vm_image_offer(self) -> pulumi.Output[Optional[str]]: '\n \n ' return pulumi.get(self, 'vm_image_offer')<|docstring|>The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.<|endoftext|>
002ddf16b7d1beda811fa9bb429d40ceef6130201d05c75869db64775c37409d
@property @pulumi.getter(name='vmImagePublisher') def vm_image_publisher(self) -> pulumi.Output[Optional[str]]: '\n The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.\n ' return pulumi.get(self, 'vm_image_publisher')
The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_image_publisher
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmImagePublisher') def vm_image_publisher(self) -> pulumi.Output[Optional[str]]: '\n \n ' return pulumi.get(self, 'vm_image_publisher')
@property @pulumi.getter(name='vmImagePublisher') def vm_image_publisher(self) -> pulumi.Output[Optional[str]]: '\n \n ' return pulumi.get(self, 'vm_image_publisher')<|docstring|>The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.<|endoftext|>
18af5fc915148f7538691f0fe541d5d6b70790f6996769736d69a0aa0290c606
@property @pulumi.getter(name='vmImageSku') def vm_image_sku(self) -> pulumi.Output[Optional[str]]: '\n The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.\n ' return pulumi.get(self, 'vm_image_sku')
The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_image_sku
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmImageSku') def vm_image_sku(self) -> pulumi.Output[Optional[str]]: '\n \n ' return pulumi.get(self, 'vm_image_sku')
@property @pulumi.getter(name='vmImageSku') def vm_image_sku(self) -> pulumi.Output[Optional[str]]: '\n \n ' return pulumi.get(self, 'vm_image_sku')<|docstring|>The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.<|endoftext|>
9d0410b38206de81f19338a8bc648f037b40420564c33246569c7e0b7c75ea45
@property @pulumi.getter(name='vmImageVersion') def vm_image_version(self) -> pulumi.Output[Optional[str]]: "\n The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.\n " return pulumi.get(self, 'vm_image_version')
The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_image_version
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmImageVersion') def vm_image_version(self) -> pulumi.Output[Optional[str]]: "\n \n " return pulumi.get(self, 'vm_image_version')
@property @pulumi.getter(name='vmImageVersion') def vm_image_version(self) -> pulumi.Output[Optional[str]]: "\n \n " return pulumi.get(self, 'vm_image_version')<|docstring|>The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.<|endoftext|>
753364731bff2de105fd6f64de1dd8a46047700085ea0614ca3d01bdaa01ad40
@property @pulumi.getter(name='vmInstanceCount') def vm_instance_count(self) -> pulumi.Output[int]: '\n The number of nodes in the node type.\n ' return pulumi.get(self, 'vm_instance_count')
The number of nodes in the node type.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_instance_count
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmInstanceCount') def vm_instance_count(self) -> pulumi.Output[int]: '\n \n ' return pulumi.get(self, 'vm_instance_count')
@property @pulumi.getter(name='vmInstanceCount') def vm_instance_count(self) -> pulumi.Output[int]: '\n \n ' return pulumi.get(self, 'vm_instance_count')<|docstring|>The number of nodes in the node type.<|endoftext|>
9bf67215d714adafd0092942069552e607c90bb51b2c2579765152093c951dfe
@property @pulumi.getter(name='vmManagedIdentity') def vm_managed_identity(self) -> pulumi.Output[Optional['outputs.VmManagedIdentityResponse']]: '\n Identities for the virtual machine scale set under the node type.\n ' return pulumi.get(self, 'vm_managed_identity')
Identities for the virtual machine scale set under the node type.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_managed_identity
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmManagedIdentity') def vm_managed_identity(self) -> pulumi.Output[Optional['outputs.VmManagedIdentityResponse']]: '\n \n ' return pulumi.get(self, 'vm_managed_identity')
@property @pulumi.getter(name='vmManagedIdentity') def vm_managed_identity(self) -> pulumi.Output[Optional['outputs.VmManagedIdentityResponse']]: '\n \n ' return pulumi.get(self, 'vm_managed_identity')<|docstring|>Identities for the virtual machine scale set under the node type.<|endoftext|>
487dc44b3119c62f2e3b282224c6cda87443c94b55fe6863d98bc00374e5d26f
@property @pulumi.getter(name='vmSecrets') def vm_secrets(self) -> pulumi.Output[Optional[Sequence['outputs.VaultSecretGroupResponse']]]: '\n The secrets to install in the virtual machines.\n ' return pulumi.get(self, 'vm_secrets')
The secrets to install in the virtual machines.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_secrets
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmSecrets') def vm_secrets(self) -> pulumi.Output[Optional[Sequence['outputs.VaultSecretGroupResponse']]]: '\n \n ' return pulumi.get(self, 'vm_secrets')
@property @pulumi.getter(name='vmSecrets') def vm_secrets(self) -> pulumi.Output[Optional[Sequence['outputs.VaultSecretGroupResponse']]]: '\n \n ' return pulumi.get(self, 'vm_secrets')<|docstring|>The secrets to install in the virtual machines.<|endoftext|>
d1bcf9ca15f7c05f302337b4803022528afcb3e4b35ca0f6f861257513ea7781
@property @pulumi.getter(name='vmSize') def vm_size(self) -> pulumi.Output[Optional[str]]: '\n The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.\n ' return pulumi.get(self, 'vm_size')
The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.
sdk/python/pulumi_azure_native/servicefabric/v20210501/node_type.py
vm_size
polivbr/pulumi-azure-native
0
python
@property @pulumi.getter(name='vmSize') def vm_size(self) -> pulumi.Output[Optional[str]]: '\n \n ' return pulumi.get(self, 'vm_size')
@property @pulumi.getter(name='vmSize') def vm_size(self) -> pulumi.Output[Optional[str]]: '\n \n ' return pulumi.get(self, 'vm_size')<|docstring|>The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.<|endoftext|>
aeb25c9b78bdd85754f3a32c59843f229f7bc6e982effebde5fba27501a4b335
def centerize(src, shape, margin_color=None, return_mask=False): 'Centerize image for specified image size\n Parameters\n ----------\n src: numpy.ndarray\n Image to centerize\n shape: tuple of int\n Image shape (height, width) or (height, width, channel)\n margin_color: numpy.ndarray\n Color to be filled in the blank.\n return_mask: numpy.ndarray\n Mask for centerized image.\n ' if (src.shape[:2] == shape[:2]): if return_mask: return (src, np.ones(shape[:2], dtype=bool)) else: return src if (len(shape) != src.ndim): shape = (list(shape) + [src.shape[2]]) centerized = np.zeros(shape, dtype=src.dtype) if margin_color: centerized[(:, :)] = margin_color (src_h, src_w) = src.shape[:2] (scale_h, scale_w) = (((1.0 * shape[0]) / src_h), ((1.0 * shape[1]) / src_w)) scale = min(scale_h, scale_w) dtype = src.dtype src = skimage.transform.rescale(src, scale, preserve_range=True) src = src.astype(dtype) (ph, pw) = (0, 0) (h, w) = src.shape[:2] (dst_h, dst_w) = shape[:2] if (h < dst_h): ph = ((dst_h - h) // 2) if (w < dst_w): pw = ((dst_w - w) // 2) mask = np.zeros(shape[:2], dtype=bool) mask[(ph:(ph + h), pw:(pw + w))] = True centerized[(ph:(ph + h), pw:(pw + w))] = src if return_mask: return (centerized, mask) else: return centerized
Centerize image for specified image size Parameters ---------- src: numpy.ndarray Image to centerize shape: tuple of int Image shape (height, width) or (height, width, channel) margin_color: numpy.ndarray Color to be filled in the blank. return_mask: numpy.ndarray Mask for centerized image.
jsk_arc2017_common/python/jsk_arc2017_common/utils.py
centerize
pazeshun/jsk_apc
0
python
def centerize(src, shape, margin_color=None, return_mask=False): 'Centerize image for specified image size\n Parameters\n ----------\n src: numpy.ndarray\n Image to centerize\n shape: tuple of int\n Image shape (height, width) or (height, width, channel)\n margin_color: numpy.ndarray\n Color to be filled in the blank.\n return_mask: numpy.ndarray\n Mask for centerized image.\n ' if (src.shape[:2] == shape[:2]): if return_mask: return (src, np.ones(shape[:2], dtype=bool)) else: return src if (len(shape) != src.ndim): shape = (list(shape) + [src.shape[2]]) centerized = np.zeros(shape, dtype=src.dtype) if margin_color: centerized[(:, :)] = margin_color (src_h, src_w) = src.shape[:2] (scale_h, scale_w) = (((1.0 * shape[0]) / src_h), ((1.0 * shape[1]) / src_w)) scale = min(scale_h, scale_w) dtype = src.dtype src = skimage.transform.rescale(src, scale, preserve_range=True) src = src.astype(dtype) (ph, pw) = (0, 0) (h, w) = src.shape[:2] (dst_h, dst_w) = shape[:2] if (h < dst_h): ph = ((dst_h - h) // 2) if (w < dst_w): pw = ((dst_w - w) // 2) mask = np.zeros(shape[:2], dtype=bool) mask[(ph:(ph + h), pw:(pw + w))] = True centerized[(ph:(ph + h), pw:(pw + w))] = src if return_mask: return (centerized, mask) else: return centerized
def centerize(src, shape, margin_color=None, return_mask=False): 'Centerize image for specified image size\n Parameters\n ----------\n src: numpy.ndarray\n Image to centerize\n shape: tuple of int\n Image shape (height, width) or (height, width, channel)\n margin_color: numpy.ndarray\n Color to be filled in the blank.\n return_mask: numpy.ndarray\n Mask for centerized image.\n ' if (src.shape[:2] == shape[:2]): if return_mask: return (src, np.ones(shape[:2], dtype=bool)) else: return src if (len(shape) != src.ndim): shape = (list(shape) + [src.shape[2]]) centerized = np.zeros(shape, dtype=src.dtype) if margin_color: centerized[(:, :)] = margin_color (src_h, src_w) = src.shape[:2] (scale_h, scale_w) = (((1.0 * shape[0]) / src_h), ((1.0 * shape[1]) / src_w)) scale = min(scale_h, scale_w) dtype = src.dtype src = skimage.transform.rescale(src, scale, preserve_range=True) src = src.astype(dtype) (ph, pw) = (0, 0) (h, w) = src.shape[:2] (dst_h, dst_w) = shape[:2] if (h < dst_h): ph = ((dst_h - h) // 2) if (w < dst_w): pw = ((dst_w - w) // 2) mask = np.zeros(shape[:2], dtype=bool) mask[(ph:(ph + h), pw:(pw + w))] = True centerized[(ph:(ph + h), pw:(pw + w))] = src if return_mask: return (centerized, mask) else: return centerized<|docstring|>Centerize image for specified image size Parameters ---------- src: numpy.ndarray Image to centerize shape: tuple of int Image shape (height, width) or (height, width, channel) margin_color: numpy.ndarray Color to be filled in the blank. return_mask: numpy.ndarray Mask for centerized image.<|endoftext|>
c3159eec1a9d2427f44ccb150373f7c80778d18b9ee9b04937c09aff852300e9
def _tile(imgs, shape, dst): 'Tile images which have same size.\n Parameters\n ----------\n imgs: numpy.ndarray\n Image list which should be tiled.\n shape: tuple of int\n Tile shape.\n dst:\n Image to put the tile on.\n ' (y_num, x_num) = shape tile_w = imgs[0].shape[1] tile_h = imgs[0].shape[0] if (dst is None): if (len(imgs[0].shape) == 3): dst = np.zeros(((tile_h * y_num), (tile_w * x_num), 3), dtype=np.uint8) else: dst = np.zeros(((tile_h * y_num), (tile_w * x_num)), dtype=np.uint8) for y in range(y_num): for x in range(x_num): i = (x + (y * x_num)) if (i < len(imgs)): y1 = (y * tile_h) y2 = ((y + 1) * tile_h) x1 = (x * tile_w) x2 = ((x + 1) * tile_w) dst[(y1:y2, x1:x2)] = imgs[i] return dst
Tile images which have same size. Parameters ---------- imgs: numpy.ndarray Image list which should be tiled. shape: tuple of int Tile shape. dst: Image to put the tile on.
jsk_arc2017_common/python/jsk_arc2017_common/utils.py
_tile
pazeshun/jsk_apc
0
python
def _tile(imgs, shape, dst): 'Tile images which have same size.\n Parameters\n ----------\n imgs: numpy.ndarray\n Image list which should be tiled.\n shape: tuple of int\n Tile shape.\n dst:\n Image to put the tile on.\n ' (y_num, x_num) = shape tile_w = imgs[0].shape[1] tile_h = imgs[0].shape[0] if (dst is None): if (len(imgs[0].shape) == 3): dst = np.zeros(((tile_h * y_num), (tile_w * x_num), 3), dtype=np.uint8) else: dst = np.zeros(((tile_h * y_num), (tile_w * x_num)), dtype=np.uint8) for y in range(y_num): for x in range(x_num): i = (x + (y * x_num)) if (i < len(imgs)): y1 = (y * tile_h) y2 = ((y + 1) * tile_h) x1 = (x * tile_w) x2 = ((x + 1) * tile_w) dst[(y1:y2, x1:x2)] = imgs[i] return dst
def _tile(imgs, shape, dst): 'Tile images which have same size.\n Parameters\n ----------\n imgs: numpy.ndarray\n Image list which should be tiled.\n shape: tuple of int\n Tile shape.\n dst:\n Image to put the tile on.\n ' (y_num, x_num) = shape tile_w = imgs[0].shape[1] tile_h = imgs[0].shape[0] if (dst is None): if (len(imgs[0].shape) == 3): dst = np.zeros(((tile_h * y_num), (tile_w * x_num), 3), dtype=np.uint8) else: dst = np.zeros(((tile_h * y_num), (tile_w * x_num)), dtype=np.uint8) for y in range(y_num): for x in range(x_num): i = (x + (y * x_num)) if (i < len(imgs)): y1 = (y * tile_h) y2 = ((y + 1) * tile_h) x1 = (x * tile_w) x2 = ((x + 1) * tile_w) dst[(y1:y2, x1:x2)] = imgs[i] return dst<|docstring|>Tile images which have same size. Parameters ---------- imgs: numpy.ndarray Image list which should be tiled. shape: tuple of int Tile shape. dst: Image to put the tile on.<|endoftext|>
8e7d2b2cd1e0f7cc65b028f05428fcbb2c5e917c4251108363044e4b64e90ad5
def tile(imgs, shape=None, dst=None, margin_color=None): 'Tile images which have different size.\n Parameters\n ----------\n imgs:\n Image list which should be tiled.\n shape:\n The tile shape.\n dst:\n Image to put the tile on.\n margin_color: numpy.ndarray\n Color to be filled in the blank.\n ' if (shape is None): shape = get_tile_shape(len(imgs)) (max_h, max_w) = (np.inf, np.inf) for img in imgs: max_h = min(max_h, img.shape[0]) max_w = min(max_w, img.shape[1]) is_color = False for (i, img) in enumerate(imgs): if (img.ndim >= 3): is_color = True if (is_color and (img.ndim == 2)): img = skimage.color.gray2rgb(img) if (is_color and (img.shape[2] == 4)): img = img[(:, :, :3)] img = skimage.util.img_as_ubyte(img) img = centerize(img, (max_h, max_w, 3), margin_color) imgs[i] = img return _tile(imgs, shape, dst)
Tile images which have different size. Parameters ---------- imgs: Image list which should be tiled. shape: The tile shape. dst: Image to put the tile on. margin_color: numpy.ndarray Color to be filled in the blank.
jsk_arc2017_common/python/jsk_arc2017_common/utils.py
tile
pazeshun/jsk_apc
0
python
def tile(imgs, shape=None, dst=None, margin_color=None): 'Tile images which have different size.\n Parameters\n ----------\n imgs:\n Image list which should be tiled.\n shape:\n The tile shape.\n dst:\n Image to put the tile on.\n margin_color: numpy.ndarray\n Color to be filled in the blank.\n ' if (shape is None): shape = get_tile_shape(len(imgs)) (max_h, max_w) = (np.inf, np.inf) for img in imgs: max_h = min(max_h, img.shape[0]) max_w = min(max_w, img.shape[1]) is_color = False for (i, img) in enumerate(imgs): if (img.ndim >= 3): is_color = True if (is_color and (img.ndim == 2)): img = skimage.color.gray2rgb(img) if (is_color and (img.shape[2] == 4)): img = img[(:, :, :3)] img = skimage.util.img_as_ubyte(img) img = centerize(img, (max_h, max_w, 3), margin_color) imgs[i] = img return _tile(imgs, shape, dst)
def tile(imgs, shape=None, dst=None, margin_color=None): 'Tile images which have different size.\n Parameters\n ----------\n imgs:\n Image list which should be tiled.\n shape:\n The tile shape.\n dst:\n Image to put the tile on.\n margin_color: numpy.ndarray\n Color to be filled in the blank.\n ' if (shape is None): shape = get_tile_shape(len(imgs)) (max_h, max_w) = (np.inf, np.inf) for img in imgs: max_h = min(max_h, img.shape[0]) max_w = min(max_w, img.shape[1]) is_color = False for (i, img) in enumerate(imgs): if (img.ndim >= 3): is_color = True if (is_color and (img.ndim == 2)): img = skimage.color.gray2rgb(img) if (is_color and (img.shape[2] == 4)): img = img[(:, :, :3)] img = skimage.util.img_as_ubyte(img) img = centerize(img, (max_h, max_w, 3), margin_color) imgs[i] = img return _tile(imgs, shape, dst)<|docstring|>Tile images which have different size. Parameters ---------- imgs: Image list which should be tiled. shape: The tile shape. dst: Image to put the tile on. margin_color: numpy.ndarray Color to be filled in the blank.<|endoftext|>
d99c6d5a1748a2d1c5db23681f2db25698d3396f273604cac9bae3eb292f7b09
def ui_to_py(filename: str, filepath: str=os.path.dirname(__file__), outputpath: str=os.path.dirname(__file__)) -> None: '\n Converts a .ui file from Qt Designer to a python script.\n\n Args:\n filename (str): The .ui file name to be converted.\n filepath (str): The .ui file path to be converted.\n outputpath (str): The output directory to the python script.\n\n Returns:\n None.\n ' if (isinstance(filename, str) and isinstance(filepath, str)): if (not (' ' in filename)): if os.path.isfile('{}\\{}.ui'.format(filepath, filename)): filepath = filepath filename = filename chk_py = os.path.isfile('{}\\{}.py'.format(filepath, filename)) os.system('cd {0} & pyuic5 -x {1}.ui -o {1}.py'.format(filepath, filename)) shutil.move('{}\\{}.py'.format(filepath, filename), '{}\\{}.py'.format(outputpath, filename)) if chk_py: print('File Converter Info: {}.py file updated.'.format(filename)) else: print('File Converter Info: {}.py file created.'.format(filename)) else: print("File Converter Alert: The {}.ui file doesn't exist.".format(filename)) else: print('File Converter Error: The filename contains spaces.') else: print('File Converter Error: Arguments are not string.')
Converts a .ui file from Qt Designer to a python script. Args: filename (str): The .ui file name to be converted. filepath (str): The .ui file path to be converted. outputpath (str): The output directory to the python script. Returns: None.
models/toolscontext/fileconverter.py
ui_to_py
vinirossa/password_generator_test
2
python
def ui_to_py(filename: str, filepath: str=os.path.dirname(__file__), outputpath: str=os.path.dirname(__file__)) -> None: '\n Converts a .ui file from Qt Designer to a python script.\n\n Args:\n filename (str): The .ui file name to be converted.\n filepath (str): The .ui file path to be converted.\n outputpath (str): The output directory to the python script.\n\n Returns:\n None.\n ' if (isinstance(filename, str) and isinstance(filepath, str)): if (not (' ' in filename)): if os.path.isfile('{}\\{}.ui'.format(filepath, filename)): filepath = filepath filename = filename chk_py = os.path.isfile('{}\\{}.py'.format(filepath, filename)) os.system('cd {0} & pyuic5 -x {1}.ui -o {1}.py'.format(filepath, filename)) shutil.move('{}\\{}.py'.format(filepath, filename), '{}\\{}.py'.format(outputpath, filename)) if chk_py: print('File Converter Info: {}.py file updated.'.format(filename)) else: print('File Converter Info: {}.py file created.'.format(filename)) else: print("File Converter Alert: The {}.ui file doesn't exist.".format(filename)) else: print('File Converter Error: The filename contains spaces.') else: print('File Converter Error: Arguments are not string.')
def ui_to_py(filename: str, filepath: str=os.path.dirname(__file__), outputpath: str=os.path.dirname(__file__)) -> None: '\n Converts a .ui file from Qt Designer to a python script.\n\n Args:\n filename (str): The .ui file name to be converted.\n filepath (str): The .ui file path to be converted.\n outputpath (str): The output directory to the python script.\n\n Returns:\n None.\n ' if (isinstance(filename, str) and isinstance(filepath, str)): if (not (' ' in filename)): if os.path.isfile('{}\\{}.ui'.format(filepath, filename)): filepath = filepath filename = filename chk_py = os.path.isfile('{}\\{}.py'.format(filepath, filename)) os.system('cd {0} & pyuic5 -x {1}.ui -o {1}.py'.format(filepath, filename)) shutil.move('{}\\{}.py'.format(filepath, filename), '{}\\{}.py'.format(outputpath, filename)) if chk_py: print('File Converter Info: {}.py file updated.'.format(filename)) else: print('File Converter Info: {}.py file created.'.format(filename)) else: print("File Converter Alert: The {}.ui file doesn't exist.".format(filename)) else: print('File Converter Error: The filename contains spaces.') else: print('File Converter Error: Arguments are not string.')<|docstring|>Converts a .ui file from Qt Designer to a python script. Args: filename (str): The .ui file name to be converted. filepath (str): The .ui file path to be converted. outputpath (str): The output directory to the python script. Returns: None.<|endoftext|>
3633f7d8cb689d79ad4c34669701978bc9e3ccc59bcd5bd002f924b872a62a7e
def qrc_to_py(filename: str, filepath: str=os.path.dirname(__file__), outputpath: str=os.path.dirname(__file__)) -> None: '\n Converts a .qrc file from Qt Designer to a python script.\n\n Args:\n filename (str): The .qrc file name to be converted.\n filepath (str): The .qrc file path to be converted.\n outputpath (str): The output directory to the python script.\n\n Returns:\n None.\n ' if (isinstance(filename, str) and isinstance(filepath, str)): if (not (' ' in filename)): if os.path.isfile('{}\\{}.qrc'.format(filepath, filename)): filepath = filepath filename = filename chk_py = os.path.isfile('{}\\{}.py'.format(filepath, filename)) os.system('cd {0} & pyrcc5 {1}.qrc -o {1}.py'.format(filepath, filename)) shutil.move('{}\\{}.py'.format(filepath, filename), '{}\\{}.py'.format(outputpath, filename)) if chk_py: print('File Converter Info: {}.py file updated.'.format(filename)) else: print('File Converter Info: {}.py file created.'.format(filename)) else: print("File Converter Alert: The {}.qrc file doesn't exist.".format(filename)) else: print('File Converter Error: The filename contains spaces.') else: print('File Converter Error: Arguments are not string.')
Converts a .qrc file from Qt Designer to a python script. Args: filename (str): The .qrc file name to be converted. filepath (str): The .qrc file path to be converted. outputpath (str): The output directory to the python script. Returns: None.
models/toolscontext/fileconverter.py
qrc_to_py
vinirossa/password_generator_test
2
python
def qrc_to_py(filename: str, filepath: str=os.path.dirname(__file__), outputpath: str=os.path.dirname(__file__)) -> None: '\n Converts a .qrc file from Qt Designer to a python script.\n\n Args:\n filename (str): The .qrc file name to be converted.\n filepath (str): The .qrc file path to be converted.\n outputpath (str): The output directory to the python script.\n\n Returns:\n None.\n ' if (isinstance(filename, str) and isinstance(filepath, str)): if (not (' ' in filename)): if os.path.isfile('{}\\{}.qrc'.format(filepath, filename)): filepath = filepath filename = filename chk_py = os.path.isfile('{}\\{}.py'.format(filepath, filename)) os.system('cd {0} & pyrcc5 {1}.qrc -o {1}.py'.format(filepath, filename)) shutil.move('{}\\{}.py'.format(filepath, filename), '{}\\{}.py'.format(outputpath, filename)) if chk_py: print('File Converter Info: {}.py file updated.'.format(filename)) else: print('File Converter Info: {}.py file created.'.format(filename)) else: print("File Converter Alert: The {}.qrc file doesn't exist.".format(filename)) else: print('File Converter Error: The filename contains spaces.') else: print('File Converter Error: Arguments are not string.')
def qrc_to_py(filename: str, filepath: str=os.path.dirname(__file__), outputpath: str=os.path.dirname(__file__)) -> None: '\n Converts a .qrc file from Qt Designer to a python script.\n\n Args:\n filename (str): The .qrc file name to be converted.\n filepath (str): The .qrc file path to be converted.\n outputpath (str): The output directory to the python script.\n\n Returns:\n None.\n ' if (isinstance(filename, str) and isinstance(filepath, str)): if (not (' ' in filename)): if os.path.isfile('{}\\{}.qrc'.format(filepath, filename)): filepath = filepath filename = filename chk_py = os.path.isfile('{}\\{}.py'.format(filepath, filename)) os.system('cd {0} & pyrcc5 {1}.qrc -o {1}.py'.format(filepath, filename)) shutil.move('{}\\{}.py'.format(filepath, filename), '{}\\{}.py'.format(outputpath, filename)) if chk_py: print('File Converter Info: {}.py file updated.'.format(filename)) else: print('File Converter Info: {}.py file created.'.format(filename)) else: print("File Converter Alert: The {}.qrc file doesn't exist.".format(filename)) else: print('File Converter Error: The filename contains spaces.') else: print('File Converter Error: Arguments are not string.')<|docstring|>Converts a .qrc file from Qt Designer to a python script. Args: filename (str): The .qrc file name to be converted. filepath (str): The .qrc file path to be converted. outputpath (str): The output directory to the python script. Returns: None.<|endoftext|>
821057e5bb466cb6c391bfbd4ed4b907f7319591974c92514b8843135c6b20ef
def assign(self, transaction_data): ' Assign data from dict\n\n :param transaction_data: Transaction data\n :type transaction_data: dict\n ' for (property_name, value) in transaction_data.items(): if hasattr(self, property_name): self.__setattr__(property_name, value)
Assign data from dict :param transaction_data: Transaction data :type transaction_data: dict
django_fiobank/models.py
assign
rbas/django-fiobank
1
python
def assign(self, transaction_data): ' Assign data from dict\n\n :param transaction_data: Transaction data\n :type transaction_data: dict\n ' for (property_name, value) in transaction_data.items(): if hasattr(self, property_name): self.__setattr__(property_name, value)
def assign(self, transaction_data): ' Assign data from dict\n\n :param transaction_data: Transaction data\n :type transaction_data: dict\n ' for (property_name, value) in transaction_data.items(): if hasattr(self, property_name): self.__setattr__(property_name, value)<|docstring|>Assign data from dict :param transaction_data: Transaction data :type transaction_data: dict<|endoftext|>
7e0c5eff604e722286e2163d8bac7196a989cf7aca9c713a26ceda2c26936954
def _split_generators(self, dl_manager): 'Returns SplitGenerators.' dl_files = dl_manager.download_and_extract(_URLs) return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={'filepath': dl_files['train']}), datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={'filepath': dl_files['test']})]
Returns SplitGenerators.
datasets/trec/trec.py
_split_generators
patrickvonplaten/datasets-1
10,608
python
def _split_generators(self, dl_manager): dl_files = dl_manager.download_and_extract(_URLs) return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={'filepath': dl_files['train']}), datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={'filepath': dl_files['test']})]
def _split_generators(self, dl_manager): dl_files = dl_manager.download_and_extract(_URLs) return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={'filepath': dl_files['train']}), datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={'filepath': dl_files['test']})]<|docstring|>Returns SplitGenerators.<|endoftext|>
a9f539c04d188bf4e328620899b7b5b4e89d10aa287a70a760207ab469f6c0de
def _generate_examples(self, filepath): 'Yields examples.' with open(filepath, 'rb') as f: for (id_, row) in enumerate(f): (label, _, text) = row.replace(b'\xf0', b' ').strip().decode().partition(' ') (coarse_label, _, fine_label) = label.partition(':') (yield (id_, {'label-coarse': coarse_label, 'label-fine': fine_label, 'text': text}))
Yields examples.
datasets/trec/trec.py
_generate_examples
patrickvonplaten/datasets-1
10,608
python
def _generate_examples(self, filepath): with open(filepath, 'rb') as f: for (id_, row) in enumerate(f): (label, _, text) = row.replace(b'\xf0', b' ').strip().decode().partition(' ') (coarse_label, _, fine_label) = label.partition(':') (yield (id_, {'label-coarse': coarse_label, 'label-fine': fine_label, 'text': text}))
def _generate_examples(self, filepath): with open(filepath, 'rb') as f: for (id_, row) in enumerate(f): (label, _, text) = row.replace(b'\xf0', b' ').strip().decode().partition(' ') (coarse_label, _, fine_label) = label.partition(':') (yield (id_, {'label-coarse': coarse_label, 'label-fine': fine_label, 'text': text}))<|docstring|>Yields examples.<|endoftext|>
901faf165db329d870b718623d209031e6f3a78e6221c3a34726c5d6363fc410
def stream_copy(self, sha_iter, odb): "Copy the streams as identified by sha's yielded by sha_iter into the given odb\n\t\tThe streams will be copied directly\n\t\t:note: the object will only be written if it did not exist in the target db\n\t\t:return: amount of streams actually copied into odb. If smaller than the amount\n\t\t\tof input shas, one or more objects did already exist in odb" count = 0 for sha in sha_iter: if odb.has_object(sha): continue ostream = self.stream(sha) sio = StringIO(ostream.stream.data()) istream = IStream(ostream.type, ostream.size, sio, sha) odb.store(istream) count += 1 return count
Copy the streams as identified by sha's yielded by sha_iter into the given odb The streams will be copied directly :note: the object will only be written if it did not exist in the target db :return: amount of streams actually copied into odb. If smaller than the amount of input shas, one or more objects did already exist in odb
git/db/py/mem.py
stream_copy
swallat/GitPython
1
python
def stream_copy(self, sha_iter, odb): "Copy the streams as identified by sha's yielded by sha_iter into the given odb\n\t\tThe streams will be copied directly\n\t\t:note: the object will only be written if it did not exist in the target db\n\t\t:return: amount of streams actually copied into odb. If smaller than the amount\n\t\t\tof input shas, one or more objects did already exist in odb" count = 0 for sha in sha_iter: if odb.has_object(sha): continue ostream = self.stream(sha) sio = StringIO(ostream.stream.data()) istream = IStream(ostream.type, ostream.size, sio, sha) odb.store(istream) count += 1 return count
def stream_copy(self, sha_iter, odb): "Copy the streams as identified by sha's yielded by sha_iter into the given odb\n\t\tThe streams will be copied directly\n\t\t:note: the object will only be written if it did not exist in the target db\n\t\t:return: amount of streams actually copied into odb. If smaller than the amount\n\t\t\tof input shas, one or more objects did already exist in odb" count = 0 for sha in sha_iter: if odb.has_object(sha): continue ostream = self.stream(sha) sio = StringIO(ostream.stream.data()) istream = IStream(ostream.type, ostream.size, sio, sha) odb.store(istream) count += 1 return count<|docstring|>Copy the streams as identified by sha's yielded by sha_iter into the given odb The streams will be copied directly :note: the object will only be written if it did not exist in the target db :return: amount of streams actually copied into odb. If smaller than the amount of input shas, one or more objects did already exist in odb<|endoftext|>
766d5af600b96475ebe8b9804d16f568a7e99a94526e86f368e003804b30b32a
def create_user(self, email, password=None, **extra_fields): 'create and saves a new user' if (not email): raise ValueError('users must have a email address.') user = self.model(email=self.normalize_email(email), **extra_fields) user.set_password(password) user.save(using=self._db) return user
create and saves a new user
apiuser/core/models.py
create_user
ngelrojas/cotizate-back
0
python
def create_user(self, email, password=None, **extra_fields): if (not email): raise ValueError('users must have a email address.') user = self.model(email=self.normalize_email(email), **extra_fields) user.set_password(password) user.save(using=self._db) return user
def create_user(self, email, password=None, **extra_fields): if (not email): raise ValueError('users must have a email address.') user = self.model(email=self.normalize_email(email), **extra_fields) user.set_password(password) user.save(using=self._db) return user<|docstring|>create and saves a new user<|endoftext|>
7dc270b374b7fb41f7f09ec7a46235e25861f2fa042f21cfd1ba1ccfd3f12c83
def create_superuser(self, email, password): 'create and saves a new super user' user = self.create_user(email, password) user.is_active = True user.is_staff = True user.is_superuser = True user.save(using=self._db) return user
create and saves a new super user
apiuser/core/models.py
create_superuser
ngelrojas/cotizate-back
0
python
def create_superuser(self, email, password): user = self.create_user(email, password) user.is_active = True user.is_staff = True user.is_superuser = True user.save(using=self._db) return user
def create_superuser(self, email, password): user = self.create_user(email, password) user.is_active = True user.is_staff = True user.is_superuser = True user.save(using=self._db) return user<|docstring|>create and saves a new super user<|endoftext|>
2aab7518a3ee67f04ac8e8a0f051ecd562ec81d02bb90a0acab6eb01ac2b92dc
def test_pei(self): '\n pis checked\n ' sum_value = sum(self.spaam_2006_2007.pei_attributions) total_value = (self.spaam_2006_2007.pei - 1) self.assertAlmostEqual(sum_value, total_value)
pis checked
PDA/test/Test_Attribution_Transport.py
test_pei
gaufung/CodeBase
4
python
def test_pei(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.pei_attributions) total_value = (self.spaam_2006_2007.pei - 1) self.assertAlmostEqual(sum_value, total_value)
def test_pei(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.pei_attributions) total_value = (self.spaam_2006_2007.pei - 1) self.assertAlmostEqual(sum_value, total_value)<|docstring|>pis checked<|endoftext|>
bf0ea2c7289ab54446671d58f993607cb1c0bab8bdcb40df2a4d990abcab273f
def test_est(self): '\n pei checked\n ' sum_value = sum(self.spaam_2006_2007.est_attributions) total_value = (self.spaam_2006_2007.est - 1) self.assertAlmostEqual(sum_value, total_value)
pei checked
PDA/test/Test_Attribution_Transport.py
test_est
gaufung/CodeBase
4
python
def test_est(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.est_attributions) total_value = (self.spaam_2006_2007.est - 1) self.assertAlmostEqual(sum_value, total_value)
def test_est(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.est_attributions) total_value = (self.spaam_2006_2007.est - 1) self.assertAlmostEqual(sum_value, total_value)<|docstring|>pei checked<|endoftext|>
78b92da7cb5f4d170a83235afaf342a9fc5af2d90c1f93448e0b12efb13acf28
def test_eue(self): '\n isg checked\n ' sum_value = sum(self.spaam_2006_2007.eue_attributions) total_value = (self.spaam_2006_2007.eue - 1) self.assertAlmostEqual(sum_value, total_value)
isg checked
PDA/test/Test_Attribution_Transport.py
test_eue
gaufung/CodeBase
4
python
def test_eue(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.eue_attributions) total_value = (self.spaam_2006_2007.eue - 1) self.assertAlmostEqual(sum_value, total_value)
def test_eue(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.eue_attributions) total_value = (self.spaam_2006_2007.eue - 1) self.assertAlmostEqual(sum_value, total_value)<|docstring|>isg checked<|endoftext|>
c4782a532df18112adf0c960eb0b938543a6d0722dcc88ed814fe9214a566198
def test_pti(self): '\n eue checked\n ' sum_value = sum(self.spaam_2006_2007.pti_attributions) total_value = (self.spaam_2006_2007.pti - 1) self.assertAlmostEqual(sum_value, total_value)
eue checked
PDA/test/Test_Attribution_Transport.py
test_pti
gaufung/CodeBase
4
python
def test_pti(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.pti_attributions) total_value = (self.spaam_2006_2007.pti - 1) self.assertAlmostEqual(sum_value, total_value)
def test_pti(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.pti_attributions) total_value = (self.spaam_2006_2007.pti - 1) self.assertAlmostEqual(sum_value, total_value)<|docstring|>eue checked<|endoftext|>
d357ff93486953e4413b73245b6597ed7fa7ebf32cc964366dbcc0d324be6233
def test_yoe(self): '\n est checked\n ' sum_value = sum(self.spaam_2006_2007.yoe_attributions) total_value = (self.spaam_2006_2007.yoe - 1) self.assertAlmostEqual(sum_value, total_value)
est checked
PDA/test/Test_Attribution_Transport.py
test_yoe
gaufung/CodeBase
4
python
def test_yoe(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.yoe_attributions) total_value = (self.spaam_2006_2007.yoe - 1) self.assertAlmostEqual(sum_value, total_value)
def test_yoe(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.yoe_attributions) total_value = (self.spaam_2006_2007.yoe - 1) self.assertAlmostEqual(sum_value, total_value)<|docstring|>est checked<|endoftext|>
0a62b1a1c03ec315913a769157bc202b239e6deab41794ec37d73085f152e32d
def test_yct(self): '\n yoe checked\n ' sum_value = sum(self.spaam_2006_2007.yct_attributions) total_value = (self.spaam_2006_2007.yct - 1) self.assertAlmostEqual(sum_value, total_value)
yoe checked
PDA/test/Test_Attribution_Transport.py
test_yct
gaufung/CodeBase
4
python
def test_yct(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.yct_attributions) total_value = (self.spaam_2006_2007.yct - 1) self.assertAlmostEqual(sum_value, total_value)
def test_yct(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.yct_attributions) total_value = (self.spaam_2006_2007.yct - 1) self.assertAlmostEqual(sum_value, total_value)<|docstring|>yoe checked<|endoftext|>
f0e63013eb236c5b187153224cf427da2f34dd8867b44d97f23cf95cdf998788
def test_rts(self): '\n yct checked\n ' sum_value = sum(self.spaam_2006_2007.rts_attributions) total_value = (self.spaam_2006_2007.rts - 1) self.assertAlmostEqual(sum_value, total_value)
yct checked
PDA/test/Test_Attribution_Transport.py
test_rts
gaufung/CodeBase
4
python
def test_rts(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.rts_attributions) total_value = (self.spaam_2006_2007.rts - 1) self.assertAlmostEqual(sum_value, total_value)
def test_rts(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.rts_attributions) total_value = (self.spaam_2006_2007.rts - 1) self.assertAlmostEqual(sum_value, total_value)<|docstring|>yct checked<|endoftext|>
9c491bcc67a62879767f7c3b25bc97fe718e4362b19a5b04392953d6761203bd
def test_cef(self): '\n cef test\n ' sum_value = sum(self.spaam_2006_2007.cef_attributions) total_value = (self.spaam_2006_2007.cef - 1) self.assertAlmostEqual(sum_value, total_value)
cef test
PDA/test/Test_Attribution_Transport.py
test_cef
gaufung/CodeBase
4
python
def test_cef(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.cef_attributions) total_value = (self.spaam_2006_2007.cef - 1) self.assertAlmostEqual(sum_value, total_value)
def test_cef(self): '\n \n ' sum_value = sum(self.spaam_2006_2007.cef_attributions) total_value = (self.spaam_2006_2007.cef - 1) self.assertAlmostEqual(sum_value, total_value)<|docstring|>cef test<|endoftext|>
2096e3cf9c41ccba165123a0ce9bbdc55977a6433b4991adf05c35335ecc6712
@abc.abstractproperty def package(self): '\n The name of the package for which this reader loads resources.\n '
The name of the package for which this reader loads resources.
pipenv/vendor/importlib_resources/simple.py
package
sweco/pipenv
52,316
python
@abc.abstractproperty def package(self): '\n \n '
@abc.abstractproperty def package(self): '\n \n '<|docstring|>The name of the package for which this reader loads resources.<|endoftext|>
1ce88e8fccef2e87bbd9c14be440efe08928c44d28a7a83f35d551013dfb7fc8
@abc.abstractmethod def children(self): '\n Obtain an iterable of SimpleReader for available\n child containers (e.g. directories).\n '
Obtain an iterable of SimpleReader for available child containers (e.g. directories).
pipenv/vendor/importlib_resources/simple.py
children
sweco/pipenv
52,316
python
@abc.abstractmethod def children(self): '\n Obtain an iterable of SimpleReader for available\n child containers (e.g. directories).\n '
@abc.abstractmethod def children(self): '\n Obtain an iterable of SimpleReader for available\n child containers (e.g. directories).\n '<|docstring|>Obtain an iterable of SimpleReader for available child containers (e.g. directories).<|endoftext|>
6247b7b8da02ef3a86f900684bbe54881ae5f85007d985a8471b8ff0d732616d
@abc.abstractmethod def resources(self): '\n Obtain available named resources for this virtual package.\n '
Obtain available named resources for this virtual package.
pipenv/vendor/importlib_resources/simple.py
resources
sweco/pipenv
52,316
python
@abc.abstractmethod def resources(self): '\n \n '
@abc.abstractmethod def resources(self): '\n \n '<|docstring|>Obtain available named resources for this virtual package.<|endoftext|>
6a503dab41fd020dbc323803cbe5a25f91a9d1e724eccbee0f7f3407639b574b
@abc.abstractmethod def open_binary(self, resource): '\n Obtain a File-like for a named resource.\n '
Obtain a File-like for a named resource.
pipenv/vendor/importlib_resources/simple.py
open_binary
sweco/pipenv
52,316
python
@abc.abstractmethod def open_binary(self, resource): '\n \n '
@abc.abstractmethod def open_binary(self, resource): '\n \n '<|docstring|>Obtain a File-like for a named resource.<|endoftext|>
1b9359a9bd60b242d7e2cf881fa40ee4b95ab932ac8665777d102c1d93ffd16e
def to_dict(self): 'Return JSON-serializable representation of the object.' out = {'addr': self.addr, 'no_ack': self.no_ack, 'rts_cts': self.rts_cts, 'max_amsdu_len': self._max_amsdu_len, 'mcast': TX_MCAST[self.mcast], 'mcs': sorted(self.mcs), 'ht_mcs': sorted(self.ht_mcs), 'ur_count': self.ur_count} return out
Return JSON-serializable representation of the object.
empower/core/txpolicy.py
to_dict
EstefaniaCC/empower-runtime-5g-essence-multicast
0
python
def to_dict(self): out = {'addr': self.addr, 'no_ack': self.no_ack, 'rts_cts': self.rts_cts, 'max_amsdu_len': self._max_amsdu_len, 'mcast': TX_MCAST[self.mcast], 'mcs': sorted(self.mcs), 'ht_mcs': sorted(self.ht_mcs), 'ur_count': self.ur_count} return out
def to_dict(self): out = {'addr': self.addr, 'no_ack': self.no_ack, 'rts_cts': self.rts_cts, 'max_amsdu_len': self._max_amsdu_len, 'mcast': TX_MCAST[self.mcast], 'mcs': sorted(self.mcs), 'ht_mcs': sorted(self.ht_mcs), 'ur_count': self.ur_count} return out<|docstring|>Return JSON-serializable representation of the object.<|endoftext|>
6f12bfaa91ee8e4eadf957287b6c4c3c75a70fe9a6e704ba59c9ee9203046a1b
@property def ur_count(self): 'Get ur_count.' return self._ur_count
Get ur_count.
empower/core/txpolicy.py
ur_count
EstefaniaCC/empower-runtime-5g-essence-multicast
0
python
@property def ur_count(self): return self._ur_count
@property def ur_count(self): return self._ur_count<|docstring|>Get ur_count.<|endoftext|>
441eabe579e996dcc1d938a82652728fe953204689f757d1599d3d6f03bca3ff
@ur_count.setter def ur_count(self, ur_count): 'Set ur_count.' self.set_ur_count(ur_count) self.block.wtp.connection.send_set_tx_policy(self)
Set ur_count.
empower/core/txpolicy.py
ur_count
EstefaniaCC/empower-runtime-5g-essence-multicast
0
python
@ur_count.setter def ur_count(self, ur_count): self.set_ur_count(ur_count) self.block.wtp.connection.send_set_tx_policy(self)
@ur_count.setter def ur_count(self, ur_count): self.set_ur_count(ur_count) self.block.wtp.connection.send_set_tx_policy(self)<|docstring|>Set ur_count.<|endoftext|>
64fe28e7313f6ae5ff80c835c1d658d9af5a4de0376aeb3c2b694a867fc438d2
def set_ur_count(self, ur_count): 'Set ur_count without sending anything.' self._ur_count = int(ur_count)
Set ur_count without sending anything.
empower/core/txpolicy.py
set_ur_count
EstefaniaCC/empower-runtime-5g-essence-multicast
0
python
def set_ur_count(self, ur_count): self._ur_count = int(ur_count)
def set_ur_count(self, ur_count): self._ur_count = int(ur_count)<|docstring|>Set ur_count without sending anything.<|endoftext|>
f3581533336f7ed8a13feca7843c26aa3e9f417130ade44311c276af4c7b5dd5
@property def mcast(self): 'Get mcast mode.' return self._mcast
Get mcast mode.
empower/core/txpolicy.py
mcast
EstefaniaCC/empower-runtime-5g-essence-multicast
0
python
@property def mcast(self): return self._mcast
@property def mcast(self): return self._mcast<|docstring|>Get mcast mode.<|endoftext|>
f0ab151871e9d1c06a8f6e2f826403e8e90b1bccfc6bdef68d7f218193f952d3
@mcast.setter def mcast(self, mcast): 'Set the mcast mode.' self.set_mcast(mcast) self.block.wtp.connection.send_set_tx_policy(self)
Set the mcast mode.
empower/core/txpolicy.py
mcast
EstefaniaCC/empower-runtime-5g-essence-multicast
0
python
@mcast.setter def mcast(self, mcast): self.set_mcast(mcast) self.block.wtp.connection.send_set_tx_policy(self)
@mcast.setter def mcast(self, mcast): self.set_mcast(mcast) self.block.wtp.connection.send_set_tx_policy(self)<|docstring|>Set the mcast mode.<|endoftext|>
523943bc82a73620014e5146a0596e2af369ce278ab88b962b8518ca33ff212f
def set_mcast(self, mcast): 'Set the mcast mode without sending anything.' self._mcast = (int(mcast) if (int(mcast) in TX_MCAST) else TX_MCAST_LEGACY)
Set the mcast mode without sending anything.
empower/core/txpolicy.py
set_mcast
EstefaniaCC/empower-runtime-5g-essence-multicast
0
python
def set_mcast(self, mcast): self._mcast = (int(mcast) if (int(mcast) in TX_MCAST) else TX_MCAST_LEGACY)
def set_mcast(self, mcast): self._mcast = (int(mcast) if (int(mcast) in TX_MCAST) else TX_MCAST_LEGACY)<|docstring|>Set the mcast mode without sending anything.<|endoftext|>