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 |
|---|---|---|---|---|---|---|---|---|---|
49a4f5d76758e58eb6b7254a03deb60956c2f34dbaf44c7c66c8ae42c27e12a8 | def plot_partial_DOS(self, pdos_indices=None, legend=None):
'Plot projected DOS.'
warnings.warn('Phonopy.plot_partial_DOS() is deprecated. Use Phonopy.plot_projected_dos() (lowercase on DOS).', DeprecationWarning)
return self.plot_projected_dos(pdos_indices=pdos_indices, legend=legend) | Plot projected DOS. | phonopy/api_phonopy.py | plot_partial_DOS | MSimoncelli/phonopy | 127 | python | def plot_partial_DOS(self, pdos_indices=None, legend=None):
warnings.warn('Phonopy.plot_partial_DOS() is deprecated. Use Phonopy.plot_projected_dos() (lowercase on DOS).', DeprecationWarning)
return self.plot_projected_dos(pdos_indices=pdos_indices, legend=legend) | def plot_partial_DOS(self, pdos_indices=None, legend=None):
warnings.warn('Phonopy.plot_partial_DOS() is deprecated. Use Phonopy.plot_projected_dos() (lowercase on DOS).', DeprecationWarning)
return self.plot_projected_dos(pdos_indices=pdos_indices, legend=legend)<|docstring|>Plot projected DOS.<|endoftext... |
33bab28ee8a5da4cebac3072d2ba3a37a540832a37ebf5967d441c60a9f2d82b | def plot_projected_dos(self, pdos_indices=None, legend=None):
'Plot projected DOS.\n\n Parameters\n ----------\n pdos_indices : list of list, optional\n Sets of indices of atoms whose projected DOS are summed over.\n The indices start with 0. An example is as follwos:\n ... | Plot projected DOS.
Parameters
----------
pdos_indices : list of list, optional
Sets of indices of atoms whose projected DOS are summed over.
The indices start with 0. An example is as follwos:
pdos_indices=[[0, 1], [2, 3, 4, 5]]
Default is None, which means
pdos_indices=[[i] for i in rang... | phonopy/api_phonopy.py | plot_projected_dos | MSimoncelli/phonopy | 127 | python | def plot_projected_dos(self, pdos_indices=None, legend=None):
'Plot projected DOS.\n\n Parameters\n ----------\n pdos_indices : list of list, optional\n Sets of indices of atoms whose projected DOS are summed over.\n The indices start with 0. An example is as follwos:\n ... | def plot_projected_dos(self, pdos_indices=None, legend=None):
'Plot projected DOS.\n\n Parameters\n ----------\n pdos_indices : list of list, optional\n Sets of indices of atoms whose projected DOS are summed over.\n The indices start with 0. An example is as follwos:\n ... |
3b23fc0f8fbaf343e44f92a6b83769534645c49de89df29a9edfbb7c21d1a4bb | def write_partial_DOS(self, filename='partial_dos.dat'):
'Write projected DOS to text file.'
warnings.warn('Phonopy.write_partial_DOS() is deprecated. Use Phonopy.write_projected_dos() (lowercase on DOS).', DeprecationWarning)
self.write_projected_dos(filename=filename) | Write projected DOS to text file. | phonopy/api_phonopy.py | write_partial_DOS | MSimoncelli/phonopy | 127 | python | def write_partial_DOS(self, filename='partial_dos.dat'):
warnings.warn('Phonopy.write_partial_DOS() is deprecated. Use Phonopy.write_projected_dos() (lowercase on DOS).', DeprecationWarning)
self.write_projected_dos(filename=filename) | def write_partial_DOS(self, filename='partial_dos.dat'):
warnings.warn('Phonopy.write_partial_DOS() is deprecated. Use Phonopy.write_projected_dos() (lowercase on DOS).', DeprecationWarning)
self.write_projected_dos(filename=filename)<|docstring|>Write projected DOS to text file.<|endoftext|> |
3b21124d8a57317db470feea3b7a01d5af630e9bc8d313e342752a5570350bc3 | def write_projected_dos(self, filename='projected_dos.dat'):
'Write projected DOS to text file.'
self._pdos.write(filename=filename) | Write projected DOS to text file. | phonopy/api_phonopy.py | write_projected_dos | MSimoncelli/phonopy | 127 | python | def write_projected_dos(self, filename='projected_dos.dat'):
self._pdos.write(filename=filename) | def write_projected_dos(self, filename='projected_dos.dat'):
self._pdos.write(filename=filename)<|docstring|>Write projected DOS to text file.<|endoftext|> |
0b01508012eb44d9f9d5847c12b57e1c8bd0e5bd3613e71e2d3c22c89a475569 | def run_thermal_properties(self, t_min=0, t_max=1000, t_step=10, temperatures=None, cutoff_frequency=None, pretend_real=False, band_indices=None, is_projection=False):
'Run calculation of thermal properties at constant volume.\n\n In phonopy, imaginary frequencies are represented as negative real\n va... | Run calculation of thermal properties at constant volume.
In phonopy, imaginary frequencies are represented as negative real
value. Under this situation, `cutoff_frequency` is used to ignore
phonon modes that have frequencies less than `cutoff_frequency`.
Parameters
----------
t_min, t_max, t_step : float, optional
... | phonopy/api_phonopy.py | run_thermal_properties | MSimoncelli/phonopy | 127 | python | def run_thermal_properties(self, t_min=0, t_max=1000, t_step=10, temperatures=None, cutoff_frequency=None, pretend_real=False, band_indices=None, is_projection=False):
'Run calculation of thermal properties at constant volume.\n\n In phonopy, imaginary frequencies are represented as negative real\n va... | def run_thermal_properties(self, t_min=0, t_max=1000, t_step=10, temperatures=None, cutoff_frequency=None, pretend_real=False, band_indices=None, is_projection=False):
'Run calculation of thermal properties at constant volume.\n\n In phonopy, imaginary frequencies are represented as negative real\n va... |
9c2b2fcd223251fe42c9b337db51e8a86d0f9c352989d8eb92ca26b112148030 | def set_thermal_properties(self, t_step=10, t_max=1000, t_min=0, temperatures=None, is_projection=False, band_indices=None, cutoff_frequency=None, pretend_real=False):
'Run calculation of thermal properties at constant volume.'
warnings.warn('Phonopy.set_thermal_properties() is deprecated. Use Phonopy.run_therm... | Run calculation of thermal properties at constant volume. | phonopy/api_phonopy.py | set_thermal_properties | MSimoncelli/phonopy | 127 | python | def set_thermal_properties(self, t_step=10, t_max=1000, t_min=0, temperatures=None, is_projection=False, band_indices=None, cutoff_frequency=None, pretend_real=False):
warnings.warn('Phonopy.set_thermal_properties() is deprecated. Use Phonopy.run_thermal_properties()', DeprecationWarning)
self.run_thermal_... | def set_thermal_properties(self, t_step=10, t_max=1000, t_min=0, temperatures=None, is_projection=False, band_indices=None, cutoff_frequency=None, pretend_real=False):
warnings.warn('Phonopy.set_thermal_properties() is deprecated. Use Phonopy.run_thermal_properties()', DeprecationWarning)
self.run_thermal_... |
b323afd985dd982acb8b1111ada85c9df2a207ca6c13e23a358d3e0d59866d2c | def get_thermal_properties_dict(self):
"Return thermal properties.\n\n Returns\n -------\n A dictionary of thermal properties with keys of 'temperatures',\n 'free_energy', 'entropy', and 'heat_capacity'.\n Each value of corresponding key is as follows:\n\n temperatures: nda... | Return thermal properties.
Returns
-------
A dictionary of thermal properties with keys of 'temperatures',
'free_energy', 'entropy', and 'heat_capacity'.
Each value of corresponding key is as follows:
temperatures: ndarray
shape=(temperatures, ), dtype='double'
free_energy : ndarray
shape=(temperatures, ), dt... | phonopy/api_phonopy.py | get_thermal_properties_dict | MSimoncelli/phonopy | 127 | python | def get_thermal_properties_dict(self):
"Return thermal properties.\n\n Returns\n -------\n A dictionary of thermal properties with keys of 'temperatures',\n 'free_energy', 'entropy', and 'heat_capacity'.\n Each value of corresponding key is as follows:\n\n temperatures: nda... | def get_thermal_properties_dict(self):
"Return thermal properties.\n\n Returns\n -------\n A dictionary of thermal properties with keys of 'temperatures',\n 'free_energy', 'entropy', and 'heat_capacity'.\n Each value of corresponding key is as follows:\n\n temperatures: nda... |
65149f778a9df4300d0793342ec5ddbaa2ce0eaa6d9b5421044a3f97b1af28d7 | def get_thermal_properties(self):
'Return thermal properties.\n\n Returns\n -------\n (temperatures, free energy, entropy, heat capacity)\n\n '
warnings.warn('Phonopy.get_thermal_properties() is deprecated. Use Phonopy.get_thermal_properties_dict().', DeprecationWarning)
tp = sel... | Return thermal properties.
Returns
-------
(temperatures, free energy, entropy, heat capacity) | phonopy/api_phonopy.py | get_thermal_properties | MSimoncelli/phonopy | 127 | python | def get_thermal_properties(self):
'Return thermal properties.\n\n Returns\n -------\n (temperatures, free energy, entropy, heat capacity)\n\n '
warnings.warn('Phonopy.get_thermal_properties() is deprecated. Use Phonopy.get_thermal_properties_dict().', DeprecationWarning)
tp = sel... | def get_thermal_properties(self):
'Return thermal properties.\n\n Returns\n -------\n (temperatures, free energy, entropy, heat capacity)\n\n '
warnings.warn('Phonopy.get_thermal_properties() is deprecated. Use Phonopy.get_thermal_properties_dict().', DeprecationWarning)
tp = sel... |
bb4938359100c0f3ed4f64bd1d9cbd6d45a6b61a3da7504c96a6f79427db8e17 | def plot_thermal_properties(self):
'Plot thermal properties.'
import matplotlib.pyplot as plt
plt.rcParams['pdf.fonttype'] = 42
plt.rcParams['font.family'] = 'serif'
(fig, ax) = plt.subplots()
ax.xaxis.set_ticks_position('both')
ax.yaxis.set_ticks_position('both')
ax.xaxis.set_tick_param... | Plot thermal properties. | phonopy/api_phonopy.py | plot_thermal_properties | MSimoncelli/phonopy | 127 | python | def plot_thermal_properties(self):
import matplotlib.pyplot as plt
plt.rcParams['pdf.fonttype'] = 42
plt.rcParams['font.family'] = 'serif'
(fig, ax) = plt.subplots()
ax.xaxis.set_ticks_position('both')
ax.yaxis.set_ticks_position('both')
ax.xaxis.set_tick_params(which='both', direction=... | def plot_thermal_properties(self):
import matplotlib.pyplot as plt
plt.rcParams['pdf.fonttype'] = 42
plt.rcParams['font.family'] = 'serif'
(fig, ax) = plt.subplots()
ax.xaxis.set_ticks_position('both')
ax.yaxis.set_ticks_position('both')
ax.xaxis.set_tick_params(which='both', direction=... |
7e8af564d7ee021422339ce57b7f8aa5b520f22c9573b0dd3dd45f6e65e1cf56 | def write_yaml_thermal_properties(self, filename='thermal_properties.yaml'):
'Write thermal properties in yaml format.'
self._thermal_properties.write_yaml(filename=filename) | Write thermal properties in yaml format. | phonopy/api_phonopy.py | write_yaml_thermal_properties | MSimoncelli/phonopy | 127 | python | def write_yaml_thermal_properties(self, filename='thermal_properties.yaml'):
self._thermal_properties.write_yaml(filename=filename) | def write_yaml_thermal_properties(self, filename='thermal_properties.yaml'):
self._thermal_properties.write_yaml(filename=filename)<|docstring|>Write thermal properties in yaml format.<|endoftext|> |
99586db9493c7f1b80ead26e895026a5cb75c9f46749f47ca59d41c12d5bfff2 | def run_thermal_displacements(self, t_min=0, t_max=1000, t_step=10, temperatures=None, direction=None, freq_min=None, freq_max=None):
'Run thermal displacements calculation.\n\n Parameters\n ----------\n t_min, t_max, t_step : float, optional\n Minimum and maximum temperatures and th... | Run thermal displacements calculation.
Parameters
----------
t_min, t_max, t_step : float, optional
Minimum and maximum temperatures and the interval in this
temperature range. Default valuues are 0, 1000, and 10.
temperatures : array_like, optional
Temperature points where thermal properties are calculate... | phonopy/api_phonopy.py | run_thermal_displacements | MSimoncelli/phonopy | 127 | python | def run_thermal_displacements(self, t_min=0, t_max=1000, t_step=10, temperatures=None, direction=None, freq_min=None, freq_max=None):
'Run thermal displacements calculation.\n\n Parameters\n ----------\n t_min, t_max, t_step : float, optional\n Minimum and maximum temperatures and th... | def run_thermal_displacements(self, t_min=0, t_max=1000, t_step=10, temperatures=None, direction=None, freq_min=None, freq_max=None):
'Run thermal displacements calculation.\n\n Parameters\n ----------\n t_min, t_max, t_step : float, optional\n Minimum and maximum temperatures and th... |
dd2f1a4606c4aa93752a129b1e13f2ff356bd6d685eae01ce8c0f212b9aa9a75 | def set_thermal_displacements(self, t_step=10, t_max=1000, t_min=0, temperatures=None, direction=None, freq_min=None, freq_max=None):
'Run thermal displacements calculation.'
warnings.warn('Phonopy.set_thermal_displacements() is deprecated. Use Phonopy.run_thermal_displacements()', DeprecationWarning)
self.... | Run thermal displacements calculation. | phonopy/api_phonopy.py | set_thermal_displacements | MSimoncelli/phonopy | 127 | python | def set_thermal_displacements(self, t_step=10, t_max=1000, t_min=0, temperatures=None, direction=None, freq_min=None, freq_max=None):
warnings.warn('Phonopy.set_thermal_displacements() is deprecated. Use Phonopy.run_thermal_displacements()', DeprecationWarning)
self.run_thermal_displacements(t_min=t_min, t... | def set_thermal_displacements(self, t_step=10, t_max=1000, t_min=0, temperatures=None, direction=None, freq_min=None, freq_max=None):
warnings.warn('Phonopy.set_thermal_displacements() is deprecated. Use Phonopy.run_thermal_displacements()', DeprecationWarning)
self.run_thermal_displacements(t_min=t_min, t... |
231673e96a305ee0ab32f6d404f97f3f843f3e9c45615b83dceec38e0ca78813 | def get_thermal_displacements_dict(self):
'Return thermal displacements.'
if (self._thermal_displacements is None):
msg = 'run_thermal_displacements has to be done.'
raise RuntimeError(msg)
td = self._thermal_displacements
return {'temperatures': td.temperatures, 'thermal_displacements':... | Return thermal displacements. | phonopy/api_phonopy.py | get_thermal_displacements_dict | MSimoncelli/phonopy | 127 | python | def get_thermal_displacements_dict(self):
if (self._thermal_displacements is None):
msg = 'run_thermal_displacements has to be done.'
raise RuntimeError(msg)
td = self._thermal_displacements
return {'temperatures': td.temperatures, 'thermal_displacements': td.thermal_displacements} | def get_thermal_displacements_dict(self):
if (self._thermal_displacements is None):
msg = 'run_thermal_displacements has to be done.'
raise RuntimeError(msg)
td = self._thermal_displacements
return {'temperatures': td.temperatures, 'thermal_displacements': td.thermal_displacements}<|doc... |
72c1243a442e0b0bccc230b4370cc06fa326911a1f66c9d4c26173d5cb3e6904 | def get_thermal_displacements(self):
'Return thermal displacements.'
warnings.warn('Phonopy.get_thermal_displacements() is deprecated. Use Phonopy.get_thermal_displacements_dict()', DeprecationWarning)
td = self.get_thermal_displacements_dict()
return (td['temperatures'], td['thermal_displacements']) | Return thermal displacements. | phonopy/api_phonopy.py | get_thermal_displacements | MSimoncelli/phonopy | 127 | python | def get_thermal_displacements(self):
warnings.warn('Phonopy.get_thermal_displacements() is deprecated. Use Phonopy.get_thermal_displacements_dict()', DeprecationWarning)
td = self.get_thermal_displacements_dict()
return (td['temperatures'], td['thermal_displacements']) | def get_thermal_displacements(self):
warnings.warn('Phonopy.get_thermal_displacements() is deprecated. Use Phonopy.get_thermal_displacements_dict()', DeprecationWarning)
td = self.get_thermal_displacements_dict()
return (td['temperatures'], td['thermal_displacements'])<|docstring|>Return thermal displa... |
fbccf5b4693555f5d1213a81df67943a93b76c4c74fd17f45df3ac0da0c37327 | def plot_thermal_displacements(self, is_legend=False):
'Plot thermal displacements.'
import matplotlib.pyplot as plt
(fig, ax) = plt.subplots()
ax.xaxis.set_ticks_position('both')
ax.yaxis.set_ticks_position('both')
ax.xaxis.set_tick_params(which='both', direction='in')
ax.yaxis.set_tick_par... | Plot thermal displacements. | phonopy/api_phonopy.py | plot_thermal_displacements | MSimoncelli/phonopy | 127 | python | def plot_thermal_displacements(self, is_legend=False):
import matplotlib.pyplot as plt
(fig, ax) = plt.subplots()
ax.xaxis.set_ticks_position('both')
ax.yaxis.set_ticks_position('both')
ax.xaxis.set_tick_params(which='both', direction='in')
ax.yaxis.set_tick_params(which='both', direction='... | def plot_thermal_displacements(self, is_legend=False):
import matplotlib.pyplot as plt
(fig, ax) = plt.subplots()
ax.xaxis.set_ticks_position('both')
ax.yaxis.set_ticks_position('both')
ax.xaxis.set_tick_params(which='both', direction='in')
ax.yaxis.set_tick_params(which='both', direction='... |
79fa3240e3f7585612f63f282689db0460c62525849a4282495e30de89150d0f | def write_yaml_thermal_displacements(self):
'Write thermal displacements in yaml format.'
self._thermal_displacements.write_yaml() | Write thermal displacements in yaml format. | phonopy/api_phonopy.py | write_yaml_thermal_displacements | MSimoncelli/phonopy | 127 | python | def write_yaml_thermal_displacements(self):
self._thermal_displacements.write_yaml() | def write_yaml_thermal_displacements(self):
self._thermal_displacements.write_yaml()<|docstring|>Write thermal displacements in yaml format.<|endoftext|> |
c735b1d0f1a267bb7ce827db5dd4ff753efd08027ef52891caea50fc768bd837 | def run_thermal_displacement_matrices(self, t_min=0, t_max=1000, t_step=10, temperatures=None, freq_min=None, freq_max=None):
'Run thermal displacement matrices calculation.\n\n Parameters\n ----------\n t_min, t_max, t_step : float, optional\n Minimum and maximum temperatures and th... | Run thermal displacement matrices calculation.
Parameters
----------
t_min, t_max, t_step : float, optional
Minimum and maximum temperatures and the interval in this
temperature range. Default valuues are 0, 1000, and 10.
freq_min, freq_max : float, optional
Phonon frequencies larger than freq_min and smal... | phonopy/api_phonopy.py | run_thermal_displacement_matrices | MSimoncelli/phonopy | 127 | python | def run_thermal_displacement_matrices(self, t_min=0, t_max=1000, t_step=10, temperatures=None, freq_min=None, freq_max=None):
'Run thermal displacement matrices calculation.\n\n Parameters\n ----------\n t_min, t_max, t_step : float, optional\n Minimum and maximum temperatures and th... | def run_thermal_displacement_matrices(self, t_min=0, t_max=1000, t_step=10, temperatures=None, freq_min=None, freq_max=None):
'Run thermal displacement matrices calculation.\n\n Parameters\n ----------\n t_min, t_max, t_step : float, optional\n Minimum and maximum temperatures and th... |
84320f8f885703caabdbee6316873b4c04b79e8aac94b222631aedf12c37aa3e | def set_thermal_displacement_matrices(self, t_step=10, t_max=1000, t_min=0, freq_min=None, freq_max=None, t_cif=None):
'Run thermal displacement matrices calculation.'
warnings.warn('Phonopy.set_thermal_displacement_matrices() is deprecated. Use Phonopy.run_thermal_displacements()', DeprecationWarning)
if (... | Run thermal displacement matrices calculation. | phonopy/api_phonopy.py | set_thermal_displacement_matrices | MSimoncelli/phonopy | 127 | python | def set_thermal_displacement_matrices(self, t_step=10, t_max=1000, t_min=0, freq_min=None, freq_max=None, t_cif=None):
warnings.warn('Phonopy.set_thermal_displacement_matrices() is deprecated. Use Phonopy.run_thermal_displacements()', DeprecationWarning)
if (t_cif is None):
temperatures = None
... | def set_thermal_displacement_matrices(self, t_step=10, t_max=1000, t_min=0, freq_min=None, freq_max=None, t_cif=None):
warnings.warn('Phonopy.set_thermal_displacement_matrices() is deprecated. Use Phonopy.run_thermal_displacements()', DeprecationWarning)
if (t_cif is None):
temperatures = None
... |
dd8835495b882fccc8d3daeed2438b7503ffc3d02b4f758a252f7abc285acb74 | def get_thermal_displacement_matrices_dict(self):
'Return thermal displacement matrices.'
if (self._thermal_displacement_matrices is None):
msg = 'run_thermal_displacement_matrices has to be done.'
raise RuntimeError(msg)
tdm = self._thermal_displacement_matrices
return {'temperatures': ... | Return thermal displacement matrices. | phonopy/api_phonopy.py | get_thermal_displacement_matrices_dict | MSimoncelli/phonopy | 127 | python | def get_thermal_displacement_matrices_dict(self):
if (self._thermal_displacement_matrices is None):
msg = 'run_thermal_displacement_matrices has to be done.'
raise RuntimeError(msg)
tdm = self._thermal_displacement_matrices
return {'temperatures': tdm.temperatures, 'thermal_displacement... | def get_thermal_displacement_matrices_dict(self):
if (self._thermal_displacement_matrices is None):
msg = 'run_thermal_displacement_matrices has to be done.'
raise RuntimeError(msg)
tdm = self._thermal_displacement_matrices
return {'temperatures': tdm.temperatures, 'thermal_displacement... |
e51f0071e123c0afb5f6daa7718e2de1e10102092cea619ed6abff84b1fe93ed | def get_thermal_displacement_matrices(self):
'Return thermal displacement matrices.'
warnings.warn('Phonopy.get_thermal_displacement_matrices() is deprecated. Use Phonopy.get_thermal_displacement_matrices_dict()', DeprecationWarning)
tdm = self.get_thermal_displacement_matrices_dict()
return (tdm['tempe... | Return thermal displacement matrices. | phonopy/api_phonopy.py | get_thermal_displacement_matrices | MSimoncelli/phonopy | 127 | python | def get_thermal_displacement_matrices(self):
warnings.warn('Phonopy.get_thermal_displacement_matrices() is deprecated. Use Phonopy.get_thermal_displacement_matrices_dict()', DeprecationWarning)
tdm = self.get_thermal_displacement_matrices_dict()
return (tdm['temperatures'], tdm['thermal_displacement_ma... | def get_thermal_displacement_matrices(self):
warnings.warn('Phonopy.get_thermal_displacement_matrices() is deprecated. Use Phonopy.get_thermal_displacement_matrices_dict()', DeprecationWarning)
tdm = self.get_thermal_displacement_matrices_dict()
return (tdm['temperatures'], tdm['thermal_displacement_ma... |
98fd66005c12213837cce2745f35ea0e3080780d034183f27ab64d9483d4cc58 | def write_yaml_thermal_displacement_matrices(self):
'Write thermal displacement matrices in yaml format.'
self._thermal_displacement_matrices.write_yaml() | Write thermal displacement matrices in yaml format. | phonopy/api_phonopy.py | write_yaml_thermal_displacement_matrices | MSimoncelli/phonopy | 127 | python | def write_yaml_thermal_displacement_matrices(self):
self._thermal_displacement_matrices.write_yaml() | def write_yaml_thermal_displacement_matrices(self):
self._thermal_displacement_matrices.write_yaml()<|docstring|>Write thermal displacement matrices in yaml format.<|endoftext|> |
d149d80a042a6dbe5a837a2afa4fcadc860ff30263f17e6efcde472080f1360f | def write_thermal_displacement_matrix_to_cif(self, temperature_index):
'Write thermal displacement matrices at a termperature in cif.'
self._thermal_displacement_matrices.write_cif(self._primitive, temperature_index) | Write thermal displacement matrices at a termperature in cif. | phonopy/api_phonopy.py | write_thermal_displacement_matrix_to_cif | MSimoncelli/phonopy | 127 | python | def write_thermal_displacement_matrix_to_cif(self, temperature_index):
self._thermal_displacement_matrices.write_cif(self._primitive, temperature_index) | def write_thermal_displacement_matrix_to_cif(self, temperature_index):
self._thermal_displacement_matrices.write_cif(self._primitive, temperature_index)<|docstring|>Write thermal displacement matrices at a termperature in cif.<|endoftext|> |
2f7f358f4e4595beb4dcaf0af88d7c59d171f1ad092ad4aee02bbc6cd2def2f6 | def write_animation(self, q_point=None, anime_type='v_sim', band_index=None, amplitude=None, num_div=None, shift=None, filename=None):
'Write atomic modulations in animation format.\n\n Returns\n -------\n str\n Output filename.\n\n '
if (self._dynamical_matrix is None):
... | Write atomic modulations in animation format.
Returns
-------
str
Output filename. | phonopy/api_phonopy.py | write_animation | MSimoncelli/phonopy | 127 | python | def write_animation(self, q_point=None, anime_type='v_sim', band_index=None, amplitude=None, num_div=None, shift=None, filename=None):
'Write atomic modulations in animation format.\n\n Returns\n -------\n str\n Output filename.\n\n '
if (self._dynamical_matrix is None):
... | def write_animation(self, q_point=None, anime_type='v_sim', band_index=None, amplitude=None, num_div=None, shift=None, filename=None):
'Write atomic modulations in animation format.\n\n Returns\n -------\n str\n Output filename.\n\n '
if (self._dynamical_matrix is None):
... |
1676910c67affdfe7eb019d965b162b85c5324874da0199461981be11f44caa9 | def set_modulations(self, dimension, phonon_modes, delta_q=None, derivative_order=None, nac_q_direction=None):
"Generate atomic displacements of phonon modes.\n\n The design of this feature is not very satisfactory, and thus API.\n Therefore it should be reconsidered someday in the fugure.\n\n ... | Generate atomic displacements of phonon modes.
The design of this feature is not very satisfactory, and thus API.
Therefore it should be reconsidered someday in the fugure.
Parameters
----------
dimension : array_like
Supercell dimension with respect to the primitive cell.
dtype='intc', shape=(3, ), (3, 3), (... | phonopy/api_phonopy.py | set_modulations | MSimoncelli/phonopy | 127 | python | def set_modulations(self, dimension, phonon_modes, delta_q=None, derivative_order=None, nac_q_direction=None):
"Generate atomic displacements of phonon modes.\n\n The design of this feature is not very satisfactory, and thus API.\n Therefore it should be reconsidered someday in the fugure.\n\n ... | def set_modulations(self, dimension, phonon_modes, delta_q=None, derivative_order=None, nac_q_direction=None):
"Generate atomic displacements of phonon modes.\n\n The design of this feature is not very satisfactory, and thus API.\n Therefore it should be reconsidered someday in the fugure.\n\n ... |
7382918e72036438972e5d62e10b31480884e18882554a1524dc4c4e10a6c366 | def get_modulated_supercells(self):
'Return cells with atom modulations.\n\n list of PhonopyAtoms\n Modulated structures.\n\n '
return self._modulation.get_modulated_supercells() | Return cells with atom modulations.
list of PhonopyAtoms
Modulated structures. | phonopy/api_phonopy.py | get_modulated_supercells | MSimoncelli/phonopy | 127 | python | def get_modulated_supercells(self):
'Return cells with atom modulations.\n\n list of PhonopyAtoms\n Modulated structures.\n\n '
return self._modulation.get_modulated_supercells() | def get_modulated_supercells(self):
'Return cells with atom modulations.\n\n list of PhonopyAtoms\n Modulated structures.\n\n '
return self._modulation.get_modulated_supercells()<|docstring|>Return cells with atom modulations.
list of PhonopyAtoms
Modulated structures.<|endoftext|> |
4aef07769f98604b9201660b2b6dc8d5ae204e5c58891458b2bb2c6b9a3f3477 | def get_modulations_and_supercell(self):
'Return atomic modulations and perfect supercell.\n\n (modulations, supercell)\n\n modulations: Atomic modulations of supercell in Cartesian coordinates\n supercell: Supercell as an PhonopyAtoms instance.\n\n '
return self._modulation.get_modu... | Return atomic modulations and perfect supercell.
(modulations, supercell)
modulations: Atomic modulations of supercell in Cartesian coordinates
supercell: Supercell as an PhonopyAtoms instance. | phonopy/api_phonopy.py | get_modulations_and_supercell | MSimoncelli/phonopy | 127 | python | def get_modulations_and_supercell(self):
'Return atomic modulations and perfect supercell.\n\n (modulations, supercell)\n\n modulations: Atomic modulations of supercell in Cartesian coordinates\n supercell: Supercell as an PhonopyAtoms instance.\n\n '
return self._modulation.get_modu... | def get_modulations_and_supercell(self):
'Return atomic modulations and perfect supercell.\n\n (modulations, supercell)\n\n modulations: Atomic modulations of supercell in Cartesian coordinates\n supercell: Supercell as an PhonopyAtoms instance.\n\n '
return self._modulation.get_modu... |
39f4d888c28c6e4b88249e88c545d4797dfd6e7f1169d7a40de516fa23cea4f8 | def write_modulations(self):
"Write modulated structures to MPOSCAR's."
self._modulation.write() | Write modulated structures to MPOSCAR's. | phonopy/api_phonopy.py | write_modulations | MSimoncelli/phonopy | 127 | python | def write_modulations(self):
self._modulation.write() | def write_modulations(self):
self._modulation.write()<|docstring|>Write modulated structures to MPOSCAR's.<|endoftext|> |
7c3c420acd8520782fc885eb42be352934e76bb5f10ab0bc7b95ae6783ab7c8b | def write_yaml_modulations(self):
'Write atomic modulations in yaml format.'
self._modulation.write_yaml() | Write atomic modulations in yaml format. | phonopy/api_phonopy.py | write_yaml_modulations | MSimoncelli/phonopy | 127 | python | def write_yaml_modulations(self):
self._modulation.write_yaml() | def write_yaml_modulations(self):
self._modulation.write_yaml()<|docstring|>Write atomic modulations in yaml format.<|endoftext|> |
8de660515469cce8d2d1b937ceb9fdfb2129e964425f845674d9eaec4b50dc98 | def set_irreps(self, q, is_little_cogroup=False, nac_q_direction=None, degeneracy_tolerance=0.0001):
"Identify ir-reps of phonon modes.\n\n The design of this API is not very satisfactory and is expceted\n to be redesined in the next major versions once the use case\n of the API for ir-reps fea... | Identify ir-reps of phonon modes.
The design of this API is not very satisfactory and is expceted
to be redesined in the next major versions once the use case
of the API for ir-reps feature becomes clearer.
nac_q_direction : array_like
q-point direction from Gamma-point in fractional coordinates of
reciprocal... | phonopy/api_phonopy.py | set_irreps | MSimoncelli/phonopy | 127 | python | def set_irreps(self, q, is_little_cogroup=False, nac_q_direction=None, degeneracy_tolerance=0.0001):
"Identify ir-reps of phonon modes.\n\n The design of this API is not very satisfactory and is expceted\n to be redesined in the next major versions once the use case\n of the API for ir-reps fea... | def set_irreps(self, q, is_little_cogroup=False, nac_q_direction=None, degeneracy_tolerance=0.0001):
"Identify ir-reps of phonon modes.\n\n The design of this API is not very satisfactory and is expceted\n to be redesined in the next major versions once the use case\n of the API for ir-reps fea... |
1197f792515d2c96cdd7f0d7942c0a1d3221cb29e0115ccaf40c8f07a4ff1a14 | def get_irreps(self):
'Return Ir-reps.'
return self._irreps | Return Ir-reps. | phonopy/api_phonopy.py | get_irreps | MSimoncelli/phonopy | 127 | python | def get_irreps(self):
return self._irreps | def get_irreps(self):
return self._irreps<|docstring|>Return Ir-reps.<|endoftext|> |
30fea80d2dbda8e07148a144391da6dac1a2be08d9b20e4b37a55978ef81f66a | def show_irreps(self, show_irreps=False):
'Show Ir-reps.'
self._irreps.show(show_irreps=show_irreps) | Show Ir-reps. | phonopy/api_phonopy.py | show_irreps | MSimoncelli/phonopy | 127 | python | def show_irreps(self, show_irreps=False):
self._irreps.show(show_irreps=show_irreps) | def show_irreps(self, show_irreps=False):
self._irreps.show(show_irreps=show_irreps)<|docstring|>Show Ir-reps.<|endoftext|> |
3f41b0b2a26c52a8f99560ed220ab73ed581d854a0f75121c842b2ec64ac929d | def write_yaml_irreps(self, show_irreps=False):
'Write Ir-reps in yaml format.'
self._irreps.write_yaml(show_irreps=show_irreps) | Write Ir-reps in yaml format. | phonopy/api_phonopy.py | write_yaml_irreps | MSimoncelli/phonopy | 127 | python | def write_yaml_irreps(self, show_irreps=False):
self._irreps.write_yaml(show_irreps=show_irreps) | def write_yaml_irreps(self, show_irreps=False):
self._irreps.write_yaml(show_irreps=show_irreps)<|docstring|>Write Ir-reps in yaml format.<|endoftext|> |
c28e70302e17a80bded1ae1d13fc289708ae00f369de2d306c605900108854ec | def set_group_velocity(self, q_length=None):
'Prepare group velocity calculation.'
warnings.warn('Phonopy.set_group_velocity() is deprecated. No need to call this. gv_delta_q (q_length) is set at Phonopy.__init__().', DeprecationWarning)
self._gv_delta_q = q_length
self._set_group_velocity() | Prepare group velocity calculation. | phonopy/api_phonopy.py | set_group_velocity | MSimoncelli/phonopy | 127 | python | def set_group_velocity(self, q_length=None):
warnings.warn('Phonopy.set_group_velocity() is deprecated. No need to call this. gv_delta_q (q_length) is set at Phonopy.__init__().', DeprecationWarning)
self._gv_delta_q = q_length
self._set_group_velocity() | def set_group_velocity(self, q_length=None):
warnings.warn('Phonopy.set_group_velocity() is deprecated. No need to call this. gv_delta_q (q_length) is set at Phonopy.__init__().', DeprecationWarning)
self._gv_delta_q = q_length
self._set_group_velocity()<|docstring|>Prepare group velocity calculation.<... |
0f9f120dcabee806118c2a8e95ea61ef2da30c25e615550481895ddb6dc065ec | def get_group_velocity(self):
'Return group velocities.'
warnings.warn('Phonopy.get_group_velocities_on_bands is deprecated. Use Phonopy.[mode].group_velocities attribute or Phonopy.get_[mode]_dict()[group_velocities], where [mode] is band_structure, mesh, or qpoints.', DeprecationWarning)
return self._grou... | Return group velocities. | phonopy/api_phonopy.py | get_group_velocity | MSimoncelli/phonopy | 127 | python | def get_group_velocity(self):
warnings.warn('Phonopy.get_group_velocities_on_bands is deprecated. Use Phonopy.[mode].group_velocities attribute or Phonopy.get_[mode]_dict()[group_velocities], where [mode] is band_structure, mesh, or qpoints.', DeprecationWarning)
return self._group_velocity.get_group_veloc... | def get_group_velocity(self):
warnings.warn('Phonopy.get_group_velocities_on_bands is deprecated. Use Phonopy.[mode].group_velocities attribute or Phonopy.get_[mode]_dict()[group_velocities], where [mode] is band_structure, mesh, or qpoints.', DeprecationWarning)
return self._group_velocity.get_group_veloc... |
46b3b4db7df431e60fe7f0dea5432e5d24cd46e748b77c12c1dcac1691a2368d | def get_group_velocity_at_q(self, q_point):
'Return group velocity at a q-point.'
if (self._group_velocity is None):
self._set_group_velocity()
self._group_velocity.run([q_point])
return self._group_velocity.group_velocities[0] | Return group velocity at a q-point. | phonopy/api_phonopy.py | get_group_velocity_at_q | MSimoncelli/phonopy | 127 | python | def get_group_velocity_at_q(self, q_point):
if (self._group_velocity is None):
self._set_group_velocity()
self._group_velocity.run([q_point])
return self._group_velocity.group_velocities[0] | def get_group_velocity_at_q(self, q_point):
if (self._group_velocity is None):
self._set_group_velocity()
self._group_velocity.run([q_point])
return self._group_velocity.group_velocities[0]<|docstring|>Return group velocity at a q-point.<|endoftext|> |
635a6b342d6af206c2c4b0fb5d8f9f48762d358a4974280dacade702a7c1a75d | def get_group_velocities_on_bands(self):
'Return group velocities calculated on band structure.'
warnings.warn("Phonopy.get_group_velocities_on_bands is deprecated. Use Phonopy.get_band_structure_dict()['group_velocities'].", DeprecationWarning)
return self._band_structure.group_velocities | Return group velocities calculated on band structure. | phonopy/api_phonopy.py | get_group_velocities_on_bands | MSimoncelli/phonopy | 127 | python | def get_group_velocities_on_bands(self):
warnings.warn("Phonopy.get_group_velocities_on_bands is deprecated. Use Phonopy.get_band_structure_dict()['group_velocities'].", DeprecationWarning)
return self._band_structure.group_velocities | def get_group_velocities_on_bands(self):
warnings.warn("Phonopy.get_group_velocities_on_bands is deprecated. Use Phonopy.get_band_structure_dict()['group_velocities'].", DeprecationWarning)
return self._band_structure.group_velocities<|docstring|>Return group velocities calculated on band structure.<|endof... |
5d88733773f588e75ca376f4a034fbc75d5841a595977f7e882bea047358fd40 | def run_moment(self, order=1, is_projection=False, freq_min=None, freq_max=None):
'Run moment calculation.'
if (self._mesh is None):
msg = 'run_mesh has to be done before run_moment.'
raise RuntimeError(msg)
else:
if is_projection:
if (self._mesh.eigenvectors is None):
... | Run moment calculation. | phonopy/api_phonopy.py | run_moment | MSimoncelli/phonopy | 127 | python | def run_moment(self, order=1, is_projection=False, freq_min=None, freq_max=None):
if (self._mesh is None):
msg = 'run_mesh has to be done before run_moment.'
raise RuntimeError(msg)
else:
if is_projection:
if (self._mesh.eigenvectors is None):
return Runt... | def run_moment(self, order=1, is_projection=False, freq_min=None, freq_max=None):
if (self._mesh is None):
msg = 'run_mesh has to be done before run_moment.'
raise RuntimeError(msg)
else:
if is_projection:
if (self._mesh.eigenvectors is None):
return Runt... |
3d5ec7ac32b81e87938a6eebf8fea98d1faa2e65eefda7c2ef7b4897b64a0caf | def set_moment(self, order=1, is_projection=False, freq_min=None, freq_max=None):
'Run moment calculation.'
warnings.warn('Phonopy.set_moment() is deprecated. Use Phonopy.run_moment().', DeprecationWarning)
self.run_moment(order=order, is_projection=is_projection, freq_min=freq_min, freq_max=freq_max) | Run moment calculation. | phonopy/api_phonopy.py | set_moment | MSimoncelli/phonopy | 127 | python | def set_moment(self, order=1, is_projection=False, freq_min=None, freq_max=None):
warnings.warn('Phonopy.set_moment() is deprecated. Use Phonopy.run_moment().', DeprecationWarning)
self.run_moment(order=order, is_projection=is_projection, freq_min=freq_min, freq_max=freq_max) | def set_moment(self, order=1, is_projection=False, freq_min=None, freq_max=None):
warnings.warn('Phonopy.set_moment() is deprecated. Use Phonopy.run_moment().', DeprecationWarning)
self.run_moment(order=order, is_projection=is_projection, freq_min=freq_min, freq_max=freq_max)<|docstring|>Run moment calcula... |
4e7070005787a9b2c7b1a70b351c4c0c887eca7288c3ffd31fd2cc84e4f12f5c | def get_moment(self):
'Return moment.'
return self._moment.moment | Return moment. | phonopy/api_phonopy.py | get_moment | MSimoncelli/phonopy | 127 | python | def get_moment(self):
return self._moment.moment | def get_moment(self):
return self._moment.moment<|docstring|>Return moment.<|endoftext|> |
27ed1a6febd3ab7949ae1cd5ef85aea427e4bca7197546279a18adeb92f5314c | def init_dynamic_structure_factor(self, Qpoints, T, atomic_form_factor_func=None, scattering_lengths=None, freq_min=None, freq_max=None):
"Initialize dynamic structure factor calculation.\n\n *******************************************************************\n This is still an experimental feature. ... | Initialize dynamic structure factor calculation.
*******************************************************************
This is still an experimental feature. API can be changed without
notification.
*******************************************************************
Need to call DynamicStructureFactor.run() to start ... | phonopy/api_phonopy.py | init_dynamic_structure_factor | MSimoncelli/phonopy | 127 | python | def init_dynamic_structure_factor(self, Qpoints, T, atomic_form_factor_func=None, scattering_lengths=None, freq_min=None, freq_max=None):
"Initialize dynamic structure factor calculation.\n\n *******************************************************************\n This is still an experimental feature. ... | def init_dynamic_structure_factor(self, Qpoints, T, atomic_form_factor_func=None, scattering_lengths=None, freq_min=None, freq_max=None):
"Initialize dynamic structure factor calculation.\n\n *******************************************************************\n This is still an experimental feature. ... |
916462950155feffc3d964146226a798fb3e8258abc8a3790e5bf0b99ba65d30 | def run_dynamic_structure_factor(self, Qpoints, T, atomic_form_factor_func=None, scattering_lengths=None, freq_min=None, freq_max=None):
'Run dynamic structure factor calculation.\n\n See the detail of parameters at\n Phonopy.init_dynamic_structure_factor().\n\n '
self.init_dynamic_structur... | Run dynamic structure factor calculation.
See the detail of parameters at
Phonopy.init_dynamic_structure_factor(). | phonopy/api_phonopy.py | run_dynamic_structure_factor | MSimoncelli/phonopy | 127 | python | def run_dynamic_structure_factor(self, Qpoints, T, atomic_form_factor_func=None, scattering_lengths=None, freq_min=None, freq_max=None):
'Run dynamic structure factor calculation.\n\n See the detail of parameters at\n Phonopy.init_dynamic_structure_factor().\n\n '
self.init_dynamic_structur... | def run_dynamic_structure_factor(self, Qpoints, T, atomic_form_factor_func=None, scattering_lengths=None, freq_min=None, freq_max=None):
'Run dynamic structure factor calculation.\n\n See the detail of parameters at\n Phonopy.init_dynamic_structure_factor().\n\n '
self.init_dynamic_structur... |
9ea3c94ef038f0052f782b2e2bef041b0d1f9b54d0392c92995976bdded626c2 | def set_dynamic_structure_factor(self, Qpoints, T, atomic_form_factor_func=None, scattering_lengths=None, freq_min=None, freq_max=None, run_immediately=True):
'Run dynamic structure factor calculation.'
warnings.warn('Phonopy.set_dynamic_structure_factor() is deprecated. Use Phonopy.run_dynamic_structure_factor... | Run dynamic structure factor calculation. | phonopy/api_phonopy.py | set_dynamic_structure_factor | MSimoncelli/phonopy | 127 | python | def set_dynamic_structure_factor(self, Qpoints, T, atomic_form_factor_func=None, scattering_lengths=None, freq_min=None, freq_max=None, run_immediately=True):
warnings.warn('Phonopy.set_dynamic_structure_factor() is deprecated. Use Phonopy.run_dynamic_structure_factor()', DeprecationWarning)
if run_immedia... | def set_dynamic_structure_factor(self, Qpoints, T, atomic_form_factor_func=None, scattering_lengths=None, freq_min=None, freq_max=None, run_immediately=True):
warnings.warn('Phonopy.set_dynamic_structure_factor() is deprecated. Use Phonopy.run_dynamic_structure_factor()', DeprecationWarning)
if run_immedia... |
f69c9c8cc054690255369e2295e4945d4c110e058a388fbd8a1437852a85dd4e | def get_dynamic_structure_factor(self):
'Return dynamic structure factors.'
return (self._dynamic_structure_factor.qpoints, self._dynamic_structure_factor.dynamic_structure_factors) | Return dynamic structure factors. | phonopy/api_phonopy.py | get_dynamic_structure_factor | MSimoncelli/phonopy | 127 | python | def get_dynamic_structure_factor(self):
return (self._dynamic_structure_factor.qpoints, self._dynamic_structure_factor.dynamic_structure_factors) | def get_dynamic_structure_factor(self):
return (self._dynamic_structure_factor.qpoints, self._dynamic_structure_factor.dynamic_structure_factors)<|docstring|>Return dynamic structure factors.<|endoftext|> |
ad5ae778caff9ecd254a1260445d006b1506bf20b2a6f61fd7a4700cad39f3eb | def run_random_displacements(self, temperature, number_of_snapshots=1, random_seed=None, dist_func=None, cutoff_frequency=None):
"Generate random displacements from phonon structure.\n\n Some more details are written at generate_displacements.\n\n temperature : float\n Temperature.\n ... | Generate random displacements from phonon structure.
Some more details are written at generate_displacements.
temperature : float
Temperature.
number_of_snapshots : int
Number of snapshots with random displacements created.
random_seed : 32bit unsigned int
Random seed.
dist_func : str, None
Harmonic o... | phonopy/api_phonopy.py | run_random_displacements | MSimoncelli/phonopy | 127 | python | def run_random_displacements(self, temperature, number_of_snapshots=1, random_seed=None, dist_func=None, cutoff_frequency=None):
"Generate random displacements from phonon structure.\n\n Some more details are written at generate_displacements.\n\n temperature : float\n Temperature.\n ... | def run_random_displacements(self, temperature, number_of_snapshots=1, random_seed=None, dist_func=None, cutoff_frequency=None):
"Generate random displacements from phonon structure.\n\n Some more details are written at generate_displacements.\n\n temperature : float\n Temperature.\n ... |
f78045dc0b999930ed7c2ca0018d98fcc77decb882b49b3148ff6c5e5906f306 | def save(self, filename='phonopy_params.yaml', settings=None, hdf5_settings=None):
'Save phonopy parameters into file.\n\n Parameters\n ----------\n filename: str, optional\n File name. Default is "phonopy_params.yaml"\n settings: dict, optional\n It is described wh... | Save phonopy parameters into file.
Parameters
----------
filename: str, optional
File name. Default is "phonopy_params.yaml"
settings: dict, optional
It is described which parameters are written out. Only the
settings expected to be updated from the following default
settings are needed to be set in th... | phonopy/api_phonopy.py | save | MSimoncelli/phonopy | 127 | python | def save(self, filename='phonopy_params.yaml', settings=None, hdf5_settings=None):
'Save phonopy parameters into file.\n\n Parameters\n ----------\n filename: str, optional\n File name. Default is "phonopy_params.yaml"\n settings: dict, optional\n It is described wh... | def save(self, filename='phonopy_params.yaml', settings=None, hdf5_settings=None):
'Save phonopy parameters into file.\n\n Parameters\n ----------\n filename: str, optional\n File name. Default is "phonopy_params.yaml"\n settings: dict, optional\n It is described wh... |
9e4f2fa0d16c323683ae8e9572a47e9f5596cd63d3233b35b8ae28e53551f991 | def _build_primitive_cell(self):
'Create primitive cell.\n\n primitive_matrix:\n Relative axes of primitive cell to the input unit cell.\n Relative axes to the supercell is calculated by:\n supercell_matrix^-1 * primitive_matrix\n Therefore primitive cell lattice is fin... | Create primitive cell.
primitive_matrix:
Relative axes of primitive cell to the input unit cell.
Relative axes to the supercell is calculated by:
supercell_matrix^-1 * primitive_matrix
Therefore primitive cell lattice is finally calculated by:
(supercell_lattice * (supercell_matrix)^-1 * primitive_matr... | phonopy/api_phonopy.py | _build_primitive_cell | MSimoncelli/phonopy | 127 | python | def _build_primitive_cell(self):
'Create primitive cell.\n\n primitive_matrix:\n Relative axes of primitive cell to the input unit cell.\n Relative axes to the supercell is calculated by:\n supercell_matrix^-1 * primitive_matrix\n Therefore primitive cell lattice is fin... | def _build_primitive_cell(self):
'Create primitive cell.\n\n primitive_matrix:\n Relative axes of primitive cell to the input unit cell.\n Relative axes to the supercell is calculated by:\n supercell_matrix^-1 * primitive_matrix\n Therefore primitive cell lattice is fin... |
ecb00b43bb7e40e8d1fd1af02b820ff406bf121052c58344208f8aec646942a4 | def test_text_io__stream_wrapper_works(s3):
'Ensure using TextIOWrapper works.'
s3.mkdir('bucket')
with s3.open('bucket/file.txt', 'wb') as fd:
fd.write(u'¯\\_(ツ)_/¯'.encode('utf-16-le'))
with s3.open('bucket/file.txt', 'rb') as fd:
with io.TextIOWrapper(fd, 'utf-16-le') as stream:
... | Ensure using TextIOWrapper works. | s3fs/tests/test_s3fs.py | test_text_io__stream_wrapper_works | xiaoyu-wu/s3fs | 0 | python | def test_text_io__stream_wrapper_works(s3):
s3.mkdir('bucket')
with s3.open('bucket/file.txt', 'wb') as fd:
fd.write(u'¯\\_(ツ)_/¯'.encode('utf-16-le'))
with s3.open('bucket/file.txt', 'rb') as fd:
with io.TextIOWrapper(fd, 'utf-16-le') as stream:
assert (stream.readline() ==... | def test_text_io__stream_wrapper_works(s3):
s3.mkdir('bucket')
with s3.open('bucket/file.txt', 'wb') as fd:
fd.write(u'¯\\_(ツ)_/¯'.encode('utf-16-le'))
with s3.open('bucket/file.txt', 'rb') as fd:
with io.TextIOWrapper(fd, 'utf-16-le') as stream:
assert (stream.readline() ==... |
9c3e1db81b1823fdc4cc6474c25619afd3b873bef7fdcd5a52424412564a3afb | def test_text_io__basic(s3):
'Text mode is now allowed.'
s3.mkdir('bucket')
with s3.open('bucket/file.txt', 'w') as fd:
fd.write(u'¯\\_(ツ)_/¯')
with s3.open('bucket/file.txt', 'r') as fd:
assert (fd.read() == u'¯\\_(ツ)_/¯') | Text mode is now allowed. | s3fs/tests/test_s3fs.py | test_text_io__basic | xiaoyu-wu/s3fs | 0 | python | def test_text_io__basic(s3):
s3.mkdir('bucket')
with s3.open('bucket/file.txt', 'w') as fd:
fd.write(u'¯\\_(ツ)_/¯')
with s3.open('bucket/file.txt', 'r') as fd:
assert (fd.read() == u'¯\\_(ツ)_/¯') | def test_text_io__basic(s3):
s3.mkdir('bucket')
with s3.open('bucket/file.txt', 'w') as fd:
fd.write(u'¯\\_(ツ)_/¯')
with s3.open('bucket/file.txt', 'r') as fd:
assert (fd.read() == u'¯\\_(ツ)_/¯')<|docstring|>Text mode is now allowed.<|endoftext|> |
8567e6752b022408f1378fe38541b8520c0a6ba6c251a95d72ab1e64f9f9dca8 | def test_text_io__override_encoding(s3):
'Allow overriding the default text encoding.'
s3.mkdir('bucket')
with s3.open('bucket/file.txt', 'w', encoding='ibm500') as fd:
fd.write(u'Hello, World!')
with s3.open('bucket/file.txt', 'r', encoding='ibm500') as fd:
assert (fd.read() == u'Hello,... | Allow overriding the default text encoding. | s3fs/tests/test_s3fs.py | test_text_io__override_encoding | xiaoyu-wu/s3fs | 0 | python | def test_text_io__override_encoding(s3):
s3.mkdir('bucket')
with s3.open('bucket/file.txt', 'w', encoding='ibm500') as fd:
fd.write(u'Hello, World!')
with s3.open('bucket/file.txt', 'r', encoding='ibm500') as fd:
assert (fd.read() == u'Hello, World!') | def test_text_io__override_encoding(s3):
s3.mkdir('bucket')
with s3.open('bucket/file.txt', 'w', encoding='ibm500') as fd:
fd.write(u'Hello, World!')
with s3.open('bucket/file.txt', 'r', encoding='ibm500') as fd:
assert (fd.read() == u'Hello, World!')<|docstring|>Allow overriding the de... |
3912d9d401ac5cf388c7872b08e514c6b3934b61f5f193cf88a0fdfd8e291f82 | def test_change_defaults_only_subsequent(monkeypatch):
"Test for Issue #135\n\n Ensure that changing the default block size doesn't affect existing file\n systems that were created using that default. It should only affect file\n systems created after the change.\n "
fs_default = S3FileSystem()
... | Test for Issue #135
Ensure that changing the default block size doesn't affect existing file
systems that were created using that default. It should only affect file
systems created after the change. | s3fs/tests/test_s3fs.py | test_change_defaults_only_subsequent | xiaoyu-wu/s3fs | 0 | python | def test_change_defaults_only_subsequent(monkeypatch):
"Test for Issue #135\n\n Ensure that changing the default block size doesn't affect existing file\n systems that were created using that default. It should only affect file\n systems created after the change.\n "
fs_default = S3FileSystem()
... | def test_change_defaults_only_subsequent(monkeypatch):
"Test for Issue #135\n\n Ensure that changing the default block size doesn't affect existing file\n systems that were created using that default. It should only affect file\n systems created after the change.\n "
fs_default = S3FileSystem()
... |
4ce2ac57616aa61d7b03b13622d9328d7e7d3fdd2323f7f8fd1bba63948c0a8c | def is_query_resultset_updatable(conn, sql_path):
'\n This function is used to check whether the last successful query\n produced editable results.\n\n Args:\n conn: Connection object.\n sql_path: the path to the sql templates\n primary_keys.sql & colu... | This function is used to check whether the last successful query
produced editable results.
Args:
conn: Connection object.
sql_path: the path to the sql templates
primary_keys.sql & columns.sql. | pgAdmin/pgadmin4/web/pgadmin/tools/sqleditor/utils/is_query_resultset_updatable.py | is_query_resultset_updatable | WeilerWebServices/PostgreSQL | 0 | python | def is_query_resultset_updatable(conn, sql_path):
'\n This function is used to check whether the last successful query\n produced editable results.\n\n Args:\n conn: Connection object.\n sql_path: the path to the sql templates\n primary_keys.sql & colu... | def is_query_resultset_updatable(conn, sql_path):
'\n This function is used to check whether the last successful query\n produced editable results.\n\n Args:\n conn: Connection object.\n sql_path: the path to the sql templates\n primary_keys.sql & colu... |
4c63c0fd7da12d0e8d20790cce8b3f464cd1083b8572d101696e3bee9c70bc29 | def _check_all_primary_keys_exist(primary_keys_columns, columns_info):
'\n Check that all primary keys exist.\n\n If another column is selected with the same name as the primary key\n before the primary key (e.g SELECT some_col as pk, pk from table) the\n name of the actual primary key c... | Check that all primary keys exist.
If another column is selected with the same name as the primary key
before the primary key (e.g SELECT some_col as pk, pk from table) the
name of the actual primary key column gets changed to pk-2.
This is also reversed here. | pgAdmin/pgadmin4/web/pgadmin/tools/sqleditor/utils/is_query_resultset_updatable.py | _check_all_primary_keys_exist | WeilerWebServices/PostgreSQL | 0 | python | def _check_all_primary_keys_exist(primary_keys_columns, columns_info):
'\n Check that all primary keys exist.\n\n If another column is selected with the same name as the primary key\n before the primary key (e.g SELECT some_col as pk, pk from table) the\n name of the actual primary key c... | def _check_all_primary_keys_exist(primary_keys_columns, columns_info):
'\n Check that all primary keys exist.\n\n If another column is selected with the same name as the primary key\n before the primary key (e.g SELECT some_col as pk, pk from table) the\n name of the actual primary key c... |
9614c935ae5826ea66a02c4ab74c9cb217142cae92791ccf34f000f7af2dc486 | def __init__(self, import_path):
'main function of this class\n Parameters\n ----------\n import_path : str\n defines file to import (csv sheet)\n '
imported_data = self.import_CSV(import_path)
length = len(imported_data)
print('{} was imported - {} lines'.format(i... | main function of this class
Parameters
----------
import_path : str
defines file to import (csv sheet) | jwql/instrument_monitors/nirspec_monitors/data_trending/utils/csv_to_AstropyTable.py | __init__ | cracraft/jwql | 42 | python | def __init__(self, import_path):
'main function of this class\n Parameters\n ----------\n import_path : str\n defines file to import (csv sheet)\n '
imported_data = self.import_CSV(import_path)
length = len(imported_data)
print('{} was imported - {} lines'.format(i... | def __init__(self, import_path):
'main function of this class\n Parameters\n ----------\n import_path : str\n defines file to import (csv sheet)\n '
imported_data = self.import_CSV(import_path)
length = len(imported_data)
print('{} was imported - {} lines'.format(i... |
fbdc066836e21dd218604601a9c7dcdae8f15a2dd0799752113d8d9856f7cc8c | def import_CSV(self, path):
'imports csv sheet and converts it to AstropyTable\n Parameters\n ----------\n path : str\n defines path to file to import\n Return\n ------\n imported_data : AstropyTable\n container for imported data\n '
importe... | imports csv sheet and converts it to AstropyTable
Parameters
----------
path : str
defines path to file to import
Return
------
imported_data : AstropyTable
container for imported data | jwql/instrument_monitors/nirspec_monitors/data_trending/utils/csv_to_AstropyTable.py | import_CSV | cracraft/jwql | 42 | python | def import_CSV(self, path):
'imports csv sheet and converts it to AstropyTable\n Parameters\n ----------\n path : str\n defines path to file to import\n Return\n ------\n imported_data : AstropyTable\n container for imported data\n '
importe... | def import_CSV(self, path):
'imports csv sheet and converts it to AstropyTable\n Parameters\n ----------\n path : str\n defines path to file to import\n Return\n ------\n imported_data : AstropyTable\n container for imported data\n '
importe... |
4540f625b3d1c6dda6fd36a7e83e83265abc9b46cccaefd22dcf7e9a5caa73a3 | def mnemonic(self, name):
'Returns table of one single mnemonic\n Parameters\n ----------\n name : str\n name of mnemonic\n Return\n ------\n __mnemonic_dict[name] : AstropyTable\n corresponding table to mnemonic name\n '
try:
return... | Returns table of one single mnemonic
Parameters
----------
name : str
name of mnemonic
Return
------
__mnemonic_dict[name] : AstropyTable
corresponding table to mnemonic name | jwql/instrument_monitors/nirspec_monitors/data_trending/utils/csv_to_AstropyTable.py | mnemonic | cracraft/jwql | 42 | python | def mnemonic(self, name):
'Returns table of one single mnemonic\n Parameters\n ----------\n name : str\n name of mnemonic\n Return\n ------\n __mnemonic_dict[name] : AstropyTable\n corresponding table to mnemonic name\n '
try:
return... | def mnemonic(self, name):
'Returns table of one single mnemonic\n Parameters\n ----------\n name : str\n name of mnemonic\n Return\n ------\n __mnemonic_dict[name] : AstropyTable\n corresponding table to mnemonic name\n '
try:
return... |
9a5c282dbee542049cceed5e2d367f8742e57d1a859481c2afde1ce5d1388668 | def sort_mnemonic(self, mnemonic, table):
'Looks for all values in table with identifier "mnemonic"\n Converts time string to mjd format\n Parameters\n ----------\n mnemonic : str\n identifies which mnemonic to look for\n table : AstropyTable\n table that ... | Looks for all values in table with identifier "mnemonic"
Converts time string to mjd format
Parameters
----------
mnemonic : str
identifies which mnemonic to look for
table : AstropyTable
table that stores mnemonics and data
Return
------
mnemonic_table : AstropyTable
stores all data associated with iden... | jwql/instrument_monitors/nirspec_monitors/data_trending/utils/csv_to_AstropyTable.py | sort_mnemonic | cracraft/jwql | 42 | python | def sort_mnemonic(self, mnemonic, table):
'Looks for all values in table with identifier "mnemonic"\n Converts time string to mjd format\n Parameters\n ----------\n mnemonic : str\n identifies which mnemonic to look for\n table : AstropyTable\n table that ... | def sort_mnemonic(self, mnemonic, table):
'Looks for all values in table with identifier "mnemonic"\n Converts time string to mjd format\n Parameters\n ----------\n mnemonic : str\n identifies which mnemonic to look for\n table : AstropyTable\n table that ... |
b8bf0a1d55955871cd4685c4de96946ccac11aa904dd7a3550cafb816087fb7f | def __init__(self, **kwargs) -> None:
'\n base class for storing general properties of the dataset which is saved on disk\n '
super().__init__(**kwargs) | base class for storing general properties of the dataset which is saved on disk | ivy_builder/specs/spec.py | __init__ | ivy-dl/builder | 1 | python | def __init__(self, **kwargs) -> None:
'\n \n '
super().__init__(**kwargs) | def __init__(self, **kwargs) -> None:
'\n \n '
super().__init__(**kwargs)<|docstring|>base class for storing general properties of the dataset which is saved on disk<|endoftext|> |
ddd62eed33473b298a75f7b4a9e2d35cd0e91cdefe48d1defde8839f873d518e | def __init__(self, input_definition=None, output_definition=None, retry_count=None, retry_delay=None, retry_policy='Fixed', timeout=None, timeout_policy='Timeout', local_vars_configuration=None):
'WorkflowPropertiesAllOf - a model defined in OpenAPI'
if (local_vars_configuration is None):
local_vars_con... | WorkflowPropertiesAllOf - a model defined in OpenAPI | intersight/models/workflow_properties_all_of.py | __init__ | sdnit-se/intersight-python | 21 | python | def __init__(self, input_definition=None, output_definition=None, retry_count=None, retry_delay=None, retry_policy='Fixed', timeout=None, timeout_policy='Timeout', local_vars_configuration=None):
if (local_vars_configuration is None):
local_vars_configuration = Configuration()
self.local_vars_confi... | def __init__(self, input_definition=None, output_definition=None, retry_count=None, retry_delay=None, retry_policy='Fixed', timeout=None, timeout_policy='Timeout', local_vars_configuration=None):
if (local_vars_configuration is None):
local_vars_configuration = Configuration()
self.local_vars_confi... |
1d6e1069a66bf337722929ba4dee570ea03b1f9292b05c6a5c493897ddab2731 | @property
def input_definition(self):
'Gets the input_definition of this WorkflowPropertiesAllOf. # noqa: E501\n\n\n :return: The input_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: list[WorkflowBaseDataType]\n '
return self._input_definition | Gets the input_definition of this WorkflowPropertiesAllOf. # noqa: E501
:return: The input_definition of this WorkflowPropertiesAllOf. # noqa: E501
:rtype: list[WorkflowBaseDataType] | intersight/models/workflow_properties_all_of.py | input_definition | sdnit-se/intersight-python | 21 | python | @property
def input_definition(self):
'Gets the input_definition of this WorkflowPropertiesAllOf. # noqa: E501\n\n\n :return: The input_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: list[WorkflowBaseDataType]\n '
return self._input_definition | @property
def input_definition(self):
'Gets the input_definition of this WorkflowPropertiesAllOf. # noqa: E501\n\n\n :return: The input_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: list[WorkflowBaseDataType]\n '
return self._input_definition<|docstring|>Gets the inpu... |
ddda4b5b3ad71b4334449c938b6fa29099b94ae2ba608f38c07118b5d3b7ecb3 | @input_definition.setter
def input_definition(self, input_definition):
'Sets the input_definition of this WorkflowPropertiesAllOf.\n\n\n :param input_definition: The input_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :type: list[WorkflowBaseDataType]\n '
self._input_definitio... | Sets the input_definition of this WorkflowPropertiesAllOf.
:param input_definition: The input_definition of this WorkflowPropertiesAllOf. # noqa: E501
:type: list[WorkflowBaseDataType] | intersight/models/workflow_properties_all_of.py | input_definition | sdnit-se/intersight-python | 21 | python | @input_definition.setter
def input_definition(self, input_definition):
'Sets the input_definition of this WorkflowPropertiesAllOf.\n\n\n :param input_definition: The input_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :type: list[WorkflowBaseDataType]\n '
self._input_definitio... | @input_definition.setter
def input_definition(self, input_definition):
'Sets the input_definition of this WorkflowPropertiesAllOf.\n\n\n :param input_definition: The input_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :type: list[WorkflowBaseDataType]\n '
self._input_definitio... |
dcec520b678c99bb679da39c015d94553d8c68ba535cdb68c5bc2ad41fe0f053 | @property
def output_definition(self):
'Gets the output_definition of this WorkflowPropertiesAllOf. # noqa: E501\n\n\n :return: The output_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: list[WorkflowBaseDataType]\n '
return self._output_definition | Gets the output_definition of this WorkflowPropertiesAllOf. # noqa: E501
:return: The output_definition of this WorkflowPropertiesAllOf. # noqa: E501
:rtype: list[WorkflowBaseDataType] | intersight/models/workflow_properties_all_of.py | output_definition | sdnit-se/intersight-python | 21 | python | @property
def output_definition(self):
'Gets the output_definition of this WorkflowPropertiesAllOf. # noqa: E501\n\n\n :return: The output_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: list[WorkflowBaseDataType]\n '
return self._output_definition | @property
def output_definition(self):
'Gets the output_definition of this WorkflowPropertiesAllOf. # noqa: E501\n\n\n :return: The output_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: list[WorkflowBaseDataType]\n '
return self._output_definition<|docstring|>Gets the ... |
91a5dd603092511eb093fe74b4167020a85a8529a367a0852e1926e7dcb96d17 | @output_definition.setter
def output_definition(self, output_definition):
'Sets the output_definition of this WorkflowPropertiesAllOf.\n\n\n :param output_definition: The output_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :type: list[WorkflowBaseDataType]\n '
self._output_de... | Sets the output_definition of this WorkflowPropertiesAllOf.
:param output_definition: The output_definition of this WorkflowPropertiesAllOf. # noqa: E501
:type: list[WorkflowBaseDataType] | intersight/models/workflow_properties_all_of.py | output_definition | sdnit-se/intersight-python | 21 | python | @output_definition.setter
def output_definition(self, output_definition):
'Sets the output_definition of this WorkflowPropertiesAllOf.\n\n\n :param output_definition: The output_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :type: list[WorkflowBaseDataType]\n '
self._output_de... | @output_definition.setter
def output_definition(self, output_definition):
'Sets the output_definition of this WorkflowPropertiesAllOf.\n\n\n :param output_definition: The output_definition of this WorkflowPropertiesAllOf. # noqa: E501\n :type: list[WorkflowBaseDataType]\n '
self._output_de... |
d83575f5622c372c6896030aeb70e8434054bf8b9bd52f31259b67413e163c70 | @property
def retry_count(self):
'Gets the retry_count of this WorkflowPropertiesAllOf. # noqa: E501\n\n The number of times a task should be tried before marking as failed. # noqa: E501\n\n :return: The retry_count of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: int\n '
... | Gets the retry_count of this WorkflowPropertiesAllOf. # noqa: E501
The number of times a task should be tried before marking as failed. # noqa: E501
:return: The retry_count of this WorkflowPropertiesAllOf. # noqa: E501
:rtype: int | intersight/models/workflow_properties_all_of.py | retry_count | sdnit-se/intersight-python | 21 | python | @property
def retry_count(self):
'Gets the retry_count of this WorkflowPropertiesAllOf. # noqa: E501\n\n The number of times a task should be tried before marking as failed. # noqa: E501\n\n :return: The retry_count of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: int\n '
... | @property
def retry_count(self):
'Gets the retry_count of this WorkflowPropertiesAllOf. # noqa: E501\n\n The number of times a task should be tried before marking as failed. # noqa: E501\n\n :return: The retry_count of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: int\n '
... |
ba2e36b5deea6488ecf079abf519305c7fada55057f0b71e230124834a9c02e4 | @retry_count.setter
def retry_count(self, retry_count):
'Sets the retry_count of this WorkflowPropertiesAllOf.\n\n The number of times a task should be tried before marking as failed. # noqa: E501\n\n :param retry_count: The retry_count of this WorkflowPropertiesAllOf. # noqa: E501\n :type:... | Sets the retry_count of this WorkflowPropertiesAllOf.
The number of times a task should be tried before marking as failed. # noqa: E501
:param retry_count: The retry_count of this WorkflowPropertiesAllOf. # noqa: E501
:type: int | intersight/models/workflow_properties_all_of.py | retry_count | sdnit-se/intersight-python | 21 | python | @retry_count.setter
def retry_count(self, retry_count):
'Sets the retry_count of this WorkflowPropertiesAllOf.\n\n The number of times a task should be tried before marking as failed. # noqa: E501\n\n :param retry_count: The retry_count of this WorkflowPropertiesAllOf. # noqa: E501\n :type:... | @retry_count.setter
def retry_count(self, retry_count):
'Sets the retry_count of this WorkflowPropertiesAllOf.\n\n The number of times a task should be tried before marking as failed. # noqa: E501\n\n :param retry_count: The retry_count of this WorkflowPropertiesAllOf. # noqa: E501\n :type:... |
d29b84a8a305865baca0e95205be9610e45657c961ce072a6132c14ed74aeb71 | @property
def retry_delay(self):
'Gets the retry_delay of this WorkflowPropertiesAllOf. # noqa: E501\n\n The delay in seconds after which the the task is re-tried. # noqa: E501\n\n :return: The retry_delay of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: int\n '
return se... | Gets the retry_delay of this WorkflowPropertiesAllOf. # noqa: E501
The delay in seconds after which the the task is re-tried. # noqa: E501
:return: The retry_delay of this WorkflowPropertiesAllOf. # noqa: E501
:rtype: int | intersight/models/workflow_properties_all_of.py | retry_delay | sdnit-se/intersight-python | 21 | python | @property
def retry_delay(self):
'Gets the retry_delay of this WorkflowPropertiesAllOf. # noqa: E501\n\n The delay in seconds after which the the task is re-tried. # noqa: E501\n\n :return: The retry_delay of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: int\n '
return se... | @property
def retry_delay(self):
'Gets the retry_delay of this WorkflowPropertiesAllOf. # noqa: E501\n\n The delay in seconds after which the the task is re-tried. # noqa: E501\n\n :return: The retry_delay of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: int\n '
return se... |
dd0d9555501fe0b26f7d957160e6a918d226fb298565c971d6c46b209b9a8a7c | @retry_delay.setter
def retry_delay(self, retry_delay):
'Sets the retry_delay of this WorkflowPropertiesAllOf.\n\n The delay in seconds after which the the task is re-tried. # noqa: E501\n\n :param retry_delay: The retry_delay of this WorkflowPropertiesAllOf. # noqa: E501\n :type: int\n ... | Sets the retry_delay of this WorkflowPropertiesAllOf.
The delay in seconds after which the the task is re-tried. # noqa: E501
:param retry_delay: The retry_delay of this WorkflowPropertiesAllOf. # noqa: E501
:type: int | intersight/models/workflow_properties_all_of.py | retry_delay | sdnit-se/intersight-python | 21 | python | @retry_delay.setter
def retry_delay(self, retry_delay):
'Sets the retry_delay of this WorkflowPropertiesAllOf.\n\n The delay in seconds after which the the task is re-tried. # noqa: E501\n\n :param retry_delay: The retry_delay of this WorkflowPropertiesAllOf. # noqa: E501\n :type: int\n ... | @retry_delay.setter
def retry_delay(self, retry_delay):
'Sets the retry_delay of this WorkflowPropertiesAllOf.\n\n The delay in seconds after which the the task is re-tried. # noqa: E501\n\n :param retry_delay: The retry_delay of this WorkflowPropertiesAllOf. # noqa: E501\n :type: int\n ... |
aa67837cea7fe8283279b12a4f52c60a80df3418ea69e5dc5924cdc63e5b3d0b | @property
def retry_policy(self):
'Gets the retry_policy of this WorkflowPropertiesAllOf. # noqa: E501\n\n The retry policy for the task. # noqa: E501\n\n :return: The retry_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: str\n '
return self._retry_policy | Gets the retry_policy of this WorkflowPropertiesAllOf. # noqa: E501
The retry policy for the task. # noqa: E501
:return: The retry_policy of this WorkflowPropertiesAllOf. # noqa: E501
:rtype: str | intersight/models/workflow_properties_all_of.py | retry_policy | sdnit-se/intersight-python | 21 | python | @property
def retry_policy(self):
'Gets the retry_policy of this WorkflowPropertiesAllOf. # noqa: E501\n\n The retry policy for the task. # noqa: E501\n\n :return: The retry_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: str\n '
return self._retry_policy | @property
def retry_policy(self):
'Gets the retry_policy of this WorkflowPropertiesAllOf. # noqa: E501\n\n The retry policy for the task. # noqa: E501\n\n :return: The retry_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: str\n '
return self._retry_policy<|docstri... |
d2f01448d0686eaaca12527d990e2019019e67b90760507a1bacc78df61135b9 | @retry_policy.setter
def retry_policy(self, retry_policy):
'Sets the retry_policy of this WorkflowPropertiesAllOf.\n\n The retry policy for the task. # noqa: E501\n\n :param retry_policy: The retry_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :type: str\n '
allowed_valu... | Sets the retry_policy of this WorkflowPropertiesAllOf.
The retry policy for the task. # noqa: E501
:param retry_policy: The retry_policy of this WorkflowPropertiesAllOf. # noqa: E501
:type: str | intersight/models/workflow_properties_all_of.py | retry_policy | sdnit-se/intersight-python | 21 | python | @retry_policy.setter
def retry_policy(self, retry_policy):
'Sets the retry_policy of this WorkflowPropertiesAllOf.\n\n The retry policy for the task. # noqa: E501\n\n :param retry_policy: The retry_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :type: str\n '
allowed_valu... | @retry_policy.setter
def retry_policy(self, retry_policy):
'Sets the retry_policy of this WorkflowPropertiesAllOf.\n\n The retry policy for the task. # noqa: E501\n\n :param retry_policy: The retry_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :type: str\n '
allowed_valu... |
33689e3937e62d7bbccd202ecfe1154493de58115e7070722dae49be6206ea84 | @property
def timeout(self):
'Gets the timeout of this WorkflowPropertiesAllOf. # noqa: E501\n\n The timeout value in seconds after which task will be marked as timed out. Max allowed value is 7 days. # noqa: E501\n\n :return: The timeout of this WorkflowPropertiesAllOf. # noqa: E501\n :rt... | Gets the timeout of this WorkflowPropertiesAllOf. # noqa: E501
The timeout value in seconds after which task will be marked as timed out. Max allowed value is 7 days. # noqa: E501
:return: The timeout of this WorkflowPropertiesAllOf. # noqa: E501
:rtype: int | intersight/models/workflow_properties_all_of.py | timeout | sdnit-se/intersight-python | 21 | python | @property
def timeout(self):
'Gets the timeout of this WorkflowPropertiesAllOf. # noqa: E501\n\n The timeout value in seconds after which task will be marked as timed out. Max allowed value is 7 days. # noqa: E501\n\n :return: The timeout of this WorkflowPropertiesAllOf. # noqa: E501\n :rt... | @property
def timeout(self):
'Gets the timeout of this WorkflowPropertiesAllOf. # noqa: E501\n\n The timeout value in seconds after which task will be marked as timed out. Max allowed value is 7 days. # noqa: E501\n\n :return: The timeout of this WorkflowPropertiesAllOf. # noqa: E501\n :rt... |
e3e4dc1ceeed83cbf74295b889a32c455637e9fa872899a4e7f84f2a96392ba4 | @timeout.setter
def timeout(self, timeout):
'Sets the timeout of this WorkflowPropertiesAllOf.\n\n The timeout value in seconds after which task will be marked as timed out. Max allowed value is 7 days. # noqa: E501\n\n :param timeout: The timeout of this WorkflowPropertiesAllOf. # noqa: E501\n ... | Sets the timeout of this WorkflowPropertiesAllOf.
The timeout value in seconds after which task will be marked as timed out. Max allowed value is 7 days. # noqa: E501
:param timeout: The timeout of this WorkflowPropertiesAllOf. # noqa: E501
:type: int | intersight/models/workflow_properties_all_of.py | timeout | sdnit-se/intersight-python | 21 | python | @timeout.setter
def timeout(self, timeout):
'Sets the timeout of this WorkflowPropertiesAllOf.\n\n The timeout value in seconds after which task will be marked as timed out. Max allowed value is 7 days. # noqa: E501\n\n :param timeout: The timeout of this WorkflowPropertiesAllOf. # noqa: E501\n ... | @timeout.setter
def timeout(self, timeout):
'Sets the timeout of this WorkflowPropertiesAllOf.\n\n The timeout value in seconds after which task will be marked as timed out. Max allowed value is 7 days. # noqa: E501\n\n :param timeout: The timeout of this WorkflowPropertiesAllOf. # noqa: E501\n ... |
103756a3c2fc5688340324cb4942e024bd87ecd6e69ace974d726d6ab558bbf5 | @property
def timeout_policy(self):
'Gets the timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501\n\n The timeout policy for the task. # noqa: E501\n\n :return: The timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: str\n '
return self._timeout_poli... | Gets the timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501
The timeout policy for the task. # noqa: E501
:return: The timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501
:rtype: str | intersight/models/workflow_properties_all_of.py | timeout_policy | sdnit-se/intersight-python | 21 | python | @property
def timeout_policy(self):
'Gets the timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501\n\n The timeout policy for the task. # noqa: E501\n\n :return: The timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: str\n '
return self._timeout_poli... | @property
def timeout_policy(self):
'Gets the timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501\n\n The timeout policy for the task. # noqa: E501\n\n :return: The timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :rtype: str\n '
return self._timeout_poli... |
17ab71f9831536ccc8583bee15b55328105f3bd9414b4e6c800d8dd59fa6d39e | @timeout_policy.setter
def timeout_policy(self, timeout_policy):
'Sets the timeout_policy of this WorkflowPropertiesAllOf.\n\n The timeout policy for the task. # noqa: E501\n\n :param timeout_policy: The timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :type: str\n '
... | Sets the timeout_policy of this WorkflowPropertiesAllOf.
The timeout policy for the task. # noqa: E501
:param timeout_policy: The timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501
:type: str | intersight/models/workflow_properties_all_of.py | timeout_policy | sdnit-se/intersight-python | 21 | python | @timeout_policy.setter
def timeout_policy(self, timeout_policy):
'Sets the timeout_policy of this WorkflowPropertiesAllOf.\n\n The timeout policy for the task. # noqa: E501\n\n :param timeout_policy: The timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :type: str\n '
... | @timeout_policy.setter
def timeout_policy(self, timeout_policy):
'Sets the timeout_policy of this WorkflowPropertiesAllOf.\n\n The timeout policy for the task. # noqa: E501\n\n :param timeout_policy: The timeout_policy of this WorkflowPropertiesAllOf. # noqa: E501\n :type: str\n '
... |
5a4e41bb6a0def746593298cb605df98f1366e957c4ca89b12010ea7db707963 | def to_dict(self):
'Returns the model properties as a dict'
result = {}
for (attr, _) in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value))
e... | Returns the model properties as a dict | intersight/models/workflow_properties_all_of.py | to_dict | sdnit-se/intersight-python | 21 | python | def to_dict(self):
result = {}
for (attr, _) in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value))
elif hasattr(value, 'to_dict'):
... | def to_dict(self):
result = {}
for (attr, _) in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value))
elif hasattr(value, 'to_dict'):
... |
cbb19eaa2fc8a113d9e32f924ef280a7e97563f8915f94f65dab438997af2e99 | def to_str(self):
'Returns the string representation of the model'
return pprint.pformat(self.to_dict()) | Returns the string representation of the model | intersight/models/workflow_properties_all_of.py | to_str | sdnit-se/intersight-python | 21 | python | def to_str(self):
return pprint.pformat(self.to_dict()) | def to_str(self):
return pprint.pformat(self.to_dict())<|docstring|>Returns the string representation of the model<|endoftext|> |
772243a2c2b3261a9b954d07aaf295e3c1242a579a495e2d6a5679c677861703 | def __repr__(self):
'For `print` and `pprint`'
return self.to_str() | For `print` and `pprint` | intersight/models/workflow_properties_all_of.py | __repr__ | sdnit-se/intersight-python | 21 | python | def __repr__(self):
return self.to_str() | def __repr__(self):
return self.to_str()<|docstring|>For `print` and `pprint`<|endoftext|> |
f4b7b3c9e608e0dcb42d9f27f69cd7c09b985f81171098772c32470b1ae7de03 | def __eq__(self, other):
'Returns true if both objects are equal'
if (not isinstance(other, WorkflowPropertiesAllOf)):
return False
return (self.to_dict() == other.to_dict()) | Returns true if both objects are equal | intersight/models/workflow_properties_all_of.py | __eq__ | sdnit-se/intersight-python | 21 | python | def __eq__(self, other):
if (not isinstance(other, WorkflowPropertiesAllOf)):
return False
return (self.to_dict() == other.to_dict()) | def __eq__(self, other):
if (not isinstance(other, WorkflowPropertiesAllOf)):
return False
return (self.to_dict() == other.to_dict())<|docstring|>Returns true if both objects are equal<|endoftext|> |
1bd66f9694b49af3726cbcfda15c60299af4ccd5ea98613f42f3c4f42f5c0bd6 | def __ne__(self, other):
'Returns true if both objects are not equal'
if (not isinstance(other, WorkflowPropertiesAllOf)):
return True
return (self.to_dict() != other.to_dict()) | Returns true if both objects are not equal | intersight/models/workflow_properties_all_of.py | __ne__ | sdnit-se/intersight-python | 21 | python | def __ne__(self, other):
if (not isinstance(other, WorkflowPropertiesAllOf)):
return True
return (self.to_dict() != other.to_dict()) | def __ne__(self, other):
if (not isinstance(other, WorkflowPropertiesAllOf)):
return True
return (self.to_dict() != other.to_dict())<|docstring|>Returns true if both objects are not equal<|endoftext|> |
1a6bc63eff8041a99985940960d0c16589e59a12b4eafaae17111750b569ae39 | def load_alanine(constrained=True):
'Load AlanineDipeptide vacuum, optionally with hydrogen bonds constrained'
if constrained:
constraints = app.HBonds
else:
constraints = None
testsystem = AlanineDipeptideVacuum(constraints=constraints)
(topology, system, positions) = (testsystem.to... | Load AlanineDipeptide vacuum, optionally with hydrogen bonds constrained | benchmark/testsystems/alanine_dipeptide.py | load_alanine | choderalab/integrator-benchmark | 5 | python | def load_alanine(constrained=True):
if constrained:
constraints = app.HBonds
else:
constraints = None
testsystem = AlanineDipeptideVacuum(constraints=constraints)
(topology, system, positions) = (testsystem.topology, testsystem.system, testsystem.positions)
keep_only_some_forces... | def load_alanine(constrained=True):
if constrained:
constraints = app.HBonds
else:
constraints = None
testsystem = AlanineDipeptideVacuum(constraints=constraints)
(topology, system, positions) = (testsystem.topology, testsystem.system, testsystem.positions)
keep_only_some_forces... |
8c299df6262fb2e620183f18861e539a128cbd94e44730638bb6fc424c9a71f8 | def load_solvated_alanine(constrained=True):
'Load AlanineDipeptide in explicit solvent,\n optionally with rigid water + hydrogen bonds constrained.'
if constrained:
testsystem = AlanineDipeptideExplicit(constraints=app.HBonds, rigid_water=True)
else:
testsystem = AlanineDipeptideExplicit... | Load AlanineDipeptide in explicit solvent,
optionally with rigid water + hydrogen bonds constrained. | benchmark/testsystems/alanine_dipeptide.py | load_solvated_alanine | choderalab/integrator-benchmark | 5 | python | def load_solvated_alanine(constrained=True):
'Load AlanineDipeptide in explicit solvent,\n optionally with rigid water + hydrogen bonds constrained.'
if constrained:
testsystem = AlanineDipeptideExplicit(constraints=app.HBonds, rigid_water=True)
else:
testsystem = AlanineDipeptideExplicit... | def load_solvated_alanine(constrained=True):
'Load AlanineDipeptide in explicit solvent,\n optionally with rigid water + hydrogen bonds constrained.'
if constrained:
testsystem = AlanineDipeptideExplicit(constraints=app.HBonds, rigid_water=True)
else:
testsystem = AlanineDipeptideExplicit... |
d126912fb885a28e9a2fa06d890f6c803be49c5221308f162a92e29f3071fa9a | @click.group()
@click.option('--project', '-p', type=str, help="The project name, e.g. 'mnist' or 'adam/mnist'.")
@click.option('--group', '-g', type=int, help='The group id number.')
@click.pass_context
@clean_outputs
def group(ctx, project, group):
'Commands for experiment groups.'
ctx.obj = (ctx.obj or {})
... | Commands for experiment groups. | polyaxon_cli/cli/experiment_group.py | group | ZhuFengdaaa/polyaxon-cli | 0 | python | @click.group()
@click.option('--project', '-p', type=str, help="The project name, e.g. 'mnist' or 'adam/mnist'.")
@click.option('--group', '-g', type=int, help='The group id number.')
@click.pass_context
@clean_outputs
def group(ctx, project, group):
ctx.obj = (ctx.obj or {})
ctx.obj['project'] = project
... | @click.group()
@click.option('--project', '-p', type=str, help="The project name, e.g. 'mnist' or 'adam/mnist'.")
@click.option('--group', '-g', type=int, help='The group id number.')
@click.pass_context
@clean_outputs
def group(ctx, project, group):
ctx.obj = (ctx.obj or {})
ctx.obj['project'] = project
... |
693a3c49a1bf99116c08634ff75f8b14b339fd6e1aa6fdf8b73e3b0fb4f9797f | @group.command()
@click.pass_context
@clean_outputs
def get(ctx):
'Get experiment group by uuid.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group -g 13 get\n ```\n '
(user, project_name, _group) = get_project_group_or_local(ctx.obj.ge... | Get experiment group by uuid.
Uses [Caching](/references/polyaxon-cli/#caching)
Examples:
```bash
$ polyaxon group -g 13 get
``` | polyaxon_cli/cli/experiment_group.py | get | ZhuFengdaaa/polyaxon-cli | 0 | python | @group.command()
@click.pass_context
@clean_outputs
def get(ctx):
'Get experiment group by uuid.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group -g 13 get\n ```\n '
(user, project_name, _group) = get_project_group_or_local(ctx.obj.ge... | @group.command()
@click.pass_context
@clean_outputs
def get(ctx):
'Get experiment group by uuid.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group -g 13 get\n ```\n '
(user, project_name, _group) = get_project_group_or_local(ctx.obj.ge... |
1746cf4fd6d1e2deef6f071ed4794a3a5948ebfce3005e7e66894d0aec916b17 | @group.command()
@click.pass_context
@clean_outputs
def delete(ctx):
'Delete experiment group.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n '
(user, project_name, _group) = get_project_group_or_local(ctx.obj.get('project'), ctx.obj.get('group'))
if (not click.confirm('Are sure you want to d... | Delete experiment group.
Uses [Caching](/references/polyaxon-cli/#caching) | polyaxon_cli/cli/experiment_group.py | delete | ZhuFengdaaa/polyaxon-cli | 0 | python | @group.command()
@click.pass_context
@clean_outputs
def delete(ctx):
'Delete experiment group.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n '
(user, project_name, _group) = get_project_group_or_local(ctx.obj.get('project'), ctx.obj.get('group'))
if (not click.confirm('Are sure you want to d... | @group.command()
@click.pass_context
@clean_outputs
def delete(ctx):
'Delete experiment group.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n '
(user, project_name, _group) = get_project_group_or_local(ctx.obj.get('project'), ctx.obj.get('group'))
if (not click.confirm('Are sure you want to d... |
1bc2c38c55fe524e9e494aa585187d1770976ab01744c5308a05c56e620e8be8 | @group.command()
@click.option('--name', type=str, help='Name of the group, must be unique within the project, could none.')
@click.option('--description', type=str, help='Description of the group.')
@click.option('--tags', type=str, help='Tags of the group, comma separated values.')
@click.pass_context
@clean_outputs
... | Update experiment group.
Uses [Caching](/references/polyaxon-cli/#caching)
Example:
```bash
$ polyaxon group -g 2 update --description="new description for this group"
```
```bash
$ polyaxon update --tags="foo, bar"
``` | polyaxon_cli/cli/experiment_group.py | update | ZhuFengdaaa/polyaxon-cli | 0 | python | @group.command()
@click.option('--name', type=str, help='Name of the group, must be unique within the project, could none.')
@click.option('--description', type=str, help='Description of the group.')
@click.option('--tags', type=str, help='Tags of the group, comma separated values.')
@click.pass_context
@clean_outputs
... | @group.command()
@click.option('--name', type=str, help='Name of the group, must be unique within the project, could none.')
@click.option('--description', type=str, help='Description of the group.')
@click.option('--tags', type=str, help='Tags of the group, comma separated values.')
@click.pass_context
@clean_outputs
... |
d2ad5ff5b654dfbf92adf887af6bbe6a4cba9254af4427930a257c6c711a52f6 | @group.command()
@click.option('--metrics', '-m', is_flag=True, help='List experiments with their metrics.')
@click.option('--params', '-p', is_flag=True, help='List experiments with their params.')
@click.option('--query', '-q', type=str, help='To filter the experiments based on this query spec.')
@click.option('--sor... | List experiments for this experiment group
Uses [Caching](/references/polyaxon-cli/#caching) | polyaxon_cli/cli/experiment_group.py | experiments | ZhuFengdaaa/polyaxon-cli | 0 | python | @group.command()
@click.option('--metrics', '-m', is_flag=True, help='List experiments with their metrics.')
@click.option('--params', '-p', is_flag=True, help='List experiments with their params.')
@click.option('--query', '-q', type=str, help='To filter the experiments based on this query spec.')
@click.option('--sor... | @group.command()
@click.option('--metrics', '-m', is_flag=True, help='List experiments with their metrics.')
@click.option('--params', '-p', is_flag=True, help='List experiments with their params.')
@click.option('--query', '-q', type=str, help='To filter the experiments based on this query spec.')
@click.option('--sor... |
ea82e98c8cabd1c2fef98e9fcf24ae7fb61063900ab8e3e42fde3b524d1a9e4d | @group.command()
@click.option('--yes', '-y', is_flag=True, default=False, help='Automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively.')
@click.option('--pending', is_flag=True, default=False, help='To stop only pending experiments, i.e. leave currently running one intact.')
@click.... | Stop experiments in the group.
Uses [Caching](/references/polyaxon-cli/#caching)
Examples: stop only pending experiments
```bash
$ polyaxon group stop --pending
```
Examples: stop all unfinished
```bash
$ polyaxon group stop
```
```bash
$ polyaxon group -g 2 stop
``` | polyaxon_cli/cli/experiment_group.py | stop | ZhuFengdaaa/polyaxon-cli | 0 | python | @group.command()
@click.option('--yes', '-y', is_flag=True, default=False, help='Automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively.')
@click.option('--pending', is_flag=True, default=False, help='To stop only pending experiments, i.e. leave currently running one intact.')
@click.... | @group.command()
@click.option('--yes', '-y', is_flag=True, default=False, help='Automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively.')
@click.option('--pending', is_flag=True, default=False, help='To stop only pending experiments, i.e. leave currently running one intact.')
@click.... |
03cb757625d5cba09abfb28d9c1e59faebf0bd06b32fe08d2d4bb04e47c3baab | @group.command()
@click.option('--page', type=int, help='To paginate through the list of statuses.')
@click.pass_context
@clean_outputs
def statuses(ctx, page):
'Get experiment group statuses.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group -g... | Get experiment group statuses.
Uses [Caching](/references/polyaxon-cli/#caching)
Examples:
```bash
$ polyaxon group -g 2 statuses
``` | polyaxon_cli/cli/experiment_group.py | statuses | ZhuFengdaaa/polyaxon-cli | 0 | python | @group.command()
@click.option('--page', type=int, help='To paginate through the list of statuses.')
@click.pass_context
@clean_outputs
def statuses(ctx, page):
'Get experiment group statuses.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group -g... | @group.command()
@click.option('--page', type=int, help='To paginate through the list of statuses.')
@click.pass_context
@clean_outputs
def statuses(ctx, page):
'Get experiment group statuses.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group -g... |
cd3b7575f46edc7689635a73b4010561578f35824008a2ef8d5f5e91c67e5c1c | @group.command()
@click.pass_context
@clean_outputs
def bookmark(ctx):
'Bookmark group.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group bookmark\n ```\n\n \x08\n ```bash\n $ polyaxon group -g 2 bookmark\n ```\n '
(user, p... | Bookmark group.
Uses [Caching](/references/polyaxon-cli/#caching)
Examples:
```bash
$ polyaxon group bookmark
```
```bash
$ polyaxon group -g 2 bookmark
``` | polyaxon_cli/cli/experiment_group.py | bookmark | ZhuFengdaaa/polyaxon-cli | 0 | python | @group.command()
@click.pass_context
@clean_outputs
def bookmark(ctx):
'Bookmark group.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group bookmark\n ```\n\n \x08\n ```bash\n $ polyaxon group -g 2 bookmark\n ```\n '
(user, p... | @group.command()
@click.pass_context
@clean_outputs
def bookmark(ctx):
'Bookmark group.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group bookmark\n ```\n\n \x08\n ```bash\n $ polyaxon group -g 2 bookmark\n ```\n '
(user, p... |
fe2fdd23007db8f8ccb36b1b2ded74f5d976bca1f7d02fde058e00d8441d4670 | @group.command()
@click.pass_context
@clean_outputs
def unbookmark(ctx):
'Unbookmark group.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group unbookmark\n ```\n\n \x08\n ```bash\n $ polyaxon group -g 2 unbookmark\n ```\n '
... | Unbookmark group.
Uses [Caching](/references/polyaxon-cli/#caching)
Examples:
```bash
$ polyaxon group unbookmark
```
```bash
$ polyaxon group -g 2 unbookmark
``` | polyaxon_cli/cli/experiment_group.py | unbookmark | ZhuFengdaaa/polyaxon-cli | 0 | python | @group.command()
@click.pass_context
@clean_outputs
def unbookmark(ctx):
'Unbookmark group.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group unbookmark\n ```\n\n \x08\n ```bash\n $ polyaxon group -g 2 unbookmark\n ```\n '
... | @group.command()
@click.pass_context
@clean_outputs
def unbookmark(ctx):
'Unbookmark group.\n\n Uses [Caching](/references/polyaxon-cli/#caching)\n\n Examples:\n\n \x08\n ```bash\n $ polyaxon group unbookmark\n ```\n\n \x08\n ```bash\n $ polyaxon group -g 2 unbookmark\n ```\n '
... |
e0066ee19f996b39c7111ea0f1b029f5bb84e3c442d5d7dd9b2d30dd2b0ede8f | def main_aes(file_in=None):
'\n Main aes entry point.\n :param file_in: Name (str) of the des JSON input file.\n :return: 0 for success\n :return: 1 for fail\n '
global logger
logger = logging.getLogger(__name__)
if file_in:
with open(file_in, 'r') as f:
j = json.load(... | Main aes entry point.
:param file_in: Name (str) of the des JSON input file.
:return: 0 for success
:return: 1 for fail | test/json/aes/aes.py | main_aes | farning10/libacvp | 45 | python | def main_aes(file_in=None):
'\n Main aes entry point.\n :param file_in: Name (str) of the des JSON input file.\n :return: 0 for success\n :return: 1 for fail\n '
global logger
logger = logging.getLogger(__name__)
if file_in:
with open(file_in, 'r') as f:
j = json.load(... | def main_aes(file_in=None):
'\n Main aes entry point.\n :param file_in: Name (str) of the des JSON input file.\n :return: 0 for success\n :return: 1 for fail\n '
global logger
logger = logging.getLogger(__name__)
if file_in:
with open(file_in, 'r') as f:
j = json.load(... |
0a6237ec9c9f0f119eb64903b04cb12e5978b2a398cf85bef3a22aedaea508b5 | def keep(self, obj):
'\n Take a testGroup dict, and decide whether to keep or remove.\n :param obj: testGroup dict\n :return: True to keep\n :return: False to remove\n '
if (obj['direction'] == 'encrypt'):
if self.got_encrypt:
return False
else:
... | Take a testGroup dict, and decide whether to keep or remove.
:param obj: testGroup dict
:return: True to keep
:return: False to remove | test/json/aes/aes.py | keep | farning10/libacvp | 45 | python | def keep(self, obj):
'\n Take a testGroup dict, and decide whether to keep or remove.\n :param obj: testGroup dict\n :return: True to keep\n :return: False to remove\n '
if (obj['direction'] == 'encrypt'):
if self.got_encrypt:
return False
else:
... | def keep(self, obj):
'\n Take a testGroup dict, and decide whether to keep or remove.\n :param obj: testGroup dict\n :return: True to keep\n :return: False to remove\n '
if (obj['direction'] == 'encrypt'):
if self.got_encrypt:
return False
else:
... |
8d03c7a521d64c899f1e12ae37ada3b061c7ea002e5746e291d108d80bfbfd74 | def update_df(old_df, new_df, duplicates=duplicates):
'\n old_df can be one of the provided by this package\n new_df is the fresh result from web scraping with brazil_deaths()\n\n example:\n new_df = brazil_deaths(years=[2020], months=[5], return_df=True)\n '
try:
assert (old_df.colum... | old_df can be one of the provided by this package
new_df is the fresh result from web scraping with brazil_deaths()
example:
new_df = brazil_deaths(years=[2020], months=[5], return_df=True) | brazil_monthly_deaths/update_new_data.py | update_df | PedroBern/brazil-monthly-deaths-by-city | 7 | python | def update_df(old_df, new_df, duplicates=duplicates):
'\n old_df can be one of the provided by this package\n new_df is the fresh result from web scraping with brazil_deaths()\n\n example:\n new_df = brazil_deaths(years=[2020], months=[5], return_df=True)\n '
try:
assert (old_df.colum... | def update_df(old_df, new_df, duplicates=duplicates):
'\n old_df can be one of the provided by this package\n new_df is the fresh result from web scraping with brazil_deaths()\n\n example:\n new_df = brazil_deaths(years=[2020], months=[5], return_df=True)\n '
try:
assert (old_df.colum... |
f888bb1dcb00c4f58bfbcff7ea61dcaffc95ca5227302eebc140471dde3bd239 | def test_simple_01():
'Single-rate Limiter'
with pytest.raises(InvalidParams):
Limiter()
with pytest.raises(InvalidParams):
rate_1 = RequestRate(3, (5 * Duration.SECOND))
rate_2 = RequestRate(4, (5 * Duration.SECOND))
Limiter(rate_1, rate_2)
rate = RequestRate(3, (5 * Dur... | Single-rate Limiter | tests/test_01.py | test_simple_01 | ruanima/PyrateLimiter | 0 | python | def test_simple_01():
with pytest.raises(InvalidParams):
Limiter()
with pytest.raises(InvalidParams):
rate_1 = RequestRate(3, (5 * Duration.SECOND))
rate_2 = RequestRate(4, (5 * Duration.SECOND))
Limiter(rate_1, rate_2)
rate = RequestRate(3, (5 * Duration.SECOND))
wi... | def test_simple_01():
with pytest.raises(InvalidParams):
Limiter()
with pytest.raises(InvalidParams):
rate_1 = RequestRate(3, (5 * Duration.SECOND))
rate_2 = RequestRate(4, (5 * Duration.SECOND))
Limiter(rate_1, rate_2)
rate = RequestRate(3, (5 * Duration.SECOND))
wi... |
e61a3ba1908f700502e5109977bdf3d96cb34ff88f23b22f89001ec8fef6293b | def test_simple_02():
'Multi-rates Limiter'
rate_1 = RequestRate(5, (5 * Duration.SECOND))
rate_2 = RequestRate(7, (9 * Duration.SECOND))
limiter2 = Limiter(rate_1, rate_2)
item = 'tranvu'
err = None
with pytest.raises(BucketFullException) as err:
for _ in range(6):
limit... | Multi-rates Limiter | tests/test_01.py | test_simple_02 | ruanima/PyrateLimiter | 0 | python | def test_simple_02():
rate_1 = RequestRate(5, (5 * Duration.SECOND))
rate_2 = RequestRate(7, (9 * Duration.SECOND))
limiter2 = Limiter(rate_1, rate_2)
item = 'tranvu'
err = None
with pytest.raises(BucketFullException) as err:
for _ in range(6):
limiter2.try_acquire(item)... | def test_simple_02():
rate_1 = RequestRate(5, (5 * Duration.SECOND))
rate_2 = RequestRate(7, (9 * Duration.SECOND))
limiter2 = Limiter(rate_1, rate_2)
item = 'tranvu'
err = None
with pytest.raises(BucketFullException) as err:
for _ in range(6):
limiter2.try_acquire(item)... |
641f9d33268144da67aff82843ced4f36abdd384a8387dab85216b4ee5f040d4 | def test_simple_03():
'Single-rate Limiter with MemoryListBucket'
rate = RequestRate(3, (5 * Duration.SECOND))
limiter = Limiter(rate, bucket_class=MemoryListBucket)
item = 'vutran_list'
with pytest.raises(BucketFullException):
for _ in range(4):
limiter.try_acquire(item)
sle... | Single-rate Limiter with MemoryListBucket | tests/test_01.py | test_simple_03 | ruanima/PyrateLimiter | 0 | python | def test_simple_03():
rate = RequestRate(3, (5 * Duration.SECOND))
limiter = Limiter(rate, bucket_class=MemoryListBucket)
item = 'vutran_list'
with pytest.raises(BucketFullException):
for _ in range(4):
limiter.try_acquire(item)
sleep(6)
limiter.try_acquire(item)
vol... | def test_simple_03():
rate = RequestRate(3, (5 * Duration.SECOND))
limiter = Limiter(rate, bucket_class=MemoryListBucket)
item = 'vutran_list'
with pytest.raises(BucketFullException):
for _ in range(4):
limiter.try_acquire(item)
sleep(6)
limiter.try_acquire(item)
vol... |
29b247d49973d163337447a80eb47b20bc039bd756bd03b45887a43682f0faa7 | def test_simple_04():
'Multi-rates Limiter with MemoryListBucket'
rate_1 = RequestRate(5, (5 * Duration.SECOND))
rate_2 = RequestRate(7, (9 * Duration.SECOND))
limiter2 = Limiter(rate_1, rate_2, bucket_class=MemoryListBucket)
item = 'tranvu_list'
with pytest.raises(BucketFullException):
... | Multi-rates Limiter with MemoryListBucket | tests/test_01.py | test_simple_04 | ruanima/PyrateLimiter | 0 | python | def test_simple_04():
rate_1 = RequestRate(5, (5 * Duration.SECOND))
rate_2 = RequestRate(7, (9 * Duration.SECOND))
limiter2 = Limiter(rate_1, rate_2, bucket_class=MemoryListBucket)
item = 'tranvu_list'
with pytest.raises(BucketFullException):
for _ in range(6):
limiter2.try... | def test_simple_04():
rate_1 = RequestRate(5, (5 * Duration.SECOND))
rate_2 = RequestRate(7, (9 * Duration.SECOND))
limiter2 = Limiter(rate_1, rate_2, bucket_class=MemoryListBucket)
item = 'tranvu_list'
with pytest.raises(BucketFullException):
for _ in range(6):
limiter2.try... |
e8ed2a6f45842109d7ae079029e633c9c3d04fe025830bc3c21e1391ecd3f9ca | def _build_message_classes(message_name):
'\n Create a new subclass instance of DIMSEMessage for the given DIMSE\n `message_name`.\n \n Parameters\n ----------\n message_name : str\n The name/type of message class to construct, one of the following:\n * C-ECHO-RQ\n * C-ECHO-RS... | Create a new subclass instance of DIMSEMessage for the given DIMSE
`message_name`.
Parameters
----------
message_name : str
The name/type of message class to construct, one of the following:
* C-ECHO-RQ
* C-ECHO-RSP
* C-STORE-RQ
* C-STORE-RSP
* C-FIND-RQ
* C-FIND-RSP
* C-GET-RQ
* C-... | pynetdicom/DIMSEmessages.py | _build_message_classes | scaramallion/pynetdicom_legacy | 0 | python | def _build_message_classes(message_name):
'\n Create a new subclass instance of DIMSEMessage for the given DIMSE\n `message_name`.\n \n Parameters\n ----------\n message_name : str\n The name/type of message class to construct, one of the following:\n * C-ECHO-RQ\n * C-ECHO-RS... | def _build_message_classes(message_name):
'\n Create a new subclass instance of DIMSEMessage for the given DIMSE\n `message_name`.\n \n Parameters\n ----------\n message_name : str\n The name/type of message class to construct, one of the following:\n * C-ECHO-RQ\n * C-ECHO-RS... |
1c0e2930e329e6e32aa0ec001fc40cd164b22863b97eeba9b826df405efc3074 | def Encode(self, context_id, max_pdu):
'\n Encode the DIMSE Message as one or more P-DATA service primitives\n \n PS3.7 6.3.1\n The encoding of the Command Set shall be Little Endian Implicit VR\n \n Parameters\n ----------\n context_id : int\n The ... | Encode the DIMSE Message as one or more P-DATA service primitives
PS3.7 6.3.1
The encoding of the Command Set shall be Little Endian Implicit VR
Parameters
----------
context_id : int
The ID of the presentation context agreed to under which we are
sending the data
max_pdu_length : int
The maximum PDU leng... | pynetdicom/DIMSEmessages.py | Encode | scaramallion/pynetdicom_legacy | 0 | python | def Encode(self, context_id, max_pdu):
'\n Encode the DIMSE Message as one or more P-DATA service primitives\n \n PS3.7 6.3.1\n The encoding of the Command Set shall be Little Endian Implicit VR\n \n Parameters\n ----------\n context_id : int\n The ... | def Encode(self, context_id, max_pdu):
'\n Encode the DIMSE Message as one or more P-DATA service primitives\n \n PS3.7 6.3.1\n The encoding of the Command Set shall be Little Endian Implicit VR\n \n Parameters\n ----------\n context_id : int\n The ... |
3d701f1eeacb64128b9d1a82515dd26704a321b4572439cda83b6148b7625004 | def Decode(self, pdata):
' Converts a series of P-DATA primitives into data for the DIMSE\n Message\n \n Decodes the data from the P-DATA service primitive (which\n may contain the results of one or more P-DATA-TF PDUs) into the\n `command_set` and `data_set` attributes. Also sets... | Converts a series of P-DATA primitives into data for the DIMSE
Message
Decodes the data from the P-DATA service primitive (which
may contain the results of one or more P-DATA-TF PDUs) into the
`command_set` and `data_set` attributes. Also sets the `ID` and
`encoded_command_set` attributes
PS3.9 Section 9.3.1: The enc... | pynetdicom/DIMSEmessages.py | Decode | scaramallion/pynetdicom_legacy | 0 | python | def Decode(self, pdata):
' Converts a series of P-DATA primitives into data for the DIMSE\n Message\n \n Decodes the data from the P-DATA service primitive (which\n may contain the results of one or more P-DATA-TF PDUs) into the\n `command_set` and `data_set` attributes. Also sets... | def Decode(self, pdata):
' Converts a series of P-DATA primitives into data for the DIMSE\n Message\n \n Decodes the data from the P-DATA service primitive (which\n may contain the results of one or more P-DATA-TF PDUs) into the\n `command_set` and `data_set` attributes. Also sets... |
a419e86ebb05bb683e4990634a9c86a826404dee6a1ae386f5acf6d97696722e | def _set_command_group_length(self):
'\n Once the self.command_set Dataset has been built and filled with values,\n this should be called to set the CommandGroupLength element value \n correctly.\n '
length = 0
del self.command_set[0]
for ii in list(self.command_set.values())... | Once the self.command_set Dataset has been built and filled with values,
this should be called to set the CommandGroupLength element value
correctly. | pynetdicom/DIMSEmessages.py | _set_command_group_length | scaramallion/pynetdicom_legacy | 0 | python | def _set_command_group_length(self):
'\n Once the self.command_set Dataset has been built and filled with values,\n this should be called to set the CommandGroupLength element value \n correctly.\n '
length = 0
del self.command_set[0]
for ii in list(self.command_set.values())... | def _set_command_group_length(self):
'\n Once the self.command_set Dataset has been built and filled with values,\n this should be called to set the CommandGroupLength element value \n correctly.\n '
length = 0
del self.command_set[0]
for ii in list(self.command_set.values())... |
69782309b26cfc73ebb1f418af5f6672ff0667bec1b59fa0d1823d818c273449 | def primitive_to_message(self, primitive):
'\n Convert a DIMSE service parameters primitive to the current DIMSE \n message object\n \n Parameters\n ----------\n primitive : pynetdicom.DIMSEparameters DIMSE service parameter\n The primitive to convert to the curr... | Convert a DIMSE service parameters primitive to the current DIMSE
message object
Parameters
----------
primitive : pynetdicom.DIMSEparameters DIMSE service parameter
The primitive to convert to the current DIMSE Message object | pynetdicom/DIMSEmessages.py | primitive_to_message | scaramallion/pynetdicom_legacy | 0 | python | def primitive_to_message(self, primitive):
'\n Convert a DIMSE service parameters primitive to the current DIMSE \n message object\n \n Parameters\n ----------\n primitive : pynetdicom.DIMSEparameters DIMSE service parameter\n The primitive to convert to the curr... | def primitive_to_message(self, primitive):
'\n Convert a DIMSE service parameters primitive to the current DIMSE \n message object\n \n Parameters\n ----------\n primitive : pynetdicom.DIMSEparameters DIMSE service parameter\n The primitive to convert to the curr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.