body
stringlengths
26
98.2k
body_hash
int64
-9,222,864,604,528,158,000
9,221,803,474B
docstring
stringlengths
1
16.8k
path
stringlengths
5
230
name
stringlengths
1
96
repository_name
stringlengths
7
89
lang
stringclasses
1 value
body_without_docstring
stringlengths
20
98.2k
@pytest.fixture def root(): 'Root function for tests.' dirname = tempfile.mkdtemp() (yield os.path.join(dirname, 'output1')) print('Directory structure was:') tree(dirname) shutil.rmtree(dirname)
258,632,522,870,728,640
Root function for tests.
tests/integration/test_data_finder.py
root
Peter9192/ESMValCore
python
@pytest.fixture def root(): dirname = tempfile.mkdtemp() (yield os.path.join(dirname, 'output1')) print('Directory structure was:') tree(dirname) shutil.rmtree(dirname)
@pytest.mark.parametrize('cfg', CONFIG['get_input_filelist']) def test_get_input_filelist(root, cfg): 'Test retrieving input filelist.' create_tree(root, cfg.get('available_files'), cfg.get('available_symlinks')) rootpath = {cfg['variable']['project']: [root]} drs = {cfg['variable']['project']: cfg['drs...
-2,881,636,409,293,850,600
Test retrieving input filelist.
tests/integration/test_data_finder.py
test_get_input_filelist
Peter9192/ESMValCore
python
@pytest.mark.parametrize('cfg', CONFIG['get_input_filelist']) def test_get_input_filelist(root, cfg): create_tree(root, cfg.get('available_files'), cfg.get('available_symlinks')) rootpath = {cfg['variable']['project']: [root]} drs = {cfg['variable']['project']: cfg['drs']} input_filelist = get_inpu...
@pytest.mark.parametrize('cfg', CONFIG['get_input_fx_filelist']) def test_get_input_fx_filelist(root, cfg): 'Test retrieving fx filelist.' create_tree(root, cfg.get('available_files'), cfg.get('available_symlinks')) rootpath = {cfg['variable']['project']: [root]} drs = {cfg['variable']['project']: cfg['...
-1,748,723,419,376,551,200
Test retrieving fx filelist.
tests/integration/test_data_finder.py
test_get_input_fx_filelist
Peter9192/ESMValCore
python
@pytest.mark.parametrize('cfg', CONFIG['get_input_fx_filelist']) def test_get_input_fx_filelist(root, cfg): create_tree(root, cfg.get('available_files'), cfg.get('available_symlinks')) rootpath = {cfg['variable']['project']: [root]} drs = {cfg['variable']['project']: cfg['drs']} fx_files = get_inpu...
def spline_filter1d(input, order=3, axis=(- 1), output=numpy.float64, output_type=None): 'Calculates a one-dimensional spline filter along the given axis.\n\n The lines of the array along the given axis are filtered by a\n spline filter. The order of the spline must be >= 2 and <= 5.\n ' if ((order < 0...
-8,221,713,997,674,315,000
Calculates a one-dimensional spline filter along the given axis. The lines of the array along the given axis are filtered by a spline filter. The order of the spline must be >= 2 and <= 5.
kapteyn/interpolation.py
spline_filter1d
kapteyn-astro/kapteyn
python
def spline_filter1d(input, order=3, axis=(- 1), output=numpy.float64, output_type=None): 'Calculates a one-dimensional spline filter along the given axis.\n\n The lines of the array along the given axis are filtered by a\n spline filter. The order of the spline must be >= 2 and <= 5.\n ' if ((order < 0...
def spline_filter(input, order=3, output=numpy.float64, output_type=None): 'Multi-dimensional spline filter.\n\n Note: The multi-dimensional filter is implemented as a sequence of\n one-dimensional spline filters. The intermediate arrays are stored\n in the same data type as the output. Therefore, for outp...
13,522,673,866,341,064
Multi-dimensional spline filter. Note: The multi-dimensional filter is implemented as a sequence of one-dimensional spline filters. The intermediate arrays are stored in the same data type as the output. Therefore, for output types with a limited precision, the results may be imprecise because intermediate results may...
kapteyn/interpolation.py
spline_filter
kapteyn-astro/kapteyn
python
def spline_filter(input, order=3, output=numpy.float64, output_type=None): 'Multi-dimensional spline filter.\n\n Note: The multi-dimensional filter is implemented as a sequence of\n one-dimensional spline filters. The intermediate arrays are stored\n in the same data type as the output. Therefore, for outp...
def geometric_transform(input, mapping, output_shape=None, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True, extra_arguments=(), extra_keywords={}): "Apply an arbritrary geometric transform.\n\n The given mapping function is used to find, for each point in the\n output, the co...
2,634,614,057,414,725,600
Apply an arbritrary geometric transform. The given mapping function is used to find, for each point in the output, the corresponding coordinates in the input. The value of the input at those coordinates is determined by spline interpolation of the requested order. mapping must be a callable object that accepts a tupl...
kapteyn/interpolation.py
geometric_transform
kapteyn-astro/kapteyn
python
def geometric_transform(input, mapping, output_shape=None, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True, extra_arguments=(), extra_keywords={}): "Apply an arbritrary geometric transform.\n\n The given mapping function is used to find, for each point in the\n output, the co...
def map_coordinates(input, coordinates, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True): "\n Map the input array to new coordinates by interpolation.\n\n The array of coordinates is used to find, for each point in the output,\n the corresponding coordinates in the input. ...
-8,802,813,107,881,692,000
Map the input array to new coordinates by interpolation. The array of coordinates is used to find, for each point in the output, the corresponding coordinates in the input. The value of the input at those coordinates is determined by spline interpolation of the requested order. The shape of the output is derived from...
kapteyn/interpolation.py
map_coordinates
kapteyn-astro/kapteyn
python
def map_coordinates(input, coordinates, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True): "\n Map the input array to new coordinates by interpolation.\n\n The array of coordinates is used to find, for each point in the output,\n the corresponding coordinates in the input. ...
def affine_transform(input, matrix, offset=0.0, output_shape=None, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True): 'Apply an affine transformation.\n\n The given matrix and offset are used to find for each point in the\n output the corresponding coordinates in the input by ...
9,161,708,642,816,973,000
Apply an affine transformation. The given matrix and offset are used to find for each point in the output the corresponding coordinates in the input by an affine transformation. The value of the input at those coordinates is determined by spline interpolation of the requested order. Points outside the boundaries of th...
kapteyn/interpolation.py
affine_transform
kapteyn-astro/kapteyn
python
def affine_transform(input, matrix, offset=0.0, output_shape=None, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True): 'Apply an affine transformation.\n\n The given matrix and offset are used to find for each point in the\n output the corresponding coordinates in the input by ...
def shift(input, shift, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True): 'Shift an array.\n\n The array is shifted using spline interpolation of the requested\n order. Points outside the boundaries of the input are filled according\n to the given mode. The parameter prefi...
1,732,073,668,687,526,000
Shift an array. The array is shifted using spline interpolation of the requested order. Points outside the boundaries of the input are filled according to the given mode. The parameter prefilter determines if the input is pre-filtered before interpolation, if False it is assumed that the input is already filtered.
kapteyn/interpolation.py
shift
kapteyn-astro/kapteyn
python
def shift(input, shift, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True): 'Shift an array.\n\n The array is shifted using spline interpolation of the requested\n order. Points outside the boundaries of the input are filled according\n to the given mode. The parameter prefi...
def zoom(input, zoom, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True): 'Zoom an array.\n\n The array is zoomed using spline interpolation of the requested order.\n Points outside the boundaries of the input are filled according to the\n given mode. The parameter prefilter...
-1,133,667,281,842,703,600
Zoom an array. The array is zoomed using spline interpolation of the requested order. Points outside the boundaries of the input are filled according to the given mode. The parameter prefilter determines if the input is pre- filtered before interpolation, if False it is assumed that the input is already filtered.
kapteyn/interpolation.py
zoom
kapteyn-astro/kapteyn
python
def zoom(input, zoom, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True): 'Zoom an array.\n\n The array is zoomed using spline interpolation of the requested order.\n Points outside the boundaries of the input are filled according to the\n given mode. The parameter prefilter...
def rotate(input, angle, axes=(1, 0), reshape=True, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True): 'Rotate an array.\n\n The array is rotated in the plane defined by the two axes given by the\n axes parameter using spline interpolation of the requested order. The\n angl...
8,433,568,912,036,353,000
Rotate an array. The array is rotated in the plane defined by the two axes given by the axes parameter using spline interpolation of the requested order. The angle is given in degrees. Points outside the boundaries of the input are filled according to the given mode. If reshape is true, the output shape is adapted so ...
kapteyn/interpolation.py
rotate
kapteyn-astro/kapteyn
python
def rotate(input, angle, axes=(1, 0), reshape=True, output_type=None, output=None, order=3, mode='constant', cval=0.0, prefilter=True): 'Rotate an array.\n\n The array is rotated in the plane defined by the two axes given by the\n axes parameter using spline interpolation of the requested order. The\n angl...
def __init__(self, algorithm=None, max_failed_trial_count=None, max_trial_count=None, metrics_collector_spec=None, nas_config=None, objective=None, parallel_trial_count=None, parameters=None, resume_policy=None, trial_template=None): 'V1alpha3ExperimentSpec - a model defined in Swagger' self._algorithm = None ...
133,299,599,670,606,750
V1alpha3ExperimentSpec - a model defined in Swagger
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
__init__
ChenjunZou/katib
python
def __init__(self, algorithm=None, max_failed_trial_count=None, max_trial_count=None, metrics_collector_spec=None, nas_config=None, objective=None, parallel_trial_count=None, parameters=None, resume_policy=None, trial_template=None): self._algorithm = None self._max_failed_trial_count = None self._max_...
@property def algorithm(self): 'Gets the algorithm of this V1alpha3ExperimentSpec. # noqa: E501\n\n Describes the suggestion algorithm. # noqa: E501\n\n :return: The algorithm of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: V1alpha3AlgorithmSpec\n ' return self._algorithm
7,650,702,324,478,667,000
Gets the algorithm of this V1alpha3ExperimentSpec. # noqa: E501 Describes the suggestion algorithm. # noqa: E501 :return: The algorithm of this V1alpha3ExperimentSpec. # noqa: E501 :rtype: V1alpha3AlgorithmSpec
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
algorithm
ChenjunZou/katib
python
@property def algorithm(self): 'Gets the algorithm of this V1alpha3ExperimentSpec. # noqa: E501\n\n Describes the suggestion algorithm. # noqa: E501\n\n :return: The algorithm of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: V1alpha3AlgorithmSpec\n ' return self._algorithm
@algorithm.setter def algorithm(self, algorithm): 'Sets the algorithm of this V1alpha3ExperimentSpec.\n\n Describes the suggestion algorithm. # noqa: E501\n\n :param algorithm: The algorithm of this V1alpha3ExperimentSpec. # noqa: E501\n :type: V1alpha3AlgorithmSpec\n ' self._algor...
-1,595,579,673,576,640,300
Sets the algorithm of this V1alpha3ExperimentSpec. Describes the suggestion algorithm. # noqa: E501 :param algorithm: The algorithm of this V1alpha3ExperimentSpec. # noqa: E501 :type: V1alpha3AlgorithmSpec
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
algorithm
ChenjunZou/katib
python
@algorithm.setter def algorithm(self, algorithm): 'Sets the algorithm of this V1alpha3ExperimentSpec.\n\n Describes the suggestion algorithm. # noqa: E501\n\n :param algorithm: The algorithm of this V1alpha3ExperimentSpec. # noqa: E501\n :type: V1alpha3AlgorithmSpec\n ' self._algor...
@property def max_failed_trial_count(self): 'Gets the max_failed_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n\n Max failed trials to mark experiment as failed. # noqa: E501\n\n :return: The max_failed_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: int\n ...
5,420,390,502,883,747,000
Gets the max_failed_trial_count of this V1alpha3ExperimentSpec. # noqa: E501 Max failed trials to mark experiment as failed. # noqa: E501 :return: The max_failed_trial_count of this V1alpha3ExperimentSpec. # noqa: E501 :rtype: int
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
max_failed_trial_count
ChenjunZou/katib
python
@property def max_failed_trial_count(self): 'Gets the max_failed_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n\n Max failed trials to mark experiment as failed. # noqa: E501\n\n :return: The max_failed_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: int\n ...
@max_failed_trial_count.setter def max_failed_trial_count(self, max_failed_trial_count): 'Sets the max_failed_trial_count of this V1alpha3ExperimentSpec.\n\n Max failed trials to mark experiment as failed. # noqa: E501\n\n :param max_failed_trial_count: The max_failed_trial_count of this V1alpha3Expe...
3,150,749,497,333,372,000
Sets the max_failed_trial_count of this V1alpha3ExperimentSpec. Max failed trials to mark experiment as failed. # noqa: E501 :param max_failed_trial_count: The max_failed_trial_count of this V1alpha3ExperimentSpec. # noqa: E501 :type: int
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
max_failed_trial_count
ChenjunZou/katib
python
@max_failed_trial_count.setter def max_failed_trial_count(self, max_failed_trial_count): 'Sets the max_failed_trial_count of this V1alpha3ExperimentSpec.\n\n Max failed trials to mark experiment as failed. # noqa: E501\n\n :param max_failed_trial_count: The max_failed_trial_count of this V1alpha3Expe...
@property def max_trial_count(self): 'Gets the max_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n\n Max completed trials to mark experiment as succeeded # noqa: E501\n\n :return: The max_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: int\n ' return ...
6,569,465,222,338,827,000
Gets the max_trial_count of this V1alpha3ExperimentSpec. # noqa: E501 Max completed trials to mark experiment as succeeded # noqa: E501 :return: The max_trial_count of this V1alpha3ExperimentSpec. # noqa: E501 :rtype: int
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
max_trial_count
ChenjunZou/katib
python
@property def max_trial_count(self): 'Gets the max_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n\n Max completed trials to mark experiment as succeeded # noqa: E501\n\n :return: The max_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: int\n ' return ...
@max_trial_count.setter def max_trial_count(self, max_trial_count): 'Sets the max_trial_count of this V1alpha3ExperimentSpec.\n\n Max completed trials to mark experiment as succeeded # noqa: E501\n\n :param max_trial_count: The max_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n :t...
915,055,181,498,908,300
Sets the max_trial_count of this V1alpha3ExperimentSpec. Max completed trials to mark experiment as succeeded # noqa: E501 :param max_trial_count: The max_trial_count of this V1alpha3ExperimentSpec. # noqa: E501 :type: int
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
max_trial_count
ChenjunZou/katib
python
@max_trial_count.setter def max_trial_count(self, max_trial_count): 'Sets the max_trial_count of this V1alpha3ExperimentSpec.\n\n Max completed trials to mark experiment as succeeded # noqa: E501\n\n :param max_trial_count: The max_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n :t...
@property def metrics_collector_spec(self): 'Gets the metrics_collector_spec of this V1alpha3ExperimentSpec. # noqa: E501\n\n For v1alpha3 we will keep the metrics collector implementation same as v1alpha1. # noqa: E501\n\n :return: The metrics_collector_spec of this V1alpha3ExperimentSpec. # noqa:...
-1,540,824,200,271,872,500
Gets the metrics_collector_spec of this V1alpha3ExperimentSpec. # noqa: E501 For v1alpha3 we will keep the metrics collector implementation same as v1alpha1. # noqa: E501 :return: The metrics_collector_spec of this V1alpha3ExperimentSpec. # noqa: E501 :rtype: V1alpha3MetricsCollectorSpec
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
metrics_collector_spec
ChenjunZou/katib
python
@property def metrics_collector_spec(self): 'Gets the metrics_collector_spec of this V1alpha3ExperimentSpec. # noqa: E501\n\n For v1alpha3 we will keep the metrics collector implementation same as v1alpha1. # noqa: E501\n\n :return: The metrics_collector_spec of this V1alpha3ExperimentSpec. # noqa:...
@metrics_collector_spec.setter def metrics_collector_spec(self, metrics_collector_spec): 'Sets the metrics_collector_spec of this V1alpha3ExperimentSpec.\n\n For v1alpha3 we will keep the metrics collector implementation same as v1alpha1. # noqa: E501\n\n :param metrics_collector_spec: The metrics_co...
5,239,656,019,610,327,000
Sets the metrics_collector_spec of this V1alpha3ExperimentSpec. For v1alpha3 we will keep the metrics collector implementation same as v1alpha1. # noqa: E501 :param metrics_collector_spec: The metrics_collector_spec of this V1alpha3ExperimentSpec. # noqa: E501 :type: V1alpha3MetricsCollectorSpec
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
metrics_collector_spec
ChenjunZou/katib
python
@metrics_collector_spec.setter def metrics_collector_spec(self, metrics_collector_spec): 'Sets the metrics_collector_spec of this V1alpha3ExperimentSpec.\n\n For v1alpha3 we will keep the metrics collector implementation same as v1alpha1. # noqa: E501\n\n :param metrics_collector_spec: The metrics_co...
@property def nas_config(self): 'Gets the nas_config of this V1alpha3ExperimentSpec. # noqa: E501\n\n\n :return: The nas_config of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: V1alpha3NasConfig\n ' return self._nas_config
5,473,597,441,255,212,000
Gets the nas_config of this V1alpha3ExperimentSpec. # noqa: E501 :return: The nas_config of this V1alpha3ExperimentSpec. # noqa: E501 :rtype: V1alpha3NasConfig
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
nas_config
ChenjunZou/katib
python
@property def nas_config(self): 'Gets the nas_config of this V1alpha3ExperimentSpec. # noqa: E501\n\n\n :return: The nas_config of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: V1alpha3NasConfig\n ' return self._nas_config
@nas_config.setter def nas_config(self, nas_config): 'Sets the nas_config of this V1alpha3ExperimentSpec.\n\n\n :param nas_config: The nas_config of this V1alpha3ExperimentSpec. # noqa: E501\n :type: V1alpha3NasConfig\n ' self._nas_config = nas_config
-5,358,884,515,209,816,000
Sets the nas_config of this V1alpha3ExperimentSpec. :param nas_config: The nas_config of this V1alpha3ExperimentSpec. # noqa: E501 :type: V1alpha3NasConfig
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
nas_config
ChenjunZou/katib
python
@nas_config.setter def nas_config(self, nas_config): 'Sets the nas_config of this V1alpha3ExperimentSpec.\n\n\n :param nas_config: The nas_config of this V1alpha3ExperimentSpec. # noqa: E501\n :type: V1alpha3NasConfig\n ' self._nas_config = nas_config
@property def objective(self): 'Gets the objective of this V1alpha3ExperimentSpec. # noqa: E501\n\n Describes the objective of the experiment. # noqa: E501\n\n :return: The objective of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: V1alpha3ObjectiveSpec\n ' return self._obje...
-7,287,374,412,294,059,000
Gets the objective of this V1alpha3ExperimentSpec. # noqa: E501 Describes the objective of the experiment. # noqa: E501 :return: The objective of this V1alpha3ExperimentSpec. # noqa: E501 :rtype: V1alpha3ObjectiveSpec
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
objective
ChenjunZou/katib
python
@property def objective(self): 'Gets the objective of this V1alpha3ExperimentSpec. # noqa: E501\n\n Describes the objective of the experiment. # noqa: E501\n\n :return: The objective of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: V1alpha3ObjectiveSpec\n ' return self._obje...
@objective.setter def objective(self, objective): 'Sets the objective of this V1alpha3ExperimentSpec.\n\n Describes the objective of the experiment. # noqa: E501\n\n :param objective: The objective of this V1alpha3ExperimentSpec. # noqa: E501\n :type: V1alpha3ObjectiveSpec\n ' self...
-4,573,635,184,005,900,000
Sets the objective of this V1alpha3ExperimentSpec. Describes the objective of the experiment. # noqa: E501 :param objective: The objective of this V1alpha3ExperimentSpec. # noqa: E501 :type: V1alpha3ObjectiveSpec
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
objective
ChenjunZou/katib
python
@objective.setter def objective(self, objective): 'Sets the objective of this V1alpha3ExperimentSpec.\n\n Describes the objective of the experiment. # noqa: E501\n\n :param objective: The objective of this V1alpha3ExperimentSpec. # noqa: E501\n :type: V1alpha3ObjectiveSpec\n ' self...
@property def parallel_trial_count(self): 'Gets the parallel_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n\n How many trials can be processed in parallel. Defaults to 3 # noqa: E501\n\n :return: The parallel_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: int\...
-989,895,674,724,652,300
Gets the parallel_trial_count of this V1alpha3ExperimentSpec. # noqa: E501 How many trials can be processed in parallel. Defaults to 3 # noqa: E501 :return: The parallel_trial_count of this V1alpha3ExperimentSpec. # noqa: E501 :rtype: int
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
parallel_trial_count
ChenjunZou/katib
python
@property def parallel_trial_count(self): 'Gets the parallel_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n\n How many trials can be processed in parallel. Defaults to 3 # noqa: E501\n\n :return: The parallel_trial_count of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: int\...
@parallel_trial_count.setter def parallel_trial_count(self, parallel_trial_count): 'Sets the parallel_trial_count of this V1alpha3ExperimentSpec.\n\n How many trials can be processed in parallel. Defaults to 3 # noqa: E501\n\n :param parallel_trial_count: The parallel_trial_count of this V1alpha3Expe...
-8,998,847,579,390,305,000
Sets the parallel_trial_count of this V1alpha3ExperimentSpec. How many trials can be processed in parallel. Defaults to 3 # noqa: E501 :param parallel_trial_count: The parallel_trial_count of this V1alpha3ExperimentSpec. # noqa: E501 :type: int
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
parallel_trial_count
ChenjunZou/katib
python
@parallel_trial_count.setter def parallel_trial_count(self, parallel_trial_count): 'Sets the parallel_trial_count of this V1alpha3ExperimentSpec.\n\n How many trials can be processed in parallel. Defaults to 3 # noqa: E501\n\n :param parallel_trial_count: The parallel_trial_count of this V1alpha3Expe...
@property def parameters(self): 'Gets the parameters of this V1alpha3ExperimentSpec. # noqa: E501\n\n List of hyperparameter configurations. # noqa: E501\n\n :return: The parameters of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: list[V1alpha3ParameterSpec]\n ' return self....
7,362,714,691,322,202,000
Gets the parameters of this V1alpha3ExperimentSpec. # noqa: E501 List of hyperparameter configurations. # noqa: E501 :return: The parameters of this V1alpha3ExperimentSpec. # noqa: E501 :rtype: list[V1alpha3ParameterSpec]
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
parameters
ChenjunZou/katib
python
@property def parameters(self): 'Gets the parameters of this V1alpha3ExperimentSpec. # noqa: E501\n\n List of hyperparameter configurations. # noqa: E501\n\n :return: The parameters of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: list[V1alpha3ParameterSpec]\n ' return self....
@parameters.setter def parameters(self, parameters): 'Sets the parameters of this V1alpha3ExperimentSpec.\n\n List of hyperparameter configurations. # noqa: E501\n\n :param parameters: The parameters of this V1alpha3ExperimentSpec. # noqa: E501\n :type: list[V1alpha3ParameterSpec]\n ' ...
-6,827,287,592,512,544,000
Sets the parameters of this V1alpha3ExperimentSpec. List of hyperparameter configurations. # noqa: E501 :param parameters: The parameters of this V1alpha3ExperimentSpec. # noqa: E501 :type: list[V1alpha3ParameterSpec]
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
parameters
ChenjunZou/katib
python
@parameters.setter def parameters(self, parameters): 'Sets the parameters of this V1alpha3ExperimentSpec.\n\n List of hyperparameter configurations. # noqa: E501\n\n :param parameters: The parameters of this V1alpha3ExperimentSpec. # noqa: E501\n :type: list[V1alpha3ParameterSpec]\n ' ...
@property def resume_policy(self): 'Gets the resume_policy of this V1alpha3ExperimentSpec. # noqa: E501\n\n Describes resuming policy which usually take effect after experiment terminated. # noqa: E501\n\n :return: The resume_policy of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: str\...
-902,392,194,512,818,800
Gets the resume_policy of this V1alpha3ExperimentSpec. # noqa: E501 Describes resuming policy which usually take effect after experiment terminated. # noqa: E501 :return: The resume_policy of this V1alpha3ExperimentSpec. # noqa: E501 :rtype: str
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
resume_policy
ChenjunZou/katib
python
@property def resume_policy(self): 'Gets the resume_policy of this V1alpha3ExperimentSpec. # noqa: E501\n\n Describes resuming policy which usually take effect after experiment terminated. # noqa: E501\n\n :return: The resume_policy of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: str\...
@resume_policy.setter def resume_policy(self, resume_policy): 'Sets the resume_policy of this V1alpha3ExperimentSpec.\n\n Describes resuming policy which usually take effect after experiment terminated. # noqa: E501\n\n :param resume_policy: The resume_policy of this V1alpha3ExperimentSpec. # noqa: ...
-3,797,899,067,050,496,500
Sets the resume_policy of this V1alpha3ExperimentSpec. Describes resuming policy which usually take effect after experiment terminated. # noqa: E501 :param resume_policy: The resume_policy of this V1alpha3ExperimentSpec. # noqa: E501 :type: str
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
resume_policy
ChenjunZou/katib
python
@resume_policy.setter def resume_policy(self, resume_policy): 'Sets the resume_policy of this V1alpha3ExperimentSpec.\n\n Describes resuming policy which usually take effect after experiment terminated. # noqa: E501\n\n :param resume_policy: The resume_policy of this V1alpha3ExperimentSpec. # noqa: ...
@property def trial_template(self): 'Gets the trial_template of this V1alpha3ExperimentSpec. # noqa: E501\n\n Template for each run of the trial. # noqa: E501\n\n :return: The trial_template of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: V1alpha3TrialTemplate\n ' return se...
5,719,433,743,809,543,000
Gets the trial_template of this V1alpha3ExperimentSpec. # noqa: E501 Template for each run of the trial. # noqa: E501 :return: The trial_template of this V1alpha3ExperimentSpec. # noqa: E501 :rtype: V1alpha3TrialTemplate
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
trial_template
ChenjunZou/katib
python
@property def trial_template(self): 'Gets the trial_template of this V1alpha3ExperimentSpec. # noqa: E501\n\n Template for each run of the trial. # noqa: E501\n\n :return: The trial_template of this V1alpha3ExperimentSpec. # noqa: E501\n :rtype: V1alpha3TrialTemplate\n ' return se...
@trial_template.setter def trial_template(self, trial_template): 'Sets the trial_template of this V1alpha3ExperimentSpec.\n\n Template for each run of the trial. # noqa: E501\n\n :param trial_template: The trial_template of this V1alpha3ExperimentSpec. # noqa: E501\n :type: V1alpha3TrialTempl...
-3,362,570,201,147,115,000
Sets the trial_template of this V1alpha3ExperimentSpec. Template for each run of the trial. # noqa: E501 :param trial_template: The trial_template of this V1alpha3ExperimentSpec. # noqa: E501 :type: V1alpha3TrialTemplate
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
trial_template
ChenjunZou/katib
python
@trial_template.setter def trial_template(self, trial_template): 'Sets the trial_template of this V1alpha3ExperimentSpec.\n\n Template for each run of the trial. # noqa: E501\n\n :param trial_template: The trial_template of this V1alpha3ExperimentSpec. # noqa: E501\n :type: V1alpha3TrialTempl...
def to_dict(self): 'Returns the model properties as a dict' result = {} for (attr, _) in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value)) e...
5,751,779,662,646,760,000
Returns the model properties as a dict
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
to_dict
ChenjunZou/katib
python
def to_dict(self): result = {} for (attr, _) in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value)) elif hasattr(value, 'to_dict'): ...
def to_str(self): 'Returns the string representation of the model' return pprint.pformat(self.to_dict())
5,849,158,643,760,736,000
Returns the string representation of the model
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
to_str
ChenjunZou/katib
python
def to_str(self): return pprint.pformat(self.to_dict())
def __repr__(self): 'For `print` and `pprint`' return self.to_str()
-8,960,031,694,814,905,000
For `print` and `pprint`
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
__repr__
ChenjunZou/katib
python
def __repr__(self): return self.to_str()
def __eq__(self, other): 'Returns true if both objects are equal' if (not isinstance(other, V1alpha3ExperimentSpec)): return False return (self.__dict__ == other.__dict__)
323,282,487,021,102,300
Returns true if both objects are equal
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
__eq__
ChenjunZou/katib
python
def __eq__(self, other): if (not isinstance(other, V1alpha3ExperimentSpec)): return False return (self.__dict__ == other.__dict__)
def __ne__(self, other): 'Returns true if both objects are not equal' return (not (self == other))
7,764,124,047,908,058,000
Returns true if both objects are not equal
sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py
__ne__
ChenjunZou/katib
python
def __ne__(self, other): return (not (self == other))
def generate_class_label(data): '\n generates class label on a copy of data using the columns\n State, From_X, From_Y, To_X, To_Y\n ' r_data = data.copy() r_data['target'] = ((((((((r_data.State.astype(np.str) + '_') + r_data.From_X.astype(np.str)) + ',') + r_data.From_Y.astype(np.str)) + '_') + r_...
-4,200,562,121,560,064,500
generates class label on a copy of data using the columns State, From_X, From_Y, To_X, To_Y
notebooks/pawel_ueb2/utility.py
generate_class_label
hhain/sdap17
python
def generate_class_label(data): '\n generates class label on a copy of data using the columns\n State, From_X, From_Y, To_X, To_Y\n ' r_data = data.copy() r_data['target'] = ((((((((r_data.State.astype(np.str) + '_') + r_data.From_X.astype(np.str)) + ',') + r_data.From_Y.astype(np.str)) + '_') + r_...
def generate_class_label_and_drop(data): '\n generates class label on a copy of data using the columns\n State, From_X, From_Y, To_X, To_Y\n ' r_data = data.copy() r_data['target'] = ((((((((r_data.State.astype(np.str) + '_') + r_data.From_X.astype(np.str)) + ',') + r_data.From_Y.astype(np.str)) + ...
-977,516,299,108,665,900
generates class label on a copy of data using the columns State, From_X, From_Y, To_X, To_Y
notebooks/pawel_ueb2/utility.py
generate_class_label_and_drop
hhain/sdap17
python
def generate_class_label_and_drop(data): '\n generates class label on a copy of data using the columns\n State, From_X, From_Y, To_X, To_Y\n ' r_data = data.copy() r_data['target'] = ((((((((r_data.State.astype(np.str) + '_') + r_data.From_X.astype(np.str)) + ',') + r_data.From_Y.astype(np.str)) + ...
def generate_class_label_presence(data, state_variable='target'): "\n generates class label only for presence on a copy of data using only the columns\n Removes: Pause and merges 'Step' and 'Stand' to same class\n " r_data = data.copy() r_data = r_data[(~ r_data['target'].str.contains('Pause'))] ...
-1,007,735,542,717,022,200
generates class label only for presence on a copy of data using only the columns Removes: Pause and merges 'Step' and 'Stand' to same class
notebooks/pawel_ueb2/utility.py
generate_class_label_presence
hhain/sdap17
python
def generate_class_label_presence(data, state_variable='target'): "\n generates class label only for presence on a copy of data using only the columns\n Removes: Pause and merges 'Step' and 'Stand' to same class\n " r_data = data.copy() r_data = r_data[(~ r_data['target'].str.contains('Pause'))] ...
def generate_class_label_dyn_vs_empty(data, state_variable='target'): "\n generates class label only for presence on a copy of data using only the columns\n Removes: Pause and merges 'Step' and 'Stand' to same class\n " r_data = data.copy() r_data = r_data[(~ r_data['target'].str.contains('Pause'))...
-1,956,228,616,649,304,600
generates class label only for presence on a copy of data using only the columns Removes: Pause and merges 'Step' and 'Stand' to same class
notebooks/pawel_ueb2/utility.py
generate_class_label_dyn_vs_empty
hhain/sdap17
python
def generate_class_label_dyn_vs_empty(data, state_variable='target'): "\n generates class label only for presence on a copy of data using only the columns\n Removes: Pause and merges 'Step' and 'Stand' to same class\n " r_data = data.copy() r_data = r_data[(~ r_data['target'].str.contains('Pause'))...
def generate_class_label_presence_and_dynamic(data, state_variable='State'): "\n generates class label only for presence on a copy of data using only the columns\n Removes: Pause and merges 'Step' and 'Stand' to same class\n " r_data = data.copy() r_data['target'] = r_data[state_variable].astype(np...
-8,570,686,824,285,075,000
generates class label only for presence on a copy of data using only the columns Removes: Pause and merges 'Step' and 'Stand' to same class
notebooks/pawel_ueb2/utility.py
generate_class_label_presence_and_dynamic
hhain/sdap17
python
def generate_class_label_presence_and_dynamic(data, state_variable='State'): "\n generates class label only for presence on a copy of data using only the columns\n Removes: Pause and merges 'Step' and 'Stand' to same class\n " r_data = data.copy() r_data['target'] = r_data[state_variable].astype(np...
def get_contigous_borders(indices): '\n helper function to derive contiguous borders from a list of indices\n \n Parameters\n ----------\n indicies : all indices at which a certain thing occurs\n \n \n Returns\n -------\n list of groups when the indices starts and ends (note: last elem...
-6,765,649,735,253,048,000
helper function to derive contiguous borders from a list of indices Parameters ---------- indicies : all indices at which a certain thing occurs Returns ------- list of groups when the indices starts and ends (note: last element is the real last element of the group _not_ n+1)
notebooks/pawel_ueb2/utility.py
get_contigous_borders
hhain/sdap17
python
def get_contigous_borders(indices): '\n helper function to derive contiguous borders from a list of indices\n \n Parameters\n ----------\n indicies : all indices at which a certain thing occurs\n \n \n Returns\n -------\n list of groups when the indices starts and ends (note: last elem...
def get_contiguous_activity_borders(data, label): '\n returns a dict with all starts ends of all labels provided in label variable\n ' labels = data[label].unique() r = {} for l in labels: a = data[(data[label] == l)].index.values r[l] = get_contigous_borders(a) r['length'] = d...
-4,592,589,030,952,876,500
returns a dict with all starts ends of all labels provided in label variable
notebooks/pawel_ueb2/utility.py
get_contiguous_activity_borders
hhain/sdap17
python
def get_contiguous_activity_borders(data, label): '\n \n ' labels = data[label].unique() r = {} for l in labels: a = data[(data[label] == l)].index.values r[l] = get_contigous_borders(a) r['length'] = data.shape[0] return r
def annotate(a): '\n draws annotation into a sns heatmap using plt annotation\n \n a : dictonary with activity name and borders\n ' min_length = 4 for k in a.keys(): if (k == 'length'): continue borders = a[k] for (s, e) in borders: s_r = (a['lengt...
5,088,699,391,643,657,000
draws annotation into a sns heatmap using plt annotation a : dictonary with activity name and borders
notebooks/pawel_ueb2/utility.py
annotate
hhain/sdap17
python
def annotate(a): '\n draws annotation into a sns heatmap using plt annotation\n \n a : dictonary with activity name and borders\n ' min_length = 4 for k in a.keys(): if (k == 'length'): continue borders = a[k] for (s, e) in borders: s_r = (a['lengt...
@pytest.mark.django_db def test_phone_create(self): ' Test phone contact method ' phone_num = '7739441467' phone = PhoneContactMethodFactory.create(phone=phone_num) assert (phone_num == phone.phone) assert (phone.id is not None)
3,037,570,262,273,459,000
Test phone contact method
web/tests/test_models.py
test_phone_create
DaveyDevs/maps
python
@pytest.mark.django_db def test_phone_create(self): ' ' phone_num = '7739441467' phone = PhoneContactMethodFactory.create(phone=phone_num) assert (phone_num == phone.phone) assert (phone.id is not None)
@pytest.mark.django_db def test_phone_create_invalid_num(self): ' Test phone contact method ' phone_num = 'abcdefsfdsf' phone = PhoneContactMethodFactory.create(phone=phone_num) assert (phone_num == phone.phone) assert (phone.id is not None) print('\n\n\n\n-------------id is ', id)
4,071,800,736,813,351,400
Test phone contact method
web/tests/test_models.py
test_phone_create_invalid_num
DaveyDevs/maps
python
@pytest.mark.django_db def test_phone_create_invalid_num(self): ' ' phone_num = 'abcdefsfdsf' phone = PhoneContactMethodFactory.create(phone=phone_num) assert (phone_num == phone.phone) assert (phone.id is not None) print('\n\n\n\n-------------id is ', id)
@pytest.mark.django_db def test_coop_type_create(self): ' Test coop type model ' coop_type = CoopTypeFactory(name='Test Coop Type Name') assert (coop_type.name == 'Test Coop Type Name')
-4,583,710,025,203,208,700
Test coop type model
web/tests/test_models.py
test_coop_type_create
DaveyDevs/maps
python
@pytest.mark.django_db def test_coop_type_create(self): ' ' coop_type = CoopTypeFactory(name='Test Coop Type Name') assert (coop_type.name == 'Test Coop Type Name')
@pytest.mark.django_db def test_address_create(self): ' Test address model ' address = AddressFactory() assert (address is not None)
5,765,578,803,282,311,000
Test address model
web/tests/test_models.py
test_address_create
DaveyDevs/maps
python
@pytest.mark.django_db def test_address_create(self): ' ' address = AddressFactory() assert (address is not None)
@pytest.mark.django_db def test_coop_create(self): ' Test customer model ' coop_from_factory = CoopFactory() self.assertIsNotNone(coop_from_factory) coop = Coop.objects.create(name='test') coop.addresses.set(coop_from_factory.addresses.all()) self.assertIsNotNone(coop)
2,080,276,956,993,651,500
Test customer model
web/tests/test_models.py
test_coop_create
DaveyDevs/maps
python
@pytest.mark.django_db def test_coop_create(self): ' ' coop_from_factory = CoopFactory() self.assertIsNotNone(coop_from_factory) coop = Coop.objects.create(name='test') coop.addresses.set(coop_from_factory.addresses.all()) self.assertIsNotNone(coop)
@pytest.mark.django_db def test_coop_create_with_existing_type(self): ' Test customer model ' coop_from_factory = CoopFactory() self.assertIsNotNone(coop_from_factory) coop_types = coop_from_factory.types coop = CoopFactory.create(types=[coop_types.all().first()], addresses=coop_from_factory.address...
130,662,896,693,943,970
Test customer model
web/tests/test_models.py
test_coop_create_with_existing_type
DaveyDevs/maps
python
@pytest.mark.django_db def test_coop_create_with_existing_type(self): ' ' coop_from_factory = CoopFactory() self.assertIsNotNone(coop_from_factory) coop_types = coop_from_factory.types coop = CoopFactory.create(types=[coop_types.all().first()], addresses=coop_from_factory.addresses.all()) self....
@pytest.mark.django_db def test_coop_create_with_no_types(self): ' Test customer model ' print('\n\n\n\n**********-------- starting test ....\n') coop = CoopFactory.build(types=[]) print('phone:', coop.phone.phone) print('email:', coop.email.email) coop.full_clean() self.assertIsNotNone(coop...
8,761,434,052,913,679,000
Test customer model
web/tests/test_models.py
test_coop_create_with_no_types
DaveyDevs/maps
python
@pytest.mark.django_db def test_coop_create_with_no_types(self): ' ' print('\n\n\n\n**********-------- starting test ....\n') coop = CoopFactory.build(types=[]) print('phone:', coop.phone.phone) print('email:', coop.email.email) coop.full_clean() self.assertIsNotNone(coop) self.assertIs...
def test_search_coops_wo_coords(self): '\n Look for coops with addresses without latitude/longitude coords\n ' address = AddressFactory(latitude=None, longitude=None) coop_from_factory = CoopFactory(addresses=[address]) coops = Coop.objects.find_wo_coords() results = list(coops) as...
-1,202,784,789,676,018,700
Look for coops with addresses without latitude/longitude coords
web/tests/test_models.py
test_search_coops_wo_coords
DaveyDevs/maps
python
def test_search_coops_wo_coords(self): '\n \n ' address = AddressFactory(latitude=None, longitude=None) coop_from_factory = CoopFactory(addresses=[address]) coops = Coop.objects.find_wo_coords() results = list(coops) assert (len(results) > 0), 'Failed to find any matching results.'...
def make_request(reactor, method, path, content=b'', access_token=None, request=SynapseRequest, shorthand=True): '\n Make a web request using the given method and path, feed it the\n content, and return the Request and the Channel underneath.\n\n Args:\n method (bytes/unicode): The HTTP request meth...
-1,632,200,608,994,487,800
Make a web request using the given method and path, feed it the content, and return the Request and the Channel underneath. Args: method (bytes/unicode): The HTTP request method ("verb"). path (bytes/unicode): The HTTP path, suitably URL encoded (e.g. escaped UTF-8 & spaces and such). content (bytes or...
tests/server.py
make_request
AlohaHealth/synapse
python
def make_request(reactor, method, path, content=b, access_token=None, request=SynapseRequest, shorthand=True): '\n Make a web request using the given method and path, feed it the\n content, and return the Request and the Channel underneath.\n\n Args:\n method (bytes/unicode): The HTTP request method...
def wait_until_result(clock, request, timeout=100): '\n Wait until the request is finished.\n ' clock.run() x = 0 while (not request.finished): if request._channel._producer: request._channel._producer.resumeProducing() x += 1 if (x > timeout): raise...
1,815,053,821,847,915,300
Wait until the request is finished.
tests/server.py
wait_until_result
AlohaHealth/synapse
python
def wait_until_result(clock, request, timeout=100): '\n \n ' clock.run() x = 0 while (not request.finished): if request._channel._producer: request._channel._producer.resumeProducing() x += 1 if (x > timeout): raise TimedOutException('Timed out waiti...
def setup_test_homeserver(cleanup_func, *args, **kwargs): '\n Set up a synchronous test server, driven by the reactor used by\n the homeserver.\n ' d = _sth(cleanup_func, *args, **kwargs).result if isinstance(d, Failure): d.raiseException() clock = d.get_clock() pool = d.get_db_pool...
2,878,812,827,671,844,000
Set up a synchronous test server, driven by the reactor used by the homeserver.
tests/server.py
setup_test_homeserver
AlohaHealth/synapse
python
def setup_test_homeserver(cleanup_func, *args, **kwargs): '\n Set up a synchronous test server, driven by the reactor used by\n the homeserver.\n ' d = _sth(cleanup_func, *args, **kwargs).result if isinstance(d, Failure): d.raiseException() clock = d.get_clock() pool = d.get_db_pool...
def callFromThread(self, callback, *args, **kwargs): '\n Make the callback fire in the next reactor iteration.\n ' d = Deferred() d.addCallback((lambda x: callback(*args, **kwargs))) self.callLater(0, d.callback, True) return d
-1,258,819,838,172,941,300
Make the callback fire in the next reactor iteration.
tests/server.py
callFromThread
AlohaHealth/synapse
python
def callFromThread(self, callback, *args, **kwargs): '\n \n ' d = Deferred() d.addCallback((lambda x: callback(*args, **kwargs))) self.callLater(0, d.callback, True) return d
def __init__(self, output_dim, nb_ctrl_sig, **kwargs): "\n This layer is used to split the output of a previous Dense layer into\n nb_ctrl_sig groups of size output_dim, and choose which group to provide\n as output using a discrete control signal.\n It takes as input two tensors, namely...
-5,426,948,042,926,424,000
This layer is used to split the output of a previous Dense layer into nb_ctrl_sig groups of size output_dim, and choose which group to provide as output using a discrete control signal. It takes as input two tensors, namely the output of the previous layer and a column tensor with int32 or int64 values for the control...
multiplexer.py
__init__
2vin/multiplexed_cnn
python
def __init__(self, output_dim, nb_ctrl_sig, **kwargs): "\n This layer is used to split the output of a previous Dense layer into\n nb_ctrl_sig groups of size output_dim, and choose which group to provide\n as output using a discrete control signal.\n It takes as input two tensors, namely...
@staticmethod def multiplexer(args, output_size, nb_actions): '\n Returns a tensor of shape (None, output_size) where each sample is\n the result of masking each sample in full_input with a binary mask that \n preserves only output_size elements, based on the corresponding control \n val...
7,943,560,504,436,702,000
Returns a tensor of shape (None, output_size) where each sample is the result of masking each sample in full_input with a binary mask that preserves only output_size elements, based on the corresponding control value in indices.
multiplexer.py
multiplexer
2vin/multiplexed_cnn
python
@staticmethod def multiplexer(args, output_size, nb_actions): '\n Returns a tensor of shape (None, output_size) where each sample is\n the result of masking each sample in full_input with a binary mask that \n preserves only output_size elements, based on the corresponding control \n val...
def generate_token(user): " Currently this is workaround\n since the latest version that already has this function\n is not published on PyPI yet and we don't want\n to install the package directly from GitHub.\n See: https://github.com/mattupstate/flask-jwt/blob/9f4f3bc8dce9da5dd8a567dfada0854e0cf656ae...
8,879,896,876,340,914,000
Currently this is workaround since the latest version that already has this function is not published on PyPI yet and we don't want to install the package directly from GitHub. See: https://github.com/mattupstate/flask-jwt/blob/9f4f3bc8dce9da5dd8a567dfada0854e0cf656ae/flask_jwt/__init__.py#L145
Chapter04/app/auth/resources.py
generate_token
Abhishek1373/Building-Serverless-Python-Web-Services-with-Zappa
python
def generate_token(user): " Currently this is workaround\n since the latest version that already has this function\n is not published on PyPI yet and we don't want\n to install the package directly from GitHub.\n See: https://github.com/mattupstate/flask-jwt/blob/9f4f3bc8dce9da5dd8a567dfada0854e0cf656ae...
def crawl_page(project_data, prerequisites): ' Picks a random image off of the passed URL.' result = {'status': 'success', 'image': None} url = project_data.get('url') if (not url): result['status'] = 'error' result['error_message'] = 'URL was not provided.' return result log...
9,174,871,841,792,264,000
Picks a random image off of the passed URL.
simple_workflow/v1/crawl.py
crawl_page
b12io/orchestra
python
def crawl_page(project_data, prerequisites): ' ' result = {'status': 'success', 'image': None} url = project_data.get('url') if (not url): result['status'] = 'error' result['error_message'] = 'URL was not provided.' return result logger.info('Starting to crawl %s', url) i...
def find_images(url): " Fetches a url's HTML and extracts all image sources in an <img> tag.\n " images = set() headers = {'User-Agent': 'Mozilla/5.0 (compatible; OrchestraBot/1.0; example@example.com)'} response = requests.get(url, headers=headers) if ((response.status_code < 200) or (response.s...
4,603,273,694,007,618,000
Fetches a url's HTML and extracts all image sources in an <img> tag.
simple_workflow/v1/crawl.py
find_images
b12io/orchestra
python
def find_images(url): " \n " images = set() headers = {'User-Agent': 'Mozilla/5.0 (compatible; OrchestraBot/1.0; example@example.com)'} response = requests.get(url, headers=headers) if ((response.status_code < 200) or (response.status_code >= 300)): logger.error("Couldn't fetch url {}".fo...
def verify_votes(message_hash: Hash32, votes: Iterable[Tuple[(ValidatorIndex, BLSSignature, BLSPubkey)]], domain: Domain) -> Tuple[(Tuple[(BLSSignature, ...)], Tuple[(ValidatorIndex, ...)])]: '\n Verify the given votes.\n ' sigs_with_committee_info = tuple(((sig, committee_index) for (committee_index, sig...
-5,234,643,532,797,015,000
Verify the given votes.
eth2/beacon/tools/builder/validator.py
verify_votes
AndrewBezold/trinity
python
def verify_votes(message_hash: Hash32, votes: Iterable[Tuple[(ValidatorIndex, BLSSignature, BLSPubkey)]], domain: Domain) -> Tuple[(Tuple[(BLSSignature, ...)], Tuple[(ValidatorIndex, ...)])]: '\n \n ' sigs_with_committee_info = tuple(((sig, committee_index) for (committee_index, sig, pubkey) in votes if b...
def aggregate_votes(bitfield: Bitfield, sigs: Sequence[BLSSignature], voting_sigs: Sequence[BLSSignature], attesting_indices: Sequence[CommitteeIndex]) -> Tuple[(Bitfield, BLSSignature)]: '\n Aggregate the votes.\n ' sigs = (tuple(sigs) + tuple(voting_sigs)) bitfield = pipe(bitfield, *(set_voted(index...
6,790,892,440,111,287,000
Aggregate the votes.
eth2/beacon/tools/builder/validator.py
aggregate_votes
AndrewBezold/trinity
python
def aggregate_votes(bitfield: Bitfield, sigs: Sequence[BLSSignature], voting_sigs: Sequence[BLSSignature], attesting_indices: Sequence[CommitteeIndex]) -> Tuple[(Bitfield, BLSSignature)]: '\n \n ' sigs = (tuple(sigs) + tuple(voting_sigs)) bitfield = pipe(bitfield, *(set_voted(index=committee_index) fo...
def create_mock_proposer_slashing_at_block(state: BeaconState, config: Eth2Config, keymap: Dict[(BLSPubkey, int)], block_root_1: Hash32, block_root_2: Hash32, proposer_index: ValidatorIndex) -> ProposerSlashing: '\n Return a `ProposerSlashing` derived from the given block roots.\n\n If the header roots do not...
-93,324,441,760,108,860
Return a `ProposerSlashing` derived from the given block roots. If the header roots do not match, the `ProposerSlashing` is valid. If the header roots do match, the `ProposerSlashing` is not valid.
eth2/beacon/tools/builder/validator.py
create_mock_proposer_slashing_at_block
AndrewBezold/trinity
python
def create_mock_proposer_slashing_at_block(state: BeaconState, config: Eth2Config, keymap: Dict[(BLSPubkey, int)], block_root_1: Hash32, block_root_2: Hash32, proposer_index: ValidatorIndex) -> ProposerSlashing: '\n Return a `ProposerSlashing` derived from the given block roots.\n\n If the header roots do not...
def create_mock_slashable_attestation(state: BeaconState, config: Eth2Config, keymap: Dict[(BLSPubkey, int)], attestation_slot: Slot) -> IndexedAttestation: '\n Create an `IndexedAttestation` that is signed by one attester.\n ' attester_index = ValidatorIndex(0) committee = (attester_index,) shard...
4,591,191,133,249,815,600
Create an `IndexedAttestation` that is signed by one attester.
eth2/beacon/tools/builder/validator.py
create_mock_slashable_attestation
AndrewBezold/trinity
python
def create_mock_slashable_attestation(state: BeaconState, config: Eth2Config, keymap: Dict[(BLSPubkey, int)], attestation_slot: Slot) -> IndexedAttestation: '\n \n ' attester_index = ValidatorIndex(0) committee = (attester_index,) shard = Shard(0) beacon_block_root = get_block_root_at_slot(sta...
def _get_mock_message_and_attesting_indices(attestation_data: AttestationData, committee: Sequence[ValidatorIndex], num_voted_attesters: int) -> Tuple[(Hash32, Tuple[(CommitteeIndex, ...)])]: '\n Get ``message_hash`` and voting indices of the given ``committee``.\n ' message_hash = AttestationDataAndCusto...
3,754,444,967,802,969,000
Get ``message_hash`` and voting indices of the given ``committee``.
eth2/beacon/tools/builder/validator.py
_get_mock_message_and_attesting_indices
AndrewBezold/trinity
python
def _get_mock_message_and_attesting_indices(attestation_data: AttestationData, committee: Sequence[ValidatorIndex], num_voted_attesters: int) -> Tuple[(Hash32, Tuple[(CommitteeIndex, ...)])]: '\n \n ' message_hash = AttestationDataAndCustodyBit(data=attestation_data, custody_bit=False).hash_tree_root ...
def _create_mock_signed_attestation(state: BeaconState, attestation_data: AttestationData, attestation_slot: Slot, committee: Sequence[ValidatorIndex], num_voted_attesters: int, keymap: Dict[(BLSPubkey, int)], slots_per_epoch: int) -> Attestation: '\n Create a mocking attestation of the given ``attestation_data`...
8,585,584,768,922,157,000
Create a mocking attestation of the given ``attestation_data`` slot with ``keymap``.
eth2/beacon/tools/builder/validator.py
_create_mock_signed_attestation
AndrewBezold/trinity
python
def _create_mock_signed_attestation(state: BeaconState, attestation_data: AttestationData, attestation_slot: Slot, committee: Sequence[ValidatorIndex], num_voted_attesters: int, keymap: Dict[(BLSPubkey, int)], slots_per_epoch: int) -> Attestation: '\n \n ' (message_hash, attesting_indices) = _get_mock_mes...
def create_signed_attestation_at_slot(state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, attestation_slot: Slot, beacon_block_root: Hash32, validator_privkeys: Dict[(ValidatorIndex, int)], committee: Tuple[(ValidatorIndex, ...)], shard: Shard) -> Attestation: '\n Create the attestatio...
2,879,226,919,838,314,500
Create the attestations of the given ``attestation_slot`` slot with ``validator_privkeys``.
eth2/beacon/tools/builder/validator.py
create_signed_attestation_at_slot
AndrewBezold/trinity
python
def create_signed_attestation_at_slot(state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, attestation_slot: Slot, beacon_block_root: Hash32, validator_privkeys: Dict[(ValidatorIndex, int)], committee: Tuple[(ValidatorIndex, ...)], shard: Shard) -> Attestation: '\n \n ' state_tra...
@to_tuple def create_mock_signed_attestations_at_slot(state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, attestation_slot: Slot, beacon_block_root: Hash32, keymap: Dict[(BLSPubkey, int)], voted_attesters_ratio: float=1.0) -> Iterable[Attestation]: '\n Create the mocking attestations o...
9,024,412,771,648,650,000
Create the mocking attestations of the given ``attestation_slot`` slot with ``keymap``.
eth2/beacon/tools/builder/validator.py
create_mock_signed_attestations_at_slot
AndrewBezold/trinity
python
@to_tuple def create_mock_signed_attestations_at_slot(state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, attestation_slot: Slot, beacon_block_root: Hash32, keymap: Dict[(BLSPubkey, int)], voted_attesters_ratio: float=1.0) -> Iterable[Attestation]: '\n \n ' crosslink_committees_...
def open(self, path, mode): 'Wrapper on __builtin__.open used to simplify unit testing.' import __builtin__ return __builtin__.open(path, mode)
-6,685,491,992,604,253,000
Wrapper on __builtin__.open used to simplify unit testing.
nova/virt/hyperv/pathutils.py
open
bopopescu/nested_quota_final
python
def open(self, path, mode): import __builtin__ return __builtin__.open(path, mode)
def test_username_validation_error_msg(self, user: User): "\n Tests UserCreation Form's unique validator functions correctly by testing:\n 1) A new user with an existing username cannot be added.\n 2) Only 1 error is raised by the UserCreation Form\n 3) The desired error mess...
1,755,965,056,911,758,800
Tests UserCreation Form's unique validator functions correctly by testing: 1) A new user with an existing username cannot be added. 2) Only 1 error is raised by the UserCreation Form 3) The desired error message is raised
djcutter/users/tests/test_forms.py
test_username_validation_error_msg
macbotxxx/djcutter
python
def test_username_validation_error_msg(self, user: User): "\n Tests UserCreation Form's unique validator functions correctly by testing:\n 1) A new user with an existing username cannot be added.\n 2) Only 1 error is raised by the UserCreation Form\n 3) The desired error mess...
def drive_pump(self, volume, direction): 'Converts volume to cycles and ensures and checks pump level and values' if (direction == 0): space_in_pump = (self.max_pump_capacity - self.volume_in_pump) if (volume > space_in_pump): interfaces.lcd_out('Filling Error', line=4) else:...
-9,125,726,388,624,055,000
Converts volume to cycles and ensures and checks pump level and values
titration/utils/devices/syringe_pump_mock.py
drive_pump
KonradMcClure/AlkalinityTitrator
python
def drive_pump(self, volume, direction): if (direction == 0): space_in_pump = (self.max_pump_capacity - self.volume_in_pump) if (volume > space_in_pump): interfaces.lcd_out('Filling Error', line=4) else: interfaces.lcd_out('Filling {0:1.2f} ml'.format(volume), li...
def drive_step_stick(self, cycles, direction): '\n cycles and direction are integers\n Communicates with arduino to add HCl through pump\n :param cycles: number of rising edges for the pump\n :param direction: direction of pump\n ' if (cycles == 0): return 0 if sel...
5,106,291,834,239,962,000
cycles and direction are integers Communicates with arduino to add HCl through pump :param cycles: number of rising edges for the pump :param direction: direction of pump
titration/utils/devices/syringe_pump_mock.py
drive_step_stick
KonradMcClure/AlkalinityTitrator
python
def drive_step_stick(self, cycles, direction): '\n cycles and direction are integers\n Communicates with arduino to add HCl through pump\n :param cycles: number of rising edges for the pump\n :param direction: direction of pump\n ' if (cycles == 0): return 0 if sel...
def all_entities_on_same_layout(entities: Iterable[DXFEntity]): ' Check if all entities are on the same layout (model space or any paper\n layout but not block).\n\n ' owners = set((entity.dxf.owner for entity in entities)) return (len(owners) < 2)
-3,090,958,499,230,387,700
Check if all entities are on the same layout (model space or any paper layout but not block).
src/ezdxf/entities/dxfgroups.py
all_entities_on_same_layout
dmtvanzanten/ezdxf
python
def all_entities_on_same_layout(entities: Iterable[DXFEntity]): ' Check if all entities are on the same layout (model space or any paper\n layout but not block).\n\n ' owners = set((entity.dxf.owner for entity in entities)) return (len(owners) < 2)
def get_group_name(group: DXFGroup, db: 'EntityDB') -> str: ' Get name of `group`. ' group_table = cast('Dictionary', db[group.dxf.owner]) for (name, entity) in group_table.items(): if (entity is group): return name
-3,521,012,806,978,972,000
Get name of `group`.
src/ezdxf/entities/dxfgroups.py
get_group_name
dmtvanzanten/ezdxf
python
def get_group_name(group: DXFGroup, db: 'EntityDB') -> str: ' ' group_table = cast('Dictionary', db[group.dxf.owner]) for (name, entity) in group_table.items(): if (entity is group): return name
def export_entity(self, tagwriter: 'TagWriter') -> None: ' Export entity specific data as DXF tags. ' super().export_entity(tagwriter) tagwriter.write_tag2(const.SUBCLASS_MARKER, acdb_group.name) self.dxf.export_dxf_attribs(tagwriter, ['description', 'unnamed', 'selectable']) self.export_group(tagwr...
8,806,658,115,378,163,000
Export entity specific data as DXF tags.
src/ezdxf/entities/dxfgroups.py
export_entity
dmtvanzanten/ezdxf
python
def export_entity(self, tagwriter: 'TagWriter') -> None: ' ' super().export_entity(tagwriter) tagwriter.write_tag2(const.SUBCLASS_MARKER, acdb_group.name) self.dxf.export_dxf_attribs(tagwriter, ['description', 'unnamed', 'selectable']) self.export_group(tagwriter)
def __iter__(self) -> Iterable[DXFEntity]: ' Iterate over all DXF entities in :class:`DXFGroup` as instances of\n :class:`DXFGraphic` or inherited (LINE, CIRCLE, ...).\n\n ' return (e for e in self._data if e.is_alive)
-6,451,279,862,838,398,000
Iterate over all DXF entities in :class:`DXFGroup` as instances of :class:`DXFGraphic` or inherited (LINE, CIRCLE, ...).
src/ezdxf/entities/dxfgroups.py
__iter__
dmtvanzanten/ezdxf
python
def __iter__(self) -> Iterable[DXFEntity]: ' Iterate over all DXF entities in :class:`DXFGroup` as instances of\n :class:`DXFGraphic` or inherited (LINE, CIRCLE, ...).\n\n ' return (e for e in self._data if e.is_alive)
def __len__(self) -> int: ' Returns the count of DXF entities in :class:`DXFGroup`. ' return len(self._data)
-7,403,369,686,114,288,000
Returns the count of DXF entities in :class:`DXFGroup`.
src/ezdxf/entities/dxfgroups.py
__len__
dmtvanzanten/ezdxf
python
def __len__(self) -> int: ' ' return len(self._data)
def __getitem__(self, item): ' Returns entities by standard Python indexing and slicing. ' return self._data[item]
5,059,744,694,121,915,000
Returns entities by standard Python indexing and slicing.
src/ezdxf/entities/dxfgroups.py
__getitem__
dmtvanzanten/ezdxf
python
def __getitem__(self, item): ' ' return self._data[item]
def __contains__(self, item: Union[(str, DXFEntity)]) -> bool: ' Returns ``True`` if item is in :class:`DXFGroup`. `item` has to be\n a handle string or an object of type :class:`DXFEntity` or inherited.\n\n ' handle = (item if isinstance(item, str) else item.dxf.handle) return (handle in set(...
8,053,672,929,536,613,000
Returns ``True`` if item is in :class:`DXFGroup`. `item` has to be a handle string or an object of type :class:`DXFEntity` or inherited.
src/ezdxf/entities/dxfgroups.py
__contains__
dmtvanzanten/ezdxf
python
def __contains__(self, item: Union[(str, DXFEntity)]) -> bool: ' Returns ``True`` if item is in :class:`DXFGroup`. `item` has to be\n a handle string or an object of type :class:`DXFEntity` or inherited.\n\n ' handle = (item if isinstance(item, str) else item.dxf.handle) return (handle in set(...
def handles(self) -> Iterable[str]: ' Iterable of handles of all DXF entities in :class:`DXFGroup`. ' return (entity.dxf.handle for entity in self)
-6,554,987,980,983,336,000
Iterable of handles of all DXF entities in :class:`DXFGroup`.
src/ezdxf/entities/dxfgroups.py
handles
dmtvanzanten/ezdxf
python
def handles(self) -> Iterable[str]: ' ' return (entity.dxf.handle for entity in self)
@contextmanager def edit_data(self) -> List[DXFEntity]: ' Context manager which yields all the group entities as\n standard Python list::\n\n with group.edit_data() as data:\n # add new entities to a group\n data.append(modelspace.add_line((0, 0), (3, 0)))\n ...
-544,134,383,874,083,260
Context manager which yields all the group entities as standard Python list:: with group.edit_data() as data: # add new entities to a group data.append(modelspace.add_line((0, 0), (3, 0))) # remove last entity from a group data.pop()
src/ezdxf/entities/dxfgroups.py
edit_data
dmtvanzanten/ezdxf
python
@contextmanager def edit_data(self) -> List[DXFEntity]: ' Context manager which yields all the group entities as\n standard Python list::\n\n with group.edit_data() as data:\n # add new entities to a group\n data.append(modelspace.add_line((0, 0), (3, 0)))\n ...
def set_data(self, entities: Iterable[DXFEntity]) -> None: ' Set `entities` as new group content, entities should be an iterable\n :class:`DXFGraphic` or inherited (LINE, CIRCLE, ...).\n Raises :class:`DXFValueError` if not all entities be on the same layout\n (modelspace or any paperspace lay...
-666,040,995,580,035,200
Set `entities` as new group content, entities should be an iterable :class:`DXFGraphic` or inherited (LINE, CIRCLE, ...). Raises :class:`DXFValueError` if not all entities be on the same layout (modelspace or any paperspace layout but not block)
src/ezdxf/entities/dxfgroups.py
set_data
dmtvanzanten/ezdxf
python
def set_data(self, entities: Iterable[DXFEntity]) -> None: ' Set `entities` as new group content, entities should be an iterable\n :class:`DXFGraphic` or inherited (LINE, CIRCLE, ...).\n Raises :class:`DXFValueError` if not all entities be on the same layout\n (modelspace or any paperspace lay...
def extend(self, entities: Iterable[DXFEntity]) -> None: ' Add `entities` to :class:`DXFGroup`. ' self._data.extend(entities)
704,611,828,692,593,000
Add `entities` to :class:`DXFGroup`.
src/ezdxf/entities/dxfgroups.py
extend
dmtvanzanten/ezdxf
python
def extend(self, entities: Iterable[DXFEntity]) -> None: ' ' self._data.extend(entities)
def clear(self) -> None: ' Remove all entities from :class:`DXFGroup`, does not delete any\n drawing entities referenced by this group.\n\n ' self._data = []
7,693,783,732,229,944,000
Remove all entities from :class:`DXFGroup`, does not delete any drawing entities referenced by this group.
src/ezdxf/entities/dxfgroups.py
clear
dmtvanzanten/ezdxf
python
def clear(self) -> None: ' Remove all entities from :class:`DXFGroup`, does not delete any\n drawing entities referenced by this group.\n\n ' self._data = []
def audit(self, auditor: 'Auditor') -> None: ' Remove invalid handles from :class:`DXFGroup`.\n\n Invalid handles are: deleted entities, not all entities in the same\n layout or entities in a block layout.\n\n ' self.purge(auditor.entitydb) if (not all_entities_on_same_layout(self._data...
5,824,201,630,456,137,000
Remove invalid handles from :class:`DXFGroup`. Invalid handles are: deleted entities, not all entities in the same layout or entities in a block layout.
src/ezdxf/entities/dxfgroups.py
audit
dmtvanzanten/ezdxf
python
def audit(self, auditor: 'Auditor') -> None: ' Remove invalid handles from :class:`DXFGroup`.\n\n Invalid handles are: deleted entities, not all entities in the same\n layout or entities in a block layout.\n\n ' self.purge(auditor.entitydb) if (not all_entities_on_same_layout(self._data...
def purge(self, db: 'EntityDB') -> None: ' Remove invalid group entities. ' self._data = self._filter_invalid_entities(db)
7,017,494,116,063,099,000
Remove invalid group entities.
src/ezdxf/entities/dxfgroups.py
purge
dmtvanzanten/ezdxf
python
def purge(self, db: 'EntityDB') -> None: ' ' self._data = self._filter_invalid_entities(db)
def groups(self) -> Iterable[DXFGroup]: ' Iterable of all existing groups. ' for (name, group) in self: (yield group)
3,448,898,582,352,388,000
Iterable of all existing groups.
src/ezdxf/entities/dxfgroups.py
groups
dmtvanzanten/ezdxf
python
def groups(self) -> Iterable[DXFGroup]: ' ' for (name, group) in self: (yield group)
def new(self, name: str=None, description: str='', selectable: bool=True) -> DXFGroup: ' Creates a new group. If `name` is ``None`` an unnamed group is\n created, which has an automatically generated name like "\\*Annnn".\n\n Args:\n name: group name as string\n description: grou...
4,705,095,474,630,304,000
Creates a new group. If `name` is ``None`` an unnamed group is created, which has an automatically generated name like "\*Annnn". Args: name: group name as string description: group description as string selectable: group is selectable if ``True``
src/ezdxf/entities/dxfgroups.py
new
dmtvanzanten/ezdxf
python
def new(self, name: str=None, description: str=, selectable: bool=True) -> DXFGroup: ' Creates a new group. If `name` is ``None`` an unnamed group is\n created, which has an automatically generated name like "\\*Annnn".\n\n Args:\n name: group name as string\n description: group ...
def delete(self, group: Union[(DXFGroup, str)]) -> None: ' Delete `group`, `group` can be an object of type :class:`DXFGroup`\n or a group name as string.\n\n ' if isinstance(group, str): name = group elif (group.dxftype() == 'GROUP'): name = get_group_name(group, self.entitydb...
-8,989,171,775,912,609,000
Delete `group`, `group` can be an object of type :class:`DXFGroup` or a group name as string.
src/ezdxf/entities/dxfgroups.py
delete
dmtvanzanten/ezdxf
python
def delete(self, group: Union[(DXFGroup, str)]) -> None: ' Delete `group`, `group` can be an object of type :class:`DXFGroup`\n or a group name as string.\n\n ' if isinstance(group, str): name = group elif (group.dxftype() == 'GROUP'): name = get_group_name(group, self.entitydb...
def audit(self, auditor: 'Auditor') -> None: ' Removes empty groups and invalid handles from all groups. ' trash = [] for (name, group) in self: group.audit(auditor) if (not len(group)): trash.append(name) for name in trash: auditor.fixed_error(code=AuditError.REMOVE_...
-5,605,563,065,586,540,000
Removes empty groups and invalid handles from all groups.
src/ezdxf/entities/dxfgroups.py
audit
dmtvanzanten/ezdxf
python
def audit(self, auditor: 'Auditor') -> None: ' ' trash = [] for (name, group) in self: group.audit(auditor) if (not len(group)): trash.append(name) for name in trash: auditor.fixed_error(code=AuditError.REMOVE_EMPTY_GROUP, message=f'Removed empty group "{name}".') ...
def __init__(self, more_items_remaining=None, total_item_count=None, continuation_token=None, items=None, total=None): '\n Keyword args:\n more_items_remaining (bool): Returns a value of `true` if subsequent items can be retrieved.\n total_item_count (int): The total number of records a...
7,190,323,510,957,232,000
Keyword args: more_items_remaining (bool): Returns a value of `true` if subsequent items can be retrieved. total_item_count (int): The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count`...
pypureclient/flasharray/FA_2_7/models/volume_snapshot_get_response.py
__init__
Flav-STOR-WL/py-pure-client
python
def __init__(self, more_items_remaining=None, total_item_count=None, continuation_token=None, items=None, total=None): '\n Keyword args:\n more_items_remaining (bool): Returns a value of `true` if subsequent items can be retrieved.\n total_item_count (int): The total number of records a...
def to_dict(self): 'Returns the model properties as a dict' result = {} for (attr, _) in six.iteritems(self.swagger_types): if hasattr(self, attr): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map((lambda x: (x.to_dict() if hasat...
230,603,998,305,512,800
Returns the model properties as a dict
pypureclient/flasharray/FA_2_7/models/volume_snapshot_get_response.py
to_dict
Flav-STOR-WL/py-pure-client
python
def to_dict(self): result = {} for (attr, _) in six.iteritems(self.swagger_types): if hasattr(self, attr): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value)) ...
def to_str(self): 'Returns the string representation of the model' return pprint.pformat(self.to_dict())
5,849,158,643,760,736,000
Returns the string representation of the model
pypureclient/flasharray/FA_2_7/models/volume_snapshot_get_response.py
to_str
Flav-STOR-WL/py-pure-client
python
def to_str(self): return pprint.pformat(self.to_dict())
def __repr__(self): 'For `print` and `pprint`' return self.to_str()
-8,960,031,694,814,905,000
For `print` and `pprint`
pypureclient/flasharray/FA_2_7/models/volume_snapshot_get_response.py
__repr__
Flav-STOR-WL/py-pure-client
python
def __repr__(self): return self.to_str()
def __eq__(self, other): 'Returns true if both objects are equal' if (not isinstance(other, VolumeSnapshotGetResponse)): return False return (self.__dict__ == other.__dict__)
-7,413,502,122,930,958,000
Returns true if both objects are equal
pypureclient/flasharray/FA_2_7/models/volume_snapshot_get_response.py
__eq__
Flav-STOR-WL/py-pure-client
python
def __eq__(self, other): if (not isinstance(other, VolumeSnapshotGetResponse)): return False return (self.__dict__ == other.__dict__)
def __ne__(self, other): 'Returns true if both objects are not equal' return (not (self == other))
7,764,124,047,908,058,000
Returns true if both objects are not equal
pypureclient/flasharray/FA_2_7/models/volume_snapshot_get_response.py
__ne__
Flav-STOR-WL/py-pure-client
python
def __ne__(self, other): return (not (self == other))
def get_all_concentrations(self, projection={'_id': 0, 'inchi': 1, 'inchikey': 1, 'smiles': 1, 'name': 1}): "Get all entries that have concentration values\n \n Args:\n projection (dict, optional): mongodb query projection. Defaults to {'_id': 0, 'inchi': 1,'inchikey': 1, 'smiles': 1, 'name...
5,753,718,575,970,389,000
Get all entries that have concentration values Args: projection (dict, optional): mongodb query projection. Defaults to {'_id': 0, 'inchi': 1,'inchikey': 1, 'smiles': 1, 'name': 1}. Returns: (list): all results that meet the constraint.
datanator_query_python/query/query_xmdb.py
get_all_concentrations
KarrLab/datanator_query_python
python
def get_all_concentrations(self, projection={'_id': 0, 'inchi': 1, 'inchikey': 1, 'smiles': 1, 'name': 1}): "Get all entries that have concentration values\n \n Args:\n projection (dict, optional): mongodb query projection. Defaults to {'_id': 0, 'inchi': 1,'inchikey': 1, 'smiles': 1, 'name...
def get_name_by_inchikey(self, inchikey): "Get metabolite's name by its inchikey\n \n Args:\n inchikey (:obj:`str`): inchi key of metabolite\n\n Return:\n (:obj:`str`): name of metabolite\n " query = {'inchikey': inchikey} projection = {'_id': 0, 'name': 1} ...
-1,496,111,138,151,051,300
Get metabolite's name by its inchikey Args: inchikey (:obj:`str`): inchi key of metabolite Return: (:obj:`str`): name of metabolite
datanator_query_python/query/query_xmdb.py
get_name_by_inchikey
KarrLab/datanator_query_python
python
def get_name_by_inchikey(self, inchikey): "Get metabolite's name by its inchikey\n \n Args:\n inchikey (:obj:`str`): inchi key of metabolite\n\n Return:\n (:obj:`str`): name of metabolite\n " query = {'inchikey': inchikey} projection = {'_id': 0, 'name': 1} ...