Commit Graph

23 Commits

Author SHA1 Message Date
Caeden
07e991d553
Add pep8-naming to pre-commit hooks and fixes incorrect naming conventions (#7062)
* ci(pre-commit): Add pep8-naming to `pre-commit` hooks (#7038)

* refactor: Fix naming conventions (#7038)

* Update arithmetic_analysis/lu_decomposition.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refactor(lu_decomposition): Replace `NDArray` with `ArrayLike` (#7038)

* chore: Fix naming conventions in doctests (#7038)

* fix: Temporarily disable project euler problem 104 (#7069)

* chore: Fix naming conventions in doctests (#7038)

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-13 00:54:20 +02:00
Lakshay Roopchandani
51dba4d743
Job sequencing with deadlines (#6854)
* completed optimised code for job sequencing with deadline problem

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* completed optimised code for job sequencing with deadline problem

* completed optimized code for job sequencing with deadline problem

* completed optimised code for job sequencing with deadline problem

* completed optimised code for job sequencing with deadline problem

* completed optimised code for job sequencing with deadline problem

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* completed optimized code for the issue "Job Scheduling with deadlines"

* completed optimized code for the issue "Job Scheduling with deadlines"

* completed optimized code for the issue "Job Scheduling with deadlines"

* Update greedy_methods/job_sequencing_with_deadline.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Updated reviews

* Updated reviews

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update and rename greedy_methods/job_sequencing_with_deadline.py to scheduling/job_sequencing_with_deadline.py

Co-authored-by: lakshayroop5 <87693528+lavenroop5@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-09 14:53:44 +02:00
pre-commit-ci[bot]
756bb268eb
[pre-commit.ci] pre-commit autoupdate (#6629)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0)
- [github.com/asottile/pyupgrade: v2.37.0 → v2.38.2](https://github.com/asottile/pyupgrade/compare/v2.37.0...v2.38.2)
- https://gitlab.com/pycqa/flake8https://github.com/PyCQA/flake8
- [github.com/PyCQA/flake8: 3.9.2 → 5.0.4](https://github.com/PyCQA/flake8/compare/3.9.2...5.0.4)
- [github.com/pre-commit/mirrors-mypy: v0.961 → v0.981](https://github.com/pre-commit/mirrors-mypy/compare/v0.961...v0.981)
- [github.com/codespell-project/codespell: v2.1.0 → v2.2.1](https://github.com/codespell-project/codespell/compare/v2.1.0...v2.2.1)

* Fix a long line

* Update sol1.py

* Update sol1.py

* lambda_

* Update multi_level_feedback_queue.py

* Update double_ended_queue.py

* Update sequential_minimum_optimization.py

* Update .pre-commit-config.yaml

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-03 22:00:45 +02:00
Vardhaman
2d5dd6f132
MAINT: Updated f-string method (#6230)
* MAINT: Used f-string method

Updated the code with f-string methods wherever required for a better and cleaner understanding of the code.

* Updated files with f-string method

* Update rsa_key_generator.py

* Update rsa_key_generator.py

* Update elgamal_key_generator.py

* Update lru_cache.py

I don't think this change is efficient but it might tackle the error as the error was due to using long character lines.

* Update lru_cache.py

* Update lru_cache.py

Co-authored-by: cyai <seriesscar@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-07-07 16:34:07 +02:00
yulmam
a80e5aadf3
add highest_response_ratio_next.py (#6183)
* add highest_response_ratio_next.py

* Update highest_response_ratio_next.py

* Update highest_response_ratio_next.py
2022-06-22 12:23:52 +08:00
이빈
c86aa72cfa
Create non_preemptive_shortest_job_first.py (#6169)
* Create non_preemptive_shortest_job_first.py

* 파일 위치 변경

* Delete non_preemptive_shortest_job_first.py

* delete Korean comments

* change comments, & to and, type annotation

* type annotation

* delete unnecessary comment
2022-06-07 00:44:49 +08:00
DongJoon Cha
a44afc9b7d
Add Multi-Level-Feedback-Queue scheduling algorithm (#6165)
* Add Multi-Level-Feedback-Queue scheduling algorithm

* fix type hint annotation for pre-commit

* Update scheduling/multi_level_feedback_queue.py

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

* Update scheduling/multi_level_feedback_queue.py

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

* Update scheduling/multi_level_feedback_queue.py

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

* Update scheduling/multi_level_feedback_queue.py

* Update scheduling/multi_level_feedback_queue.py

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

Co-authored-by: John Law <johnlaw.po@gmail.com>
2022-06-05 00:41:52 +08:00
Leoriem-code
6b2b476f86
fix typo on line 126 (#5768) 2021-11-05 06:06:37 +01:00
Christian Clauss
cecf43d648
Pyupgrade to Python 3.9 (#4718)
* Pyupgrade to Python 3.9

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-07 13:37:03 +02:00
shan7030
00e279ea44
[mypy] Add/fix type annotations for scheduling algorithms (#4074)
* Fix mypy errors for scheduling/first_come_first_served
* Fix mypy errors for scheduling/round_robin.py
* Fix mypy errors for scheduling/shortest_job_first.py
* Fix isort errors
2020-12-28 09:34:40 +05:30
Dhruv
acaeb22bbd
Add GitHub action for pre-commit (#2515)
* Add GitHub action file for pre-commit

* Fix errors exposed by pre-commit hook:

- Remove executable bit from files without shebang. I checked those
  file and it was not needed.
- Fix with black

* Apply suggestions from code review

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-30 15:23:34 +02: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
20e98fcded
Fix some warnings from LGTM (#2420)
* fix assignment of a variable to itself

* Fix unnecessary 'else' clause in loop

* formatting and redundant reasignment fix

* mark unreachable code with a TODO comment

* fix variable defined multiple times

* fix static method without static decorator

* revert unintended autoformatting

Co-authored-by: Christian Clauss <cclauss@me.com>

* revert autoformatting issue

* applied black autoformatting

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-13 10:11:27 +02:00
Christian Clauss
5f4da5d616
isort --profile black . (#2181)
* updating DIRECTORY.md

* isort --profile black .

* Black after

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-06 09:44:19 +02:00
Christian Clauss
2c98dce057
Rename shortest_job_first_algorithm.py to shortest_job_first.py (#2164)
* Rename shortest_job_first_algorithm.py to shortest_job_first.py

* updating DIRECTORY.md

* Minor tweek to round_robin.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-04 00:56:40 +05:30
Pawan Sundargiri
e274863cda
Add round_robin scheduling algorithm (#2158)
* round_robin and priority cpu scheduling algorithms

* Delete priority_cpu_scheduling.py

* Delete round_robin_algorithm.py

* [add] cpu_scheduling_algorithms

* [add] Round robin cpu scheduling algorithm

* Update scheduling/round_robin_scheduling_algorithm.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update scheduling/round_robin.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update scheduling/round_robin_scheduling.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update scheduling/round_robin_scheduling.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update scheduling/round_robin.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Round_Robin

* Update round_robin.py

* Update round_robin.py

* Update round_robin.py

* Update round_robin.py

Co-authored-by: pawanbuddy <46370996+pawanbuddy@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-07-03 15:11:07 +02:00
Christian Clauss
9316e7c014
Set the Python file maximum line length to 88 characters (#2122)
* flake8 --max-line-length=88

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-16 10:09:19 +02:00
Christian Clauss
1f8a21d727
Tighten up psf/black and flake8 (#2024)
* Tighten up psf/black and flake8

* Fix some tests

* Fix some E741

* Fix some E741

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-22 08:10:11 +02:00
Erwin Lejeune
21ed8968c0
Fixes in Bidirectional A* (#2020)
* implement bidirectional astar

* add type hints

* add wikipedia url

* format with black

* changes from review

* fix collision check

* Add testmod()

* # doctest: +NORMALIZE_WHITESPACE

* Codespell: euclidean

* Codespell: coordinates

* Codespell: traversal

* Codespell: remaining

Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-21 21:50:52 +02:00
pharshil1902
a52dd66ac6
Added Shortest Job First Algorithm (#1957)
* Added Shortest Job First Algorithm

It is in IPYNB format but the dataframes are really looking good.
Please, take a look.

* Delete Shortest_Job_First_Algorithm.ipynb

* Added Shortest Job First Algorithm

* Update Shortest_Job_First Algorithm.py

* Update Shortest_Job_First Algorithm.py

* Update Shortest_Job_first Algorithm

* Added Shortest_Job_First Algorithm

* Added Shortest Job First Algorithm

* Update shortest_job_first_algorithm.py

* Format code with psf/black

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-07 19:27:44 +02:00
onlinejudge95
80718bd880 Fixes black failures (#1742) 2020-02-10 11:43:57 +01:00
Ale3androsS
e7041a8eca
Added first come first served scheduling (#1722)
* Added FCFS

* Fixed spelling error

* Rename fcfs.py to first_come_first_served.py

* Fixed FCFS and added tests.

* Made changes requested

* Use enumerate() instead of range(len())

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-02-06 21:48:58 +02:00