Commit Graph

10 Commits

Author SHA1 Message Date
algobytewise
ce99859ad5
Move files to various folders (#4286)
* Move files to cellular_automata

* Rename other/davis–putnam–logemann–loveland.py to backtracking/davis–putnam–logemann–loveland.py

* Rename other/markov_chain.py to graphs/markov_chain.py

* undid rename: need to fix mypy first
2021-03-22 10:54:04 +01:00
Novice :)
2c6f553ccb
[mypy] Fix type annotations for cellular_automata (#4236)
* [mypy] Fix type annotations for cellullar_automata

* mypy --ignore-missing-imports

* mypy --ignore-missing-imports

* Blank lines

* Blank lines

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-03-20 07:32:16 +01:00
algobytewise
2a6e4bbdb6
[mypy] Add/fix type annotations for "conways_game_of_life.py" & "one_dimensional.py" (#4216)
Related Issue: #4052
2021-02-22 00:54:29 +01:00
jenra
5de90aafc7
Hacktoberfest 2020: Conway's Game of Life (#3070)
* Created conways_game_of_life.py

* Added new_generation(list[int[int]]) -> list[list[int]]

* Added glider example

* Added comments and shortened glider example

* Fixed index out of bounds error

* Added test

* Added blinker example

* Added ability to generate images

* Moved image generating code into a separate function

* Added comments

* Comment

* Reformatted file

* Formatting

* Removed glider test

* Update cellular_automata/conways_game_of_life.py

Co-authored-by: John Law <johnlaw.po@gmail.com>

* Update conways_game_of_life.py

* Update conways_game_of_life.py

Co-authored-by: John Law <johnlaw.po@gmail.com>
2020-11-29 17:09:33 +01:00
Dhruv
48357cea5b
Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
Christian Clauss
9200a2e543
from __future__ import annotations (#2464)
* from __future__ import annotations

* fixup! from __future__ import annotations

* fixup! from __future__ import annotations

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-23 13:30:13 +02:00
Hasenn
10aa214fcb
Docstrings and formatting improvements (#2418)
* Fix spelling in docstrings

* Improve comments and formatting

* Update print statement to reflect doctest change

* improve phrasing and apply black

* Update rat_in_maze.py

    This method is recursive starting from (i, j) and going in one of four directions:
    up, down, left, right.
    If a path is found to destination it returns True otherwise it returns False.

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-14 14:40:27 +02:00
Christian Clauss
8cb957f893
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>
2020-04-27 18:40:46 +02:00
8Dion8
0ef9dd3977
Create one_dimensional.py (#1905)
* Create one_dimensional.py

* Update cellular_automata/one_dimensional.py

Co-Authored-By: Christian Clauss <cclauss@me.com>

* Update cellular_automata/one_dimensional.py

Co-Authored-By: Christian Clauss <cclauss@me.com>

* Update one_dimensional.py

Moved import to the top so that the type Image gets recognized

* Update one_dimensional.py

* Update cellular_automata/one_dimensional.py

* Update cellular_automata/one_dimensional.py

* Update one_dimensional.py

* Update one_dimensional.py

* Update one_dimensional.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-04-27 18:07:31 +02:00
Christian Clauss
b560b76002
Add cellular_automata directory (#1902)
Related to https://github.com/TheAlgorithms/Python/issues/1613#issuecomment-618175224 @8Dion8 Your review please.  Once this land, this directory would be a great place for you to add your work.
2020-04-23 11:57:32 +02:00