-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
32 lines (26 loc) · 792 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import os
os.environ["PURE_PYTHON"] = "True"
from btrees.deprecated.btree_ext_deprecated import OOBTreeExt, WALKING_TECHNIQUE
from build_tree.build_tree import generate_btree_index_x_values_with_dist
prefix_to_percent = {
'gggg': 0.25,
'hhhh': 0.15,
'mmmm': 0.10,
'rrrr': 0.03,
'': 0.47
}
#num_of_values = 4_000_000
num_of_values = 500_000
my_index = generate_btree_index_x_values_with_dist(num_of_values, prefix_to_percent)
#my_index_2 = OOBTree()
#my_index_2.update(my_index.items())
from BTrees import check as BtreesCheck
while (True):
try:
BtreesCheck.display(my_index)
except:
pass
#sampled = my_index.random_sampling(k=10_000, how_to_walk=WALKING_TECHNIQUE.RANDOM_WITH_TEST_EARLY_ABORT)
pass
#my_index.get('AEleUQiL')
print(1)