Skip to content

Commit 8cb957f

Browse files
cclaussgithub-actions
and
github-actions
authored
Blacken one_dimensional.py (#1911)
* Blacken one_dimensional.py * updating DIRECTORY.md * Travis CI: Upgrade to Ubuntu 20.04 LTS Focal Ubuntu 20.04 LTS (Focal Fossa) https://releases.ubuntu.com/focal Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 0ef9dd3 commit 8cb957f

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
os: linux
2-
dist: bionic
2+
dist: focal
33
language: python
44
python: 3.8
55
cache: pip

DIRECTORY.md

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
## Boolean Algebra
2828
* [Quine Mc Cluskey](https://github.com/TheAlgorithms/Python/blob/master/boolean_algebra/quine_mc_cluskey.py)
2929

30+
## Cellular Automata
31+
* [One Dimensional](https://github.com/TheAlgorithms/Python/blob/master/cellular_automata/one_dimensional.py)
32+
3033
## Ciphers
3134
* [Affine Cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/affine_cipher.py)
3235
* [Atbash](https://github.com/TheAlgorithms/Python/blob/master/ciphers/atbash.py)
@@ -148,6 +151,7 @@
148151
* [Index Calculation](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/index_calculation.py)
149152
* Rotation
150153
* [Rotation](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/rotation/rotation.py)
154+
* [Sepia](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/sepia.py)
151155
* [Test Digital Image Processing](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/test_digital_image_processing.py)
152156

153157
## Divide And Conquer

cellular_automata/one_dimensional.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def new_generation(cells: List[List[int]], rule: List[int], time: int) -> List[i
3333
for i in range(population):
3434
# Get the neighbors of each cell
3535
left_neighbor = 0 if i == 0 else cells[time][i - 1] # special: leftmost cell
36-
right_neighbor = 0 if i == population - 1 else cells[time][i + 1] # rightmost
36+
right_neighbor = 0 if i == population - 1 else cells[time][i + 1] # rightmost
3737
# Define a new cell and add it to the new generation
3838
situation = 7 - int(f"{left_neighbor}{cells[time][i]}{right_neighbor}", 2)
3939
next_generation.append(rule[situation])

0 commit comments

Comments
 (0)