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
6b4e25695b40673bfcf1bc66a8fa5f29e3a7528caca966a2f23a8727eadd40f8
def get_data_magnification(self, bad=False): '\n Calculates the model magnification for each data point.\n\n Arguments :\n bad: *boolean*\n If *True*, calculates the magnification for all points.\n If *False*, only calculates the magnification for good data\n ...
Calculates the model magnification for each data point. Arguments : bad: *boolean* If *True*, calculates the magnification for all points. If *False*, only calculates the magnification for good data points. Values for bad data points are set to 0. Default is *False*. Returns : ...
source/MulensModel/fitdata.py
get_data_magnification
rpoleski/MulensModel
30
python
def get_data_magnification(self, bad=False): '\n Calculates the model magnification for each data point.\n\n Arguments :\n bad: *boolean*\n If *True*, calculates the magnification for all points.\n If *False*, only calculates the magnification for good data\n ...
def get_data_magnification(self, bad=False): '\n Calculates the model magnification for each data point.\n\n Arguments :\n bad: *boolean*\n If *True*, calculates the magnification for all points.\n If *False*, only calculates the magnification for good data\n ...
15dd0ded6046238c6d9428e585a0a9dc6f548f893790d5d96fb5d3a1d547d702
def get_model_fluxes(self, bad=False): '\n Calculate model in flux space.\n\n Keywords :\n bad: *bool*\n Default is *False*. If *True* recalculates the data\n magnification for each point to ensure that the values\n for bad datapoints are calcula...
Calculate model in flux space. Keywords : bad: *bool* Default is *False*. If *True* recalculates the data magnification for each point to ensure that the values for bad datapoints are calculated (otherwise, they are set to the magnitude of the blend). Returns : model_flux: *np....
source/MulensModel/fitdata.py
get_model_fluxes
rpoleski/MulensModel
30
python
def get_model_fluxes(self, bad=False): '\n Calculate model in flux space.\n\n Keywords :\n bad: *bool*\n Default is *False*. If *True* recalculates the data\n magnification for each point to ensure that the values\n for bad datapoints are calcula...
def get_model_fluxes(self, bad=False): '\n Calculate model in flux space.\n\n Keywords :\n bad: *bool*\n Default is *False*. If *True* recalculates the data\n magnification for each point to ensure that the values\n for bad datapoints are calcula...
3464ae98c57670868c6970f15cf27fe9950758269ceb7ce79bf375a3249828d3
def get_model_magnitudes(self, **kwargs): '\n Calculate model in magnitude space\n\n Arguments :\n ``**kwargs``:\n see :py:func:`get_model_fluxes()`\n\n Returns :\n model_mag: *np.ndarray*\n The model magnitude evaluated for each datapoint.\n ...
Calculate model in magnitude space Arguments : ``**kwargs``: see :py:func:`get_model_fluxes()` Returns : model_mag: *np.ndarray* The model magnitude evaluated for each datapoint.
source/MulensModel/fitdata.py
get_model_magnitudes
rpoleski/MulensModel
30
python
def get_model_magnitudes(self, **kwargs): '\n Calculate model in magnitude space\n\n Arguments :\n ``**kwargs``:\n see :py:func:`get_model_fluxes()`\n\n Returns :\n model_mag: *np.ndarray*\n The model magnitude evaluated for each datapoint.\n ...
def get_model_magnitudes(self, **kwargs): '\n Calculate model in magnitude space\n\n Arguments :\n ``**kwargs``:\n see :py:func:`get_model_fluxes()`\n\n Returns :\n model_mag: *np.ndarray*\n The model magnitude evaluated for each datapoint.\n ...
367fe883a5ed827e07862af5c0d43b255ba489c36958065101d9ee9f96103889
def scale_fluxes(self, source_flux, blend_flux): '\n Rescale the data fluxes to an arbitrary flux scale:\n flux = source_flux_0 * (data.flux - blend_flux) / source_flux\n flux += blend_flux_0\n err_flux = source_flux_0 * data.err_flux / source_flux\n\n Arguments :\n ...
Rescale the data fluxes to an arbitrary flux scale: flux = source_flux_0 * (data.flux - blend_flux) / source_flux flux += blend_flux_0 err_flux = source_flux_0 * data.err_flux / source_flux Arguments : source_flux: *float*, *list*, *np.array* Flux of the source in the desired system. If n_sourc...
source/MulensModel/fitdata.py
scale_fluxes
rpoleski/MulensModel
30
python
def scale_fluxes(self, source_flux, blend_flux): '\n Rescale the data fluxes to an arbitrary flux scale:\n flux = source_flux_0 * (data.flux - blend_flux) / source_flux\n flux += blend_flux_0\n err_flux = source_flux_0 * data.err_flux / source_flux\n\n Arguments :\n ...
def scale_fluxes(self, source_flux, blend_flux): '\n Rescale the data fluxes to an arbitrary flux scale:\n flux = source_flux_0 * (data.flux - blend_flux) / source_flux\n flux += blend_flux_0\n err_flux = source_flux_0 * data.err_flux / source_flux\n\n Arguments :\n ...
c1fe51b61c158e493410f050b788e0cecc37cfcd2ce2f46bf4087c2b1faa5079
def get_residuals(self, phot_fmt=None, source_flux=None, blend_flux=None, bad=False, type=None): '\n Calculate the residuals for each datapoint relative to the model.\n\n Keywords :\n phot_fmt: *str*, optional\n specify whether the residuals should be returned in\n ...
Calculate the residuals for each datapoint relative to the model. Keywords : phot_fmt: *str*, optional specify whether the residuals should be returned in magnitudes ('mag') or in flux ('flux'). Default is 'mag'. If 'scaled', will return the residuals in magnitudes scaled to source_...
source/MulensModel/fitdata.py
get_residuals
rpoleski/MulensModel
30
python
def get_residuals(self, phot_fmt=None, source_flux=None, blend_flux=None, bad=False, type=None): '\n Calculate the residuals for each datapoint relative to the model.\n\n Keywords :\n phot_fmt: *str*, optional\n specify whether the residuals should be returned in\n ...
def get_residuals(self, phot_fmt=None, source_flux=None, blend_flux=None, bad=False, type=None): '\n Calculate the residuals for each datapoint relative to the model.\n\n Keywords :\n phot_fmt: *str*, optional\n specify whether the residuals should be returned in\n ...
a8e1a4cee9dd6bd5c2a188d008b1f8e1eb1eec1045630de0b5632063739666bf
def _check_for_gradient_implementation(self, parameters): ' Check that the gradient methods are implemented for the requested\n values. ' if (not isinstance(parameters, list)): parameters = [parameters] implemented = {'t_0', 't_E', 'u_0', 't_eff', 'pi_E_N', 'pi_E_E'} if (len((set(paramete...
Check that the gradient methods are implemented for the requested values.
source/MulensModel/fitdata.py
_check_for_gradient_implementation
rpoleski/MulensModel
30
python
def _check_for_gradient_implementation(self, parameters): ' Check that the gradient methods are implemented for the requested\n values. ' if (not isinstance(parameters, list)): parameters = [parameters] implemented = {'t_0', 't_E', 'u_0', 't_eff', 'pi_E_N', 'pi_E_E'} if (len((set(paramete...
def _check_for_gradient_implementation(self, parameters): ' Check that the gradient methods are implemented for the requested\n values. ' if (not isinstance(parameters, list)): parameters = [parameters] implemented = {'t_0', 't_E', 'u_0', 't_eff', 'pi_E_N', 'pi_E_E'} if (len((set(paramete...
a46a08d94f802dd8b85fc229a2344b73024f392c9a9b3f861a3173a8897a08f2
def get_chi2_gradient(self, parameters): '\n Fits fluxes and calculates chi^2 gradient (also called Jacobian), i.e.,\n :math:`d chi^2/d parameter`.\n\n Parameters :\n parameters: *str* or *list*, required\n Parameters with respect to which gradient is calculated.\n ...
Fits fluxes and calculates chi^2 gradient (also called Jacobian), i.e., :math:`d chi^2/d parameter`. Parameters : parameters: *str* or *list*, required Parameters with respect to which gradient is calculated. Currently accepted parameters are: ``t_0``, ``u_0``, ``t_eff``, ``t_E``, ``pi_E_N`...
source/MulensModel/fitdata.py
get_chi2_gradient
rpoleski/MulensModel
30
python
def get_chi2_gradient(self, parameters): '\n Fits fluxes and calculates chi^2 gradient (also called Jacobian), i.e.,\n :math:`d chi^2/d parameter`.\n\n Parameters :\n parameters: *str* or *list*, required\n Parameters with respect to which gradient is calculated.\n ...
def get_chi2_gradient(self, parameters): '\n Fits fluxes and calculates chi^2 gradient (also called Jacobian), i.e.,\n :math:`d chi^2/d parameter`.\n\n Parameters :\n parameters: *str* or *list*, required\n Parameters with respect to which gradient is calculated.\n ...
c93e0e600269061c2eb7f5b9b97213e8147051330bbb49041a25e616cb9f07f9
def calculate_chi2_gradient(self, parameters): '\n Calculates chi^2 gradient (also called Jacobian), i.e.,\n :math:`d chi^2/d parameter` WITHOUT refitting for the fluxes. Saves\n computations if, e.g., you want to retrieve both py:attr:`~chi2` and\n py:attr:`~chi2_gradient`.\n\n P...
Calculates chi^2 gradient (also called Jacobian), i.e., :math:`d chi^2/d parameter` WITHOUT refitting for the fluxes. Saves computations if, e.g., you want to retrieve both py:attr:`~chi2` and py:attr:`~chi2_gradient`. Parameters : parameters: *str* or *list*, required Parameters with respect to which grad...
source/MulensModel/fitdata.py
calculate_chi2_gradient
rpoleski/MulensModel
30
python
def calculate_chi2_gradient(self, parameters): '\n Calculates chi^2 gradient (also called Jacobian), i.e.,\n :math:`d chi^2/d parameter` WITHOUT refitting for the fluxes. Saves\n computations if, e.g., you want to retrieve both py:attr:`~chi2` and\n py:attr:`~chi2_gradient`.\n\n P...
def calculate_chi2_gradient(self, parameters): '\n Calculates chi^2 gradient (also called Jacobian), i.e.,\n :math:`d chi^2/d parameter` WITHOUT refitting for the fluxes. Saves\n computations if, e.g., you want to retrieve both py:attr:`~chi2` and\n py:attr:`~chi2_gradient`.\n\n P...
5658b422fa504a5de4c25f8f07e59a78a3217743a6fc915dee056e7a91e24a0d
@property def chi2_gradient(self): '\n Return previously calculated chi^2 gradient (also called Jacobian),\n i.e., :math:`d chi^2/d parameter`. See :py:func:`~get_chi2_gradient()`\n and :py:func:`~calculate_chi2_gradient()`.\n\n Returns :\n gradient: *float* or *np.ndarray*\n ...
Return previously calculated chi^2 gradient (also called Jacobian), i.e., :math:`d chi^2/d parameter`. See :py:func:`~get_chi2_gradient()` and :py:func:`~calculate_chi2_gradient()`. Returns : gradient: *float* or *np.ndarray* chi^2 gradient. Will return None if the chi2 gradient was not previously ...
source/MulensModel/fitdata.py
chi2_gradient
rpoleski/MulensModel
30
python
@property def chi2_gradient(self): '\n Return previously calculated chi^2 gradient (also called Jacobian),\n i.e., :math:`d chi^2/d parameter`. See :py:func:`~get_chi2_gradient()`\n and :py:func:`~calculate_chi2_gradient()`.\n\n Returns :\n gradient: *float* or *np.ndarray*\n ...
@property def chi2_gradient(self): '\n Return previously calculated chi^2 gradient (also called Jacobian),\n i.e., :math:`d chi^2/d parameter`. See :py:func:`~get_chi2_gradient()`\n and :py:func:`~calculate_chi2_gradient()`.\n\n Returns :\n gradient: *float* or *np.ndarray*\n ...
949a73944bac125e0f847028a4178d87457d53eaca714434900133e9b050b091
@property def chi2(self): '\n Returns :\n chi2: *float*\n the total chi2 for the fitted dataset. Good points only. See\n :py:obj:`~MulensModel.mulensdata.MulensData.good`.\n\n If None, you need to run :py:func:`~update()` to execute the\n linear fit and ...
Returns : chi2: *float* the total chi2 for the fitted dataset. Good points only. See :py:obj:`~MulensModel.mulensdata.MulensData.good`. If None, you need to run :py:func:`~update()` to execute the linear fit and calculate the chi2.
source/MulensModel/fitdata.py
chi2
rpoleski/MulensModel
30
python
@property def chi2(self): '\n Returns :\n chi2: *float*\n the total chi2 for the fitted dataset. Good points only. See\n :py:obj:`~MulensModel.mulensdata.MulensData.good`.\n\n If None, you need to run :py:func:`~update()` to execute the\n linear fit and ...
@property def chi2(self): '\n Returns :\n chi2: *float*\n the total chi2 for the fitted dataset. Good points only. See\n :py:obj:`~MulensModel.mulensdata.MulensData.good`.\n\n If None, you need to run :py:func:`~update()` to execute the\n linear fit and ...
85382f0366c2df8848e998e05c1a794a06ebbe225f3b7a9bb693f0cb73572f2d
@property def chi2_per_point(self): '\n Returns :\n chi2_per_point: *np.ndarray*\n Chi^2 contribution from each data point,\n e.g. ``chi2_per_point[k]`` returns the chi2 contribution\n from the *k*-th point of :py:obj:`dataset`. Includes bad\n ...
Returns : chi2_per_point: *np.ndarray* Chi^2 contribution from each data point, e.g. ``chi2_per_point[k]`` returns the chi2 contribution from the *k*-th point of :py:obj:`dataset`. Includes bad datapoints. If None, you need to run :py:func:`~update()` to execute the linear fit and c...
source/MulensModel/fitdata.py
chi2_per_point
rpoleski/MulensModel
30
python
@property def chi2_per_point(self): '\n Returns :\n chi2_per_point: *np.ndarray*\n Chi^2 contribution from each data point,\n e.g. ``chi2_per_point[k]`` returns the chi2 contribution\n from the *k*-th point of :py:obj:`dataset`. Includes bad\n ...
@property def chi2_per_point(self): '\n Returns :\n chi2_per_point: *np.ndarray*\n Chi^2 contribution from each data point,\n e.g. ``chi2_per_point[k]`` returns the chi2 contribution\n from the *k*-th point of :py:obj:`dataset`. Includes bad\n ...
c7b474468c353c138fffa19e1be7263091a8300a0df9f7ab78d36e1cf0e76b81
@property def source_flux(self): '\n Returns :\n source_flux: *float*\n the fitted source flux. Only defined for models with a single\n source. See also :py:obj:`~source_fluxes`\n\n If None, you need to run :py:func:`~fit_fluxes()` or\n :py:func:`~update()` to e...
Returns : source_flux: *float* the fitted source flux. Only defined for models with a single source. See also :py:obj:`~source_fluxes` If None, you need to run :py:func:`~fit_fluxes()` or :py:func:`~update()` to execute the linear fit.
source/MulensModel/fitdata.py
source_flux
rpoleski/MulensModel
30
python
@property def source_flux(self): '\n Returns :\n source_flux: *float*\n the fitted source flux. Only defined for models with a single\n source. See also :py:obj:`~source_fluxes`\n\n If None, you need to run :py:func:`~fit_fluxes()` or\n :py:func:`~update()` to e...
@property def source_flux(self): '\n Returns :\n source_flux: *float*\n the fitted source flux. Only defined for models with a single\n source. See also :py:obj:`~source_fluxes`\n\n If None, you need to run :py:func:`~fit_fluxes()` or\n :py:func:`~update()` to e...
ad62833df35bfd49679c80cd70eb025dfab9e73b9568466b743f38eda6de6f35
@property def source_fluxes(self): '\n Returns :\n source_fluxes: *np.array*\n the fitted source flux(es).\n\n If None, you need to run :py:func:`~fit_fluxes()` or\n :py:func:`~update()` to execute the linear fit.\n ' return self._source_fluxes
Returns : source_fluxes: *np.array* the fitted source flux(es). If None, you need to run :py:func:`~fit_fluxes()` or :py:func:`~update()` to execute the linear fit.
source/MulensModel/fitdata.py
source_fluxes
rpoleski/MulensModel
30
python
@property def source_fluxes(self): '\n Returns :\n source_fluxes: *np.array*\n the fitted source flux(es).\n\n If None, you need to run :py:func:`~fit_fluxes()` or\n :py:func:`~update()` to execute the linear fit.\n ' return self._source_fluxes
@property def source_fluxes(self): '\n Returns :\n source_fluxes: *np.array*\n the fitted source flux(es).\n\n If None, you need to run :py:func:`~fit_fluxes()` or\n :py:func:`~update()` to execute the linear fit.\n ' return self._source_fluxes<|docstring|>R...
2dbac7dde4c2faff145595ebaa2a92cac9ae39d774a91376e07004c6888a7451
@property def blend_flux(self): '\n Returns :\n blend_flux: *float*\n the fitted blend flux or the value set by\n fix_blend_flux (see :ref:`keywords`).\n\n If None, you need to run :py:func:`~fit_fluxes()` or\n :py:func:`~update()` to execute the linear ...
Returns : blend_flux: *float* the fitted blend flux or the value set by fix_blend_flux (see :ref:`keywords`). If None, you need to run :py:func:`~fit_fluxes()` or :py:func:`~update()` to execute the linear fit.
source/MulensModel/fitdata.py
blend_flux
rpoleski/MulensModel
30
python
@property def blend_flux(self): '\n Returns :\n blend_flux: *float*\n the fitted blend flux or the value set by\n fix_blend_flux (see :ref:`keywords`).\n\n If None, you need to run :py:func:`~fit_fluxes()` or\n :py:func:`~update()` to execute the linear ...
@property def blend_flux(self): '\n Returns :\n blend_flux: *float*\n the fitted blend flux or the value set by\n fix_blend_flux (see :ref:`keywords`).\n\n If None, you need to run :py:func:`~fit_fluxes()` or\n :py:func:`~update()` to execute the linear ...
dd1a23afbb6e672f9b9f1e35197931c8b2e95ecd1f67de2c89a22601d05b8240
@property def source_flux_ratio(self): '\n source_flux_ratio = source_flux_1 / source_flux_0\n\n Returns :\n source_flux_ratio: *float*\n the ratio of the fitted source fluxes or the value set by\n fix_source_flux_ratio (see :ref:`keywords`).\n\n If None...
source_flux_ratio = source_flux_1 / source_flux_0 Returns : source_flux_ratio: *float* the ratio of the fitted source fluxes or the value set by fix_source_flux_ratio (see :ref:`keywords`). If None, you need to run :py:func:`~fit_fluxes()` or :py:func:`~update()` to execute the linear fit.
source/MulensModel/fitdata.py
source_flux_ratio
rpoleski/MulensModel
30
python
@property def source_flux_ratio(self): '\n source_flux_ratio = source_flux_1 / source_flux_0\n\n Returns :\n source_flux_ratio: *float*\n the ratio of the fitted source fluxes or the value set by\n fix_source_flux_ratio (see :ref:`keywords`).\n\n If None...
@property def source_flux_ratio(self): '\n source_flux_ratio = source_flux_1 / source_flux_0\n\n Returns :\n source_flux_ratio: *float*\n the ratio of the fitted source fluxes or the value set by\n fix_source_flux_ratio (see :ref:`keywords`).\n\n If None...
a1c4dacce6a29fef5c3afaa96239ac3a56b26ba2443f727d98136d93e6de1b24
@property def dataset(self): '\n :py:class:`~MulensModel.mulensdata.MulensData` object\n\n A single photometric dataset to be fitted.\n ' return self._dataset
:py:class:`~MulensModel.mulensdata.MulensData` object A single photometric dataset to be fitted.
source/MulensModel/fitdata.py
dataset
rpoleski/MulensModel
30
python
@property def dataset(self): '\n :py:class:`~MulensModel.mulensdata.MulensData` object\n\n A single photometric dataset to be fitted.\n ' return self._dataset
@property def dataset(self): '\n :py:class:`~MulensModel.mulensdata.MulensData` object\n\n A single photometric dataset to be fitted.\n ' return self._dataset<|docstring|>:py:class:`~MulensModel.mulensdata.MulensData` object A single photometric dataset to be fitted.<|endoftext|>
5c1ff6ce49dd4625adc41ed51fcbc0ed6e378ecca6b5737cc7ba8140976acc0b
@property def model(self): '\n :py:class:`~MulensModel.model.Model` object\n\n The model to fit to the data.\n ' return self._model
:py:class:`~MulensModel.model.Model` object The model to fit to the data.
source/MulensModel/fitdata.py
model
rpoleski/MulensModel
30
python
@property def model(self): '\n :py:class:`~MulensModel.model.Model` object\n\n The model to fit to the data.\n ' return self._model
@property def model(self): '\n :py:class:`~MulensModel.model.Model` object\n\n The model to fit to the data.\n ' return self._model<|docstring|>:py:class:`~MulensModel.model.Model` object The model to fit to the data.<|endoftext|>
6e99bfafe17cbce9d2071ec88ffb50317368edd2d746ea9d8a1bf43fb04444c1
@property def gamma(self): "\n *float*\n\n Limb-darkening coefficient for this fit. Set by\n :py:attr:`~dataset.bandpass` and\n :py:func:`~model.get_limb_coeff_gamma()`.\n\n *** CHECK LINKS IN SPHINX. PROBABLY WON'T WORK. ***\n " return self._gamma
*float* Limb-darkening coefficient for this fit. Set by :py:attr:`~dataset.bandpass` and :py:func:`~model.get_limb_coeff_gamma()`. *** CHECK LINKS IN SPHINX. PROBABLY WON'T WORK. ***
source/MulensModel/fitdata.py
gamma
rpoleski/MulensModel
30
python
@property def gamma(self): "\n *float*\n\n Limb-darkening coefficient for this fit. Set by\n :py:attr:`~dataset.bandpass` and\n :py:func:`~model.get_limb_coeff_gamma()`.\n\n *** CHECK LINKS IN SPHINX. PROBABLY WON'T WORK. ***\n " return self._gamma
@property def gamma(self): "\n *float*\n\n Limb-darkening coefficient for this fit. Set by\n :py:attr:`~dataset.bandpass` and\n :py:func:`~model.get_limb_coeff_gamma()`.\n\n *** CHECK LINKS IN SPHINX. PROBABLY WON'T WORK. ***\n " return self._gamma<|docstring|>*float* ...
d168801738909e9288d07d71ea59e67e6818b5b0400296fc98a22cb9ab77b649
@abstractmethod def apply_state_transition_without_block(self, state: BeaconState, slot: Slot, parent_root: Hash32) -> BeaconState: '\n Advance the ``state`` to the beginning of the requested ``slot``.\n Return the resulting state at that slot assuming there are no\n intervening blocks. This me...
Advance the ``state`` to the beginning of the requested ``slot``. Return the resulting state at that slot assuming there are no intervening blocks. This method provides callers with some lookahead into the future state of the chain, useful for generating RANDAO reveals or computing future committee assignments. NOTE: ...
eth2/beacon/state_machines/state_transitions.py
apply_state_transition_without_block
hwwhww/trinity
2
python
@abstractmethod def apply_state_transition_without_block(self, state: BeaconState, slot: Slot, parent_root: Hash32) -> BeaconState: '\n Advance the ``state`` to the beginning of the requested ``slot``.\n Return the resulting state at that slot assuming there are no\n intervening blocks. This me...
@abstractmethod def apply_state_transition_without_block(self, state: BeaconState, slot: Slot, parent_root: Hash32) -> BeaconState: '\n Advance the ``state`` to the beginning of the requested ``slot``.\n Return the resulting state at that slot assuming there are no\n intervening blocks. This me...
5b2dcefe1e3e32b58af2a5b5bfe30b02091ca1e423b6f8b6f66afe9ca8939b3f
def start_response(self, status, headers, exc_info=None): 'Emulate WSGI start_response.' self.headers += headers
Emulate WSGI start_response.
tests/test_middleware_cors.py
start_response
checkmate/simpl
6
python
def start_response(self, status, headers, exc_info=None): self.headers += headers
def start_response(self, status, headers, exc_info=None): self.headers += headers<|docstring|>Emulate WSGI start_response.<|endoftext|>
74ef2f2467db392ad65f9c870d00532c3b23b30c6da4ab827f420f7e598549f1
def test_default_bypass(self): 'Default config ignores all calls.' middleware = cors.CORSMiddleware(debug_app) env = {'PATH_INFO': '/something/'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) self.assertEqual(env['PATH_INFO'], '/something/') self.assert...
Default config ignores all calls.
tests/test_middleware_cors.py
test_default_bypass
checkmate/simpl
6
python
def test_default_bypass(self): middleware = cors.CORSMiddleware(debug_app) env = {'PATH_INFO': '/something/'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) self.assertEqual(env['PATH_INFO'], '/something/') self.assertFalse(any(((h[0] == 'Access-Control...
def test_default_bypass(self): middleware = cors.CORSMiddleware(debug_app) env = {'PATH_INFO': '/something/'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) self.assertEqual(env['PATH_INFO'], '/something/') self.assertFalse(any(((h[0] == 'Access-Control...
ddba70cadf0db1b1b621bf76a29386ff4599db37721fded4194231415c0460d3
def test_netloc(self): 'Netloc match adds headers.' middleware = cors.CORSMiddleware(debug_app, allowed_netlocs=['localhost']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'http://localhost'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) six.assertCou...
Netloc match adds headers.
tests/test_middleware_cors.py
test_netloc
checkmate/simpl
6
python
def test_netloc(self): middleware = cors.CORSMiddleware(debug_app, allowed_netlocs=['localhost']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'http://localhost'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) six.assertCountEqual(self, self.headers, ...
def test_netloc(self): middleware = cors.CORSMiddleware(debug_app, allowed_netlocs=['localhost']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'http://localhost'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) six.assertCountEqual(self, self.headers, ...
0f363cf5180aefa0a042416dc2c438d11d37f04066e82e86f35d40cde1b429e7
def test_netloc_mismatch(self): 'Netloc match checks ports.' middleware = cors.CORSMiddleware(debug_app, allowed_netlocs=['localhost:9000']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'http://localhost:8080'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response...
Netloc match checks ports.
tests/test_middleware_cors.py
test_netloc_mismatch
checkmate/simpl
6
python
def test_netloc_mismatch(self): middleware = cors.CORSMiddleware(debug_app, allowed_netlocs=['localhost:9000']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'http://localhost:8080'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) self.assertFalse(any((...
def test_netloc_mismatch(self): middleware = cors.CORSMiddleware(debug_app, allowed_netlocs=['localhost:9000']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'http://localhost:8080'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) self.assertFalse(any((...
0084c372d845968fb059ccc1cce48f9fcc70eb41cac8a797f03584a3ca5168ed
def test_hostname(self): 'Hostname matches any port and adds headers.' middleware = cors.CORSMiddleware(debug_app, allowed_hostnames=['localhost']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'http://localhost:8080'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_r...
Hostname matches any port and adds headers.
tests/test_middleware_cors.py
test_hostname
checkmate/simpl
6
python
def test_hostname(self): middleware = cors.CORSMiddleware(debug_app, allowed_hostnames=['localhost']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'http://localhost:8080'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) six.assertCountEqual(self, self....
def test_hostname(self): middleware = cors.CORSMiddleware(debug_app, allowed_hostnames=['localhost']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'http://localhost:8080'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) six.assertCountEqual(self, self....
cb9893604dace50648302986d26ad66e9ed6f205ed8e5e578ee683620fd7ec36
def test_regex(self): 'Regex matches origin and adds headers.' middleware = cors.CORSMiddleware(debug_app, allowed_regexes=['.*']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'https://foo'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) six.assertCoun...
Regex matches origin and adds headers.
tests/test_middleware_cors.py
test_regex
checkmate/simpl
6
python
def test_regex(self): middleware = cors.CORSMiddleware(debug_app, allowed_regexes=['.*']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'https://foo'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) six.assertCountEqual(self, self.headers, [('Access-Con...
def test_regex(self): middleware = cors.CORSMiddleware(debug_app, allowed_regexes=['.*']) env = {'REQUEST_METHOD': 'OPTIONS', 'HTTP_ORIGIN': 'https://foo'} wsgiref.util.setup_testing_defaults(env) middleware(env.copy(), self.start_response) six.assertCountEqual(self, self.headers, [('Access-Con...
e5233e36159568d7381aedff219282cae48f58f000ca2a9cd74a43822b06ba5c
def test_conditional_import(self): 'Fail to init if webob not installed.' with mock.patch('simpl.middleware.cors.webob', new=None): app = cors.CORSMiddleware(None) with self.assertRaises(RuntimeError): app({}, self.start_response)
Fail to init if webob not installed.
tests/test_middleware_cors.py
test_conditional_import
checkmate/simpl
6
python
def test_conditional_import(self): with mock.patch('simpl.middleware.cors.webob', new=None): app = cors.CORSMiddleware(None) with self.assertRaises(RuntimeError): app({}, self.start_response)
def test_conditional_import(self): with mock.patch('simpl.middleware.cors.webob', new=None): app = cors.CORSMiddleware(None) with self.assertRaises(RuntimeError): app({}, self.start_response)<|docstring|>Fail to init if webob not installed.<|endoftext|>
2ac2d979c6654b0861e4730048650f37ac536823e5127049db2332ad64ac805d
@skipIfWindows @skipIfFreeBSD @expectedFailureAll(oslist=['linux'], bugnumber='new failure after r256863') def test_lldbmi_symbol_list_lines_file(self): "Test that 'lldb-mi --interpreter' works for -symbol-list-lines when file exists." self.spawnLldbMi(args=None) self.runCmd(('-file-exec-and-symbols %s' % s...
Test that 'lldb-mi --interpreter' works for -symbol-list-lines when file exists.
SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py
test_lldbmi_symbol_list_lines_file
Polidea/SiriusObfuscator
427
python
@skipIfWindows @skipIfFreeBSD @expectedFailureAll(oslist=['linux'], bugnumber='new failure after r256863') def test_lldbmi_symbol_list_lines_file(self): self.spawnLldbMi(args=None) self.runCmd(('-file-exec-and-symbols %s' % self.myexe)) self.expect('\\^done') self.runCmd('-break-insert -f main') ...
@skipIfWindows @skipIfFreeBSD @expectedFailureAll(oslist=['linux'], bugnumber='new failure after r256863') def test_lldbmi_symbol_list_lines_file(self): self.spawnLldbMi(args=None) self.runCmd(('-file-exec-and-symbols %s' % self.myexe)) self.expect('\\^done') self.runCmd('-break-insert -f main') ...
faa7acea4b2b428d30b1969edb5b8dfefb94c33a646f43cdbd0487d573eb6cb0
def colorWipe(self, color, wait_ms=100): ' wipe color across display pixel a time ' for i in range(self.stick.numPixels()): self.stick.setPixelColor(i, color) self.stick.show() time.sleep(1.5) for i in range(self.stick.numPixels()): self.stick.setPixelColor(i, Color(0, 0, 0)) sel...
wipe color across display pixel a time
python/states/standalone/buttonPress.py
colorWipe
dride/dride-indicators
0
python
def colorWipe(self, color, wait_ms=100): ' ' for i in range(self.stick.numPixels()): self.stick.setPixelColor(i, color) self.stick.show() time.sleep(1.5) for i in range(self.stick.numPixels()): self.stick.setPixelColor(i, Color(0, 0, 0)) self.stick.show() time.sleep(0.5)
def colorWipe(self, color, wait_ms=100): ' ' for i in range(self.stick.numPixels()): self.stick.setPixelColor(i, color) self.stick.show() time.sleep(1.5) for i in range(self.stick.numPixels()): self.stick.setPixelColor(i, Color(0, 0, 0)) self.stick.show() time.sleep(0.5)<|do...
01d82ef235a222d59a202d99ac4aa27f36525041ff4ef6ec6cbad83d371fad2d
def execute_task(task): ' Evaluate a nested task\n\n >>> inc = lambda x: x + 1\n >>> execute_task((inc, 1))\n 2\n >>> execute_task((sum, [1, 2, (inc, 3)]))\n 7\n ' if istask(task): (func, args) = (task[0], task[1:]) return func(*map(execute_task, args)) elif isinstance(task...
Evaluate a nested task >>> inc = lambda x: x + 1 >>> execute_task((inc, 1)) 2 >>> execute_task((sum, [1, 2, (inc, 3)])) 7
distributed/worker.py
execute_task
gdementen/distributed
1
python
def execute_task(task): ' Evaluate a nested task\n\n >>> inc = lambda x: x + 1\n >>> execute_task((inc, 1))\n 2\n >>> execute_task((sum, [1, 2, (inc, 3)]))\n 7\n ' if istask(task): (func, args) = (task[0], task[1:]) return func(*map(execute_task, args)) elif isinstance(task...
def execute_task(task): ' Evaluate a nested task\n\n >>> inc = lambda x: x + 1\n >>> execute_task((inc, 1))\n 2\n >>> execute_task((sum, [1, 2, (inc, 3)]))\n 7\n ' if istask(task): (func, args) = (task[0], task[1:]) return func(*map(execute_task, args)) elif isinstance(task...
bacf204f5b897109a90311cc113fbd692832ea2160232dc8746fcf8ce8ed7236
def dumps_function(func): ' Dump a function to bytes, cache functions ' if (func not in cache): b = dumps(func) cache[func] = b return cache[func]
Dump a function to bytes, cache functions
distributed/worker.py
dumps_function
gdementen/distributed
1
python
def dumps_function(func): ' ' if (func not in cache): b = dumps(func) cache[func] = b return cache[func]
def dumps_function(func): ' ' if (func not in cache): b = dumps(func) cache[func] = b return cache[func]<|docstring|>Dump a function to bytes, cache functions<|endoftext|>
9e2a7bd28a39a9ef615502707ba8e6cfee53741b0ee8c1e7f7081de411aba499
def dumps_task(task): " Serialize a dask task\n\n Returns a dict of bytestrings that can each be loaded with ``loads``\n\n Examples\n --------\n Either returns a task as a function, args, kwargs dict\n\n >>> from operator import add\n >>> dumps_task((add, 1)) # doctest: +SKIP\n {'function': b'...
Serialize a dask task Returns a dict of bytestrings that can each be loaded with ``loads`` Examples -------- Either returns a task as a function, args, kwargs dict >>> from operator import add >>> dumps_task((add, 1)) # doctest: +SKIP {'function': b'€•Œ _operator”Œadd”“”.' 'args': b'€•KK†”.'} Or ...
distributed/worker.py
dumps_task
gdementen/distributed
1
python
def dumps_task(task): " Serialize a dask task\n\n Returns a dict of bytestrings that can each be loaded with ``loads``\n\n Examples\n --------\n Either returns a task as a function, args, kwargs dict\n\n >>> from operator import add\n >>> dumps_task((add, 1)) # doctest: +SKIP\n {'function': b'...
def dumps_task(task): " Serialize a dask task\n\n Returns a dict of bytestrings that can each be loaded with ``loads``\n\n Examples\n --------\n Either returns a task as a function, args, kwargs dict\n\n >>> from operator import add\n >>> dumps_task((add, 1)) # doctest: +SKIP\n {'function': b'...
9ca851554f4403b36f02be268292663ba305e46ebd3e94ea442269a5da00a391
def apply_function(function, args, kwargs): ' Run a function, collect information\n\n Returns\n -------\n msg: dictionary with status, result/error, timings, etc..\n ' start = time() try: result = function(*args, **kwargs) except Exception as e: msg = error_message(e) els...
Run a function, collect information Returns ------- msg: dictionary with status, result/error, timings, etc..
distributed/worker.py
apply_function
gdementen/distributed
1
python
def apply_function(function, args, kwargs): ' Run a function, collect information\n\n Returns\n -------\n msg: dictionary with status, result/error, timings, etc..\n ' start = time() try: result = function(*args, **kwargs) except Exception as e: msg = error_message(e) els...
def apply_function(function, args, kwargs): ' Run a function, collect information\n\n Returns\n -------\n msg: dictionary with status, result/error, timings, etc..\n ' start = time() try: result = function(*args, **kwargs) except Exception as e: msg = error_message(e) els...
293ef1ba41caabe528c8b717ab9976f15ce36ac40f87d4e3e3f33944bc8083e5
def get_msg_safe_str(msg): ' Make a worker msg, which contains args and kwargs, safe to cast to str:\n allowing for some arguments to raise exceptions during conversion and\n ignoring them.\n ' class Repr(object): def __init__(self, f, val): self._f = f self._val = val...
Make a worker msg, which contains args and kwargs, safe to cast to str: allowing for some arguments to raise exceptions during conversion and ignoring them.
distributed/worker.py
get_msg_safe_str
gdementen/distributed
1
python
def get_msg_safe_str(msg): ' Make a worker msg, which contains args and kwargs, safe to cast to str:\n allowing for some arguments to raise exceptions during conversion and\n ignoring them.\n ' class Repr(object): def __init__(self, f, val): self._f = f self._val = val...
def get_msg_safe_str(msg): ' Make a worker msg, which contains args and kwargs, safe to cast to str:\n allowing for some arguments to raise exceptions during conversion and\n ignoring them.\n ' class Repr(object): def __init__(self, f, val): self._f = f self._val = val...
73d97c716f6fbdd766ed4e72e77a9313de2e29e39cfa5b20da8c221b3725f567
def convert_args_to_str(args, max_len=None): ' Convert args to a string, allowing for some arguments to raise\n exceptions during conversion and ignoring them.\n ' length = 0 strs = ['' for i in range(len(args))] for (i, arg) in enumerate(args): try: sarg = repr(arg) ex...
Convert args to a string, allowing for some arguments to raise exceptions during conversion and ignoring them.
distributed/worker.py
convert_args_to_str
gdementen/distributed
1
python
def convert_args_to_str(args, max_len=None): ' Convert args to a string, allowing for some arguments to raise\n exceptions during conversion and ignoring them.\n ' length = 0 strs = [ for i in range(len(args))] for (i, arg) in enumerate(args): try: sarg = repr(arg) exce...
def convert_args_to_str(args, max_len=None): ' Convert args to a string, allowing for some arguments to raise\n exceptions during conversion and ignoring them.\n ' length = 0 strs = [ for i in range(len(args))] for (i, arg) in enumerate(args): try: sarg = repr(arg) exce...
1c3290b3deaf87ccb99d912cc6b98737506c55fa212b178293869a350ebf641e
def convert_kwargs_to_str(kwargs, max_len=None): ' Convert kwargs to a string, allowing for some arguments to raise\n exceptions during conversion and ignoring them.\n ' length = 0 strs = ['' for i in range(len(kwargs))] for (i, (argname, arg)) in enumerate(kwargs.items()): try: ...
Convert kwargs to a string, allowing for some arguments to raise exceptions during conversion and ignoring them.
distributed/worker.py
convert_kwargs_to_str
gdementen/distributed
1
python
def convert_kwargs_to_str(kwargs, max_len=None): ' Convert kwargs to a string, allowing for some arguments to raise\n exceptions during conversion and ignoring them.\n ' length = 0 strs = [ for i in range(len(kwargs))] for (i, (argname, arg)) in enumerate(kwargs.items()): try: ...
def convert_kwargs_to_str(kwargs, max_len=None): ' Convert kwargs to a string, allowing for some arguments to raise\n exceptions during conversion and ignoring them.\n ' length = 0 strs = [ for i in range(len(kwargs))] for (i, (argname, arg)) in enumerate(kwargs.items()): try: ...
25de69ce27a61e6ae062101a0b69a60847b010b37e7abb6c8a895d6e6d931658
def deserialize(self, function=None, args=None, kwargs=None, task=None): ' Deserialize task inputs and regularize to func, args, kwargs ' if (task is not None): task = loads(task) if (function is not None): function = loads(function) if args: args = loads(args) if kwargs: ...
Deserialize task inputs and regularize to func, args, kwargs
distributed/worker.py
deserialize
gdementen/distributed
1
python
def deserialize(self, function=None, args=None, kwargs=None, task=None): ' ' if (task is not None): task = loads(task) if (function is not None): function = loads(function) if args: args = loads(args) if kwargs: kwargs = loads(kwargs) if (task is not None): ...
def deserialize(self, function=None, args=None, kwargs=None, task=None): ' ' if (task is not None): task = loads(task) if (function is not None): function = loads(function) if args: args = loads(args) if kwargs: kwargs = loads(kwargs) if (task is not None): ...
5f0f6a54984a68873b0e5ca581c902f9458e1e2c1361deca46f830c56c7250cb
@gen.coroutine def gather_many(self, msgs): " Gather the data for many compute messages at once\n\n Returns\n -------\n good: the input messages for which we have data\n bad: a dict of task keys for which we could not find data\n data: The scope in which to run tasks\n len(...
Gather the data for many compute messages at once Returns ------- good: the input messages for which we have data bad: a dict of task keys for which we could not find data data: The scope in which to run tasks len(remote): the number of new keys we've gathered
distributed/worker.py
gather_many
gdementen/distributed
1
python
@gen.coroutine def gather_many(self, msgs): " Gather the data for many compute messages at once\n\n Returns\n -------\n good: the input messages for which we have data\n bad: a dict of task keys for which we could not find data\n data: The scope in which to run tasks\n len(...
@gen.coroutine def gather_many(self, msgs): " Gather the data for many compute messages at once\n\n Returns\n -------\n good: the input messages for which we have data\n bad: a dict of task keys for which we could not find data\n data: The scope in which to run tasks\n len(...
a9562a4e75f87cb8be4581e4a744f8a7250aa380e3d6728a481cbb0bb8598e66
@gen.coroutine def executor_submit(self, key, function, *args, **kwargs): " Safely run function in thread pool executor\n\n We've run into issues running concurrent.future futures within\n tornado. Apparently it's advantageous to use timeouts and periodic\n callbacks to ensure things run smoot...
Safely run function in thread pool executor We've run into issues running concurrent.future futures within tornado. Apparently it's advantageous to use timeouts and periodic callbacks to ensure things run smoothly. This can get tricky, so we pull it off into an separate method.
distributed/worker.py
executor_submit
gdementen/distributed
1
python
@gen.coroutine def executor_submit(self, key, function, *args, **kwargs): " Safely run function in thread pool executor\n\n We've run into issues running concurrent.future futures within\n tornado. Apparently it's advantageous to use timeouts and periodic\n callbacks to ensure things run smoot...
@gen.coroutine def executor_submit(self, key, function, *args, **kwargs): " Safely run function in thread pool executor\n\n We've run into issues running concurrent.future futures within\n tornado. Apparently it's advantageous to use timeouts and periodic\n callbacks to ensure things run smoot...
0b5a5baf33c2fe4a102c354e8ed864e81a1c018d481a6639fa5b4ecdba75c7fc
@gen.coroutine def compute(self, stream=None, function=None, key=None, args=(), kwargs={}, task=None, who_has=None, report=True): ' Execute function ' self.active.add(key) msg = (yield self._ready_task(function=function, key=key, args=args, kwargs=kwargs, task=task, who_has=who_has)) if (msg['status'] !...
Execute function
distributed/worker.py
compute
gdementen/distributed
1
python
@gen.coroutine def compute(self, stream=None, function=None, key=None, args=(), kwargs={}, task=None, who_has=None, report=True): ' ' self.active.add(key) msg = (yield self._ready_task(function=function, key=key, args=args, kwargs=kwargs, task=task, who_has=who_has)) if (msg['status'] != 'OK'): ...
@gen.coroutine def compute(self, stream=None, function=None, key=None, args=(), kwargs={}, task=None, who_has=None, report=True): ' ' self.active.add(key) msg = (yield self._ready_task(function=function, key=key, args=args, kwargs=kwargs, task=task, who_has=who_has)) if (msg['status'] != 'OK'): ...
c5479042cdad4efeb9f00b6762a5471b13a8527feb0d9f0a5433b7ac9fc0255e
def start_ipython(self, stream): 'Start an IPython kernel\n\n Returns Jupyter connection info dictionary.\n ' if (self._ipython_kernel is None): self._ipython_kernel = self._start_ipython() return self._ipython_kernel.get_connection_info()
Start an IPython kernel Returns Jupyter connection info dictionary.
distributed/worker.py
start_ipython
gdementen/distributed
1
python
def start_ipython(self, stream): 'Start an IPython kernel\n\n Returns Jupyter connection info dictionary.\n ' if (self._ipython_kernel is None): self._ipython_kernel = self._start_ipython() return self._ipython_kernel.get_connection_info()
def start_ipython(self, stream): 'Start an IPython kernel\n\n Returns Jupyter connection info dictionary.\n ' if (self._ipython_kernel is None): self._ipython_kernel = self._start_ipython() return self._ipython_kernel.get_connection_info()<|docstring|>Start an IPython kernel Returns J...
ad31f832da57a638aa5900cb4cef47d28f80a314093640cbac4b541c77f61d83
def host_health(self, stream=None): ' Information about worker ' d = {'time': time()} try: import psutil mem = psutil.virtual_memory() d.update({'cpu': psutil.cpu_percent(), 'memory': mem.total, 'memory-percent': mem.percent}) net_io = psutil.net_io_counters() if self...
Information about worker
distributed/worker.py
host_health
gdementen/distributed
1
python
def host_health(self, stream=None): ' ' d = {'time': time()} try: import psutil mem = psutil.virtual_memory() d.update({'cpu': psutil.cpu_percent(), 'memory': mem.total, 'memory-percent': mem.percent}) net_io = psutil.net_io_counters() if self._last_net_io: ...
def host_health(self, stream=None): ' ' d = {'time': time()} try: import psutil mem = psutil.virtual_memory() d.update({'cpu': psutil.cpu_percent(), 'memory': mem.total, 'memory-percent': mem.percent}) net_io = psutil.net_io_counters() if self._last_net_io: ...
e0ff678c32645f0a358463f544f97396a8ca3c8231af43392e85982d1fde9a5f
def parse(db: database.Database, logfile: pathlib.Path) -> None: '\n Parse as much information as possible from the given log file into a DB.\n\n :param db:\n Target database to populate.\n :param logfile:\n Source jam log file containing debug output.\n\n ' for parser_cls in [DCParser...
Parse as much information as possible from the given log file into a DB. :param db: Target database to populate. :param logfile: Source jam log file containing debug output.
jamjar/parsers/__init__.py
parse
ensoft/jamjar
0
python
def parse(db: database.Database, logfile: pathlib.Path) -> None: '\n Parse as much information as possible from the given log file into a DB.\n\n :param db:\n Target database to populate.\n :param logfile:\n Source jam log file containing debug output.\n\n ' for parser_cls in [DCParser...
def parse(db: database.Database, logfile: pathlib.Path) -> None: '\n Parse as much information as possible from the given log file into a DB.\n\n :param db:\n Target database to populate.\n :param logfile:\n Source jam log file containing debug output.\n\n ' for parser_cls in [DCParser...
7ebaa446d674e0440922983cee7b1b60d33374f3b656002918742cd1c60cfe7d
def __init__(self, parent, metadata=None): 'Groupbox for pynwb.base.TimeSeries fields filling form.' super().__init__() self.setTitle('TimeSeries') self.parent = parent self.group_type = 'TimeSeries' self.lbl_name = QLabel((('name<span style="color:' + required_asterisk_color) + ';">*</span>:'))...
Groupbox for pynwb.base.TimeSeries fields filling form.
singer_lab_to_nwb/gui/classes/forms_base.py
__init__
stephprince/singer-lab-to-nwb-hackathon
0
python
def __init__(self, parent, metadata=None): super().__init__() self.setTitle('TimeSeries') self.parent = parent self.group_type = 'TimeSeries' self.lbl_name = QLabel((('name<span style="color:' + required_asterisk_color) + ';">*</span>:')) self.form_name = QLineEdit('TimeSeries') self.fo...
def __init__(self, parent, metadata=None): super().__init__() self.setTitle('TimeSeries') self.parent = parent self.group_type = 'TimeSeries' self.lbl_name = QLabel((('name<span style="color:' + required_asterisk_color) + ';">*</span>:')) self.form_name = QLineEdit('TimeSeries') self.fo...
afd321f4ba46d761b320e5cd077ca43c81987c9598d0001f577ccd7edfaccf8f
def refresh_objects_references(self, metadata=None): 'Refreshes references with existing objects in parent group.' pass
Refreshes references with existing objects in parent group.
singer_lab_to_nwb/gui/classes/forms_base.py
refresh_objects_references
stephprince/singer-lab-to-nwb-hackathon
0
python
def refresh_objects_references(self, metadata=None): pass
def refresh_objects_references(self, metadata=None): pass<|docstring|>Refreshes references with existing objects in parent group.<|endoftext|>
2cc3a12a29da1c6d9c034fa27c162c3c18116cacadc7e53b0f3f5297e65cf1dd
def read_fields(self): 'Reads fields and returns them structured in a dictionary.' data = {} data['name'] = self.form_name.text() try: data['conversion'] = float(self.form_conversion.text()) except ValueError: pass try: data['resolution'] = float(self.form_resolution.text...
Reads fields and returns them structured in a dictionary.
singer_lab_to_nwb/gui/classes/forms_base.py
read_fields
stephprince/singer-lab-to-nwb-hackathon
0
python
def read_fields(self): data = {} data['name'] = self.form_name.text() try: data['conversion'] = float(self.form_conversion.text()) except ValueError: pass try: data['resolution'] = float(self.form_resolution.text()) except ValueError as error: print(error) ...
def read_fields(self): data = {} data['name'] = self.form_name.text() try: data['conversion'] = float(self.form_conversion.text()) except ValueError: pass try: data['resolution'] = float(self.form_resolution.text()) except ValueError as error: print(error) ...
1e89c0b322b87c5f116fba1af1250c964ef07d92eea49ca9c71d74a01017d078
def write_fields(self, metadata={}): 'Reads structured dictionary and write in form fields.' self.form_name.setText(metadata['name']) if ('unit' in metadata): self.form_unit.setText(metadata['unit']) if ('conversion' in metadata): self.form_conversion.setText(str(metadata['conversion']))...
Reads structured dictionary and write in form fields.
singer_lab_to_nwb/gui/classes/forms_base.py
write_fields
stephprince/singer-lab-to-nwb-hackathon
0
python
def write_fields(self, metadata={}): self.form_name.setText(metadata['name']) if ('unit' in metadata): self.form_unit.setText(metadata['unit']) if ('conversion' in metadata): self.form_conversion.setText(str(metadata['conversion'])) if ('resolution' in metadata): self.form_r...
def write_fields(self, metadata={}): self.form_name.setText(metadata['name']) if ('unit' in metadata): self.form_unit.setText(metadata['unit']) if ('conversion' in metadata): self.form_conversion.setText(str(metadata['conversion'])) if ('resolution' in metadata): self.form_r...
9ce913db1e840090b38492891625219fbc2a23670eb20edc2bb79357330a35fc
def __init__(self, parent): 'Groupbox for pynwb.base.Image fields filling form.' super().__init__() self.setTitle('Image') self.parent = parent self.group_type = 'Image' self.lbl_name = QLabel((('name<span style="color:' + required_asterisk_color) + ';">*</span>:')) self.form_name = QLineEdi...
Groupbox for pynwb.base.Image fields filling form.
singer_lab_to_nwb/gui/classes/forms_base.py
__init__
stephprince/singer-lab-to-nwb-hackathon
0
python
def __init__(self, parent): super().__init__() self.setTitle('Image') self.parent = parent self.group_type = 'Image' self.lbl_name = QLabel((('name<span style="color:' + required_asterisk_color) + ';">*</span>:')) self.form_name = QLineEdit('Image') self.form_name.setToolTip('The unique...
def __init__(self, parent): super().__init__() self.setTitle('Image') self.parent = parent self.group_type = 'Image' self.lbl_name = QLabel((('name<span style="color:' + required_asterisk_color) + ';">*</span>:')) self.form_name = QLineEdit('Image') self.form_name.setToolTip('The unique...
afd321f4ba46d761b320e5cd077ca43c81987c9598d0001f577ccd7edfaccf8f
def refresh_objects_references(self, metadata=None): 'Refreshes references with existing objects in parent group.' pass
Refreshes references with existing objects in parent group.
singer_lab_to_nwb/gui/classes/forms_base.py
refresh_objects_references
stephprince/singer-lab-to-nwb-hackathon
0
python
def refresh_objects_references(self, metadata=None): pass
def refresh_objects_references(self, metadata=None): pass<|docstring|>Refreshes references with existing objects in parent group.<|endoftext|>
90ee65f4bc364ec14eb1f73e62ea062f6de23202584518de1afcad474530160e
def read_fields(self): 'Reads fields and returns them structured in a dictionary.' data = {} data['name'] = self.form_name.text() try: data['resolution'] = float(self.form_resolution.text()) except ValueError as error: print(error) data['description'] = self.form_description.text...
Reads fields and returns them structured in a dictionary.
singer_lab_to_nwb/gui/classes/forms_base.py
read_fields
stephprince/singer-lab-to-nwb-hackathon
0
python
def read_fields(self): data = {} data['name'] = self.form_name.text() try: data['resolution'] = float(self.form_resolution.text()) except ValueError as error: print(error) data['description'] = self.form_description.text() data['help'] = self.form_help.text() return data
def read_fields(self): data = {} data['name'] = self.form_name.text() try: data['resolution'] = float(self.form_resolution.text()) except ValueError as error: print(error) data['description'] = self.form_description.text() data['help'] = self.form_help.text() return data...
d07e0aae40a6b00c82ba33ea9ed7e5bdd240a7de5f468f15d883febabda9dabc
def write_fields(self, metadata={}): 'Reads structured dictionary and write in form fields.' self.form_name.setText(metadata['name']) if ('resolution' in metadata): self.form_resolution.setText(str(metadata['resolution'])) if ('description' in metadata): self.form_description.setText(met...
Reads structured dictionary and write in form fields.
singer_lab_to_nwb/gui/classes/forms_base.py
write_fields
stephprince/singer-lab-to-nwb-hackathon
0
python
def write_fields(self, metadata={}): self.form_name.setText(metadata['name']) if ('resolution' in metadata): self.form_resolution.setText(str(metadata['resolution'])) if ('description' in metadata): self.form_description.setText(metadata['description']) if ('help' in metadata): ...
def write_fields(self, metadata={}): self.form_name.setText(metadata['name']) if ('resolution' in metadata): self.form_resolution.setText(str(metadata['resolution'])) if ('description' in metadata): self.form_description.setText(metadata['description']) if ('help' in metadata): ...
e8371eb4e9753c63938c825f8fa14e3165fa2934f8068e73d7d88c75d64bc10a
def __init__(self, parent): 'Groupbox for pynwb.base.Images fields filling form.' super().__init__() self.setTitle('Images') self.parent = parent self.group_type = 'Images' self.lbl_name = QLabel((('name<span style="color:' + required_asterisk_color) + ';">*</span>:')) self.form_name = QLine...
Groupbox for pynwb.base.Images fields filling form.
singer_lab_to_nwb/gui/classes/forms_base.py
__init__
stephprince/singer-lab-to-nwb-hackathon
0
python
def __init__(self, parent): super().__init__() self.setTitle('Images') self.parent = parent self.group_type = 'Images' self.lbl_name = QLabel((('name<span style="color:' + required_asterisk_color) + ';">*</span>:')) self.form_name = QLineEdit('Images') self.form_name.setToolTip('The nam...
def __init__(self, parent): super().__init__() self.setTitle('Images') self.parent = parent self.group_type = 'Images' self.lbl_name = QLabel((('name<span style="color:' + required_asterisk_color) + ';">*</span>:')) self.form_name = QLineEdit('Images') self.form_name.setToolTip('The nam...
b0b10945dd0c65a68e42fcb7832b2078f2e85629659915a5d7c72a5cfbd5527a
def refresh_objects_references(self, metadata=None): 'Refreshes references with existing objects in parent group.' self.combo_images.clear() for grp in self.parent.groups_list: if isinstance(grp, GroupImage): self.combo_images.addItem(grp.form_name.text())
Refreshes references with existing objects in parent group.
singer_lab_to_nwb/gui/classes/forms_base.py
refresh_objects_references
stephprince/singer-lab-to-nwb-hackathon
0
python
def refresh_objects_references(self, metadata=None): self.combo_images.clear() for grp in self.parent.groups_list: if isinstance(grp, GroupImage): self.combo_images.addItem(grp.form_name.text())
def refresh_objects_references(self, metadata=None): self.combo_images.clear() for grp in self.parent.groups_list: if isinstance(grp, GroupImage): self.combo_images.addItem(grp.form_name.text())<|docstring|>Refreshes references with existing objects in parent group.<|endoftext|>
87271cf42eb3c7fd9eff2ed0f31a665f7d5e2c3ee0ff4269533206f5a767de54
def read_fields(self): 'Reads fields and returns them structured in a dictionary.' data = {} data['name'] = self.form_name.text() data['images'] = self.combo_images.currentText() data['description'] = self.form_description.text() return data
Reads fields and returns them structured in a dictionary.
singer_lab_to_nwb/gui/classes/forms_base.py
read_fields
stephprince/singer-lab-to-nwb-hackathon
0
python
def read_fields(self): data = {} data['name'] = self.form_name.text() data['images'] = self.combo_images.currentText() data['description'] = self.form_description.text() return data
def read_fields(self): data = {} data['name'] = self.form_name.text() data['images'] = self.combo_images.currentText() data['description'] = self.form_description.text() return data<|docstring|>Reads fields and returns them structured in a dictionary.<|endoftext|>
6434b8a1ce67e2c22b965a16f45fca86963cf405664b3c645b05cd5598a49a91
def write_fields(self, metadata={}): 'Reads structured dictionary and write in form fields.' self.form_name.setText(metadata['name']) self.combo_images.clear() self.combo_images.addItem(metadata['images']) if ('description' in metadata): self.form_description.setText(metadata['description'])
Reads structured dictionary and write in form fields.
singer_lab_to_nwb/gui/classes/forms_base.py
write_fields
stephprince/singer-lab-to-nwb-hackathon
0
python
def write_fields(self, metadata={}): self.form_name.setText(metadata['name']) self.combo_images.clear() self.combo_images.addItem(metadata['images']) if ('description' in metadata): self.form_description.setText(metadata['description'])
def write_fields(self, metadata={}): self.form_name.setText(metadata['name']) self.combo_images.clear() self.combo_images.addItem(metadata['images']) if ('description' in metadata): self.form_description.setText(metadata['description'])<|docstring|>Reads structured dictionary and write in f...
48c69b1d3a976691833e8c071a9be85106d9f8b6c596f647a9ffe355374eb823
def __init__(self): 'Class created to ignore mouse wheel events on combobox.' super().__init__()
Class created to ignore mouse wheel events on combobox.
singer_lab_to_nwb/gui/classes/forms_base.py
__init__
stephprince/singer-lab-to-nwb-hackathon
0
python
def __init__(self): super().__init__()
def __init__(self): super().__init__()<|docstring|>Class created to ignore mouse wheel events on combobox.<|endoftext|>
27a8c49a697a955a78e7264e2abb02e3dc525fb81d854b752a07bdbd3f8e29e6
def write_json_data(data, filename): '\n write data to a json file\n ' with open(filename, 'w+', encoding='utf-8') as f: json.dump(data, f, indent=4, ensure_ascii=False) f.close()
write data to a json file
dataset/new_dataset/get_single.py
write_json_data
ShubhamAnandJain/MWP-CS229
71
python
def write_json_data(data, filename): '\n \n ' with open(filename, 'w+', encoding='utf-8') as f: json.dump(data, f, indent=4, ensure_ascii=False) f.close()
def write_json_data(data, filename): '\n \n ' with open(filename, 'w+', encoding='utf-8') as f: json.dump(data, f, indent=4, ensure_ascii=False) f.close()<|docstring|>write data to a json file<|endoftext|>
a63faa279aa0472bd10138b0904055baf41cef4946867756a216fa7e1e76c918
def read_json_data(filename): '\n load data from a json file\n ' f = open(filename, 'r', encoding='utf-8') return json.load(f)
load data from a json file
dataset/new_dataset/get_single.py
read_json_data
ShubhamAnandJain/MWP-CS229
71
python
def read_json_data(filename): '\n \n ' f = open(filename, 'r', encoding='utf-8') return json.load(f)
def read_json_data(filename): '\n \n ' f = open(filename, 'r', encoding='utf-8') return json.load(f)<|docstring|>load data from a json file<|endoftext|>
94060bf9780aa6c8037b2d50a14036cb4e58a0f35851f1f702d0f42552131548
def small_txpuzzle_randfee(from_node, conflist, unconflist, amount, min_fee, fee_increment): 'Create and send a transaction with a random fee.\n\n The transaction pays to a trivial P2SH script, and assumes that its inputs\n are of the same form.\n The function takes a list of confirmed outputs and unconfir...
Create and send a transaction with a random fee. The transaction pays to a trivial P2SH script, and assumes that its inputs are of the same form. The function takes a list of confirmed outputs and unconfirmed outputs and attempts to use the confirmed list first for its inputs. It adds the newly created outputs to the ...
test/functional/feature_fee_estimation.py
small_txpuzzle_randfee
Jlemix/bitcoin
32
python
def small_txpuzzle_randfee(from_node, conflist, unconflist, amount, min_fee, fee_increment): 'Create and send a transaction with a random fee.\n\n The transaction pays to a trivial P2SH script, and assumes that its inputs\n are of the same form.\n The function takes a list of confirmed outputs and unconfir...
def small_txpuzzle_randfee(from_node, conflist, unconflist, amount, min_fee, fee_increment): 'Create and send a transaction with a random fee.\n\n The transaction pays to a trivial P2SH script, and assumes that its inputs\n are of the same form.\n The function takes a list of confirmed outputs and unconfir...
4f22de9e2142f5dad50056475b8f997a53a60ded3c88075c93b6beabf7373309
def check_raw_estimates(node, fees_seen): 'Call estimaterawfee and verify that the estimates meet certain invariants.' delta = 1e-06 for i in range(1, 26): for (_, e) in node.estimaterawfee(i).items(): feerate = float(e['feerate']) assert_greater_than(feerate, 0) ...
Call estimaterawfee and verify that the estimates meet certain invariants.
test/functional/feature_fee_estimation.py
check_raw_estimates
Jlemix/bitcoin
32
python
def check_raw_estimates(node, fees_seen): delta = 1e-06 for i in range(1, 26): for (_, e) in node.estimaterawfee(i).items(): feerate = float(e['feerate']) assert_greater_than(feerate, 0) if (((feerate + delta) < min(fees_seen)) or ((feerate - delta) > max(fees_se...
def check_raw_estimates(node, fees_seen): delta = 1e-06 for i in range(1, 26): for (_, e) in node.estimaterawfee(i).items(): feerate = float(e['feerate']) assert_greater_than(feerate, 0) if (((feerate + delta) < min(fees_seen)) or ((feerate - delta) > max(fees_se...
17f1efb2dfea8081f4d5aa5439816016027880b099455ce3dac31dd520e8236d
def check_smart_estimates(node, fees_seen): 'Call estimatesmartfee and verify that the estimates meet certain invariants.' delta = 1e-06 last_feerate = float(max(fees_seen)) all_smart_estimates = [node.estimatesmartfee(i) for i in range(1, 26)] mempoolMinFee = node.getmempoolinfo()['mempoolminfee'] ...
Call estimatesmartfee and verify that the estimates meet certain invariants.
test/functional/feature_fee_estimation.py
check_smart_estimates
Jlemix/bitcoin
32
python
def check_smart_estimates(node, fees_seen): delta = 1e-06 last_feerate = float(max(fees_seen)) all_smart_estimates = [node.estimatesmartfee(i) for i in range(1, 26)] mempoolMinFee = node.getmempoolinfo()['mempoolminfee'] minRelaytxFee = node.getmempoolinfo()['minrelaytxfee'] for (i, e) in e...
def check_smart_estimates(node, fees_seen): delta = 1e-06 last_feerate = float(max(fees_seen)) all_smart_estimates = [node.estimatesmartfee(i) for i in range(1, 26)] mempoolMinFee = node.getmempoolinfo()['mempoolminfee'] minRelaytxFee = node.getmempoolinfo()['minrelaytxfee'] for (i, e) in e...
34462176d7b2f9af0faf022c1ed658fd5009db11fe527f791858381f59cb242b
def send_tx(node, utxo, feerate): 'Broadcast a 1in-1out transaction with a specific input and feerate (sat/vb).' tx = CTransaction() tx.vin = [CTxIn(COutPoint(int(utxo['txid'], 16), utxo['vout']), REDEEM_SCRIPT)] tx.vout = [CTxOut(int((utxo['amount'] * COIN)), P2SH)] fee = (tx.get_vsize() * feerate)...
Broadcast a 1in-1out transaction with a specific input and feerate (sat/vb).
test/functional/feature_fee_estimation.py
send_tx
Jlemix/bitcoin
32
python
def send_tx(node, utxo, feerate): tx = CTransaction() tx.vin = [CTxIn(COutPoint(int(utxo['txid'], 16), utxo['vout']), REDEEM_SCRIPT)] tx.vout = [CTxOut(int((utxo['amount'] * COIN)), P2SH)] fee = (tx.get_vsize() * feerate) tx.vout[0].nValue -= fee return node.sendrawtransaction(tx.serialize(...
def send_tx(node, utxo, feerate): tx = CTransaction() tx.vin = [CTxIn(COutPoint(int(utxo['txid'], 16), utxo['vout']), REDEEM_SCRIPT)] tx.vout = [CTxOut(int((utxo['amount'] * COIN)), P2SH)] fee = (tx.get_vsize() * feerate) tx.vout[0].nValue -= fee return node.sendrawtransaction(tx.serialize(...
0590715800733dbf71b975c570b41ddb13df662c07049c0e8400a63f41158528
def setup_network(self): "\n We'll setup the network to have 3 nodes that all mine with different parameters.\n But first we need to use one node to create a lot of outputs\n which we will use to generate our transactions.\n " self.add_nodes(3, extra_args=self.extra_args) self.st...
We'll setup the network to have 3 nodes that all mine with different parameters. But first we need to use one node to create a lot of outputs which we will use to generate our transactions.
test/functional/feature_fee_estimation.py
setup_network
Jlemix/bitcoin
32
python
def setup_network(self): "\n We'll setup the network to have 3 nodes that all mine with different parameters.\n But first we need to use one node to create a lot of outputs\n which we will use to generate our transactions.\n " self.add_nodes(3, extra_args=self.extra_args) self.st...
def setup_network(self): "\n We'll setup the network to have 3 nodes that all mine with different parameters.\n But first we need to use one node to create a lot of outputs\n which we will use to generate our transactions.\n " self.add_nodes(3, extra_args=self.extra_args) self.st...
c16deb631103ead917563e2555c7b8a95bf702a47cd09421dc97266636f0c4b1
def initial_split(self, node): 'Split two coinbase UTxOs into many small coins' utxo_count = 2048 self.confutxo = [] splitted_amount = Decimal('0.04') fee = Decimal('0.1') change = ((Decimal('100') - (splitted_amount * utxo_count)) - fee) tx = CTransaction() tx.vin = [CTxIn(COutPoint(int...
Split two coinbase UTxOs into many small coins
test/functional/feature_fee_estimation.py
initial_split
Jlemix/bitcoin
32
python
def initial_split(self, node): utxo_count = 2048 self.confutxo = [] splitted_amount = Decimal('0.04') fee = Decimal('0.1') change = ((Decimal('100') - (splitted_amount * utxo_count)) - fee) tx = CTransaction() tx.vin = [CTxIn(COutPoint(int(cb['txid'], 16), cb['vout'])) for cb in node.li...
def initial_split(self, node): utxo_count = 2048 self.confutxo = [] splitted_amount = Decimal('0.04') fee = Decimal('0.1') change = ((Decimal('100') - (splitted_amount * utxo_count)) - fee) tx = CTransaction() tx.vin = [CTxIn(COutPoint(int(cb['txid'], 16), cb['vout'])) for cb in node.li...
840683e11bd02962c99a15e8c68ae83cba256c4f1abebbc854b5b133adbc0f58
def sanity_check_estimates_range(self): 'Populate estimation buckets, assert estimates are in a sane range and\n are strictly increasing as the target decreases.' self.fees_per_kb = [] self.memutxo = [] self.log.info('Will output estimates for 1/2/3/6/15/25 blocks') for _ in range(2): ...
Populate estimation buckets, assert estimates are in a sane range and are strictly increasing as the target decreases.
test/functional/feature_fee_estimation.py
sanity_check_estimates_range
Jlemix/bitcoin
32
python
def sanity_check_estimates_range(self): 'Populate estimation buckets, assert estimates are in a sane range and\n are strictly increasing as the target decreases.' self.fees_per_kb = [] self.memutxo = [] self.log.info('Will output estimates for 1/2/3/6/15/25 blocks') for _ in range(2): ...
def sanity_check_estimates_range(self): 'Populate estimation buckets, assert estimates are in a sane range and\n are strictly increasing as the target decreases.' self.fees_per_kb = [] self.memutxo = [] self.log.info('Will output estimates for 1/2/3/6/15/25 blocks') for _ in range(2): ...
9f3ebfcb1c1c224aee7da0a4d363c74141bee64488af9dae8b78166bd7e98967
def sanity_check_rbf_estimates(self, utxos): "During 5 blocks, broadcast low fee transactions. Only 10% of them get\n confirmed and the remaining ones get RBF'd with a high fee transaction at\n the next block.\n The block policy estimator should return the high feerate.\n " node = se...
During 5 blocks, broadcast low fee transactions. Only 10% of them get confirmed and the remaining ones get RBF'd with a high fee transaction at the next block. The block policy estimator should return the high feerate.
test/functional/feature_fee_estimation.py
sanity_check_rbf_estimates
Jlemix/bitcoin
32
python
def sanity_check_rbf_estimates(self, utxos): "During 5 blocks, broadcast low fee transactions. Only 10% of them get\n confirmed and the remaining ones get RBF'd with a high fee transaction at\n the next block.\n The block policy estimator should return the high feerate.\n " node = se...
def sanity_check_rbf_estimates(self, utxos): "During 5 blocks, broadcast low fee transactions. Only 10% of them get\n confirmed and the remaining ones get RBF'd with a high fee transaction at\n the next block.\n The block policy estimator should return the high feerate.\n " node = se...
65fded06436430a9b2c22de01effb4295b29b7ccac264bcd2c11c8de18b00d29
def __init__(self): 'Constructeur de la commande' Commande.__init__(self, 'score', 'score') self.schema = '' self.aide_courte = 'affiche votre feuille de personnage' self.aide_longue = 'Cette commande vous donne des informations générales sur votre personnage. Considérez ces informations comme une f...
Constructeur de la commande
src/primaires/perso/commandes/score/__init__.py
__init__
vlegoff/tsunami
14
python
def __init__(self): Commande.__init__(self, 'score', 'score') self.schema = self.aide_courte = 'affiche votre feuille de personnage' self.aide_longue = 'Cette commande vous donne des informations générales sur votre personnage. Considérez ces informations comme une fiche de personnage, vous donnan...
def __init__(self): Commande.__init__(self, 'score', 'score') self.schema = self.aide_courte = 'affiche votre feuille de personnage' self.aide_longue = 'Cette commande vous donne des informations générales sur votre personnage. Considérez ces informations comme une fiche de personnage, vous donnan...
dfdcab9a4014813dbe1eb9e4cdb41a4529f18e1000c708c36531826b46673aaf
def interpreter(self, personnage, dic_masques): 'Interprétation de la commande' (personnage << MontrerScore.montrer(personnage))
Interprétation de la commande
src/primaires/perso/commandes/score/__init__.py
interpreter
vlegoff/tsunami
14
python
def interpreter(self, personnage, dic_masques): (personnage << MontrerScore.montrer(personnage))
def interpreter(self, personnage, dic_masques): (personnage << MontrerScore.montrer(personnage))<|docstring|>Interprétation de la commande<|endoftext|>
76faaad4d21a476321e7c26596048ea5921b3a9085993cabdafc33ca6602c095
def forward(self, src_seq, tgt_seq, **kwargs): ' Forward process of NMT model\n\n Given source and target side, return the probabilities of the samples.\n ' raise NotImplementedError
Forward process of NMT model Given source and target side, return the probabilities of the samples.
src/models/base.py
forward
15091444119/NJUNMT-pytorch
86
python
def forward(self, src_seq, tgt_seq, **kwargs): ' Forward process of NMT model\n\n Given source and target side, return the probabilities of the samples.\n ' raise NotImplementedError
def forward(self, src_seq, tgt_seq, **kwargs): ' Forward process of NMT model\n\n Given source and target side, return the probabilities of the samples.\n ' raise NotImplementedError<|docstring|>Forward process of NMT model Given source and target side, return the probabilities of the samples.<|e...
f978ade2c3dca4d992435b21dece9c70f543d566fc42595a5177095d15b33fd0
def init_decoder(self, enc_outputs, expand_size=1): '\n Prepare for decoding\n Args:\n enc_outputs (dict): Output dictionary from the return value of ```encode```\n expand_size: (int): Repeat for several times along the first dimension. This is usefull for\n beam s...
Prepare for decoding Args: enc_outputs (dict): Output dictionary from the return value of ```encode``` expand_size: (int): Repeat for several times along the first dimension. This is usefull for beam search Returns (dict): A dict object store the states in decoding phase.
src/models/base.py
init_decoder
15091444119/NJUNMT-pytorch
86
python
def init_decoder(self, enc_outputs, expand_size=1): '\n Prepare for decoding\n Args:\n enc_outputs (dict): Output dictionary from the return value of ```encode```\n expand_size: (int): Repeat for several times along the first dimension. This is usefull for\n beam s...
def init_decoder(self, enc_outputs, expand_size=1): '\n Prepare for decoding\n Args:\n enc_outputs (dict): Output dictionary from the return value of ```encode```\n expand_size: (int): Repeat for several times along the first dimension. This is usefull for\n beam s...
d6510fbcabeef044dbb712bda20ebaa12ce94815c513b26b6f0134aca8f72d36
def encode(self, src_seq): '\n Encode the source side\n ' raise NotImplementedError
Encode the source side
src/models/base.py
encode
15091444119/NJUNMT-pytorch
86
python
def encode(self, src_seq): '\n \n ' raise NotImplementedError
def encode(self, src_seq): '\n \n ' raise NotImplementedError<|docstring|>Encode the source side<|endoftext|>
e907f69d142b77d76d18b7fc6c4395d580bb2195a810214a6753cb15b7a05eb4
def decode(self, tgt_seq, dec_states, log_probs=True): '\n Decoding for one step\n Args:\n tgt_seq (torch.Tensor): All the generated tokens before.\n dec_states (dict): Decoding states.\n log_probs (bool): Return logarithm probabilities or probabilities. Default is Tru...
Decoding for one step Args: tgt_seq (torch.Tensor): All the generated tokens before. dec_states (dict): Decoding states. log_probs (bool): Return logarithm probabilities or probabilities. Default is True. Returns: Scores of next tokens and decoding states.
src/models/base.py
decode
15091444119/NJUNMT-pytorch
86
python
def decode(self, tgt_seq, dec_states, log_probs=True): '\n Decoding for one step\n Args:\n tgt_seq (torch.Tensor): All the generated tokens before.\n dec_states (dict): Decoding states.\n log_probs (bool): Return logarithm probabilities or probabilities. Default is Tru...
def decode(self, tgt_seq, dec_states, log_probs=True): '\n Decoding for one step\n Args:\n tgt_seq (torch.Tensor): All the generated tokens before.\n dec_states (dict): Decoding states.\n log_probs (bool): Return logarithm probabilities or probabilities. Default is Tru...
302e495356c22c48781d52068fda4ade9178c78a47a907229e5fa5e831470ba4
def reorder_dec_states(self, dec_states, new_beam_indices, beam_size): '\n Re-ordering decoding states according to newly selected beam indices\n\n Args:\n dec_states (dict):\n new_beam_indices (torch.Tensor):\n beam_size (int):\n\n Returns:\n Re-orde...
Re-ordering decoding states according to newly selected beam indices Args: dec_states (dict): new_beam_indices (torch.Tensor): beam_size (int): Returns: Re-ordered dec_states
src/models/base.py
reorder_dec_states
15091444119/NJUNMT-pytorch
86
python
def reorder_dec_states(self, dec_states, new_beam_indices, beam_size): '\n Re-ordering decoding states according to newly selected beam indices\n\n Args:\n dec_states (dict):\n new_beam_indices (torch.Tensor):\n beam_size (int):\n\n Returns:\n Re-orde...
def reorder_dec_states(self, dec_states, new_beam_indices, beam_size): '\n Re-ordering decoding states according to newly selected beam indices\n\n Args:\n dec_states (dict):\n new_beam_indices (torch.Tensor):\n beam_size (int):\n\n Returns:\n Re-orde...
f2f36be5ce3e3694f7b8f689a6f5a0bad13ac9e8ce1d6557b42c0a1ea04eb991
def atMostNGivenDigitSet(self, D, N): '\n :type D: List[str]\n :type N: int\n :rtype: int\n ' S = str(N) K = len(S) dp = (([0] * K) + [1]) for i in xrange((K - 1), (- 1), (- 1)): for d in D: if (d < S[i]): dp[i] += (len(D) ** ((K - i) -...
:type D: List[str] :type N: int :rtype: int
cs15211/NumbersAtMostNGivenDigitSet.py
atMostNGivenDigitSet
JulyKikuAkita/PythonPrac
1
python
def atMostNGivenDigitSet(self, D, N): '\n :type D: List[str]\n :type N: int\n :rtype: int\n ' S = str(N) K = len(S) dp = (([0] * K) + [1]) for i in xrange((K - 1), (- 1), (- 1)): for d in D: if (d < S[i]): dp[i] += (len(D) ** ((K - i) -...
def atMostNGivenDigitSet(self, D, N): '\n :type D: List[str]\n :type N: int\n :rtype: int\n ' S = str(N) K = len(S) dp = (([0] * K) + [1]) for i in xrange((K - 1), (- 1), (- 1)): for d in D: if (d < S[i]): dp[i] += (len(D) ** ((K - i) -...
826e9c2a524a2d46b349d3e4f1569df5ff0ad8e6380fa9f5893049b48ec5c536
def atMostNGivenDigitSet(self, D, N): '\n :type D: List[str]\n :type N: int\n :rtype: int\n ' B = len(D) S = str(N) K = len(S) A = [] for c in S: if (c in D): A.append((D.index(c) + 1)) else: i = bisect.bisect(D, c) ...
:type D: List[str] :type N: int :rtype: int
cs15211/NumbersAtMostNGivenDigitSet.py
atMostNGivenDigitSet
JulyKikuAkita/PythonPrac
1
python
def atMostNGivenDigitSet(self, D, N): '\n :type D: List[str]\n :type N: int\n :rtype: int\n ' B = len(D) S = str(N) K = len(S) A = [] for c in S: if (c in D): A.append((D.index(c) + 1)) else: i = bisect.bisect(D, c) ...
def atMostNGivenDigitSet(self, D, N): '\n :type D: List[str]\n :type N: int\n :rtype: int\n ' B = len(D) S = str(N) K = len(S) A = [] for c in S: if (c in D): A.append((D.index(c) + 1)) else: i = bisect.bisect(D, c) ...
1c002154908ea8c3d629df823f64ce71818a91cdb639b011b2b6d5140045ba4c
def register(linter): 'required method to auto register this checker' linter.register_checker(ForbiddenImportChecker(linter))
required method to auto register this checker
venv/lib/python3.6/site-packages/python_ta/checkers/forbidden_import_checker.py
register
PenPenMark06/Stonehenge-MiniMax
1
python
def register(linter): linter.register_checker(ForbiddenImportChecker(linter))
def register(linter): linter.register_checker(ForbiddenImportChecker(linter))<|docstring|>required method to auto register this checker<|endoftext|>
637712bfe844baad251991b247e350358a7b8e1ff9eea11f7f092544217796f7
@check_messages('forbidden-import') def visit_import(self, node): 'visit an Import node' temp = [name for name in node.names if ((name[0] not in self.config.allowed_import_modules) and (name[0] not in self.config.extra_imports))] if (temp != []): self.add_message('forbidden-import', node=node, args=...
visit an Import node
venv/lib/python3.6/site-packages/python_ta/checkers/forbidden_import_checker.py
visit_import
PenPenMark06/Stonehenge-MiniMax
1
python
@check_messages('forbidden-import') def visit_import(self, node): temp = [name for name in node.names if ((name[0] not in self.config.allowed_import_modules) and (name[0] not in self.config.extra_imports))] if (temp != []): self.add_message('forbidden-import', node=node, args=(', '.join(map((lambda...
@check_messages('forbidden-import') def visit_import(self, node): temp = [name for name in node.names if ((name[0] not in self.config.allowed_import_modules) and (name[0] not in self.config.extra_imports))] if (temp != []): self.add_message('forbidden-import', node=node, args=(', '.join(map((lambda...
81f3d36581399b120f086c52f0f6d984f2abb03216f5e94861148f88a37b4a89
@check_messages('forbidden-import') def visit_importfrom(self, node): 'visit an ImportFrom node' if ((node.modname not in self.config.allowed_import_modules) and (node.modname not in self.config.extra_imports)): self.add_message('forbidden-import', node=node, args=(node.modname, node.lineno))
visit an ImportFrom node
venv/lib/python3.6/site-packages/python_ta/checkers/forbidden_import_checker.py
visit_importfrom
PenPenMark06/Stonehenge-MiniMax
1
python
@check_messages('forbidden-import') def visit_importfrom(self, node): if ((node.modname not in self.config.allowed_import_modules) and (node.modname not in self.config.extra_imports)): self.add_message('forbidden-import', node=node, args=(node.modname, node.lineno))
@check_messages('forbidden-import') def visit_importfrom(self, node): if ((node.modname not in self.config.allowed_import_modules) and (node.modname not in self.config.extra_imports)): self.add_message('forbidden-import', node=node, args=(node.modname, node.lineno))<|docstring|>visit an ImportFrom node...
d1edce13055bc0ace5779f0b9bf128fc8f273228c5f59754bf0838c13bdb0706
def __init__(self, **kwargs): '\n Initializes a new LogAnalyticsWarning object with values from keyword arguments.\n The following keyword arguments are supported (corresponding to the getters/setters of this class):\n\n :param agent_id:\n The value to assign to the agent_id property...
Initializes a new LogAnalyticsWarning object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): :param agent_id: The value to assign to the agent_id property of this LogAnalyticsWarning. :type agent_id: str :param host_name: ...
src/oci/log_analytics/models/log_analytics_warning.py
__init__
ezequielramos/oci-python-sdk
249
python
def __init__(self, **kwargs): '\n Initializes a new LogAnalyticsWarning object with values from keyword arguments.\n The following keyword arguments are supported (corresponding to the getters/setters of this class):\n\n :param agent_id:\n The value to assign to the agent_id property...
def __init__(self, **kwargs): '\n Initializes a new LogAnalyticsWarning object with values from keyword arguments.\n The following keyword arguments are supported (corresponding to the getters/setters of this class):\n\n :param agent_id:\n The value to assign to the agent_id property...
7f56a2034f64e49bc580df92a1e34f41461cefb5f1def1ed28b9c3e4ad9222b0
@property def agent_id(self): '\n Gets the agent_id of this LogAnalyticsWarning.\n The unique identifier of the agent associated with the warning\n\n\n :return: The agent_id of this LogAnalyticsWarning.\n :rtype: str\n ' return self._agent_id
Gets the agent_id of this LogAnalyticsWarning. The unique identifier of the agent associated with the warning :return: The agent_id of this LogAnalyticsWarning. :rtype: str
src/oci/log_analytics/models/log_analytics_warning.py
agent_id
ezequielramos/oci-python-sdk
249
python
@property def agent_id(self): '\n Gets the agent_id of this LogAnalyticsWarning.\n The unique identifier of the agent associated with the warning\n\n\n :return: The agent_id of this LogAnalyticsWarning.\n :rtype: str\n ' return self._agent_id
@property def agent_id(self): '\n Gets the agent_id of this LogAnalyticsWarning.\n The unique identifier of the agent associated with the warning\n\n\n :return: The agent_id of this LogAnalyticsWarning.\n :rtype: str\n ' return self._agent_id<|docstring|>Gets the agent_id of t...
a07bcec9155941119f5aab22543f026e706db385dab35860df8b8fa7fb3c564c
@agent_id.setter def agent_id(self, agent_id): '\n Sets the agent_id of this LogAnalyticsWarning.\n The unique identifier of the agent associated with the warning\n\n\n :param agent_id: The agent_id of this LogAnalyticsWarning.\n :type: str\n ' self._agent_id = agent_id
Sets the agent_id of this LogAnalyticsWarning. The unique identifier of the agent associated with the warning :param agent_id: The agent_id of this LogAnalyticsWarning. :type: str
src/oci/log_analytics/models/log_analytics_warning.py
agent_id
ezequielramos/oci-python-sdk
249
python
@agent_id.setter def agent_id(self, agent_id): '\n Sets the agent_id of this LogAnalyticsWarning.\n The unique identifier of the agent associated with the warning\n\n\n :param agent_id: The agent_id of this LogAnalyticsWarning.\n :type: str\n ' self._agent_id = agent_id
@agent_id.setter def agent_id(self, agent_id): '\n Sets the agent_id of this LogAnalyticsWarning.\n The unique identifier of the agent associated with the warning\n\n\n :param agent_id: The agent_id of this LogAnalyticsWarning.\n :type: str\n ' self._agent_id = agent_id<|docst...
85ee059a8f2dea1574d28f8afe732f2cd08a5818ccfb40b3917029d35e8d6b7a
@property def host_name(self): '\n Gets the host_name of this LogAnalyticsWarning.\n The host containing the agent associated with the warning\n\n\n :return: The host_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._host_name
Gets the host_name of this LogAnalyticsWarning. The host containing the agent associated with the warning :return: The host_name of this LogAnalyticsWarning. :rtype: str
src/oci/log_analytics/models/log_analytics_warning.py
host_name
ezequielramos/oci-python-sdk
249
python
@property def host_name(self): '\n Gets the host_name of this LogAnalyticsWarning.\n The host containing the agent associated with the warning\n\n\n :return: The host_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._host_name
@property def host_name(self): '\n Gets the host_name of this LogAnalyticsWarning.\n The host containing the agent associated with the warning\n\n\n :return: The host_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._host_name<|docstring|>Gets the host_name of t...
fea73020c4b56fe12302fe70b9b6ccf22651105db0f1bc49e53477527eb5957b
@host_name.setter def host_name(self, host_name): '\n Sets the host_name of this LogAnalyticsWarning.\n The host containing the agent associated with the warning\n\n\n :param host_name: The host_name of this LogAnalyticsWarning.\n :type: str\n ' self._host_name = host_name
Sets the host_name of this LogAnalyticsWarning. The host containing the agent associated with the warning :param host_name: The host_name of this LogAnalyticsWarning. :type: str
src/oci/log_analytics/models/log_analytics_warning.py
host_name
ezequielramos/oci-python-sdk
249
python
@host_name.setter def host_name(self, host_name): '\n Sets the host_name of this LogAnalyticsWarning.\n The host containing the agent associated with the warning\n\n\n :param host_name: The host_name of this LogAnalyticsWarning.\n :type: str\n ' self._host_name = host_name
@host_name.setter def host_name(self, host_name): '\n Sets the host_name of this LogAnalyticsWarning.\n The host containing the agent associated with the warning\n\n\n :param host_name: The host_name of this LogAnalyticsWarning.\n :type: str\n ' self._host_name = host_name<|do...
1ce8a89bf49bab4f5aeb6ee0613a2e924f8655ad0185bd062eda4c9c9d3d6f4a
@property def rule_display_name(self): '\n Gets the rule_display_name of this LogAnalyticsWarning.\n The display name of the rule which triggered the warning\n\n\n :return: The rule_display_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._rule_display_name
Gets the rule_display_name of this LogAnalyticsWarning. The display name of the rule which triggered the warning :return: The rule_display_name of this LogAnalyticsWarning. :rtype: str
src/oci/log_analytics/models/log_analytics_warning.py
rule_display_name
ezequielramos/oci-python-sdk
249
python
@property def rule_display_name(self): '\n Gets the rule_display_name of this LogAnalyticsWarning.\n The display name of the rule which triggered the warning\n\n\n :return: The rule_display_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._rule_display_name
@property def rule_display_name(self): '\n Gets the rule_display_name of this LogAnalyticsWarning.\n The display name of the rule which triggered the warning\n\n\n :return: The rule_display_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._rule_display_name<|doc...
a3c24d2d30b73ed4525d128e35484b1bd477b324ef15647603825d7d2ac19eea
@rule_display_name.setter def rule_display_name(self, rule_display_name): '\n Sets the rule_display_name of this LogAnalyticsWarning.\n The display name of the rule which triggered the warning\n\n\n :param rule_display_name: The rule_display_name of this LogAnalyticsWarning.\n :type: str...
Sets the rule_display_name of this LogAnalyticsWarning. The display name of the rule which triggered the warning :param rule_display_name: The rule_display_name of this LogAnalyticsWarning. :type: str
src/oci/log_analytics/models/log_analytics_warning.py
rule_display_name
ezequielramos/oci-python-sdk
249
python
@rule_display_name.setter def rule_display_name(self, rule_display_name): '\n Sets the rule_display_name of this LogAnalyticsWarning.\n The display name of the rule which triggered the warning\n\n\n :param rule_display_name: The rule_display_name of this LogAnalyticsWarning.\n :type: str...
@rule_display_name.setter def rule_display_name(self, rule_display_name): '\n Sets the rule_display_name of this LogAnalyticsWarning.\n The display name of the rule which triggered the warning\n\n\n :param rule_display_name: The rule_display_name of this LogAnalyticsWarning.\n :type: str...
24f36e2d57735ad412b625f5fb445ff7b2e54567c15e3fa7e3ae567156733326
@property def source_name(self): '\n Gets the source_name of this LogAnalyticsWarning.\n The name of the source associated with the warning\n\n\n :return: The source_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._source_name
Gets the source_name of this LogAnalyticsWarning. The name of the source associated with the warning :return: The source_name of this LogAnalyticsWarning. :rtype: str
src/oci/log_analytics/models/log_analytics_warning.py
source_name
ezequielramos/oci-python-sdk
249
python
@property def source_name(self): '\n Gets the source_name of this LogAnalyticsWarning.\n The name of the source associated with the warning\n\n\n :return: The source_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._source_name
@property def source_name(self): '\n Gets the source_name of this LogAnalyticsWarning.\n The name of the source associated with the warning\n\n\n :return: The source_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._source_name<|docstring|>Gets the source_name o...
c9d57edd851d16810fe1e5775a397253886287bec6da601d12f188900ac28bdc
@source_name.setter def source_name(self, source_name): '\n Sets the source_name of this LogAnalyticsWarning.\n The name of the source associated with the warning\n\n\n :param source_name: The source_name of this LogAnalyticsWarning.\n :type: str\n ' self._source_name = source...
Sets the source_name of this LogAnalyticsWarning. The name of the source associated with the warning :param source_name: The source_name of this LogAnalyticsWarning. :type: str
src/oci/log_analytics/models/log_analytics_warning.py
source_name
ezequielramos/oci-python-sdk
249
python
@source_name.setter def source_name(self, source_name): '\n Sets the source_name of this LogAnalyticsWarning.\n The name of the source associated with the warning\n\n\n :param source_name: The source_name of this LogAnalyticsWarning.\n :type: str\n ' self._source_name = source...
@source_name.setter def source_name(self, source_name): '\n Sets the source_name of this LogAnalyticsWarning.\n The name of the source associated with the warning\n\n\n :param source_name: The source_name of this LogAnalyticsWarning.\n :type: str\n ' self._source_name = source...
6fcc49f2216f07f4bd2b2e52b321a13eb35f7235ffa95c195b980b9bbd0f849c
@property def compartment_id(self): '\n Gets the compartment_id of this LogAnalyticsWarning.\n The entity compartment ID.\n\n\n :return: The compartment_id of this LogAnalyticsWarning.\n :rtype: str\n ' return self._compartment_id
Gets the compartment_id of this LogAnalyticsWarning. The entity compartment ID. :return: The compartment_id of this LogAnalyticsWarning. :rtype: str
src/oci/log_analytics/models/log_analytics_warning.py
compartment_id
ezequielramos/oci-python-sdk
249
python
@property def compartment_id(self): '\n Gets the compartment_id of this LogAnalyticsWarning.\n The entity compartment ID.\n\n\n :return: The compartment_id of this LogAnalyticsWarning.\n :rtype: str\n ' return self._compartment_id
@property def compartment_id(self): '\n Gets the compartment_id of this LogAnalyticsWarning.\n The entity compartment ID.\n\n\n :return: The compartment_id of this LogAnalyticsWarning.\n :rtype: str\n ' return self._compartment_id<|docstring|>Gets the compartment_id of this Lo...
4d8ce0ec808d2ae1778ac1df3c787107c05d98bc11e2eb6abccddc3fe90d4d84
@compartment_id.setter def compartment_id(self, compartment_id): '\n Sets the compartment_id of this LogAnalyticsWarning.\n The entity compartment ID.\n\n\n :param compartment_id: The compartment_id of this LogAnalyticsWarning.\n :type: str\n ' self._compartment_id = compartme...
Sets the compartment_id of this LogAnalyticsWarning. The entity compartment ID. :param compartment_id: The compartment_id of this LogAnalyticsWarning. :type: str
src/oci/log_analytics/models/log_analytics_warning.py
compartment_id
ezequielramos/oci-python-sdk
249
python
@compartment_id.setter def compartment_id(self, compartment_id): '\n Sets the compartment_id of this LogAnalyticsWarning.\n The entity compartment ID.\n\n\n :param compartment_id: The compartment_id of this LogAnalyticsWarning.\n :type: str\n ' self._compartment_id = compartme...
@compartment_id.setter def compartment_id(self, compartment_id): '\n Sets the compartment_id of this LogAnalyticsWarning.\n The entity compartment ID.\n\n\n :param compartment_id: The compartment_id of this LogAnalyticsWarning.\n :type: str\n ' self._compartment_id = compartme...
7f9b18d293cc681ddc121c806732aa79b59edb1acaf7dbd29fe4fd5c05601b16
@property def source_display_name(self): '\n Gets the source_display_name of this LogAnalyticsWarning.\n The display name of the source associated with the warning\n\n\n :return: The source_display_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._source_display...
Gets the source_display_name of this LogAnalyticsWarning. The display name of the source associated with the warning :return: The source_display_name of this LogAnalyticsWarning. :rtype: str
src/oci/log_analytics/models/log_analytics_warning.py
source_display_name
ezequielramos/oci-python-sdk
249
python
@property def source_display_name(self): '\n Gets the source_display_name of this LogAnalyticsWarning.\n The display name of the source associated with the warning\n\n\n :return: The source_display_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._source_display...
@property def source_display_name(self): '\n Gets the source_display_name of this LogAnalyticsWarning.\n The display name of the source associated with the warning\n\n\n :return: The source_display_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._source_display...
0e3c2b176e26f7f3a699e0dac44d97a5ce2a01e9df115686e15f89feb616b085
@source_display_name.setter def source_display_name(self, source_display_name): '\n Sets the source_display_name of this LogAnalyticsWarning.\n The display name of the source associated with the warning\n\n\n :param source_display_name: The source_display_name of this LogAnalyticsWarning.\n ...
Sets the source_display_name of this LogAnalyticsWarning. The display name of the source associated with the warning :param source_display_name: The source_display_name of this LogAnalyticsWarning. :type: str
src/oci/log_analytics/models/log_analytics_warning.py
source_display_name
ezequielramos/oci-python-sdk
249
python
@source_display_name.setter def source_display_name(self, source_display_name): '\n Sets the source_display_name of this LogAnalyticsWarning.\n The display name of the source associated with the warning\n\n\n :param source_display_name: The source_display_name of this LogAnalyticsWarning.\n ...
@source_display_name.setter def source_display_name(self, source_display_name): '\n Sets the source_display_name of this LogAnalyticsWarning.\n The display name of the source associated with the warning\n\n\n :param source_display_name: The source_display_name of this LogAnalyticsWarning.\n ...
36ddbf553299aa1ee42704cef1e8ec8a6e7986499b67b6866c1b8c768daa27dc
@property def entity_name(self): '\n Gets the entity_name of this LogAnalyticsWarning.\n The name of the entity associated with the warning\n\n\n :return: The entity_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._entity_name
Gets the entity_name of this LogAnalyticsWarning. The name of the entity associated with the warning :return: The entity_name of this LogAnalyticsWarning. :rtype: str
src/oci/log_analytics/models/log_analytics_warning.py
entity_name
ezequielramos/oci-python-sdk
249
python
@property def entity_name(self): '\n Gets the entity_name of this LogAnalyticsWarning.\n The name of the entity associated with the warning\n\n\n :return: The entity_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._entity_name
@property def entity_name(self): '\n Gets the entity_name of this LogAnalyticsWarning.\n The name of the entity associated with the warning\n\n\n :return: The entity_name of this LogAnalyticsWarning.\n :rtype: str\n ' return self._entity_name<|docstring|>Gets the entity_name o...
ddec4acf198e1e367563a1289d148760e17e52a2336519b5a4834d1a094b7dbb
@entity_name.setter def entity_name(self, entity_name): '\n Sets the entity_name of this LogAnalyticsWarning.\n The name of the entity associated with the warning\n\n\n :param entity_name: The entity_name of this LogAnalyticsWarning.\n :type: str\n ' self._entity_name = entity...
Sets the entity_name of this LogAnalyticsWarning. The name of the entity associated with the warning :param entity_name: The entity_name of this LogAnalyticsWarning. :type: str
src/oci/log_analytics/models/log_analytics_warning.py
entity_name
ezequielramos/oci-python-sdk
249
python
@entity_name.setter def entity_name(self, entity_name): '\n Sets the entity_name of this LogAnalyticsWarning.\n The name of the entity associated with the warning\n\n\n :param entity_name: The entity_name of this LogAnalyticsWarning.\n :type: str\n ' self._entity_name = entity...
@entity_name.setter def entity_name(self, entity_name): '\n Sets the entity_name of this LogAnalyticsWarning.\n The name of the entity associated with the warning\n\n\n :param entity_name: The entity_name of this LogAnalyticsWarning.\n :type: str\n ' self._entity_name = entity...
b5cf321249c7a8ad1a50d75208abe96a082bd8867102fe4663f9d4749be50a8f
@property def time_collected(self): '\n Gets the time_collected of this LogAnalyticsWarning.\n The time at which the warning was most recently collected\n\n\n :return: The time_collected of this LogAnalyticsWarning.\n :rtype: datetime\n ' return self._time_collected
Gets the time_collected of this LogAnalyticsWarning. The time at which the warning was most recently collected :return: The time_collected of this LogAnalyticsWarning. :rtype: datetime
src/oci/log_analytics/models/log_analytics_warning.py
time_collected
ezequielramos/oci-python-sdk
249
python
@property def time_collected(self): '\n Gets the time_collected of this LogAnalyticsWarning.\n The time at which the warning was most recently collected\n\n\n :return: The time_collected of this LogAnalyticsWarning.\n :rtype: datetime\n ' return self._time_collected
@property def time_collected(self): '\n Gets the time_collected of this LogAnalyticsWarning.\n The time at which the warning was most recently collected\n\n\n :return: The time_collected of this LogAnalyticsWarning.\n :rtype: datetime\n ' return self._time_collected<|docstring...
64aab265aa2f44563a2a05dd94840144a096352ee04046910ac67950ab9036e5
@time_collected.setter def time_collected(self, time_collected): '\n Sets the time_collected of this LogAnalyticsWarning.\n The time at which the warning was most recently collected\n\n\n :param time_collected: The time_collected of this LogAnalyticsWarning.\n :type: datetime\n ' ...
Sets the time_collected of this LogAnalyticsWarning. The time at which the warning was most recently collected :param time_collected: The time_collected of this LogAnalyticsWarning. :type: datetime
src/oci/log_analytics/models/log_analytics_warning.py
time_collected
ezequielramos/oci-python-sdk
249
python
@time_collected.setter def time_collected(self, time_collected): '\n Sets the time_collected of this LogAnalyticsWarning.\n The time at which the warning was most recently collected\n\n\n :param time_collected: The time_collected of this LogAnalyticsWarning.\n :type: datetime\n ' ...
@time_collected.setter def time_collected(self, time_collected): '\n Sets the time_collected of this LogAnalyticsWarning.\n The time at which the warning was most recently collected\n\n\n :param time_collected: The time_collected of this LogAnalyticsWarning.\n :type: datetime\n ' ...
62af919a3c6f26c332fab27dadb896987e98aaf4f7753a31eb69a9c7e5fdeb92
@property def warning_id(self): '\n Gets the warning_id of this LogAnalyticsWarning.\n The unique identifier of the warning\n\n\n :return: The warning_id of this LogAnalyticsWarning.\n :rtype: str\n ' return self._warning_id
Gets the warning_id of this LogAnalyticsWarning. The unique identifier of the warning :return: The warning_id of this LogAnalyticsWarning. :rtype: str
src/oci/log_analytics/models/log_analytics_warning.py
warning_id
ezequielramos/oci-python-sdk
249
python
@property def warning_id(self): '\n Gets the warning_id of this LogAnalyticsWarning.\n The unique identifier of the warning\n\n\n :return: The warning_id of this LogAnalyticsWarning.\n :rtype: str\n ' return self._warning_id
@property def warning_id(self): '\n Gets the warning_id of this LogAnalyticsWarning.\n The unique identifier of the warning\n\n\n :return: The warning_id of this LogAnalyticsWarning.\n :rtype: str\n ' return self._warning_id<|docstring|>Gets the warning_id of this LogAnalytics...
cd50470fe7b710265fe72721d99d23207c441fc257a3c51a92f146fb050272eb
@warning_id.setter def warning_id(self, warning_id): '\n Sets the warning_id of this LogAnalyticsWarning.\n The unique identifier of the warning\n\n\n :param warning_id: The warning_id of this LogAnalyticsWarning.\n :type: str\n ' self._warning_id = warning_id
Sets the warning_id of this LogAnalyticsWarning. The unique identifier of the warning :param warning_id: The warning_id of this LogAnalyticsWarning. :type: str
src/oci/log_analytics/models/log_analytics_warning.py
warning_id
ezequielramos/oci-python-sdk
249
python
@warning_id.setter def warning_id(self, warning_id): '\n Sets the warning_id of this LogAnalyticsWarning.\n The unique identifier of the warning\n\n\n :param warning_id: The warning_id of this LogAnalyticsWarning.\n :type: str\n ' self._warning_id = warning_id
@warning_id.setter def warning_id(self, warning_id): '\n Sets the warning_id of this LogAnalyticsWarning.\n The unique identifier of the warning\n\n\n :param warning_id: The warning_id of this LogAnalyticsWarning.\n :type: str\n ' self._warning_id = warning_id<|docstring|>Sets...
17a3e61d86323ae3176e914b1748a38aa4072dcf06adbdbc0429187e02ae4735
@property def time_of_initial_warning(self): '\n Gets the time_of_initial_warning of this LogAnalyticsWarning.\n The date at which the warning was initially triggered\n\n\n :return: The time_of_initial_warning of this LogAnalyticsWarning.\n :rtype: datetime\n ' return self._ti...
Gets the time_of_initial_warning of this LogAnalyticsWarning. The date at which the warning was initially triggered :return: The time_of_initial_warning of this LogAnalyticsWarning. :rtype: datetime
src/oci/log_analytics/models/log_analytics_warning.py
time_of_initial_warning
ezequielramos/oci-python-sdk
249
python
@property def time_of_initial_warning(self): '\n Gets the time_of_initial_warning of this LogAnalyticsWarning.\n The date at which the warning was initially triggered\n\n\n :return: The time_of_initial_warning of this LogAnalyticsWarning.\n :rtype: datetime\n ' return self._ti...
@property def time_of_initial_warning(self): '\n Gets the time_of_initial_warning of this LogAnalyticsWarning.\n The date at which the warning was initially triggered\n\n\n :return: The time_of_initial_warning of this LogAnalyticsWarning.\n :rtype: datetime\n ' return self._ti...
3a7e905730e699e6b3dd116ec7c40bfb6f87289b83ea1ce097cd54833124e83b
@time_of_initial_warning.setter def time_of_initial_warning(self, time_of_initial_warning): '\n Sets the time_of_initial_warning of this LogAnalyticsWarning.\n The date at which the warning was initially triggered\n\n\n :param time_of_initial_warning: The time_of_initial_warning of this LogAnal...
Sets the time_of_initial_warning of this LogAnalyticsWarning. The date at which the warning was initially triggered :param time_of_initial_warning: The time_of_initial_warning of this LogAnalyticsWarning. :type: datetime
src/oci/log_analytics/models/log_analytics_warning.py
time_of_initial_warning
ezequielramos/oci-python-sdk
249
python
@time_of_initial_warning.setter def time_of_initial_warning(self, time_of_initial_warning): '\n Sets the time_of_initial_warning of this LogAnalyticsWarning.\n The date at which the warning was initially triggered\n\n\n :param time_of_initial_warning: The time_of_initial_warning of this LogAnal...
@time_of_initial_warning.setter def time_of_initial_warning(self, time_of_initial_warning): '\n Sets the time_of_initial_warning of this LogAnalyticsWarning.\n The date at which the warning was initially triggered\n\n\n :param time_of_initial_warning: The time_of_initial_warning of this LogAnal...
60debcd17f33225e0968966802e80de0ecba95d28cfc25abbf0f9293e1e7c616
@property def is_active(self): '\n Gets the is_active of this LogAnalyticsWarning.\n A flag indicating if the warning is currently active\n\n\n :return: The is_active of this LogAnalyticsWarning.\n :rtype: bool\n ' return self._is_active
Gets the is_active of this LogAnalyticsWarning. A flag indicating if the warning is currently active :return: The is_active of this LogAnalyticsWarning. :rtype: bool
src/oci/log_analytics/models/log_analytics_warning.py
is_active
ezequielramos/oci-python-sdk
249
python
@property def is_active(self): '\n Gets the is_active of this LogAnalyticsWarning.\n A flag indicating if the warning is currently active\n\n\n :return: The is_active of this LogAnalyticsWarning.\n :rtype: bool\n ' return self._is_active
@property def is_active(self): '\n Gets the is_active of this LogAnalyticsWarning.\n A flag indicating if the warning is currently active\n\n\n :return: The is_active of this LogAnalyticsWarning.\n :rtype: bool\n ' return self._is_active<|docstring|>Gets the is_active of this ...
20b389b17279999fd2a53b8f59af6c7113017ef4c1ed538c0ba6c858ce7636b1
@is_active.setter def is_active(self, is_active): '\n Sets the is_active of this LogAnalyticsWarning.\n A flag indicating if the warning is currently active\n\n\n :param is_active: The is_active of this LogAnalyticsWarning.\n :type: bool\n ' self._is_active = is_active
Sets the is_active of this LogAnalyticsWarning. A flag indicating if the warning is currently active :param is_active: The is_active of this LogAnalyticsWarning. :type: bool
src/oci/log_analytics/models/log_analytics_warning.py
is_active
ezequielramos/oci-python-sdk
249
python
@is_active.setter def is_active(self, is_active): '\n Sets the is_active of this LogAnalyticsWarning.\n A flag indicating if the warning is currently active\n\n\n :param is_active: The is_active of this LogAnalyticsWarning.\n :type: bool\n ' self._is_active = is_active
@is_active.setter def is_active(self, is_active): '\n Sets the is_active of this LogAnalyticsWarning.\n A flag indicating if the warning is currently active\n\n\n :param is_active: The is_active of this LogAnalyticsWarning.\n :type: bool\n ' self._is_active = is_active<|docstr...