partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
valid
MixtureProperty.calculate_derivative_T
r'''Method to calculate a derivative of a mixture property with respect to temperature at constant pressure and composition of a given order using a specified method. Uses SciPy's derivative function, with a delta of 1E-6 K and a number of points equal to 2*order + 1. This m...
thermo/utils.py
def calculate_derivative_T(self, T, P, zs, ws, method, order=1): r'''Method to calculate a derivative of a mixture property with respect to temperature at constant pressure and composition of a given order using a specified method. Uses SciPy's derivative function, with a delta of 1E-...
def calculate_derivative_T(self, T, P, zs, ws, method, order=1): r'''Method to calculate a derivative of a mixture property with respect to temperature at constant pressure and composition of a given order using a specified method. Uses SciPy's derivative function, with a delta of 1E-...
[ "r", "Method", "to", "calculate", "a", "derivative", "of", "a", "mixture", "property", "with", "respect", "to", "temperature", "at", "constant", "pressure", "and", "composition", "of", "a", "given", "order", "using", "a", "specified", "method", ".", "Uses", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3332-L3366
[ "def", "calculate_derivative_T", "(", "self", ",", "T", ",", "P", ",", "zs", ",", "ws", ",", "method", ",", "order", "=", "1", ")", ":", "return", "derivative", "(", "self", ".", "calculate", ",", "T", ",", "dx", "=", "1e-6", ",", "args", "=", "[...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
MixtureProperty.calculate_derivative_P
r'''Method to calculate a derivative of a mixture property with respect to pressure at constant temperature and composition of a given order using a specified method. Uses SciPy's derivative function, with a delta of 0.01 Pa and a number of points equal to 2*order + 1. This m...
thermo/utils.py
def calculate_derivative_P(self, P, T, zs, ws, method, order=1): r'''Method to calculate a derivative of a mixture property with respect to pressure at constant temperature and composition of a given order using a specified method. Uses SciPy's derivative function, with a delta of 0.01...
def calculate_derivative_P(self, P, T, zs, ws, method, order=1): r'''Method to calculate a derivative of a mixture property with respect to pressure at constant temperature and composition of a given order using a specified method. Uses SciPy's derivative function, with a delta of 0.01...
[ "r", "Method", "to", "calculate", "a", "derivative", "of", "a", "mixture", "property", "with", "respect", "to", "pressure", "at", "constant", "temperature", "and", "composition", "of", "a", "given", "order", "using", "a", "specified", "method", ".", "Uses", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3368-L3403
[ "def", "calculate_derivative_P", "(", "self", ",", "P", ",", "T", ",", "zs", ",", "ws", ",", "method", ",", "order", "=", "1", ")", ":", "f", "=", "lambda", "P", ":", "self", ".", "calculate", "(", "T", ",", "P", ",", "zs", ",", "ws", ",", "m...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
MixtureProperty.property_derivative_T
r'''Method to calculate a derivative of a mixture property with respect to temperature at constant pressure and composition, of a given order. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are valid and succeed, None is returned. ...
thermo/utils.py
def property_derivative_T(self, T, P, zs, ws, order=1): r'''Method to calculate a derivative of a mixture property with respect to temperature at constant pressure and composition, of a given order. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If ...
def property_derivative_T(self, T, P, zs, ws, order=1): r'''Method to calculate a derivative of a mixture property with respect to temperature at constant pressure and composition, of a given order. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If ...
[ "r", "Method", "to", "calculate", "a", "derivative", "of", "a", "mixture", "property", "with", "respect", "to", "temperature", "at", "constant", "pressure", "and", "composition", "of", "a", "given", "order", ".", "Methods", "found", "valid", "by", "select_vali...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3406-L3443
[ "def", "property_derivative_T", "(", "self", ",", "T", ",", "P", ",", "zs", ",", "ws", ",", "order", "=", "1", ")", ":", "sorted_valid_methods", "=", "self", ".", "select_valid_methods", "(", "T", ",", "P", ",", "zs", ",", "ws", ")", "for", "method",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
MixtureProperty.property_derivative_P
r'''Method to calculate a derivative of a mixture property with respect to pressure at constant temperature and composition, of a given order. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are valid and succeed, None is returned. ...
thermo/utils.py
def property_derivative_P(self, T, P, zs, ws, order=1): r'''Method to calculate a derivative of a mixture property with respect to pressure at constant temperature and composition, of a given order. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If ...
def property_derivative_P(self, T, P, zs, ws, order=1): r'''Method to calculate a derivative of a mixture property with respect to pressure at constant temperature and composition, of a given order. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If ...
[ "r", "Method", "to", "calculate", "a", "derivative", "of", "a", "mixture", "property", "with", "respect", "to", "pressure", "at", "constant", "temperature", "and", "composition", "of", "a", "given", "order", ".", "Methods", "found", "valid", "by", "select_vali...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3446-L3483
[ "def", "property_derivative_P", "(", "self", ",", "T", ",", "P", ",", "zs", ",", "ws", ",", "order", "=", "1", ")", ":", "sorted_valid_methods", "=", "self", ".", "select_valid_methods", "(", "T", ",", "P", ",", "zs", ",", "ws", ")", "for", "method",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
MixtureProperty.plot_isotherm
r'''Method to create a plot of the property vs pressure at a specified temperature and composition according to either a specified list of methods, or the user methods (if set), or all methods. User-selectable number of points, and pressure range. If only_valid is set, `test_method_v...
thermo/utils.py
def plot_isotherm(self, T, zs, ws, Pmin=None, Pmax=None, methods=[], pts=50, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs pressure at a specified temperature and composition according to either a specified list of methods, or the us...
def plot_isotherm(self, T, zs, ws, Pmin=None, Pmax=None, methods=[], pts=50, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs pressure at a specified temperature and composition according to either a specified list of methods, or the us...
[ "r", "Method", "to", "create", "a", "plot", "of", "the", "property", "vs", "pressure", "at", "a", "specified", "temperature", "and", "composition", "according", "to", "either", "a", "specified", "list", "of", "methods", "or", "the", "user", "methods", "(", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3485-L3561
[ "def", "plot_isotherm", "(", "self", ",", "T", ",", "zs", ",", "ws", ",", "Pmin", "=", "None", ",", "Pmax", "=", "None", ",", "methods", "=", "[", "]", ",", "pts", "=", "50", ",", "only_valid", "=", "True", ")", ":", "# pragma: no cover", "# This f...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
MixtureProperty.plot_isobar
r'''Method to create a plot of the property vs temperature at a specific pressure and composition according to either a specified list of methods, or user methods (if set), or all methods. User-selectable number of points, and temperature range. If only_valid is set,`test_method_validit...
thermo/utils.py
def plot_isobar(self, P, zs, ws, Tmin=None, Tmax=None, methods=[], pts=50, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs temperature at a specific pressure and composition according to either a specified list of methods, or user methods...
def plot_isobar(self, P, zs, ws, Tmin=None, Tmax=None, methods=[], pts=50, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs temperature at a specific pressure and composition according to either a specified list of methods, or user methods...
[ "r", "Method", "to", "create", "a", "plot", "of", "the", "property", "vs", "temperature", "at", "a", "specific", "pressure", "and", "composition", "according", "to", "either", "a", "specified", "list", "of", "methods", "or", "user", "methods", "(", "if", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3564-L3640
[ "def", "plot_isobar", "(", "self", ",", "P", ",", "zs", ",", "ws", ",", "Tmin", "=", "None", ",", "Tmax", "=", "None", ",", "methods", "=", "[", "]", ",", "pts", "=", "50", ",", "only_valid", "=", "True", ")", ":", "# pragma: no cover", "if", "no...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
MixtureProperty.plot_property
r'''Method to create a plot of the property vs temperature and pressure according to either a specified list of methods, or user methods (if set), or all methods. User-selectable number of points for each variable. If only_valid is set,`test_method_validity` will be used to check if e...
thermo/utils.py
def plot_property(self, zs, ws, Tmin=None, Tmax=None, Pmin=1E5, Pmax=1E6, methods=[], pts=15, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs temperature and pressure according to either a specified list of methods, or user methods (if ...
def plot_property(self, zs, ws, Tmin=None, Tmax=None, Pmin=1E5, Pmax=1E6, methods=[], pts=15, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs temperature and pressure according to either a specified list of methods, or user methods (if ...
[ "r", "Method", "to", "create", "a", "plot", "of", "the", "property", "vs", "temperature", "and", "pressure", "according", "to", "either", "a", "specified", "list", "of", "methods", "or", "user", "methods", "(", "if", "set", ")", "or", "all", "methods", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3643-L3746
[ "def", "plot_property", "(", "self", ",", "zs", ",", "ws", ",", "Tmin", "=", "None", ",", "Tmax", "=", "None", ",", "Pmin", "=", "1E5", ",", "Pmax", "=", "1E6", ",", "methods", "=", "[", "]", ",", "pts", "=", "15", ",", "only_valid", "=", "True...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
refractive_index
r'''This function handles the retrieval of a chemical's refractive index. Lookup is based on CASRNs. Will automatically select a data source to use if no Method is provided; returns None if the data is not available. Function has data for approximately 4500 chemicals. Parameters ---------- CAS...
thermo/refractivity.py
def refractive_index(CASRN, T=None, AvailableMethods=False, Method=None, full_info=True): r'''This function handles the retrieval of a chemical's refractive index. Lookup is based on CASRNs. Will automatically select a data source to use if no Method is provided; returns None if the dat...
def refractive_index(CASRN, T=None, AvailableMethods=False, Method=None, full_info=True): r'''This function handles the retrieval of a chemical's refractive index. Lookup is based on CASRNs. Will automatically select a data source to use if no Method is provided; returns None if the dat...
[ "r", "This", "function", "handles", "the", "retrieval", "of", "a", "chemical", "s", "refractive", "index", ".", "Lookup", "is", "based", "on", "CASRNs", ".", "Will", "automatically", "select", "a", "data", "source", "to", "use", "if", "no", "Method", "is",...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/refractivity.py#L44-L116
[ "def", "refractive_index", "(", "CASRN", ",", "T", "=", "None", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ",", "full_info", "=", "True", ")", ":", "def", "list_methods", "(", ")", ":", "methods", "=", "[", "]", "if", "CASRN", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
GCEOSMIX.a_alpha_and_derivatives
r'''Method to calculate `a_alpha` and its first and second derivatives for an EOS with the Van der Waals mixing rules. Uses the parent class's interface to compute pure component values. Returns `a_alpha`, `da_alpha_dT`, and `d2a_alpha_dT2`. Calls `setup_a_alpha_and_derivatives` before ...
thermo/eos_mix.py
def a_alpha_and_derivatives(self, T, full=True, quick=True): r'''Method to calculate `a_alpha` and its first and second derivatives for an EOS with the Van der Waals mixing rules. Uses the parent class's interface to compute pure component values. Returns `a_alpha`, `da_alpha_dT`, and `d...
def a_alpha_and_derivatives(self, T, full=True, quick=True): r'''Method to calculate `a_alpha` and its first and second derivatives for an EOS with the Van der Waals mixing rules. Uses the parent class's interface to compute pure component values. Returns `a_alpha`, `da_alpha_dT`, and `d...
[ "r", "Method", "to", "calculate", "a_alpha", "and", "its", "first", "and", "second", "derivatives", "for", "an", "EOS", "with", "the", "Van", "der", "Waals", "mixing", "rules", ".", "Uses", "the", "parent", "class", "s", "interface", "to", "compute", "pure...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L70-L163
[ "def", "a_alpha_and_derivatives", "(", "self", ",", "T", ",", "full", "=", "True", ",", "quick", "=", "True", ")", ":", "zs", ",", "kijs", "=", "self", ".", "zs", ",", "self", ".", "kijs", "a_alphas", ",", "da_alpha_dTs", ",", "d2a_alpha_dT2s", "=", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
GCEOSMIX.fugacities
r'''Helper method for calculating fugacity coefficients for any phases present, using either the overall mole fractions for both phases or using specified mole fractions for each phase. Requires `fugacity_coefficients` to be implemented by each subclassing EOS. ...
thermo/eos_mix.py
def fugacities(self, xs=None, ys=None): r'''Helper method for calculating fugacity coefficients for any phases present, using either the overall mole fractions for both phases or using specified mole fractions for each phase. Requires `fugacity_coefficients` to be implemente...
def fugacities(self, xs=None, ys=None): r'''Helper method for calculating fugacity coefficients for any phases present, using either the overall mole fractions for both phases or using specified mole fractions for each phase. Requires `fugacity_coefficients` to be implemente...
[ "r", "Helper", "method", "for", "calculating", "fugacity", "coefficients", "for", "any", "phases", "present", "using", "either", "the", "overall", "mole", "fractions", "for", "both", "phases", "or", "using", "specified", "mole", "fractions", "for", "each", "phas...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L165-L228
[ "def", "fugacities", "(", "self", ",", "xs", "=", "None", ",", "ys", "=", "None", ")", ":", "if", "self", ".", "phase", "in", "[", "'l'", ",", "'l/g'", "]", ":", "if", "xs", "is", "None", ":", "xs", "=", "self", ".", "zs", "self", ".", "phis_...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
GCEOSMIX.solve_T
r'''Generic method to calculate `T` from a specified `P` and `V`. Provides SciPy's `newton` solver, and iterates to solve the general equation for `P`, recalculating `a_alpha` as a function of temperature using `a_alpha_and_derivatives` each iteration. Parameters ---------- ...
thermo/eos_mix.py
def solve_T(self, P, V, quick=True): r'''Generic method to calculate `T` from a specified `P` and `V`. Provides SciPy's `newton` solver, and iterates to solve the general equation for `P`, recalculating `a_alpha` as a function of temperature using `a_alpha_and_derivatives` each iteration...
def solve_T(self, P, V, quick=True): r'''Generic method to calculate `T` from a specified `P` and `V`. Provides SciPy's `newton` solver, and iterates to solve the general equation for `P`, recalculating `a_alpha` as a function of temperature using `a_alpha_and_derivatives` each iteration...
[ "r", "Generic", "method", "to", "calculate", "T", "from", "a", "specified", "P", "and", "V", ".", "Provides", "SciPy", "s", "newton", "solver", "and", "iterates", "to", "solve", "the", "general", "equation", "for", "P", "recalculating", "a_alpha", "as", "a...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L330-L353
[ "def", "solve_T", "(", "self", ",", "P", ",", "V", ",", "quick", "=", "True", ")", ":", "self", ".", "Tc", "=", "sum", "(", "self", ".", "Tcs", ")", "/", "self", ".", "N", "# -4 goes back from object, GCEOS", "return", "super", "(", "type", "(", "s...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
PRMIX.setup_a_alpha_and_derivatives
r'''Sets `a`, `kappa`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.
thermo/eos_mix.py
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `kappa`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.''' self.a, self.kappa, self....
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `kappa`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.''' self.a, self.kappa, self....
[ "r", "Sets", "a", "kappa", "and", "Tc", "for", "a", "specific", "component", "before", "the", "pure", "-", "species", "EOS", "s", "a_alpha_and_derivatives", "method", "is", "called", ".", "Both", "are", "called", "by", "GCEOSMIX", ".", "a_alpha_and_derivatives...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L459-L463
[ "def", "setup_a_alpha_and_derivatives", "(", "self", ",", "i", ",", "T", "=", "None", ")", ":", "self", ".", "a", ",", "self", ".", "kappa", ",", "self", ".", "Tc", "=", "self", ".", "ais", "[", "i", "]", ",", "self", ".", "kappas", "[", "i", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
SRKMIX.setup_a_alpha_and_derivatives
r'''Sets `a`, `m`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.
thermo/eos_mix.py
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `m`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.''' self.a, self.m, self.Tc = sel...
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `m`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.''' self.a, self.m, self.Tc = sel...
[ "r", "Sets", "a", "m", "and", "Tc", "for", "a", "specific", "component", "before", "the", "pure", "-", "species", "EOS", "s", "a_alpha_and_derivatives", "method", "is", "called", ".", "Both", "are", "called", "by", "GCEOSMIX", ".", "a_alpha_and_derivatives", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L618-L622
[ "def", "setup_a_alpha_and_derivatives", "(", "self", ",", "i", ",", "T", "=", "None", ")", ":", "self", ".", "a", ",", "self", ".", "m", ",", "self", ".", "Tc", "=", "self", ".", "ais", "[", "i", "]", ",", "self", ".", "ms", "[", "i", "]", ",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
SRKMIX.fugacity_coefficients
r'''Literature formula for calculating fugacity coefficients for each species in a mixture. Verified numerically. Applicable to most derivatives of the SRK equation of state as well. Called by `fugacities` on initialization, or by a solver routine which is performing a flash calculatio...
thermo/eos_mix.py
def fugacity_coefficients(self, Z, zs): r'''Literature formula for calculating fugacity coefficients for each species in a mixture. Verified numerically. Applicable to most derivatives of the SRK equation of state as well. Called by `fugacities` on initialization, or by a solver routine...
def fugacity_coefficients(self, Z, zs): r'''Literature formula for calculating fugacity coefficients for each species in a mixture. Verified numerically. Applicable to most derivatives of the SRK equation of state as well. Called by `fugacities` on initialization, or by a solver routine...
[ "r", "Literature", "formula", "for", "calculating", "fugacity", "coefficients", "for", "each", "species", "in", "a", "mixture", ".", "Verified", "numerically", ".", "Applicable", "to", "most", "derivatives", "of", "the", "SRK", "equation", "of", "state", "as", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L630-L676
[ "def", "fugacity_coefficients", "(", "self", ",", "Z", ",", "zs", ")", ":", "A", "=", "self", ".", "a_alpha", "*", "self", ".", "P", "/", "R2", "/", "self", ".", "T", "**", "2", "B", "=", "self", ".", "b", "*", "self", ".", "P", "/", "R", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
VDWMIX.fugacity_coefficients
r'''Literature formula for calculating fugacity coefficients for each species in a mixture. Verified numerically. Called by `fugacities` on initialization, or by a solver routine which is performing a flash calculation. .. math:: \ln \hat \phi_i = \frac{b_i}{V-b} - ...
thermo/eos_mix.py
def fugacity_coefficients(self, Z, zs): r'''Literature formula for calculating fugacity coefficients for each species in a mixture. Verified numerically. Called by `fugacities` on initialization, or by a solver routine which is performing a flash calculation. .. math:: ...
def fugacity_coefficients(self, Z, zs): r'''Literature formula for calculating fugacity coefficients for each species in a mixture. Verified numerically. Called by `fugacities` on initialization, or by a solver routine which is performing a flash calculation. .. math:: ...
[ "r", "Literature", "formula", "for", "calculating", "fugacity", "coefficients", "for", "each", "species", "in", "a", "mixture", ".", "Verified", "numerically", ".", "Called", "by", "fugacities", "on", "initialization", "or", "by", "a", "solver", "routine", "whic...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L880-L912
[ "def", "fugacity_coefficients", "(", "self", ",", "Z", ",", "zs", ")", ":", "phis", "=", "[", "]", "V", "=", "Z", "*", "R", "*", "self", ".", "T", "/", "self", ".", "P", "for", "i", "in", "self", ".", "cmps", ":", "phi", "=", "self", ".", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
PRSVMIX.setup_a_alpha_and_derivatives
r'''Sets `a`, `kappa0`, `kappa1`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.
thermo/eos_mix.py
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `kappa0`, `kappa1`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.''' if not hasattr...
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `kappa0`, `kappa1`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.''' if not hasattr...
[ "r", "Sets", "a", "kappa0", "kappa1", "and", "Tc", "for", "a", "specific", "component", "before", "the", "pure", "-", "species", "EOS", "s", "a_alpha_and_derivatives", "method", "is", "called", ".", "Both", "are", "called", "by", "GCEOSMIX", ".", "a_alpha_an...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L1050-L1056
[ "def", "setup_a_alpha_and_derivatives", "(", "self", ",", "i", ",", "T", "=", "None", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'kappas'", ")", ":", "self", ".", "kappas", "=", "[", "kappa0", "+", "kappa1", "*", "(", "1", "+", "(", "T", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
PRSVMIX.cleanup_a_alpha_and_derivatives
r'''Removes properties set by `setup_a_alpha_and_derivatives`; run by `GCEOSMIX.a_alpha_and_derivatives` after `a_alpha` is calculated for every component
thermo/eos_mix.py
def cleanup_a_alpha_and_derivatives(self): r'''Removes properties set by `setup_a_alpha_and_derivatives`; run by `GCEOSMIX.a_alpha_and_derivatives` after `a_alpha` is calculated for every component''' del(self.a, self.kappa, self.kappa0, self.kappa1, self.Tc)
def cleanup_a_alpha_and_derivatives(self): r'''Removes properties set by `setup_a_alpha_and_derivatives`; run by `GCEOSMIX.a_alpha_and_derivatives` after `a_alpha` is calculated for every component''' del(self.a, self.kappa, self.kappa0, self.kappa1, self.Tc)
[ "r", "Removes", "properties", "set", "by", "setup_a_alpha_and_derivatives", ";", "run", "by", "GCEOSMIX", ".", "a_alpha_and_derivatives", "after", "a_alpha", "is", "calculated", "for", "every", "component" ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L1058-L1062
[ "def", "cleanup_a_alpha_and_derivatives", "(", "self", ")", ":", "del", "(", "self", ".", "a", ",", "self", ".", "kappa", ",", "self", ".", "kappa0", ",", "self", ".", "kappa1", ",", "self", ".", "Tc", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
PRSV2MIX.setup_a_alpha_and_derivatives
r'''Sets `a`, `kappa`, `kappa0`, `kappa1`, `kappa2`, `kappa3` and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.
thermo/eos_mix.py
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `kappa`, `kappa0`, `kappa1`, `kappa2`, `kappa3` and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every ...
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `kappa`, `kappa0`, `kappa1`, `kappa2`, `kappa3` and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every ...
[ "r", "Sets", "a", "kappa", "kappa0", "kappa1", "kappa2", "kappa3", "and", "Tc", "for", "a", "specific", "component", "before", "the", "pure", "-", "species", "EOS", "s", "a_alpha_and_derivatives", "method", "is", "called", ".", "Both", "are", "called", "by",...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L1196-L1210
[ "def", "setup_a_alpha_and_derivatives", "(", "self", ",", "i", ",", "T", "=", "None", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'kappas'", ")", ":", "self", ".", "kappas", "=", "[", "]", "for", "Tc", ",", "kappa0", ",", "kappa1", ",", "k...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
PRSV2MIX.cleanup_a_alpha_and_derivatives
r'''Removes properties set by `setup_a_alpha_and_derivatives`; run by `GCEOSMIX.a_alpha_and_derivatives` after `a_alpha` is calculated for every component
thermo/eos_mix.py
def cleanup_a_alpha_and_derivatives(self): r'''Removes properties set by `setup_a_alpha_and_derivatives`; run by `GCEOSMIX.a_alpha_and_derivatives` after `a_alpha` is calculated for every component''' del(self.a, self.kappa, self.kappa0, self.kappa1, self.kappa2, self.kappa3, self.Tc)
def cleanup_a_alpha_and_derivatives(self): r'''Removes properties set by `setup_a_alpha_and_derivatives`; run by `GCEOSMIX.a_alpha_and_derivatives` after `a_alpha` is calculated for every component''' del(self.a, self.kappa, self.kappa0, self.kappa1, self.kappa2, self.kappa3, self.Tc)
[ "r", "Removes", "properties", "set", "by", "setup_a_alpha_and_derivatives", ";", "run", "by", "GCEOSMIX", ".", "a_alpha_and_derivatives", "after", "a_alpha", "is", "calculated", "for", "every", "component" ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L1212-L1216
[ "def", "cleanup_a_alpha_and_derivatives", "(", "self", ")", ":", "del", "(", "self", ".", "a", ",", "self", ".", "kappa", ",", "self", ".", "kappa0", ",", "self", ".", "kappa1", ",", "self", ".", "kappa2", ",", "self", ".", "kappa3", ",", "self", "."...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TWUPRMIX.setup_a_alpha_and_derivatives
r'''Sets `a`, `omega`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.
thermo/eos_mix.py
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `omega`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.''' self.a, self.Tc, self.ome...
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `omega`, and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.''' self.a, self.Tc, self.ome...
[ "r", "Sets", "a", "omega", "and", "Tc", "for", "a", "specific", "component", "before", "the", "pure", "-", "species", "EOS", "s", "a_alpha_and_derivatives", "method", "is", "called", ".", "Both", "are", "called", "by", "GCEOSMIX", ".", "a_alpha_and_derivatives...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L1323-L1327
[ "def", "setup_a_alpha_and_derivatives", "(", "self", ",", "i", ",", "T", "=", "None", ")", ":", "self", ".", "a", ",", "self", ".", "Tc", ",", "self", ".", "omega", "=", "self", ".", "ais", "[", "i", "]", ",", "self", ".", "Tcs", "[", "i", "]",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
APISRKMIX.setup_a_alpha_and_derivatives
r'''Sets `a`, `S1`, `S2` and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.
thermo/eos_mix.py
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `S1`, `S2` and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.''' self.a, self.Tc, self.S...
def setup_a_alpha_and_derivatives(self, i, T=None): r'''Sets `a`, `S1`, `S2` and `Tc` for a specific component before the pure-species EOS's `a_alpha_and_derivatives` method is called. Both are called by `GCEOSMIX.a_alpha_and_derivatives` for every component.''' self.a, self.Tc, self.S...
[ "r", "Sets", "a", "S1", "S2", "and", "Tc", "for", "a", "specific", "component", "before", "the", "pure", "-", "species", "EOS", "s", "a_alpha_and_derivatives", "method", "is", "called", ".", "Both", "are", "called", "by", "GCEOSMIX", ".", "a_alpha_and_deriva...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L1561-L1565
[ "def", "setup_a_alpha_and_derivatives", "(", "self", ",", "i", ",", "T", "=", "None", ")", ":", "self", ".", "a", ",", "self", ".", "Tc", ",", "self", ".", "S1", ",", "self", ".", "S2", "=", "self", ".", "ais", "[", "i", "]", ",", "self", ".", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
APISRKMIX.cleanup_a_alpha_and_derivatives
r'''Removes properties set by `setup_a_alpha_and_derivatives`; run by `GCEOSMIX.a_alpha_and_derivatives` after `a_alpha` is calculated for every component
thermo/eos_mix.py
def cleanup_a_alpha_and_derivatives(self): r'''Removes properties set by `setup_a_alpha_and_derivatives`; run by `GCEOSMIX.a_alpha_and_derivatives` after `a_alpha` is calculated for every component''' del(self.a, self.Tc, self.S1, self.S2)
def cleanup_a_alpha_and_derivatives(self): r'''Removes properties set by `setup_a_alpha_and_derivatives`; run by `GCEOSMIX.a_alpha_and_derivatives` after `a_alpha` is calculated for every component''' del(self.a, self.Tc, self.S1, self.S2)
[ "r", "Removes", "properties", "set", "by", "setup_a_alpha_and_derivatives", ";", "run", "by", "GCEOSMIX", ".", "a_alpha_and_derivatives", "after", "a_alpha", "is", "calculated", "for", "every", "component" ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/eos_mix.py#L1567-L1571
[ "def", "cleanup_a_alpha_and_derivatives", "(", "self", ")", ":", "del", "(", "self", ".", "a", ",", "self", ".", "Tc", ",", "self", ".", "S1", ",", "self", ".", "S2", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Sato_Riedel
r'''Calculate the thermal conductivity of a liquid as a function of temperature using the CSP method of Sato-Riedel [1]_, [2]_, published in Reid [3]_. Requires temperature, molecular weight, and boiling and critical temperatures. .. math:: k = \frac{1.1053}{\sqrt{MW}}\frac{3+20(1-T_r)^{2/3}} ...
thermo/thermal_conductivity.py
def Sato_Riedel(T, M, Tb, Tc): r'''Calculate the thermal conductivity of a liquid as a function of temperature using the CSP method of Sato-Riedel [1]_, [2]_, published in Reid [3]_. Requires temperature, molecular weight, and boiling and critical temperatures. .. math:: k = \frac{1.1053}{\...
def Sato_Riedel(T, M, Tb, Tc): r'''Calculate the thermal conductivity of a liquid as a function of temperature using the CSP method of Sato-Riedel [1]_, [2]_, published in Reid [3]_. Requires temperature, molecular weight, and boiling and critical temperatures. .. math:: k = \frac{1.1053}{\...
[ "r", "Calculate", "the", "thermal", "conductivity", "of", "a", "liquid", "as", "a", "function", "of", "temperature", "using", "the", "CSP", "method", "of", "Sato", "-", "Riedel", "[", "1", "]", "_", "[", "2", "]", "_", "published", "in", "Reid", "[", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L113-L157
[ "def", "Sato_Riedel", "(", "T", ",", "M", ",", "Tb", ",", "Tc", ")", ":", "Tr", "=", "T", "/", "Tc", "Tbr", "=", "Tb", "/", "Tc", "return", "1.1053", "*", "(", "3.", "+", "20.", "*", "(", "1", "-", "Tr", ")", "**", "(", "2", "/", "3.", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Gharagheizi_liquid
r'''Estimates the thermal conductivity of a liquid as a function of temperature using the CSP method of Gharagheizi [1]_. A convoluted method claiming high-accuracy and using only statistically significant variable following analalysis. Requires temperature, molecular weight, boiling temperature and c...
thermo/thermal_conductivity.py
def Gharagheizi_liquid(T, M, Tb, Pc, omega): r'''Estimates the thermal conductivity of a liquid as a function of temperature using the CSP method of Gharagheizi [1]_. A convoluted method claiming high-accuracy and using only statistically significant variable following analalysis. Requires tempera...
def Gharagheizi_liquid(T, M, Tb, Pc, omega): r'''Estimates the thermal conductivity of a liquid as a function of temperature using the CSP method of Gharagheizi [1]_. A convoluted method claiming high-accuracy and using only statistically significant variable following analalysis. Requires tempera...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "liquid", "as", "a", "function", "of", "temperature", "using", "the", "CSP", "method", "of", "Gharagheizi", "[", "1", "]", "_", ".", "A", "convoluted", "method", "claiming", "high", "-", "accur...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L200-L259
[ "def", "Gharagheizi_liquid", "(", "T", ",", "M", ",", "Tb", ",", "Pc", ",", "omega", ")", ":", "Pc", "=", "Pc", "/", "1E5", "B", "=", "16.0407", "*", "M", "+", "2.", "*", "Tb", "-", "27.9074", "A", "=", "3.8588", "*", "M", "**", "8", "*", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Nicola_original
r'''Estimates the thermal conductivity of a liquid as a function of temperature using the CSP method of Nicola [1]_. A simpler but long method claiming high-accuracy and using only statistically significant variable following analalysis. Requires temperature, molecular weight, critical temperature, ac...
thermo/thermal_conductivity.py
def Nicola_original(T, M, Tc, omega, Hfus): r'''Estimates the thermal conductivity of a liquid as a function of temperature using the CSP method of Nicola [1]_. A simpler but long method claiming high-accuracy and using only statistically significant variable following analalysis. Requires tempera...
def Nicola_original(T, M, Tc, omega, Hfus): r'''Estimates the thermal conductivity of a liquid as a function of temperature using the CSP method of Nicola [1]_. A simpler but long method claiming high-accuracy and using only statistically significant variable following analalysis. Requires tempera...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "liquid", "as", "a", "function", "of", "temperature", "using", "the", "CSP", "method", "of", "Nicola", "[", "1", "]", "_", ".", "A", "simpler", "but", "long", "method", "claiming", "high", "-...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L262-L314
[ "def", "Nicola_original", "(", "T", ",", "M", ",", "Tc", ",", "omega", ",", "Hfus", ")", ":", "Tr", "=", "T", "/", "Tc", "Hfus", "=", "Hfus", "*", "1000", "return", "-", "0.5694", "-", "0.1436", "*", "Tr", "+", "5.4893E-10", "*", "Hfus", "+", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Nicola
r'''Estimates the thermal conductivity of a liquid as a function of temperature using the CSP method of [1]_. A statistically derived equation using any correlated terms. Requires temperature, molecular weight, critical temperature and pressure, and acentric factor. .. math:: \frac{\lambda...
thermo/thermal_conductivity.py
def Nicola(T, M, Tc, Pc, omega): r'''Estimates the thermal conductivity of a liquid as a function of temperature using the CSP method of [1]_. A statistically derived equation using any correlated terms. Requires temperature, molecular weight, critical temperature and pressure, and acentric factor....
def Nicola(T, M, Tc, Pc, omega): r'''Estimates the thermal conductivity of a liquid as a function of temperature using the CSP method of [1]_. A statistically derived equation using any correlated terms. Requires temperature, molecular weight, critical temperature and pressure, and acentric factor....
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "liquid", "as", "a", "function", "of", "temperature", "using", "the", "CSP", "method", "of", "[", "1", "]", "_", ".", "A", "statistically", "derived", "equation", "using", "any", "correlated", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L317-L366
[ "def", "Nicola", "(", "T", ",", "M", ",", "Tc", ",", "Pc", ",", "omega", ")", ":", "Tr", "=", "T", "/", "Tc", "Pc", "=", "Pc", "/", "1E5", "return", "0.5147", "*", "(", "-", "0.2537", "*", "Tr", "+", "0.0017", "*", "Pc", "+", "0.1501", "*",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Bahadori_liquid
r'''Estimates the thermal conductivity of parafin liquid hydrocarbons. Fits their data well, and is useful as only MW is required. X is the Molecular weight, and Y the temperature. .. math:: K = a + bY + CY^2 + dY^3 a = A_1 + B_1 X + C_1 X^2 + D_1 X^3 b = A_2 + B_2 X + C_2 X^2 + D...
thermo/thermal_conductivity.py
def Bahadori_liquid(T, M): r'''Estimates the thermal conductivity of parafin liquid hydrocarbons. Fits their data well, and is useful as only MW is required. X is the Molecular weight, and Y the temperature. .. math:: K = a + bY + CY^2 + dY^3 a = A_1 + B_1 X + C_1 X^2 + D_1 X^3 ...
def Bahadori_liquid(T, M): r'''Estimates the thermal conductivity of parafin liquid hydrocarbons. Fits their data well, and is useful as only MW is required. X is the Molecular weight, and Y the temperature. .. math:: K = a + bY + CY^2 + dY^3 a = A_1 + B_1 X + C_1 X^2 + D_1 X^3 ...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "parafin", "liquid", "hydrocarbons", ".", "Fits", "their", "data", "well", "and", "is", "useful", "as", "only", "MW", "is", "required", ".", "X", "is", "the", "Molecular", "weight", "and", "Y", "the...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L369-L423
[ "def", "Bahadori_liquid", "(", "T", ",", "M", ")", ":", "A", "=", "[", "-", "6.48326E-2", ",", "2.715015E-3", ",", "-", "1.08580E-5", ",", "9.853917E-9", "]", "B", "=", "[", "1.565612E-2", ",", "-", "1.55833E-4", ",", "5.051114E-7", ",", "-", "4.68030E...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mersmann_Kind_thermal_conductivity_liquid
r'''Estimates the thermal conductivity of organic liquid substances according to the method of [1]_. .. math:: \lambda^* = \frac{\lambda\cdot V_c^{2/3}\cdot T_c\cdot \text{MW}^{0.5}} {(k\cdot T_c)^{1.5}\cdot N_A^{7/6}} \lambda^* = \frac{2}{3}\left(n_a + 40\sqrt{1-T_r}\right) ...
thermo/thermal_conductivity.py
def Mersmann_Kind_thermal_conductivity_liquid(T, MW, Tc, Vc, atoms): r'''Estimates the thermal conductivity of organic liquid substances according to the method of [1]_. .. math:: \lambda^* = \frac{\lambda\cdot V_c^{2/3}\cdot T_c\cdot \text{MW}^{0.5}} {(k\cdot T_c)^{1.5}\cdot N_A^{7/6}} ...
def Mersmann_Kind_thermal_conductivity_liquid(T, MW, Tc, Vc, atoms): r'''Estimates the thermal conductivity of organic liquid substances according to the method of [1]_. .. math:: \lambda^* = \frac{\lambda\cdot V_c^{2/3}\cdot T_c\cdot \text{MW}^{0.5}} {(k\cdot T_c)^{1.5}\cdot N_A^{7/6}} ...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "organic", "liquid", "substances", "according", "to", "the", "method", "of", "[", "1", "]", "_", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L426-L479
[ "def", "Mersmann_Kind_thermal_conductivity_liquid", "(", "T", ",", "MW", ",", "Tc", ",", "Vc", ",", "atoms", ")", ":", "na", "=", "sum", "(", "atoms", ".", "values", "(", ")", ")", "lambda_star", "=", "2", "/", "3.", "*", "(", "na", "+", "40.", "*"...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
DIPPR9G
r'''Adjustes for pressure the thermal conductivity of a liquid using an emperical formula based on [1]_, but as given in [2]_. .. math:: k = k^* \left[ 0.98 + 0.0079 P_r T_r^{1.4} + 0.63 T_r^{1.2} \left( \frac{P_r}{30 + P_r}\right)\right] Parameters ---------- T : float Tem...
thermo/thermal_conductivity.py
def DIPPR9G(T, P, Tc, Pc, kl): r'''Adjustes for pressure the thermal conductivity of a liquid using an emperical formula based on [1]_, but as given in [2]_. .. math:: k = k^* \left[ 0.98 + 0.0079 P_r T_r^{1.4} + 0.63 T_r^{1.2} \left( \frac{P_r}{30 + P_r}\right)\right] Parameters -...
def DIPPR9G(T, P, Tc, Pc, kl): r'''Adjustes for pressure the thermal conductivity of a liquid using an emperical formula based on [1]_, but as given in [2]_. .. math:: k = k^* \left[ 0.98 + 0.0079 P_r T_r^{1.4} + 0.63 T_r^{1.2} \left( \frac{P_r}{30 + P_r}\right)\right] Parameters -...
[ "r", "Adjustes", "for", "pressure", "the", "thermal", "conductivity", "of", "a", "liquid", "using", "an", "emperical", "formula", "based", "on", "[", "1", "]", "_", "but", "as", "given", "in", "[", "2", "]", "_", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L951-L1001
[ "def", "DIPPR9G", "(", "T", ",", "P", ",", "Tc", ",", "Pc", ",", "kl", ")", ":", "Tr", "=", "T", "/", "Tc", "Pr", "=", "P", "/", "Pc", "return", "kl", "*", "(", "0.98", "+", "0.0079", "*", "Pr", "*", "Tr", "**", "1.4", "+", "0.63", "*", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Missenard
r'''Adjustes for pressure the thermal conductivity of a liquid using an emperical formula based on [1]_, but as given in [2]_. .. math:: \frac{k}{k^*} = 1 + Q P_r^{0.7} Parameters ---------- T : float Temperature of fluid [K] P : float Pressure of fluid [Pa] Tc: flo...
thermo/thermal_conductivity.py
def Missenard(T, P, Tc, Pc, kl): r'''Adjustes for pressure the thermal conductivity of a liquid using an emperical formula based on [1]_, but as given in [2]_. .. math:: \frac{k}{k^*} = 1 + Q P_r^{0.7} Parameters ---------- T : float Temperature of fluid [K] P : float ...
def Missenard(T, P, Tc, Pc, kl): r'''Adjustes for pressure the thermal conductivity of a liquid using an emperical formula based on [1]_, but as given in [2]_. .. math:: \frac{k}{k^*} = 1 + Q P_r^{0.7} Parameters ---------- T : float Temperature of fluid [K] P : float ...
[ "r", "Adjustes", "for", "pressure", "the", "thermal", "conductivity", "of", "a", "liquid", "using", "an", "emperical", "formula", "based", "on", "[", "1", "]", "_", "but", "as", "given", "in", "[", "2", "]", "_", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1013-L1061
[ "def", "Missenard", "(", "T", ",", "P", ",", "Tc", ",", "Pc", ",", "kl", ")", ":", "Tr", "=", "T", "/", "Tc", "Pr", "=", "P", "/", "Pc", "Q", "=", "float", "(", "Qfunc_Missenard", "(", "Pr", ",", "Tr", ")", ")", "return", "kl", "*", "(", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
DIPPR9H
r'''Calculates thermal conductivity of a liquid mixture according to mixing rules in [1]_ and also in [2]_. .. math:: \lambda_m = \left( \sum_i w_i \lambda_i^{-2}\right)^{-1/2} Parameters ---------- ws : float Mass fractions of components ks : float Liquid thermal condu...
thermo/thermal_conductivity.py
def DIPPR9H(ws, ks): r'''Calculates thermal conductivity of a liquid mixture according to mixing rules in [1]_ and also in [2]_. .. math:: \lambda_m = \left( \sum_i w_i \lambda_i^{-2}\right)^{-1/2} Parameters ---------- ws : float Mass fractions of components ks : float ...
def DIPPR9H(ws, ks): r'''Calculates thermal conductivity of a liquid mixture according to mixing rules in [1]_ and also in [2]_. .. math:: \lambda_m = \left( \sum_i w_i \lambda_i^{-2}\right)^{-1/2} Parameters ---------- ws : float Mass fractions of components ks : float ...
[ "r", "Calculates", "thermal", "conductivity", "of", "a", "liquid", "mixture", "according", "to", "mixing", "rules", "in", "[", "1", "]", "_", "and", "also", "in", "[", "2", "]", "_", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1066-L1110
[ "def", "DIPPR9H", "(", "ws", ",", "ks", ")", ":", "if", "not", "none_and_length_check", "(", "[", "ks", ",", "ws", "]", ")", ":", "# check same-length inputs", "raise", "Exception", "(", "'Function inputs are incorrect format'", ")", "return", "sum", "(", "ws"...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Filippov
r'''Calculates thermal conductivity of a binary liquid mixture according to mixing rules in [2]_ as found in [1]_. .. math:: \lambda_m = w_1 \lambda_1 + w_2\lambda_2 - 0.72 w_1 w_2(\lambda_2-\lambda_1) Parameters ---------- ws : float Mass fractions of components ks : f...
thermo/thermal_conductivity.py
def Filippov(ws, ks): r'''Calculates thermal conductivity of a binary liquid mixture according to mixing rules in [2]_ as found in [1]_. .. math:: \lambda_m = w_1 \lambda_1 + w_2\lambda_2 - 0.72 w_1 w_2(\lambda_2-\lambda_1) Parameters ---------- ws : float Mass fraction...
def Filippov(ws, ks): r'''Calculates thermal conductivity of a binary liquid mixture according to mixing rules in [2]_ as found in [1]_. .. math:: \lambda_m = w_1 \lambda_1 + w_2\lambda_2 - 0.72 w_1 w_2(\lambda_2-\lambda_1) Parameters ---------- ws : float Mass fraction...
[ "r", "Calculates", "thermal", "conductivity", "of", "a", "binary", "liquid", "mixture", "according", "to", "mixing", "rules", "in", "[", "2", "]", "_", "as", "found", "in", "[", "1", "]", "_", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1113-L1155
[ "def", "Filippov", "(", "ws", ",", "ks", ")", ":", "if", "not", "none_and_length_check", "(", "[", "ks", ",", "ws", "]", ",", "2", ")", ":", "# check same-length inputs", "raise", "Exception", "(", "'Function inputs are incorrect format'", ")", "return", "ws",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Eucken
r'''Estimates the thermal conductivity of a gas as a function of temperature using the CSP method of Eucken [1]_. .. math:: \frac{\lambda M}{\eta C_v} = 1 + \frac{9/4}{C_v/R} Parameters ---------- MW : float Molecular weight of the gas [g/mol] Cvm : float Molar contant ...
thermo/thermal_conductivity.py
def Eucken(MW, Cvm, mu): r'''Estimates the thermal conductivity of a gas as a function of temperature using the CSP method of Eucken [1]_. .. math:: \frac{\lambda M}{\eta C_v} = 1 + \frac{9/4}{C_v/R} Parameters ---------- MW : float Molecular weight of the gas [g/mol] Cvm :...
def Eucken(MW, Cvm, mu): r'''Estimates the thermal conductivity of a gas as a function of temperature using the CSP method of Eucken [1]_. .. math:: \frac{\lambda M}{\eta C_v} = 1 + \frac{9/4}{C_v/R} Parameters ---------- MW : float Molecular weight of the gas [g/mol] Cvm :...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "gas", "as", "a", "function", "of", "temperature", "using", "the", "CSP", "method", "of", "Eucken", "[", "1", "]", "_", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1351-L1391
[ "def", "Eucken", "(", "MW", ",", "Cvm", ",", "mu", ")", ":", "MW", "=", "MW", "/", "1000.", "return", "(", "1.", "+", "9", "/", "4.", "/", "(", "Cvm", "/", "R", ")", ")", "*", "mu", "*", "Cvm", "/", "MW" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Eucken_modified
r'''Estimates the thermal conductivity of a gas as a function of temperature using the Modified CSP method of Eucken [1]_. .. math:: \frac{\lambda M}{\eta C_v} = 1.32 + \frac{1.77}{C_v/R} Parameters ---------- MW : float Molecular weight of the gas [g/mol] Cvm : float M...
thermo/thermal_conductivity.py
def Eucken_modified(MW, Cvm, mu): r'''Estimates the thermal conductivity of a gas as a function of temperature using the Modified CSP method of Eucken [1]_. .. math:: \frac{\lambda M}{\eta C_v} = 1.32 + \frac{1.77}{C_v/R} Parameters ---------- MW : float Molecular weight of the...
def Eucken_modified(MW, Cvm, mu): r'''Estimates the thermal conductivity of a gas as a function of temperature using the Modified CSP method of Eucken [1]_. .. math:: \frac{\lambda M}{\eta C_v} = 1.32 + \frac{1.77}{C_v/R} Parameters ---------- MW : float Molecular weight of the...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "gas", "as", "a", "function", "of", "temperature", "using", "the", "Modified", "CSP", "method", "of", "Eucken", "[", "1", "]", "_", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1394-L1434
[ "def", "Eucken_modified", "(", "MW", ",", "Cvm", ",", "mu", ")", ":", "MW", "=", "MW", "/", "1000.", "return", "(", "1.32", "+", "1.77", "/", "(", "Cvm", "/", "R", ")", ")", "*", "mu", "*", "Cvm", "/", "MW" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
DIPPR9B
r'''Calculates the thermal conductivity of a gas using one of several emperical equations developed in [1]_, [2]_, and presented in [3]_. For monoatomic gases: .. math:: k = 2.5 \frac{\eta C_v}{MW} For linear molecules: .. math:: k = \frac{\eta}{MW} \left( 1.30 C_v + 14644.00 - \...
thermo/thermal_conductivity.py
def DIPPR9B(T, MW, Cvm, mu, Tc=None, chemtype=None): r'''Calculates the thermal conductivity of a gas using one of several emperical equations developed in [1]_, [2]_, and presented in [3]_. For monoatomic gases: .. math:: k = 2.5 \frac{\eta C_v}{MW} For linear molecules: .. math:: ...
def DIPPR9B(T, MW, Cvm, mu, Tc=None, chemtype=None): r'''Calculates the thermal conductivity of a gas using one of several emperical equations developed in [1]_, [2]_, and presented in [3]_. For monoatomic gases: .. math:: k = 2.5 \frac{\eta C_v}{MW} For linear molecules: .. math:: ...
[ "r", "Calculates", "the", "thermal", "conductivity", "of", "a", "gas", "using", "one", "of", "several", "emperical", "equations", "developed", "in", "[", "1", "]", "_", "[", "2", "]", "_", "and", "presented", "in", "[", "3", "]", "_", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1437-L1509
[ "def", "DIPPR9B", "(", "T", ",", "MW", ",", "Cvm", ",", "mu", ",", "Tc", "=", "None", ",", "chemtype", "=", "None", ")", ":", "Cvm", "=", "Cvm", "*", "1000.", "# J/g/K to J/kmol/K", "if", "not", "chemtype", ":", "chemtype", "=", "'linear'", "if", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Chung
r'''Estimates the thermal conductivity of a gas as a function of temperature using the CSP method of Chung [1]_. .. math:: \frac{\lambda M}{\eta C_v} = \frac{3.75 \Psi}{C_v/R} \Psi = 1 + \alpha \left\{[0.215+0.28288\alpha-1.061\beta+0.26665Z]/ [0.6366+\beta Z + 1.061 \alpha \beta]\righ...
thermo/thermal_conductivity.py
def Chung(T, MW, Tc, omega, Cvm, mu): r'''Estimates the thermal conductivity of a gas as a function of temperature using the CSP method of Chung [1]_. .. math:: \frac{\lambda M}{\eta C_v} = \frac{3.75 \Psi}{C_v/R} \Psi = 1 + \alpha \left\{[0.215+0.28288\alpha-1.061\beta+0.26665Z]/ ...
def Chung(T, MW, Tc, omega, Cvm, mu): r'''Estimates the thermal conductivity of a gas as a function of temperature using the CSP method of Chung [1]_. .. math:: \frac{\lambda M}{\eta C_v} = \frac{3.75 \Psi}{C_v/R} \Psi = 1 + \alpha \left\{[0.215+0.28288\alpha-1.061\beta+0.26665Z]/ ...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "gas", "as", "a", "function", "of", "temperature", "using", "the", "CSP", "method", "of", "Chung", "[", "1", "]", "_", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1512-L1575
[ "def", "Chung", "(", "T", ",", "MW", ",", "Tc", ",", "omega", ",", "Cvm", ",", "mu", ")", ":", "MW", "=", "MW", "/", "1000.", "alpha", "=", "Cvm", "/", "R", "-", "1.5", "beta", "=", "0.7862", "-", "0.7109", "*", "omega", "+", "1.3168", "*", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
eli_hanley
r'''Estimates the thermal conductivity of a gas as a function of temperature using the reference fluid method of Eli and Hanley [1]_ as shown in [2]_. .. math:: \lambda = \lambda^* + \frac{\eta^*}{MW}(1.32)\left(C_v - \frac{3R}{2}\right) Tr = \text{min}(Tr, 2) \theta = 1 + (\omega...
thermo/thermal_conductivity.py
def eli_hanley(T, MW, Tc, Vc, Zc, omega, Cvm): r'''Estimates the thermal conductivity of a gas as a function of temperature using the reference fluid method of Eli and Hanley [1]_ as shown in [2]_. .. math:: \lambda = \lambda^* + \frac{\eta^*}{MW}(1.32)\left(C_v - \frac{3R}{2}\right) T...
def eli_hanley(T, MW, Tc, Vc, Zc, omega, Cvm): r'''Estimates the thermal conductivity of a gas as a function of temperature using the reference fluid method of Eli and Hanley [1]_ as shown in [2]_. .. math:: \lambda = \lambda^* + \frac{\eta^*}{MW}(1.32)\left(C_v - \frac{3R}{2}\right) T...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "gas", "as", "a", "function", "of", "temperature", "using", "the", "reference", "fluid", "method", "of", "Eli", "and", "Hanley", "[", "1", "]", "_", "as", "shown", "in", "[", "2", "]", "_",...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1578-L1668
[ "def", "eli_hanley", "(", "T", ",", "MW", ",", "Tc", ",", "Vc", ",", "Zc", ",", "omega", ",", "Cvm", ")", ":", "Cs", "=", "[", "2.907741307E6", ",", "-", "3.312874033E6", ",", "1.608101838E6", ",", "-", "4.331904871E5", ",", "7.062481330E4", ",", "-"...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Gharagheizi_gas
r'''Estimates the thermal conductivity of a gas as a function of temperature using the CSP method of Gharagheizi [1]_. A convoluted method claiming high-accuracy and using only statistically significant variable following analalysis. Requires temperature, molecular weight, boiling temperature and crit...
thermo/thermal_conductivity.py
def Gharagheizi_gas(T, MW, Tb, Pc, omega): r'''Estimates the thermal conductivity of a gas as a function of temperature using the CSP method of Gharagheizi [1]_. A convoluted method claiming high-accuracy and using only statistically significant variable following analalysis. Requires temperature,...
def Gharagheizi_gas(T, MW, Tb, Pc, omega): r'''Estimates the thermal conductivity of a gas as a function of temperature using the CSP method of Gharagheizi [1]_. A convoluted method claiming high-accuracy and using only statistically significant variable following analalysis. Requires temperature,...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "gas", "as", "a", "function", "of", "temperature", "using", "the", "CSP", "method", "of", "Gharagheizi", "[", "1", "]", "_", ".", "A", "convoluted", "method", "claiming", "high", "-", "accuracy...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1671-L1730
[ "def", "Gharagheizi_gas", "(", "T", ",", "MW", ",", "Tb", ",", "Pc", ",", "omega", ")", ":", "Pc", "=", "Pc", "/", "1E4", "B", "=", "T", "+", "(", "2.", "*", "omega", "+", "2.", "*", "T", "-", "2.", "*", "T", "*", "(", "2.", "*", "omega",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Bahadori_gas
r'''Estimates the thermal conductivity of hydrocarbons gases at low P. Fits their data well, and is useful as only MW is required. Y is the Molecular weight, and X the temperature. .. math:: K = a + bY + CY^2 + dY^3 a = A_1 + B_1 X + C_1 X^2 + D_1 X^3 b = A_2 + B_2 X + C_2 X^2 + D...
thermo/thermal_conductivity.py
def Bahadori_gas(T, MW): r'''Estimates the thermal conductivity of hydrocarbons gases at low P. Fits their data well, and is useful as only MW is required. Y is the Molecular weight, and X the temperature. .. math:: K = a + bY + CY^2 + dY^3 a = A_1 + B_1 X + C_1 X^2 + D_1 X^3 ...
def Bahadori_gas(T, MW): r'''Estimates the thermal conductivity of hydrocarbons gases at low P. Fits their data well, and is useful as only MW is required. Y is the Molecular weight, and X the temperature. .. math:: K = a + bY + CY^2 + dY^3 a = A_1 + B_1 X + C_1 X^2 + D_1 X^3 ...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "hydrocarbons", "gases", "at", "low", "P", ".", "Fits", "their", "data", "well", "and", "is", "useful", "as", "only", "MW", "is", "required", ".", "Y", "is", "the", "Molecular", "weight", "and", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1733-L1785
[ "def", "Bahadori_gas", "(", "T", ",", "MW", ")", ":", "A", "=", "[", "4.3931323468E-1", ",", "-", "3.88001122207E-2", ",", "9.28616040136E-4", ",", "-", "6.57828995724E-6", "]", "B", "=", "[", "-", "2.9624238519E-3", ",", "2.67956145820E-4", ",", "-", "6.4...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
stiel_thodos_dense
r'''Estimates the thermal conductivity of a gas at high pressure as a function of temperature using difference method of Stiel and Thodos [1]_ as shown in [2]_. if \rho_r < 0.5: .. math:: (\lambda-\lambda^\circ)\Gamma Z_c^5=1.22\times 10^{-2} [\exp(0.535 \rho_r)-1] if 0.5 < \rho_r < 2.0: ...
thermo/thermal_conductivity.py
def stiel_thodos_dense(T, MW, Tc, Pc, Vc, Zc, Vm, kg): r'''Estimates the thermal conductivity of a gas at high pressure as a function of temperature using difference method of Stiel and Thodos [1]_ as shown in [2]_. if \rho_r < 0.5: .. math:: (\lambda-\lambda^\circ)\Gamma Z_c^5=1.22\times ...
def stiel_thodos_dense(T, MW, Tc, Pc, Vc, Zc, Vm, kg): r'''Estimates the thermal conductivity of a gas at high pressure as a function of temperature using difference method of Stiel and Thodos [1]_ as shown in [2]_. if \rho_r < 0.5: .. math:: (\lambda-\lambda^\circ)\Gamma Z_c^5=1.22\times ...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "gas", "at", "high", "pressure", "as", "a", "function", "of", "temperature", "using", "difference", "method", "of", "Stiel", "and", "Thodos", "[", "1", "]", "_", "as", "shown", "in", "[", "2"...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L2278-L2353
[ "def", "stiel_thodos_dense", "(", "T", ",", "MW", ",", "Tc", ",", "Pc", ",", "Vc", ",", "Zc", ",", "Vm", ",", "kg", ")", ":", "gamma", "=", "210", "*", "(", "Tc", "*", "MW", "**", "3.", "/", "(", "Pc", "/", "1E5", ")", "**", "4", ")", "**...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
eli_hanley_dense
r'''Estimates the thermal conductivity of a gas at high pressure as a function of temperature using the reference fluid method of Eli and Hanley [1]_ as shown in [2]_. .. math:: Tr = min(Tr, 2) Vr = min(Vr, 2) f = \frac{T_c}{190.4}\theta h = \frac{V_c}{9.92E-5}\psi ...
thermo/thermal_conductivity.py
def eli_hanley_dense(T, MW, Tc, Vc, Zc, omega, Cvm, Vm): r'''Estimates the thermal conductivity of a gas at high pressure as a function of temperature using the reference fluid method of Eli and Hanley [1]_ as shown in [2]_. .. math:: Tr = min(Tr, 2) Vr = min(Vr, 2) f = \frac{...
def eli_hanley_dense(T, MW, Tc, Vc, Zc, omega, Cvm, Vm): r'''Estimates the thermal conductivity of a gas at high pressure as a function of temperature using the reference fluid method of Eli and Hanley [1]_ as shown in [2]_. .. math:: Tr = min(Tr, 2) Vr = min(Vr, 2) f = \frac{...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "gas", "at", "high", "pressure", "as", "a", "function", "of", "temperature", "using", "the", "reference", "fluid", "method", "of", "Eli", "and", "Hanley", "[", "1", "]", "_", "as", "shown", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L2356-L2500
[ "def", "eli_hanley_dense", "(", "T", ",", "MW", ",", "Tc", ",", "Vc", ",", "Zc", ",", "omega", ",", "Cvm", ",", "Vm", ")", ":", "Cs", "=", "[", "2.907741307E6", ",", "-", "3.312874033E6", ",", "1.608101838E6", ",", "-", "4.331904871E5", ",", "7.06248...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
chung_dense
r'''Estimates the thermal conductivity of a gas at high pressure as a function of temperature using the reference fluid method of Chung [1]_ as shown in [2]_. .. math:: \lambda = \frac{31.2 \eta^\circ \Psi}{M'}(G_2^{-1} + B_6 y)+qB_7y^2T_r^{1/2}G_2 \Psi = 1 + \alpha \left\{[0.215+0.28288\a...
thermo/thermal_conductivity.py
def chung_dense(T, MW, Tc, Vc, omega, Cvm, Vm, mu, dipole, association=0): r'''Estimates the thermal conductivity of a gas at high pressure as a function of temperature using the reference fluid method of Chung [1]_ as shown in [2]_. .. math:: \lambda = \frac{31.2 \eta^\circ \Psi}{M'}(G_2^{-1} ...
def chung_dense(T, MW, Tc, Vc, omega, Cvm, Vm, mu, dipole, association=0): r'''Estimates the thermal conductivity of a gas at high pressure as a function of temperature using the reference fluid method of Chung [1]_ as shown in [2]_. .. math:: \lambda = \frac{31.2 \eta^\circ \Psi}{M'}(G_2^{-1} ...
[ "r", "Estimates", "the", "thermal", "conductivity", "of", "a", "gas", "at", "high", "pressure", "as", "a", "function", "of", "temperature", "using", "the", "reference", "fluid", "method", "of", "Chung", "[", "1", "]", "_", "as", "shown", "in", "[", "2", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L2503-L2610
[ "def", "chung_dense", "(", "T", ",", "MW", ",", "Tc", ",", "Vc", ",", "omega", ",", "Cvm", ",", "Vm", ",", "mu", ",", "dipole", ",", "association", "=", "0", ")", ":", "ais", "=", "[", "2.4166E+0", ",", "-", "5.0924E-1", ",", "6.6107E+0", ",", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Lindsay_Bromley
r'''Calculates thermal conductivity of a gas mixture according to mixing rules in [1]_ and also in [2]_. .. math:: k = \sum \frac{y_i k_i}{\sum y_i A_{ij}} A_{ij} = \frac{1}{4} \left\{ 1 + \left[\frac{\eta_i}{\eta_j} \left(\frac{MW_j}{MW_i}\right)^{0.75} \left( \frac{T+S_i}{T+S_j}\righ...
thermo/thermal_conductivity.py
def Lindsay_Bromley(T, ys, ks, mus, Tbs, MWs): r'''Calculates thermal conductivity of a gas mixture according to mixing rules in [1]_ and also in [2]_. .. math:: k = \sum \frac{y_i k_i}{\sum y_i A_{ij}} A_{ij} = \frac{1}{4} \left\{ 1 + \left[\frac{\eta_i}{\eta_j} \left(\frac{MW_j}{...
def Lindsay_Bromley(T, ys, ks, mus, Tbs, MWs): r'''Calculates thermal conductivity of a gas mixture according to mixing rules in [1]_ and also in [2]_. .. math:: k = \sum \frac{y_i k_i}{\sum y_i A_{ij}} A_{ij} = \frac{1}{4} \left\{ 1 + \left[\frac{\eta_i}{\eta_j} \left(\frac{MW_j}{...
[ "r", "Calculates", "thermal", "conductivity", "of", "a", "gas", "mixture", "according", "to", "mixing", "rules", "in", "[", "1", "]", "_", "and", "also", "in", "[", "2", "]", "_", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L2615-L2686
[ "def", "Lindsay_Bromley", "(", "T", ",", "ys", ",", "ks", ",", "mus", ",", "Tbs", ",", "MWs", ")", ":", "if", "not", "none_and_length_check", "(", "[", "ys", ",", "ks", ",", "mus", ",", "Tbs", ",", "MWs", "]", ")", ":", "raise", "Exception", "(",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ThermalConductivityLiquid.load_all_methods
r'''Method which picks out coefficients for the specified chemical from the various dictionaries and DataFrames storing it. All data is stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, :obj:`all_methods` and obj:`all_methods_P` as a set of methods for which the data ...
thermo/thermal_conductivity.py
def load_all_methods(self): r'''Method which picks out coefficients for the specified chemical from the various dictionaries and DataFrames storing it. All data is stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, :obj:`all_methods` and obj:`all_methods_P` as a set of...
def load_all_methods(self): r'''Method which picks out coefficients for the specified chemical from the various dictionaries and DataFrames storing it. All data is stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, :obj:`all_methods` and obj:`all_methods_P` as a set of...
[ "r", "Method", "which", "picks", "out", "coefficients", "for", "the", "specified", "chemical", "from", "the", "various", "dictionaries", "and", "DataFrames", "storing", "it", ".", "All", "data", "is", "stored", "as", "attributes", ".", "This", "method", "also"...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L705-L766
[ "def", "load_all_methods", "(", "self", ")", ":", "methods", ",", "methods_P", "=", "[", "]", ",", "[", "]", "Tmins", ",", "Tmaxs", "=", "[", "]", ",", "[", "]", "if", "self", ".", "CASRN", "in", "_VDISaturationDict", ":", "methods", ".", "append", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ThermalConductivityLiquid.calculate
r'''Method to calculate low-pressure liquid thermal conductivity at tempearture `T` with a given method. This method has no exception handling; see `T_dependent_property` for that. Parameters ---------- T : float Temperature of the liquid, [K] method...
thermo/thermal_conductivity.py
def calculate(self, T, method): r'''Method to calculate low-pressure liquid thermal conductivity at tempearture `T` with a given method. This method has no exception handling; see `T_dependent_property` for that. Parameters ---------- T : float Tempe...
def calculate(self, T, method): r'''Method to calculate low-pressure liquid thermal conductivity at tempearture `T` with a given method. This method has no exception handling; see `T_dependent_property` for that. Parameters ---------- T : float Tempe...
[ "r", "Method", "to", "calculate", "low", "-", "pressure", "liquid", "thermal", "conductivity", "at", "tempearture", "T", "with", "a", "given", "method", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L768-L809
[ "def", "calculate", "(", "self", ",", "T", ",", "method", ")", ":", "if", "method", "==", "SHEFFY_JOHNSON", ":", "kl", "=", "Sheffy_Johnson", "(", "T", ",", "self", ".", "MW", ",", "self", ".", "Tm", ")", "elif", "method", "==", "SATO_RIEDEL", ":", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ThermalConductivityLiquid.calculate_P
r'''Method to calculate pressure-dependent liquid thermal conductivity at temperature `T` and pressure `P` with a given method. This method has no exception handling; see `TP_dependent_property` for that. Parameters ---------- T : float Temperature at which ...
thermo/thermal_conductivity.py
def calculate_P(self, T, P, method): r'''Method to calculate pressure-dependent liquid thermal conductivity at temperature `T` and pressure `P` with a given method. This method has no exception handling; see `TP_dependent_property` for that. Parameters ---------- ...
def calculate_P(self, T, P, method): r'''Method to calculate pressure-dependent liquid thermal conductivity at temperature `T` and pressure `P` with a given method. This method has no exception handling; see `TP_dependent_property` for that. Parameters ---------- ...
[ "r", "Method", "to", "calculate", "pressure", "-", "dependent", "liquid", "thermal", "conductivity", "at", "temperature", "T", "and", "pressure", "P", "with", "a", "given", "method", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L811-L842
[ "def", "calculate_P", "(", "self", ",", "T", ",", "P", ",", "method", ")", ":", "if", "method", "==", "DIPPR_9G", ":", "kl", "=", "self", ".", "T_dependent_property", "(", "T", ")", "kl", "=", "DIPPR9G", "(", "T", ",", "P", ",", "self", ".", "Tc"...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ThermalConductivityLiquidMixture.load_all_methods
r'''Method to initialize the object by precomputing any values which may be used repeatedly and by retrieving mixture-specific variables. All data are stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, and :obj:`all_methods` as a set of methods which should work to c...
thermo/thermal_conductivity.py
def load_all_methods(self): r'''Method to initialize the object by precomputing any values which may be used repeatedly and by retrieving mixture-specific variables. All data are stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, and :obj:`all_methods` as a set of met...
def load_all_methods(self): r'''Method to initialize the object by precomputing any values which may be used repeatedly and by retrieving mixture-specific variables. All data are stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, and :obj:`all_methods` as a set of met...
[ "r", "Method", "to", "initialize", "the", "object", "by", "precomputing", "any", "values", "which", "may", "be", "used", "repeatedly", "and", "by", "retrieving", "mixture", "-", "specific", "variables", ".", "All", "data", "are", "stored", "as", "attributes", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1244-L1272
[ "def", "load_all_methods", "(", "self", ")", ":", "methods", "=", "[", "DIPPR_9H", ",", "SIMPLE", "]", "if", "len", "(", "self", ".", "CASs", ")", "==", "2", ":", "methods", ".", "append", "(", "FILIPPOV", ")", "if", "'7732-18-5'", "in", "self", ".",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ThermalConductivityLiquidMixture.calculate
r'''Method to calculate thermal conductivity of a liquid mixture at temperature `T`, pressure `P`, mole fractions `zs` and weight fractions `ws` with a given method. This method has no exception handling; see `mixture_property` for that. Parameters ---------- T...
thermo/thermal_conductivity.py
def calculate(self, T, P, zs, ws, method): r'''Method to calculate thermal conductivity of a liquid mixture at temperature `T`, pressure `P`, mole fractions `zs` and weight fractions `ws` with a given method. This method has no exception handling; see `mixture_property` for tha...
def calculate(self, T, P, zs, ws, method): r'''Method to calculate thermal conductivity of a liquid mixture at temperature `T`, pressure `P`, mole fractions `zs` and weight fractions `ws` with a given method. This method has no exception handling; see `mixture_property` for tha...
[ "r", "Method", "to", "calculate", "thermal", "conductivity", "of", "a", "liquid", "mixture", "at", "temperature", "T", "pressure", "P", "mole", "fractions", "zs", "and", "weight", "fractions", "ws", "with", "a", "given", "method", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L1274-L1314
[ "def", "calculate", "(", "self", ",", "T", ",", "P", ",", "zs", ",", "ws", ",", "method", ")", ":", "if", "method", "==", "SIMPLE", ":", "ks", "=", "[", "i", "(", "T", ",", "P", ")", "for", "i", "in", "self", ".", "ThermalConductivityLiquids", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ThermalConductivityGas.load_all_methods
r'''Method which picks out coefficients for the specified chemical from the various dictionaries and DataFrames storing it. All data is stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, :obj:`all_methods` and obj:`all_methods_P` as a set of methods for which the data ...
thermo/thermal_conductivity.py
def load_all_methods(self): r'''Method which picks out coefficients for the specified chemical from the various dictionaries and DataFrames storing it. All data is stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, :obj:`all_methods` and obj:`all_methods_P` as a set of...
def load_all_methods(self): r'''Method which picks out coefficients for the specified chemical from the various dictionaries and DataFrames storing it. All data is stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, :obj:`all_methods` and obj:`all_methods_P` as a set of...
[ "r", "Method", "which", "picks", "out", "coefficients", "for", "the", "specified", "chemical", "from", "the", "various", "dictionaries", "and", "DataFrames", "storing", "it", ".", "All", "data", "is", "stored", "as", "attributes", ".", "This", "method", "also"...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L2025-L2089
[ "def", "load_all_methods", "(", "self", ")", ":", "methods", ",", "methods_P", "=", "[", "]", ",", "[", "]", "Tmins", ",", "Tmaxs", "=", "[", "]", ",", "[", "]", "if", "self", ".", "CASRN", "in", "_VDISaturationDict", ":", "methods", ".", "append", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ThermalConductivityGas.calculate
r'''Method to calculate low-pressure gas thermal conductivity at tempearture `T` with a given method. This method has no exception handling; see `T_dependent_property` for that. Parameters ---------- T : float Temperature of the gas, [K] method : str...
thermo/thermal_conductivity.py
def calculate(self, T, method): r'''Method to calculate low-pressure gas thermal conductivity at tempearture `T` with a given method. This method has no exception handling; see `T_dependent_property` for that. Parameters ---------- T : float Temperat...
def calculate(self, T, method): r'''Method to calculate low-pressure gas thermal conductivity at tempearture `T` with a given method. This method has no exception handling; see `T_dependent_property` for that. Parameters ---------- T : float Temperat...
[ "r", "Method", "to", "calculate", "low", "-", "pressure", "gas", "thermal", "conductivity", "at", "tempearture", "T", "with", "a", "given", "method", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L2091-L2141
[ "def", "calculate", "(", "self", ",", "T", ",", "method", ")", ":", "if", "method", "==", "GHARAGHEIZI_G", ":", "kg", "=", "Gharagheizi_gas", "(", "T", ",", "self", ".", "MW", ",", "self", ".", "Tb", ",", "self", ".", "Pc", ",", "self", ".", "ome...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ThermalConductivityGas.calculate_P
r'''Method to calculate pressure-dependent gas thermal conductivity at temperature `T` and pressure `P` with a given method. This method has no exception handling; see `TP_dependent_property` for that. Parameters ---------- T : float Temperature at which to ...
thermo/thermal_conductivity.py
def calculate_P(self, T, P, method): r'''Method to calculate pressure-dependent gas thermal conductivity at temperature `T` and pressure `P` with a given method. This method has no exception handling; see `TP_dependent_property` for that. Parameters ---------- T...
def calculate_P(self, T, P, method): r'''Method to calculate pressure-dependent gas thermal conductivity at temperature `T` and pressure `P` with a given method. This method has no exception handling; see `TP_dependent_property` for that. Parameters ---------- T...
[ "r", "Method", "to", "calculate", "pressure", "-", "dependent", "gas", "thermal", "conductivity", "at", "temperature", "T", "and", "pressure", "P", "with", "a", "given", "method", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L2143-L2181
[ "def", "calculate_P", "(", "self", ",", "T", ",", "P", ",", "method", ")", ":", "if", "method", "==", "ELI_HANLEY_DENSE", ":", "Vmg", "=", "self", ".", "Vmg", "(", "T", ",", "P", ")", "if", "hasattr", "(", "self", ".", "Vmg", ",", "'__call__'", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ThermalConductivityGasMixture.load_all_methods
r'''Method to initialize the object by precomputing any values which may be used repeatedly and by retrieving mixture-specific variables. All data are stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, and :obj:`all_methods` as a set of methods which should work to c...
thermo/thermal_conductivity.py
def load_all_methods(self): r'''Method to initialize the object by precomputing any values which may be used repeatedly and by retrieving mixture-specific variables. All data are stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, and :obj:`all_methods` as a set of met...
def load_all_methods(self): r'''Method to initialize the object by precomputing any values which may be used repeatedly and by retrieving mixture-specific variables. All data are stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`, and :obj:`all_methods` as a set of met...
[ "r", "Method", "to", "initialize", "the", "object", "by", "precomputing", "any", "values", "which", "may", "be", "used", "repeatedly", "and", "by", "retrieving", "mixture", "-", "specific", "variables", ".", "All", "data", "are", "stored", "as", "attributes", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L2776-L2798
[ "def", "load_all_methods", "(", "self", ")", ":", "methods", "=", "[", "]", "methods", ".", "append", "(", "SIMPLE", ")", "if", "none_and_length_check", "(", "(", "self", ".", "Tbs", ",", "self", ".", "MWs", ")", ")", ":", "methods", ".", "append", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ThermalConductivityGasMixture.calculate
r'''Method to calculate thermal conductivity of a gas mixture at temperature `T`, pressure `P`, mole fractions `zs` and weight fractions `ws` with a given method. This method has no exception handling; see `mixture_property` for that. Parameters ---------- T : ...
thermo/thermal_conductivity.py
def calculate(self, T, P, zs, ws, method): r'''Method to calculate thermal conductivity of a gas mixture at temperature `T`, pressure `P`, mole fractions `zs` and weight fractions `ws` with a given method. This method has no exception handling; see `mixture_property` for that. ...
def calculate(self, T, P, zs, ws, method): r'''Method to calculate thermal conductivity of a gas mixture at temperature `T`, pressure `P`, mole fractions `zs` and weight fractions `ws` with a given method. This method has no exception handling; see `mixture_property` for that. ...
[ "r", "Method", "to", "calculate", "thermal", "conductivity", "of", "a", "gas", "mixture", "at", "temperature", "T", "pressure", "P", "mole", "fractions", "zs", "and", "weight", "fractions", "ws", "with", "a", "given", "method", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/thermal_conductivity.py#L2800-L2834
[ "def", "calculate", "(", "self", ",", "T", ",", "P", ",", "zs", ",", "ws", ",", "method", ")", ":", "if", "method", "==", "SIMPLE", ":", "ks", "=", "[", "i", "(", "T", ",", "P", ")", "for", "i", "in", "self", ".", "ThermalConductivityGases", "]...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
molecular_weight
r'''Calculates molecular weight of a molecule given a dictionary of its atoms and their counts, in the format {symbol: count}. .. math:: MW = \sum_i n_i MW_i Parameters ---------- atoms : dict dictionary of counts of individual atoms, indexed by symbol with proper capitaliz...
thermo/elements.py
def molecular_weight(atoms): r'''Calculates molecular weight of a molecule given a dictionary of its atoms and their counts, in the format {symbol: count}. .. math:: MW = \sum_i n_i MW_i Parameters ---------- atoms : dict dictionary of counts of individual atoms, indexed by sym...
def molecular_weight(atoms): r'''Calculates molecular weight of a molecule given a dictionary of its atoms and their counts, in the format {symbol: count}. .. math:: MW = \sum_i n_i MW_i Parameters ---------- atoms : dict dictionary of counts of individual atoms, indexed by sym...
[ "r", "Calculates", "molecular", "weight", "of", "a", "molecule", "given", "a", "dictionary", "of", "its", "atoms", "and", "their", "counts", "in", "the", "format", "{", "symbol", ":", "count", "}", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/elements.py#L264-L309
[ "def", "molecular_weight", "(", "atoms", ")", ":", "MW", "=", "0", "for", "i", "in", "atoms", ":", "if", "i", "in", "periodic_table", ":", "MW", "+=", "periodic_table", "[", "i", "]", ".", "MW", "*", "atoms", "[", "i", "]", "elif", "i", "==", "'D...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
mass_fractions
r'''Calculates the mass fractions of each element in a compound, given a dictionary of its atoms and their counts, in the format {symbol: count}. .. math:: w_i = \frac{n_i MW_i}{\sum_i n_i MW_i} Parameters ---------- atoms : dict dictionary of counts of individual atoms, index...
thermo/elements.py
def mass_fractions(atoms, MW=None): r'''Calculates the mass fractions of each element in a compound, given a dictionary of its atoms and their counts, in the format {symbol: count}. .. math:: w_i = \frac{n_i MW_i}{\sum_i n_i MW_i} Parameters ---------- atoms : dict diction...
def mass_fractions(atoms, MW=None): r'''Calculates the mass fractions of each element in a compound, given a dictionary of its atoms and their counts, in the format {symbol: count}. .. math:: w_i = \frac{n_i MW_i}{\sum_i n_i MW_i} Parameters ---------- atoms : dict diction...
[ "r", "Calculates", "the", "mass", "fractions", "of", "each", "element", "in", "a", "compound", "given", "a", "dictionary", "of", "its", "atoms", "and", "their", "counts", "in", "the", "format", "{", "symbol", ":", "count", "}", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/elements.py#L312-L360
[ "def", "mass_fractions", "(", "atoms", ",", "MW", "=", "None", ")", ":", "if", "not", "MW", ":", "MW", "=", "molecular_weight", "(", "atoms", ")", "mfracs", "=", "{", "}", "for", "i", "in", "atoms", ":", "if", "i", "in", "periodic_table", ":", "mfr...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
atom_fractions
r'''Calculates the atomic fractions of each element in a compound, given a dictionary of its atoms and their counts, in the format {symbol: count}. .. math:: a_i = \frac{n_i}{\sum_i n_i} Parameters ---------- atoms : dict dictionary of counts of individual atoms, indexed by sy...
thermo/elements.py
def atom_fractions(atoms): r'''Calculates the atomic fractions of each element in a compound, given a dictionary of its atoms and their counts, in the format {symbol: count}. .. math:: a_i = \frac{n_i}{\sum_i n_i} Parameters ---------- atoms : dict dictionary of counts of ...
def atom_fractions(atoms): r'''Calculates the atomic fractions of each element in a compound, given a dictionary of its atoms and their counts, in the format {symbol: count}. .. math:: a_i = \frac{n_i}{\sum_i n_i} Parameters ---------- atoms : dict dictionary of counts of ...
[ "r", "Calculates", "the", "atomic", "fractions", "of", "each", "element", "in", "a", "compound", "given", "a", "dictionary", "of", "its", "atoms", "and", "their", "counts", "in", "the", "format", "{", "symbol", ":", "count", "}", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/elements.py#L363-L401
[ "def", "atom_fractions", "(", "atoms", ")", ":", "count", "=", "sum", "(", "atoms", ".", "values", "(", ")", ")", "afracs", "=", "{", "}", "for", "i", "in", "atoms", ":", "afracs", "[", "i", "]", "=", "atoms", "[", "i", "]", "/", "count", "retu...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
similarity_variable
r'''Calculates the similarity variable of an compound, as defined in [1]_. Currently only applied for certain heat capacity estimation routines. .. math:: \alpha = \frac{N}{MW} = \frac{\sum_i n_i}{\sum_i n_i MW_i} Parameters ---------- atoms : dict dictionary of counts of individua...
thermo/elements.py
def similarity_variable(atoms, MW=None): r'''Calculates the similarity variable of an compound, as defined in [1]_. Currently only applied for certain heat capacity estimation routines. .. math:: \alpha = \frac{N}{MW} = \frac{\sum_i n_i}{\sum_i n_i MW_i} Parameters ---------- atoms : d...
def similarity_variable(atoms, MW=None): r'''Calculates the similarity variable of an compound, as defined in [1]_. Currently only applied for certain heat capacity estimation routines. .. math:: \alpha = \frac{N}{MW} = \frac{\sum_i n_i}{\sum_i n_i MW_i} Parameters ---------- atoms : d...
[ "r", "Calculates", "the", "similarity", "variable", "of", "an", "compound", "as", "defined", "in", "[", "1", "]", "_", ".", "Currently", "only", "applied", "for", "certain", "heat", "capacity", "estimation", "routines", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/elements.py#L404-L443
[ "def", "similarity_variable", "(", "atoms", ",", "MW", "=", "None", ")", ":", "if", "not", "MW", ":", "MW", "=", "molecular_weight", "(", "atoms", ")", "return", "sum", "(", "atoms", ".", "values", "(", ")", ")", "/", "MW" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
atoms_to_Hill
r'''Determine the Hill formula of a compound, given a dictionary of its atoms and their counts, in the format {symbol: count}. Parameters ---------- atoms : dict dictionary of counts of individual atoms, indexed by symbol with proper capitalization, [-] Returns ------- Hill...
thermo/elements.py
def atoms_to_Hill(atoms): r'''Determine the Hill formula of a compound, given a dictionary of its atoms and their counts, in the format {symbol: count}. Parameters ---------- atoms : dict dictionary of counts of individual atoms, indexed by symbol with proper capitalization, [-] ...
def atoms_to_Hill(atoms): r'''Determine the Hill formula of a compound, given a dictionary of its atoms and their counts, in the format {symbol: count}. Parameters ---------- atoms : dict dictionary of counts of individual atoms, indexed by symbol with proper capitalization, [-] ...
[ "r", "Determine", "the", "Hill", "formula", "of", "a", "compound", "given", "a", "dictionary", "of", "its", "atoms", "and", "their", "counts", "in", "the", "format", "{", "symbol", ":", "count", "}", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/elements.py#L446-L501
[ "def", "atoms_to_Hill", "(", "atoms", ")", ":", "def", "str_ele_count", "(", "ele", ")", ":", "if", "atoms", "[", "ele", "]", "==", "1", ":", "count", "=", "''", "else", ":", "count", "=", "str", "(", "atoms", "[", "ele", "]", ")", "return", "cou...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
simple_formula_parser
r'''Basic formula parser, primarily for obtaining element counts from formulas as formated in PubChem. Handles formulas with integer counts, but no brackets, no hydrates, no charges, no isotopes, and no group multipliers. Strips charges from the end of a formula first. Accepts repeated chemical ...
thermo/elements.py
def simple_formula_parser(formula): r'''Basic formula parser, primarily for obtaining element counts from formulas as formated in PubChem. Handles formulas with integer counts, but no brackets, no hydrates, no charges, no isotopes, and no group multipliers. Strips charges from the end of a fo...
def simple_formula_parser(formula): r'''Basic formula parser, primarily for obtaining element counts from formulas as formated in PubChem. Handles formulas with integer counts, but no brackets, no hydrates, no charges, no isotopes, and no group multipliers. Strips charges from the end of a fo...
[ "r", "Basic", "formula", "parser", "primarily", "for", "obtaining", "element", "counts", "from", "formulas", "as", "formated", "in", "PubChem", ".", "Handles", "formulas", "with", "integer", "counts", "but", "no", "brackets", "no", "hydrates", "no", "charges", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/elements.py#L508-L545
[ "def", "simple_formula_parser", "(", "formula", ")", ":", "formula", "=", "formula", ".", "split", "(", "'+'", ")", "[", "0", "]", ".", "split", "(", "'-'", ")", "[", "0", "]", "groups", "=", "_formula_p1", ".", "split", "(", "formula", ")", "[", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
nested_formula_parser
r'''Improved formula parser which handles braces and their multipliers, as well as rational element counts. Strips charges from the end of a formula first. Accepts repeated chemical units. Performs no sanity checking that elements are actually elements. As it uses regular expressions for matching, err...
thermo/elements.py
def nested_formula_parser(formula, check=True): r'''Improved formula parser which handles braces and their multipliers, as well as rational element counts. Strips charges from the end of a formula first. Accepts repeated chemical units. Performs no sanity checking that elements are actually elements. ...
def nested_formula_parser(formula, check=True): r'''Improved formula parser which handles braces and their multipliers, as well as rational element counts. Strips charges from the end of a formula first. Accepts repeated chemical units. Performs no sanity checking that elements are actually elements. ...
[ "r", "Improved", "formula", "parser", "which", "handles", "braces", "and", "their", "multipliers", "as", "well", "as", "rational", "element", "counts", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/elements.py#L553-L633
[ "def", "nested_formula_parser", "(", "formula", ",", "check", "=", "True", ")", ":", "formula", "=", "formula", ".", "replace", "(", "'['", ",", "''", ")", ".", "replace", "(", "']'", ",", "''", ")", "charge_splits", "=", "bracketed_charge_re", ".", "spl...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
charge_from_formula
r'''Basic formula parser to determine the charge from a formula - given that the charge is already specified as one element of the formula. Performs no sanity checking that elements are actually elements. Parameters ---------- formula : str Formula string, very simply formats only, end...
thermo/elements.py
def charge_from_formula(formula): r'''Basic formula parser to determine the charge from a formula - given that the charge is already specified as one element of the formula. Performs no sanity checking that elements are actually elements. Parameters ---------- formula : str Formula...
def charge_from_formula(formula): r'''Basic formula parser to determine the charge from a formula - given that the charge is already specified as one element of the formula. Performs no sanity checking that elements are actually elements. Parameters ---------- formula : str Formula...
[ "r", "Basic", "formula", "parser", "to", "determine", "the", "charge", "from", "a", "formula", "-", "given", "that", "the", "charge", "is", "already", "specified", "as", "one", "element", "of", "the", "formula", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/elements.py#L638-L688
[ "def", "charge_from_formula", "(", "formula", ")", ":", "negative", "=", "'-'", "in", "formula", "positive", "=", "'+'", "in", "formula", "if", "positive", "and", "negative", ":", "raise", "ValueError", "(", "'Both negative and positive signs were found in the formula...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
serialize_formula
r'''Basic formula serializer to construct a consistently-formatted formula. This is necessary for handling user-supplied formulas, which are not always well formatted. Performs no sanity checking that elements are actually elements. Parameters ---------- formula : str Formula strin...
thermo/elements.py
def serialize_formula(formula): r'''Basic formula serializer to construct a consistently-formatted formula. This is necessary for handling user-supplied formulas, which are not always well formatted. Performs no sanity checking that elements are actually elements. Parameters ---------- ...
def serialize_formula(formula): r'''Basic formula serializer to construct a consistently-formatted formula. This is necessary for handling user-supplied formulas, which are not always well formatted. Performs no sanity checking that elements are actually elements. Parameters ---------- ...
[ "r", "Basic", "formula", "serializer", "to", "construct", "a", "consistently", "-", "formatted", "formula", ".", "This", "is", "necessary", "for", "handling", "user", "-", "supplied", "formulas", "which", "are", "not", "always", "well", "formatted", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/elements.py#L691-L731
[ "def", "serialize_formula", "(", "formula", ")", ":", "charge", "=", "charge_from_formula", "(", "formula", ")", "element_dict", "=", "nested_formula_parser", "(", "formula", ")", "base", "=", "atoms_to_Hill", "(", "element_dict", ")", "if", "charge", "==", "0",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Client.connect
Establish a connection to the chat server. Returns when an error has occurred, or :func:`disconnect` has been called.
hangups/client.py
async def connect(self): """Establish a connection to the chat server. Returns when an error has occurred, or :func:`disconnect` has been called. """ proxy = os.environ.get('HTTP_PROXY') self._session = http_utils.Session(self._cookies, proxy=proxy) try: ...
async def connect(self): """Establish a connection to the chat server. Returns when an error has occurred, or :func:`disconnect` has been called. """ proxy = os.environ.get('HTTP_PROXY') self._session = http_utils.Session(self._cookies, proxy=proxy) try: ...
[ "Establish", "a", "connection", "to", "the", "chat", "server", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L114-L148
[ "async", "def", "connect", "(", "self", ")", ":", "proxy", "=", "os", ".", "environ", ".", "get", "(", "'HTTP_PROXY'", ")", "self", ".", "_session", "=", "http_utils", ".", "Session", "(", "self", ".", "_cookies", ",", "proxy", "=", "proxy", ")", "tr...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.get_request_header
Return ``request_header`` for use when constructing requests. Returns: Populated request header.
hangups/client.py
def get_request_header(self): """Return ``request_header`` for use when constructing requests. Returns: Populated request header. """ # resource is allowed to be null if it's not available yet (the Chrome # client does this for the first getentitybyid call) i...
def get_request_header(self): """Return ``request_header`` for use when constructing requests. Returns: Populated request header. """ # resource is allowed to be null if it's not available yet (the Chrome # client does this for the first getentitybyid call) i...
[ "Return", "request_header", "for", "use", "when", "constructing", "requests", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L160-L170
[ "def", "get_request_header", "(", "self", ")", ":", "# resource is allowed to be null if it's not available yet (the Chrome", "# client does this for the first getentitybyid call)", "if", "self", ".", "_client_id", "is", "not", "None", ":", "self", ".", "_request_header", ".", ...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.set_active
Set this client as active. While a client is active, no other clients will raise notifications. Call this method whenever there is an indication the user is interacting with this client. This method may be called very frequently, and it will only make a request when necessary.
hangups/client.py
async def set_active(self): """Set this client as active. While a client is active, no other clients will raise notifications. Call this method whenever there is an indication the user is interacting with this client. This method may be called very frequently, and it will only m...
async def set_active(self): """Set this client as active. While a client is active, no other clients will raise notifications. Call this method whenever there is an indication the user is interacting with this client. This method may be called very frequently, and it will only m...
[ "Set", "this", "client", "as", "active", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L181-L239
[ "async", "def", "set_active", "(", "self", ")", ":", "is_active", "=", "(", "self", ".", "_active_client_state", "==", "hangouts_pb2", ".", "ACTIVE_CLIENT_STATE_IS_ACTIVE", ")", "timed_out", "=", "(", "time", ".", "time", "(", ")", "-", "self", ".", "_last_a...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.upload_image
Upload an image that can be later attached to a chat message. Args: image_file: A file-like object containing an image. filename (str): (optional) Custom name for the uploaded file. return_uploaded_image (bool): (optional) If True, return :class:`.UploadedIma...
hangups/client.py
async def upload_image(self, image_file, filename=None, *, return_uploaded_image=False): """Upload an image that can be later attached to a chat message. Args: image_file: A file-like object containing an image. filename (str): (optional) Custom name f...
async def upload_image(self, image_file, filename=None, *, return_uploaded_image=False): """Upload an image that can be later attached to a chat message. Args: image_file: A file-like object containing an image. filename (str): (optional) Custom name f...
[ "Upload", "an", "image", "that", "can", "be", "later", "attached", "to", "a", "chat", "message", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L241-L307
[ "async", "def", "upload_image", "(", "self", ",", "image_file", ",", "filename", "=", "None", ",", "*", ",", "return_uploaded_image", "=", "False", ")", ":", "image_filename", "=", "filename", "or", "os", ".", "path", ".", "basename", "(", "image_file", "....
85c0bf0a57698d077461283895707260f9dbf931
valid
Client._get_upload_session_status
Parse the image upload response to obtain status. Args: res: http_utils.FetchResponse instance, the upload response Returns: dict, sessionStatus of the response Raises: hangups.NetworkError: If the upload request failed.
hangups/client.py
def _get_upload_session_status(res): """Parse the image upload response to obtain status. Args: res: http_utils.FetchResponse instance, the upload response Returns: dict, sessionStatus of the response Raises: hangups.NetworkError: If the upload requ...
def _get_upload_session_status(res): """Parse the image upload response to obtain status. Args: res: http_utils.FetchResponse instance, the upload response Returns: dict, sessionStatus of the response Raises: hangups.NetworkError: If the upload requ...
[ "Parse", "the", "image", "upload", "response", "to", "obtain", "status", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L314-L340
[ "def", "_get_upload_session_status", "(", "res", ")", ":", "response", "=", "json", ".", "loads", "(", "res", ".", "body", ".", "decode", "(", ")", ")", "if", "'sessionStatus'", "not", "in", "response", ":", "try", ":", "info", "=", "(", "response", "[...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client._on_receive_array
Parse channel array and call the appropriate events.
hangups/client.py
async def _on_receive_array(self, array): """Parse channel array and call the appropriate events.""" if array[0] == 'noop': pass # This is just a keep-alive, ignore it. else: wrapper = json.loads(array[0]['p']) # Wrapper appears to be a Protocol Buffer messag...
async def _on_receive_array(self, array): """Parse channel array and call the appropriate events.""" if array[0] == 'noop': pass # This is just a keep-alive, ignore it. else: wrapper = json.loads(array[0]['p']) # Wrapper appears to be a Protocol Buffer messag...
[ "Parse", "channel", "array", "and", "call", "the", "appropriate", "events", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L342-L372
[ "async", "def", "_on_receive_array", "(", "self", ",", "array", ")", ":", "if", "array", "[", "0", "]", "==", "'noop'", ":", "pass", "# This is just a keep-alive, ignore it.", "else", ":", "wrapper", "=", "json", ".", "loads", "(", "array", "[", "0", "]", ...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client._add_channel_services
Add services to the channel. The services we add to the channel determine what kind of data we will receive on it. The "babel" service includes what we need for Hangouts. If this fails for some reason, hangups will never receive any events. The "babel_presence_last_seen" servic...
hangups/client.py
async def _add_channel_services(self): """Add services to the channel. The services we add to the channel determine what kind of data we will receive on it. The "babel" service includes what we need for Hangouts. If this fails for some reason, hangups will never receive any eve...
async def _add_channel_services(self): """Add services to the channel. The services we add to the channel determine what kind of data we will receive on it. The "babel" service includes what we need for Hangouts. If this fails for some reason, hangups will never receive any eve...
[ "Add", "services", "to", "the", "channel", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L374-L398
[ "async", "def", "_add_channel_services", "(", "self", ")", ":", "logger", ".", "info", "(", "'Adding channel services...'", ")", "# Based on what Hangouts for Chrome does over 2 requests, this is", "# trimmed down to 1 request that includes the bare minimum to make", "# things work.", ...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client._pb_request
Send a Protocol Buffer formatted chat API request. Args: endpoint (str): The chat API endpoint to use. request_pb: The request body as a Protocol Buffer message. response_pb: The response body as a Protocol Buffer message. Raises: NetworkError: If the re...
hangups/client.py
async def _pb_request(self, endpoint, request_pb, response_pb): """Send a Protocol Buffer formatted chat API request. Args: endpoint (str): The chat API endpoint to use. request_pb: The request body as a Protocol Buffer message. response_pb: The response body as a Pr...
async def _pb_request(self, endpoint, request_pb, response_pb): """Send a Protocol Buffer formatted chat API request. Args: endpoint (str): The chat API endpoint to use. request_pb: The request body as a Protocol Buffer message. response_pb: The response body as a Pr...
[ "Send", "a", "Protocol", "Buffer", "formatted", "chat", "API", "request", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L400-L436
[ "async", "def", "_pb_request", "(", "self", ",", "endpoint", ",", "request_pb", ",", "response_pb", ")", ":", "logger", ".", "debug", "(", "'Sending Protocol Buffer request %s:\\n%s'", ",", "endpoint", ",", "request_pb", ")", "res", "=", "await", "self", ".", ...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client._base_request
Send a generic authenticated POST request. Args: url (str): URL of request. content_type (str): Request content type. response_type (str): The desired response format. Valid options are: 'json' (JSON), 'protojson' (pblite), and 'proto' (binary ...
hangups/client.py
async def _base_request(self, url, content_type, response_type, data): """Send a generic authenticated POST request. Args: url (str): URL of request. content_type (str): Request content type. response_type (str): The desired response format. Valid options ...
async def _base_request(self, url, content_type, response_type, data): """Send a generic authenticated POST request. Args: url (str): URL of request. content_type (str): Request content type. response_type (str): The desired response format. Valid options ...
[ "Send", "a", "generic", "authenticated", "POST", "request", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L438-L472
[ "async", "def", "_base_request", "(", "self", ",", "url", ",", "content_type", ",", "response_type", ",", "data", ")", ":", "headers", "=", "{", "'content-type'", ":", "content_type", ",", "# This header is required for Protocol Buffer responses. It causes", "# them to ...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.add_user
Invite users to join an existing group conversation.
hangups/client.py
async def add_user(self, add_user_request): """Invite users to join an existing group conversation.""" response = hangouts_pb2.AddUserResponse() await self._pb_request('conversations/adduser', add_user_request, response) return response
async def add_user(self, add_user_request): """Invite users to join an existing group conversation.""" response = hangouts_pb2.AddUserResponse() await self._pb_request('conversations/adduser', add_user_request, response) return response
[ "Invite", "users", "to", "join", "an", "existing", "group", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L479-L484
[ "async", "def", "add_user", "(", "self", ",", "add_user_request", ")", ":", "response", "=", "hangouts_pb2", ".", "AddUserResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/adduser'", ",", "add_user_request", ",", "response", ")", "re...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.create_conversation
Create a new conversation.
hangups/client.py
async def create_conversation(self, create_conversation_request): """Create a new conversation.""" response = hangouts_pb2.CreateConversationResponse() await self._pb_request('conversations/createconversation', create_conversation_request, response) return ...
async def create_conversation(self, create_conversation_request): """Create a new conversation.""" response = hangouts_pb2.CreateConversationResponse() await self._pb_request('conversations/createconversation', create_conversation_request, response) return ...
[ "Create", "a", "new", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L486-L491
[ "async", "def", "create_conversation", "(", "self", ",", "create_conversation_request", ")", ":", "response", "=", "hangouts_pb2", ".", "CreateConversationResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/createconversation'", ",", "create_c...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.delete_conversation
Leave a one-to-one conversation. One-to-one conversations are "sticky"; they can't actually be deleted. This API clears the event history of the specified conversation up to ``delete_upper_bound_timestamp``, hiding it if no events remain.
hangups/client.py
async def delete_conversation(self, delete_conversation_request): """Leave a one-to-one conversation. One-to-one conversations are "sticky"; they can't actually be deleted. This API clears the event history of the specified conversation up to ``delete_upper_bound_timestamp``, hiding it ...
async def delete_conversation(self, delete_conversation_request): """Leave a one-to-one conversation. One-to-one conversations are "sticky"; they can't actually be deleted. This API clears the event history of the specified conversation up to ``delete_upper_bound_timestamp``, hiding it ...
[ "Leave", "a", "one", "-", "to", "-", "one", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L493-L503
[ "async", "def", "delete_conversation", "(", "self", ",", "delete_conversation_request", ")", ":", "response", "=", "hangouts_pb2", ".", "DeleteConversationResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/deleteconversation'", ",", "delete_c...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.easter_egg
Send an easter egg event to a conversation.
hangups/client.py
async def easter_egg(self, easter_egg_request): """Send an easter egg event to a conversation.""" response = hangouts_pb2.EasterEggResponse() await self._pb_request('conversations/easteregg', easter_egg_request, response) return response
async def easter_egg(self, easter_egg_request): """Send an easter egg event to a conversation.""" response = hangouts_pb2.EasterEggResponse() await self._pb_request('conversations/easteregg', easter_egg_request, response) return response
[ "Send", "an", "easter", "egg", "event", "to", "a", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L505-L510
[ "async", "def", "easter_egg", "(", "self", ",", "easter_egg_request", ")", ":", "response", "=", "hangouts_pb2", ".", "EasterEggResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/easteregg'", ",", "easter_egg_request", ",", "response", ...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.get_conversation
Return conversation info and recent events.
hangups/client.py
async def get_conversation(self, get_conversation_request): """Return conversation info and recent events.""" response = hangouts_pb2.GetConversationResponse() await self._pb_request('conversations/getconversation', get_conversation_request, response) retur...
async def get_conversation(self, get_conversation_request): """Return conversation info and recent events.""" response = hangouts_pb2.GetConversationResponse() await self._pb_request('conversations/getconversation', get_conversation_request, response) retur...
[ "Return", "conversation", "info", "and", "recent", "events", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L512-L517
[ "async", "def", "get_conversation", "(", "self", ",", "get_conversation_request", ")", ":", "response", "=", "hangouts_pb2", ".", "GetConversationResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/getconversation'", ",", "get_conversation_req...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.get_entity_by_id
Return one or more user entities. Searching by phone number only finds entities when their phone number is in your contacts (and not always even then), and can't be used to find Google Voice contacts.
hangups/client.py
async def get_entity_by_id(self, get_entity_by_id_request): """Return one or more user entities. Searching by phone number only finds entities when their phone number is in your contacts (and not always even then), and can't be used to find Google Voice contacts. """ res...
async def get_entity_by_id(self, get_entity_by_id_request): """Return one or more user entities. Searching by phone number only finds entities when their phone number is in your contacts (and not always even then), and can't be used to find Google Voice contacts. """ res...
[ "Return", "one", "or", "more", "user", "entities", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L519-L529
[ "async", "def", "get_entity_by_id", "(", "self", ",", "get_entity_by_id_request", ")", ":", "response", "=", "hangouts_pb2", ".", "GetEntityByIdResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'contacts/getentitybyid'", ",", "get_entity_by_id_request", ...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.get_group_conversation_url
Get URL to allow others to join a group conversation.
hangups/client.py
async def get_group_conversation_url(self, get_group_conversation_url_request): """Get URL to allow others to join a group conversation.""" response = hangouts_pb2.GetGroupConversationUrlResponse() await self._pb_request('conversations/getgroupconversatio...
async def get_group_conversation_url(self, get_group_conversation_url_request): """Get URL to allow others to join a group conversation.""" response = hangouts_pb2.GetGroupConversationUrlResponse() await self._pb_request('conversations/getgroupconversatio...
[ "Get", "URL", "to", "allow", "others", "to", "join", "a", "group", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L531-L538
[ "async", "def", "get_group_conversation_url", "(", "self", ",", "get_group_conversation_url_request", ")", ":", "response", "=", "hangouts_pb2", ".", "GetGroupConversationUrlResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/getgroupconversationu...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.get_self_info
Return info about the current user.
hangups/client.py
async def get_self_info(self, get_self_info_request): """Return info about the current user.""" response = hangouts_pb2.GetSelfInfoResponse() await self._pb_request('contacts/getselfinfo', get_self_info_request, response) return response
async def get_self_info(self, get_self_info_request): """Return info about the current user.""" response = hangouts_pb2.GetSelfInfoResponse() await self._pb_request('contacts/getselfinfo', get_self_info_request, response) return response
[ "Return", "info", "about", "the", "current", "user", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L540-L545
[ "async", "def", "get_self_info", "(", "self", ",", "get_self_info_request", ")", ":", "response", "=", "hangouts_pb2", ".", "GetSelfInfoResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'contacts/getselfinfo'", ",", "get_self_info_request", ",", "respo...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.get_suggested_entities
Return suggested contacts.
hangups/client.py
async def get_suggested_entities(self, get_suggested_entities_request): """Return suggested contacts.""" response = hangouts_pb2.GetSuggestedEntitiesResponse() await self._pb_request('contacts/getsuggestedentities', get_suggested_entities_request, response) ...
async def get_suggested_entities(self, get_suggested_entities_request): """Return suggested contacts.""" response = hangouts_pb2.GetSuggestedEntitiesResponse() await self._pb_request('contacts/getsuggestedentities', get_suggested_entities_request, response) ...
[ "Return", "suggested", "contacts", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L547-L552
[ "async", "def", "get_suggested_entities", "(", "self", ",", "get_suggested_entities_request", ")", ":", "response", "=", "hangouts_pb2", ".", "GetSuggestedEntitiesResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'contacts/getsuggestedentities'", ",", "get...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.query_presence
Return presence status for a list of users.
hangups/client.py
async def query_presence(self, query_presence_request): """Return presence status for a list of users.""" response = hangouts_pb2.QueryPresenceResponse() await self._pb_request('presence/querypresence', query_presence_request, response) return response
async def query_presence(self, query_presence_request): """Return presence status for a list of users.""" response = hangouts_pb2.QueryPresenceResponse() await self._pb_request('presence/querypresence', query_presence_request, response) return response
[ "Return", "presence", "status", "for", "a", "list", "of", "users", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L554-L559
[ "async", "def", "query_presence", "(", "self", ",", "query_presence_request", ")", ":", "response", "=", "hangouts_pb2", ".", "QueryPresenceResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'presence/querypresence'", ",", "query_presence_request", ",", ...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.remove_user
Remove a participant from a group conversation.
hangups/client.py
async def remove_user(self, remove_user_request): """Remove a participant from a group conversation.""" response = hangouts_pb2.RemoveUserResponse() await self._pb_request('conversations/removeuser', remove_user_request, response) return response
async def remove_user(self, remove_user_request): """Remove a participant from a group conversation.""" response = hangouts_pb2.RemoveUserResponse() await self._pb_request('conversations/removeuser', remove_user_request, response) return response
[ "Remove", "a", "participant", "from", "a", "group", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L561-L566
[ "async", "def", "remove_user", "(", "self", ",", "remove_user_request", ")", ":", "response", "=", "hangouts_pb2", ".", "RemoveUserResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/removeuser'", ",", "remove_user_request", ",", "response...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.rename_conversation
Rename a conversation. Both group and one-to-one conversations may be renamed, but the official Hangouts clients have mixed support for one-to-one conversations with custom names.
hangups/client.py
async def rename_conversation(self, rename_conversation_request): """Rename a conversation. Both group and one-to-one conversations may be renamed, but the official Hangouts clients have mixed support for one-to-one conversations with custom names. """ response = hangout...
async def rename_conversation(self, rename_conversation_request): """Rename a conversation. Both group and one-to-one conversations may be renamed, but the official Hangouts clients have mixed support for one-to-one conversations with custom names. """ response = hangout...
[ "Rename", "a", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L568-L578
[ "async", "def", "rename_conversation", "(", "self", ",", "rename_conversation_request", ")", ":", "response", "=", "hangouts_pb2", ".", "RenameConversationResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/renameconversation'", ",", "rename_c...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.search_entities
Return user entities based on a query.
hangups/client.py
async def search_entities(self, search_entities_request): """Return user entities based on a query.""" response = hangouts_pb2.SearchEntitiesResponse() await self._pb_request('contacts/searchentities', search_entities_request, response) return response
async def search_entities(self, search_entities_request): """Return user entities based on a query.""" response = hangouts_pb2.SearchEntitiesResponse() await self._pb_request('contacts/searchentities', search_entities_request, response) return response
[ "Return", "user", "entities", "based", "on", "a", "query", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L580-L585
[ "async", "def", "search_entities", "(", "self", ",", "search_entities_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SearchEntitiesResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'contacts/searchentities'", ",", "search_entities_request", "...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.send_chat_message
Send a chat message to a conversation.
hangups/client.py
async def send_chat_message(self, send_chat_message_request): """Send a chat message to a conversation.""" response = hangouts_pb2.SendChatMessageResponse() await self._pb_request('conversations/sendchatmessage', send_chat_message_request, response) return ...
async def send_chat_message(self, send_chat_message_request): """Send a chat message to a conversation.""" response = hangouts_pb2.SendChatMessageResponse() await self._pb_request('conversations/sendchatmessage', send_chat_message_request, response) return ...
[ "Send", "a", "chat", "message", "to", "a", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L587-L592
[ "async", "def", "send_chat_message", "(", "self", ",", "send_chat_message_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SendChatMessageResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/sendchatmessage'", ",", "send_chat_message_...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.modify_otr_status
Enable or disable message history in a conversation.
hangups/client.py
async def modify_otr_status(self, modify_otr_status_request): """Enable or disable message history in a conversation.""" response = hangouts_pb2.ModifyOTRStatusResponse() await self._pb_request('conversations/modifyotrstatus', modify_otr_status_request, response) ...
async def modify_otr_status(self, modify_otr_status_request): """Enable or disable message history in a conversation.""" response = hangouts_pb2.ModifyOTRStatusResponse() await self._pb_request('conversations/modifyotrstatus', modify_otr_status_request, response) ...
[ "Enable", "or", "disable", "message", "history", "in", "a", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L594-L599
[ "async", "def", "modify_otr_status", "(", "self", ",", "modify_otr_status_request", ")", ":", "response", "=", "hangouts_pb2", ".", "ModifyOTRStatusResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/modifyotrstatus'", ",", "modify_otr_status_...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.send_offnetwork_invitation
Send an email to invite a non-Google contact to Hangouts.
hangups/client.py
async def send_offnetwork_invitation( self, send_offnetwork_invitation_request ): """Send an email to invite a non-Google contact to Hangouts.""" response = hangouts_pb2.SendOffnetworkInvitationResponse() await self._pb_request('devices/sendoffnetworkinvitation', ...
async def send_offnetwork_invitation( self, send_offnetwork_invitation_request ): """Send an email to invite a non-Google contact to Hangouts.""" response = hangouts_pb2.SendOffnetworkInvitationResponse() await self._pb_request('devices/sendoffnetworkinvitation', ...
[ "Send", "an", "email", "to", "invite", "a", "non", "-", "Google", "contact", "to", "Hangouts", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L601-L609
[ "async", "def", "send_offnetwork_invitation", "(", "self", ",", "send_offnetwork_invitation_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SendOffnetworkInvitationResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'devices/sendoffnetworkinvitation'"...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.set_active_client
Set the active client.
hangups/client.py
async def set_active_client(self, set_active_client_request): """Set the active client.""" response = hangouts_pb2.SetActiveClientResponse() await self._pb_request('clients/setactiveclient', set_active_client_request, response) return response
async def set_active_client(self, set_active_client_request): """Set the active client.""" response = hangouts_pb2.SetActiveClientResponse() await self._pb_request('clients/setactiveclient', set_active_client_request, response) return response
[ "Set", "the", "active", "client", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L611-L616
[ "async", "def", "set_active_client", "(", "self", ",", "set_active_client_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SetActiveClientResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'clients/setactiveclient'", ",", "set_active_client_reques...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.set_conversation_notification_level
Set the notification level of a conversation.
hangups/client.py
async def set_conversation_notification_level( self, set_conversation_notification_level_request ): """Set the notification level of a conversation.""" response = hangouts_pb2.SetConversationNotificationLevelResponse() await self._pb_request( 'conversations/setconvers...
async def set_conversation_notification_level( self, set_conversation_notification_level_request ): """Set the notification level of a conversation.""" response = hangouts_pb2.SetConversationNotificationLevelResponse() await self._pb_request( 'conversations/setconvers...
[ "Set", "the", "notification", "level", "of", "a", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L618-L627
[ "async", "def", "set_conversation_notification_level", "(", "self", ",", "set_conversation_notification_level_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SetConversationNotificationLevelResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversa...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.set_focus
Set focus to a conversation.
hangups/client.py
async def set_focus(self, set_focus_request): """Set focus to a conversation.""" response = hangouts_pb2.SetFocusResponse() await self._pb_request('conversations/setfocus', set_focus_request, response) return response
async def set_focus(self, set_focus_request): """Set focus to a conversation.""" response = hangouts_pb2.SetFocusResponse() await self._pb_request('conversations/setfocus', set_focus_request, response) return response
[ "Set", "focus", "to", "a", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L629-L634
[ "async", "def", "set_focus", "(", "self", ",", "set_focus_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SetFocusResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/setfocus'", ",", "set_focus_request", ",", "response", ")", ...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.set_group_link_sharing_enabled
Set whether group link sharing is enabled for a conversation.
hangups/client.py
async def set_group_link_sharing_enabled( self, set_group_link_sharing_enabled_request ): """Set whether group link sharing is enabled for a conversation.""" response = hangouts_pb2.SetGroupLinkSharingEnabledResponse() await self._pb_request('conversations/setgrouplinksharingenab...
async def set_group_link_sharing_enabled( self, set_group_link_sharing_enabled_request ): """Set whether group link sharing is enabled for a conversation.""" response = hangouts_pb2.SetGroupLinkSharingEnabledResponse() await self._pb_request('conversations/setgrouplinksharingenab...
[ "Set", "whether", "group", "link", "sharing", "is", "enabled", "for", "a", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L636-L644
[ "async", "def", "set_group_link_sharing_enabled", "(", "self", ",", "set_group_link_sharing_enabled_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SetGroupLinkSharingEnabledResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/setgroupli...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.set_presence
Set the presence status.
hangups/client.py
async def set_presence(self, set_presence_request): """Set the presence status.""" response = hangouts_pb2.SetPresenceResponse() await self._pb_request('presence/setpresence', set_presence_request, response) return response
async def set_presence(self, set_presence_request): """Set the presence status.""" response = hangouts_pb2.SetPresenceResponse() await self._pb_request('presence/setpresence', set_presence_request, response) return response
[ "Set", "the", "presence", "status", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L646-L651
[ "async", "def", "set_presence", "(", "self", ",", "set_presence_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SetPresenceResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'presence/setpresence'", ",", "set_presence_request", ",", "response...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.set_typing
Set the typing status of a conversation.
hangups/client.py
async def set_typing(self, set_typing_request): """Set the typing status of a conversation.""" response = hangouts_pb2.SetTypingResponse() await self._pb_request('conversations/settyping', set_typing_request, response) return response
async def set_typing(self, set_typing_request): """Set the typing status of a conversation.""" response = hangouts_pb2.SetTypingResponse() await self._pb_request('conversations/settyping', set_typing_request, response) return response
[ "Set", "the", "typing", "status", "of", "a", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L653-L658
[ "async", "def", "set_typing", "(", "self", ",", "set_typing_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SetTypingResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/settyping'", ",", "set_typing_request", ",", "response", ...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.sync_all_new_events
List all events occurring at or after a timestamp.
hangups/client.py
async def sync_all_new_events(self, sync_all_new_events_request): """List all events occurring at or after a timestamp.""" response = hangouts_pb2.SyncAllNewEventsResponse() await self._pb_request('conversations/syncallnewevents', sync_all_new_events_request, respo...
async def sync_all_new_events(self, sync_all_new_events_request): """List all events occurring at or after a timestamp.""" response = hangouts_pb2.SyncAllNewEventsResponse() await self._pb_request('conversations/syncallnewevents', sync_all_new_events_request, respo...
[ "List", "all", "events", "occurring", "at", "or", "after", "a", "timestamp", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L660-L665
[ "async", "def", "sync_all_new_events", "(", "self", ",", "sync_all_new_events_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SyncAllNewEventsResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/syncallnewevents'", ",", "sync_all_new...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.sync_recent_conversations
Return info on recent conversations and their events.
hangups/client.py
async def sync_recent_conversations( self, sync_recent_conversations_request ): """Return info on recent conversations and their events.""" response = hangouts_pb2.SyncRecentConversationsResponse() await self._pb_request('conversations/syncrecentconversations', ...
async def sync_recent_conversations( self, sync_recent_conversations_request ): """Return info on recent conversations and their events.""" response = hangouts_pb2.SyncRecentConversationsResponse() await self._pb_request('conversations/syncrecentconversations', ...
[ "Return", "info", "on", "recent", "conversations", "and", "their", "events", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L667-L675
[ "async", "def", "sync_recent_conversations", "(", "self", ",", "sync_recent_conversations_request", ")", ":", "response", "=", "hangouts_pb2", ".", "SyncRecentConversationsResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/syncrecentconversations...
85c0bf0a57698d077461283895707260f9dbf931
valid
Client.update_watermark
Update the watermark (read timestamp) of a conversation.
hangups/client.py
async def update_watermark(self, update_watermark_request): """Update the watermark (read timestamp) of a conversation.""" response = hangouts_pb2.UpdateWatermarkResponse() await self._pb_request('conversations/updatewatermark', update_watermark_request, response) ...
async def update_watermark(self, update_watermark_request): """Update the watermark (read timestamp) of a conversation.""" response = hangouts_pb2.UpdateWatermarkResponse() await self._pb_request('conversations/updatewatermark', update_watermark_request, response) ...
[ "Update", "the", "watermark", "(", "read", "timestamp", ")", "of", "a", "conversation", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/client.py#L677-L682
[ "async", "def", "update_watermark", "(", "self", ",", "update_watermark_request", ")", ":", "response", "=", "hangouts_pb2", ".", "UpdateWatermarkResponse", "(", ")", "await", "self", ".", "_pb_request", "(", "'conversations/updatewatermark'", ",", "update_watermark_req...
85c0bf0a57698d077461283895707260f9dbf931
valid
from_timestamp
Convert a microsecond timestamp to a UTC datetime instance.
hangups/parsers.py
def from_timestamp(microsecond_timestamp): """Convert a microsecond timestamp to a UTC datetime instance.""" # Create datetime without losing precision from floating point (yes, this # is actually needed): return datetime.datetime.fromtimestamp( microsecond_timestamp // 1000000, datetime.timezon...
def from_timestamp(microsecond_timestamp): """Convert a microsecond timestamp to a UTC datetime instance.""" # Create datetime without losing precision from floating point (yes, this # is actually needed): return datetime.datetime.fromtimestamp( microsecond_timestamp // 1000000, datetime.timezon...
[ "Convert", "a", "microsecond", "timestamp", "to", "a", "UTC", "datetime", "instance", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/parsers.py#L18-L24
[ "def", "from_timestamp", "(", "microsecond_timestamp", ")", ":", "# Create datetime without losing precision from floating point (yes, this", "# is actually needed):", "return", "datetime", ".", "datetime", ".", "fromtimestamp", "(", "microsecond_timestamp", "//", "1000000", ",",...
85c0bf0a57698d077461283895707260f9dbf931
valid
from_participantid
Convert hangouts_pb2.ParticipantId to UserID.
hangups/parsers.py
def from_participantid(participant_id): """Convert hangouts_pb2.ParticipantId to UserID.""" return user.UserID( chat_id=participant_id.chat_id, gaia_id=participant_id.gaia_id )
def from_participantid(participant_id): """Convert hangouts_pb2.ParticipantId to UserID.""" return user.UserID( chat_id=participant_id.chat_id, gaia_id=participant_id.gaia_id )
[ "Convert", "hangouts_pb2", ".", "ParticipantId", "to", "UserID", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/parsers.py#L32-L37
[ "def", "from_participantid", "(", "participant_id", ")", ":", "return", "user", ".", "UserID", "(", "chat_id", "=", "participant_id", ".", "chat_id", ",", "gaia_id", "=", "participant_id", ".", "gaia_id", ")" ]
85c0bf0a57698d077461283895707260f9dbf931
valid
to_participantid
Convert UserID to hangouts_pb2.ParticipantId.
hangups/parsers.py
def to_participantid(user_id): """Convert UserID to hangouts_pb2.ParticipantId.""" return hangouts_pb2.ParticipantId( chat_id=user_id.chat_id, gaia_id=user_id.gaia_id )
def to_participantid(user_id): """Convert UserID to hangouts_pb2.ParticipantId.""" return hangouts_pb2.ParticipantId( chat_id=user_id.chat_id, gaia_id=user_id.gaia_id )
[ "Convert", "UserID", "to", "hangouts_pb2", ".", "ParticipantId", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/parsers.py#L40-L45
[ "def", "to_participantid", "(", "user_id", ")", ":", "return", "hangouts_pb2", ".", "ParticipantId", "(", "chat_id", "=", "user_id", ".", "chat_id", ",", "gaia_id", "=", "user_id", ".", "gaia_id", ")" ]
85c0bf0a57698d077461283895707260f9dbf931
valid
parse_typing_status_message
Return TypingStatusMessage from hangouts_pb2.SetTypingNotification. The same status may be sent multiple times consecutively, and when a message is sent the typing status will not change to stopped.
hangups/parsers.py
def parse_typing_status_message(p): """Return TypingStatusMessage from hangouts_pb2.SetTypingNotification. The same status may be sent multiple times consecutively, and when a message is sent the typing status will not change to stopped. """ return TypingStatusMessage( conv_id=p.conversatio...
def parse_typing_status_message(p): """Return TypingStatusMessage from hangouts_pb2.SetTypingNotification. The same status may be sent multiple times consecutively, and when a message is sent the typing status will not change to stopped. """ return TypingStatusMessage( conv_id=p.conversatio...
[ "Return", "TypingStatusMessage", "from", "hangouts_pb2", ".", "SetTypingNotification", "." ]
tdryer/hangups
python
https://github.com/tdryer/hangups/blob/85c0bf0a57698d077461283895707260f9dbf931/hangups/parsers.py#L68-L79
[ "def", "parse_typing_status_message", "(", "p", ")", ":", "return", "TypingStatusMessage", "(", "conv_id", "=", "p", ".", "conversation_id", ".", "id", ",", "user_id", "=", "from_participantid", "(", "p", ".", "sender_id", ")", ",", "timestamp", "=", "from_tim...
85c0bf0a57698d077461283895707260f9dbf931