body stringlengths 26 98.2k | body_hash int64 -9,222,864,604,528,158,000 9,221,803,474B | docstring stringlengths 1 16.8k | path stringlengths 5 230 | name stringlengths 1 96 | repository_name stringlengths 7 89 | lang stringclasses 1
value | body_without_docstring stringlengths 20 98.2k |
|---|---|---|---|---|---|---|---|
def AcidocellaSpMxAz02(directed: bool=False, preprocess: bool=True, load_nodes: bool=True, verbose: int=2, cache: bool=True, cache_path: str='graphs/string', version: str='links.v11.5', **additional_graph_kwargs: Dict) -> Graph:
'Return new instance of the Acidocella sp. MX-AZ02 graph.\n\n The graph is automatic... | -4,163,455,853,893,054,500 | Return new instance of the Acidocella sp. MX-AZ02 graph.
The graph is automatically retrieved from the STRING repository.
Parameters
-------------------
directed: bool = False
Wether to load the graph as directed or undirected.
By default false.
preprocess: bool = True
Whether to preprocess the graph ... | bindings/python/ensmallen/datasets/string/acidocellaspmxaz02.py | AcidocellaSpMxAz02 | AnacletoLAB/ensmallen | python | def AcidocellaSpMxAz02(directed: bool=False, preprocess: bool=True, load_nodes: bool=True, verbose: int=2, cache: bool=True, cache_path: str='graphs/string', version: str='links.v11.5', **additional_graph_kwargs: Dict) -> Graph:
'Return new instance of the Acidocella sp. MX-AZ02 graph.\n\n The graph is automatic... |
def create_ipython_console(app, title, view_width, view_ht):
' create a iPython console with a rayoptics environment '
opt_model = app.app_manager.model
if opt_model:
ro_env = {'app': app, 'opm': opt_model, 'sm': opt_model.seq_model, 'osp': opt_model.optical_spec, 'pm': opt_model.parax_model}
el... | 4,749,318,609,762,118,000 | create a iPython console with a rayoptics environment | src/rayoptics/qtgui/ipyconsole.py | create_ipython_console | NelisW/ray-optics | python | def create_ipython_console(app, title, view_width, view_ht):
' '
opt_model = app.app_manager.model
if opt_model:
ro_env = {'app': app, 'opm': opt_model, 'sm': opt_model.seq_model, 'osp': opt_model.optical_spec, 'pm': opt_model.parax_model}
else:
ro_env = {'app': app, 'opm': opt_model}
... |
def push_vars(self, variableDict):
'\n Given a dictionary containing name / value pairs, push those variables\n to the Jupyter console widget\n '
self.kernel_manager.kernel.shell.push(variableDict) | -6,908,998,854,733,955,000 | Given a dictionary containing name / value pairs, push those variables
to the Jupyter console widget | src/rayoptics/qtgui/ipyconsole.py | push_vars | NelisW/ray-optics | python | def push_vars(self, variableDict):
'\n Given a dictionary containing name / value pairs, push those variables\n to the Jupyter console widget\n '
self.kernel_manager.kernel.shell.push(variableDict) |
def clear(self):
'\n Clears the terminal\n '
self._control.clear() | 8,491,764,359,652,678,000 | Clears the terminal | src/rayoptics/qtgui/ipyconsole.py | clear | NelisW/ray-optics | python | def clear(self):
'\n \n '
self._control.clear() |
def print_text(self, text):
'\n Prints some plain text to the console\n '
self._append_plain_text(text) | 3,013,955,330,680,670,700 | Prints some plain text to the console | src/rayoptics/qtgui/ipyconsole.py | print_text | NelisW/ray-optics | python | def print_text(self, text):
'\n \n '
self._append_plain_text(text) |
def execute_command(self, command):
'\n Execute a command in the frame of the console widget\n '
self._execute(command, False) | 2,414,786,539,950,187,500 | Execute a command in the frame of the console widget | src/rayoptics/qtgui/ipyconsole.py | execute_command | NelisW/ray-optics | python | def execute_command(self, command):
'\n \n '
self._execute(command, False) |
def __init__(self, volumes, energies, eos='vinet'):
"Init method.\n\n volumes : array_like\n Unit cell volumes where energies are obtained.\n shape=(volumes, ), dtype='double'.\n energies : array_like\n Energies obtained at volumes.\n shape=(volumes, ), dtyp... | -6,041,298,175,504,865,000 | Init method.
volumes : array_like
Unit cell volumes where energies are obtained.
shape=(volumes, ), dtype='double'.
energies : array_like
Energies obtained at volumes.
shape=(volumes, ), dtype='double'.
eos : str
Identifier of equation of states function. | phonopy/qha/core.py | __init__ | SeyedMohamadMoosavi/phonopy | python | def __init__(self, volumes, energies, eos='vinet'):
"Init method.\n\n volumes : array_like\n Unit cell volumes where energies are obtained.\n shape=(volumes, ), dtype='double'.\n energies : array_like\n Energies obtained at volumes.\n shape=(volumes, ), dtyp... |
@property
def bulk_modulus(self):
'Return bulk modulus.'
return self._bulk_modulus | -2,595,303,705,271,994,000 | Return bulk modulus. | phonopy/qha/core.py | bulk_modulus | SeyedMohamadMoosavi/phonopy | python | @property
def bulk_modulus(self):
return self._bulk_modulus |
def get_bulk_modulus(self):
'Return bulk modulus.'
warnings.warn('BulkModulus.get_bulk_modulus() is deprecated.Use BulkModulus.bulk_modulus attribute.', DeprecationWarning)
return self.bulk_modulus | 6,207,878,060,856,568,000 | Return bulk modulus. | phonopy/qha/core.py | get_bulk_modulus | SeyedMohamadMoosavi/phonopy | python | def get_bulk_modulus(self):
warnings.warn('BulkModulus.get_bulk_modulus() is deprecated.Use BulkModulus.bulk_modulus attribute.', DeprecationWarning)
return self.bulk_modulus |
@property
def equilibrium_volume(self):
'Return volume at equilibrium.'
return self._volume | 4,626,538,268,838,389,000 | Return volume at equilibrium. | phonopy/qha/core.py | equilibrium_volume | SeyedMohamadMoosavi/phonopy | python | @property
def equilibrium_volume(self):
return self._volume |
def get_equilibrium_volume(self):
'Return volume at equilibrium.'
warnings.warn('BulkModulus.get_equilibrium_volume() is deprecated.Use BulkModulus.equilibrium_volume attribute.', DeprecationWarning)
return self.equilibrium_volume | -4,453,012,193,212,020,000 | Return volume at equilibrium. | phonopy/qha/core.py | get_equilibrium_volume | SeyedMohamadMoosavi/phonopy | python | def get_equilibrium_volume(self):
warnings.warn('BulkModulus.get_equilibrium_volume() is deprecated.Use BulkModulus.equilibrium_volume attribute.', DeprecationWarning)
return self.equilibrium_volume |
@property
def b_prime(self):
"Return fitted parameter B'."
return self._b_prime | -6,632,820,823,371,828,000 | Return fitted parameter B'. | phonopy/qha/core.py | b_prime | SeyedMohamadMoosavi/phonopy | python | @property
def b_prime(self):
return self._b_prime |
def get_b_prime(self):
"Return fitted parameter B'."
warnings.warn('BulkModulus.get_b_prime() is deprecated.Use BulkModulus.b_prime attribute.', DeprecationWarning)
return self._b_prime | -8,431,160,056,754,322,000 | Return fitted parameter B'. | phonopy/qha/core.py | get_b_prime | SeyedMohamadMoosavi/phonopy | python | def get_b_prime(self):
warnings.warn('BulkModulus.get_b_prime() is deprecated.Use BulkModulus.b_prime attribute.', DeprecationWarning)
return self._b_prime |
@property
def energy(self):
'Return fitted parameter of energy.'
return self._energy | -1,284,467,124,829,295,900 | Return fitted parameter of energy. | phonopy/qha/core.py | energy | SeyedMohamadMoosavi/phonopy | python | @property
def energy(self):
return self._energy |
def get_energy(self):
'Return fitted parameter of energy.'
warnings.warn('BulkModulus.get_energy() is deprecated.Use BulkModulus.energy attribute.', DeprecationWarning)
return self._energy | -778,690,476,186,869,600 | Return fitted parameter of energy. | phonopy/qha/core.py | get_energy | SeyedMohamadMoosavi/phonopy | python | def get_energy(self):
warnings.warn('BulkModulus.get_energy() is deprecated.Use BulkModulus.energy attribute.', DeprecationWarning)
return self._energy |
def get_parameters(self):
'Return fitted parameters.'
return (self._energy, self._bulk_modulus, self._b_prime, self._volume) | -1,417,737,956,995,839,500 | Return fitted parameters. | phonopy/qha/core.py | get_parameters | SeyedMohamadMoosavi/phonopy | python | def get_parameters(self):
return (self._energy, self._bulk_modulus, self._b_prime, self._volume) |
def get_eos(self):
'Return EOS function as a python method.'
warnings.warn('BulkModulus.get_eos() is deprecated.', DeprecationWarning)
return self._eos | -5,511,940,530,130,078,000 | Return EOS function as a python method. | phonopy/qha/core.py | get_eos | SeyedMohamadMoosavi/phonopy | python | def get_eos(self):
warnings.warn('BulkModulus.get_eos() is deprecated.', DeprecationWarning)
return self._eos |
def plot(self):
'Plot fitted EOS curve.'
import matplotlib.pyplot as plt
ep = self.get_parameters()
vols = self._volumes
volume_points = np.linspace(min(vols), max(vols), 201)
(fig, ax) = plt.subplots()
ax.plot(volume_points, self._eos(volume_points, *ep), 'r-')
ax.plot(vols, self._energ... | 450,993,508,511,894,140 | Plot fitted EOS curve. | phonopy/qha/core.py | plot | SeyedMohamadMoosavi/phonopy | python | def plot(self):
import matplotlib.pyplot as plt
ep = self.get_parameters()
vols = self._volumes
volume_points = np.linspace(min(vols), max(vols), 201)
(fig, ax) = plt.subplots()
ax.plot(volume_points, self._eos(volume_points, *ep), 'r-')
ax.plot(vols, self._energies, 'bo', markersize=4)... |
def __init__(self, volumes, electronic_energies, temperatures, cv, entropy, fe_phonon, eos='vinet', t_max=None, energy_plot_factor=None):
"Init method.\n\n Parameters\n ----------\n volumes: array_like\n Unit cell volumes (V) in angstrom^3.\n dtype='double'\n sh... | 5,790,105,411,908,088,000 | Init method.
Parameters
----------
volumes: array_like
Unit cell volumes (V) in angstrom^3.
dtype='double'
shape=(volumes,)
electronic_energies: array_like
Electronic energies (U_el) or electronic free energies (F_el) in eV.
It is assumed as formar if ndim==1 and latter if ndim==2.
dtype='doubl... | phonopy/qha/core.py | __init__ | SeyedMohamadMoosavi/phonopy | python | def __init__(self, volumes, electronic_energies, temperatures, cv, entropy, fe_phonon, eos='vinet', t_max=None, energy_plot_factor=None):
"Init method.\n\n Parameters\n ----------\n volumes: array_like\n Unit cell volumes (V) in angstrom^3.\n dtype='double'\n sh... |
@property
def thermal_expansion(self):
'Return volumetric thermal expansion coefficients at temperatures.'
return self._thermal_expansions[:self._len] | 6,564,147,274,133,580,000 | Return volumetric thermal expansion coefficients at temperatures. | phonopy/qha/core.py | thermal_expansion | SeyedMohamadMoosavi/phonopy | python | @property
def thermal_expansion(self):
return self._thermal_expansions[:self._len] |
@property
def helmholtz_volume(self):
'Return Helmholtz free energies at temperatures and volumes.'
return self._free_energies[:self._len] | 5,229,335,254,799,800,000 | Return Helmholtz free energies at temperatures and volumes. | phonopy/qha/core.py | helmholtz_volume | SeyedMohamadMoosavi/phonopy | python | @property
def helmholtz_volume(self):
return self._free_energies[:self._len] |
@property
def volume_temperature(self):
'Return equilibrium volumes at temperatures.'
return self._equiv_volumes[:self._len] | 5,589,368,534,607,171,000 | Return equilibrium volumes at temperatures. | phonopy/qha/core.py | volume_temperature | SeyedMohamadMoosavi/phonopy | python | @property
def volume_temperature(self):
return self._equiv_volumes[:self._len] |
@property
def gibbs_temperature(self):
'Return Gibbs free energies at temperatures.'
return self._equiv_energies[:self._len] | 3,348,669,770,639,401,000 | Return Gibbs free energies at temperatures. | phonopy/qha/core.py | gibbs_temperature | SeyedMohamadMoosavi/phonopy | python | @property
def gibbs_temperature(self):
return self._equiv_energies[:self._len] |
@property
def bulk_modulus_temperature(self):
'Return bulk modulus vs temperature data.'
return self._equiv_bulk_modulus[:self._len] | 284,408,110,806,463,400 | Return bulk modulus vs temperature data. | phonopy/qha/core.py | bulk_modulus_temperature | SeyedMohamadMoosavi/phonopy | python | @property
def bulk_modulus_temperature(self):
return self._equiv_bulk_modulus[:self._len] |
@property
def heat_capacity_P_numerical(self):
'Return heat capacities at constant pressure at temperatures.\n\n Values are computed by numerical derivative of Gibbs free energy.\n\n '
return self._cp_numerical[:self._len] | 5,557,818,067,728,385,000 | Return heat capacities at constant pressure at temperatures.
Values are computed by numerical derivative of Gibbs free energy. | phonopy/qha/core.py | heat_capacity_P_numerical | SeyedMohamadMoosavi/phonopy | python | @property
def heat_capacity_P_numerical(self):
'Return heat capacities at constant pressure at temperatures.\n\n Values are computed by numerical derivative of Gibbs free energy.\n\n '
return self._cp_numerical[:self._len] |
@property
def heat_capacity_P_polyfit(self):
'Return heat capacities at constant pressure at temperatures.\n\n Volumes are computed in another way to heat_capacity_P_numerical\n for the better numerical behaviour. But this does not work\n when temperature dependent electronic_energies is suppli... | -8,213,427,396,810,456,000 | Return heat capacities at constant pressure at temperatures.
Volumes are computed in another way to heat_capacity_P_numerical
for the better numerical behaviour. But this does not work
when temperature dependent electronic_energies is supplied. | phonopy/qha/core.py | heat_capacity_P_polyfit | SeyedMohamadMoosavi/phonopy | python | @property
def heat_capacity_P_polyfit(self):
'Return heat capacities at constant pressure at temperatures.\n\n Volumes are computed in another way to heat_capacity_P_numerical\n for the better numerical behaviour. But this does not work\n when temperature dependent electronic_energies is suppli... |
@property
def gruneisen_temperature(self):
'Return Gruneisen parameters at temperatures.'
return self._gruneisen_parameters[:self._len] | -6,513,037,188,215,679,000 | Return Gruneisen parameters at temperatures. | phonopy/qha/core.py | gruneisen_temperature | SeyedMohamadMoosavi/phonopy | python | @property
def gruneisen_temperature(self):
return self._gruneisen_parameters[:self._len] |
def run(self, verbose=False):
"Fit parameters to EOS at temperatures.\n\n Even if fitting failed, simply omit the volume point. In this case,\n the failed temperature point doesn't exist in the returned arrays.\n\n "
if verbose:
print((('#%11s' + ('%14s' * 4)) % ('T', 'E_0', 'B_0', ... | -7,183,663,002,175,828,000 | Fit parameters to EOS at temperatures.
Even if fitting failed, simply omit the volume point. In this case,
the failed temperature point doesn't exist in the returned arrays. | phonopy/qha/core.py | run | SeyedMohamadMoosavi/phonopy | python | def run(self, verbose=False):
"Fit parameters to EOS at temperatures.\n\n Even if fitting failed, simply omit the volume point. In this case,\n the failed temperature point doesn't exist in the returned arrays.\n\n "
if verbose:
print((('#%11s' + ('%14s' * 4)) % ('T', 'E_0', 'B_0', ... |
def get_field_type(field, include_role=True):
'\n Get the type of a field including the correct intersphinx mappings.\n\n :param field: The field\n :type field: ~django.db.models.Field\n\n :param include_directive: Whether or not the role :any:`py:class` should be included\n :type include_directive: ... | 7,352,132,743,437,656,000 | Get the type of a field including the correct intersphinx mappings.
:param field: The field
:type field: ~django.db.models.Field
:param include_directive: Whether or not the role :any:`py:class` should be included
:type include_directive: bool
:return: The type of the field
:rtype: str | sphinxcontrib_django2/docstrings/field_utils.py | get_field_type | mkalioby/sphinxcontrib-django2 | python | def get_field_type(field, include_role=True):
'\n Get the type of a field including the correct intersphinx mappings.\n\n :param field: The field\n :type field: ~django.db.models.Field\n\n :param include_directive: Whether or not the role :any:`py:class` should be included\n :type include_directive: ... |
def get_field_verbose_name(field):
'\n Get the verbose name of the field.\n If the field has a ``help_text``, it is also included.\n\n In case the field is a related field, the ``related_name`` is used to link to the remote model.\n For reverse related fields, the originating field is linked.\n\n :pa... | 8,593,726,823,584,610,000 | Get the verbose name of the field.
If the field has a ``help_text``, it is also included.
In case the field is a related field, the ``related_name`` is used to link to the remote model.
For reverse related fields, the originating field is linked.
:param field: The field
:type field: ~django.db.models.Field | sphinxcontrib_django2/docstrings/field_utils.py | get_field_verbose_name | mkalioby/sphinxcontrib-django2 | python | def get_field_verbose_name(field):
'\n Get the verbose name of the field.\n If the field has a ``help_text``, it is also included.\n\n In case the field is a related field, the ``related_name`` is used to link to the remote model.\n For reverse related fields, the originating field is linked.\n\n :pa... |
def fact(name=None):
'Output a fact about factorials.\n\n Args:\n name: A name for the operation (optional).\n\n Returns:\n A `Tensor` of type `string`.\n '
_ctx = _context._context
if ((_ctx is None) or (not _ctx._eager_context.is_eager)):
(_, _, _op) = _op_def_lib._apply_op_helper('Fact',... | -2,174,702,402,554,505,700 | Output a fact about factorials.
Args:
name: A name for the operation (optional).
Returns:
A `Tensor` of type `string`. | venv/Lib/site-packages/tensorflow/python/ops/gen_user_ops.py | fact | caiovini/Image_reader_api | python | def fact(name=None):
'Output a fact about factorials.\n\n Args:\n name: A name for the operation (optional).\n\n Returns:\n A `Tensor` of type `string`.\n '
_ctx = _context._context
if ((_ctx is None) or (not _ctx._eager_context.is_eager)):
(_, _, _op) = _op_def_lib._apply_op_helper('Fact',... |
def fact_eager_fallback(name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function fact\n '
_ctx = (ctx if ctx else _context.context())
_inputs_flat = []
_attrs = None
_result = _execute.execute(b'Fact', 1, inputs=_inputs_flat, attrs=_attrs, ctx=_ctx, name=name)
... | 8,948,339,619,584,408,000 | This is the slowpath function for Eager mode.
This is for function fact | venv/Lib/site-packages/tensorflow/python/ops/gen_user_ops.py | fact_eager_fallback | caiovini/Image_reader_api | python | def fact_eager_fallback(name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function fact\n '
_ctx = (ctx if ctx else _context.context())
_inputs_flat = []
_attrs = None
_result = _execute.execute(b'Fact', 1, inputs=_inputs_flat, attrs=_attrs, ctx=_ctx, name=name)
... |
def introduction():
'Prints out introductory statements at start of run.'
print('Lennard-Jones potential')
print('Cut-and-shifted version for dynamics')
print('Cut (but not shifted) version also calculated')
print('Diameter, sigma = 1')
print('Well depth, epsilon = 1')
if fast:
print... | -3,767,502,228,122,722,300 | Prints out introductory statements at start of run. | python_examples/md_lj_module.py | introduction | Allen-Tildesley/examples | python | def introduction():
print('Lennard-Jones potential')
print('Cut-and-shifted version for dynamics')
print('Cut (but not shifted) version also calculated')
print('Diameter, sigma = 1')
print('Well depth, epsilon = 1')
if fast:
print('Fast NumPy force routine')
else:
print(... |
def conclusion():
'Prints out concluding statements at end of run.'
print('Program ends') | 7,885,841,679,723,434,000 | Prints out concluding statements at end of run. | python_examples/md_lj_module.py | conclusion | Allen-Tildesley/examples | python | def conclusion():
print('Program ends') |
def force(box, r_cut, r):
'Takes in box, cutoff range, and coordinate array, and calculates forces and potentials etc.'
import numpy as np
(n, d) = r.shape
assert (d == 3), 'Dimension error in force'
sr2_ovr = 1.77
r_cut_box = (r_cut / box)
r_cut_box_sq = (r_cut_box ** 2)
box_sq = (box *... | -3,670,322,586,466,179,000 | Takes in box, cutoff range, and coordinate array, and calculates forces and potentials etc. | python_examples/md_lj_module.py | force | Allen-Tildesley/examples | python | def force(box, r_cut, r):
import numpy as np
(n, d) = r.shape
assert (d == 3), 'Dimension error in force'
sr2_ovr = 1.77
r_cut_box = (r_cut / box)
r_cut_box_sq = (r_cut_box ** 2)
box_sq = (box ** 2)
sr2 = (1.0 / (r_cut ** 2))
sr6 = (sr2 ** 3)
sr12 = (sr6 ** 2)
pot_cut = ... |
def hessian(box, r_cut, r, f):
'Calculates Hessian function (for 1/N correction to config temp).'
import numpy as np
(n, d) = r.shape
assert (d == 3), 'Dimension error in hessian'
assert np.all((r.shape == f.shape)), 'Dimension mismatch in hessian'
r_cut_box = (r_cut / box)
r_cut_box_sq = (r... | 2,891,517,025,663,908,000 | Calculates Hessian function (for 1/N correction to config temp). | python_examples/md_lj_module.py | hessian | Allen-Tildesley/examples | python | def hessian(box, r_cut, r, f):
import numpy as np
(n, d) = r.shape
assert (d == 3), 'Dimension error in hessian'
assert np.all((r.shape == f.shape)), 'Dimension mismatch in hessian'
r_cut_box = (r_cut / box)
r_cut_box_sq = (r_cut_box ** 2)
box_sq = (box ** 2)
hes = 0.0
if fast:
... |
def test_scaler():
'Test methods of Scaler\n '
raw = io.read_raw_fif(raw_fname, preload=False)
events = read_events(event_name)
picks = pick_types(raw.info, meg=True, stim=False, ecg=False, eog=False, exclude='bads')
picks = picks[1:13:3]
epochs = Epochs(raw, events, event_id, tmin, tmax, pic... | 5,428,728,073,411,530,000 | Test methods of Scaler | mne/decoding/tests/test_transformer.py | test_scaler | ARudiuk/mne-python | python | def test_scaler():
'\n '
raw = io.read_raw_fif(raw_fname, preload=False)
events = read_events(event_name)
picks = pick_types(raw.info, meg=True, stim=False, ecg=False, eog=False, exclude='bads')
picks = picks[1:13:3]
epochs = Epochs(raw, events, event_id, tmin, tmax, picks=picks, baseline=(No... |
def test_filterestimator():
'Test methods of FilterEstimator\n '
raw = io.read_raw_fif(raw_fname, preload=False)
events = read_events(event_name)
picks = pick_types(raw.info, meg=True, stim=False, ecg=False, eog=False, exclude='bads')
picks = picks[1:13:3]
epochs = Epochs(raw, events, event_i... | -8,625,130,022,647,989,000 | Test methods of FilterEstimator | mne/decoding/tests/test_transformer.py | test_filterestimator | ARudiuk/mne-python | python | def test_filterestimator():
'\n '
raw = io.read_raw_fif(raw_fname, preload=False)
events = read_events(event_name)
picks = pick_types(raw.info, meg=True, stim=False, ecg=False, eog=False, exclude='bads')
picks = picks[1:13:3]
epochs = Epochs(raw, events, event_id, tmin, tmax, picks=picks, bas... |
def test_psdestimator():
'Test methods of PSDEstimator\n '
raw = io.read_raw_fif(raw_fname, preload=False)
events = read_events(event_name)
picks = pick_types(raw.info, meg=True, stim=False, ecg=False, eog=False, exclude='bads')
picks = picks[1:13:3]
epochs = Epochs(raw, events, event_id, tmi... | -5,691,515,387,998,737,000 | Test methods of PSDEstimator | mne/decoding/tests/test_transformer.py | test_psdestimator | ARudiuk/mne-python | python | def test_psdestimator():
'\n '
raw = io.read_raw_fif(raw_fname, preload=False)
events = read_events(event_name)
picks = pick_types(raw.info, meg=True, stim=False, ecg=False, eog=False, exclude='bads')
picks = picks[1:13:3]
epochs = Epochs(raw, events, event_id, tmin, tmax, picks=picks, baseli... |
def test_epochs_vectorizer():
'Test methods of EpochsVectorizer\n '
raw = io.read_raw_fif(raw_fname, preload=False)
events = read_events(event_name)
picks = pick_types(raw.info, meg=True, stim=False, ecg=False, eog=False, exclude='bads')
picks = picks[1:13:3]
with warnings.catch_warnings(reco... | -3,315,928,520,592,674,000 | Test methods of EpochsVectorizer | mne/decoding/tests/test_transformer.py | test_epochs_vectorizer | ARudiuk/mne-python | python | def test_epochs_vectorizer():
'\n '
raw = io.read_raw_fif(raw_fname, preload=False)
events = read_events(event_name)
picks = pick_types(raw.info, meg=True, stim=False, ecg=False, eog=False, exclude='bads')
picks = picks[1:13:3]
with warnings.catch_warnings(record=True):
epochs = Epoch... |
def export_transcripts(adapter, build='37'):
'Export all transcripts from the database\n\n Args:\n adapter(scout.adapter.MongoAdapter)\n build(str)\n\n Yields:\n transcript(scout.models.Transcript)\n '
LOG.info('Exporting all transcripts')
for tx_obj in adapter.transcripts(buil... | -9,093,368,864,162,328,000 | Export all transcripts from the database
Args:
adapter(scout.adapter.MongoAdapter)
build(str)
Yields:
transcript(scout.models.Transcript) | scout/export/transcript.py | export_transcripts | Clinical-Genomics/scout | python | def export_transcripts(adapter, build='37'):
'Export all transcripts from the database\n\n Args:\n adapter(scout.adapter.MongoAdapter)\n build(str)\n\n Yields:\n transcript(scout.models.Transcript)\n '
LOG.info('Exporting all transcripts')
for tx_obj in adapter.transcripts(buil... |
def fit(self, X, y):
'Fit the model to the data'
if self.normalize:
X = self._feature_scaler.fit_transform(X)
y = self._target_scaler.fit_transform(y)
X = X.to_numpy()
if self.add_intercept:
X = np.hstack((np.ones((X.shape[0], 1)), X))
y = y.to_numpy()
if (self.method == ... | 6,111,973,649,880,488,000 | Fit the model to the data | src/models/_linear.py | fit | orsdanilo/ml-from-scratch | python | def fit(self, X, y):
if self.normalize:
X = self._feature_scaler.fit_transform(X)
y = self._target_scaler.fit_transform(y)
X = X.to_numpy()
if self.add_intercept:
X = np.hstack((np.ones((X.shape[0], 1)), X))
y = y.to_numpy()
if (self.method == 'normal_equation'):
... |
def predict(self, X):
'Use the fitted model to predict on data'
assert (self._weights is not None), 'Model needs to be fitted first. Use the fit method'
if self.normalize:
X = self._feature_scaler.transform(X)
X = X.to_numpy()
if self.add_intercept:
X = np.hstack((np.ones((X.shape[0]... | 7,613,581,550,927,299,000 | Use the fitted model to predict on data | src/models/_linear.py | predict | orsdanilo/ml-from-scratch | python | def predict(self, X):
assert (self._weights is not None), 'Model needs to be fitted first. Use the fit method'
if self.normalize:
X = self._feature_scaler.transform(X)
X = X.to_numpy()
if self.add_intercept:
X = np.hstack((np.ones((X.shape[0], 1)), X))
y_pred = np.dot(X, self._w... |
def get_weights(self):
'Get weights from the fitted model'
assert (self._weights is not None), 'Model needs to be fitted first. Use the fit method'
return self._weights | 6,695,253,196,701,115,000 | Get weights from the fitted model | src/models/_linear.py | get_weights | orsdanilo/ml-from-scratch | python | def get_weights(self):
assert (self._weights is not None), 'Model needs to be fitted first. Use the fit method'
return self._weights |
def score(self, X, y, metric='r2'):
'Score the model'
assert (metric in ['r2', 'rmse', 'mae']), "Metric not supported. Supported metrics are 'r2', 'rmse' and 'mae'"
y_pred = self.predict(X)
if (metric == 'r2'):
score = r2_score(y, y_pred)
elif (metric == 'rmse'):
score = rmse_score(y... | -1,464,843,303,557,911,800 | Score the model | src/models/_linear.py | score | orsdanilo/ml-from-scratch | python | def score(self, X, y, metric='r2'):
assert (metric in ['r2', 'rmse', 'mae']), "Metric not supported. Supported metrics are 'r2', 'rmse' and 'mae'"
y_pred = self.predict(X)
if (metric == 'r2'):
score = r2_score(y, y_pred)
elif (metric == 'rmse'):
score = rmse_score(y, y_pred)
eli... |
def set_quest_cooldown(self, display_name, cooldown):
'\n Sets the quest cooldown to be the specified value.\n\n :param display_name: str - The display name of the person trying to set the cooldown\n :param cooldown: str - The raw message specifying the value to set the cooldown to\n :re... | 7,163,774,876,840,697,000 | Sets the quest cooldown to be the specified value.
:param display_name: str - The display name of the person trying to set the cooldown
:param cooldown: str - The raw message specifying the value to set the cooldown to
:return: | quest_bot/quest_channel.py | set_quest_cooldown | Xelaadryth/Xelabot | python | def set_quest_cooldown(self, display_name, cooldown):
'\n Sets the quest cooldown to be the specified value.\n\n :param display_name: str - The display name of the person trying to set the cooldown\n :param cooldown: str - The raw message specifying the value to set the cooldown to\n :re... |
def check_commands(self, display_name, msg, is_mod, is_sub):
'\n Connect to other command lists whose requirements are met.\n :param display_name: str - The display name of the command sender\n :param msg: str - The full message that the user sent that starts with "!"\n :param is_mod: bo... | -8,146,444,172,030,377,000 | Connect to other command lists whose requirements are met.
:param display_name: str - The display name of the command sender
:param msg: str - The full message that the user sent that starts with "!"
:param is_mod: bool - Whether the sender is a mod
:param is_sub: bool - Whether the sender is a sub | quest_bot/quest_channel.py | check_commands | Xelaadryth/Xelabot | python | def check_commands(self, display_name, msg, is_mod, is_sub):
'\n Connect to other command lists whose requirements are met.\n :param display_name: str - The display name of the command sender\n :param msg: str - The full message that the user sent that starts with "!"\n :param is_mod: bo... |
def list(self, scope: str, **kwargs: Any) -> AsyncIterable['_models.ComplianceResultList']:
'Security compliance results in the subscription.\n\n :param scope: Scope of the query, can be subscription\n (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group\n (/providers/Mic... | 1,449,087,768,364,436,500 | Security compliance results in the subscription.
:param scope: Scope of the query, can be subscription
(/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group
(/providers/Microsoft.Management/managementGroups/mgName).
:type scope: str
:keyword callable cls: A custom type or function that will be pa... | sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_compliance_results_operations.py | list | AFengKK/azure-sdk-for-python | python | def list(self, scope: str, **kwargs: Any) -> AsyncIterable['_models.ComplianceResultList']:
'Security compliance results in the subscription.\n\n :param scope: Scope of the query, can be subscription\n (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group\n (/providers/Mic... |
async def get(self, resource_id: str, compliance_result_name: str, **kwargs: Any) -> '_models.ComplianceResult':
'Security Compliance Result.\n\n :param resource_id: The identifier of the resource.\n :type resource_id: str\n :param compliance_result_name: name of the desired assessment complian... | -7,370,226,887,770,046,000 | Security Compliance Result.
:param resource_id: The identifier of the resource.
:type resource_id: str
:param compliance_result_name: name of the desired assessment compliance result.
:type compliance_result_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Com... | sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_compliance_results_operations.py | get | AFengKK/azure-sdk-for-python | python | async def get(self, resource_id: str, compliance_result_name: str, **kwargs: Any) -> '_models.ComplianceResult':
'Security Compliance Result.\n\n :param resource_id: The identifier of the resource.\n :type resource_id: str\n :param compliance_result_name: name of the desired assessment complian... |
def _warmup_update_lr(optimizer, epoch, init_lr, warmup_epochs, warmup_ratio=0.0):
'\n update learning rate of optimizers\n '
lr = ((((init_lr - warmup_ratio) * epoch) / warmup_epochs) + warmup_ratio)
for param_group in optimizer.param_groups:
param_group['lr'] = lr
return lr | -4,755,421,572,880,323,000 | update learning rate of optimizers | aw_nas/final/cnn_trainer.py | _warmup_update_lr | Harald-R/aw_nas | python | def _warmup_update_lr(optimizer, epoch, init_lr, warmup_epochs, warmup_ratio=0.0):
'\n \n '
lr = ((((init_lr - warmup_ratio) * epoch) / warmup_epochs) + warmup_ratio)
for param_group in optimizer.param_groups:
param_group['lr'] = lr
return lr |
async def try_initialize(input_channel: connection.TextReader, output_channel: connection.TextWriter, server_start_options_reader: PyreServerStartOptionsReader) -> Union[(InitializationSuccess, InitializationFailure, InitializationExit)]:
'\n Read an LSP message from the input channel and try to initialize an LS... | -3,685,783,171,509,941,000 | Read an LSP message from the input channel and try to initialize an LSP
server. Also write to the output channel with proper response if the input
message is a request instead of a notification.
The function can return one of three possibilities:
- If the initialization succeeds, return `InitializationSuccess`.
- If t... | client/commands/persistent.py | try_initialize | dmitryvinn/pyre-check-1 | python | async def try_initialize(input_channel: connection.TextReader, output_channel: connection.TextWriter, server_start_options_reader: PyreServerStartOptionsReader) -> Union[(InitializationSuccess, InitializationFailure, InitializationExit)]:
'\n Read an LSP message from the input channel and try to initialize an LS... |
async def _wait_for_exit(input_channel: connection.TextReader, output_channel: connection.TextWriter) -> None:
'\n Wait for an LSP "exit" request from the `input_channel`. This is mostly useful\n when the LSP server has received a "shutdown" request, in which case the LSP\n specification dictates that only... | -5,747,864,269,994,665,000 | Wait for an LSP "exit" request from the `input_channel`. This is mostly useful
when the LSP server has received a "shutdown" request, in which case the LSP
specification dictates that only "exit" can be sent from the client side.
If a non-exit LSP request is received, drop it and keep waiting on another
"exit" request... | client/commands/persistent.py | _wait_for_exit | dmitryvinn/pyre-check-1 | python | async def _wait_for_exit(input_channel: connection.TextReader, output_channel: connection.TextWriter) -> None:
'\n Wait for an LSP "exit" request from the `input_channel`. This is mostly useful\n when the LSP server has received a "shutdown" request, in which case the LSP\n specification dictates that only... |
async def process_hover_request(self, parameters: lsp.HoverTextDocumentParameters, request_id: Union[(int, str, None)]) -> None:
'Always respond to a hover request even for non-tracked paths.\n\n Otherwise, VS Code hover will wait for Pyre until it times out, meaning\n that messages from other hover p... | -5,727,239,738,493,310,000 | Always respond to a hover request even for non-tracked paths.
Otherwise, VS Code hover will wait for Pyre until it times out, meaning
that messages from other hover providers will be delayed. | client/commands/persistent.py | process_hover_request | dmitryvinn/pyre-check-1 | python | async def process_hover_request(self, parameters: lsp.HoverTextDocumentParameters, request_id: Union[(int, str, None)]) -> None:
'Always respond to a hover request even for non-tracked paths.\n\n Otherwise, VS Code hover will wait for Pyre until it times out, meaning\n that messages from other hover p... |
@property
def Active(self):
'\n Returns\n -------\n - obj(uhd_restpy.multivalue.Multivalue): Activate/Deactivate Configuration\n '
from uhd_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['Active'])) | -8,614,067,439,674,340,000 | Returns
-------
- obj(uhd_restpy.multivalue.Multivalue): Activate/Deactivate Configuration | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | Active | OpenIxia/ixnetwork_restpy | python | @property
def Active(self):
'\n Returns\n -------\n - obj(uhd_restpy.multivalue.Multivalue): Activate/Deactivate Configuration\n '
from uhd_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['Active'])) |
@property
def BroadcastRootPriority(self):
'\n Returns\n -------\n - obj(uhd_restpy.multivalue.Multivalue): Broadcast Root Priority\n '
from uhd_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['BroadcastRootPriority'])) | -5,547,421,448,337,901,000 | Returns
-------
- obj(uhd_restpy.multivalue.Multivalue): Broadcast Root Priority | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | BroadcastRootPriority | OpenIxia/ixnetwork_restpy | python | @property
def BroadcastRootPriority(self):
'\n Returns\n -------\n - obj(uhd_restpy.multivalue.Multivalue): Broadcast Root Priority\n '
from uhd_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['BroadcastRootPriority'])) |
@property
def Count(self):
'\n Returns\n -------\n - number: Number of elements inside associated multiplier-scaled container object, e.g. number of devices inside a Device Group.\n '
return self._get_attribute(self._SDM_ATT_MAP['Count']) | 9,202,294,428,103,448,000 | Returns
-------
- number: Number of elements inside associated multiplier-scaled container object, e.g. number of devices inside a Device Group. | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | Count | OpenIxia/ixnetwork_restpy | python | @property
def Count(self):
'\n Returns\n -------\n - number: Number of elements inside associated multiplier-scaled container object, e.g. number of devices inside a Device Group.\n '
return self._get_attribute(self._SDM_ATT_MAP['Count']) |
@property
def DescriptiveName(self):
"\n Returns\n -------\n - str: Longer, more descriptive name for element. It's not guaranteed to be unique like -name-, but may offer more context.\n "
return self._get_attribute(self._SDM_ATT_MAP['DescriptiveName']) | 6,335,322,004,352,822,000 | Returns
-------
- str: Longer, more descriptive name for element. It's not guaranteed to be unique like -name-, but may offer more context. | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | DescriptiveName | OpenIxia/ixnetwork_restpy | python | @property
def DescriptiveName(self):
"\n Returns\n -------\n - str: Longer, more descriptive name for element. It's not guaranteed to be unique like -name-, but may offer more context.\n "
return self._get_attribute(self._SDM_ATT_MAP['DescriptiveName']) |
@property
def Name(self):
'\n Returns\n -------\n - str: Name of NGPF element, guaranteed to be unique in Scenario\n '
return self._get_attribute(self._SDM_ATT_MAP['Name']) | -1,824,082,867,023,513,900 | Returns
-------
- str: Name of NGPF element, guaranteed to be unique in Scenario | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | Name | OpenIxia/ixnetwork_restpy | python | @property
def Name(self):
'\n Returns\n -------\n - str: Name of NGPF element, guaranteed to be unique in Scenario\n '
return self._get_attribute(self._SDM_ATT_MAP['Name']) |
@property
def Nickname(self):
'\n Returns\n -------\n - obj(uhd_restpy.multivalue.Multivalue): Nickname\n '
from uhd_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['Nickname'])) | 4,368,694,805,941,518,000 | Returns
-------
- obj(uhd_restpy.multivalue.Multivalue): Nickname | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | Nickname | OpenIxia/ixnetwork_restpy | python | @property
def Nickname(self):
'\n Returns\n -------\n - obj(uhd_restpy.multivalue.Multivalue): Nickname\n '
from uhd_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['Nickname'])) |
def update(self, Name=None):
'Updates isisTrillPseudoNode resource on the server.\n\n This method has some named parameters with a type: obj (Multivalue).\n The Multivalue class has documentation that details the possible values for those named parameters.\n\n Args\n ----\n - Name... | -5,700,813,858,963,087,000 | Updates isisTrillPseudoNode resource on the server.
This method has some named parameters with a type: obj (Multivalue).
The Multivalue class has documentation that details the possible values for those named parameters.
Args
----
- Name (str): Name of NGPF element, guaranteed to be unique in Scenario
Raises
------
... | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | update | OpenIxia/ixnetwork_restpy | python | def update(self, Name=None):
'Updates isisTrillPseudoNode resource on the server.\n\n This method has some named parameters with a type: obj (Multivalue).\n The Multivalue class has documentation that details the possible values for those named parameters.\n\n Args\n ----\n - Name... |
def add(self, Name=None):
'Adds a new isisTrillPseudoNode resource on the json, only valid with config assistant\n\n Args\n ----\n - Name (str): Name of NGPF element, guaranteed to be unique in Scenario\n\n Returns\n -------\n - self: This instance with all currently retrie... | -6,872,992,947,753,101,000 | Adds a new isisTrillPseudoNode resource on the json, only valid with config assistant
Args
----
- Name (str): Name of NGPF element, guaranteed to be unique in Scenario
Returns
-------
- self: This instance with all currently retrieved isisTrillPseudoNode resources using find and the newly added isisTrillPseudoNode re... | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | add | OpenIxia/ixnetwork_restpy | python | def add(self, Name=None):
'Adds a new isisTrillPseudoNode resource on the json, only valid with config assistant\n\n Args\n ----\n - Name (str): Name of NGPF element, guaranteed to be unique in Scenario\n\n Returns\n -------\n - self: This instance with all currently retrie... |
def find(self, Count=None, DescriptiveName=None, Name=None):
"Finds and retrieves isisTrillPseudoNode resources from the server.\n\n All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve isisTrillPseudoNode resources from the server.\n T... | -8,582,310,718,667,406,000 | Finds and retrieves isisTrillPseudoNode resources from the server.
All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve isisTrillPseudoNode resources from the server.
To retrieve an exact match ensure the parameter value starts with ^ and ends with $
By... | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | find | OpenIxia/ixnetwork_restpy | python | def find(self, Count=None, DescriptiveName=None, Name=None):
"Finds and retrieves isisTrillPseudoNode resources from the server.\n\n All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve isisTrillPseudoNode resources from the server.\n T... |
def read(self, href):
'Retrieves a single instance of isisTrillPseudoNode data from the server.\n\n Args\n ----\n - href (str): An href to the instance to be retrieved\n\n Returns\n -------\n - self: This instance with the isisTrillPseudoNode resources from the server avail... | -3,411,542,355,956,305,000 | Retrieves a single instance of isisTrillPseudoNode data from the server.
Args
----
- href (str): An href to the instance to be retrieved
Returns
-------
- self: This instance with the isisTrillPseudoNode resources from the server available through an iterator or index
Raises
------
- NotFoundError: The requested res... | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | read | OpenIxia/ixnetwork_restpy | python | def read(self, href):
'Retrieves a single instance of isisTrillPseudoNode data from the server.\n\n Args\n ----\n - href (str): An href to the instance to be retrieved\n\n Returns\n -------\n - self: This instance with the isisTrillPseudoNode resources from the server avail... |
def Abort(self, *args, **kwargs):
'Executes the abort operation on the server.\n\n Abort CPF control plane (equals to demote to kUnconfigured state).\n\n abort(async_operation=bool)\n ---------------------------\n - async_operation (bool=False): True to execute the operation asynchronous... | -4,862,486,890,617,578,000 | Executes the abort operation on the server.
Abort CPF control plane (equals to demote to kUnconfigured state).
abort(async_operation=bool)
---------------------------
- async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will bloc... | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | Abort | OpenIxia/ixnetwork_restpy | python | def Abort(self, *args, **kwargs):
'Executes the abort operation on the server.\n\n Abort CPF control plane (equals to demote to kUnconfigured state).\n\n abort(async_operation=bool)\n ---------------------------\n - async_operation (bool=False): True to execute the operation asynchronous... |
def Start(self, *args, **kwargs):
'Executes the start operation on the server.\n\n Start CPF control plane (equals to promote to negotiated state).\n\n The IxNetwork model allows for multiple method Signatures with the same name while python does not.\n\n start(async_operation=bool)\n --... | -8,314,196,885,129,389,000 | Executes the start operation on the server.
Start CPF control plane (equals to promote to negotiated state).
The IxNetwork model allows for multiple method Signatures with the same name while python does not.
start(async_operation=bool)
---------------------------
- async_operation (bool=False): True to execute the ... | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | Start | OpenIxia/ixnetwork_restpy | python | def Start(self, *args, **kwargs):
'Executes the start operation on the server.\n\n Start CPF control plane (equals to promote to negotiated state).\n\n The IxNetwork model allows for multiple method Signatures with the same name while python does not.\n\n start(async_operation=bool)\n --... |
def Stop(self, *args, **kwargs):
'Executes the stop operation on the server.\n\n Stop CPF control plane (equals to demote to PreValidated-DoDDone state).\n\n The IxNetwork model allows for multiple method Signatures with the same name while python does not.\n\n stop(async_operation=bool)\n ... | 8,743,726,022,297,206,000 | Executes the stop operation on the server.
Stop CPF control plane (equals to demote to PreValidated-DoDDone state).
The IxNetwork model allows for multiple method Signatures with the same name while python does not.
stop(async_operation=bool)
--------------------------
- async_operation (bool=False): True to execute... | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | Stop | OpenIxia/ixnetwork_restpy | python | def Stop(self, *args, **kwargs):
'Executes the stop operation on the server.\n\n Stop CPF control plane (equals to demote to PreValidated-DoDDone state).\n\n The IxNetwork model allows for multiple method Signatures with the same name while python does not.\n\n stop(async_operation=bool)\n ... |
def get_device_ids(self, PortNames=None, Active=None, BroadcastRootPriority=None, Nickname=None):
'Base class infrastructure that gets a list of isisTrillPseudoNode device ids encapsulated by this object.\n\n Use the optional regex parameters in the method to refine the list of device ids encapsulated by thi... | -6,627,007,136,703,285,000 | Base class infrastructure that gets a list of isisTrillPseudoNode device ids encapsulated by this object.
Use the optional regex parameters in the method to refine the list of device ids encapsulated by this object.
Args
----
- PortNames (str): optional regex of port names
- Active (str): optional regex of active
- B... | uhd_restpy/testplatform/sessions/ixnetwork/topology/isistrillpseudonode_173e4463dccc2001457569c77f3570e0.py | get_device_ids | OpenIxia/ixnetwork_restpy | python | def get_device_ids(self, PortNames=None, Active=None, BroadcastRootPriority=None, Nickname=None):
'Base class infrastructure that gets a list of isisTrillPseudoNode device ids encapsulated by this object.\n\n Use the optional regex parameters in the method to refine the list of device ids encapsulated by thi... |
def __repr__(self):
'\n display info about this object ...\n\n :return: output\n '
x = ('Libref = %s\n' % self.libref)
x += ('Table = %s\n' % self.table)
x += ('Dsopts = %s\n' % str(self.dsopts))
x += ('Results = %s\n' % self.results)
return x | 833,230,397,643,892,900 | display info about this object ...
:return: output | saspy/sasdata.py | __repr__ | kjnh10/saspy | python | def __repr__(self):
'\n display info about this object ...\n\n :return: output\n '
x = ('Libref = %s\n' % self.libref)
x += ('Table = %s\n' % self.table)
x += ('Dsopts = %s\n' % str(self.dsopts))
x += ('Results = %s\n' % self.results)
return x |
def set_results(self, results: str):
"\n This method set the results attribute for the SASdata object; it stays in effect till changed\n results - set the default result type for this SASdata object. 'Pandas' or 'HTML' or 'TEXT'.\n\n :param results: format of results, SASsession.results is defa... | 8,315,398,458,623,885,000 | This method set the results attribute for the SASdata object; it stays in effect till changed
results - set the default result type for this SASdata object. 'Pandas' or 'HTML' or 'TEXT'.
:param results: format of results, SASsession.results is default, PANDAS, HTML or TEXT are the alternatives
:return: None | saspy/sasdata.py | set_results | kjnh10/saspy | python | def set_results(self, results: str):
"\n This method set the results attribute for the SASdata object; it stays in effect till changed\n results - set the default result type for this SASdata object. 'Pandas' or 'HTML' or 'TEXT'.\n\n :param results: format of results, SASsession.results is defa... |
def _returnPD(self, code, tablename, **kwargs):
'\n private function to take a sas code normally to create a table, generate pandas data frame and cleanup.\n\n :param code: string of SAS code\n :param tablename: the name of the SAS Data Set\n :param kwargs:\n :return: Pandas Data ... | -6,078,101,975,344,420,000 | private function to take a sas code normally to create a table, generate pandas data frame and cleanup.
:param code: string of SAS code
:param tablename: the name of the SAS Data Set
:param kwargs:
:return: Pandas Data Frame | saspy/sasdata.py | _returnPD | kjnh10/saspy | python | def _returnPD(self, code, tablename, **kwargs):
'\n private function to take a sas code normally to create a table, generate pandas data frame and cleanup.\n\n :param code: string of SAS code\n :param tablename: the name of the SAS Data Set\n :param kwargs:\n :return: Pandas Data ... |
def _dsopts(self):
"\n This method builds out data set options clause for this SASdata object: '(where= , keeep=, obs=, ...)'\n "
return self.sas._dsopts(self.dsopts) | -3,960,126,987,296,020,500 | This method builds out data set options clause for this SASdata object: '(where= , keeep=, obs=, ...)' | saspy/sasdata.py | _dsopts | kjnh10/saspy | python | def _dsopts(self):
"\n \n "
return self.sas._dsopts(self.dsopts) |
def where(self, where: str) -> 'SASdata':
'\n This method returns a clone of the SASdata object, with the where attribute set. The original SASdata object is not affected.\n\n :param where: the where clause to apply\n :return: SAS data object\n '
sd = SASdata(self.sas, self.libref, s... | 191,522,911,558,066,560 | This method returns a clone of the SASdata object, with the where attribute set. The original SASdata object is not affected.
:param where: the where clause to apply
:return: SAS data object | saspy/sasdata.py | where | kjnh10/saspy | python | def where(self, where: str) -> 'SASdata':
'\n This method returns a clone of the SASdata object, with the where attribute set. The original SASdata object is not affected.\n\n :param where: the where clause to apply\n :return: SAS data object\n '
sd = SASdata(self.sas, self.libref, s... |
def head(self, obs=5):
'\n display the first n rows of a table\n\n :param obs: the number of rows of the table that you want to display. The default is 5\n :return:\n '
topts = dict(self.dsopts)
topts['obs'] = obs
code = ((((('proc print data=' + self.libref) + '.') + self.ta... | 3,445,847,193,978,387,500 | display the first n rows of a table
:param obs: the number of rows of the table that you want to display. The default is 5
:return: | saspy/sasdata.py | head | kjnh10/saspy | python | def head(self, obs=5):
'\n display the first n rows of a table\n\n :param obs: the number of rows of the table that you want to display. The default is 5\n :return:\n '
topts = dict(self.dsopts)
topts['obs'] = obs
code = ((((('proc print data=' + self.libref) + '.') + self.ta... |
def tail(self, obs=5):
'\n display the last n rows of a table\n\n :param obs: the number of rows of the table that you want to display. The default is 5\n :return:\n '
code = 'proc sql;select count(*) format best32. into :lastobs from '
code += (((self.libref + '.') + self.table)... | -8,550,472,158,035,630,000 | display the last n rows of a table
:param obs: the number of rows of the table that you want to display. The default is 5
:return: | saspy/sasdata.py | tail | kjnh10/saspy | python | def tail(self, obs=5):
'\n display the last n rows of a table\n\n :param obs: the number of rows of the table that you want to display. The default is 5\n :return:\n '
code = 'proc sql;select count(*) format best32. into :lastobs from '
code += (((self.libref + '.') + self.table)... |
def obs(self):
'\n return the number of observations for your SASdata object\n '
code = 'proc sql;select count(*) format best32. into :lastobs from '
code += (((self.libref + '.') + self.table) + self._dsopts())
code += ';%put lastobs=&lastobs lastobsend=;\nquit;'
if self.sas.nosub:
... | 7,016,958,279,017,528,000 | return the number of observations for your SASdata object | saspy/sasdata.py | obs | kjnh10/saspy | python | def obs(self):
'\n \n '
code = 'proc sql;select count(*) format best32. into :lastobs from '
code += (((self.libref + '.') + self.table) + self._dsopts())
code += ';%put lastobs=&lastobs lastobsend=;\nquit;'
if self.sas.nosub:
print(code)
return
le = self._is_valid(... |
def partition(self, var: str='', fraction: float=0.7, seed: int=9878, kfold: int=1, out: 'SASdata'=None, singleOut: bool=True) -> object:
'\n Partition a sas data object using SRS sampling or if a variable is specified then\n stratifying with respect to that variable\n\n :param var: variable(s)... | -2,989,308,485,039,091,700 | Partition a sas data object using SRS sampling or if a variable is specified then
stratifying with respect to that variable
:param var: variable(s) for stratification. If multiple then space delimited list
:param fraction: fraction to split
:param seed: random seed
:param kfold: number of k folds
:param out: the SAS d... | saspy/sasdata.py | partition | kjnh10/saspy | python | def partition(self, var: str=, fraction: float=0.7, seed: int=9878, kfold: int=1, out: 'SASdata'=None, singleOut: bool=True) -> object:
'\n Partition a sas data object using SRS sampling or if a variable is specified then\n stratifying with respect to that variable\n\n :param var: variable(s) f... |
def contents(self):
'\n display metadata about the table. size, number of rows, columns and their data type ...\n\n :return: output\n '
code = ((((('proc contents data=' + self.libref) + '.') + self.table) + self._dsopts()) + ';run;')
if self.sas.nosub:
print(code)
retur... | -5,023,457,607,378,223,000 | display metadata about the table. size, number of rows, columns and their data type ...
:return: output | saspy/sasdata.py | contents | kjnh10/saspy | python | def contents(self):
'\n display metadata about the table. size, number of rows, columns and their data type ...\n\n :return: output\n '
code = ((((('proc contents data=' + self.libref) + '.') + self.table) + self._dsopts()) + ';run;')
if self.sas.nosub:
print(code)
retur... |
def columnInfo(self):
'\n display metadata about the table, size, number of rows, columns and their data type\n '
code = (((((('proc contents data=' + self.libref) + '.') + self.table) + ' ') + self._dsopts()) + ';ods select Variables;run;')
if self.sas.nosub:
print(code)
retur... | 644,311,950,941,764,900 | display metadata about the table, size, number of rows, columns and their data type | saspy/sasdata.py | columnInfo | kjnh10/saspy | python | def columnInfo(self):
'\n \n '
code = (((((('proc contents data=' + self.libref) + '.') + self.table) + ' ') + self._dsopts()) + ';ods select Variables;run;')
if self.sas.nosub:
print(code)
return
if (self.results.upper() == 'PANDAS'):
code = ('proc contents data=%s... |
def info(self):
'\n Display the column info on a SAS data object\n\n :return: Pandas data frame\n '
if (self.results.casefold() != 'pandas'):
print('The info method only works with Pandas results')
return None
info_code = "\n data work._statsInfo ;\n do... | 6,330,648,730,209,849,000 | Display the column info on a SAS data object
:return: Pandas data frame | saspy/sasdata.py | info | kjnh10/saspy | python | def info(self):
'\n Display the column info on a SAS data object\n\n :return: Pandas data frame\n '
if (self.results.casefold() != 'pandas'):
print('The info method only works with Pandas results')
return None
info_code = "\n data work._statsInfo ;\n do... |
def describe(self):
'\n display descriptive statistics for the table; summary statistics.\n\n :return:\n '
return self.means() | -8,534,865,489,948,653,000 | display descriptive statistics for the table; summary statistics.
:return: | saspy/sasdata.py | describe | kjnh10/saspy | python | def describe(self):
'\n display descriptive statistics for the table; summary statistics.\n\n :return:\n '
return self.means() |
def means(self):
"\n display descriptive statistics for the table; summary statistics. This is an alias for 'describe'\n\n :return:\n "
dsopts = self._dsopts().partition(';\n\tformat')
code = ((((('proc means data=' + self.libref) + '.') + self.table) + dsopts[0]) + ' stackodsoutput n n... | 5,236,874,011,568,663,000 | display descriptive statistics for the table; summary statistics. This is an alias for 'describe'
:return: | saspy/sasdata.py | means | kjnh10/saspy | python | def means(self):
"\n display descriptive statistics for the table; summary statistics. This is an alias for 'describe'\n\n :return:\n "
dsopts = self._dsopts().partition(';\n\tformat')
code = ((((('proc means data=' + self.libref) + '.') + self.table) + dsopts[0]) + ' stackodsoutput n n... |
def impute(self, vars: dict, replace: bool=False, prefix: str='imp_', out: 'SASdata'=None) -> 'SASdata':
"\n Imputes missing values for a SASdata object.\n\n :param vars: a dictionary in the form of {'varname':'impute type'} or {'impute type':'[var1, var2]'}\n :param replace:\n :param pr... | -6,392,868,252,885,690,000 | Imputes missing values for a SASdata object.
:param vars: a dictionary in the form of {'varname':'impute type'} or {'impute type':'[var1, var2]'}
:param replace:
:param prefix:
:param out:
:return: | saspy/sasdata.py | impute | kjnh10/saspy | python | def impute(self, vars: dict, replace: bool=False, prefix: str='imp_', out: 'SASdata'=None) -> 'SASdata':
"\n Imputes missing values for a SASdata object.\n\n :param vars: a dictionary in the form of {'varname':'impute type'} or {'impute type':'[var1, var2]'}\n :param replace:\n :param pr... |
def sort(self, by: str, out: object='', **kwargs) -> 'SASdata':
"\n Sort the SAS Data Set\n\n :param by: REQUIRED variable to sort by (BY <DESCENDING> variable-1 <<DESCENDING> variable-2 ...>;)\n :param out: OPTIONAL takes either a string 'libref.table' or 'table' which will go to WORK or USER\... | 3,380,481,552,454,117,400 | Sort the SAS Data Set
:param by: REQUIRED variable to sort by (BY <DESCENDING> variable-1 <<DESCENDING> variable-2 ...>;)
:param out: OPTIONAL takes either a string 'libref.table' or 'table' which will go to WORK or USER
if assigned or a sas data object'' will sort in place if allowed
:param kwargs:
:return: SASda... | saspy/sasdata.py | sort | kjnh10/saspy | python | def sort(self, by: str, out: object=, **kwargs) -> 'SASdata':
"\n Sort the SAS Data Set\n\n :param by: REQUIRED variable to sort by (BY <DESCENDING> variable-1 <<DESCENDING> variable-2 ...>;)\n :param out: OPTIONAL takes either a string 'libref.table' or 'table' which will go to WORK or USER\n ... |
def add_vars(self, vars: dict, out: object=None, **kwargs) -> 'SASLOG':
"\n Copy table to itesf, or to 'out=' table and add any vars if you want\n\n :param vars: REQUIRED dictionayr of variable names (keys) and assignment statement (values)\n to maintain variable order use collections.Or... | 781,591,339,113,170,600 | Copy table to itesf, or to 'out=' table and add any vars if you want
:param vars: REQUIRED dictionayr of variable names (keys) and assignment statement (values)
to maintain variable order use collections.OrderedDict Assignment statements must be valid
SAS assignment expressions.
:param out: OPTIONAL tak... | saspy/sasdata.py | add_vars | kjnh10/saspy | python | def add_vars(self, vars: dict, out: object=None, **kwargs) -> 'SASLOG':
"\n Copy table to itesf, or to 'out=' table and add any vars if you want\n\n :param vars: REQUIRED dictionayr of variable names (keys) and assignment statement (values)\n to maintain variable order use collections.Or... |
def assessModel(self, target: str, prediction: str, nominal: bool=True, event: str='', **kwargs):
'\n This method will calculate assessment measures using the SAS AA_Model_Eval Macro used for SAS Enterprise Miner.\n Not all datasets can be assessed. This is designed for scored data that includes a tar... | 3,050,446,093,375,741,400 | This method will calculate assessment measures using the SAS AA_Model_Eval Macro used for SAS Enterprise Miner.
Not all datasets can be assessed. This is designed for scored data that includes a target and prediction columns
TODO: add code example of build, score, and then assess
:param target: string that represents ... | saspy/sasdata.py | assessModel | kjnh10/saspy | python | def assessModel(self, target: str, prediction: str, nominal: bool=True, event: str=, **kwargs):
'\n This method will calculate assessment measures using the SAS AA_Model_Eval Macro used for SAS Enterprise Miner.\n Not all datasets can be assessed. This is designed for scored data that includes a targe... |
def to_csv(self, file: str, opts: dict=None) -> str:
'\n This method will export a SAS Data Set to a file in CSV format.\n\n :param file: the OS filesystem path of the file to be created (exported from this SAS Data Set)\n :return:\n '
opts = (opts if (opts is not None) else {})
... | 8,813,894,262,514,378,000 | This method will export a SAS Data Set to a file in CSV format.
:param file: the OS filesystem path of the file to be created (exported from this SAS Data Set)
:return: | saspy/sasdata.py | to_csv | kjnh10/saspy | python | def to_csv(self, file: str, opts: dict=None) -> str:
'\n This method will export a SAS Data Set to a file in CSV format.\n\n :param file: the OS filesystem path of the file to be created (exported from this SAS Data Set)\n :return:\n '
opts = (opts if (opts is not None) else {})
... |
def score(self, file: str='', code: str='', out: 'SASdata'=None) -> 'SASdata':
'\n This method is meant to update a SAS Data object with a model score file.\n\n :param file: a file reference to the SAS score code\n :param code: a string of the valid SAS score code\n :param out: Where to ... | 8,542,006,771,395,692,000 | This method is meant to update a SAS Data object with a model score file.
:param file: a file reference to the SAS score code
:param code: a string of the valid SAS score code
:param out: Where to the write the file. Defaults to update in place
:return: The Scored SAS Data object. | saspy/sasdata.py | score | kjnh10/saspy | python | def score(self, file: str=, code: str=, out: 'SASdata'=None) -> 'SASdata':
'\n This method is meant to update a SAS Data object with a model score file.\n\n :param file: a file reference to the SAS score code\n :param code: a string of the valid SAS score code\n :param out: Where to the ... |
def to_frame(self, **kwargs) -> 'pd.DataFrame':
"\n Export this SAS Data Set to a Pandas Data Frame\n\n :param kwargs:\n :return: Pandas data frame\n :rtype: 'pd.DataFrame'\n "
return self.to_df(**kwargs) | -7,170,669,116,586,191,000 | Export this SAS Data Set to a Pandas Data Frame
:param kwargs:
:return: Pandas data frame
:rtype: 'pd.DataFrame' | saspy/sasdata.py | to_frame | kjnh10/saspy | python | def to_frame(self, **kwargs) -> 'pd.DataFrame':
"\n Export this SAS Data Set to a Pandas Data Frame\n\n :param kwargs:\n :return: Pandas data frame\n :rtype: 'pd.DataFrame'\n "
return self.to_df(**kwargs) |
def to_df(self, method: str='MEMORY', **kwargs) -> 'pd.DataFrame':
'\n Export this SAS Data Set to a Pandas Data Frame\n\n :param method: defaults to MEMORY; the original method. CSV is the other choice which uses an intermediary csv file; faster for large data\n :param kwargs:\n :return... | 7,848,463,222,761,535,000 | Export this SAS Data Set to a Pandas Data Frame
:param method: defaults to MEMORY; the original method. CSV is the other choice which uses an intermediary csv file; faster for large data
:param kwargs:
:return: Pandas data frame | saspy/sasdata.py | to_df | kjnh10/saspy | python | def to_df(self, method: str='MEMORY', **kwargs) -> 'pd.DataFrame':
'\n Export this SAS Data Set to a Pandas Data Frame\n\n :param method: defaults to MEMORY; the original method. CSV is the other choice which uses an intermediary csv file; faster for large data\n :param kwargs:\n :return... |
def to_df_CSV(self, tempfile: str=None, tempkeep: bool=False, **kwargs) -> 'pd.DataFrame':
"\n Export this SAS Data Set to a Pandas Data Frame via CSV file\n\n :param tempfile: [optional] an OS path for a file to use for the local CSV file; default it a temporary file that's cleaned up\n :param... | 1,314,355,456,754,178,600 | Export this SAS Data Set to a Pandas Data Frame via CSV file
:param tempfile: [optional] an OS path for a file to use for the local CSV file; default it a temporary file that's cleaned up
:param tempkeep: if you specify your own file to use with tempfile=, this controls whether it's cleaned up after using it
:param kw... | saspy/sasdata.py | to_df_CSV | kjnh10/saspy | python | def to_df_CSV(self, tempfile: str=None, tempkeep: bool=False, **kwargs) -> 'pd.DataFrame':
"\n Export this SAS Data Set to a Pandas Data Frame via CSV file\n\n :param tempfile: [optional] an OS path for a file to use for the local CSV file; default it a temporary file that's cleaned up\n :param... |
def to_json(self, pretty: bool=False, sastag: bool=False, **kwargs) -> str:
'\n Export this SAS Data Set to a JSON Object\n PROC JSON documentation: http://go.documentation.sas.com/?docsetId=proc&docsetVersion=9.4&docsetTarget=p06hstivs0b3hsn1cb4zclxukkut.htm&locale=en\n\n :param pretty: boolea... | -1,177,426,332,884,585,200 | Export this SAS Data Set to a JSON Object
PROC JSON documentation: http://go.documentation.sas.com/?docsetId=proc&docsetVersion=9.4&docsetTarget=p06hstivs0b3hsn1cb4zclxukkut.htm&locale=en
:param pretty: boolean False return JSON on one line True returns formatted JSON
:param sastag: include SAS meta tags
:param kwargs... | saspy/sasdata.py | to_json | kjnh10/saspy | python | def to_json(self, pretty: bool=False, sastag: bool=False, **kwargs) -> str:
'\n Export this SAS Data Set to a JSON Object\n PROC JSON documentation: http://go.documentation.sas.com/?docsetId=proc&docsetVersion=9.4&docsetTarget=p06hstivs0b3hsn1cb4zclxukkut.htm&locale=en\n\n :param pretty: boolea... |
def heatmap(self, x: str, y: str, options: str='', title: str='', label: str='') -> object:
'\n Documentation link: http://support.sas.com/documentation/cdl/en/grstatproc/67909/HTML/default/viewer.htm#n0w12m4cn1j5c6n12ak64u1rys4w.htm\n\n :param x: x variable\n :param y: y variable\n :par... | -2,740,617,728,054,231,600 | Documentation link: http://support.sas.com/documentation/cdl/en/grstatproc/67909/HTML/default/viewer.htm#n0w12m4cn1j5c6n12ak64u1rys4w.htm
:param x: x variable
:param y: y variable
:param options: display options (string)
:param title: graph title
:param label:
:return: | saspy/sasdata.py | heatmap | kjnh10/saspy | python | def heatmap(self, x: str, y: str, options: str=, title: str=, label: str=) -> object:
'\n Documentation link: http://support.sas.com/documentation/cdl/en/grstatproc/67909/HTML/default/viewer.htm#n0w12m4cn1j5c6n12ak64u1rys4w.htm\n\n :param x: x variable\n :param y: y variable\n :param opt... |
def hist(self, var: str, title: str='', label: str='') -> object:
'\n This method requires a numeric column (use the contents method to see column types) and generates a histogram.\n\n :param var: the NUMERIC variable (column) you want to plot\n :param title: an optional Title for the chart\n ... | -8,487,482,241,291,482,000 | This method requires a numeric column (use the contents method to see column types) and generates a histogram.
:param var: the NUMERIC variable (column) you want to plot
:param title: an optional Title for the chart
:param label: LegendLABEL= value for sgplot
:return: | saspy/sasdata.py | hist | kjnh10/saspy | python | def hist(self, var: str, title: str=, label: str=) -> object:
'\n This method requires a numeric column (use the contents method to see column types) and generates a histogram.\n\n :param var: the NUMERIC variable (column) you want to plot\n :param title: an optional Title for the chart\n ... |
def top(self, var: str, n: int=10, order: str='freq', title: str='') -> object:
"\n Return the most commonly occuring items (levels)\n\n :param var: the CHAR variable (column) you want to count\n :param n: the top N to be displayed (defaults to 10)\n :param order: default to most common ... | 4,979,005,287,876,301,000 | Return the most commonly occuring items (levels)
:param var: the CHAR variable (column) you want to count
:param n: the top N to be displayed (defaults to 10)
:param order: default to most common use order='data' to get then in alphbetic order
:param title: an optional Title for the chart
:return: Data Table | saspy/sasdata.py | top | kjnh10/saspy | python | def top(self, var: str, n: int=10, order: str='freq', title: str=) -> object:
"\n Return the most commonly occuring items (levels)\n\n :param var: the CHAR variable (column) you want to count\n :param n: the top N to be displayed (defaults to 10)\n :param order: default to most common us... |
def bar(self, var: str, title: str='', label: str='') -> object:
'\n This method requires a character column (use the contents method to see column types)\n and generates a bar chart.\n\n :param var: the CHAR variable (column) you want to plot\n :param title: an optional title for the ch... | 8,782,738,664,675,304,000 | This method requires a character column (use the contents method to see column types)
and generates a bar chart.
:param var: the CHAR variable (column) you want to plot
:param title: an optional title for the chart
:param label: LegendLABEL= value for sgplot
:return: graphic plot | saspy/sasdata.py | bar | kjnh10/saspy | python | def bar(self, var: str, title: str=, label: str=) -> object:
'\n This method requires a character column (use the contents method to see column types)\n and generates a bar chart.\n\n :param var: the CHAR variable (column) you want to plot\n :param title: an optional title for the chart\... |
def series(self, x: str, y: list, title: str='') -> object:
'\n This method plots a series of x,y coordinates. You can provide a list of y columns for multiple line plots.\n\n :param x: the x axis variable; generally a time or continuous variable.\n :param y: the y axis variable(s), you can spe... | -2,095,631,289,854,435,800 | This method plots a series of x,y coordinates. You can provide a list of y columns for multiple line plots.
:param x: the x axis variable; generally a time or continuous variable.
:param y: the y axis variable(s), you can specify a single column or a list of columns
:param title: an optional Title for the chart
:retur... | saspy/sasdata.py | series | kjnh10/saspy | python | def series(self, x: str, y: list, title: str=) -> object:
'\n This method plots a series of x,y coordinates. You can provide a list of y columns for multiple line plots.\n\n :param x: the x axis variable; generally a time or continuous variable.\n :param y: the y axis variable(s), you can speci... |
def scatter(self, x: str, y: list, title: str='') -> object:
'\n This method plots a scatter of x,y coordinates. You can provide a list of y columns for multiple line plots.\n\n :param x: the x axis variable; generally a time or continuous variable.\n :param y: the y axis variable(s), you can s... | -1,922,689,700,356,596,500 | This method plots a scatter of x,y coordinates. You can provide a list of y columns for multiple line plots.
:param x: the x axis variable; generally a time or continuous variable.
:param y: the y axis variable(s), you can specify a single column or a list of columns
:param title: an optional Title for the chart
:retu... | saspy/sasdata.py | scatter | kjnh10/saspy | python | def scatter(self, x: str, y: list, title: str=) -> object:
'\n This method plots a scatter of x,y coordinates. You can provide a list of y columns for multiple line plots.\n\n :param x: the x axis variable; generally a time or continuous variable.\n :param y: the y axis variable(s), you can spe... |
def _invert(f_x, y, x, domain=S.Complexes):
"\n Reduce the complex valued equation ``f(x) = y`` to a set of equations\n ``{g(x) = h_1(y), g(x) = h_2(y), ..., g(x) = h_n(y) }`` where ``g(x)`` is\n a simpler function than ``f(x)``. The return value is a tuple ``(g(x),\n set_h)``, where ``g(x)`` is a func... | -329,772,719,969,644,500 | Reduce the complex valued equation ``f(x) = y`` to a set of equations
``{g(x) = h_1(y), g(x) = h_2(y), ..., g(x) = h_n(y) }`` where ``g(x)`` is
a simpler function than ``f(x)``. The return value is a tuple ``(g(x),
set_h)``, where ``g(x)`` is a function of ``x`` and ``set_h`` is
the set of function ``{h_1(y), h_2(y), ... | sympy/solvers/solveset.py | _invert | aktech/sympy | python | def _invert(f_x, y, x, domain=S.Complexes):
"\n Reduce the complex valued equation ``f(x) = y`` to a set of equations\n ``{g(x) = h_1(y), g(x) = h_2(y), ..., g(x) = h_n(y) }`` where ``g(x)`` is\n a simpler function than ``f(x)``. The return value is a tuple ``(g(x),\n set_h)``, where ``g(x)`` is a func... |
def invert_real(f_x, y, x, domain=S.Reals):
'\n Inverts a real-valued function. Same as _invert, but sets\n the domain to ``S.Reals`` before inverting.\n '
return _invert(f_x, y, x, domain) | 5,623,686,675,543,600,000 | Inverts a real-valued function. Same as _invert, but sets
the domain to ``S.Reals`` before inverting. | sympy/solvers/solveset.py | invert_real | aktech/sympy | python | def invert_real(f_x, y, x, domain=S.Reals):
'\n Inverts a real-valued function. Same as _invert, but sets\n the domain to ``S.Reals`` before inverting.\n '
return _invert(f_x, y, x, domain) |
def _invert_real(f, g_ys, symbol):
'Helper function for _invert.'
if (f == symbol):
return (f, g_ys)
n = Dummy('n', real=True)
if (hasattr(f, 'inverse') and (not isinstance(f, (TrigonometricFunction, HyperbolicFunction)))):
if (len(f.args) > 1):
raise ValueError('Only functio... | -8,353,688,872,299,090,000 | Helper function for _invert. | sympy/solvers/solveset.py | _invert_real | aktech/sympy | python | def _invert_real(f, g_ys, symbol):
if (f == symbol):
return (f, g_ys)
n = Dummy('n', real=True)
if (hasattr(f, 'inverse') and (not isinstance(f, (TrigonometricFunction, HyperbolicFunction)))):
if (len(f.args) > 1):
raise ValueError('Only functions with one argument are suppo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.