body
stringlengths
26
98.2k
body_hash
int64
-9,222,864,604,528,158,000
9,221,803,474B
docstring
stringlengths
1
16.8k
path
stringlengths
5
230
name
stringlengths
1
96
repository_name
stringlengths
7
89
lang
stringclasses
1 value
body_without_docstring
stringlengths
20
98.2k
def one_hot_spectrum(spec, tol, max_mz, shift=0, min_mz=0, method='max'): "Convert spectrum peaks into on-hot-vector\n\n method: str\n 'max' take highest intensity peak within every bin.\n 'sum' take sum of all peaks within every bin.\n " dim_vector = int(((max_mz - min_mz) / tol)) one_h...
1,814,090,381,247,568,000
Convert spectrum peaks into on-hot-vector method: str 'max' take highest intensity peak within every bin. 'sum' take sum of all peaks within every bin.
matchms/old/ms_similarity_classical.py
one_hot_spectrum
matchms/old-iomega-spec2vec
python
def one_hot_spectrum(spec, tol, max_mz, shift=0, min_mz=0, method='max'): "Convert spectrum peaks into on-hot-vector\n\n method: str\n 'max' take highest intensity peak within every bin.\n 'sum' take sum of all peaks within every bin.\n " dim_vector = int(((max_mz - min_mz) / tol)) one_h...
@numba.njit def find_pairs_numba(spec1, spec2, tol, shift=0): 'Find matching pairs between two spectra.\n\n Args\n ----\n spec1 : list of tuples\n List of (mz, intensity) tuples.\n spec2 : list of tuples\n List of (mz, intensity) tuples.\n tol : float\n Tolerance. Peaks will be c...
-585,652,530,292,401,300
Find matching pairs between two spectra. Args ---- spec1 : list of tuples List of (mz, intensity) tuples. spec2 : list of tuples List of (mz, intensity) tuples. tol : float Tolerance. Peaks will be considered a match when < tol appart. shift : float, optional Shift spectra peaks by shift. The default i...
matchms/old/ms_similarity_classical.py
find_pairs_numba
matchms/old-iomega-spec2vec
python
@numba.njit def find_pairs_numba(spec1, spec2, tol, shift=0): 'Find matching pairs between two spectra.\n\n Args\n ----\n spec1 : list of tuples\n List of (mz, intensity) tuples.\n spec2 : list of tuples\n List of (mz, intensity) tuples.\n tol : float\n Tolerance. Peaks will be c...
def find_pairs(spec1, spec2, tol, shift=0): 'Find matching pairs between two spectra.\n\n Args\n ----\n spec1 : list of tuples\n List of (mz, intensity) tuples.\n spec2 : list of tuples\n List of (mz, intensity) tuples.\n tol : float\n Tolerance. Peaks will be considered a match ...
7,536,612,827,658,155,000
Find matching pairs between two spectra. Args ---- spec1 : list of tuples List of (mz, intensity) tuples. spec2 : list of tuples List of (mz, intensity) tuples. tol : float Tolerance. Peaks will be considered a match when < tol appart. shift : float, optional Shift spectra peaks by shift. The default i...
matchms/old/ms_similarity_classical.py
find_pairs
matchms/old-iomega-spec2vec
python
def find_pairs(spec1, spec2, tol, shift=0): 'Find matching pairs between two spectra.\n\n Args\n ----\n spec1 : list of tuples\n List of (mz, intensity) tuples.\n spec2 : list of tuples\n List of (mz, intensity) tuples.\n tol : float\n Tolerance. Peaks will be considered a match ...
def test_luminance_Newhall1943(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943`\n definition.\n ' self.assertAlmostEqual(luminance_Newhall1943(4.08244375), 12.550078816731881, places=7) self.assertAlmostEqual(luminance_Newhall1943(5.39132685), 23.4812523713107...
-736,306,793,631,554,300
Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943` definition.
colour/colorimetry/tests/test_luminance.py
test_luminance_Newhall1943
colour-science/colour
python
def test_luminance_Newhall1943(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943`\n definition.\n ' self.assertAlmostEqual(luminance_Newhall1943(4.08244375), 12.550078816731881, places=7) self.assertAlmostEqual(luminance_Newhall1943(5.39132685), 23.4812523713107...
def test_n_dimensional_luminance_Newhall1943(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943`\n definition n-dimensional arrays support.\n ' V = 4.08244375 Y = luminance_Newhall1943(V) V = np.tile(V, 6) Y = np.tile(Y, 6) np.testing.assert_almost_eq...
5,203,468,696,075,416,000
Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943` definition n-dimensional arrays support.
colour/colorimetry/tests/test_luminance.py
test_n_dimensional_luminance_Newhall1943
colour-science/colour
python
def test_n_dimensional_luminance_Newhall1943(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943`\n definition n-dimensional arrays support.\n ' V = 4.08244375 Y = luminance_Newhall1943(V) V = np.tile(V, 6) Y = np.tile(Y, 6) np.testing.assert_almost_eq...
def test_domain_range_scale_luminance_Newhall1943(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943`\n definition domain and range scale support.\n ' Y = luminance_Newhall1943(4.08244375) d_r = (('reference', 1, 1), (1, 0.1, 0.01), (100, 10, 1)) for (scale, ...
5,581,548,457,223,903,000
Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943` definition domain and range scale support.
colour/colorimetry/tests/test_luminance.py
test_domain_range_scale_luminance_Newhall1943
colour-science/colour
python
def test_domain_range_scale_luminance_Newhall1943(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943`\n definition domain and range scale support.\n ' Y = luminance_Newhall1943(4.08244375) d_r = (('reference', 1, 1), (1, 0.1, 0.01), (100, 10, 1)) for (scale, ...
@ignore_numpy_errors def test_nan_luminance_Newhall1943(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943`\n definition nan support.\n ' luminance_Newhall1943(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
6,877,471,335,887,002,000
Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943` definition nan support.
colour/colorimetry/tests/test_luminance.py
test_nan_luminance_Newhall1943
colour-science/colour
python
@ignore_numpy_errors def test_nan_luminance_Newhall1943(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Newhall1943`\n definition nan support.\n ' luminance_Newhall1943(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
def test_luminance_ASTMD1535(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535`\n definition.\n ' self.assertAlmostEqual(luminance_ASTMD1535(4.08244375), 12.236342675366036, places=7) self.assertAlmostEqual(luminance_ASTMD1535(5.39132685), 22.893999867280378, plac...
3,155,344,833,414,839,000
Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535` definition.
colour/colorimetry/tests/test_luminance.py
test_luminance_ASTMD1535
colour-science/colour
python
def test_luminance_ASTMD1535(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535`\n definition.\n ' self.assertAlmostEqual(luminance_ASTMD1535(4.08244375), 12.236342675366036, places=7) self.assertAlmostEqual(luminance_ASTMD1535(5.39132685), 22.893999867280378, plac...
def test_n_dimensional_luminance_ASTMD1535(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535`\n definition n-dimensional arrays support.\n ' V = 4.08244375 Y = luminance_ASTMD1535(V) V = np.tile(V, 6) Y = np.tile(Y, 6) np.testing.assert_almost_equal(lu...
-2,494,964,820,007,343,000
Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535` definition n-dimensional arrays support.
colour/colorimetry/tests/test_luminance.py
test_n_dimensional_luminance_ASTMD1535
colour-science/colour
python
def test_n_dimensional_luminance_ASTMD1535(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535`\n definition n-dimensional arrays support.\n ' V = 4.08244375 Y = luminance_ASTMD1535(V) V = np.tile(V, 6) Y = np.tile(Y, 6) np.testing.assert_almost_equal(lu...
def test_domain_range_scale_luminance_ASTMD1535(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535`\n definition domain and range scale support.\n ' Y = luminance_ASTMD1535(4.08244375) d_r = (('reference', 1, 1), (1, 0.1, 0.01), (100, 10, 1)) for (scale, factor...
2,091,237,208,208,237,600
Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535` definition domain and range scale support.
colour/colorimetry/tests/test_luminance.py
test_domain_range_scale_luminance_ASTMD1535
colour-science/colour
python
def test_domain_range_scale_luminance_ASTMD1535(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535`\n definition domain and range scale support.\n ' Y = luminance_ASTMD1535(4.08244375) d_r = (('reference', 1, 1), (1, 0.1, 0.01), (100, 10, 1)) for (scale, factor...
@ignore_numpy_errors def test_nan_luminance_ASTMD1535(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535`\n definition nan support.\n ' luminance_ASTMD1535(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
-4,567,697,865,482,675,700
Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535` definition nan support.
colour/colorimetry/tests/test_luminance.py
test_nan_luminance_ASTMD1535
colour-science/colour
python
@ignore_numpy_errors def test_nan_luminance_ASTMD1535(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_ASTMD1535`\n definition nan support.\n ' luminance_ASTMD1535(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
def test_intermediate_luminance_function_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition.\n ' self.assertAlmostEqual(intermediate_luminance_function_CIE1976(0.495929964178047), 12.197225350000002, places=7) self.assertAlmostEqual...
-8,593,939,569,209,062,000
Tests :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition.
colour/colorimetry/tests/test_luminance.py
test_intermediate_luminance_function_CIE1976
colour-science/colour
python
def test_intermediate_luminance_function_CIE1976(self): '\n \n ' self.assertAlmostEqual(intermediate_luminance_function_CIE1976(0.495929964178047), 12.197225350000002, places=7) self.assertAlmostEqual(intermediate_luminance_function_CIE1976(0.613072093530391), 23.042767810000004, places=7) ...
def test_n_dimensional_intermediate_luminance_function_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition n-dimensional arrays\nsupport.\n ' f_Y_Y_n = 0.495929964178047 Y = intermediate_luminance_function_CIE1976(f_Y_Y_n) f_Y_Y_...
2,127,797,802,917,290,200
Tests :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition n-dimensional arrays support.
colour/colorimetry/tests/test_luminance.py
test_n_dimensional_intermediate_luminance_function_CIE1976
colour-science/colour
python
def test_n_dimensional_intermediate_luminance_function_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition n-dimensional arrays\nsupport.\n ' f_Y_Y_n = 0.495929964178047 Y = intermediate_luminance_function_CIE1976(f_Y_Y_n) f_Y_Y_...
def test_domain_range_scale_intermediate_luminance_function_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition domain and range scale\nsupport.\n ' Y = intermediate_luminance_function_CIE1976(41.52787584465345, 100) for scale in ('r...
3,596,112,416,605,083,600
Tests :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition domain and range scale support.
colour/colorimetry/tests/test_luminance.py
test_domain_range_scale_intermediate_luminance_function_CIE1976
colour-science/colour
python
def test_domain_range_scale_intermediate_luminance_function_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition domain and range scale\nsupport.\n ' Y = intermediate_luminance_function_CIE1976(41.52787584465345, 100) for scale in ('r...
@ignore_numpy_errors def test_nan_intermediate_luminance_function_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition nan support.\n ' intermediate_luminance_function_CIE1976(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
2,110,462,359,493,447,400
Tests :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition nan support.
colour/colorimetry/tests/test_luminance.py
test_nan_intermediate_luminance_function_CIE1976
colour-science/colour
python
@ignore_numpy_errors def test_nan_intermediate_luminance_function_CIE1976(self): '\n \n ' intermediate_luminance_function_CIE1976(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
def test_luminance_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_CIE1976`\n definition.\n ' self.assertAlmostEqual(luminance_CIE1976(41.52787584465345), 12.197225350000002, places=7) self.assertAlmostEqual(luminance_CIE1976(55.1163628495254), 23.042767810000004,...
-1,002,988,854,156,116,400
Tests :func:`colour.colorimetry.luminance.luminance_CIE1976` definition.
colour/colorimetry/tests/test_luminance.py
test_luminance_CIE1976
colour-science/colour
python
def test_luminance_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_CIE1976`\n definition.\n ' self.assertAlmostEqual(luminance_CIE1976(41.52787584465345), 12.197225350000002, places=7) self.assertAlmostEqual(luminance_CIE1976(55.1163628495254), 23.042767810000004,...
def test_n_dimensional_luminance_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_CIE1976`\n definition n-dimensional arrays support.\n ' L_star = 41.52787584465345 Y = luminance_CIE1976(L_star) L_star = np.tile(L_star, 6) Y = np.tile(Y, 6) np.testing.a...
7,505,105,724,595,458,000
Tests :func:`colour.colorimetry.luminance.luminance_CIE1976` definition n-dimensional arrays support.
colour/colorimetry/tests/test_luminance.py
test_n_dimensional_luminance_CIE1976
colour-science/colour
python
def test_n_dimensional_luminance_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_CIE1976`\n definition n-dimensional arrays support.\n ' L_star = 41.52787584465345 Y = luminance_CIE1976(L_star) L_star = np.tile(L_star, 6) Y = np.tile(Y, 6) np.testing.a...
def test_domain_range_scale_luminance_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_CIE1976`\n definition domain and range scale support.\n ' Y = luminance_CIE1976(41.52787584465345, 100) d_r = (('reference', 1), (1, 0.01), (100, 1)) for (scale, factor) in d...
4,783,930,150,008,546,000
Tests :func:`colour.colorimetry.luminance.luminance_CIE1976` definition domain and range scale support.
colour/colorimetry/tests/test_luminance.py
test_domain_range_scale_luminance_CIE1976
colour-science/colour
python
def test_domain_range_scale_luminance_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_CIE1976`\n definition domain and range scale support.\n ' Y = luminance_CIE1976(41.52787584465345, 100) d_r = (('reference', 1), (1, 0.01), (100, 1)) for (scale, factor) in d...
@ignore_numpy_errors def test_nan_luminance_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_CIE1976`\n definition nan support.\n ' luminance_CIE1976(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
-7,773,002,042,440,529,000
Tests :func:`colour.colorimetry.luminance.luminance_CIE1976` definition nan support.
colour/colorimetry/tests/test_luminance.py
test_nan_luminance_CIE1976
colour-science/colour
python
@ignore_numpy_errors def test_nan_luminance_CIE1976(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_CIE1976`\n definition nan support.\n ' luminance_CIE1976(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
def test_luminance_Fairchild2010(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010`\n definition.\n ' self.assertAlmostEqual(luminance_Fairchild2010(31.996390226262736), 0.12197225350000002, places=7) self.assertAlmostEqual(luminance_Fairchild2010(60.203153682...
1,798,259,972,739,209,000
Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010` definition.
colour/colorimetry/tests/test_luminance.py
test_luminance_Fairchild2010
colour-science/colour
python
def test_luminance_Fairchild2010(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010`\n definition.\n ' self.assertAlmostEqual(luminance_Fairchild2010(31.996390226262736), 0.12197225350000002, places=7) self.assertAlmostEqual(luminance_Fairchild2010(60.203153682...
def test_n_dimensional_luminance_Fairchild2010(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010`\n definition n-dimensional arrays support.\n ' L_hdr = 31.996390226262736 Y = luminance_Fairchild2010(L_hdr) L_hdr = np.tile(L_hdr, 6) Y = np.tile(Y, 6) ...
2,102,488,940,524,924,200
Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010` definition n-dimensional arrays support.
colour/colorimetry/tests/test_luminance.py
test_n_dimensional_luminance_Fairchild2010
colour-science/colour
python
def test_n_dimensional_luminance_Fairchild2010(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010`\n definition n-dimensional arrays support.\n ' L_hdr = 31.996390226262736 Y = luminance_Fairchild2010(L_hdr) L_hdr = np.tile(L_hdr, 6) Y = np.tile(Y, 6) ...
def test_domain_range_scale_luminance_Fairchild2010(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010`\n definition domain and range scale support.\n ' Y = luminance_Fairchild2010(31.996390226262736) d_r = (('reference', 1, 1), (1, 0.01, 1), (100, 1, 100)) ...
809,370,376,535,667,800
Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010` definition domain and range scale support.
colour/colorimetry/tests/test_luminance.py
test_domain_range_scale_luminance_Fairchild2010
colour-science/colour
python
def test_domain_range_scale_luminance_Fairchild2010(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010`\n definition domain and range scale support.\n ' Y = luminance_Fairchild2010(31.996390226262736) d_r = (('reference', 1, 1), (1, 0.01, 1), (100, 1, 100)) ...
@ignore_numpy_errors def test_nan_luminance_Fairchild2010(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010`\n definition nan support.\n ' luminance_Fairchild2010(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
-6,002,254,242,590,914,000
Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010` definition nan support.
colour/colorimetry/tests/test_luminance.py
test_nan_luminance_Fairchild2010
colour-science/colour
python
@ignore_numpy_errors def test_nan_luminance_Fairchild2010(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2010`\n definition nan support.\n ' luminance_Fairchild2010(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
def test_luminance_Fairchild2011(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011`\n definition.\n ' self.assertAlmostEqual(luminance_Fairchild2011(51.852958445912506), 0.12197225350000007, places=7) self.assertAlmostEqual(luminance_Fairchild2011(65.275207956...
-6,578,291,207,390,475,000
Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011` definition.
colour/colorimetry/tests/test_luminance.py
test_luminance_Fairchild2011
colour-science/colour
python
def test_luminance_Fairchild2011(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011`\n definition.\n ' self.assertAlmostEqual(luminance_Fairchild2011(51.852958445912506), 0.12197225350000007, places=7) self.assertAlmostEqual(luminance_Fairchild2011(65.275207956...
def test_n_dimensional_luminance_Fairchild2011(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011`\n definition n-dimensional arrays support.\n ' L_hdr = 51.852958445912506 Y = luminance_Fairchild2011(L_hdr) L_hdr = np.tile(L_hdr, 6) Y = np.tile(Y, 6) ...
6,717,249,832,600,971,000
Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011` definition n-dimensional arrays support.
colour/colorimetry/tests/test_luminance.py
test_n_dimensional_luminance_Fairchild2011
colour-science/colour
python
def test_n_dimensional_luminance_Fairchild2011(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011`\n definition n-dimensional arrays support.\n ' L_hdr = 51.852958445912506 Y = luminance_Fairchild2011(L_hdr) L_hdr = np.tile(L_hdr, 6) Y = np.tile(Y, 6) ...
def test_domain_range_scale_luminance_Fairchild2011(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011`\n definition domain and range scale support.\n ' Y = luminance_Fairchild2011(26.459509817572265) d_r = (('reference', 1, 1), (1, 0.01, 1), (100, 1, 100)) ...
-2,623,130,738,909,725,000
Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011` definition domain and range scale support.
colour/colorimetry/tests/test_luminance.py
test_domain_range_scale_luminance_Fairchild2011
colour-science/colour
python
def test_domain_range_scale_luminance_Fairchild2011(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011`\n definition domain and range scale support.\n ' Y = luminance_Fairchild2011(26.459509817572265) d_r = (('reference', 1, 1), (1, 0.01, 1), (100, 1, 100)) ...
@ignore_numpy_errors def test_nan_luminance_Fairchild2011(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011`\n definition nan support.\n ' luminance_Fairchild2011(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
1,113,389,581,187,477,100
Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011` definition nan support.
colour/colorimetry/tests/test_luminance.py
test_nan_luminance_Fairchild2011
colour-science/colour
python
@ignore_numpy_errors def test_nan_luminance_Fairchild2011(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Fairchild2011`\n definition nan support.\n ' luminance_Fairchild2011(np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan]))
def test_luminance_Abebe2017(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017`\n definition.\n ' self.assertAlmostEqual(luminance_Abebe2017(0.486955571109229), 12.197225350000004, places=7) self.assertAlmostEqual(luminance_Abebe2017(0.474544792145434, method='Ste...
-1,243,341,332,770,816,800
Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017` definition.
colour/colorimetry/tests/test_luminance.py
test_luminance_Abebe2017
colour-science/colour
python
def test_luminance_Abebe2017(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017`\n definition.\n ' self.assertAlmostEqual(luminance_Abebe2017(0.486955571109229), 12.197225350000004, places=7) self.assertAlmostEqual(luminance_Abebe2017(0.474544792145434, method='Ste...
def test_n_dimensional_luminance_Abebe2017(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017`\n definition n-dimensional arrays support.\n ' L = 0.486955571109229 Y = luminance_Abebe2017(L) L = np.tile(L, 6) Y = np.tile(Y, 6) np.testing.assert_almost_e...
-34,476,846,152,246,280
Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017` definition n-dimensional arrays support.
colour/colorimetry/tests/test_luminance.py
test_n_dimensional_luminance_Abebe2017
colour-science/colour
python
def test_n_dimensional_luminance_Abebe2017(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017`\n definition n-dimensional arrays support.\n ' L = 0.486955571109229 Y = luminance_Abebe2017(L) L = np.tile(L, 6) Y = np.tile(Y, 6) np.testing.assert_almost_e...
def test_domain_range_scale_luminance_Abebe2017(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017`\n definition domain and range scale support.\n ' L = luminance_Abebe2017(0.486955571109229) d_r = (('reference', 1), (1, 1), (100, 1)) for (scale, factor) in d_r...
-7,023,710,118,789,896,000
Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017` definition domain and range scale support.
colour/colorimetry/tests/test_luminance.py
test_domain_range_scale_luminance_Abebe2017
colour-science/colour
python
def test_domain_range_scale_luminance_Abebe2017(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017`\n definition domain and range scale support.\n ' L = luminance_Abebe2017(0.486955571109229) d_r = (('reference', 1), (1, 1), (100, 1)) for (scale, factor) in d_r...
@ignore_numpy_errors def test_nan_luminance_Abebe2017(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017`\n definition nan support.\n ' luminance_Abebe2017(*([np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan])] * 2))
-9,052,423,624,516,112,000
Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017` definition nan support.
colour/colorimetry/tests/test_luminance.py
test_nan_luminance_Abebe2017
colour-science/colour
python
@ignore_numpy_errors def test_nan_luminance_Abebe2017(self): '\n Tests :func:`colour.colorimetry.luminance.luminance_Abebe2017`\n definition nan support.\n ' luminance_Abebe2017(*([np.array([(- 1.0), 0.0, 1.0, (- np.inf), np.inf, np.nan])] * 2))
def test_domain_range_scale_luminance(self): '\n Tests :func:`colour.colorimetry.luminance.luminance` definition\n domain and range scale support.\n ' m = ('Newhall 1943', 'ASTM D1535', 'CIE 1976', 'Fairchild 2010', 'Fairchild 2011', 'Abebe 2017') v = [luminance(41.52787584465345, metho...
1,611,610,559,232,723,500
Tests :func:`colour.colorimetry.luminance.luminance` definition domain and range scale support.
colour/colorimetry/tests/test_luminance.py
test_domain_range_scale_luminance
colour-science/colour
python
def test_domain_range_scale_luminance(self): '\n Tests :func:`colour.colorimetry.luminance.luminance` definition\n domain and range scale support.\n ' m = ('Newhall 1943', 'ASTM D1535', 'CIE 1976', 'Fairchild 2010', 'Fairchild 2011', 'Abebe 2017') v = [luminance(41.52787584465345, metho...
async def cb_nr_subscription_handler(msg: nats.aio.client.Msg): 'Use Callback to process Queue Msg objects.' try: logger.info('Received raw message seq:%s, data= %s', msg.sequence, msg.data.decode()) event_message = json.loads(msg.data.decode('utf-8')) logger.debug('Event Message Receiv...
-2,828,123,328,637,019,600
Use Callback to process Queue Msg objects.
queue_services/business-events-listener/src/business_events_listener/worker.py
cb_nr_subscription_handler
saravanpa-aot/sbc-auth
python
async def cb_nr_subscription_handler(msg: nats.aio.client.Msg): try: logger.info('Received raw message seq:%s, data= %s', msg.sequence, msg.data.decode()) event_message = json.loads(msg.data.decode('utf-8')) logger.debug('Event Message Received: %s', event_message) (await proce...
async def process_event(event_message, flask_app): 'Render the org status.' if (not flask_app): raise QueueException('Flask App not available.') with flask_app.app_context(): message_type = event_message.get('type', None) if (message_type == 'bc.registry.names.events'): (...
1,129,332,888,272,081,300
Render the org status.
queue_services/business-events-listener/src/business_events_listener/worker.py
process_event
saravanpa-aot/sbc-auth
python
async def process_event(event_message, flask_app): if (not flask_app): raise QueueException('Flask App not available.') with flask_app.app_context(): message_type = event_message.get('type', None) if (message_type == 'bc.registry.names.events'): (await process_name_event...
async def process_name_events(event_message: Dict[(str, any)]): "Process name events.\n\n 1. Check if the NR already exists in entities table, if yes apply changes. If not create entity record.\n 2. Check if new status is DRAFT, if yes call pay-api and get the account details for the payments against the NR.\...
162,389,578,599,781,470
Process name events. 1. Check if the NR already exists in entities table, if yes apply changes. If not create entity record. 2. Check if new status is DRAFT, if yes call pay-api and get the account details for the payments against the NR. 3. If an account is found, affiliate to that account. Args: event_message (...
queue_services/business-events-listener/src/business_events_listener/worker.py
process_name_events
saravanpa-aot/sbc-auth
python
async def process_name_events(event_message: Dict[(str, any)]): "Process name events.\n\n 1. Check if the NR already exists in entities table, if yes apply changes. If not create entity record.\n 2. Check if new status is DRAFT, if yes call pay-api and get the account details for the payments against the NR.\...
def set_optional_property(destination, source, prop_name): ' Copies the property value if present. ' if (prop_name in source): destination[prop_name] = source[prop_name]
-650,095,351,457,198,500
Copies the property value if present.
dm/templates/external_load_balancer/external_load_balancer.py
set_optional_property
Dileepbodapati/cloud-foundation-toolkit
python
def set_optional_property(destination, source, prop_name): ' ' if (prop_name in source): destination[prop_name] = source[prop_name]
def get_backend_service(properties, backend_spec, res_name, project_id): ' Creates the backend service. ' name = backend_spec.get('resourceName', res_name) backend_name = backend_spec.get('name', name) backend_properties = {'name': backend_name, 'project': project_id, 'loadBalancingScheme': 'EXTERNAL', ...
-7,261,856,017,208,346,000
Creates the backend service.
dm/templates/external_load_balancer/external_load_balancer.py
get_backend_service
Dileepbodapati/cloud-foundation-toolkit
python
def get_backend_service(properties, backend_spec, res_name, project_id): ' ' name = backend_spec.get('resourceName', res_name) backend_name = backend_spec.get('name', name) backend_properties = {'name': backend_name, 'project': project_id, 'loadBalancingScheme': 'EXTERNAL', 'protocol': get_protocol(pro...
def get_forwarding_rule(properties, target, res_name, project_id): ' Creates the forwarding rule. ' name = '{}-forwarding-rule'.format(res_name) rule_properties = {'name': properties.get('name', res_name), 'project': project_id, 'loadBalancingScheme': 'EXTERNAL', 'target': '$(ref.{}.selfLink)'.format(target...
8,396,629,647,795,001,000
Creates the forwarding rule.
dm/templates/external_load_balancer/external_load_balancer.py
get_forwarding_rule
Dileepbodapati/cloud-foundation-toolkit
python
def get_forwarding_rule(properties, target, res_name, project_id): ' ' name = '{}-forwarding-rule'.format(res_name) rule_properties = {'name': properties.get('name', res_name), 'project': project_id, 'loadBalancingScheme': 'EXTERNAL', 'target': '$(ref.{}.selfLink)'.format(target['name']), 'IPProtocol': 'TC...
def get_backend_services(properties, res_name, project_id): ' Creates all backend services to be used by the load balancer. ' backend_resources = [] backend_outputs_map = {'backendServiceName': [], 'backendServiceSelfLink': []} backend_specs = properties['backendServices'] for backend_spec in backen...
-5,058,733,043,978,881,000
Creates all backend services to be used by the load balancer.
dm/templates/external_load_balancer/external_load_balancer.py
get_backend_services
Dileepbodapati/cloud-foundation-toolkit
python
def get_backend_services(properties, res_name, project_id): ' ' backend_resources = [] backend_outputs_map = {'backendServiceName': [], 'backendServiceSelfLink': []} backend_specs = properties['backendServices'] for backend_spec in backend_specs: backend_res_name = '{}-backend-service-{}'.f...
def get_ref(name, prop='selfLink'): ' Creates reference to a property of a given resource. ' return '$(ref.{}.{})'.format(name, prop)
2,922,289,469,912,184,000
Creates reference to a property of a given resource.
dm/templates/external_load_balancer/external_load_balancer.py
get_ref
Dileepbodapati/cloud-foundation-toolkit
python
def get_ref(name, prop='selfLink'): ' ' return '$(ref.{}.{})'.format(name, prop)
def update_refs_recursively(properties): ' Replaces service names with the service selflinks recursively. ' for prop in properties: value = properties[prop] if ((prop == 'defaultService') or (prop == 'service')): is_regular_name = ((not ('.' in value)) and (not ('/' in value))) ...
-6,272,683,023,836,831,000
Replaces service names with the service selflinks recursively.
dm/templates/external_load_balancer/external_load_balancer.py
update_refs_recursively
Dileepbodapati/cloud-foundation-toolkit
python
def update_refs_recursively(properties): ' ' for prop in properties: value = properties[prop] if ((prop == 'defaultService') or (prop == 'service')): is_regular_name = ((not ('.' in value)) and (not ('/' in value))) if is_regular_name: properties[prop] = ...
def get_url_map(properties, res_name, project_id): ' Creates a UrlMap resource. ' spec = copy.deepcopy(properties) spec['project'] = project_id spec['name'] = properties.get('name', res_name) update_refs_recursively(spec) resource = {'name': res_name, 'type': 'url_map.py', 'properties': spec} ...
-2,892,676,959,789,977,000
Creates a UrlMap resource.
dm/templates/external_load_balancer/external_load_balancer.py
get_url_map
Dileepbodapati/cloud-foundation-toolkit
python
def get_url_map(properties, res_name, project_id): ' ' spec = copy.deepcopy(properties) spec['project'] = project_id spec['name'] = properties.get('name', res_name) update_refs_recursively(spec) resource = {'name': res_name, 'type': 'url_map.py', 'properties': spec} self_link = '$(ref.{}.se...
def get_target_proxy(properties, res_name, project_id, bs_resources): ' Creates a target proxy resource. ' protocol = get_protocol(properties) depends = [] if ('HTTP' in protocol): urlMap = copy.deepcopy(properties['urlMap']) if (('name' not in urlMap) and ('name' in properties)): ...
-7,372,446,502,140,090,000
Creates a target proxy resource.
dm/templates/external_load_balancer/external_load_balancer.py
get_target_proxy
Dileepbodapati/cloud-foundation-toolkit
python
def get_target_proxy(properties, res_name, project_id, bs_resources): ' ' protocol = get_protocol(properties) depends = [] if ('HTTP' in protocol): urlMap = copy.deepcopy(properties['urlMap']) if (('name' not in urlMap) and ('name' in properties)): urlMap['name'] = '{}-url-m...
def get_protocol(properties): ' Finds what network protocol to use. ' is_web = ('urlMap' in properties) is_secure = ('ssl' in properties) if is_web: if is_secure: return 'HTTPS' return 'HTTP' if is_secure: return 'SSL' return 'TCP'
-4,319,831,524,416,239,600
Finds what network protocol to use.
dm/templates/external_load_balancer/external_load_balancer.py
get_protocol
Dileepbodapati/cloud-foundation-toolkit
python
def get_protocol(properties): ' ' is_web = ('urlMap' in properties) is_secure = ('ssl' in properties) if is_web: if is_secure: return 'HTTPS' return 'HTTP' if is_secure: return 'SSL' return 'TCP'
def generate_config(context): ' Entry point for the deployment resources. ' properties = context.properties project_id = properties.get('project', context.env['project']) (bs_resources, bs_outputs) = get_backend_services(properties, context.env['name'], project_id) (target_resources, target_outputs)...
-5,912,626,140,741,447,000
Entry point for the deployment resources.
dm/templates/external_load_balancer/external_load_balancer.py
generate_config
Dileepbodapati/cloud-foundation-toolkit
python
def generate_config(context): ' ' properties = context.properties project_id = properties.get('project', context.env['project']) (bs_resources, bs_outputs) = get_backend_services(properties, context.env['name'], project_id) (target_resources, target_outputs) = get_target_proxy(properties, context.e...
def get_current_arch(): ' Try to get the architecture for the current platform ' if sys.platform.startswith('win'): machine = platform.machine() if (machine == 'AMD64'): return get_arch('x86_64:wincc') elif (sys.platform in ('linux', 'darwin')): if (platform.architecture(...
-3,940,666,364,675,064,000
Try to get the architecture for the current platform
ppci/arch/__init__.py
get_current_arch
darleybarreto/ppci-mirror
python
def get_current_arch(): ' ' if sys.platform.startswith('win'): machine = platform.machine() if (machine == 'AMD64'): return get_arch('x86_64:wincc') elif (sys.platform in ('linux', 'darwin')): if (platform.architecture()[0] == '64bit'): return get_arch('x86_6...
def get_arch(arch): "Try to return an architecture instance.\n\n Args:\n arch: can be a string in the form of arch:option1:option2\n\n .. doctest::\n\n >>> from ppci.api import get_arch\n >>> arch = get_arch('msp430')\n >>> arch\n msp430-arch\n >>> type(arch)\n ...
-2,377,674,193,364,040,700
Try to return an architecture instance. Args: arch: can be a string in the form of arch:option1:option2 .. doctest:: >>> from ppci.api import get_arch >>> arch = get_arch('msp430') >>> arch msp430-arch >>> type(arch) <class 'ppci.arch.msp430.arch.Msp430Arch'>
ppci/arch/__init__.py
get_arch
darleybarreto/ppci-mirror
python
def get_arch(arch): "Try to return an architecture instance.\n\n Args:\n arch: can be a string in the form of arch:option1:option2\n\n .. doctest::\n\n >>> from ppci.api import get_arch\n >>> arch = get_arch('msp430')\n >>> arch\n msp430-arch\n >>> type(arch)\n ...
def test_ComposedBool(self): 'Test ComposedBool' pass
1,148,415,783,762,149,200
Test ComposedBool
samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py
test_ComposedBool
AndreasA/openapi-generator
python
def test_ComposedBool(self): pass
def __init__(self, ray_trafo, callback_func=None, callback_func_interval=100, show_pbar=True, torch_manual_seed=10, **kwargs): '\n Parameters\n ----------\n ray_trafo : `odl.tomo.operators.RayTransform`\n The forward operator\n callback_func : callable, optional\n C...
-4,383,685,644,072,515,000
Parameters ---------- ray_trafo : `odl.tomo.operators.RayTransform` The forward operator callback_func : callable, optional Callable with signature ``callback_func(iteration, reconstruction, loss)`` that is called after every `callback_func_interval` iterations, starting after the first iteration. I...
dival/reconstructors/dip_ct_reconstructor.py
__init__
MBaltz/dival
python
def __init__(self, ray_trafo, callback_func=None, callback_func_interval=100, show_pbar=True, torch_manual_seed=10, **kwargs): '\n Parameters\n ----------\n ray_trafo : `odl.tomo.operators.RayTransform`\n The forward operator\n callback_func : callable, optional\n C...
def get_user_details(self, response): 'Return user details from Facebook account' email = response.get('email') return {'email': email, 'username': email.split('@')[0]}
5,842,184,032,588,614,000
Return user details from Facebook account
social_core/backends/paipass.py
get_user_details
everchain-ontech/social-core
python
def get_user_details(self, response): email = response.get('email') return {'email': email, 'username': email.split('@')[0]}
def user_data(self, access_token, *args, **kwargs): 'Loads user data from service' params = self.setting('PROFILE_EXTRA_PARAMS', {}) response = (kwargs.get('response') or {}) params['access_token'] = access_token headers = {'Authorization': ('%s %s' % (response.get('token_type', 'Bearer').capitalize...
7,723,685,861,222,839,000
Loads user data from service
social_core/backends/paipass.py
user_data
everchain-ontech/social-core
python
def user_data(self, access_token, *args, **kwargs): params = self.setting('PROFILE_EXTRA_PARAMS', {}) response = (kwargs.get('response') or {}) params['access_token'] = access_token headers = {'Authorization': ('%s %s' % (response.get('token_type', 'Bearer').capitalize(), access_token)), 'Accept': ...
def get_redirect_uri(self, state=None): 'Build redirect with redirect_state parameter.' regex = re.compile('\\:(80|443)\\/') uri = regex.sub('/', self.redirect_uri) if (self.REDIRECT_STATE and state): uri = url_add_parameters(uri, {'redirect_state': state}) return uri
3,286,736,078,406,330,400
Build redirect with redirect_state parameter.
social_core/backends/paipass.py
get_redirect_uri
everchain-ontech/social-core
python
def get_redirect_uri(self, state=None): regex = re.compile('\\:(80|443)\\/') uri = regex.sub('/', self.redirect_uri) if (self.REDIRECT_STATE and state): uri = url_add_parameters(uri, {'redirect_state': state}) return uri
@handle_http_errors def do_auth(self, access_token, *args, **kwargs): 'Finish the auth process once the access_token was retrieved' data = self.user_data(access_token, *args, **kwargs) response = (kwargs.get('response') or {}) response.update((data or {})) if ('access_token' not in response): ...
492,624,721,670,898,100
Finish the auth process once the access_token was retrieved
social_core/backends/paipass.py
do_auth
everchain-ontech/social-core
python
@handle_http_errors def do_auth(self, access_token, *args, **kwargs): data = self.user_data(access_token, *args, **kwargs) response = (kwargs.get('response') or {}) response.update((data or {})) if ('access_token' not in response): response['access_token'] = access_token kwargs.update({...
def __init__(self): '\n Initialization of ConnManager\n ' logging.info('Initializing ConnmanagerMQTT') self.__connection = UConnMQTT() self.__message_number = random.randint(0, 65536) self.__sent_messages = dict() self.__callback = None self.__callback_object = None
-5,099,143,863,538,793,000
Initialization of ConnManager
utilities/connmanagermqtt.py
__init__
connax-utim/uhost-micropython
python
def __init__(self): '\n \n ' logging.info('Initializing ConnmanagerMQTT') self.__connection = UConnMQTT() self.__message_number = random.randint(0, 65536) self.__sent_messages = dict() self.__callback = None self.__callback_object = None
def disconnect(self): '\n Disconnection from server\n ' logging.info('Disconnecting...') self.__connection.disconnect()
4,517,279,725,685,543,000
Disconnection from server
utilities/connmanagermqtt.py
disconnect
connax-utim/uhost-micropython
python
def disconnect(self): '\n \n ' logging.info('Disconnecting...') self.__connection.disconnect()
def subscribe(self, topic, callback_object, callback): '\n Subscribe on topic\n\n :param str topic: Topic for subscription\n :param method callback: Callback for received message\n ' logging.info('Subscribing for {0}'.format(topic)) if (not callable(callback)): raise exce...
1,995,031,518,274,948,600
Subscribe on topic :param str topic: Topic for subscription :param method callback: Callback for received message
utilities/connmanagermqtt.py
subscribe
connax-utim/uhost-micropython
python
def subscribe(self, topic, callback_object, callback): '\n Subscribe on topic\n\n :param str topic: Topic for subscription\n :param method callback: Callback for received message\n ' logging.info('Subscribing for {0}'.format(topic)) if (not callable(callback)): raise exce...
def unsubscribe(self, topic): '\n Unsubscribe from topic\n\n :param str topic: Topic for subscription cancelling\n ' logging.info('Unsubscribing from {0}'.format(topic)) self.__connection.unsubscribe(topic)
6,705,252,433,999,876,000
Unsubscribe from topic :param str topic: Topic for subscription cancelling
utilities/connmanagermqtt.py
unsubscribe
connax-utim/uhost-micropython
python
def unsubscribe(self, topic): '\n Unsubscribe from topic\n\n :param str topic: Topic for subscription cancelling\n ' logging.info('Unsubscribing from {0}'.format(topic)) self.__connection.unsubscribe(topic)
def publish(self, sender, destination, message): '\n Publish message\n\n :param sender: Message sender\n :param destination: Message destination\n :param message: The message\n ' id = self.__message_number self.__message_number = ((self.__message_number + 1) % 65536) o...
3,824,178,535,247,461,000
Publish message :param sender: Message sender :param destination: Message destination :param message: The message
utilities/connmanagermqtt.py
publish
connax-utim/uhost-micropython
python
def publish(self, sender, destination, message): '\n Publish message\n\n :param sender: Message sender\n :param destination: Message destination\n :param message: The message\n ' id = self.__message_number self.__message_number = ((self.__message_number + 1) % 65536) o...
def _republish(self, id): '\n Check if message was delivered and republish if not\n\n :param id: Message ID\n ' logging.info('_publish for {0} started'.format(id)) time.sleep(10) while (id in self.__sent_messages.keys()): try: logging.info("Message {0} wasn't del...
-3,382,346,000,680,288,000
Check if message was delivered and republish if not :param id: Message ID
utilities/connmanagermqtt.py
_republish
connax-utim/uhost-micropython
python
def _republish(self, id): '\n Check if message was delivered and republish if not\n\n :param id: Message ID\n ' logging.info('_publish for {0} started'.format(id)) time.sleep(10) while (id in self.__sent_messages.keys()): try: logging.info("Message {0} wasn't del...
def _on_message(self, sender, message): '\n Message receiving callback\n\n :param sender: Message sender\n :param message: The message\n ' logging.info('Received message {0} from {1}'.format(message, sender)) if (len(message) < 3): logging.info('Message is too short to be...
-3,529,581,953,659,937,300
Message receiving callback :param sender: Message sender :param message: The message
utilities/connmanagermqtt.py
_on_message
connax-utim/uhost-micropython
python
def _on_message(self, sender, message): '\n Message receiving callback\n\n :param sender: Message sender\n :param message: The message\n ' logging.info('Received message {0} from {1}'.format(message, sender)) if (len(message) < 3): logging.info('Message is too short to be...
@click.command() def main(): 'Update SMARTER database statuses' logger.info(f'{Path(__file__).name} started') try: database = SmarterInfo.objects.get(id='smarter') logger.debug(f'Found: {database}') except DoesNotExist: logger.warning('Smarter database status was never tracked') ...
3,191,944,132,278,295,000
Update SMARTER database statuses
src/data/update_db_status.py
main
cnr-ibba/SMARTER-database
python
@click.command() def main(): logger.info(f'{Path(__file__).name} started') try: database = SmarterInfo.objects.get(id='smarter') logger.debug(f'Found: {database}') except DoesNotExist: logger.warning('Smarter database status was never tracked') database = SmarterInfo(id=...
def __init__(self, generate_callback, update_callback, remove_callback, coordinates, filter_radius=None, filter_minimum_magnitude=None): 'Initialize the IGN Sismología Feed Manager.' feed = IgnSismologiaFeed(coordinates, filter_radius=filter_radius, filter_minimum_magnitude=filter_minimum_magnitude) super()...
4,804,089,377,989,919,000
Initialize the IGN Sismología Feed Manager.
georss_ign_sismologia_client/__init__.py
__init__
exxamalte/python-georss-ign-sismologia-client
python
def __init__(self, generate_callback, update_callback, remove_callback, coordinates, filter_radius=None, filter_minimum_magnitude=None): feed = IgnSismologiaFeed(coordinates, filter_radius=filter_radius, filter_minimum_magnitude=filter_minimum_magnitude) super().__init__(feed, generate_callback, update_cal...
def __init__(self, home_coordinates, filter_radius=None, filter_minimum_magnitude=None): 'Initialise this service.' super().__init__(home_coordinates, URL, filter_radius=filter_radius) self._filter_minimum_magnitude = filter_minimum_magnitude
4,457,051,066,076,739,600
Initialise this service.
georss_ign_sismologia_client/__init__.py
__init__
exxamalte/python-georss-ign-sismologia-client
python
def __init__(self, home_coordinates, filter_radius=None, filter_minimum_magnitude=None): super().__init__(home_coordinates, URL, filter_radius=filter_radius) self._filter_minimum_magnitude = filter_minimum_magnitude
def __repr__(self): 'Return string representation of this feed.' return '<{}(home={}, url={}, radius={}, magnitude={})>'.format(self.__class__.__name__, self._home_coordinates, self._url, self._filter_radius, self._filter_minimum_magnitude)
6,123,197,691,639,559,000
Return string representation of this feed.
georss_ign_sismologia_client/__init__.py
__repr__
exxamalte/python-georss-ign-sismologia-client
python
def __repr__(self): return '<{}(home={}, url={}, radius={}, magnitude={})>'.format(self.__class__.__name__, self._home_coordinates, self._url, self._filter_radius, self._filter_minimum_magnitude)
def _new_entry(self, home_coordinates, rss_entry, global_data): 'Generate a new entry.' return IgnSismologiaFeedEntry(home_coordinates, rss_entry)
4,687,324,556,794,112,000
Generate a new entry.
georss_ign_sismologia_client/__init__.py
_new_entry
exxamalte/python-georss-ign-sismologia-client
python
def _new_entry(self, home_coordinates, rss_entry, global_data): return IgnSismologiaFeedEntry(home_coordinates, rss_entry)
def _filter_entries(self, entries): 'Filter the provided entries.' entries = super()._filter_entries(entries) if self._filter_minimum_magnitude: return list(filter((lambda entry: (entry.magnitude and (entry.magnitude >= self._filter_minimum_magnitude))), entries)) return entries
-890,736,604,661,526,400
Filter the provided entries.
georss_ign_sismologia_client/__init__.py
_filter_entries
exxamalte/python-georss-ign-sismologia-client
python
def _filter_entries(self, entries): entries = super()._filter_entries(entries) if self._filter_minimum_magnitude: return list(filter((lambda entry: (entry.magnitude and (entry.magnitude >= self._filter_minimum_magnitude))), entries)) return entries
def __init__(self, home_coordinates, rss_entry): 'Initialise this service.' super().__init__(home_coordinates, rss_entry)
7,812,088,943,368,219,000
Initialise this service.
georss_ign_sismologia_client/__init__.py
__init__
exxamalte/python-georss-ign-sismologia-client
python
def __init__(self, home_coordinates, rss_entry): super().__init__(home_coordinates, rss_entry)
@property def attribution(self) -> str: 'Return the attribution of this entry.' return ATTRIBUTION
6,532,099,834,685,233,000
Return the attribution of this entry.
georss_ign_sismologia_client/__init__.py
attribution
exxamalte/python-georss-ign-sismologia-client
python
@property def attribution(self) -> str: return ATTRIBUTION
@property def published(self) -> Optional[datetime]: 'Return the published date of this entry.' published_date = self._search_in_title(REGEXP_ATTR_PUBLISHED_DATE) if published_date: published_date = dateparser.parse(published_date) return published_date
1,931,088,764,418,862,300
Return the published date of this entry.
georss_ign_sismologia_client/__init__.py
published
exxamalte/python-georss-ign-sismologia-client
python
@property def published(self) -> Optional[datetime]: published_date = self._search_in_title(REGEXP_ATTR_PUBLISHED_DATE) if published_date: published_date = dateparser.parse(published_date) return published_date
@property def magnitude(self) -> Optional[float]: 'Return the magnitude of this entry.' magnitude = self._search_in_description(REGEXP_ATTR_MAGNITUDE) if magnitude: magnitude = float(magnitude) return magnitude
-2,808,530,826,421,641,700
Return the magnitude of this entry.
georss_ign_sismologia_client/__init__.py
magnitude
exxamalte/python-georss-ign-sismologia-client
python
@property def magnitude(self) -> Optional[float]: magnitude = self._search_in_description(REGEXP_ATTR_MAGNITUDE) if magnitude: magnitude = float(magnitude) return magnitude
@property def region(self) -> Optional[float]: 'Return the region of this entry.' return self._search_in_description(REGEXP_ATTR_REGION)
8,086,530,032,019,997,000
Return the region of this entry.
georss_ign_sismologia_client/__init__.py
region
exxamalte/python-georss-ign-sismologia-client
python
@property def region(self) -> Optional[float]: return self._search_in_description(REGEXP_ATTR_REGION)
def _short_id(self) -> Optional[str]: 'Return the short id of this entry.' return self._search_in_external_id(REGEXP_ATTR_SHORT_ID)
-8,168,063,447,618,311,000
Return the short id of this entry.
georss_ign_sismologia_client/__init__.py
_short_id
exxamalte/python-georss-ign-sismologia-client
python
def _short_id(self) -> Optional[str]: return self._search_in_external_id(REGEXP_ATTR_SHORT_ID)
@property def image_url(self) -> Optional[str]: 'Return the image url of this entry.' short_id = self._short_id() if short_id: return IMAGE_URL_PATTERN.format(short_id) return None
-2,840,390,393,779,878,400
Return the image url of this entry.
georss_ign_sismologia_client/__init__.py
image_url
exxamalte/python-georss-ign-sismologia-client
python
@property def image_url(self) -> Optional[str]: short_id = self._short_id() if short_id: return IMAGE_URL_PATTERN.format(short_id) return None
@click.group() def cli(): '\n The tethys CLI for managing your environment.\n '
-2,337,295,908,500,185,600
The tethys CLI for managing your environment.
tethys/bin/cli.py
cli
tethys-platform/tethys
python
@click.group() def cli(): '\n \n '
@cli.group(name='apps') def apps_entry(): '\n Tethys apps manager\n '
3,940,248,023,208,902,000
Tethys apps manager
tethys/bin/cli.py
apps_entry
tethys-platform/tethys
python
@cli.group(name='apps') def apps_entry(): '\n \n '
def user_cache_dir(appname): '\n Return full path to the user-specific cache dir for this application.\n\n "appname" is the name of application.\n\n Typical user cache directories are:\n Mac OS X: ~/Library/Caches/<AppName>\n Unix: ~/.cache/<AppName> (XDG default)\n Windows...
8,495,666,354,142,405,000
Return full path to the user-specific cache dir for this application. "appname" is the name of application. Typical user cache directories are: Mac OS X: ~/Library/Caches/<AppName> Unix: ~/.cache/<AppName> (XDG default) Windows: C:\Users\<username>\AppData\Local\<AppName>\Cache On Window...
pip/appdirs.py
user_cache_dir
chadrik/pip
python
def user_cache_dir(appname): '\n Return full path to the user-specific cache dir for this application.\n\n "appname" is the name of application.\n\n Typical user cache directories are:\n Mac OS X: ~/Library/Caches/<AppName>\n Unix: ~/.cache/<AppName> (XDG default)\n Windows...
def _get_win_folder_from_registry(csidl_name): "\n This is a fallback technique at best. I'm not sure if using the\n registry for this guarantees us the correct answer for all CSIDL_*\n names.\n " import _winreg shell_folder_name = {'CSIDL_APPDATA': 'AppData', 'CSIDL_COMMON_APPDATA': 'Common App...
-5,892,240,489,297,082,000
This is a fallback technique at best. I'm not sure if using the registry for this guarantees us the correct answer for all CSIDL_* names.
pip/appdirs.py
_get_win_folder_from_registry
chadrik/pip
python
def _get_win_folder_from_registry(csidl_name): "\n This is a fallback technique at best. I'm not sure if using the\n registry for this guarantees us the correct answer for all CSIDL_*\n names.\n " import _winreg shell_folder_name = {'CSIDL_APPDATA': 'AppData', 'CSIDL_COMMON_APPDATA': 'Common App...
def compress(input_file_path, output_file_path, level=0, method=1): 'Function to compress PDF via Ghostscript command line interface' quality = {0: '/default', 1: '/prepress', 2: '/printer', 3: '/ebook', 4: '/screen'} if (not os.path.isfile(input_file_path)): print(f'Error: invalid path for input fi...
978,765,344,947,813,200
Function to compress PDF via Ghostscript command line interface
gs_compress.py
compress
brio50/groups-io
python
def compress(input_file_path, output_file_path, level=0, method=1): quality = {0: '/default', 1: '/prepress', 2: '/printer', 3: '/ebook', 4: '/screen'} if (not os.path.isfile(input_file_path)): print(f'Error: invalid path for input file: {input_file_path}') sys.exit(1) if (input_file_pa...
def get_transport_class(cls, label: str=None) -> Type[UserEventServiceTransport]: 'Returns an appropriate transport class.\n\n Args:\n label: The name of the desired transport. If none is\n provided, then the first transport in the registry is used.\n\n Returns:\n ...
-8,486,663,818,495,446,000
Returns an appropriate transport class. Args: label: The name of the desired transport. If none is provided, then the first transport in the registry is used. Returns: The transport class to use.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
get_transport_class
googleapis/googleapis-gen
python
def get_transport_class(cls, label: str=None) -> Type[UserEventServiceTransport]: 'Returns an appropriate transport class.\n\n Args:\n label: The name of the desired transport. If none is\n provided, then the first transport in the registry is used.\n\n Returns:\n ...
@staticmethod def _get_default_mtls_endpoint(api_endpoint): 'Converts api endpoint to mTLS endpoint.\n\n Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to\n "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.\n Args:\n api_endpoint (Optional[str]): th...
7,533,698,565,164,944,000
Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: str: converted mTLS api endpoint.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
_get_default_mtls_endpoint
googleapis/googleapis-gen
python
@staticmethod def _get_default_mtls_endpoint(api_endpoint): 'Converts api endpoint to mTLS endpoint.\n\n Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to\n "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.\n Args:\n api_endpoint (Optional[str]): th...
@classmethod def from_service_account_info(cls, info: dict, *args, **kwargs): 'Creates an instance of this client using the provided credentials\n info.\n\n Args:\n info (dict): The service account private key info.\n args: Additional arguments to pass to the constructor.\n ...
-8,069,945,373,802,076,000
Creates an instance of this client using the provided credentials info. Args: info (dict): The service account private key info. args: Additional arguments to pass to the constructor. kwargs: Additional arguments to pass to the constructor. Returns: UserEventServiceClient: The constructed client.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
from_service_account_info
googleapis/googleapis-gen
python
@classmethod def from_service_account_info(cls, info: dict, *args, **kwargs): 'Creates an instance of this client using the provided credentials\n info.\n\n Args:\n info (dict): The service account private key info.\n args: Additional arguments to pass to the constructor.\n ...
@classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): 'Creates an instance of this client using the provided credentials\n file.\n\n Args:\n filename (str): The path to the service account private key json\n file.\n args: Additional a...
7,707,715,727,642,763,000
Creates an instance of this client using the provided credentials file. Args: filename (str): The path to the service account private key json file. args: Additional arguments to pass to the constructor. kwargs: Additional arguments to pass to the constructor. Returns: UserEventServiceClie...
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
from_service_account_file
googleapis/googleapis-gen
python
@classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): 'Creates an instance of this client using the provided credentials\n file.\n\n Args:\n filename (str): The path to the service account private key json\n file.\n args: Additional a...
@property def transport(self) -> UserEventServiceTransport: 'Returns the transport used by the client instance.\n\n Returns:\n UserEventServiceTransport: The transport used by the client\n instance.\n ' return self._transport
-8,178,801,226,573,250,000
Returns the transport used by the client instance. Returns: UserEventServiceTransport: The transport used by the client instance.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
transport
googleapis/googleapis-gen
python
@property def transport(self) -> UserEventServiceTransport: 'Returns the transport used by the client instance.\n\n Returns:\n UserEventServiceTransport: The transport used by the client\n instance.\n ' return self._transport
@staticmethod def event_store_path(project: str, location: str, catalog: str, event_store: str) -> str: 'Returns a fully-qualified event_store string.' return 'projects/{project}/locations/{location}/catalogs/{catalog}/eventStores/{event_store}'.format(project=project, location=location, catalog=catalog, event_...
-2,980,082,045,436,697,000
Returns a fully-qualified event_store string.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
event_store_path
googleapis/googleapis-gen
python
@staticmethod def event_store_path(project: str, location: str, catalog: str, event_store: str) -> str: return 'projects/{project}/locations/{location}/catalogs/{catalog}/eventStores/{event_store}'.format(project=project, location=location, catalog=catalog, event_store=event_store)
@staticmethod def parse_event_store_path(path: str) -> Dict[(str, str)]: 'Parses a event_store path into its component segments.' m = re.match('^projects/(?P<project>.+?)/locations/(?P<location>.+?)/catalogs/(?P<catalog>.+?)/eventStores/(?P<event_store>.+?)$', path) return (m.groupdict() if m else {})
8,316,049,900,430,091,000
Parses a event_store path into its component segments.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
parse_event_store_path
googleapis/googleapis-gen
python
@staticmethod def parse_event_store_path(path: str) -> Dict[(str, str)]: m = re.match('^projects/(?P<project>.+?)/locations/(?P<location>.+?)/catalogs/(?P<catalog>.+?)/eventStores/(?P<event_store>.+?)$', path) return (m.groupdict() if m else {})
@staticmethod def common_billing_account_path(billing_account: str) -> str: 'Returns a fully-qualified billing_account string.' return 'billingAccounts/{billing_account}'.format(billing_account=billing_account)
5,123,899,605,328,763,000
Returns a fully-qualified billing_account string.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
common_billing_account_path
googleapis/googleapis-gen
python
@staticmethod def common_billing_account_path(billing_account: str) -> str: return 'billingAccounts/{billing_account}'.format(billing_account=billing_account)
@staticmethod def parse_common_billing_account_path(path: str) -> Dict[(str, str)]: 'Parse a billing_account path into its component segments.' m = re.match('^billingAccounts/(?P<billing_account>.+?)$', path) return (m.groupdict() if m else {})
3,539,036,522,285,068,000
Parse a billing_account path into its component segments.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
parse_common_billing_account_path
googleapis/googleapis-gen
python
@staticmethod def parse_common_billing_account_path(path: str) -> Dict[(str, str)]: m = re.match('^billingAccounts/(?P<billing_account>.+?)$', path) return (m.groupdict() if m else {})
@staticmethod def common_folder_path(folder: str) -> str: 'Returns a fully-qualified folder string.' return 'folders/{folder}'.format(folder=folder)
-6,142,497,583,881,718,000
Returns a fully-qualified folder string.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
common_folder_path
googleapis/googleapis-gen
python
@staticmethod def common_folder_path(folder: str) -> str: return 'folders/{folder}'.format(folder=folder)
@staticmethod def parse_common_folder_path(path: str) -> Dict[(str, str)]: 'Parse a folder path into its component segments.' m = re.match('^folders/(?P<folder>.+?)$', path) return (m.groupdict() if m else {})
7,731,323,619,502,445,000
Parse a folder path into its component segments.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
parse_common_folder_path
googleapis/googleapis-gen
python
@staticmethod def parse_common_folder_path(path: str) -> Dict[(str, str)]: m = re.match('^folders/(?P<folder>.+?)$', path) return (m.groupdict() if m else {})
@staticmethod def common_organization_path(organization: str) -> str: 'Returns a fully-qualified organization string.' return 'organizations/{organization}'.format(organization=organization)
-1,733,580,681,013,462,000
Returns a fully-qualified organization string.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
common_organization_path
googleapis/googleapis-gen
python
@staticmethod def common_organization_path(organization: str) -> str: return 'organizations/{organization}'.format(organization=organization)
@staticmethod def parse_common_organization_path(path: str) -> Dict[(str, str)]: 'Parse a organization path into its component segments.' m = re.match('^organizations/(?P<organization>.+?)$', path) return (m.groupdict() if m else {})
6,176,747,584,094,183,000
Parse a organization path into its component segments.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
parse_common_organization_path
googleapis/googleapis-gen
python
@staticmethod def parse_common_organization_path(path: str) -> Dict[(str, str)]: m = re.match('^organizations/(?P<organization>.+?)$', path) return (m.groupdict() if m else {})
@staticmethod def common_project_path(project: str) -> str: 'Returns a fully-qualified project string.' return 'projects/{project}'.format(project=project)
-124,327,816,620,303,040
Returns a fully-qualified project string.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
common_project_path
googleapis/googleapis-gen
python
@staticmethod def common_project_path(project: str) -> str: return 'projects/{project}'.format(project=project)
@staticmethod def parse_common_project_path(path: str) -> Dict[(str, str)]: 'Parse a project path into its component segments.' m = re.match('^projects/(?P<project>.+?)$', path) return (m.groupdict() if m else {})
-6,609,324,249,468,844,000
Parse a project path into its component segments.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
parse_common_project_path
googleapis/googleapis-gen
python
@staticmethod def parse_common_project_path(path: str) -> Dict[(str, str)]: m = re.match('^projects/(?P<project>.+?)$', path) return (m.groupdict() if m else {})
@staticmethod def common_location_path(project: str, location: str) -> str: 'Returns a fully-qualified location string.' return 'projects/{project}/locations/{location}'.format(project=project, location=location)
8,215,176,652,370,049,000
Returns a fully-qualified location string.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
common_location_path
googleapis/googleapis-gen
python
@staticmethod def common_location_path(project: str, location: str) -> str: return 'projects/{project}/locations/{location}'.format(project=project, location=location)
@staticmethod def parse_common_location_path(path: str) -> Dict[(str, str)]: 'Parse a location path into its component segments.' m = re.match('^projects/(?P<project>.+?)/locations/(?P<location>.+?)$', path) return (m.groupdict() if m else {})
1,703,235,435,027,079,400
Parse a location path into its component segments.
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
parse_common_location_path
googleapis/googleapis-gen
python
@staticmethod def parse_common_location_path(path: str) -> Dict[(str, str)]: m = re.match('^projects/(?P<project>.+?)/locations/(?P<location>.+?)$', path) return (m.groupdict() if m else {})
def __init__(self, *, credentials: Optional[ga_credentials.Credentials]=None, transport: Union[(str, UserEventServiceTransport, None)]=None, client_options: Optional[client_options_lib.ClientOptions]=None, client_info: gapic_v1.client_info.ClientInfo=DEFAULT_CLIENT_INFO) -> None: 'Instantiates the user event servic...
-9,065,012,600,399,228,000
Instantiates the user event service client. Args: credentials (Optional[google.auth.credentials.Credentials]): The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the ...
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
__init__
googleapis/googleapis-gen
python
def __init__(self, *, credentials: Optional[ga_credentials.Credentials]=None, transport: Union[(str, UserEventServiceTransport, None)]=None, client_options: Optional[client_options_lib.ClientOptions]=None, client_info: gapic_v1.client_info.ClientInfo=DEFAULT_CLIENT_INFO) -> None: 'Instantiates the user event servic...
def write_user_event(self, request: Union[(user_event_service.WriteUserEventRequest, dict)]=None, *, parent: str=None, user_event: gcr_user_event.UserEvent=None, retry: retries.Retry=gapic_v1.method.DEFAULT, timeout: float=None, metadata: Sequence[Tuple[(str, str)]]=()) -> gcr_user_event.UserEvent: "Writes a single...
5,534,637,056,578,274,000
Writes a single user event. Args: request (Union[google.cloud.recommendationengine_v1beta1.types.WriteUserEventRequest, dict]): The request object. Request message for WriteUserEvent method. parent (str): Required. The parent eventStore resource name, such as ``projects/1234/loc...
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
write_user_event
googleapis/googleapis-gen
python
def write_user_event(self, request: Union[(user_event_service.WriteUserEventRequest, dict)]=None, *, parent: str=None, user_event: gcr_user_event.UserEvent=None, retry: retries.Retry=gapic_v1.method.DEFAULT, timeout: float=None, metadata: Sequence[Tuple[(str, str)]]=()) -> gcr_user_event.UserEvent: "Writes a single...
def collect_user_event(self, request: Union[(user_event_service.CollectUserEventRequest, dict)]=None, *, parent: str=None, user_event: str=None, uri: str=None, ets: int=None, retry: retries.Retry=gapic_v1.method.DEFAULT, timeout: float=None, metadata: Sequence[Tuple[(str, str)]]=()) -> httpbody_pb2.HttpBody: "Write...
2,787,104,905,625,894,400
Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Recommendations AI JavaScript pixel. Users should not call this method directly. Args: request (Union[google.cloud.recommendationengine_v1beta1.types...
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
collect_user_event
googleapis/googleapis-gen
python
def collect_user_event(self, request: Union[(user_event_service.CollectUserEventRequest, dict)]=None, *, parent: str=None, user_event: str=None, uri: str=None, ets: int=None, retry: retries.Retry=gapic_v1.method.DEFAULT, timeout: float=None, metadata: Sequence[Tuple[(str, str)]]=()) -> httpbody_pb2.HttpBody: "Write...
def list_user_events(self, request: Union[(user_event_service.ListUserEventsRequest, dict)]=None, *, parent: str=None, filter: str=None, retry: retries.Retry=gapic_v1.method.DEFAULT, timeout: float=None, metadata: Sequence[Tuple[(str, str)]]=()) -> pagers.ListUserEventsPager: 'Gets a list of user events within a ti...
373,812,839,536,061,600
Gets a list of user events within a time range, with potential filtering. Args: request (Union[google.cloud.recommendationengine_v1beta1.types.ListUserEventsRequest, dict]): The request object. Request message for ListUserEvents method. parent (str): Required. The parent eventStore reso...
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
list_user_events
googleapis/googleapis-gen
python
def list_user_events(self, request: Union[(user_event_service.ListUserEventsRequest, dict)]=None, *, parent: str=None, filter: str=None, retry: retries.Retry=gapic_v1.method.DEFAULT, timeout: float=None, metadata: Sequence[Tuple[(str, str)]]=()) -> pagers.ListUserEventsPager: 'Gets a list of user events within a ti...
def purge_user_events(self, request: Union[(user_event_service.PurgeUserEventsRequest, dict)]=None, *, parent: str=None, filter: str=None, force: bool=None, retry: retries.Retry=gapic_v1.method.DEFAULT, timeout: float=None, metadata: Sequence[Tuple[(str, str)]]=()) -> operation.Operation: 'Deletes permanently all u...
8,026,864,222,891,210,000
Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first. Args: request (Union[google.cloud.recommendationengine_v1beta1.types.PurgeUserEventsReq...
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/user_event_service/client.py
purge_user_events
googleapis/googleapis-gen
python
def purge_user_events(self, request: Union[(user_event_service.PurgeUserEventsRequest, dict)]=None, *, parent: str=None, filter: str=None, force: bool=None, retry: retries.Retry=gapic_v1.method.DEFAULT, timeout: float=None, metadata: Sequence[Tuple[(str, str)]]=()) -> operation.Operation: 'Deletes permanently all u...