query stringlengths 9 3.4k | document stringlengths 9 87.4k | metadata dict | negatives listlengths 4 101 | negative_scores listlengths 4 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Collpase reads into unique sequences with seqcluster | def _collapse(in_file):
out_file = append_stem(in_file, ".trimming").replace(".gz", "")
if file_exists(out_file):
return out_file
seqs = collapse(in_file)
write_output(out_file, seqs, minimum=1, size=16)
return out_file | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sort_seqs_by_clustersize(seqs, mapping):\r\n ids = []\r\n seqs_cache = {}\r\n for header, seq in seqs:\r\n id = header.split(\"|\")[0]\r\n id = id.rstrip(\" \")\r\n ids.append(id)\r\n seqs_cache[id] = (header, seq)\r\n\r\n for id in sort_ids(ids, mapping):\r\n yie... | [
"0.5877995",
"0.5842396",
"0.57004803",
"0.5676363",
"0.5554628",
"0.54960996",
"0.5494342",
"0.5365974",
"0.53646976",
"0.5360995",
"0.535315",
"0.5349404",
"0.53339684",
"0.53113264",
"0.5286384",
"0.5248504",
"0.5236013",
"0.51872164",
"0.51790005",
"0.51459855",
"0.514084... | 0.0 | -1 |
Calculate size distribution after adapter removal | def _summary(in_file):
data = Counter()
out_file = in_file + "_size_stats"
if file_exists(out_file):
return out_file
with open(in_file) as in_handle:
for line in in_handle:
counts = int(line.strip().split("_x")[1])
line = in_handle.next()
l = len(line.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def calc_size(self):\r\n pass",
"def _SizeCalculator(partition_size):\n # Minus footer size to return max image size.\n return partition_size - int(math.pow(partition_size, 0.95))",
"def group_size_dist(self):\n return self.group_sizes() / self.group_sizes().sum()",
"def _SizeCalculat... | [
"0.6259505",
"0.6212963",
"0.6072609",
"0.6052218",
"0.5997209",
"0.5990883",
"0.5990371",
"0.5955971",
"0.58769107",
"0.5849853",
"0.5819776",
"0.5778659",
"0.5761369",
"0.5761369",
"0.57603925",
"0.5694945",
"0.5690529",
"0.56681687",
"0.56384045",
"0.56290996",
"0.5624655"... | 0.0 | -1 |
Run miraligner tool (from seqcluster suit) with default parameters. | def _miraligner(fastq_file, out_file, species, db_folder, config):
resources = config_utils.get_resources("miraligner", config)
miraligner = config_utils.get_program("miraligner", config)
jvm_opts = "-Xms750m -Xmx4g"
if resources and resources.get("jvm_opts"):
jvm_opts = " ".join(resources.get(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def miraligner(args):\n hairpin, mirna = _download_mirbase(args)\n precursors = _read_precursor(args.hairpin, args.sps)\n matures = _read_mature(args.mirna, args.sps)\n gtf = _read_gtf(args.gtf)\n out_dts = []\n out_files = []\n for bam_fn in args.files:\n sample = op.splitext(op.basena... | [
"0.6715519",
"0.6451304",
"0.6105899",
"0.60812104",
"0.60113335",
"0.5978272",
"0.5951038",
"0.589538",
"0.56262004",
"0.5610903",
"0.5578043",
"0.5525972",
"0.5519358",
"0.5513471",
"0.5505446",
"0.5498328",
"0.54912096",
"0.5486555",
"0.5481968",
"0.5479372",
"0.54618645",... | 0.7081002 | 0 |
use tDRmapper to quantify tRNAs | def _trna_annotation(data):
trna_ref = op.join(dd.get_srna_trna_file(data))
name = dd.get_sample_name(data)
work_dir = utils.safe_makedir(os.path.join(dd.get_work_dir(data), "trna", name))
in_file = op.basename(data["clean_fastq"])
tdrmapper = os.path.join(os.path.dirname(sys.executable), "TdrMappin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_tRNA_fasta_dict(tRNAdf):\n\n\n\ttRNA_fasta_outdict = OrderedDict()\n\n\tfor i in tRNAdf.index:\n\n\t\tif tRNAdf.loc[i,'feature'] == 'tRNA':\n\t\t\tchrom = tRNAdf.loc[i,'#chrom']\n\t\t\tchrStart = int(tRNAdf.loc[i,'chromStart'])\n\t\t\tchrEnd = int(tRNAdf.loc[i,'chromEnd'])\n\t\t\tstrand = tRNAdf.loc[i,'st... | [
"0.5670077",
"0.5213828",
"0.52060676",
"0.51534545",
"0.5067082",
"0.5054084",
"0.4904615",
"0.4904132",
"0.48988062",
"0.4891197",
"0.48766473",
"0.48697507",
"0.48230368",
"0.48097375",
"0.47705963",
"0.47685373",
"0.47542432",
"0.47371742",
"0.4730201",
"0.4727891",
"0.47... | 0.52124876 | 2 |
use MINTmap to quantify tRNAs | def _mint_trna_annotation(data):
trna_lookup = op.join(dd.get_srna_mint_lookup(data))
trna_space = op.join(dd.get_srna_mint_space(data))
trna_other = op.join(dd.get_srna_mint_other(data))
name = dd.get_sample_name(data)
work_dir = utils.safe_makedir(os.path.join(dd.get_work_dir(data), "trna_mint", n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nominal_map(options):\n pass",
"def testTinttsysMapNN(self):\n self._runTest('tinttsys', False, [1,3,5,7,15], 'nearest,nearest',self.spwmap)",
"def map():",
"def get_tm_mapping(mapping):\n df = mapping[['slot', 'row', 'col', 'xpix', 'ypix']]\n f_rowcol = lambda v: v.values[0] // 8\n f ... | [
"0.5489597",
"0.54892606",
"0.5466263",
"0.53517175",
"0.51584715",
"0.51203984",
"0.51159084",
"0.51063055",
"0.5065424",
"0.5064675",
"0.50545335",
"0.50488156",
"0.50333846",
"0.5000343",
"0.4986437",
"0.49812448",
"0.49764505",
"0.49462697",
"0.49228603",
"0.4912049",
"0.... | 0.49747854 | 17 |
Call the model from here maybe | def model(msg):
url = 'https://southcentralus.api.cognitive.microsoft.com/customvision/v3.0/Prediction/\
eff56ac8-0f36-41d9-93a9-da19396b0f30/detect/iterations/Iteration2_ppl_focus/image'
headers = {
'Prediction-Key': os.getenv('AZURE_VIS_KEY'),
'Content-Type': 'application/octet-stream'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def model(self):",
"def model(self):",
"def model(self):",
"def model(self):",
"def model(self):",
"def _execute(self, model_obj):",
"def build_model_fn(self):",
"def __init__(self, model):\n self.model = model",
"def __init__(self, model):\n self.model = model",
"def __init__(self,... | [
"0.7951002",
"0.7951002",
"0.7951002",
"0.7951002",
"0.7951002",
"0.78786904",
"0.70844334",
"0.7080098",
"0.7080098",
"0.7080098",
"0.7080098",
"0.70600057",
"0.7056543",
"0.70063555",
"0.69935524",
"0.6957579",
"0.6914939",
"0.6896581",
"0.6847946",
"0.682567",
"0.6816128",... | 0.0 | -1 |
Perform a bit_resize operation with default flags. | def test_bit_resize_defaults(self):
ops = [bitwise_operations.bit_resize(self.test_bin_ones, 10)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
# We should not have changed the zeroes bin
assert bins[self.test_bin_zeroes] == s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_shrink_only_does_not_allow_grow(self):\n ops = [bitwise_operations.bit_resize(self.test_bin_ones, 10, resize_flags=aerospike.BIT_RESIZE_SHRINK_ONLY)]\n with pytest.raises(e.InvalidRequest):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_resize_grow_o... | [
"0.7496736",
"0.7493131",
"0.7260088",
"0.70964545",
"0.7023311",
"0.6956937",
"0.6718904",
"0.6717223",
"0.6712172",
"0.6663342",
"0.6433174",
"0.6395114",
"0.63669056",
"0.6066519",
"0.56354314",
"0.55206406",
"0.55206406",
"0.5483327",
"0.54829",
"0.5477849",
"0.54754615",... | 0.7330377 | 2 |
Perform a bit_resize operation with resize from front flags. | def test_bit_resize_from_front(self):
ops = [bitwise_operations.bit_resize(self.test_bin_ones, 10, resize_flags=aerospike.BIT_RESIZE_FROM_FRONT)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
# We should not have changed the zeroes bi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_shrink_from_front(self):\n ops = [bitwise_operations.bit_resize(self.zero_one_bin, 5, resize_flags=aerospike.BIT_RESIZE_FROM_FRONT)]\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n\n assert len(bins[self.zero_... | [
"0.78656524",
"0.7009931",
"0.6986943",
"0.69517285",
"0.67249167",
"0.65363735",
"0.607698",
"0.60718304",
"0.6062587",
"0.59940326",
"0.5831852",
"0.5756714",
"0.5624054",
"0.5552826",
"0.551713",
"0.54809797",
"0.5480332",
"0.5291675",
"0.5257721",
"0.52422786",
"0.5236649... | 0.74251884 | 1 |
Perform a bit_resize operation with grow only resize flags. | def test_bit_resize_grow_only_allows_grow(self):
ops = [bitwise_operations.bit_resize(self.test_bin_ones, 10, resize_flags=aerospike.BIT_RESIZE_GROW_ONLY)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
assert len(bins[self.test_bin_on... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_grow_only_does_not_allow_shrink(self):\n ops = [bitwise_operations.bit_resize(self.test_bin_ones, 1, resize_flags=aerospike.BIT_RESIZE_GROW_ONLY)]\n with pytest.raises(e.InvalidRequest):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_resize_shrink_on... | [
"0.83654016",
"0.82760894",
"0.77512765",
"0.7666443",
"0.7504193",
"0.71482974",
"0.7136059",
"0.70921785",
"0.7008527",
"0.69167596",
"0.6827674",
"0.66365474",
"0.66100544",
"0.652954",
"0.5962343",
"0.5731295",
"0.57031107",
"0.5632795",
"0.5590738",
"0.5434616",
"0.54342... | 0.79928356 | 2 |
Perform a bit_resize operation with shrink only resize flags. | def test_bit_resize_shrink_only_allows_shrink(self):
ops = [bitwise_operations.bit_resize(self.test_bin_ones, 1, resize_flags=aerospike.BIT_RESIZE_SHRINK_ONLY)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
assert len(bins[self.test_b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_shrink_only_does_not_allow_grow(self):\n ops = [bitwise_operations.bit_resize(self.test_bin_ones, 10, resize_flags=aerospike.BIT_RESIZE_SHRINK_ONLY)]\n with pytest.raises(e.InvalidRequest):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_resize_grow_o... | [
"0.8279362",
"0.8169973",
"0.7519883",
"0.74589074",
"0.7278857",
"0.6863041",
"0.6804268",
"0.678663",
"0.67648256",
"0.66243684",
"0.6432424",
"0.61677724",
"0.6154099",
"0.61154544",
"0.60139805",
"0.5864634",
"0.57195467",
"0.56237566",
"0.5579254",
"0.5517733",
"0.551773... | 0.7868212 | 2 |
Shrinking a bytearray [0, 0, 0, 0, 0, 1, 1, 1, 1, 1] | def test_bit_resize_shrink_removes_from_end(self):
ops = [bitwise_operations.bit_resize(self.zero_one_bin, 5)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
assert len(bins[self.zero_one_bin]) == 5
assert bins[self.zero_one_bi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _shrink_arr(self):\n self._resize_arr(self._capacity // self._growth_factor)",
"def shrink(self):\r\n\r\n old = self._data\r\n self._capacity = self._capacity // 2\r\n self._data = [0] * self._capacity\r\n\r\n if len(old) >= 1:\r\n for i in range(self._size):\r\n... | [
"0.6551512",
"0.6509514",
"0.585405",
"0.5818946",
"0.56838995",
"0.567641",
"0.56488687",
"0.5614699",
"0.55934674",
"0.55568254",
"0.5555585",
"0.55294585",
"0.5512883",
"0.5506248",
"0.5469331",
"0.541783",
"0.54173297",
"0.5385371",
"0.5360227",
"0.5331471",
"0.5301435",
... | 0.59765244 | 2 |
Shrinking a bytearray [0, 0, 0, 0, 0, 1, 1, 1, 1, 1] | def test_bit_resize_shrink_from_front(self):
ops = [bitwise_operations.bit_resize(self.zero_one_bin, 5, resize_flags=aerospike.BIT_RESIZE_FROM_FRONT)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
assert len(bins[self.zero_one_bin]) =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _shrink_arr(self):\n self._resize_arr(self._capacity // self._growth_factor)",
"def shrink(self):\r\n\r\n old = self._data\r\n self._capacity = self._capacity // 2\r\n self._data = [0] * self._capacity\r\n\r\n if len(old) >= 1:\r\n for i in range(self._size):\r\n... | [
"0.6551586",
"0.65101767",
"0.597793",
"0.58557206",
"0.58172286",
"0.56845737",
"0.56777936",
"0.56472313",
"0.56167936",
"0.5591537",
"0.5559092",
"0.55571175",
"0.5512863",
"0.5503912",
"0.54688245",
"0.5421969",
"0.5418595",
"0.53878313",
"0.53612536",
"0.53343594",
"0.53... | 0.55316 | 12 |
By default we can create a new bin with resize. | def test_bit_resize_default_allows_create(self):
ops = [bitwise_operations.bit_resize("new_bin_name", 10)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
assert bins["new_bin_name"] == bytearray([0] * 10) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_create_only_allows_create(self):\n bit_policy = {\"bit_write_flags\": aerospike.BIT_WRITE_CREATE_ONLY}\n ops = [bitwise_operations.bit_resize(\"new_bin_name\", 10, policy=bit_policy)]\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connectio... | [
"0.7059136",
"0.6962264",
"0.6600574",
"0.6584359",
"0.6526519",
"0.6474382",
"0.6400263",
"0.63203436",
"0.6264439",
"0.62524",
"0.6250521",
"0.6248925",
"0.62143785",
"0.5967999",
"0.5863293",
"0.57773244",
"0.5767365",
"0.5744283",
"0.5743729",
"0.5714881",
"0.56769586",
... | 0.74629015 | 0 |
Create a bin with resize using the create only flag. | def test_bit_resize_create_only_allows_create(self):
bit_policy = {"bit_write_flags": aerospike.BIT_WRITE_CREATE_ONLY}
ops = [bitwise_operations.bit_resize("new_bin_name", 10, policy=bit_policy)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.tes... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_create_only_prevents_update(self):\n bit_policy = {\"bit_write_flags\": aerospike.BIT_WRITE_CREATE_ONLY}\n ops = [bitwise_operations.bit_resize(self.test_bin_zeroes, 10, policy=bit_policy)]\n with pytest.raises(e.BinExistsError):\n self.as_connection.operate(self... | [
"0.71709293",
"0.70837414",
"0.6715232",
"0.6555181",
"0.65351737",
"0.6414123",
"0.6213422",
"0.5822711",
"0.57785696",
"0.5771307",
"0.5741651",
"0.5709636",
"0.55918306",
"0.55503404",
"0.54320246",
"0.52427995",
"0.52391505",
"0.523907",
"0.5202887",
"0.519918",
"0.515285... | 0.7797645 | 0 |
Update a bin with resize using the update only flag. | def test_bit_resize_update_only_allows_update(self):
bit_policy = {"bit_write_flags": aerospike.BIT_WRITE_UPDATE_ONLY}
ops = [bitwise_operations.bit_resize(self.test_bin_zeroes, 10, policy=bit_policy)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(se... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_update_only_prevents_create(self):\n bit_policy = {\"bit_write_flags\": aerospike.BIT_WRITE_UPDATE_ONLY}\n ops = [bitwise_operations.bit_resize(\"new_binname\", 10, policy=bit_policy)]\n with pytest.raises(e.BinNotFound):\n self.as_connection.operate(self.test_ke... | [
"0.69057226",
"0.65416884",
"0.641748",
"0.6385027",
"0.63735026",
"0.6240761",
"0.6216285",
"0.61025584",
"0.604929",
"0.60121477",
"0.5909513",
"0.58421",
"0.58233666",
"0.57920974",
"0.5786729",
"0.57516265",
"0.5671128",
"0.56705207",
"0.5624751",
"0.56244254",
"0.5577843... | 0.7411978 | 0 |
Attempt to update a bin using the create only flag, should fail. | def test_bit_resize_create_only_prevents_update(self):
bit_policy = {"bit_write_flags": aerospike.BIT_WRITE_CREATE_ONLY}
ops = [bitwise_operations.bit_resize(self.test_bin_zeroes, 10, policy=bit_policy)]
with pytest.raises(e.BinExistsError):
self.as_connection.operate(self.test_key, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_update_only_prevents_create(self):\n bit_policy = {\"bit_write_flags\": aerospike.BIT_WRITE_UPDATE_ONLY}\n ops = [bitwise_operations.bit_resize(\"new_binname\", 10, policy=bit_policy)]\n with pytest.raises(e.BinNotFound):\n self.as_connection.operate(self.test_ke... | [
"0.72131586",
"0.6276118",
"0.62251824",
"0.5943193",
"0.58890015",
"0.58799314",
"0.5723462",
"0.57154715",
"0.5468486",
"0.53320503",
"0.53023577",
"0.52670854",
"0.5260081",
"0.5243067",
"0.5186186",
"0.5182294",
"0.51734173",
"0.5149509",
"0.51302",
"0.51124716",
"0.50859... | 0.67461276 | 1 |
Attempt to create a bin with the update only flag. | def test_bit_resize_update_only_prevents_create(self):
bit_policy = {"bit_write_flags": aerospike.BIT_WRITE_UPDATE_ONLY}
ops = [bitwise_operations.bit_resize("new_binname", 10, policy=bit_policy)]
with pytest.raises(e.BinNotFound):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_create_only_prevents_update(self):\n bit_policy = {\"bit_write_flags\": aerospike.BIT_WRITE_CREATE_ONLY}\n ops = [bitwise_operations.bit_resize(self.test_bin_zeroes, 10, policy=bit_policy)]\n with pytest.raises(e.BinExistsError):\n self.as_connection.operate(self... | [
"0.66729695",
"0.642562",
"0.5968319",
"0.5948694",
"0.5577203",
"0.5466079",
"0.5336632",
"0.5324112",
"0.5314014",
"0.5188824",
"0.50772935",
"0.50578123",
"0.5012339",
"0.49814543",
"0.49732277",
"0.49634764",
"0.49508432",
"0.49255985",
"0.49150288",
"0.49061385",
"0.4899... | 0.68357843 | 0 |
By default we can create a new bin with resize. | def test_bit_resize_partial_no_fail_duplicate(self):
bit_policy = {
"bit_write_flags": aerospike.BIT_WRITE_CREATE_ONLY
| aerospike.BIT_WRITE_NO_FAIL
| aerospike.BIT_WRITE_PARTIAL
}
ops = [
bitwise_operations.bit_resize(self.test_bin_zeroes, 15, pol... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_default_allows_create(self):\n ops = [bitwise_operations.bit_resize(\"new_bin_name\", 10)]\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n assert bins[\"new_bin_name\"] == bytearray([0] * 10)",
"def test_bit... | [
"0.74629015",
"0.7059136",
"0.6962264",
"0.6600574",
"0.6584359",
"0.6526519",
"0.6474382",
"0.6400263",
"0.63203436",
"0.6264439",
"0.62524",
"0.6250521",
"0.6248925",
"0.62143785",
"0.5863293",
"0.57773244",
"0.5767365",
"0.5744283",
"0.5743729",
"0.5714881",
"0.56769586",
... | 0.5967999 | 14 |
By default we can create a new bin with resize. | def test_bit_resize_partial_no_fail(self):
bit_policy = {"bit_write_flags": aerospike.BIT_WRITE_UPDATE_ONLY | aerospike.BIT_WRITE_NO_FAIL}
ops = [bitwise_operations.bit_resize("new_binname", 10, policy=bit_policy)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_conne... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_resize_default_allows_create(self):\n ops = [bitwise_operations.bit_resize(\"new_bin_name\", 10)]\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n assert bins[\"new_bin_name\"] == bytearray([0] * 10)",
"def test_bit... | [
"0.74629015",
"0.7059136",
"0.6962264",
"0.6600574",
"0.6584359",
"0.6526519",
"0.6474382",
"0.6400263",
"0.63203436",
"0.6264439",
"0.6250521",
"0.6248925",
"0.62143785",
"0.5967999",
"0.5863293",
"0.57773244",
"0.5767365",
"0.5744283",
"0.5743729",
"0.5714881",
"0.56769586"... | 0.62524 | 10 |
Resize with grow only flags. | def test_bit_resize_grow_only_does_not_allow_shrink(self):
ops = [bitwise_operations.bit_resize(self.test_bin_ones, 1, resize_flags=aerospike.BIT_RESIZE_GROW_ONLY)]
with pytest.raises(e.InvalidRequest):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resize(self, old, new):",
"def on_parent_resize(self, event):\n #self.resize()\n #self.resize_scaled(drag_rootx=self.resize_frame.winfo_rootx())\n self.resize_scaled(current=MathStat.lerp(0,\n self.prop_frame.winfo_width(), self.last_right_bias))",
"def resize(self):\n ... | [
"0.7313494",
"0.71683514",
"0.71290725",
"0.7116716",
"0.69780046",
"0.6940863",
"0.6910251",
"0.68420607",
"0.6823459",
"0.6815497",
"0.6724049",
"0.66957647",
"0.66957647",
"0.66957647",
"0.6667465",
"0.66370046",
"0.65751904",
"0.6562721",
"0.6553456",
"0.654598",
"0.65411... | 0.6013324 | 61 |
Prevent bin growth with shrin only flag. | def test_bit_resize_shrink_only_does_not_allow_grow(self):
ops = [bitwise_operations.bit_resize(self.test_bin_ones, 10, resize_flags=aerospike.BIT_RESIZE_SHRINK_ONLY)]
with pytest.raises(e.InvalidRequest):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bin_binarise(self):\n pass",
"def exclude_zero_bins(f,fitmin,fitmax,hs=[],limit=0,sumall=False):\n if len(hs)==0:\n return\n nbins = fitmax - fitmin + 1\n nexcl = 0\n exclist = []\n for ibin in xrange(fitmin,fitmax+1):\n do_exc = any( [h.GetBinContent(ibin)<limit for h in hs] ... | [
"0.6044508",
"0.5639449",
"0.5450376",
"0.54365146",
"0.5363423",
"0.52257067",
"0.5218204",
"0.5210507",
"0.5200387",
"0.514559",
"0.5139297",
"0.51389664",
"0.51030874",
"0.5100747",
"0.5063985",
"0.50473356",
"0.501439",
"0.49930787",
"0.49872985",
"0.4982441",
"0.49769953... | 0.5139137 | 11 |
Perform a bit_remove op with offset 1 and byte_size 2. | def test_bit_remove_two_bytes(self):
ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, 1, 2, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
assert bins[self.test_bin_zeroes] == bytearray([0] * 3)
# should have re... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_remove_byte_offset_with_byte_too_large(self):\n ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, 3, 3, None)]\n\n with pytest.raises(e.InvalidRequest):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_remove_byte_size_too_large(self):\n ops =... | [
"0.7411621",
"0.69199145",
"0.65946555",
"0.65642786",
"0.5604284",
"0.5579164",
"0.55595684",
"0.55402654",
"0.5442841",
"0.5363197",
"0.53372884",
"0.5258704",
"0.5235505",
"0.5223671",
"0.51678157",
"0.51637036",
"0.5145084",
"0.5111782",
"0.5111123",
"0.50823075",
"0.5066... | 0.6843533 | 2 |
Perform a bit_remove op with random offset and random byte_size. | def test_bit_remove_randnumbytes_randoffset(self):
offset = random.randint(0, 4)
num_bytes = random.randint(1, (5 - offset))
ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, offset, num_bytes, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_remove_byte_offset_with_byte_too_large(self):\n ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, 3, 3, None)]\n\n with pytest.raises(e.InvalidRequest):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_remove_byte_size_too_large(self):\n ops =... | [
"0.7460626",
"0.7029435",
"0.6697363",
"0.612828",
"0.58275354",
"0.5671818",
"0.5525168",
"0.54080635",
"0.54062444",
"0.53846896",
"0.53723586",
"0.5365333",
"0.53497666",
"0.53403485",
"0.53399885",
"0.5328281",
"0.5322385",
"0.53183216",
"0.52913463",
"0.52527755",
"0.524... | 0.8260266 | 0 |
Perform a bit_remove op with an offset outside the bit_map being modified. | def test_bit_remove_offset_out_of_range(self):
ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, 6, 1, None)]
with pytest.raises(e.InvalidRequest):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_remove_byte_offset_with_byte_too_large(self):\n ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, 3, 3, None)]\n\n with pytest.raises(e.InvalidRequest):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_remove_randnumbytes_randoffset(self):\n o... | [
"0.6892283",
"0.6586158",
"0.6565213",
"0.6270239",
"0.59938574",
"0.5886865",
"0.57899576",
"0.57643443",
"0.5681459",
"0.5676396",
"0.5671734",
"0.5641111",
"0.5604822",
"0.5602166",
"0.5552755",
"0.55470186",
"0.5542133",
"0.55227333",
"0.5515977",
"0.5514617",
"0.550996",... | 0.7176135 | 0 |
Perform a bit_remove op with byte_size larger than bit_map being modified. | def test_bit_remove_byte_size_too_large(self):
ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, 0, 6, None)]
with pytest.raises(e.InvalidRequest):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_remove_byte_offset_with_byte_too_large(self):\n ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, 3, 3, None)]\n\n with pytest.raises(e.InvalidRequest):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_remove_randnumbytes_randoffset(self):\n o... | [
"0.722026",
"0.63428634",
"0.6251677",
"0.6056598",
"0.58716387",
"0.58648276",
"0.55580854",
"0.553342",
"0.55312115",
"0.55277854",
"0.5504092",
"0.54698414",
"0.5469348",
"0.54454875",
"0.53916377",
"0.5335044",
"0.5326309",
"0.52946264",
"0.52848536",
"0.5278192",
"0.5261... | 0.72622025 | 0 |
Perform a bit_remove op with an offset and byte_size that attempt to modify the bitmap outside of bounds. | def test_bit_remove_byte_offset_with_byte_too_large(self):
ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, 3, 3, None)]
with pytest.raises(e.InvalidRequest):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_remove_offset_out_of_range(self):\n ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, 6, 1, None)]\n\n with pytest.raises(e.InvalidRequest):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_remove_byte_size_too_large(self):\n ops = [bitwise_op... | [
"0.70188206",
"0.6904221",
"0.65545523",
"0.61256516",
"0.58739406",
"0.5819776",
"0.57718444",
"0.5766656",
"0.5707339",
"0.5700624",
"0.5694595",
"0.568376",
"0.5648815",
"0.5548685",
"0.5532302",
"0.55302817",
"0.5436966",
"0.54173505",
"0.53808784",
"0.53792065",
"0.53229... | 0.7540604 | 0 |
Perform a bit_remove op with on a non existent bin. | def test_bit_remove_bad_bin_name(self):
ops = [bitwise_operations.bit_remove("bad_name", 3, 3, None)]
with pytest.raises(e.BinNotFound):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_remove_two_bytes(self):\n ops = [bitwise_operations.bit_remove(self.test_bin_zeroes, 1, 2, None)]\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n assert bins[self.test_bin_zeroes] == bytearray([0] * 3)\n # sho... | [
"0.68756264",
"0.66447246",
"0.6498532",
"0.648801",
"0.6431087",
"0.6427044",
"0.6342931",
"0.6317461",
"0.6307187",
"0.6265406",
"0.625727",
"0.6016103",
"0.5976674",
"0.59601295",
"0.5937234",
"0.5903448",
"0.58924925",
"0.58427477",
"0.58268416",
"0.5820784",
"0.57978046"... | 0.71839386 | 0 |
Perform a bit_remove op with an unsupported float type argument. | def test_bit_remove_bad_arg_type(self):
ops = [bitwise_operations.bit_remove("bad_name", 3, 3.5, None)]
with pytest.raises(e.ParamError):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_isub_with_float_argument(self):\n\n a = Vec3(2, 3, 4)\n b = 1.0\n\n a -= b\n\n expected_result = Vec3(1, 2, 3)\n\n self.assertEqual(a, expected_result)",
"def upgrade_to_float_no_complex(*types):\r\n for type in types:\r\n if type in complex_types:\r\n ... | [
"0.5411757",
"0.540019",
"0.53913176",
"0.5297443",
"0.52850366",
"0.52799785",
"0.52562046",
"0.5226235",
"0.518611",
"0.5149058",
"0.51441497",
"0.5123272",
"0.5087803",
"0.5081965",
"0.5056962",
"0.50403166",
"0.5002864",
"0.4964705",
"0.49551713",
"0.49255654",
"0.4921956... | 0.63819206 | 0 |
Perform a bit_set op with a random offset and random valued byte. | def test_bit_set_bit_random_byte_random_offset(self):
value = bytearray()
rand_byte = random.randint(0, 255)
value.append(rand_byte)
rand_offset = random.randint(0, 4) * 8
ops = [bitwise_operations.bit_set(self.test_bin_zeroes, rand_offset, 8, 1, value, None)]
self.as_con... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_set_bit_multiple_bytes(self):\n value = bytearray()\n value = bytearray()\n rand_byte = random.randint(0, 255)\n num_bytes = random.randint(1, 5)\n for x in range(0, num_bytes):\n value.append(rand_byte)\n ops = [bitwise_operations.bit_set(self.test... | [
"0.70580727",
"0.66288537",
"0.6617896",
"0.634463",
"0.6326759",
"0.627388",
"0.61899483",
"0.59698194",
"0.5968973",
"0.5948081",
"0.58074385",
"0.57888424",
"0.57555",
"0.57530206",
"0.5752519",
"0.5679028",
"0.5649676",
"0.56445855",
"0.5620908",
"0.5613202",
"0.5593376",... | 0.8364399 | 0 |
Perform a bit_set op with an offset that places the value across bytes. | def test_bit_set_bit_inbetween_bytes(self):
value = bytearray()
value.append(255)
ops = [bitwise_operations.bit_set(self.test_bin_zeroes, 4, 8, 1, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_res... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setbit(self, key, offset, value):\n key = self._encode(key)\n index, bits, mask = self._get_bits_and_offset(key, offset)\n\n if index >= len(bits):\n bits.extend(b\"\\x00\" * (index + 1 - len(bits)))\n\n prev_val = 1 if (bits[index] & mask) else 0\n\n if value:\n ... | [
"0.75205547",
"0.69871444",
"0.68143886",
"0.65187263",
"0.65010196",
"0.639893",
"0.63363326",
"0.6309361",
"0.62362903",
"0.62182957",
"0.62146336",
"0.6192626",
"0.6173701",
"0.60066473",
"0.5981619",
"0.59072906",
"0.58354443",
"0.5795803",
"0.57881266",
"0.5678882",
"0.5... | 0.66889226 | 3 |
Perform a bit_set op with a random number of bytes. | def test_bit_set_bit_multiple_bytes(self):
value = bytearray()
value = bytearray()
rand_byte = random.randint(0, 255)
num_bytes = random.randint(1, 5)
for x in range(0, num_bytes):
value.append(rand_byte)
ops = [bitwise_operations.bit_set(self.test_bin_zeroes,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_set_bit_random_byte_random_offset(self):\n value = bytearray()\n rand_byte = random.randint(0, 255)\n value.append(rand_byte)\n rand_offset = random.randint(0, 4) * 8\n ops = [bitwise_operations.bit_set(self.test_bin_zeroes, rand_offset, 8, 1, value, None)]\n ... | [
"0.77750814",
"0.6959667",
"0.674012",
"0.66950464",
"0.6299832",
"0.6254417",
"0.61801815",
"0.611885",
"0.6047925",
"0.6023438",
"0.6009793",
"0.5964243",
"0.59179986",
"0.5877488",
"0.5867968",
"0.58303803",
"0.5787363",
"0.57502264",
"0.56951576",
"0.5691238",
"0.5686461"... | 0.76584923 | 1 |
' Perform a bit_set op with a bit offset that is larger than the bit_map being modified. | def test_bit_set_bit_index_out_of_range(self):
value = bytearray()
value.append(255)
ops = [bitwise_operations.bit_set(self.test_bin_zeroes, 41, 8, 1, value, None)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_bit(x, k):\n\n return x | (1 << k)",
"def setbit(self, key, offset, value):\n key = self._encode(key)\n index, bits, mask = self._get_bits_and_offset(key, offset)\n\n if index >= len(bits):\n bits.extend(b\"\\x00\" * (index + 1 - len(bits)))\n\n prev_val = 1 if (... | [
"0.6818344",
"0.6717861",
"0.6623272",
"0.6388839",
"0.6334515",
"0.6324545",
"0.6187075",
"0.6184176",
"0.61477",
"0.61284816",
"0.61269665",
"0.60442585",
"0.60281456",
"0.5958177",
"0.593757",
"0.5916329",
"0.59066445",
"0.58699304",
"0.58004355",
"0.5780619",
"0.5732328",... | 0.6449285 | 3 |
Perform a bit_set op with a value larger than the bit_map being modified. | def test_bit_set_bit_value_size_too_large(self):
value = bytearray()
for x in range(0, 5):
value.append(255)
ops = [bitwise_operations.bit_set(self.test_bin_zeroes, 0, 48, 6, value, None)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_bit(x, k):\n\n return x | (1 << k)",
"def setbit(self, key, offset, value):\n key = self._encode(key)\n index, bits, mask = self._get_bits_and_offset(key, offset)\n\n if index >= len(bits):\n bits.extend(b\"\\x00\" * (index + 1 - len(bits)))\n\n prev_val = 1 if (... | [
"0.6941478",
"0.6721615",
"0.6520868",
"0.65103495",
"0.6508883",
"0.64841413",
"0.6369438",
"0.62393576",
"0.6160469",
"0.61062336",
"0.60786474",
"0.6036452",
"0.6020244",
"0.59747124",
"0.5928422",
"0.5875835",
"0.5863233",
"0.5851287",
"0.5827314",
"0.57872456",
"0.578355... | 0.6376951 | 6 |
Perform a bit_set op with an bit size larger than the actual value. | def test_bit_set_bit_bit_size_too_large(self):
value = bytearray()
value.append(255)
ops = [bitwise_operations.bit_set(self.test_bin_zeroes, 0, 16, 1, value, None)]
with pytest.raises(e.InvalidRequest):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_set_bit_value_size_too_large(self):\n value = bytearray()\n for x in range(0, 5):\n value.append(255)\n ops = [bitwise_operations.bit_set(self.test_bin_zeroes, 0, 48, 6, value, None)]\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operat... | [
"0.77699894",
"0.6594298",
"0.6497174",
"0.6339704",
"0.6304334",
"0.6257113",
"0.6206651",
"0.620033",
"0.61832565",
"0.6174593",
"0.610813",
"0.61076254",
"0.6104633",
"0.60604364",
"0.6015046",
"0.5987889",
"0.5957026",
"0.59446806",
"0.59208137",
"0.5900072",
"0.58730924"... | 0.78068256 | 0 |
Perform a bit_set op with an unsupported float. | def test_bit_set_bit_invalid_arg_type(self):
value = 85323.9
ops = [bitwise_operations.bit_set(self.test_bin_zeroes, 0, 8, 1, value, None)]
with pytest.raises(e.ParamError):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _setFloatFeature(self, valueToSet):\n\n errorCode = VimbaDLL.featureFloatSet(self._handle,\n self._name,\n valueToSet)\n if errorCode != 0:\n raise VimbaException(errorCode)",
"def setFloat(self, ... | [
"0.6770153",
"0.6004491",
"0.58763963",
"0.57682735",
"0.5760419",
"0.55618626",
"0.55370873",
"0.54370934",
"0.54367065",
"0.5423097",
"0.54175943",
"0.538118",
"0.53563106",
"0.5343038",
"0.53324986",
"0.5331044",
"0.53261274",
"0.5292256",
"0.5281855",
"0.52734023",
"0.526... | 0.69059694 | 0 |
Perform a bit_set op with a non existent bin. | def test_bit_set_bit_bad_bin_name(self):
value = bytearray()
value.append(255)
ops = [bitwise_operations.bit_set("bad_name", 0, 8, 1, value, None)]
with pytest.raises(e.BinNotFound):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_set_bit_index_out_of_range(self):\n value = bytearray()\n value.append(255)\n ops = [bitwise_operations.bit_set(self.test_bin_zeroes, 41, 8, 1, value, None)]\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def test_b... | [
"0.7023662",
"0.7013182",
"0.6553143",
"0.6487933",
"0.64827436",
"0.64403266",
"0.6393664",
"0.6350938",
"0.6335981",
"0.6330965",
"0.62376326",
"0.6232921",
"0.6223009",
"0.621056",
"0.61761284",
"0.61017376",
"0.60678023",
"0.59541297",
"0.5921793",
"0.59187233",
"0.58331"... | 0.70514387 | 0 |
Perform a bitwise count op. | def test_bit_count_seven(self):
ops = [bitwise_operations.bit_count(self.count_bin, 20, 9)]
_, _, result = self.as_connection.operate(self.test_key, ops)
assert result["count"] == 7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_count_one(self):\n ops = [bitwise_operations.bit_count(self.zero_one_bin, 47, 8)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n assert result[\"bitwise01\"] == 1",
"def shitty_count_set_bits(num:int) -> int:\n count = 0\n while num != 0:\n coun... | [
"0.71469164",
"0.7065721",
"0.7011086",
"0.69618213",
"0.69151825",
"0.67142653",
"0.6712387",
"0.6662766",
"0.6643679",
"0.6571938",
"0.6570812",
"0.64751136",
"0.6398726",
"0.6366944",
"0.6325615",
"0.62976414",
"0.62906784",
"0.62676513",
"0.62547326",
"0.62028843",
"0.613... | 0.7423666 | 0 |
Perform a bitwise count op. | def test_bit_count_one(self):
ops = [bitwise_operations.bit_count(self.zero_one_bin, 47, 8)]
_, _, result = self.as_connection.operate(self.test_key, ops)
assert result["bitwise01"] == 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_count_seven(self):\n ops = [bitwise_operations.bit_count(self.count_bin, 20, 9)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n assert result[\"count\"] == 7",
"def shitty_count_set_bits(num:int) -> int:\n count = 0\n while num != 0:\n count += ... | [
"0.7423666",
"0.7065721",
"0.7011086",
"0.69618213",
"0.69151825",
"0.67142653",
"0.6712387",
"0.6662766",
"0.6643679",
"0.6571938",
"0.6570812",
"0.64751136",
"0.6398726",
"0.6366944",
"0.6325615",
"0.62976414",
"0.62906784",
"0.62676513",
"0.62547326",
"0.62028843",
"0.6131... | 0.71469164 | 1 |
Perform a bitwise count op. | def test_bit_count_random_bit_size(self):
bit_size = random.randint(1, 40)
ops = [bitwise_operations.bit_count(self.five_255_bin, 0, bit_size)]
_, _, result = self.as_connection.operate(self.test_key, ops)
assert result["255"] == bit_size | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_count_seven(self):\n ops = [bitwise_operations.bit_count(self.count_bin, 20, 9)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n assert result[\"count\"] == 7",
"def test_bit_count_one(self):\n ops = [bitwise_operations.bit_count(self.zero_one_bin, 47,... | [
"0.7423666",
"0.71469164",
"0.7065721",
"0.7011086",
"0.69618213",
"0.69151825",
"0.67142653",
"0.6712387",
"0.6662766",
"0.6643679",
"0.6571938",
"0.6570812",
"0.64751136",
"0.6366944",
"0.6325615",
"0.62976414",
"0.62906784",
"0.62676513",
"0.62547326",
"0.62028843",
"0.613... | 0.6398726 | 13 |
Attempts to perform a bitwise count op with bit_offset outside of the bitmap being counted. | def test_bit_count_bit_offset_out_of_range(self):
ops = [bitwise_operations.bit_count(self.zero_one_bin, 81, 1)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_count_bit_size_with_offset_too_large(self):\n ops = [bitwise_operations.bit_count(self.zero_one_bin, 40, 41)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def count_set_bits(bitmap):\n bmp = bitmap\n count = 0\n n = ... | [
"0.7564361",
"0.6940996",
"0.66964185",
"0.6547453",
"0.6341447",
"0.6273543",
"0.6123219",
"0.60676616",
"0.60630244",
"0.6039324",
"0.59491664",
"0.5912704",
"0.5888373",
"0.5875139",
"0.5827622",
"0.57833576",
"0.5767076",
"0.5763469",
"0.57452416",
"0.5737628",
"0.5720858... | 0.7624135 | 0 |
Attempts to perform a bitwise count op on more bits than exist. | def test_bit_count_bit_size_too_large(self):
ops = [bitwise_operations.bit_count(self.zero_one_bin, 1, 81)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_count_bit_size_with_offset_too_large(self):\n ops = [bitwise_operations.bit_count(self.zero_one_bin, 40, 41)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def shitty_count_set_bits(num:int) -> int:\n count = 0\n while n... | [
"0.7497445",
"0.7358652",
"0.7324532",
"0.7311619",
"0.7215626",
"0.71455824",
"0.7142483",
"0.6930695",
"0.69203246",
"0.6908501",
"0.6842946",
"0.68328786",
"0.67919254",
"0.67240614",
"0.66319263",
"0.66273886",
"0.6610012",
"0.6564041",
"0.6498201",
"0.64961916",
"0.64404... | 0.7900154 | 0 |
Attempts to perform a bitwise count past the bounds of the bitmap being counted. | def test_bit_count_bit_size_with_offset_too_large(self):
ops = [bitwise_operations.bit_count(self.zero_one_bin, 40, 41)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def count_set_bits(bitmap):\n bmp = bitmap\n count = 0\n n = 1\n while bmp > 0:\n if bmp & 1:\n count += 1\n bmp = bmp >> 1\n n = n + 1\n return count",
"def test_bit_count_bit_offset_out_of_range(self):\n ops = [bitwise_operations.bit_count(self.zero_one_bin... | [
"0.743492",
"0.6942616",
"0.6429072",
"0.64107084",
"0.6360836",
"0.6263134",
"0.6216795",
"0.6044595",
"0.5983795",
"0.59829783",
"0.59582686",
"0.59559685",
"0.59492075",
"0.5943464",
"0.5907332",
"0.5794506",
"0.5755097",
"0.57350147",
"0.5720648",
"0.56896055",
"0.5683464... | 0.6779903 | 2 |
Perform a bitwise add op. | def test_bit_add_simple(self):
ops = [bitwise_operations.bit_add(self.test_bin_ones, 0, 8, 1, False, aerospike.BIT_OVERFLOW_FAIL, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([2] * 1 + [1] * 4)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ff_add(a, b):\n return a ^ b",
"def add(num1,num2):\n if(num2==0):\n return num1\n return add((num1^num2),(num1&num2)<<1)",
"def add(self, a, b):\n return a + b",
"def plus(self, other):\n return self | other",
"def __add__(self, other):\n\n return self._binary_elementwise_... | [
"0.72715294",
"0.7098102",
"0.70803595",
"0.70718306",
"0.69956553",
"0.6975312",
"0.69086856",
"0.68694097",
"0.68667156",
"0.6845859",
"0.67594755",
"0.67444706",
"0.67444706",
"0.67444706",
"0.67444706",
"0.67444706",
"0.67444706",
"0.6738565",
"0.66684777",
"0.6663798",
"... | 0.71233565 | 1 |
Perform a bitwise add op with an offset that lands inbetween bytes. | def test_bit_add_inbetween_bytes(self):
ops = [bitwise_operations.bit_add(self.test_bin_zeroes, 4, 8, 255, False, aerospike.BIT_OVERFLOW_FAIL, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([15] * 1 +... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _uint8_add(self, a, b):\n return ((a & 0xFF) + (b & 0xFF)) & 0xFF",
"def add_binary(a, b):\n return bin(a + b)[2:]",
"def _add(a, b):\n\n # Todo: What if numbers have bigger length than 8\n a = _I2B(a, fixed_length=8)\n b = _I2B(b, fixed_length=8)\n return _B2I([i ^ j for i, j in zip(... | [
"0.6895345",
"0.64765716",
"0.6331206",
"0.6284761",
"0.61512357",
"0.61413187",
"0.6051106",
"0.59600806",
"0.59311205",
"0.5892663",
"0.588553",
"0.5865346",
"0.5851213",
"0.58214045",
"0.581817",
"0.5771626",
"0.570471",
"0.57009697",
"0.56927943",
"0.5666603",
"0.5655928"... | 0.67608523 | 1 |
Perform a bitwise add op with multiple bytes. | def test_bit_add_multiple_bytes(self):
ops = [bitwise_operations.bit_add(self.test_bin_zeroes, 8, 16, 65535, False, aerospike.BIT_OVERFLOW_FAIL, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([0] * 1 ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _add(a, b):\n\n # Todo: What if numbers have bigger length than 8\n a = _I2B(a, fixed_length=8)\n b = _I2B(b, fixed_length=8)\n return _B2I([i ^ j for i, j in zip(a, b)])",
"def _uint8_add(self, a, b):\n return ((a & 0xFF) + (b & 0xFF)) & 0xFF",
"def test_bit_add_inbetween_bytes(self):\n... | [
"0.72455776",
"0.698561",
"0.6880169",
"0.67817104",
"0.6642168",
"0.6629964",
"0.65817994",
"0.64933366",
"0.648726",
"0.6482742",
"0.64505666",
"0.64498633",
"0.6417345",
"0.63390696",
"0.62232685",
"0.62040883",
"0.61814713",
"0.61686695",
"0.61275816",
"0.6070808",
"0.606... | 0.749226 | 0 |
Perform a bitwise add op on a nonexistent bin. | def test_bit_add_bad_bin_name(self):
ops = [bitwise_operations.bit_add("bad_name", 8, 16, 65535, False, aerospike.BIT_OVERFLOW_FAIL, None)]
with pytest.raises(e.BinNotFound):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_insert_nonexistent_bin_name(self):\n value = bytearray([3])\n ops = [bitwise_operations.bit_insert(\"bad_name\", 0, 1, value, None)]\n\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_result = bytearra... | [
"0.6802543",
"0.6767682",
"0.67084956",
"0.6646982",
"0.6610624",
"0.6578335",
"0.65743756",
"0.6384216",
"0.63737106",
"0.6267375",
"0.62592363",
"0.61435515",
"0.5965178",
"0.594939",
"0.5888015",
"0.583687",
"0.583003",
"0.5779049",
"0.57335335",
"0.57301044",
"0.56188434"... | 0.76569134 | 0 |
Perform a bitwise add op with a bit_offset that is out of range for the bitmap being modified. | def test_bit_add_bit_offset_out_of_range(self):
ops = [bitwise_operations.bit_add(self.test_bin_zeroes, 41, 1, 1, False, aerospike.BIT_OVERFLOW_FAIL, None)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_add_bit_size_out_of_range(self):\n ops = [bitwise_operations.bit_add(self.test_bin_zeroes, 0, 41, 1, False, aerospike.BIT_OVERFLOW_FAIL, None)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_add_overflow_fail(self)... | [
"0.65838915",
"0.64080894",
"0.6319045",
"0.62099093",
"0.61947215",
"0.6159893",
"0.6152461",
"0.6120678",
"0.6107185",
"0.5956836",
"0.58519316",
"0.58213335",
"0.5794799",
"0.5746909",
"0.5732208",
"0.56775117",
"0.56739074",
"0.5650088",
"0.5588641",
"0.5560465",
"0.55446... | 0.73627174 | 0 |
Perform a bitwise add op with a bit size too large for the bitmap being modified. | def test_bit_add_bit_size_out_of_range(self):
ops = [bitwise_operations.bit_add(self.test_bin_zeroes, 0, 41, 1, False, aerospike.BIT_OVERFLOW_FAIL, None)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_add_bit_size_signed(self):\n ops = [bitwise_operations.bit_add(self.five_255_bin, 0, 8, 254, True, aerospike.BIT_OVERFLOW_WRAP, None)]\n\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_result = bytearray([25... | [
"0.6542242",
"0.64941835",
"0.62195337",
"0.61419046",
"0.61222196",
"0.6112536",
"0.6070879",
"0.6046138",
"0.59929603",
"0.5990503",
"0.597197",
"0.59605044",
"0.590751",
"0.5876018",
"0.5792255",
"0.57701886",
"0.5666809",
"0.56660813",
"0.56307065",
"0.5619407",
"0.561452... | 0.66088796 | 0 |
Perform a bitwise add op subtraction. | def test_bit_add_bit_size_signed(self):
ops = [bitwise_operations.bit_add(self.five_255_bin, 0, 8, 254, True, aerospike.BIT_OVERFLOW_WRAP, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([253] * 1 + [2... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ff_add(a, b):\n return a ^ b",
"def __add__(self, tc): \n tc = TwosComplement(tc)\n bits = self.len if self.len > tc.len else tc.len \n result = self.int + tc.int\n return TwosComplement(result, bits)",
"def plus(self, other):\n return self | other",
"def subtract(self, other):\n... | [
"0.7376534",
"0.687527",
"0.6717175",
"0.66653",
"0.6615761",
"0.6604166",
"0.64860994",
"0.6468908",
"0.64633477",
"0.64633477",
"0.64028156",
"0.64028156",
"0.6377342",
"0.6358752",
"0.6314682",
"0.6313187",
"0.6297355",
"0.6297355",
"0.6281229",
"0.6281229",
"0.6281229",
... | 0.0 | -1 |
Perform a bitwise add op that overflows with the BIT_OVERFLOW_FAIL action. | def test_bit_add_overflow_fail(self):
ops = [bitwise_operations.bit_add(self.five_255_bin, 0, 8, 1, False, aerospike.BIT_OVERFLOW_FAIL, None)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_add_bit_offset_out_of_range(self):\n ops = [bitwise_operations.bit_add(self.test_bin_zeroes, 41, 1, 1, False, aerospike.BIT_OVERFLOW_FAIL, None)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_add_bit_size_out_of_r... | [
"0.7437843",
"0.7397968",
"0.6988565",
"0.6652772",
"0.65746254",
"0.65476197",
"0.63244146",
"0.63017803",
"0.62115306",
"0.6129045",
"0.6089315",
"0.60318506",
"0.6009601",
"0.5929405",
"0.5805147",
"0.578539",
"0.5765352",
"0.5743154",
"0.5705865",
"0.5704055",
"0.5703668"... | 0.8252985 | 0 |
Perform a bitwise add op that overflows with the BIT_OVERFLOW_SATURATE action. | def test_bit_add_overflow_saturate(self):
ops = [bitwise_operations.bit_add(self.five_255_bin, 0, 8, 1, False, aerospike.BIT_OVERFLOW_SATURATE, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([255] * 5... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_add_overflow_fail(self):\n ops = [bitwise_operations.bit_add(self.five_255_bin, 0, 8, 1, False, aerospike.BIT_OVERFLOW_FAIL, None)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_add_overflow_wrap(self):\n o... | [
"0.7303214",
"0.70369244",
"0.6906154",
"0.6778493",
"0.6674004",
"0.64422286",
"0.633672",
"0.6162586",
"0.6078986",
"0.5818981",
"0.5817478",
"0.57848686",
"0.5755819",
"0.57219166",
"0.57161057",
"0.5714408",
"0.5697552",
"0.5672356",
"0.5642903",
"0.5629903",
"0.56281734"... | 0.72117203 | 1 |
Perform a bitwise add op that overflows with the BIT_OVERFLOW_WRAP action. | def test_bit_add_overflow_wrap(self):
ops = [bitwise_operations.bit_add(self.five_255_bin, 0, 8, 1, False, aerospike.BIT_OVERFLOW_WRAP, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([0] * 1 + [255] *... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_add_overflow_fail(self):\n ops = [bitwise_operations.bit_add(self.five_255_bin, 0, 8, 1, False, aerospike.BIT_OVERFLOW_FAIL, None)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_add_bit_size_out_of_range(self):\n ... | [
"0.69865286",
"0.63499284",
"0.6259732",
"0.6231338",
"0.6189133",
"0.6175745",
"0.61683786",
"0.609293",
"0.6042137",
"0.6023715",
"0.5987507",
"0.5873115",
"0.58514667",
"0.58116734",
"0.57713294",
"0.574729",
"0.5737004",
"0.5733803",
"0.56554",
"0.5628457",
"0.5598145",
... | 0.74974084 | 0 |
Perform a bitwise and op. | def test_bit_and(self):
value = bytearray()
value.append(0)
ops = [bitwise_operations.bit_and(self.five_255_bin, 0, 8, 1, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([0] * 1 ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bitwise_and(lhs, rhs):\n return _make.bitwise_and(lhs, rhs)",
"def bitwise_and(self):\n register = self.return_middle_registers(self.opcode)\n self.registers[register[0]] = (\n self.registers[register[0]] & self.registers[register[1]])\n logger.info(\"Bitwise AND on V{} and... | [
"0.8060499",
"0.77903277",
"0.75877637",
"0.74885464",
"0.7331385",
"0.73117656",
"0.7261312",
"0.71713537",
"0.71693826",
"0.71593106",
"0.7090647",
"0.7055091",
"0.70203954",
"0.6987084",
"0.698619",
"0.69778544",
"0.69525534",
"0.689782",
"0.6856866",
"0.67268467",
"0.6656... | 0.722798 | 7 |
Perform a bitwise and op with a bit_offset that causes the op to span bytes. | def test_bit_and_across_bytes(self):
value = bytearray()
value.append(0)
ops = [bitwise_operations.bit_and(self.five_255_bin, 7, 8, 1, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytea... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bitwise_and(self):\n register = self.return_middle_registers(self.opcode)\n self.registers[register[0]] = (\n self.registers[register[0]] & self.registers[register[1]])\n logger.info(\"Bitwise AND on V{} and V{} for {}\".format(\n register[0],\n register[1]... | [
"0.67278296",
"0.6601513",
"0.6493982",
"0.6487539",
"0.6458772",
"0.636276",
"0.63350177",
"0.62491703",
"0.60443425",
"0.6029322",
"0.60152256",
"0.5841705",
"0.577113",
"0.57104987",
"0.5693757",
"0.5677533",
"0.56595224",
"0.5611767",
"0.55868155",
"0.55837893",
"0.555938... | 0.64243233 | 5 |
Perform a bitwise and op with value large enough to span multiple bytes. | def test_bit_and_multiple_bytes(self):
value = bytearray()
value.append(1)
value.append(1)
value.append(1)
ops = [bitwise_operations.bit_and(self.five_255_bin, 8, 17, 3, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_and_across_bytes(self):\n value = bytearray()\n value.append(0)\n ops = [bitwise_operations.bit_and(self.five_255_bin, 7, 8, 1, value, None)]\n\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_r... | [
"0.7053533",
"0.68397754",
"0.6709027",
"0.66512394",
"0.6600164",
"0.6542796",
"0.6499277",
"0.62920785",
"0.6157668",
"0.6039458",
"0.60247964",
"0.59498256",
"0.59160185",
"0.5909005",
"0.58582497",
"0.5846487",
"0.5832019",
"0.5819976",
"0.5740326",
"0.57323074",
"0.56576... | 0.7077078 | 0 |
Perform a bitwise and op with a bit_offset outside of the bitmap being modified. | def test_bit_and_offset_out_of_range(self):
value = bytearray()
value.append(0)
ops = [bitwise_operations.bit_and(self.five_255_bin, 41, 8, 1, value, None)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _andReg(address, mask):\n _setReg(address, _getReg(address)&mask)",
"def bitwise_and(self):\n register = self.return_middle_registers(self.opcode)\n self.registers[register[0]] = (\n self.registers[register[0]] & self.registers[register[1]])\n logger.info(\"Bitwise AND on V... | [
"0.66376716",
"0.6624657",
"0.6442088",
"0.6432489",
"0.6421518",
"0.62625366",
"0.6223211",
"0.6194098",
"0.6131339",
"0.60129166",
"0.5928669",
"0.59216756",
"0.5759451",
"0.57035846",
"0.5651803",
"0.5614622",
"0.5557433",
"0.5527158",
"0.5521088",
"0.5443505",
"0.54388785... | 0.6362888 | 5 |
Perform a bitwise and op with a bit_size > the size of value. | def test_bit_and_offset_bit_size_larger_than_val(self):
value = bytearray()
value.append(0)
ops = [bitwise_operations.bit_and(self.five_255_bin, 0, 16, 1, value, None)]
with pytest.raises(e.InvalidRequest):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_and_offset_value_byte_size_too_large(self):\n value = bytearray()\n for x in range(0, 5):\n value.append(0)\n ops = [bitwise_operations.bit_and(self.five_255_bin, 0, 48, 6, value, None)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.o... | [
"0.66505015",
"0.6267172",
"0.6213419",
"0.61219025",
"0.6011456",
"0.5915263",
"0.58221704",
"0.5815698",
"0.579385",
"0.5749901",
"0.57298887",
"0.5679415",
"0.5606196",
"0.5568124",
"0.5551867",
"0.5548409",
"0.5525523",
"0.5524242",
"0.5467059",
"0.5379395",
"0.53744006",... | 0.7103795 | 0 |
Perform a bitwise and op with a value_byte_size larger than the bitmap being modified. | def test_bit_and_offset_value_byte_size_too_large(self):
value = bytearray()
for x in range(0, 5):
value.append(0)
ops = [bitwise_operations.bit_and(self.five_255_bin, 0, 48, 6, value, None)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_and_offset_bit_size_larger_than_val(self):\n value = bytearray()\n value.append(0)\n ops = [bitwise_operations.bit_and(self.five_255_bin, 0, 16, 1, value, None)]\n\n with pytest.raises(e.InvalidRequest):\n self.as_connection.operate(self.test_key, ops)",
"def t... | [
"0.68500006",
"0.6666652",
"0.64749104",
"0.6296524",
"0.6243885",
"0.58637655",
"0.58447677",
"0.5794284",
"0.5770545",
"0.5637839",
"0.56156445",
"0.5608388",
"0.5604958",
"0.5556106",
"0.5555062",
"0.55270344",
"0.5524201",
"0.551075",
"0.55024546",
"0.5488388",
"0.5476835... | 0.6712595 | 1 |
Perform a bitwise and op with a non existent bin name. | def test_bit_and_invalid_bin_name(self):
value = bytearray()
value.append(0)
ops = [bitwise_operations.bit_and("bad_name", 0, 8, 1, value, None)]
with pytest.raises(e.BinNotFound):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_and(self):\n value = bytearray()\n value.append(0)\n ops = [bitwise_operations.bit_and(self.five_255_bin, 0, 8, 1, value, None)]\n\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_result = bytea... | [
"0.6510834",
"0.6441707",
"0.6261121",
"0.62495655",
"0.62354034",
"0.6178037",
"0.6170451",
"0.6150072",
"0.61430025",
"0.61324114",
"0.60920554",
"0.6063773",
"0.6020918",
"0.5954678",
"0.58549696",
"0.5835591",
"0.58223265",
"0.57884556",
"0.57821554",
"0.570214",
"0.56394... | 0.762801 | 0 |
Perform a bitwise and op with a non existent bin name. | def test_bit_and_invalid_value(self):
ops = [bitwise_operations.bit_and("bad_name", 0, 8, 1, 1.5, None)]
with pytest.raises(e.ParamError):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_and_invalid_bin_name(self):\n value = bytearray()\n value.append(0)\n ops = [bitwise_operations.bit_and(\"bad_name\", 0, 8, 1, value, None)]\n\n with pytest.raises(e.BinNotFound):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_and(self):\n ... | [
"0.762801",
"0.6510834",
"0.6441707",
"0.6261121",
"0.62495655",
"0.62354034",
"0.6170451",
"0.6150072",
"0.61430025",
"0.61324114",
"0.60920554",
"0.6063773",
"0.6020918",
"0.5954678",
"0.58549696",
"0.5835591",
"0.58223265",
"0.57884556",
"0.57821554",
"0.570214",
"0.563948... | 0.6178037 | 6 |
Perform a bitwise get op. | def test_bit_get(self):
ops = [bitwise_operations.bit_get(self.five_255_bin, 0, 8)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = bytearray([255] * 1)
assert result["255"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_accross_bytes(self):\n ops = [bitwise_operations.bit_get(self.test_bin_ones, 4, 8)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n\n expected_result = bytearray([16] * 1)\n assert result[\"bitwise1\"] == expected_result",
"def bit_get(val, idx):\n... | [
"0.7000506",
"0.6605296",
"0.6504855",
"0.6378649",
"0.62414247",
"0.61625886",
"0.6146228",
"0.61241513",
"0.610408",
"0.6011124",
"0.5796253",
"0.57583314",
"0.57545096",
"0.56891155",
"0.5669531",
"0.56524837",
"0.5637581",
"0.56328243",
"0.5563451",
"0.55194074",
"0.55118... | 0.6793469 | 1 |
Perform a bitwise get op with a negative offset. | def test_bit_get_negative_offset(self):
ops = [bitwise_operations.bit_get(self.count_bin, -2, 2)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = bytearray([192] * 1)
assert result[self.count_bin] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_bit_offset_out_of_range(self):\n ops = [bitwise_operations.bit_get(self.test_bin_ones, 41, 1)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_subtract_bit_offset_out_of_range(self):\n ops = [\n ... | [
"0.6487363",
"0.63536626",
"0.6093398",
"0.60396236",
"0.5953041",
"0.58536357",
"0.5741644",
"0.56206924",
"0.55487245",
"0.54852706",
"0.54610914",
"0.5309807",
"0.5308505",
"0.5308271",
"0.52730584",
"0.5258959",
"0.5250486",
"0.5231087",
"0.5225644",
"0.5214675",
"0.52085... | 0.7575732 | 0 |
Perform a bitwise get op across bytes. | def test_bit_get_accross_bytes(self):
ops = [bitwise_operations.bit_get(self.test_bin_ones, 4, 8)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = bytearray([16] * 1)
assert result["bitwise1"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_int_accross_bytes(self):\n ops = [bitwise_operations.bit_get_int(self.test_bin_ones, 4, 8, False)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n\n expected_result = 16\n assert result[\"bitwise1\"] == expected_result",
"def test_bit_get_multiple_... | [
"0.7051059",
"0.6728604",
"0.66430426",
"0.6132444",
"0.6119449",
"0.60101527",
"0.5942671",
"0.5909405",
"0.5893895",
"0.5889837",
"0.5881569",
"0.5854613",
"0.5784683",
"0.57692033",
"0.57260805",
"0.5660203",
"0.565209",
"0.56341773",
"0.5623387",
"0.56132615",
"0.5611499"... | 0.75417405 | 0 |
Perform a bitwise get op on a portion of a byte. | def test_bit_get_fraction_of_byte(self):
ops = [bitwise_operations.bit_get(self.five_255_bin, 4, 2)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = bytearray([192] * 1)
assert result["255"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_bit(byte, ii):\n return (byte >> (7 - ii)) & 1",
"def get_bit(byte, bit_num):\n return (byte & (1 << bit_num)) >> bit_num",
"def test_bit_get_accross_bytes(self):\n ops = [bitwise_operations.bit_get(self.test_bin_ones, 4, 8)]\n\n _, _, result = self.as_connection.operate(self.test_... | [
"0.68254906",
"0.6813285",
"0.6397741",
"0.6231134",
"0.62173146",
"0.6204628",
"0.6165824",
"0.60934263",
"0.60277766",
"0.59888136",
"0.5967335",
"0.59547496",
"0.59462345",
"0.5927421",
"0.5918271",
"0.58861846",
"0.58592653",
"0.5838132",
"0.5797022",
"0.5775821",
"0.5766... | 0.6263899 | 3 |
Perform a bitwise get op across multiple bytes. | def test_bit_get_multiple_bytes(self):
ops = [bitwise_operations.bit_get(self.five_255_bin, 4, 17)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = bytearray([255] * 2 + [128] * 1)
assert result["255"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_accross_bytes(self):\n ops = [bitwise_operations.bit_get(self.test_bin_ones, 4, 8)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n\n expected_result = bytearray([16] * 1)\n assert result[\"bitwise1\"] == expected_result",
"def test_bit_get_int_acc... | [
"0.7147852",
"0.66116863",
"0.652621",
"0.6177915",
"0.5853398",
"0.57564133",
"0.5710771",
"0.56699646",
"0.5662459",
"0.56446254",
"0.55893993",
"0.55710304",
"0.55414647",
"0.55307996",
"0.55051976",
"0.5418046",
"0.5379218",
"0.5309492",
"0.5307577",
"0.5278677",
"0.52720... | 0.715834 | 0 |
Perform a bitwise get with a bitoffset outside of the bitmap being read. | def test_bit_get_bit_offset_out_of_range(self):
ops = [bitwise_operations.bit_get(self.test_bin_ones, 41, 1)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getBits(data, offset, bits=1):\n mask = ((1 << bits) - 1) << offset\n return (data & mask) >> offset",
"def test_bit_get_negative_offset(self):\n ops = [bitwise_operations.bit_get(self.count_bin, -2, 2)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n\n expected... | [
"0.69718194",
"0.6787689",
"0.6609722",
"0.6395161",
"0.6250021",
"0.62303054",
"0.61621445",
"0.61065793",
"0.5978389",
"0.59126186",
"0.5906812",
"0.58134305",
"0.58063304",
"0.57871896",
"0.578104",
"0.5777602",
"0.5768953",
"0.5746866",
"0.57230514",
"0.5659011",
"0.56438... | 0.65269274 | 3 |
Perform a bitwise get with a bit_size larger than the bitmap being read. | def test_bit_get_bit_size_too_large(self):
ops = [bitwise_operations.bit_get(self.test_bin_ones, 0, 41)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_int_bit_size_too_large(self):\n ops = [bitwise_operations.bit_get_int(self.test_bin_ones, 0, 41, False)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_get(self):\n ops = [bitwise_operations.bit_get(self... | [
"0.62875754",
"0.6210807",
"0.6210594",
"0.6104591",
"0.60731876",
"0.60564893",
"0.5981193",
"0.5877708",
"0.5841703",
"0.5830928",
"0.5824218",
"0.58029646",
"0.5789045",
"0.5782011",
"0.5763841",
"0.5663442",
"0.5663405",
"0.566137",
"0.5659523",
"0.56565785",
"0.56256235"... | 0.6607144 | 0 |
Perform a bitwise get with a non existent bin. | def test_bit_get_bad_bin_name(self):
ops = [bitwise_operations.bit_get("bad_name", 0, 1)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = None
assert result["bad_name"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_negative_offset(self):\n ops = [bitwise_operations.bit_get(self.count_bin, -2, 2)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n\n expected_result = bytearray([192] * 1)\n assert result[self.count_bin] == expected_result",
"def test_bit_get_int_b... | [
"0.65858793",
"0.64688575",
"0.6412785",
"0.6410566",
"0.637989",
"0.6376321",
"0.63263226",
"0.6301394",
"0.6280836",
"0.62782186",
"0.6134096",
"0.61190915",
"0.6102165",
"0.6091341",
"0.6078036",
"0.60745895",
"0.59728205",
"0.5969861",
"0.5958944",
"0.58879626",
"0.584863... | 0.6674132 | 0 |
Perform a bitwise get with a float for bit_size. | def test_bit_get_bad_argument_type(self):
ops = [bitwise_operations.bit_get(self.test_bin_ones, 0, 1.5)]
with pytest.raises(e.ParamError):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def int_to_float(num_bits: int, value: int) -> float:\n if num_bits == 32:\n unpack_fmt = '>f'\n elif num_bits == 64:\n unpack_fmt = '>d'\n else:\n raise Exception(f\"Unhandled bit size: {num_bits}\")\n\n return struct.unpack(unpack_fmt, value.to_bytes(num_bits // 8, 'big'))[0]",
... | [
"0.58425474",
"0.5800724",
"0.57809025",
"0.5771135",
"0.57547146",
"0.5654831",
"0.56457865",
"0.56189376",
"0.55750287",
"0.55361724",
"0.5523597",
"0.5519141",
"0.5513364",
"0.5500282",
"0.5458632",
"0.54378843",
"0.54137486",
"0.54030216",
"0.5386185",
"0.5371822",
"0.537... | 0.0 | -1 |
Perform a bitwise get int op. | def test_bit_get_int(self):
ops = [bitwise_operations.bit_get_int(self.five_255_bin, 0, 8, False)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = 255
assert result["255"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_int_accross_bytes(self):\n ops = [bitwise_operations.bit_get_int(self.test_bin_ones, 4, 8, False)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n\n expected_result = 16\n assert result[\"bitwise1\"] == expected_result",
"def bitget(x, n):\n ret... | [
"0.7102906",
"0.6779233",
"0.66473794",
"0.6560103",
"0.65105355",
"0.643833",
"0.63135123",
"0.6293292",
"0.62082666",
"0.6207934",
"0.6200382",
"0.6193435",
"0.6190294",
"0.61502796",
"0.6123102",
"0.61018723",
"0.60295856",
"0.6009847",
"0.5998483",
"0.597783",
"0.59735185... | 0.72884405 | 0 |
Perform a bitwise get int op across bytes. | def test_bit_get_int_accross_bytes(self):
ops = [bitwise_operations.bit_get_int(self.test_bin_ones, 4, 8, False)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = 16
assert result["bitwise1"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_int_multiple_bytes(self):\n ops = [bitwise_operations.bit_get_int(self.five_255_bin, 4, 17, False)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n\n expected_result = 131071\n assert result[\"255\"] == expected_result",
"def getint(data, offset, i... | [
"0.71205246",
"0.70693725",
"0.69792545",
"0.6811776",
"0.66377413",
"0.66353595",
"0.6517587",
"0.6409903",
"0.6406056",
"0.62259734",
"0.61921054",
"0.6164331",
"0.61605984",
"0.6147947",
"0.6147531",
"0.6143852",
"0.6137119",
"0.6134667",
"0.60648817",
"0.60472596",
"0.602... | 0.7891104 | 0 |
Perform a bitwise get op on a portion of a byte. | def test_bit_get_int_fraction_of_byte(self):
ops = [bitwise_operations.bit_get_int(self.five_255_bin, 4, 2, False)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = 3
assert result["255"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_bit(byte, ii):\n return (byte >> (7 - ii)) & 1",
"def get_bit(byte, bit_num):\n return (byte & (1 << bit_num)) >> bit_num",
"def test_bit_get_accross_bytes(self):\n ops = [bitwise_operations.bit_get(self.test_bin_ones, 4, 8)]\n\n _, _, result = self.as_connection.operate(self.test_... | [
"0.68254906",
"0.6813285",
"0.6397741",
"0.6263899",
"0.6231134",
"0.62173146",
"0.6204628",
"0.6165824",
"0.60934263",
"0.60277766",
"0.59888136",
"0.59547496",
"0.59462345",
"0.5927421",
"0.5918271",
"0.58861846",
"0.58592653",
"0.5838132",
"0.5797022",
"0.5775821",
"0.5766... | 0.5967335 | 11 |
Perform a bitwise get int op across multiple bytes. | def test_bit_get_int_multiple_bytes(self):
ops = [bitwise_operations.bit_get_int(self.five_255_bin, 4, 17, False)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = 131071
assert result["255"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_int_accross_bytes(self):\n ops = [bitwise_operations.bit_get_int(self.test_bin_ones, 4, 8, False)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n\n expected_result = 16\n assert result[\"bitwise1\"] == expected_result",
"def getint(data, offset, i... | [
"0.75471073",
"0.678968",
"0.65833163",
"0.6527488",
"0.6496764",
"0.63625884",
"0.6067101",
"0.59414285",
"0.5925806",
"0.5871448",
"0.58513236",
"0.5844034",
"0.5837902",
"0.5762377",
"0.5762377",
"0.57595783",
"0.5753502",
"0.56997323",
"0.568903",
"0.5688321",
"0.5682894"... | 0.75146616 | 1 |
Perform a bitwise get int with a bitoffset outside of the bitmap being read. | def test_bit_get_int_bit_offset_out_of_range(self):
ops = [bitwise_operations.bit_get_int(self.test_bin_ones, 41, 1, False)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getint(data, offset, intsize):\n value = 0\n while intsize > 0:\n value = (value << 8) + data[offset]\n offset += 1\n intsize -= 1\n return value, offset",
"def test_bit_get_negative_offset(self):\n ops = [bitwise_operations.bit_get(self.count_bin, -2, 2)]\n\n _, _, result = self.as... | [
"0.69530636",
"0.68696845",
"0.6744256",
"0.6715979",
"0.6686076",
"0.6678834",
"0.658077",
"0.6520548",
"0.64768475",
"0.6442151",
"0.6440651",
"0.64269996",
"0.64169",
"0.6371402",
"0.63414425",
"0.6338216",
"0.628922",
"0.6260872",
"0.62430835",
"0.62236047",
"0.6111585",
... | 0.6749863 | 2 |
Perform a bitwise get int with a bit_size larger than the bitmap being read. | def test_bit_get_int_bit_size_too_large(self):
ops = [bitwise_operations.bit_get_int(self.test_bin_ones, 0, 41, False)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_int(self):\n ops = [bitwise_operations.bit_get_int(self.five_255_bin, 0, 8, False)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n\n expected_result = 255\n assert result[\"255\"] == expected_result",
"def test_bit_get_int_accross_bytes(self):\n ... | [
"0.68701124",
"0.68527347",
"0.6686685",
"0.6607664",
"0.6548053",
"0.6484254",
"0.6442532",
"0.6422704",
"0.6400369",
"0.6389926",
"0.6377081",
"0.6276066",
"0.6234731",
"0.6165739",
"0.6152089",
"0.6149299",
"0.6145901",
"0.61367106",
"0.60860854",
"0.5989236",
"0.598441",
... | 0.70119935 | 0 |
Perform a bitwise get int with a non existent bin. | def test_bit_get_int_bad_bin_name(self):
ops = [bitwise_operations.bit_get_int("bad_name", 0, 1, False)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = None
assert result["bad_name"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_int_bit_offset_out_of_range(self):\n ops = [bitwise_operations.bit_get_int(self.test_bin_ones, 41, 1, False)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_get_int(self):\n ops = [bitwise_operations.bit... | [
"0.68968886",
"0.6857468",
"0.68533355",
"0.68428135",
"0.6705383",
"0.6699011",
"0.66411746",
"0.6584767",
"0.653747",
"0.6482261",
"0.64085853",
"0.63871723",
"0.6319492",
"0.62878746",
"0.6219894",
"0.6219642",
"0.62002337",
"0.617679",
"0.6154327",
"0.6143334",
"0.6107491... | 0.64801353 | 10 |
Perform a bitwise get int with a float for bit_size. | def test_bit_get_int_bad_argument_type(self):
ops = [bitwise_operations.bit_get_int(self.test_bin_ones, 0, 1.5, False)]
with pytest.raises(e.ParamError):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def int_to_float(num_bits: int, value: int) -> float:\n if num_bits == 32:\n unpack_fmt = '>f'\n elif num_bits == 64:\n unpack_fmt = '>d'\n else:\n raise Exception(f\"Unhandled bit size: {num_bits}\")\n\n return struct.unpack(unpack_fmt, value.to_bytes(num_bits // 8, 'big'))[0]",
... | [
"0.6282031",
"0.62255764",
"0.61155313",
"0.6099737",
"0.60092103",
"0.59017307",
"0.58963114",
"0.5862443",
"0.5786344",
"0.5757085",
"0.57533264",
"0.57518935",
"0.5673248",
"0.56532824",
"0.56458986",
"0.5634913",
"0.56237686",
"0.5585483",
"0.5575712",
"0.55135816",
"0.54... | 0.4976141 | 95 |
Perform a bitwise get int op with sign true. | def test_bit_get_int_signed(self):
ops = [bitwise_operations.bit_get_int(self.five_255_bin, 0, 8, True)]
_, _, result = self.as_connection.operate(self.test_key, ops)
expected_result = -1
assert result["255"] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_get_int(self):\n ops = [bitwise_operations.bit_get_int(self.five_255_bin, 0, 8, False)]\n\n _, _, result = self.as_connection.operate(self.test_key, ops)\n\n expected_result = 255\n assert result[\"255\"] == expected_result",
"def _get_bit(self, num, bit, mask=1):\n re... | [
"0.6509758",
"0.63602674",
"0.6266089",
"0.62134486",
"0.6150972",
"0.60837835",
"0.5986445",
"0.5969886",
"0.5921053",
"0.5897795",
"0.5893982",
"0.5842662",
"0.5799386",
"0.57741714",
"0.57586473",
"0.5749016",
"0.5726743",
"0.5701007",
"0.56617063",
"0.56174797",
"0.561278... | 0.7207223 | 0 |
Perform a bitwise insert op. | def test_bit_insert(self):
value = bytearray([3])
ops = [bitwise_operations.bit_insert(self.test_bin_zeroes, 0, 1, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([3] * 1 + [0] * 5)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _insert_op(self, op):",
"def test_bit_insert_multiple_bytes_with_offset(self):\n value = bytearray([3] * 3)\n ops = [bitwise_operations.bit_insert(self.test_bin_zeroes, 2, 3, value, None)]\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(sel... | [
"0.71780396",
"0.658312",
"0.65635574",
"0.63127637",
"0.6227794",
"0.61238205",
"0.6090394",
"0.59877443",
"0.5869586",
"0.58213556",
"0.57300776",
"0.56653476",
"0.5499907",
"0.5486901",
"0.54348606",
"0.5416248",
"0.53926224",
"0.5384943",
"0.53558993",
"0.5337077",
"0.533... | 0.7138453 | 1 |
Perform a bitwise insert op. | def test_bit_insert_multiple_bytes(self):
value = bytearray([3] * 3)
ops = [bitwise_operations.bit_insert(self.test_bin_zeroes, 0, 3, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([3] *... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _insert_op(self, op):",
"def test_bit_insert(self):\n value = bytearray([3])\n ops = [bitwise_operations.bit_insert(self.test_bin_zeroes, 0, 1, value, None)]\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_r... | [
"0.71780396",
"0.7138453",
"0.658312",
"0.63127637",
"0.6227794",
"0.61238205",
"0.6090394",
"0.59877443",
"0.5869586",
"0.58213556",
"0.57300776",
"0.56653476",
"0.5499907",
"0.5486901",
"0.54348606",
"0.5416248",
"0.53926224",
"0.5384943",
"0.53558993",
"0.5337077",
"0.5335... | 0.65635574 | 3 |
Perform a bitwise insert op with multiple bytes and a non 0 offset. | def test_bit_insert_multiple_bytes_with_offset(self):
value = bytearray([3] * 3)
ops = [bitwise_operations.bit_insert(self.test_bin_zeroes, 2, 3, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = byt... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_insert_multiple_bytes(self):\n value = bytearray([3] * 3)\n ops = [bitwise_operations.bit_insert(self.test_bin_zeroes, 0, 3, value, None)]\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_result = byte... | [
"0.7038556",
"0.65061796",
"0.64552087",
"0.6403019",
"0.60924107",
"0.60375494",
"0.6032577",
"0.5855531",
"0.5665722",
"0.5656832",
"0.55806595",
"0.5539267",
"0.54879755",
"0.54079443",
"0.5370666",
"0.53351605",
"0.53261304",
"0.52470505",
"0.51999",
"0.5158822",
"0.51491... | 0.7592493 | 0 |
Perform a bitwise insert op where byte_offset is out of range for the bitmap being modified. Places 0 untill proper offset is reached. | def test_bit_insert_offset_out_of_range(self):
value = bytearray([3])
ops = [bitwise_operations.bit_insert(self.five_255_bin, 9, 1, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([255] ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_insert_multiple_bytes_with_offset(self):\n value = bytearray([3] * 3)\n ops = [bitwise_operations.bit_insert(self.test_bin_zeroes, 2, 3, value, None)]\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_r... | [
"0.6690235",
"0.60884166",
"0.60283166",
"0.5965435",
"0.58556616",
"0.5721447",
"0.5667663",
"0.5619984",
"0.55654263",
"0.55636644",
"0.5560772",
"0.55084085",
"0.5501264",
"0.5473809",
"0.54536104",
"0.53604025",
"0.5360399",
"0.5353372",
"0.535322",
"0.52948534",
"0.52939... | 0.7140981 | 0 |
Perform a bitwise insert op where value_byte_size is larger than the bitmap being modified. | def test_bit_insert_value_byte_size_too_large(self):
value = bytearray([3] * 6)
ops = [bitwise_operations.bit_insert(self.five_255_bin, 0, 6, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytear... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_insert_value_byte_size_smaller_than_value(self):\n value = bytearray([3] * 6)\n ops = [bitwise_operations.bit_insert(self.five_255_bin, 0, 2, value, None)]\n\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n exp... | [
"0.769737",
"0.6404579",
"0.6023742",
"0.59848",
"0.5913847",
"0.5910126",
"0.5844481",
"0.5764318",
"0.5716509",
"0.5664945",
"0.56231964",
"0.55951345",
"0.5508419",
"0.54928094",
"0.54876983",
"0.5483207",
"0.54789144",
"0.5427363",
"0.5410783",
"0.53932405",
"0.53805816",... | 0.7693409 | 1 |
Perform a bitwise insert op where value_byte_size is smaller than the bitmap being modified. | def test_bit_insert_value_byte_size_smaller_than_value(self):
value = bytearray([3] * 6)
ops = [bitwise_operations.bit_insert(self.five_255_bin, 0, 2, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_insert_value_byte_size_too_large(self):\n value = bytearray([3] * 6)\n ops = [bitwise_operations.bit_insert(self.five_255_bin, 0, 6, value, None)]\n\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_res... | [
"0.76244575",
"0.63715374",
"0.60700357",
"0.5990376",
"0.586666",
"0.5862846",
"0.5861409",
"0.57503796",
"0.5734948",
"0.56520027",
"0.55897146",
"0.5559917",
"0.5514823",
"0.5505976",
"0.54876494",
"0.5475704",
"0.5434488",
"0.54248905",
"0.5423369",
"0.5398629",
"0.538956... | 0.76956564 | 0 |
Perform a bitwise insert op with a non existent bin. | def test_bit_insert_nonexistent_bin_name(self):
value = bytearray([3])
ops = [bitwise_operations.bit_insert("bad_name", 0, 1, value, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([3])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_insert(self):\n value = bytearray([3])\n ops = [bitwise_operations.bit_insert(self.test_bin_zeroes, 0, 1, value, None)]\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_result = bytearray([3] * 1 + [0]... | [
"0.7160326",
"0.67176193",
"0.65476626",
"0.65370536",
"0.64729404",
"0.6287796",
"0.62124634",
"0.60395765",
"0.6007725",
"0.6004442",
"0.56489205",
"0.5540966",
"0.5484066",
"0.54520464",
"0.5378718",
"0.53578687",
"0.5348499",
"0.5330858",
"0.5326471",
"0.52357227",
"0.522... | 0.7217372 | 0 |
Perform a bitwise insert op with a float byte_size. | def test_bit_insert_bad_arg_type(self):
value = bytearray([3])
ops = [bitwise_operations.bit_insert(self.five_255_bin, 0, 1.5, value, None)]
with pytest.raises(e.ParamError):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_insert_value_byte_size_smaller_than_value(self):\n value = bytearray([3] * 6)\n ops = [bitwise_operations.bit_insert(self.five_255_bin, 0, 2, value, None)]\n\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n exp... | [
"0.6584466",
"0.6580855",
"0.5829955",
"0.57959044",
"0.57341284",
"0.5670252",
"0.5663803",
"0.5636637",
"0.5527017",
"0.5514177",
"0.5467833",
"0.54198456",
"0.53438276",
"0.5331953",
"0.5284802",
"0.52344817",
"0.52188516",
"0.5113517",
"0.5112502",
"0.50909173",
"0.506062... | 0.6007578 | 2 |
Perform a bitwise lscan op. | def test_bit_lscan(self):
value = True
ops = [bitwise_operations.bit_lscan(self.count_bin, 32, 8, value)]
expected_value = 6
_, _, result = self.as_connection.operate(self.test_key, ops)
assert result[self.count_bin] == expected_value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_lscan_across_bytes(self):\n value = False\n ops = [bitwise_operations.bit_lscan(self.test_bin_ones, 7, 8, value)]\n\n expected_value = 1\n _, _, result = self.as_connection.operate(self.test_key, ops)\n assert result[self.test_bin_ones] == expected_value",
"def tes... | [
"0.74451196",
"0.6658104",
"0.66572857",
"0.62291265",
"0.6085733",
"0.59215665",
"0.5744479",
"0.57185316",
"0.56623083",
"0.56226116",
"0.552413",
"0.55202615",
"0.5383747",
"0.53328454",
"0.5293886",
"0.5254218",
"0.52492434",
"0.51787573",
"0.51559234",
"0.51167107",
"0.5... | 0.7567064 | 0 |
Perform a bitwise lscan op with an offset that causes the scan to search multiple bytes. | def test_bit_lscan_across_bytes(self):
value = False
ops = [bitwise_operations.bit_lscan(self.test_bin_ones, 7, 8, value)]
expected_value = 1
_, _, result = self.as_connection.operate(self.test_key, ops)
assert result[self.test_bin_ones] == expected_value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_lscan_offset_out_of_range(self):\n value = True\n ops = [bitwise_operations.bit_lscan(self.count_bin, 41, 8, value)]\n\n with pytest.raises(e.OpNotApplicable):\n self.as_connection.operate(self.test_key, ops)",
"def test_bit_lscan(self):\n value = True\n ... | [
"0.68065566",
"0.66702664",
"0.6243345",
"0.57021254",
"0.55683017",
"0.5430383",
"0.5321488",
"0.5251073",
"0.5233933",
"0.5192475",
"0.5176165",
"0.51449674",
"0.5064992",
"0.50226194",
"0.4990894",
"0.49202585",
"0.49196604",
"0.4917927",
"0.4847523",
"0.48157188",
"0.4772... | 0.70847696 | 0 |
Perform a bitwise lscan op with an offset that causes the scan to search multiple bytes. | def test_bit_lscan_value_not_found(self):
value = False
ops = [bitwise_operations.bit_lscan(self.five_255_bin, 0, 40, value)]
expected_value = -1
_, _, result = self.as_connection.operate(self.test_key, ops)
assert result[self.five_255_bin] == expected_value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_lscan_across_bytes(self):\n value = False\n ops = [bitwise_operations.bit_lscan(self.test_bin_ones, 7, 8, value)]\n\n expected_value = 1\n _, _, result = self.as_connection.operate(self.test_key, ops)\n assert result[self.test_bin_ones] == expected_value",
"def tes... | [
"0.7086856",
"0.68071306",
"0.6672012",
"0.6244875",
"0.5704409",
"0.5428167",
"0.53252697",
"0.5253341",
"0.52362025",
"0.51962465",
"0.51775944",
"0.5144223",
"0.50666386",
"0.5026388",
"0.49941954",
"0.49229538",
"0.49219048",
"0.49215478",
"0.4849439",
"0.4818006",
"0.477... | 0.55693316 | 5 |
Perform a bitwise lscan op with bit_offset outside bitmap.S | def test_bit_lscan_offset_out_of_range(self):
value = True
ops = [bitwise_operations.bit_lscan(self.count_bin, 41, 8, value)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_lscan_across_bytes(self):\n value = False\n ops = [bitwise_operations.bit_lscan(self.test_bin_ones, 7, 8, value)]\n\n expected_value = 1\n _, _, result = self.as_connection.operate(self.test_key, ops)\n assert result[self.test_bin_ones] == expected_value",
"def tes... | [
"0.7298933",
"0.70126724",
"0.6571719",
"0.64918786",
"0.6292112",
"0.5880076",
"0.5796156",
"0.57129705",
"0.5523732",
"0.54938674",
"0.544911",
"0.54301494",
"0.5377849",
"0.5362025",
"0.53573096",
"0.52673286",
"0.5209288",
"0.51707304",
"0.5134745",
"0.5130603",
"0.509815... | 0.7086252 | 1 |
Perform a bitwise lscan op with bit_size larger than bitmap.S | def test_bit_lscan_bit_size_too_large(self):
value = True
ops = [bitwise_operations.bit_lscan(self.test_bin_ones, 0, 41, value)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_lscan_across_bytes(self):\n value = False\n ops = [bitwise_operations.bit_lscan(self.test_bin_ones, 7, 8, value)]\n\n expected_value = 1\n _, _, result = self.as_connection.operate(self.test_key, ops)\n assert result[self.test_bin_ones] == expected_value",
"def tes... | [
"0.7305252",
"0.7233019",
"0.6309055",
"0.61403173",
"0.60514647",
"0.595394",
"0.59533376",
"0.5549568",
"0.55292",
"0.54765344",
"0.5471686",
"0.546404",
"0.54265046",
"0.54154724",
"0.5364196",
"0.5296248",
"0.52662283",
"0.5188394",
"0.51625985",
"0.51263577",
"0.5118834"... | 0.74964994 | 0 |
Perform a bitwise lscan op with a non existent bin. | def test_bit_lscan_bad_bin_name(self):
value = True
ops = [bitwise_operations.bit_lscan("bad_name", 0, 8, value)]
expected_value = None
_, _, result = self.as_connection.operate(self.test_key, ops)
assert result["bad_name"] == expected_value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_lscan_across_bytes(self):\n value = False\n ops = [bitwise_operations.bit_lscan(self.test_bin_ones, 7, 8, value)]\n\n expected_value = 1\n _, _, result = self.as_connection.operate(self.test_key, ops)\n assert result[self.test_bin_ones] == expected_value",
"def tes... | [
"0.7264757",
"0.71589065",
"0.70374703",
"0.69423616",
"0.6676892",
"0.60654503",
"0.6049793",
"0.59066546",
"0.5760631",
"0.57225853",
"0.5678771",
"0.5580863",
"0.54735345",
"0.5451411",
"0.5444195",
"0.54433775",
"0.540275",
"0.5388659",
"0.52347976",
"0.514336",
"0.509522... | 0.7017645 | 3 |
Perform a bitwise lshift op. | def test_bit_lshift(self):
ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 0, 8, 3, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([8] * 1 + [1] * 4)
assert bins[self.test_bin_ones] =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bitwise_lshift(self, other: Any) -> ColumnOperators:\n\n return self.operate(bitwise_lshift_op, other)",
"def lshift(self, value):\n return self.clone().lshift_(value)",
"def __lshift__(self, other: Any) -> ColumnOperators:\n return self.operate(lshift, other)",
"def test_lshift():\n... | [
"0.8027732",
"0.7886314",
"0.77431446",
"0.74516565",
"0.74462485",
"0.7268534",
"0.71497965",
"0.70959824",
"0.70602524",
"0.70522314",
"0.7030007",
"0.7023261",
"0.6991336",
"0.6967866",
"0.6954833",
"0.6801171",
"0.6638819",
"0.6623668",
"0.6597141",
"0.65426666",
"0.65120... | 0.7045099 | 10 |
Perform a bitwise lshift op with bit_offset causing the op to cross bytes. | def test_bit_lshift_across_bytes(self):
ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 4, 12, 3, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([8] * 2 + [1] * 3)
assert bins[self.te... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bitwise_lshift(self, other: Any) -> ColumnOperators:\n\n return self.operate(bitwise_lshift_op, other)",
"def lshift(self, value):\n return self.clone().lshift_(value)",
"def test_bit_lshift_offset_out_of_range(self):\n ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 41, 8, 1,... | [
"0.72957206",
"0.72470534",
"0.71489215",
"0.70532566",
"0.6962672",
"0.69317377",
"0.6867541",
"0.67880154",
"0.6757078",
"0.6633713",
"0.66016227",
"0.65892166",
"0.65161103",
"0.64816165",
"0.64787185",
"0.64709115",
"0.6432299",
"0.6428693",
"0.6213718",
"0.6189667",
"0.6... | 0.6941355 | 5 |
Perform a bitwise lshift op with shift > 1 byte. | def test_bit_lshift_wrap(self):
ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 0, 40, 8, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([1] * 4 + [0])
assert bins[self.test_bin_ones]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bitwise_lshift(self, other: Any) -> ColumnOperators:\n\n return self.operate(bitwise_lshift_op, other)",
"def lshift(self, value):\n return self.clone().lshift_(value)",
"def test_bit_lshift(self):\n ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 0, 8, 3, None)]\n\n se... | [
"0.7710645",
"0.75293803",
"0.72767824",
"0.72446424",
"0.72332287",
"0.7204835",
"0.71994394",
"0.7136731",
"0.71178627",
"0.70673007",
"0.6973365",
"0.6961192",
"0.6899262",
"0.6852815",
"0.68263626",
"0.680614",
"0.67216945",
"0.66920835",
"0.66585714",
"0.6643243",
"0.660... | 0.74472636 | 2 |
Perform a bitwise lshift op with offset > bitmap. | def test_bit_lshift_offset_out_of_range(self):
ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 41, 8, 1, None)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bitwise_lshift(self, other: Any) -> ColumnOperators:\n\n return self.operate(bitwise_lshift_op, other)",
"def lshift(self, value):\n return self.clone().lshift_(value)",
"def test_bit_lshift_wrap(self):\n ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 0, 40, 8, None)]\n\n ... | [
"0.69308263",
"0.66388756",
"0.65359557",
"0.6450406",
"0.6376182",
"0.63319093",
"0.6328476",
"0.62932926",
"0.6225093",
"0.61923605",
"0.6165442",
"0.6009935",
"0.59374416",
"0.59149414",
"0.590938",
"0.5865252",
"0.5850488",
"0.5823703",
"0.5793596",
"0.57894117",
"0.56782... | 0.667068 | 1 |
Perform a bitwise lshift op with bit_size > bitmap. | def test_bit_lshift_bit_size_too_large(self):
ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 0, 41, 1, None)]
with pytest.raises(e.OpNotApplicable):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_lshift_wrap(self):\n ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 0, 40, 8, None)]\n\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_result = bytearray([1] * 4 + [0])\n assert bins[self.te... | [
"0.6950515",
"0.6931721",
"0.6767711",
"0.67303616",
"0.6553696",
"0.64958674",
"0.6486794",
"0.6405344",
"0.6370063",
"0.6367465",
"0.61931336",
"0.61865187",
"0.6111606",
"0.59819406",
"0.5948448",
"0.5942128",
"0.59374654",
"0.59374654",
"0.5933737",
"0.5898842",
"0.587550... | 0.7226745 | 0 |
Perform a bitwise lshift op with non existent bin. | def test_bit_lshift_bad_bin_name(self):
ops = [bitwise_operations.bit_lshift("bad_name", 0, 8, 1, None)]
with pytest.raises(e.BinNotFound):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bit_lshift_wrap(self):\n ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 0, 40, 8, None)]\n\n self.as_connection.operate(self.test_key, ops)\n\n _, _, bins = self.as_connection.get(self.test_key)\n expected_result = bytearray([1] * 4 + [0])\n assert bins[self.te... | [
"0.76249284",
"0.7401031",
"0.73161966",
"0.72296137",
"0.7085757",
"0.7053143",
"0.69851166",
"0.6903455",
"0.69034207",
"0.68963444",
"0.6725142",
"0.6712761",
"0.66804767",
"0.66660064",
"0.6559047",
"0.6530069",
"0.6507873",
"0.6507873",
"0.64425284",
"0.6341766",
"0.6339... | 0.6630271 | 14 |
Perform a bitwise lshift op with a float for bit_offset. | def test_bit_lshift_bad_arg(self):
ops = [bitwise_operations.bit_lshift(self.test_bin_ones, 1.5, 8, 1, None)]
with pytest.raises(e.ParamError):
self.as_connection.operate(self.test_key, ops) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bitwise_lshift(self, other: Any) -> ColumnOperators:\n\n return self.operate(bitwise_lshift_op, other)",
"def lshift(self, value):\n return self.clone().lshift_(value)",
"def lrshift(val, n) -> np.int64:\n return (val % (1 << 64)) >> n",
"def test_lshift():\n value = 42\n n... | [
"0.63631225",
"0.63420326",
"0.6315351",
"0.6131438",
"0.6056435",
"0.59942764",
"0.5853907",
"0.57910365",
"0.5756136",
"0.5735235",
"0.5709162",
"0.56145734",
"0.55019057",
"0.54993063",
"0.54979515",
"0.5487662",
"0.5480462",
"0.5475851",
"0.5458192",
"0.5444944",
"0.54214... | 0.532899 | 31 |
Perform a bitwise not op. | def test_bit_not(self):
ops = [bitwise_operations.bit_not(self.five_255_bin, 0, 40, None)]
self.as_connection.operate(self.test_key, ops)
_, _, bins = self.as_connection.get(self.test_key)
expected_result = bytearray([0] * 5)
assert bins[self.five_255_bin] == expected_result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bitwise_not(data):\n return _make.bitwise_not(data)",
"def bitwise_not(self) -> ColumnOperators:\n\n return self.operate(bitwise_not_op)",
"def logical_not(data):\n return _make.logical_not(data)",
"def logical_not(x, f=None):\n return _cur_framework(x, f=f).logical_not(x)",
"def not_(b... | [
"0.86672175",
"0.8273287",
"0.79311275",
"0.76232237",
"0.74727803",
"0.7466156",
"0.74548227",
"0.7327089",
"0.7144022",
"0.703946",
"0.69998914",
"0.6885835",
"0.68487746",
"0.6815553",
"0.6756566",
"0.6691159",
"0.6634357",
"0.6593476",
"0.65799034",
"0.6549048",
"0.652382... | 0.72303295 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.