mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Blacken our code (#2125)
* Blacken Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
parent
62f7561428
commit
f97af65579
|
@ -228,6 +228,7 @@
|
|||
* [Bfs](https://github.com/TheAlgorithms/Python/blob/master/graphs/bfs.py)
|
||||
* [Bfs Shortest Path](https://github.com/TheAlgorithms/Python/blob/master/graphs/bfs_shortest_path.py)
|
||||
* [Bidirectional A Star](https://github.com/TheAlgorithms/Python/blob/master/graphs/bidirectional_a_star.py)
|
||||
* [Bidirectional Breadth First Search](https://github.com/TheAlgorithms/Python/blob/master/graphs/bidirectional_breadth_first_search.py)
|
||||
* [Breadth First Search](https://github.com/TheAlgorithms/Python/blob/master/graphs/breadth_first_search.py)
|
||||
* [Breadth First Search Shortest Path](https://github.com/TheAlgorithms/Python/blob/master/graphs/breadth_first_search_shortest_path.py)
|
||||
* [Check Bipartite Graph Bfs](https://github.com/TheAlgorithms/Python/blob/master/graphs/check_bipartite_graph_bfs.py)
|
||||
|
@ -325,6 +326,7 @@
|
|||
* [Chudnovsky Algorithm](https://github.com/TheAlgorithms/Python/blob/master/maths/chudnovsky_algorithm.py)
|
||||
* [Collatz Sequence](https://github.com/TheAlgorithms/Python/blob/master/maths/collatz_sequence.py)
|
||||
* [Combinations](https://github.com/TheAlgorithms/Python/blob/master/maths/combinations.py)
|
||||
* [Entropy](https://github.com/TheAlgorithms/Python/blob/master/maths/entropy.py)
|
||||
* [Eulers Totient](https://github.com/TheAlgorithms/Python/blob/master/maths/eulers_totient.py)
|
||||
* [Explicit Euler](https://github.com/TheAlgorithms/Python/blob/master/maths/explicit_euler.py)
|
||||
* [Extended Euclidean Algorithm](https://github.com/TheAlgorithms/Python/blob/master/maths/extended_euclidean_algorithm.py)
|
||||
|
|
|
@ -43,6 +43,7 @@ class BreadthFirstSearch:
|
|||
[(0, 0), (1, 0), (2, 0), (3, 0), (3, 1), (4, 1),
|
||||
(5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (6, 5), (6, 6)]
|
||||
"""
|
||||
|
||||
def __init__(self, start, goal):
|
||||
self.start = Node(start[1], start[0], goal[1], goal[0], None)
|
||||
self.target = Node(goal[1], goal[0], goal[1], goal[0], None)
|
||||
|
@ -111,6 +112,7 @@ class BidirectionalBreadthFirstSearch:
|
|||
[(0, 0), (0, 1), (0, 2), (1, 2), (2, 2), (2, 3),
|
||||
(2, 4), (3, 4), (3, 5), (3, 6), (4, 6), (5, 6), (6, 6)]
|
||||
"""
|
||||
|
||||
def __init__(self, start, goal):
|
||||
self.fwd_bfs = BreadthFirstSearch(start, goal)
|
||||
self.bwd_bfs = BreadthFirstSearch(goal, start)
|
||||
|
|
|
@ -54,7 +54,7 @@ def calculate_prob(text: str) -> None:
|
|||
3.0
|
||||
"""
|
||||
single_char_strings, two_char_strings = analyze_text(text)
|
||||
my_alphas = list(' ' + ascii_lowercase)
|
||||
my_alphas = list(" " + ascii_lowercase)
|
||||
# what is our total sum of probabilities.
|
||||
all_sum = sum(single_char_strings.values())
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user