From 8380c470861e8e722547c754ead25a221b8680b1 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 27 Apr 2020 18:21:10 +0200 Subject: [PATCH 1/3] Blacken one_dimensional.py --- cellular_automata/one_dimensional.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cellular_automata/one_dimensional.py b/cellular_automata/one_dimensional.py index 98d6fa25d7f5..7819088c8cff 100644 --- a/cellular_automata/one_dimensional.py +++ b/cellular_automata/one_dimensional.py @@ -33,7 +33,7 @@ def new_generation(cells: List[List[int]], rule: List[int], time: int) -> List[i for i in range(population): # Get the neighbors of each cell left_neighbor = 0 if i == 0 else cells[time][i - 1] # special: leftmost cell - right_neighbor = 0 if i == population - 1 else cells[time][i + 1] # rightmost + right_neighbor = 0 if i == population - 1 else cells[time][i + 1] # rightmost # Define a new cell and add it to the new generation situation = 7 - int(f"{left_neighbor}{cells[time][i]}{right_neighbor}", 2) next_generation.append(rule[situation]) From 07e87bf63cc3fbf1eaa0487392eaa0636f831ddd Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Mon, 27 Apr 2020 16:21:35 +0000 Subject: [PATCH 2/3] updating DIRECTORY.md --- DIRECTORY.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DIRECTORY.md b/DIRECTORY.md index 5025fde4aad5..777f5d34f6a8 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -27,6 +27,9 @@ ## Boolean Algebra * [Quine Mc Cluskey](https://github.com/TheAlgorithms/Python/blob/master/boolean_algebra/quine_mc_cluskey.py) +## Cellular Automata + * [One Dimensional](https://github.com/TheAlgorithms/Python/blob/master/cellular_automata/one_dimensional.py) + ## Ciphers * [Affine Cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/affine_cipher.py) * [Atbash](https://github.com/TheAlgorithms/Python/blob/master/ciphers/atbash.py) @@ -148,6 +151,7 @@ * [Index Calculation](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/index_calculation.py) * Rotation * [Rotation](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/rotation/rotation.py) + * [Sepia](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/sepia.py) * [Test Digital Image Processing](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/test_digital_image_processing.py) ## Divide And Conquer From b18a54d8f6569b27222b12e66daa072e680e8797 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 27 Apr 2020 18:25:54 +0200 Subject: [PATCH 3/3] Travis CI: Upgrade to Ubuntu 20.04 LTS Focal Ubuntu 20.04 LTS (Focal Fossa) https://releases.ubuntu.com/focal --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b9c47c179dee..c19ae42ec0f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ os: linux -dist: bionic +dist: focal language: python python: 3.8 cache: pip