Functionprims_algo >>> graph = GraphUndirectedWeighted() >>> graph.add_edge("a", "b", 3) >>> graph.add_edge("b", "c", 10) >>> graph.add_edge("c", "d",
graphs/minimum_spanning_tree_prims2.py:220
Functionquick_sort >>> for data in ([2, 1, 0], [2.2, 1.1, 0], "quick_sort"): ... quick_sort(data) == sorted(data) True True True
sorts/recursive_quick_sort.py:1
Functionradix_sort Examples: >>> radix_sort([0, 5, 3, 2, 2]) [0, 2, 2, 3, 5] >>> radix_sort(list(range(15))) == sorted(range(15)) True >>> radi
sorts/radix_sort.py:12
Functionread_data_sets(
train_dir,
fake_data=False,
one_hot=False,
dtype=dtypes.float32,
reshape=True,
valid
neural_network/input_data.py:270
Functionreceptor_converter >>> receptor_converter(4, "1111010010111111") (['1', '0', '1', '0', '1', '0', '1', '1', '1', '1', '1', '1'], True)
hashes/hamming_code.py:147
Functionreynolds_number >>> reynolds_number(900, 2.5, 0.05, 0.4) 281.25 >>> reynolds_number(450, 3.86, 0.078, 0.23) 589.0695652173912 >>> reynolds_number
physics/reynolds_number.py:33
Functionrmse Examples(rounded for precision): >>> actual = [1,2,3];predict = [1,4,3] >>> float(np.around(rmse(predict,actual),decimals = 2)) 1.15
machine_learning/scoring_functions.py:62
Functionrmsle Examples(rounded for precision): >>> float(np.around(rmsle(predict=[10, 2, 30], actual=[10, 10, 30]), decimals=2)) 0.75 >>> float(rm
machine_learning/scoring_functions.py:84
MethodrotateRotate the items of the Queue `rotation` times >>> queue = QueueByList([10, 20, 30, 40]) >>> queue Queue((10, 20, 30, 40))
data_structures/queues/queue_by_list.py:98
Functionrun_length_decode Performs Run Length Decoding >>> run_length_decode([('A', 4), ('B', 3), ('C', 2), ('D', 1), ('A', 2)]) 'AAAABBBCCDAA' >>> run_length_
data_compression/run_length_encoding.py:29
Functionrun_length_encode Performs Run Length Encoding >>> run_length_encode("AAAABBBCCDAA") [('A', 4), ('B', 3), ('C', 2), ('D', 1), ('A', 2)] >>> run_length_
data_compression/run_length_encoding.py:4
Methodsearch_in >>> A = Automaton(["what", "hat", "ver", "er"]) >>> A.search_in("whatever, err ... , wherever") {'what': [0], 'hat': [1], 've
strings/aho_corasick.py:67