Search is not available for this dataset
identifier stringlengths 1 155 | parameters stringlengths 2 6.09k | docstring stringlengths 11 63.4k | docstring_summary stringlengths 0 63.4k | function stringlengths 29 99.8k | function_tokens list | start_point list | end_point list | language stringclasses 1
value | docstring_language stringlengths 2 7 | docstring_language_predictions stringlengths 18 23 | is_langid_reliable stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|---|---|---|
BaseModel._convert_to_labelled_states | (self, states) |
Converts the state into a dict where keys are state labels
Parameters
----------
states: 1D nd.array
Model state.
Returns
-------
dict
Dict where keys are state labels and values are states.
|
Converts the state into a dict where keys are state labels
Parameters
----------
states: 1D nd.array
Model state. | def _convert_to_labelled_states(self, states):
"""
Converts the state into a dict where keys are state labels
Parameters
----------
states: 1D nd.array
Model state.
Returns
-------
dict
Dict where keys are state labels and valu... | [
"def",
"_convert_to_labelled_states",
"(",
"self",
",",
"states",
")",
":",
"return",
"zip",
"(",
"self",
".",
"internal_states_labels",
",",
"states",
".",
"transpose",
"(",
")",
")"
] | [
181,
4
] | [
195,
68
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCount.test_collection_rows_count | (self, connect, collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count(self, connect, collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count... | [
"def",
"test_collection_rows_count",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"insert_nb",
")",
":",
"nb",
"=",
"insert_nb",
"vectors",
"=",
"gen_vectors",
"(",
"nb",
",",
"dim",
")",
"res",
"=",
"connect",
".",
"insert",
"(",
"collection_name",
... | [
46,
4
] | [
58,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCount.test_collection_rows_count_partition | (self, connect, collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection, create partition and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not
method: create collection, create partition and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count_partition(self, connect, collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection, create partition and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors... | [
"def",
"test_collection_rows_count_partition",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"insert_nb",
")",
":",
"nb",
"=",
"insert_nb",
"vectors",
"=",
"gen_vectors",
"(",
"nb",
",",
"dim",
")",
"status",
"=",
"connect",
".",
"create_partition",
"("... | [
60,
4
] | [
74,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCount.test_collection_rows_count_multi_partitions_A | (self, connect, collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection, create partitions and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not
method: create collection, create partitions and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count_multi_partitions_A(self, connect, collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection, create partitions and add vectors in it,
assert the value returned by count_entities method is equal to length ... | [
"def",
"test_collection_rows_count_multi_partitions_A",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"insert_nb",
")",
":",
"new_tag",
"=",
"\"new_tag\"",
"nb",
"=",
"insert_nb",
"vectors",
"=",
"gen_vectors",
"(",
"nb",
",",
"dim",
")",
"status",
"=",
... | [
76,
4
] | [
92,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCount.test_collection_rows_count_multi_partitions_B | (self, connect, collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection, create partitions and add vectors in one of the partitions,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not
method: create collection, create partitions and add vectors in one of the partitions,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count_multi_partitions_B(self, connect, collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection, create partitions and add vectors in one of the partitions,
assert the value returned by count_entities method ... | [
"def",
"test_collection_rows_count_multi_partitions_B",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"insert_nb",
")",
":",
"new_tag",
"=",
"\"new_tag\"",
"nb",
"=",
"insert_nb",
"vectors",
"=",
"gen_vectors",
"(",
"nb",
",",
"dim",
")",
"status",
"=",
... | [
94,
4
] | [
110,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCount.test_collection_rows_count_multi_partitions_C | (self, connect, collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection, create partitions and add vectors in one of the partitions,
assert the value returned by count_entities method is equal to length of vectors
expected: the collection count is equal to the length of vecto... |
target: test collection rows_count is correct or not
method: create collection, create partitions and add vectors in one of the partitions,
assert the value returned by count_entities method is equal to length of vectors
expected: the collection count is equal to the length of vecto... | def test_collection_rows_count_multi_partitions_C(self, connect, collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection, create partitions and add vectors in one of the partitions,
assert the value returned by count_entities method ... | [
"def",
"test_collection_rows_count_multi_partitions_C",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"insert_nb",
")",
":",
"new_tag",
"=",
"\"new_tag\"",
"nb",
"=",
"insert_nb",
"vectors",
"=",
"gen_vectors",
"(",
"nb",
",",
"dim",
")",
"status",
"=",
... | [
112,
4
] | [
129,
28
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCount.test_collection_rows_count_after_index_created | (self, connect, collection, get_simple_index) |
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
|
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
| def test_collection_rows_count_after_index_created(self, connect, collection, get_simple_index):
'''
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exc... | [
"def",
"test_collection_rows_count_after_index_created",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
... | [
131,
4
] | [
145,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCount.test_collection_rows_count_no_vectors | (self, connect, collection) |
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected: the count is equal to 0
|
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected: the count is equal to 0
| def test_collection_rows_count_no_vectors(self, connect, collection):
'''
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected: th... | [
"def",
"test_collection_rows_count_no_vectors",
"(",
"self",
",",
"connect",
",",
"collection",
")",
":",
"collection_name",
"=",
"gen_unique_str",
"(",
")",
"param",
"=",
"{",
"'collection_name'",
":",
"collection_name",
",",
"'dimension'",
":",
"dim",
",",
"'ind... | [
157,
4
] | [
170,
23
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCount._test_collection_rows_count_multiprocessing | (self, connect, collection, args) |
target: test collection rows_count is correct or not with multiprocess
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not with multiprocess
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def _test_collection_rows_count_multiprocessing(self, connect, collection, args):
'''
target: test collection rows_count is correct or not with multiprocess
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vecto... | [
"def",
"_test_collection_rows_count_multiprocessing",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"args",
")",
":",
"nq",
"=",
"2",
"vectors",
"=",
"gen_vectors",
"(",
"nq",
",",
"dim",
")",
"res",
"=",
"connect",
".",
"insert",
"(",
"collection_nam... | [
175,
4
] | [
201,
20
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCount.test_collection_rows_count_multi_collections | (self, connect) |
target: test collection rows_count is correct or not with multiple collections of L2
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not with multiple collections of L2
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count_multi_collections(self, connect):
'''
target: test collection rows_count is correct or not with multiple collections of L2
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
... | [
"def",
"test_collection_rows_count_multi_collections",
"(",
"self",
",",
"connect",
")",
":",
"nq",
"=",
"100",
"vectors",
"=",
"gen_vectors",
"(",
"nq",
",",
"dim",
")",
"collection_list",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"20",
")",
":",
"... | [
203,
4
] | [
226,
28
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountIP.test_collection_rows_count | (self, connect, ip_collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count(self, connect, ip_collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the co... | [
"def",
"test_collection_rows_count",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"insert_nb",
")",
":",
"nb",
"=",
"insert_nb",
"vectors",
"=",
"gen_vectors",
"(",
"nb",
",",
"dim",
")",
"res",
"=",
"connect",
".",
"insert",
"(",
"collection_name... | [
261,
4
] | [
273,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountIP.test_collection_rows_count_after_index_created | (self, connect, ip_collection, get_simple_index) |
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
|
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
| def test_collection_rows_count_after_index_created(self, connect, ip_collection, get_simple_index):
'''
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise e... | [
"def",
"test_collection_rows_count_after_index_created",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\""... | [
275,
4
] | [
289,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountIP.test_collection_rows_count_no_vectors | (self, connect, ip_collection) |
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected: the count is equal to 0
|
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected: the count is equal to 0
| def test_collection_rows_count_no_vectors(self, connect, ip_collection):
'''
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected:... | [
"def",
"test_collection_rows_count_no_vectors",
"(",
"self",
",",
"connect",
",",
"ip_collection",
")",
":",
"collection_name",
"=",
"gen_unique_str",
"(",
"\"test_collection\"",
")",
"param",
"=",
"{",
"'collection_name'",
":",
"collection_name",
",",
"'dimension'",
... | [
301,
4
] | [
314,
23
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountIP._test_collection_rows_count_multiprocessing | (self, connect, ip_collection, args) |
target: test collection rows_count is correct or not with multiprocess
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not with multiprocess
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def _test_collection_rows_count_multiprocessing(self, connect, ip_collection, args):
'''
target: test collection rows_count is correct or not with multiprocess
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of ve... | [
"def",
"_test_collection_rows_count_multiprocessing",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"args",
")",
":",
"nq",
"=",
"2",
"vectors",
"=",
"gen_vectors",
"(",
"nq",
",",
"dim",
")",
"res",
"=",
"connect",
".",
"insert",
"(",
"collection_... | [
318,
4
] | [
344,
20
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountIP.test_collection_rows_count_multi_collections | (self, connect) |
target: test collection rows_count is correct or not with multiple collections of IP
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not with multiple collections of IP
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count_multi_collections(self, connect):
'''
target: test collection rows_count is correct or not with multiple collections of IP
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
... | [
"def",
"test_collection_rows_count_multi_collections",
"(",
"self",
",",
"connect",
")",
":",
"nq",
"=",
"100",
"vectors",
"=",
"gen_vectors",
"(",
"nq",
",",
"dim",
")",
"collection_list",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"20",
")",
":",
"... | [
346,
4
] | [
369,
28
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountJAC.test_collection_rows_count | (self, connect, jac_collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count(self, connect, jac_collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the c... | [
"def",
"test_collection_rows_count",
"(",
"self",
",",
"connect",
",",
"jac_collection",
",",
"insert_nb",
")",
":",
"nb",
"=",
"insert_nb",
"tmp",
",",
"vectors",
"=",
"gen_binary_vectors",
"(",
"nb",
",",
"dim",
")",
"res",
"=",
"connect",
".",
"insert",
... | [
403,
4
] | [
415,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountJAC.test_collection_rows_count_after_index_created | (self, connect, jac_collection, get_jaccard_index) |
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
|
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
| def test_collection_rows_count_after_index_created(self, connect, jac_collection, get_jaccard_index):
'''
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise... | [
"def",
"test_collection_rows_count_after_index_created",
"(",
"self",
",",
"connect",
",",
"jac_collection",
",",
"get_jaccard_index",
")",
":",
"nb",
"=",
"100",
"index_param",
"=",
"get_jaccard_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_jaccard_index... | [
417,
4
] | [
431,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountJAC.test_collection_rows_count_no_vectors | (self, connect, jac_collection) |
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected: the count is equal to 0
|
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected: the count is equal to 0
| def test_collection_rows_count_no_vectors(self, connect, jac_collection):
'''
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected... | [
"def",
"test_collection_rows_count_no_vectors",
"(",
"self",
",",
"connect",
",",
"jac_collection",
")",
":",
"collection_name",
"=",
"gen_unique_str",
"(",
"\"test_collection\"",
")",
"param",
"=",
"{",
"'collection_name'",
":",
"collection_name",
",",
"'dimension'",
... | [
443,
4
] | [
456,
23
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountJAC.test_collection_rows_count_multi_collections | (self, connect) |
target: test collection rows_count is correct or not with multiple collections of IP
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not with multiple collections of IP
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count_multi_collections(self, connect):
'''
target: test collection rows_count is correct or not with multiple collections of IP
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
... | [
"def",
"test_collection_rows_count_multi_collections",
"(",
"self",
",",
"connect",
")",
":",
"nq",
"=",
"100",
"tmp",
",",
"vectors",
"=",
"gen_binary_vectors",
"(",
"nq",
",",
"dim",
")",
"collection_list",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
... | [
458,
4
] | [
481,
28
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountBinary.test_collection_rows_count | (self, connect, ham_collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count(self, connect, ham_collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the c... | [
"def",
"test_collection_rows_count",
"(",
"self",
",",
"connect",
",",
"ham_collection",
",",
"insert_nb",
")",
":",
"nb",
"=",
"insert_nb",
"tmp",
",",
"vectors",
"=",
"gen_binary_vectors",
"(",
"nb",
",",
"dim",
")",
"res",
"=",
"connect",
".",
"insert",
... | [
536,
4
] | [
548,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountBinary.test_collection_rows_count_substructure | (self, connect, substructure_collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count_substructure(self, connect, substructure_collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
... | [
"def",
"test_collection_rows_count_substructure",
"(",
"self",
",",
"connect",
",",
"substructure_collection",
",",
"insert_nb",
")",
":",
"nb",
"=",
"insert_nb",
"tmp",
",",
"vectors",
"=",
"gen_binary_vectors",
"(",
"nb",
",",
"dim",
")",
"res",
"=",
"connect"... | [
550,
4
] | [
562,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountBinary.test_collection_rows_count_superstructure | (self, connect, superstructure_collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count_superstructure(self, connect, superstructure_collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vecto... | [
"def",
"test_collection_rows_count_superstructure",
"(",
"self",
",",
"connect",
",",
"superstructure_collection",
",",
"insert_nb",
")",
":",
"nb",
"=",
"insert_nb",
"tmp",
",",
"vectors",
"=",
"gen_binary_vectors",
"(",
"nb",
",",
"dim",
")",
"res",
"=",
"conn... | [
564,
4
] | [
576,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountBinary.test_collection_rows_count_after_index_created | (self, connect, ham_collection, get_hamming_index) |
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
|
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
| def test_collection_rows_count_after_index_created(self, connect, ham_collection, get_hamming_index):
'''
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise... | [
"def",
"test_collection_rows_count_after_index_created",
"(",
"self",
",",
"connect",
",",
"ham_collection",
",",
"get_hamming_index",
")",
":",
"nb",
"=",
"100",
"index_type",
"=",
"get_hamming_index",
"[",
"\"index_type\"",
"]",
"index_param",
"=",
"get_hamming_index"... | [
578,
4
] | [
592,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountBinary.test_collection_rows_count_after_index_created_substructure | (self, connect, substructure_collection, get_substructure_index) |
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
|
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
| def test_collection_rows_count_after_index_created_substructure(self, connect, substructure_collection, get_substructure_index):
'''
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
exp... | [
"def",
"test_collection_rows_count_after_index_created_substructure",
"(",
"self",
",",
"connect",
",",
"substructure_collection",
",",
"get_substructure_index",
")",
":",
"nb",
"=",
"100",
"index_type",
"=",
"get_substructure_index",
"[",
"\"index_type\"",
"]",
"index_para... | [
594,
4
] | [
608,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountBinary.test_collection_rows_count_after_index_created_superstructure | (self, connect, superstructure_collection, get_superstructure_index) |
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
|
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
expected: count_entities raise exception
| def test_collection_rows_count_after_index_created_superstructure(self, connect, superstructure_collection, get_superstructure_index):
'''
target: test count_entities, after index have been created
method: add vectors in db, and create index, then calling count_entities with correct params
... | [
"def",
"test_collection_rows_count_after_index_created_superstructure",
"(",
"self",
",",
"connect",
",",
"superstructure_collection",
",",
"get_superstructure_index",
")",
":",
"nb",
"=",
"100",
"index_type",
"=",
"get_superstructure_index",
"[",
"\"index_type\"",
"]",
"in... | [
610,
4
] | [
624,
24
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountBinary.test_collection_rows_count_no_vectors | (self, connect, ham_collection) |
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected: the count is equal to 0
|
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected: the count is equal to 0
| def test_collection_rows_count_no_vectors(self, connect, ham_collection):
'''
target: test collection rows_count is correct or not, if collection is empty
method: create collection and no vectors in it,
assert the value returned by count_entities method is equal to 0
expected... | [
"def",
"test_collection_rows_count_no_vectors",
"(",
"self",
",",
"connect",
",",
"ham_collection",
")",
":",
"collection_name",
"=",
"gen_unique_str",
"(",
"\"test_collection\"",
")",
"param",
"=",
"{",
"'collection_name'",
":",
"collection_name",
",",
"'dimension'",
... | [
636,
4
] | [
649,
23
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountBinary.test_collection_rows_count_multi_collections | (self, connect) |
target: test collection rows_count is correct or not with multiple collections of IP
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not with multiple collections of IP
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count_multi_collections(self, connect):
'''
target: test collection rows_count is correct or not with multiple collections of IP
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
... | [
"def",
"test_collection_rows_count_multi_collections",
"(",
"self",
",",
"connect",
")",
":",
"nq",
"=",
"100",
"tmp",
",",
"vectors",
"=",
"gen_binary_vectors",
"(",
"nq",
",",
"dim",
")",
"collection_list",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
... | [
651,
4
] | [
674,
28
] | python | en | ['en', 'error', 'th'] | False |
TestCollectionCountTANIMOTO.test_collection_rows_count | (self, connect, tanimoto_collection, insert_nb) |
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
|
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: the count is equal to the length of vectors
| def test_collection_rows_count(self, connect, tanimoto_collection, insert_nb):
'''
target: test collection rows_count is correct or not
method: create collection and add vectors in it,
assert the value returned by count_entities method is equal to length of vectors
expected: ... | [
"def",
"test_collection_rows_count",
"(",
"self",
",",
"connect",
",",
"tanimoto_collection",
",",
"insert_nb",
")",
":",
"nb",
"=",
"insert_nb",
"tmp",
",",
"vectors",
"=",
"gen_binary_vectors",
"(",
"nb",
",",
"dim",
")",
"res",
"=",
"connect",
".",
"inser... | [
708,
4
] | [
721,
24
] | python | en | ['en', 'error', 'th'] | False |
get_transform | (
input_size: int,
mean: Tuple[float, float, float],
std: Tuple[float, float, float],
basis: Optional[torch.Tensor] = None,
normalize: bool = True,
) | return composed tranforms for PyTorch 2D image dataset.
Args:
input_size (int): The size of input image.
mean (Tuple[float]): The means of dataset.
std (Tuple[float]): The standard diviation of dataset.
basis (torch.Tensor, optional): Scaled 2D Fourier basis.
normalize (bool... | return composed tranforms for PyTorch 2D image dataset. | def get_transform(
input_size: int,
mean: Tuple[float, float, float],
std: Tuple[float, float, float],
basis: Optional[torch.Tensor] = None,
normalize: bool = True,
) -> torchvision.transforms.transforms.Compose:
"""return composed tranforms for PyTorch 2D image dataset.
Args:
input... | [
"def",
"get_transform",
"(",
"input_size",
":",
"int",
",",
"mean",
":",
"Tuple",
"[",
"float",
",",
"float",
",",
"float",
"]",
",",
"std",
":",
"Tuple",
"[",
"float",
",",
"float",
",",
"float",
"]",
",",
"basis",
":",
"Optional",
"[",
"torch",
"... | [
57,
0
] | [
100,
52
] | python | en | ['en', 'en', 'en'] | True |
BaseDataModule.prepare_data | (self, *args, **kwargs) | Use this method to do things that might write to disk or that need to be done only from a single GPU in distributed settings. | Use this method to do things that might write to disk or that need to be done only from a single GPU in distributed settings. | def prepare_data(self, *args, **kwargs) -> None:
"""Use this method to do things that might write to disk or that need to be done only from a single GPU in distributed settings."""
raise NotImplementedError() | [
"def",
"prepare_data",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"->",
"None",
":",
"raise",
"NotImplementedError",
"(",
")"
] | [
129,
4
] | [
131,
35
] | python | en | ['en', 'en', 'en'] | True |
BaseDataModule.setup | (self, stage=None, *args, **kwargs) | There are also data operations you might want to perform on every GPU. | There are also data operations you might want to perform on every GPU. | def setup(self, stage=None, *args, **kwargs) -> None:
"""There are also data operations you might want to perform on every GPU."""
raise NotImplementedError() | [
"def",
"setup",
"(",
"self",
",",
"stage",
"=",
"None",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"->",
"None",
":",
"raise",
"NotImplementedError",
"(",
")"
] | [
133,
4
] | [
135,
35
] | python | en | ['en', 'en', 'en'] | True |
Cifar10DataModule.prepare_data | (self, *args, **kwargs) | Try to download dataset (DO NOT assign train/val here). | Try to download dataset (DO NOT assign train/val here). | def prepare_data(self, *args, **kwargs) -> None:
"""Try to download dataset (DO NOT assign train/val here)."""
self.root.mkdir(exist_ok=True, parents=True)
torchvision.datasets.CIFAR10(root=self.root, train=False, download=True) | [
"def",
"prepare_data",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"->",
"None",
":",
"self",
".",
"root",
".",
"mkdir",
"(",
"exist_ok",
"=",
"True",
",",
"parents",
"=",
"True",
")",
"torchvision",
".",
"datasets",
".",
"CIFAR10",
... | [
191,
4
] | [
194,
80
] | python | en | ['en', 'en', 'en'] | True |
Cifar10DataModule.setup | (self, stage=None, *args, **kwargs) | Assign test dataset | Assign test dataset | def setup(self, stage=None, *args, **kwargs) -> None:
"""Assign test dataset """
transform = (
self._get_transform(kwargs["basis"])
if "basis" in kwargs
else self._get_transform()
)
self.test_dataset: Dataset = torchvision.datasets.CIFAR10(
... | [
"def",
"setup",
"(",
"self",
",",
"stage",
"=",
"None",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"->",
"None",
":",
"transform",
"=",
"(",
"self",
".",
"_get_transform",
"(",
"kwargs",
"[",
"\"basis\"",
"]",
")",
"if",
"\"basis\"",
"in",
"kw... | [
196,
4
] | [
208,
9
] | python | en | ['fr', 'lb', 'en'] | False |
Imagenet100DataModule.prepare_data | (self, *args, **kwargs) | check if ImageNet dataset exists (DO NOT assign train/val here). | check if ImageNet dataset exists (DO NOT assign train/val here). | def prepare_data(self, *args, **kwargs) -> None:
"""check if ImageNet dataset exists (DO NOT assign train/val here)."""
if not (self.root / "val").exists():
raise ValueError(
f"Please download and set ImageNet-100 val data under {self.root}."
) | [
"def",
"prepare_data",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"->",
"None",
":",
"if",
"not",
"(",
"self",
".",
"root",
"/",
"\"val\"",
")",
".",
"exists",
"(",
")",
":",
"raise",
"ValueError",
"(",
"f\"Please download and set Ima... | [
225,
4
] | [
230,
13
] | python | en | ['fr', 'en', 'en'] | True |
Imagenet100DataModule.setup | (self, stage=None, *args, **kwargs) | Assign test dataset | Assign test dataset | def setup(self, stage=None, *args, **kwargs) -> None:
"""Assign test dataset"""
transform = (
self._get_transform(kwargs["basis"])
if "basis" in kwargs
else self._get_transform()
)
self.test_dataset: Dataset = torchvision.datasets.ImageFolder(
... | [
"def",
"setup",
"(",
"self",
",",
"stage",
"=",
"None",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"->",
"None",
":",
"transform",
"=",
"(",
"self",
".",
"_get_transform",
"(",
"kwargs",
"[",
"\"basis\"",
"]",
")",
"if",
"\"basis\"",
"in",
"kw... | [
232,
4
] | [
242,
9
] | python | en | ['fr', 'lb', 'en'] | False |
ImagenetDataModule.prepare_data | (self, *args, **kwargs) | check if ImageNet dataset exists (DO NOT assign train/val here). | check if ImageNet dataset exists (DO NOT assign train/val here). | def prepare_data(self, *args, **kwargs) -> None:
"""check if ImageNet dataset exists (DO NOT assign train/val here)."""
if not (self.root / "val").exists():
raise ValueError(
f"Please download and set ImageNet-1k val data under {self.root}."
) | [
"def",
"prepare_data",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"->",
"None",
":",
"if",
"not",
"(",
"self",
".",
"root",
"/",
"\"val\"",
")",
".",
"exists",
"(",
")",
":",
"raise",
"ValueError",
"(",
"f\"Please download and set Ima... | [
259,
4
] | [
264,
13
] | python | en | ['fr', 'en', 'en'] | True |
ImagenetDataModule.setup | (self, stage=None, *args, **kwargs) | Assign test dataset | Assign test dataset | def setup(self, stage=None, *args, **kwargs) -> None:
"""Assign test dataset"""
transform = (
self._get_transform(kwargs["basis"])
if "basis" in kwargs
else self._get_transform()
)
self.test_dataset: Dataset = torchvision.datasets.ImageFolder(
... | [
"def",
"setup",
"(",
"self",
",",
"stage",
"=",
"None",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"->",
"None",
":",
"transform",
"=",
"(",
"self",
".",
"_get_transform",
"(",
"kwargs",
"[",
"\"basis\"",
"]",
")",
"if",
"\"basis\"",
"in",
"kw... | [
266,
4
] | [
276,
9
] | python | en | ['fr', 'lb', 'en'] | False |
Runner.do_insert | (self, milvus, collection_name, data_type, dimension, size, ni) |
@params:
mivlus: server connect instance
dimension: collection dimensionn
# index_file_size: size trigger file merge
size: row count of vectors to be insert
ni: row count of vectors to be insert each time
# store_id: if store the ids retur... | def do_insert(self, milvus, collection_name, data_type, dimension, size, ni):
'''
@params:
mivlus: server connect instance
dimension: collection dimensionn
# index_file_size: size trigger file merge
size: row count of vectors to be insert
ni: r... | [
"def",
"do_insert",
"(",
"self",
",",
"milvus",
",",
"collection_name",
",",
"data_type",
",",
"dimension",
",",
"size",
",",
"ni",
")",
":",
"bi_res",
"=",
"{",
"}",
"total_time",
"=",
"0.0",
"qps",
"=",
"0.0",
"ni_time",
"=",
"0.0",
"if",
"data_type"... | [
123,
4
] | [
183,
21
] | python | en | ['en', 'error', 'th'] | False | |
Runner.get_recall_value | (self, true_ids, result_ids) |
Use the intersection length
|
Use the intersection length
| def get_recall_value(self, true_ids, result_ids):
"""
Use the intersection length
"""
sum_radio = 0.0
for index, item in enumerate(result_ids):
# tmp = set(item).intersection(set(flat_id_list[index]))
tmp = set(true_ids[index]).intersection(set(item))
... | [
"def",
"get_recall_value",
"(",
"self",
",",
"true_ids",
",",
"result_ids",
")",
":",
"sum_radio",
"=",
"0.0",
"for",
"index",
",",
"item",
"in",
"enumerate",
"(",
"result_ids",
")",
":",
"# tmp = set(item).intersection(set(flat_id_list[index]))",
"tmp",
"=",
"set... | [
265,
4
] | [
275,
52
] | python | en | ['en', 'error', 'th'] | False |
checkpoint | (iteration, G_XtoY, G_YtoX, D_X, D_Y, checkpoint_dir='checkpoints_cyclegan') | Saves the parameters of both generators G_YtoX, G_XtoY and discriminators D_X, D_Y.
| Saves the parameters of both generators G_YtoX, G_XtoY and discriminators D_X, D_Y.
| def checkpoint(iteration, G_XtoY, G_YtoX, D_X, D_Y, checkpoint_dir='checkpoints_cyclegan'):
"""Saves the parameters of both generators G_YtoX, G_XtoY and discriminators D_X, D_Y.
"""
G_XtoY_path = os.path.join(checkpoint_dir, 'G_XtoY.pkl')
G_YtoX_path = os.path.join(checkpoint_dir, 'G_YtoX.pkl')
... | [
"def",
"checkpoint",
"(",
"iteration",
",",
"G_XtoY",
",",
"G_YtoX",
",",
"D_X",
",",
"D_Y",
",",
"checkpoint_dir",
"=",
"'checkpoints_cyclegan'",
")",
":",
"G_XtoY_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"checkpoint_dir",
",",
"'G_XtoY.pkl'",
")",
... | [
21,
0
] | [
31,
42
] | python | en | ['en', 'en', 'en'] | True |
merge_images | (sources, targets, batch_size=16) | Creates a grid consisting of pairs of columns, where the first column in
each pair contains images source images and the second column in each pair
contains images generated by the CycleGAN from the corresponding images in
the first column.
| Creates a grid consisting of pairs of columns, where the first column in
each pair contains images source images and the second column in each pair
contains images generated by the CycleGAN from the corresponding images in
the first column.
| def merge_images(sources, targets, batch_size=16):
"""Creates a grid consisting of pairs of columns, where the first column in
each pair contains images source images and the second column in each pair
contains images generated by the CycleGAN from the corresponding images in
the first colum... | [
"def",
"merge_images",
"(",
"sources",
",",
"targets",
",",
"batch_size",
"=",
"16",
")",
":",
"_",
",",
"_",
",",
"h",
",",
"w",
"=",
"sources",
".",
"shape",
"row",
"=",
"int",
"(",
"np",
".",
"sqrt",
"(",
"batch_size",
")",
")",
"merged",
"=",... | [
34,
0
] | [
49,
17
] | python | en | ['en', 'en', 'en'] | True |
to_data | (x) | Converts variable to numpy. | Converts variable to numpy. | def to_data(x):
"""Converts variable to numpy."""
if torch.cuda.is_available():
x = x.cpu()
x = x.data.numpy()
x = ((x +1)*255 / (2)).astype(np.uint8) # rescale to 0-255
return x | [
"def",
"to_data",
"(",
"x",
")",
":",
"if",
"torch",
".",
"cuda",
".",
"is_available",
"(",
")",
":",
"x",
"=",
"x",
".",
"cpu",
"(",
")",
"x",
"=",
"x",
".",
"data",
".",
"numpy",
"(",
")",
"x",
"=",
"(",
"(",
"x",
"+",
"1",
")",
"*",
... | [
52,
0
] | [
58,
12
] | python | en | ['en', 'en', 'en'] | True |
save_samples | (iteration, fixed_Y, fixed_X, G_YtoX, G_XtoY, batch_size=16, sample_dir='samples_cyclegan') | Saves samples from both generators X->Y and Y->X.
| Saves samples from both generators X->Y and Y->X.
| def save_samples(iteration, fixed_Y, fixed_X, G_YtoX, G_XtoY, batch_size=16, sample_dir='samples_cyclegan'):
"""Saves samples from both generators X->Y and Y->X.
"""
# move input data to correct device
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
fake_X = G_YtoX(fixed... | [
"def",
"save_samples",
"(",
"iteration",
",",
"fixed_Y",
",",
"fixed_X",
",",
"G_YtoX",
",",
"G_XtoY",
",",
"batch_size",
"=",
"16",
",",
"sample_dir",
"=",
"'samples_cyclegan'",
")",
":",
"# move input data to correct device",
"device",
"=",
"torch",
".",
"devi... | [
60,
0
] | [
80,
34
] | python | en | ['en', 'en', 'en'] | True |
compile | (expr, params=None) |
Force compilation of expression for the SQLite target
|
Force compilation of expression for the SQLite target
| def compile(expr, params=None):
"""
Force compilation of expression for the SQLite target
"""
from ibis.sql.alchemy import to_sqlalchemy
return to_sqlalchemy(expr, dialect.make_context(params=params)) | [
"def",
"compile",
"(",
"expr",
",",
"params",
"=",
"None",
")",
":",
"from",
"ibis",
".",
"sql",
".",
"alchemy",
"import",
"to_sqlalchemy",
"return",
"to_sqlalchemy",
"(",
"expr",
",",
"dialect",
".",
"make_context",
"(",
"params",
"=",
"params",
")",
")... | [
19,
0
] | [
24,
67
] | python | en | ['en', 'error', 'th'] | False |
connect | (path=None, create=False) |
Create an Ibis client connected to a SQLite database.
Multiple database files can be created using the attach() method
Parameters
----------
path : string, default None
File path to the SQLite database file. If None, creates an in-memory
transient database and you can use attach()... |
Create an Ibis client connected to a SQLite database. | def connect(path=None, create=False):
"""
Create an Ibis client connected to a SQLite database.
Multiple database files can be created using the attach() method
Parameters
----------
path : string, default None
File path to the SQLite database file. If None, creates an in-memory
... | [
"def",
"connect",
"(",
"path",
"=",
"None",
",",
"create",
"=",
"False",
")",
":",
"return",
"SQLiteClient",
"(",
"path",
",",
"create",
"=",
"create",
")"
] | [
27,
0
] | [
43,
44
] | python | en | ['en', 'error', 'th'] | False |
feature | (self, node="clickhouse1") | Check set role query syntax.
```
SET ROLE {DEFAULT | NONE | role [,...] | ALL | ALL EXCEPT role [,...]}
```
| Check set role query syntax. | def feature(self, node="clickhouse1"):
"""Check set role query syntax.
```
SET ROLE {DEFAULT | NONE | role [,...] | ALL | ALL EXCEPT role [,...]}
```
"""
node = self.context.cluster.node(node)
@contextmanager
def setup(roles=0):
try:
with Given("I have some roles"):... | [
"def",
"feature",
"(",
"self",
",",
"node",
"=",
"\"clickhouse1\"",
")",
":",
"node",
"=",
"self",
".",
"context",
".",
"cluster",
".",
"node",
"(",
"node",
")",
"@",
"contextmanager",
"def",
"setup",
"(",
"roles",
"=",
"0",
")",
":",
"try",
":",
"... | [
10,
0
] | [
90,
55
] | python | en | ['fr', 'en', 'en'] | True |
feature | (self, node="clickhouse1") | Check revoke privilege syntax.
```sql
REVOKE [ON CLUSTER cluster_name] privilege
[(column_name [,...])] [,...]
ON {db.table|db.*|*.*|table|*}
FROM {user | CURRENT_USER} [,...] | ALL | ALL EXCEPT {user | CURRENT_USER} [,...]
```
| Check revoke privilege syntax. | def feature(self, node="clickhouse1"):
"""Check revoke privilege syntax.
```sql
REVOKE [ON CLUSTER cluster_name] privilege
[(column_name [,...])] [,...]
ON {db.table|db.*|*.*|table|*}
FROM {user | CURRENT_USER} [,...] | ALL | ALL EXCEPT {user | CURRENT_USER} [,...]
```
"""
node = se... | [
"def",
"feature",
"(",
"self",
",",
"node",
"=",
"\"clickhouse1\"",
")",
":",
"node",
"=",
"self",
".",
"context",
".",
"cluster",
".",
"node",
"(",
"node",
")",
"Scenario",
"(",
"run",
"=",
"revoke_privileges",
")",
"with",
"Scenario",
"(",
"\"I revoke ... | [
68,
0
] | [
161,
70
] | python | en | ['nl', 'sk', 'en'] | False |
QueuePubSub.publish | (self, channel, message) |
channel - An immutable key that represents the name of the channel. It can be nonexistent.
message - The message that will be pushed to the queue that's associated to the given channel.
|
channel - An immutable key that represents the name of the channel. It can be nonexistent.
message - The message that will be pushed to the queue that's associated to the given channel.
| def publish(self, channel, message):
'''
channel - An immutable key that represents the name of the channel. It can be nonexistent.
message - The message that will be pushed to the queue that's associated to the given channel.
'''
if channel not in self.queues:
... | [
"def",
"publish",
"(",
"self",
",",
"channel",
",",
"message",
")",
":",
"if",
"channel",
"not",
"in",
"self",
".",
"queues",
":",
"self",
".",
"queues",
"[",
"channel",
"]",
"=",
"Queue",
"(",
")",
"self",
".",
"queues",
"[",
"channel",
"]",
".",
... | [
30,
4
] | [
37,
41
] | python | en | ['en', 'ja', 'th'] | False |
QueuePubSub.subscribe | (self, channel) |
channel - An immutable key that represents the name of the channel. It can be nonexistent.
|
channel - An immutable key that represents the name of the channel. It can be nonexistent.
| def subscribe(self, channel):
'''
channel - An immutable key that represents the name of the channel. It can be nonexistent.
'''
if channel not in self.queues:
self.queues[channel] = Queue()
return self.queues[channel] | [
"def",
"subscribe",
"(",
"self",
",",
"channel",
")",
":",
"if",
"channel",
"not",
"in",
"self",
".",
"queues",
":",
"self",
".",
"queues",
"[",
"channel",
"]",
"=",
"Queue",
"(",
")",
"return",
"self",
".",
"queues",
"[",
"channel",
"]"
] | [
39,
4
] | [
45,
35
] | python | en | ['en', 'ja', 'th'] | False |
PiCameraPhotos.capture | (self) |
Captures an image from the Pi Camera.
:return: A Pillow.Image image.
|
Captures an image from the Pi Camera.
:return: A Pillow.Image image.
| def capture(self):
"""
Captures an image from the Pi Camera.
:return: A Pillow.Image image.
"""
self.stream.seek(0)
self.camera.capture(self.stream, use_video_port=True, resize=(480, 360), format='jpeg')
self.stream.seek(0)
logger.info('image captu... | [
"def",
"capture",
"(",
"self",
")",
":",
"self",
".",
"stream",
".",
"seek",
"(",
"0",
")",
"self",
".",
"camera",
".",
"capture",
"(",
"self",
".",
"stream",
",",
"use_video_port",
"=",
"True",
",",
"resize",
"=",
"(",
"480",
",",
"360",
")",
",... | [
409,
4
] | [
418,
38
] | python | en | ['en', 'ja', 'th'] | False |
PiCameraPhotos.get_camera_roi | (self, xoff, yoff, dim, pad) |
Computes the Regions-of-Interest for the cube's labels.
:param xoff: Offset in pixels on the X axis.
:param yoff: Offset in pixels on the Y axis.
:param dim: Dimension of the squared box that sits on top of a label. Measured in pixels.
:param pad: Pad distance between squar... |
Computes the Regions-of-Interest for the cube's labels.
:param xoff: Offset in pixels on the X axis.
:param yoff: Offset in pixels on the Y axis.
:param dim: Dimension of the squared box that sits on top of a label. Measured in pixels.
:param pad: Pad distance between squar... | def get_camera_roi(self, xoff, yoff, dim, pad):
"""
Computes the Regions-of-Interest for the cube's labels.
:param xoff: Offset in pixels on the X axis.
:param yoff: Offset in pixels on the Y axis.
:param dim: Dimension of the squared box that sits on top of a label. Measure... | [
"def",
"get_camera_roi",
"(",
"self",
",",
"xoff",
",",
"yoff",
",",
"dim",
",",
"pad",
")",
":",
"cols_count",
"=",
"rows_count",
"=",
"3",
"roi",
"=",
"[",
"[",
"0",
"for",
"x",
"in",
"range",
"(",
"cols_count",
")",
"]",
"for",
"x",
"in",
"ran... | [
420,
4
] | [
439,
18
] | python | en | ['en', 'ja', 'th'] | False |
PiCameraPhotos.get_processed_image | (self) |
Captures an image and processes it. It applies the CLAHE algorithm,
a Gaussian blur and an increase of the image's saturation by a fixed amount.
:return: RGB image as numpy array.
|
Captures an image and processes it. It applies the CLAHE algorithm,
a Gaussian blur and an increase of the image's saturation by a fixed amount.
:return: RGB image as numpy array.
| def get_processed_image(self):
"""
Captures an image and processes it. It applies the CLAHE algorithm,
a Gaussian blur and an increase of the image's saturation by a fixed amount.
:return: RGB image as numpy array.
"""
# convert the captured image to a numpy array... | [
"def",
"get_processed_image",
"(",
"self",
")",
":",
"# convert the captured image to a numpy array\r",
"img",
"=",
"self",
".",
"capture",
"(",
")",
"img",
"=",
"np",
".",
"asarray",
"(",
"img",
")",
"# # apply CLAHE algorithm to increase contrast in\r",
"# # low light... | [
441,
4
] | [
474,
18
] | python | en | ['en', 'ja', 'th'] | False |
PiCameraPhotos.get_overlayed_processed_image | (self, xoff, yoff, dim, pad) |
Captures an image, processes it and draws the Regions-of-Interest
on the image itself.
It needs the `xoff`, `yoff`, `dim` and `pad` arguments when calling get_camera_roi
method.
:return: RGB image as numpy array.
|
Captures an image, processes it and draws the Regions-of-Interest
on the image itself.
It needs the `xoff`, `yoff`, `dim` and `pad` arguments when calling get_camera_roi
method.
:return: RGB image as numpy array.
| def get_overlayed_processed_image(self, xoff, yoff, dim, pad):
"""
Captures an image, processes it and draws the Regions-of-Interest
on the image itself.
It needs the `xoff`, `yoff`, `dim` and `pad` arguments when calling get_camera_roi
method.
:return: RGB image as... | [
"def",
"get_overlayed_processed_image",
"(",
"self",
",",
"xoff",
",",
"yoff",
",",
"dim",
",",
"pad",
")",
":",
"img",
"=",
"self",
".",
"get_processed_image",
"(",
")",
"roi",
"=",
"self",
".",
"get_camera_roi",
"(",
"xoff",
",",
"yoff",
",",
"dim",
... | [
476,
4
] | [
494,
18
] | python | en | ['en', 'ja', 'th'] | False |
PiCameraPhotos.get_camera_color_patches | (self, xoff, yoff, dim, pad) |
Captures an image, processes it and selects the Regions-of-Interest, after which
they get averaged and a array of 3x3x3 elements are returned: 3x3 labels by 3
channels. Each pixel needs 3 channels.
It needs the `xoff`, `yoff`, `dim` and `pad` arguments when calling get_camera_roi
... |
Captures an image, processes it and selects the Regions-of-Interest, after which
they get averaged and a array of 3x3x3 elements are returned: 3x3 labels by 3
channels. Each pixel needs 3 channels.
It needs the `xoff`, `yoff`, `dim` and `pad` arguments when calling get_camera_roi
... | def get_camera_color_patches(self, xoff, yoff, dim, pad):
"""
Captures an image, processes it and selects the Regions-of-Interest, after which
they get averaged and a array of 3x3x3 elements are returned: 3x3 labels by 3
channels. Each pixel needs 3 channels.
It needs the `x... | [
"def",
"get_camera_color_patches",
"(",
"self",
",",
"xoff",
",",
"yoff",
",",
"dim",
",",
"pad",
")",
":",
"img",
"=",
"self",
".",
"get_processed_image",
"(",
")",
"img",
"=",
"cv2",
".",
"cvtColor",
"(",
"img",
",",
"cv2",
".",
"COLOR_RGB2LAB",
")",... | [
496,
4
] | [
521,
28
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.__init__ | (self, channel) |
Initialize a model object for the FSM.
:param channel: The channel to which commands have to be published.
|
Initialize a model object for the FSM.
:param channel: The channel to which commands have to be published.
| def __init__(self, channel):
"""
Initialize a model object for the FSM.
:param channel: The channel to which commands have to be published.
"""
self.pub = QueuePubSub(queues)
self.channel = channel
self.thread_stopper = td.Event()
self.thread = Non... | [
"def",
"__init__",
"(",
"self",
",",
"channel",
")",
":",
"self",
".",
"pub",
"=",
"QueuePubSub",
"(",
"queues",
")",
"self",
".",
"channel",
"=",
"channel",
"self",
".",
"thread_stopper",
"=",
"td",
".",
"Event",
"(",
")",
"self",
".",
"thread",
"="... | [
524,
4
] | [
533,
32
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.__execute_command | (self, command) |
Execute a command on the PivotPi.
:param command: A dictionary containing the 'time', 'servo' and
'position' keys representing the time needed for the command to get
executed, the servo onto which the action has to be applied (starts from 1)
and the position in degrees at w... |
Execute a command on the PivotPi.
:param command: A dictionary containing the 'time', 'servo' and
'position' keys representing the time needed for the command to get
executed, the servo onto which the action has to be applied (starts from 1)
and the position in degrees at w... | def __execute_command(self, command):
"""
Execute a command on the PivotPi.
:param command: A dictionary containing the 'time', 'servo' and
'position' keys representing the time needed for the command to get
executed, the servo onto which the action has to be applied (starts... | [
"def",
"__execute_command",
"(",
"self",
",",
"command",
")",
":",
"time",
"=",
"command",
"[",
"'time'",
"]",
"# we know the servo number is the 2nd element of the string\r",
"servo",
"=",
"int",
"(",
"command",
"[",
"'servo'",
"]",
"[",
"1",
"]",
")",
"-",
"... | [
535,
4
] | [
556,
19
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.__instantiate_arms | (self, config, mode) |
Initialize the robot's arms either in released or fixed mode.
:param config: The configuration dictionary as it comes from the GUI app.
:param mode: 'fix' or 'release'.
:return: A list of 4 elements with instances of the arms.Arm class.
|
Initialize the robot's arms either in released or fixed mode.
:param config: The configuration dictionary as it comes from the GUI app.
:param mode: 'fix' or 'release'.
:return: A list of 4 elements with instances of the arms.Arm class.
| def __instantiate_arms(self, config, mode):
"""
Initialize the robot's arms either in released or fixed mode.
:param config: The configuration dictionary as it comes from the GUI app.
:param mode: 'fix' or 'release'.
:return: A list of 4 elements with instances of the arms.A... | [
"def",
"__instantiate_arms",
"(",
"self",
",",
"config",
",",
"mode",
")",
":",
"robot_arms",
"=",
"[",
"]",
"servos",
"=",
"config",
"[",
"'servos'",
"]",
"if",
"mode",
"==",
"'fix'",
":",
"pos",
"=",
"'low'",
"elif",
"mode",
"==",
"'release'",
":",
... | [
558,
4
] | [
592,
25
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.__instantiate_arms_in_release_mode | (self, config) |
Same thing as calling __instantiate_arms with mode set to 'release'.
:param config: The configuration dictionary as it comes from the GUI app.
:return: A list of 4 elements with instances of the arms.Arm class.
|
Same thing as calling __instantiate_arms with mode set to 'release'.
:param config: The configuration dictionary as it comes from the GUI app.
:return: A list of 4 elements with instances of the arms.Arm class.
| def __instantiate_arms_in_release_mode(self, config):
"""
Same thing as calling __instantiate_arms with mode set to 'release'.
:param config: The configuration dictionary as it comes from the GUI app.
:return: A list of 4 elements with instances of the arms.Arm class.
"""
... | [
"def",
"__instantiate_arms_in_release_mode",
"(",
"self",
",",
"config",
")",
":",
"return",
"self",
".",
"__instantiate_arms",
"(",
"config",
",",
"mode",
"=",
"'release'",
")"
] | [
594,
4
] | [
600,
62
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.__instantiate_arms_in_fix_mode | (self, config) |
Same thing as calling __instantiate_arms with mode set to 'fix'.
:param config: The configuration dictionary as it comes from the GUI app.
:return: A list of 4 elements with instances of the arms.Arm class.
|
Same thing as calling __instantiate_arms with mode set to 'fix'.
:param config: The configuration dictionary as it comes from the GUI app.
:return: A list of 4 elements with instances of the arms.Arm class.
| def __instantiate_arms_in_fix_mode(self, config):
"""
Same thing as calling __instantiate_arms with mode set to 'fix'.
:param config: The configuration dictionary as it comes from the GUI app.
:return: A list of 4 elements with instances of the arms.Arm class.
"""
r... | [
"def",
"__instantiate_arms_in_fix_mode",
"(",
"self",
",",
"config",
")",
":",
"return",
"self",
".",
"__instantiate_arms",
"(",
"config",
",",
"mode",
"=",
"'fix'",
")"
] | [
602,
4
] | [
608,
58
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.__generate_handwritten_solution_from_cube_state | (self, cube_centers, rubiks_labels) |
Generate movement solution for the robot's arms. This method returns the sequence of
steps required for the robot to solve the cube.
:param cube_centers: A 6-element list containing the numeric labels for each face's center.
:param rubiks_labels: Flattened Rubik's cube labels in t... |
Generate movement solution for the robot's arms. This method returns the sequence of
steps required for the robot to solve the cube.
:param cube_centers: A 6-element list containing the numeric labels for each face's center.
:param rubiks_labels: Flattened Rubik's cube labels in t... | def __generate_handwritten_solution_from_cube_state(self, cube_centers, rubiks_labels):
"""
Generate movement solution for the robot's arms. This method returns the sequence of
steps required for the robot to solve the cube.
:param cube_centers: A 6-element list containing the nume... | [
"def",
"__generate_handwritten_solution_from_cube_state",
"(",
"self",
",",
"cube_centers",
",",
"rubiks_labels",
")",
":",
"# generate dictionary to map between center labels as\r",
"# digits to labels as a handwritten notation: URFDLB\r",
"kociembas_input_labels",
"=",
"{",
"}",
"f... | [
610,
4
] | [
634,
21
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.unblock_solve | (self, event) |
Unblock the solve button in the GUI app.
:param event: Unnecessary.
:return: Nothing.
|
Unblock the solve button in the GUI app.
:param event: Unnecessary.
:return: Nothing.
| def unblock_solve(self, event):
"""
Unblock the solve button in the GUI app.
:param event: Unnecessary.
:return: Nothing.
"""
logger.debug('unblock solve button')
self.pub.publish(self.channel, {
'solve_button_locked': False,
'read... | [
"def",
"unblock_solve",
"(",
"self",
",",
"event",
")",
":",
"logger",
".",
"debug",
"(",
"'unblock solve button'",
")",
"self",
".",
"pub",
".",
"publish",
"(",
"self",
".",
"channel",
",",
"{",
"'solve_button_locked'",
":",
"False",
",",
"'read_status'",
... | [
636,
4
] | [
648,
10
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.is_finished | (self, event) |
Checks if any thread that runs in the background has finished (
either for solving or reading the cube).
:param event: Not necessary.
:return: Whether the thread is still running or not.
|
Checks if any thread that runs in the background has finished (
either for solving or reading the cube).
:param event: Not necessary.
:return: Whether the thread is still running or not.
| def is_finished(self, event):
"""
Checks if any thread that runs in the background has finished (
either for solving or reading the cube).
:param event: Not necessary.
:return: Whether the thread is still running or not.
"""
return self.thread_stopper.is_se... | [
"def",
"is_finished",
"(",
"self",
",",
"event",
")",
":",
"return",
"self",
".",
"thread_stopper",
".",
"is_set",
"(",
")"
] | [
650,
4
] | [
657,
43
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.block_solve | (self, event) |
Blocks the solve button and stops the arms' motors.
:param event: Not necessary here.
:return: Nothing.
|
Blocks the solve button and stops the arms' motors.
:param event: Not necessary here.
:return: Nothing.
| def block_solve(self, event):
"""
Blocks the solve button and stops the arms' motors.
:param event: Not necessary here.
:return: Nothing.
"""
logger.debug('block solve button')
if self.thread != None and not self.thread_stopper.is_set():
self.t... | [
"def",
"block_solve",
"(",
"self",
",",
"event",
")",
":",
"logger",
".",
"debug",
"(",
"'block solve button'",
")",
"if",
"self",
".",
"thread",
"!=",
"None",
"and",
"not",
"self",
".",
"thread_stopper",
".",
"is_set",
"(",
")",
":",
"self",
".",
"thr... | [
659,
4
] | [
681,
10
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.readcube | (self, event) |
Spins up the thread for readcube_thread method.
:param event: Is a dictionary that contains the arm configs as received from the GUI app.
:return: Nothing.
|
Spins up the thread for readcube_thread method.
:param event: Is a dictionary that contains the arm configs as received from the GUI app.
:return: Nothing.
| def readcube(self, event):
"""
Spins up the thread for readcube_thread method.
:param event: Is a dictionary that contains the arm configs as received from the GUI app.
:return: Nothing.
"""
logger.debug('start thread for reading the cube')
self.config = ev... | [
"def",
"readcube",
"(",
"self",
",",
"event",
")",
":",
"logger",
".",
"debug",
"(",
"'start thread for reading the cube'",
")",
"self",
".",
"config",
"=",
"event",
".",
"kwargs",
".",
"get",
"(",
"'config'",
")",
"self",
".",
"thread_stopper",
".",
"clea... | [
683,
4
] | [
693,
27
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.readcube_thread | (self) |
Method which scans the cube's surface.
:return: Nothing.
|
Method which scans the cube's surface.
:return: Nothing.
| def readcube_thread(self):
"""
Method which scans the cube's surface.
:return: Nothing.
"""
logger.debug('reading cube')
self.pub.publish(self.channel, {
'solve_button_locked': False,
'read_status': 0,
'solve_status': 0
... | [
"def",
"readcube_thread",
"(",
"self",
")",
":",
"logger",
".",
"debug",
"(",
"'reading cube'",
")",
"self",
".",
"pub",
".",
"publish",
"(",
"self",
".",
"channel",
",",
"{",
"'solve_button_locked'",
":",
"False",
",",
"'read_status'",
":",
"0",
",",
"'... | [
695,
4
] | [
829,
33
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.solvecube | (self, event) |
Spins up the thread for solvecube_thread method.
:param event: Not necessary.
:return: Nothing.
|
Spins up the thread for solvecube_thread method.
:param event: Not necessary.
:return: Nothing.
| def solvecube(self, event):
"""
Spins up the thread for solvecube_thread method.
:param event: Not necessary.
:return: Nothing.
"""
logger.debug('start thread for solving the cube')
self.thread_stopper.clear()
self.thread = td.Thread(target=self.so... | [
"def",
"solvecube",
"(",
"self",
",",
"event",
")",
":",
"logger",
".",
"debug",
"(",
"'start thread for solving the cube'",
")",
"self",
".",
"thread_stopper",
".",
"clear",
"(",
")",
"self",
".",
"thread",
"=",
"td",
".",
"Thread",
"(",
"target",
"=",
... | [
831,
4
] | [
840,
27
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.solvecube_thread | (self) |
Solve's the Rubik's cube. Uses the cubesolution attribute
to get its steps.
:return: Nothing.
|
Solve's the Rubik's cube. Uses the cubesolution attribute
to get its steps.
:return: Nothing.
| def solvecube_thread(self):
"""
Solve's the Rubik's cube. Uses the cubesolution attribute
to get its steps.
:return: Nothing.
"""
logger.debug('solving cube')
self.pub.publish(self.channel, {
'solve_button_locked': False,
'read_sta... | [
"def",
"solvecube_thread",
"(",
"self",
")",
":",
"logger",
".",
"debug",
"(",
"'solving cube'",
")",
"self",
".",
"pub",
".",
"publish",
"(",
"self",
".",
"channel",
",",
"{",
"'solve_button_locked'",
":",
"False",
",",
"'read_status'",
":",
"100",
",",
... | [
842,
4
] | [
885,
33
] | python | en | ['en', 'ja', 'th'] | False |
RubiksSolver.process_command | (self, event) |
Process the commands for reflexive transitions into the rest state.
:param event: Must have 'config' and 'type' keys. Can have 'action',
'servo' and 'pos' keys.
:return: Nothing.
|
Process the commands for reflexive transitions into the rest state.
:param event: Must have 'config' and 'type' keys. Can have 'action',
'servo' and 'pos' keys.
:return: Nothing.
| def process_command(self, event):
"""
Process the commands for reflexive transitions into the rest state.
:param event: Must have 'config' and 'type' keys. Can have 'action',
'servo' and 'pos' keys.
:return: Nothing.
"""
config = event.kwargs.get('config')
... | [
"def",
"process_command",
"(",
"self",
",",
"event",
")",
":",
"config",
"=",
"event",
".",
"kwargs",
".",
"get",
"(",
"'config'",
")",
"cmd_type",
"=",
"event",
".",
"kwargs",
".",
"get",
"(",
"'type'",
")",
"if",
"cmd_type",
"==",
"'system'",
":",
... | [
887,
4
] | [
922,
37
] | python | en | ['en', 'ja', 'th'] | False |
is_good_response | (resp) |
Returns True if the response seems to be HTML, False otherwise.
|
Returns True if the response seems to be HTML, False otherwise.
| def is_good_response(resp):
"""
Returns True if the response seems to be HTML, False otherwise.
"""
content_type = resp.headers['Content-Type'].lower()
return (resp.status_code == 200
and content_type is not None
and content_type.find('html') > -1) | [
"def",
"is_good_response",
"(",
"resp",
")",
":",
"content_type",
"=",
"resp",
".",
"headers",
"[",
"'Content-Type'",
"]",
".",
"lower",
"(",
")",
"return",
"(",
"resp",
".",
"status_code",
"==",
"200",
"and",
"content_type",
"is",
"not",
"None",
"and",
... | [
42,
0
] | [
49,
47
] | python | en | ['en', 'error', 'th'] | False |
single_expr | (self) | Check defining of partition clause with single expr.
| Check defining of partition clause with single expr.
| def single_expr(self):
"""Check defining of partition clause with single expr.
"""
expected = convert_output("""
x | s | sum
----+---+------
1 | a | 2
1 | b | 2
2 | b | 2
""")
execute_query(
"SELECT x,s, sum(x) OVER (PARTITION BY x) AS sum FROM values('x In... | [
"def",
"single_expr",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n x | s | sum\n ----+---+------\n 1 | a | 2 \n 1 | b | 2 \n 2 | b | 2 \n \"\"\"",
")",
"execute_query",
"(",
"\"SELECT x,s, sum(x) OVER (PARTITION BY x) AS sum FROM v... | [
6,
0
] | [
20,
5
] | python | en | ['en', 'en', 'en'] | True |
multiple_expr | (self) | Check defining of partition clause with multiple exprs.
| Check defining of partition clause with multiple exprs.
| def multiple_expr(self):
"""Check defining of partition clause with multiple exprs.
"""
expected = convert_output("""
x | s | sum
--+---+----
1 | a | 1
1 | b | 1
2 | b | 2
""")
execute_query(
"SELECT x,s, sum(x) OVER (PARTITION BY x,s) AS sum FROM values('x Int8, s ... | [
"def",
"multiple_expr",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n x | s | sum\n --+---+----\n 1 | a | 1\n 1 | b | 1\n 2 | b | 2\n \"\"\"",
")",
"execute_query",
"(",
"\"SELECT x,s, sum(x) OVER (PARTITION BY x,s) AS sum FROM values('x ... | [
26,
0
] | [
40,
5
] | python | en | ['en', 'en', 'en'] | True |
missing_expr_error | (self) | Check that defining of partition clause with missing expr returns an error.
| Check that defining of partition clause with missing expr returns an error.
| def missing_expr_error(self):
"""Check that defining of partition clause with missing expr returns an error.
"""
exitcode = 62
message = "Exception: Syntax error: failed at position"
self.context.node.query("SELECT sum(number) OVER (PARTITION BY) FROM numbers(1,3)", exitcode=exitcode, message=messa... | [
"def",
"missing_expr_error",
"(",
"self",
")",
":",
"exitcode",
"=",
"62",
"message",
"=",
"\"Exception: Syntax error: failed at position\"",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT sum(number) OVER (PARTITION BY) FROM numbers(1,3)\"",
",",
"exit... | [
46,
0
] | [
52,
123
] | python | en | ['en', 'en', 'en'] | True |
invalid_expr_error | (self) | Check that defining of partition clause with invalid expr returns an error.
| Check that defining of partition clause with invalid expr returns an error.
| def invalid_expr_error(self):
"""Check that defining of partition clause with invalid expr returns an error.
"""
exitcode = 47
message = "Exception: Missing columns: 'foo'"
self.context.node.query("SELECT sum(number) OVER (PARTITION BY foo) FROM numbers(1,3)", exitcode=exitcode, message=message) | [
"def",
"invalid_expr_error",
"(",
"self",
")",
":",
"exitcode",
"=",
"47",
"message",
"=",
"\"Exception: Missing columns: 'foo'\"",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT sum(number) OVER (PARTITION BY foo) FROM numbers(1,3)\"",
",",
"exitcode",... | [
58,
0
] | [
64,
127
] | python | en | ['en', 'en', 'en'] | True |
feature | (self) | Check defining partition clause.
| Check defining partition clause.
| def feature(self):
"""Check defining partition clause.
"""
for scenario in loads(current_module(), Scenario):
Scenario(run=scenario, flags=TE) | [
"def",
"feature",
"(",
"self",
")",
":",
"for",
"scenario",
"in",
"loads",
"(",
"current_module",
"(",
")",
",",
"Scenario",
")",
":",
"Scenario",
"(",
"run",
"=",
"scenario",
",",
"flags",
"=",
"TE",
")"
] | [
72,
0
] | [
76,
40
] | python | en | ['de', 'en', 'en'] | True |
simple_get | (url) |
Attempts to get the content at `url` by making an HTTP GET request.
If the content-type of response is some kind of HTML/XML, return the
text content, otherwise return None.
|
Attempts to get the content at `url` by making an HTTP GET request.
If the content-type of response is some kind of HTML/XML, return the
text content, otherwise return None.
| def simple_get(url):
"""
Attempts to get the content at `url` by making an HTTP GET request.
If the content-type of response is some kind of HTML/XML, return the
text content, otherwise return None.
"""
try:
with closing(get(url, stream=True)) as resp:
if is_good_response(res... | [
"def",
"simple_get",
"(",
"url",
")",
":",
"try",
":",
"with",
"closing",
"(",
"get",
"(",
"url",
",",
"stream",
"=",
"True",
")",
")",
"as",
"resp",
":",
"if",
"is_good_response",
"(",
"resp",
")",
":",
"return",
"resp",
".",
"content",
"else",
":... | [
25,
0
] | [
40,
19
] | python | en | ['en', 'error', 'th'] | False |
is_good_response | (resp) |
Returns True if the response seems to be HTML, False otherwise.
|
Returns True if the response seems to be HTML, False otherwise.
| def is_good_response(resp):
"""
Returns True if the response seems to be HTML, False otherwise.
"""
content_type = resp.headers['Content-Type'].lower()
return (resp.status_code == 200
and content_type is not None
and content_type.find('html') > -1) | [
"def",
"is_good_response",
"(",
"resp",
")",
":",
"content_type",
"=",
"resp",
".",
"headers",
"[",
"'Content-Type'",
"]",
".",
"lower",
"(",
")",
"return",
"(",
"resp",
".",
"status_code",
"==",
"200",
"and",
"content_type",
"is",
"not",
"None",
"and",
... | [
43,
0
] | [
50,
47
] | python | en | ['en', 'error', 'th'] | False |
SQLClient.table | (self, name, database=None) |
Create a table expression that references a particular table in the
database
Parameters
----------
name : string
database : string, optional
Returns
-------
table : TableExpr
|
Create a table expression that references a particular table in the
database | def table(self, name, database=None):
"""
Create a table expression that references a particular table in the
database
Parameters
----------
name : string
database : string, optional
Returns
-------
table : TableExpr
"""
q... | [
"def",
"table",
"(",
"self",
",",
"name",
",",
"database",
"=",
"None",
")",
":",
"qualified_name",
"=",
"self",
".",
"_fully_qualified_name",
"(",
"name",
",",
"database",
")",
"schema",
"=",
"self",
".",
"_get_table_schema",
"(",
"qualified_name",
")",
"... | [
73,
4
] | [
90,
42
] | python | en | ['en', 'error', 'th'] | False |
SQLClient.database | (self, name=None) |
Create a Database object for a given database name that can be used for
exploring and manipulating the objects (tables, functions, views, etc.)
inside
Parameters
----------
name : string
Name of database
Returns
-------
database : Data... |
Create a Database object for a given database name that can be used for
exploring and manipulating the objects (tables, functions, views, etc.)
inside | def database(self, name=None):
"""
Create a Database object for a given database name that can be used for
exploring and manipulating the objects (tables, functions, views, etc.)
inside
Parameters
----------
name : string
Name of database
Retur... | [
"def",
"database",
"(",
"self",
",",
"name",
"=",
"None",
")",
":",
"# TODO: validate existence of database",
"if",
"name",
"is",
"None",
":",
"name",
"=",
"self",
".",
"current_database",
"return",
"self",
".",
"database_class",
"(",
"name",
",",
"self",
")... | [
96,
4
] | [
114,
46
] | python | en | ['en', 'error', 'th'] | False |
SQLClient.sql | (self, query) |
Convert a SQL query to an Ibis table expression
Parameters
----------
Returns
-------
table : TableExpr
|
Convert a SQL query to an Ibis table expression | def sql(self, query):
"""
Convert a SQL query to an Ibis table expression
Parameters
----------
Returns
-------
table : TableExpr
"""
# Get the schema by adding a LIMIT 0 on to the end of the query. If
# there is already a limit in the qu... | [
"def",
"sql",
"(",
"self",
",",
"query",
")",
":",
"# Get the schema by adding a LIMIT 0 on to the end of the query. If",
"# there is already a limit in the query, we find and remove it",
"limited_query",
"=",
"'SELECT * FROM ({}) t0 LIMIT 0'",
".",
"format",
"(",
"query",
")",
"... | [
127,
4
] | [
142,
64
] | python | en | ['en', 'error', 'th'] | False |
SQLClient.raw_sql | (self, query, results=False) |
Execute a given query string. Could have unexpected results if the
query modifies the behavior of the session in a way unknown to Ibis; be
careful.
Parameters
----------
query : string
DML or DDL statement
results : boolean, default False
Pas... |
Execute a given query string. Could have unexpected results if the
query modifies the behavior of the session in a way unknown to Ibis; be
careful. | def raw_sql(self, query, results=False):
"""
Execute a given query string. Could have unexpected results if the
query modifies the behavior of the session in a way unknown to Ibis; be
careful.
Parameters
----------
query : string
DML or DDL statement
... | [
"def",
"raw_sql",
"(",
"self",
",",
"query",
",",
"results",
"=",
"False",
")",
":",
"return",
"self",
".",
"_execute",
"(",
"query",
",",
"results",
"=",
"results",
")"
] | [
144,
4
] | [
162,
52
] | python | en | ['en', 'error', 'th'] | False |
SQLClient.execute | (self, expr, params=None, limit='default', **kwargs) |
Compile and execute Ibis expression using this backend client
interface, returning results in-memory in the appropriate object type
Parameters
----------
expr : Expr
limit : int, default None
For expressions yielding result yets; retrieve at most this number o... |
Compile and execute Ibis expression using this backend client
interface, returning results in-memory in the appropriate object type | def execute(self, expr, params=None, limit='default', **kwargs):
"""
Compile and execute Ibis expression using this backend client
interface, returning results in-memory in the appropriate object type
Parameters
----------
expr : Expr
limit : int, default None
... | [
"def",
"execute",
"(",
"self",
",",
"expr",
",",
"params",
"=",
"None",
",",
"limit",
"=",
"'default'",
",",
"*",
"*",
"kwargs",
")",
":",
"query_ast",
"=",
"self",
".",
"_build_ast_ensure_limit",
"(",
"expr",
",",
"limit",
",",
"params",
"=",
"params"... | [
164,
4
] | [
186,
21
] | python | en | ['en', 'error', 'th'] | False |
SQLClient.compile | (self, expr, params=None, limit=None) |
Translate expression to one or more queries according to backend target
Returns
-------
output : single query or list of queries
|
Translate expression to one or more queries according to backend target | def compile(self, expr, params=None, limit=None):
"""
Translate expression to one or more queries according to backend target
Returns
-------
output : single query or list of queries
"""
query_ast = self._build_ast_ensure_limit(expr, limit, params=params)
... | [
"def",
"compile",
"(",
"self",
",",
"expr",
",",
"params",
"=",
"None",
",",
"limit",
"=",
"None",
")",
":",
"query_ast",
"=",
"self",
".",
"_build_ast_ensure_limit",
"(",
"expr",
",",
"limit",
",",
"params",
"=",
"params",
")",
"return",
"query_ast",
... | [
192,
4
] | [
201,
34
] | python | en | ['en', 'error', 'th'] | False |
SQLClient.explain | (self, expr, params=None) |
Query for and return the query plan associated with the indicated
expression or SQL query.
Returns
-------
plan : string
|
Query for and return the query plan associated with the indicated
expression or SQL query. | def explain(self, expr, params=None):
"""
Query for and return the query plan associated with the indicated
expression or SQL query.
Returns
-------
plan : string
"""
if isinstance(expr, ir.Expr):
context = self.dialect.make_context(params=par... | [
"def",
"explain",
"(",
"self",
",",
"expr",
",",
"params",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"expr",
",",
"ir",
".",
"Expr",
")",
":",
"context",
"=",
"self",
".",
"dialect",
".",
"make_context",
"(",
"params",
"=",
"params",
")",
"qu... | [
228,
4
] | [
253,
61
] | python | en | ['en', 'error', 'th'] | False |
Database.drop | (self, force=False) |
Drop the database
Parameters
----------
drop : boolean, default False
Drop any objects if they exist, and do not fail if the databaes does
not exist
|
Drop the database | def drop(self, force=False):
"""
Drop the database
Parameters
----------
drop : boolean, default False
Drop any objects if they exist, and do not fail if the databaes does
not exist
"""
self.client.drop_database(self.name, force=force) | [
"def",
"drop",
"(",
"self",
",",
"force",
"=",
"False",
")",
":",
"self",
".",
"client",
".",
"drop_database",
"(",
"self",
".",
"name",
",",
"force",
"=",
"force",
")"
] | [
347,
4
] | [
357,
57
] | python | en | ['en', 'error', 'th'] | False |
Database.namespace | (self, ns) |
Creates a derived Database instance for collections of objects having a
common prefix. For example, for tables fooa, foob, and fooc, creating
the "foo" namespace would enable you to reference those objects as a,
b, and c, respectively.
Returns
-------
ns : Datab... |
Creates a derived Database instance for collections of objects having a
common prefix. For example, for tables fooa, foob, and fooc, creating
the "foo" namespace would enable you to reference those objects as a,
b, and c, respectively. | def namespace(self, ns):
"""
Creates a derived Database instance for collections of objects having a
common prefix. For example, for tables fooa, foob, and fooc, creating
the "foo" namespace would enable you to reference those objects as a,
b, and c, respectively.
Return... | [
"def",
"namespace",
"(",
"self",
",",
"ns",
")",
":",
"return",
"DatabaseNamespace",
"(",
"self",
",",
"ns",
")"
] | [
359,
4
] | [
370,
42
] | python | en | ['en', 'error', 'th'] | False |
Database.table | (self, name) |
Return a table expression referencing a table in this database
Returns
-------
table : TableExpr
|
Return a table expression referencing a table in this database | def table(self, name):
"""
Return a table expression referencing a table in this database
Returns
-------
table : TableExpr
"""
qualified_name = self._qualify(name)
return self.client.table(qualified_name, self.name) | [
"def",
"table",
"(",
"self",
",",
"name",
")",
":",
"qualified_name",
"=",
"self",
".",
"_qualify",
"(",
"name",
")",
"return",
"self",
".",
"client",
".",
"table",
"(",
"qualified_name",
",",
"self",
".",
"name",
")"
] | [
372,
4
] | [
381,
59
] | python | en | ['en', 'error', 'th'] | False |
more_than_one_user_directory | (self) | Check when more than one LDAP user directory is
defined inside a configuration file.
| Check when more than one LDAP user directory is
defined inside a configuration file.
| def more_than_one_user_directory(self):
"""Check when more than one LDAP user directory is
defined inside a configuration file.
"""
message = "DB::Exception: Duplicate storage type 'ldap' at user_directories"
servers = {
"openldap1": {
"host": "openldap1", "port": "389", "enable_... | [
"def",
"more_than_one_user_directory",
"(",
"self",
")",
":",
"message",
"=",
"\"DB::Exception: Duplicate storage type 'ldap' at user_directories\"",
"servers",
"=",
"{",
"\"openldap1\"",
":",
"{",
"\"host\"",
":",
"\"openldap1\"",
",",
"\"port\"",
":",
"\"389\"",
",",
... | [
9,
0
] | [
46,
102
] | python | en | ['en', 'en', 'en'] | True |
empty_server | (self, timeout=300) | Check that empty string in a `server` field is not allowed.
| Check that empty string in a `server` field is not allowed.
| def empty_server(self, timeout=300):
"""Check that empty string in a `server` field is not allowed.
"""
message = "DB::Exception: Empty 'server' field for LDAP user directory"
servers = {
"openldap1": {
"host": "openldap1", "port": "389", "enable_tls": "no",
"auth_dn_pref... | [
"def",
"empty_server",
"(",
"self",
",",
"timeout",
"=",
"300",
")",
":",
"message",
"=",
"\"DB::Exception: Empty 'server' field for LDAP user directory\"",
"servers",
"=",
"{",
"\"openldap1\"",
":",
"{",
"\"host\"",
":",
"\"openldap1\"",
",",
"\"port\"",
":",
"\"38... | [
54,
0
] | [
67,
113
] | python | en | ['en', 'en', 'en'] | True |
missing_server | (self, timeout=300) | Check that missing `server` field is not allowed.
| Check that missing `server` field is not allowed.
| def missing_server(self, timeout=300):
"""Check that missing `server` field is not allowed.
"""
message = "DB::Exception: Missing 'server' field for LDAP user directory"
servers = {
"openldap1": {
"host": "openldap1", "port": "389", "enable_tls": "no",
"auth_dn_prefix": "... | [
"def",
"missing_server",
"(",
"self",
",",
"timeout",
"=",
"300",
")",
":",
"message",
"=",
"\"DB::Exception: Missing 'server' field for LDAP user directory\"",
"servers",
"=",
"{",
"\"openldap1\"",
":",
"{",
"\"host\"",
":",
"\"openldap1\"",
",",
"\"port\"",
":",
"... | [
73,
0
] | [
86,
115
] | python | en | ['en', 'en', 'en'] | True |
defined_twice_server | (self) | Check that when `server` field is defined twice that only the first
entry is used.
| Check that when `server` field is defined twice that only the first
entry is used.
| def defined_twice_server(self):
"""Check that when `server` field is defined twice that only the first
entry is used.
"""
servers = {
"openldap1": {
"host": "openldap1", "port": "389", "enable_tls": "no",
"auth_dn_prefix": "cn=", "auth_dn_suffix": ",ou=users,dc=company,dc... | [
"def",
"defined_twice_server",
"(",
"self",
")",
":",
"servers",
"=",
"{",
"\"openldap1\"",
":",
"{",
"\"host\"",
":",
"\"openldap1\"",
",",
"\"port\"",
":",
"\"389\"",
",",
"\"enable_tls\"",
":",
"\"no\"",
",",
"\"auth_dn_prefix\"",
":",
"\"cn=\"",
",",
"\"au... | [
92,
0
] | [
115,
90
] | python | en | ['en', 'en', 'en'] | True |
invalid_server | (self) | Check when `server` field value is invalid.
| Check when `server` field value is invalid.
| def invalid_server(self):
"""Check when `server` field value is invalid.
"""
servers = {
"openldap1": {
"host": "openldap1", "port": "389", "enable_tls": "no",
"auth_dn_prefix": "cn=", "auth_dn_suffix": ",ou=users,dc=company,dc=com"
},
}
user = {"server": "ope... | [
"def",
"invalid_server",
"(",
"self",
")",
":",
"servers",
"=",
"{",
"\"openldap1\"",
":",
"{",
"\"host\"",
":",
"\"openldap1\"",
",",
"\"port\"",
":",
"\"389\"",
",",
"\"enable_tls\"",
":",
"\"no\"",
",",
"\"auth_dn_prefix\"",
":",
"\"cn=\"",
",",
"\"auth_dn_... | [
121,
0
] | [
144,
145
] | python | en | ['en', 'en', 'en'] | True |
empty_roles | (self) | Check when `roles` parameter is empty then user can't read any tables.
| Check when `roles` parameter is empty then user can't read any tables.
| def empty_roles(self):
"""Check when `roles` parameter is empty then user can't read any tables.
"""
message = "DB::Exception: user1: Not enough privileges."
exitcode = 241
servers = {
"openldap1": {
"host": "openldap1", "port": "389", "enable_tls": "no",
"auth_dn_pre... | [
"def",
"empty_roles",
"(",
"self",
")",
":",
"message",
"=",
"\"DB::Exception: user1: Not enough privileges.\"",
"exitcode",
"=",
"241",
"servers",
"=",
"{",
"\"openldap1\"",
":",
"{",
"\"host\"",
":",
"\"openldap1\"",
",",
"\"port\"",
":",
"\"389\"",
",",
"\"enab... | [
150,
0
] | [
174,
55
] | python | en | ['en', 'en', 'en'] | True |
defined_twice_roles | (self) | Check that when `roles` is defined twice then only the first entry is used.
| Check that when `roles` is defined twice then only the first entry is used.
| def defined_twice_roles(self):
"""Check that when `roles` is defined twice then only the first entry is used.
"""
node = self.context.node
create_statement = "CREATE TABLE {name} (d DATE, s String, i UInt8) ENGINE = Memory()"
servers = {
"openldap1": {
"host": "openldap1", "port... | [
"def",
"defined_twice_roles",
"(",
"self",
")",
":",
"node",
"=",
"self",
".",
"context",
".",
"node",
"create_statement",
"=",
"\"CREATE TABLE {name} (d DATE, s String, i UInt8) ENGINE = Memory()\"",
"servers",
"=",
"{",
"\"openldap1\"",
":",
"{",
"\"host\"",
":",
"\... | [
180,
0
] | [
218,
94
] | python | en | ['en', 'en', 'en'] | True |
invalid_role_in_roles | (self) | Check that no error is returned when LDAP users try to authenticate
if an invalid role is specified inside the `roles` section.
| Check that no error is returned when LDAP users try to authenticate
if an invalid role is specified inside the `roles` section.
| def invalid_role_in_roles(self):
"""Check that no error is returned when LDAP users try to authenticate
if an invalid role is specified inside the `roles` section.
"""
servers = {
"openldap1": {
"host": "openldap1", "port": "389", "enable_tls": "no",
"auth_dn_prefix": "cn... | [
"def",
"invalid_role_in_roles",
"(",
"self",
")",
":",
"servers",
"=",
"{",
"\"openldap1\"",
":",
"{",
"\"host\"",
":",
"\"openldap1\"",
",",
"\"port\"",
":",
"\"389\"",
",",
"\"enable_tls\"",
":",
"\"no\"",
",",
"\"auth_dn_prefix\"",
":",
"\"cn=\"",
",",
"\"a... | [
224,
0
] | [
240,
90
] | python | en | ['en', 'en', 'en'] | True |
missing_roles | (self) | Check that when the `roles` are missing then
LDAP users can still login but can't read from any table.
| Check that when the `roles` are missing then
LDAP users can still login but can't read from any table.
| def missing_roles(self):
"""Check that when the `roles` are missing then
LDAP users can still login but can't read from any table.
"""
message = "DB::Exception: user1: Not enough privileges."
exitcode = 241
servers = {
"openldap1": {
"host": "openldap1", "port": "389", "enabl... | [
"def",
"missing_roles",
"(",
"self",
")",
":",
"message",
"=",
"\"DB::Exception: user1: Not enough privileges.\"",
"exitcode",
"=",
"241",
"servers",
"=",
"{",
"\"openldap1\"",
":",
"{",
"\"host\"",
":",
"\"openldap1\"",
",",
"\"port\"",
":",
"\"389\"",
",",
"\"en... | [
246,
0
] | [
272,
55
] | python | en | ['en', 'en', 'en'] | True |
feature | (self, node="clickhouse1") | Check LDAP external user directory configuration.
| Check LDAP external user directory configuration.
| def feature(self, node="clickhouse1"):
"""Check LDAP external user directory configuration.
"""
self.context.node = self.context.cluster.node(node)
for scenario in loads(current_module(), Scenario):
scenario() | [
"def",
"feature",
"(",
"self",
",",
"node",
"=",
"\"clickhouse1\"",
")",
":",
"self",
".",
"context",
".",
"node",
"=",
"self",
".",
"context",
".",
"cluster",
".",
"node",
"(",
"node",
")",
"for",
"scenario",
"in",
"loads",
"(",
"current_module",
"(",... | [
282,
0
] | [
288,
18
] | python | en | ['en', 'lb', 'en'] | True |
ibis_dtype_to_pandas | (ibis_dtype) | Convert ibis dtype to the pandas / numpy alternative | Convert ibis dtype to the pandas / numpy alternative | def ibis_dtype_to_pandas(ibis_dtype):
"""Convert ibis dtype to the pandas / numpy alternative"""
assert isinstance(ibis_dtype, dt.DataType)
if isinstance(ibis_dtype, dt.Timestamp) and ibis_dtype.timezone:
return DatetimeTZDtype('ns', ibis_dtype.timezone)
elif isinstance(ibis_dtype, dt.Interval)... | [
"def",
"ibis_dtype_to_pandas",
"(",
"ibis_dtype",
")",
":",
"assert",
"isinstance",
"(",
"ibis_dtype",
",",
"dt",
".",
"DataType",
")",
"if",
"isinstance",
"(",
"ibis_dtype",
",",
"dt",
".",
"Timestamp",
")",
"and",
"ibis_dtype",
".",
"timezone",
":",
"retur... | [
183,
0
] | [
196,
35
] | python | en | ['en', 'zh', 'sw'] | False |
convert_timezone | (obj, timezone) | Convert `obj` to the timezone `timezone`.
Parameters
----------
obj : datetime.date or datetime.datetime
Returns
-------
type(obj)
| Convert `obj` to the timezone `timezone`. | def convert_timezone(obj, timezone):
"""Convert `obj` to the timezone `timezone`.
Parameters
----------
obj : datetime.date or datetime.datetime
Returns
-------
type(obj)
"""
if timezone is None:
return obj.replace(tzinfo=None)
return pytz.timezone(timezone).localize(ob... | [
"def",
"convert_timezone",
"(",
"obj",
",",
"timezone",
")",
":",
"if",
"timezone",
"is",
"None",
":",
"return",
"obj",
".",
"replace",
"(",
"tzinfo",
"=",
"None",
")",
"return",
"pytz",
".",
"timezone",
"(",
"timezone",
")",
".",
"localize",
"(",
"obj... | [
233,
0
] | [
246,
48
] | python | en | ['en', 'el-Latn', 'en'] | True |
ibis_schema_apply_to | (schema, df) | Applies the Ibis schema to a pandas DataFrame
Parameters
----------
schema : ibis.schema.Schema
df : pandas.DataFrame
Returns
-------
df : pandas.DataFrame
Notes
-----
Mutates `df`
| Applies the Ibis schema to a pandas DataFrame | def ibis_schema_apply_to(schema, df):
"""Applies the Ibis schema to a pandas DataFrame
Parameters
----------
schema : ibis.schema.Schema
df : pandas.DataFrame
Returns
-------
df : pandas.DataFrame
Notes
-----
Mutates `df`
"""
for column, dtype in schema.items():
... | [
"def",
"ibis_schema_apply_to",
"(",
"schema",
",",
"df",
")",
":",
"for",
"column",
",",
"dtype",
"in",
"schema",
".",
"items",
"(",
")",
":",
"pandas_dtype",
"=",
"dtype",
".",
"to_pandas",
"(",
")",
"col",
"=",
"df",
"[",
"column",
"]",
"col_dtype",
... | [
304,
0
] | [
335,
13
] | python | en | ['en', 'gl', 'en'] | True |
PandasClient.load_data | (self, table_name, obj, **kwargs) |
Parameters
----------
table_name : string
obj: pandas.DataFrame
|
Parameters
----------
table_name : string
obj: pandas.DataFrame
| def load_data(self, table_name, obj, **kwargs):
"""
Parameters
----------
table_name : string
obj: pandas.DataFrame
"""
# kwargs is a catch all for any options required by other backends.
self.dictionary[table_name] = pd.DataFrame(obj) | [
"def",
"load_data",
"(",
"self",
",",
"table_name",
",",
"obj",
",",
"*",
"*",
"kwargs",
")",
":",
"# kwargs is a catch all for any options required by other backends.",
"self",
".",
"dictionary",
"[",
"table_name",
"]",
"=",
"pd",
".",
"DataFrame",
"(",
"obj",
... | [
384,
4
] | [
392,
55
] | python | en | ['en', 'error', 'th'] | False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.