Commit Graph

32 Commits

Author SHA1 Message Date
Christian Clauss
a9ca110d6b
Scripts for closing pull requests for Hacktoberfest ()
* Scripts for closing pull requests for Hacktoberfest

* --limit=500

* Lose 2024
2024-09-30 12:49:31 +02:00
Maxim Smolskiy
2702bf9400
Enable ruff S113 rule ()
* Enable ruff S113 rule

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-21 19:34:18 +02:00
Maxim Smolskiy
53b2926704
Enable ruff PGH003 rule ()
* Enable ruff PGH003 rule

* Fix

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

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

* Fix

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-02 21:29:34 +02:00
Maxim Smolskiy
93fb555e0a
Enable ruff SIM102 rule ()
* Enable ruff SIM102 rule

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

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

* Fix

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-02 03:27:56 +02:00
MC
5f61af4fbb
Fix ignore venv in build_directory_md.py ()
Co-authored-by: MICHAEL CASTLE <CASTLM@tdm.local>
2023-11-16 17:00:48 +06:00
Christian Clauss
4004b862d5
Revert "validate_solutions.py: os.getenv('GITHUB_TOKEN', '')" ()
* Revert "validate_solutions.py: os.getenv('GITHUB_TOKEN', '') ()"

This reverts commit 68e6d5ad7e.

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-15 15:40:13 -04:00
Christian Clauss
68e6d5ad7e
validate_solutions.py: os.getenv('GITHUB_TOKEN', '') ()
* validate_solutions.py: os.getenv('GITHUB_TOKEN', '')

@tianyizheng02

* updating DIRECTORY.md

* f this

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-15 13:11:05 -04:00
Christian Clauss
4b79d771cd
Add more ruff rules ()
* Add more ruff rules

* Add more ruff rules

* pre-commit: Update ruff v0.0.269 -> v0.0.270

* Apply suggestions from code review

* Fix doctest

* Fix doctest (ignore whitespace)

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

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

---------

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-26 09:34:17 +02:00
Dhruv Manilawala
9e0c357a57
chore: additional Project Euler solution hash () 2023-04-01 08:29:26 +02:00
Christian Clauss
64543faa98
Make some ruff fixes ()
* Make some ruff fixes

* Undo manual fix

* Undo manual fix

* Updates from ruff=0.0.251
2023-03-01 17:23:33 +01:00
Christian Clauss
b75a7c77f8
pre-commit autoupdate: pyupgrade v2.34.0 -> v2.37.0 ()
* pre-commit autoupdate: pyupgrade v2.34.0 -> v2.37.0

* pre-commit run --all-files
2022-07-11 10:19:52 +02:00
Vcrostin
69cde43ca1
make DIRECTORY.md paths relative Fixes () () 2022-06-22 12:01:05 +08:00
Aniruddha Bhattacharjee
b743e44259
Wavelet tree ()
* Added the matrix_exponentiation.py file in maths directory

* Implemented the requested changes

* Update matrix_exponentiation.py

* resolve merge conflict with upstream branch

* add new line at end of file

* add wavelet_tree

* fix isort issue

* updating DIRECTORY.md

* fix variable names in wavelet_tree and correct typo

* Add type hints and variable renaming

* Update data_structures/binary_tree/wavelet_tree.py

Add doctests to placate the algorithm-bot, thanks to @cclauss.

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

* Move doctest to individual functions and reformat code

* Move common test array to the global scope and reuse in tests

* MMove test array to global scope and minor linting changes

* Correct the failing pytest tests

* MUse built-in list for type annotation

* Update wavelet_tree.py

* types-requests

* updating DIRECTORY.md

* Update wavelet_tree.py

* # type: ignore

* # type: ignore

* Update decrypt_caesar_with_chi_squared.py

* ,

* Update decrypt_caesar_with_chi_squared.py

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Aniruddha Bhattacharjee <aniruddha@Aniruddhas-MacBook-Air.local>
2021-06-08 22:49:33 +02:00
Malte Jürgens
03d9b6747b
feat(ci): Hash project euler solutions ()
* hash project euler solutions

* fix errors

* Return missing annotation

* Fix typo

* Extract variable to shorten excessively long line

* Update scripts/validate_solutions.py

* Update scripts/validate_solutions.py

* Simplify with str.encode()

* PEP 585: type hinting generics in standard collections;

* str().encode()

* Texas two step to placate black, flake8, mypy

Co-authored-by: Andrii Siriak <siryaka@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-05-12 09:48:23 +02:00
Christian Clauss
252df0a149
fix(mypy): Fix files in scripts/ () 2021-04-07 08:12:56 +05:30
Dhruv Manilawala
ba6310b647
Validate only submitted Project Euler solution ()
* Update validate solution script to fetch only submitted solution
* Update workflow file with the updated PE script
* Fix: do not fetch `validate_solutions.py` script
* Update script to use the requests package for API calls
* Fix: install requests module
* Pytest ignore scripts/ directory
2020-11-29 23:11:09 +05:30
Sam Holst
89e8dbffba
removed extra line to match rest of file () 2020-10-25 01:19:59 +08:00
Dhruv Manilawala
b97529dd88
Move validate_solutions and add durations flag to pytest.ini ()
* Move PE validate_solutions to scripts/ directory

* Update pytest.ini file with durations settings

* Remove codespell and autoblack workflow file

* Dependent changes to test config files

* Update pytest.ini
2020-10-24 19:07:33 +05:30
Dhruv
9016fe192f
Fix imports for all namespace packages ()
* Fix imports as they're namespace packages

* Fix import for scripts/validate_filenames.py

* Fix path in doctest
2020-09-28 23:41:04 +02:00
Dhruv
48357cea5b
Add __init__.py files in all the directories () 2020-09-28 19:42:36 +02:00
Christian Clauss
697495b017
Fix copy / paste oversight () 2020-09-19 07:25:18 +02:00
Christian Clauss
363858ef3b
hyphen_files = [file for file in filepaths if "-" in file] ()
* hyphen_files = [file for file in filepaths if "-" in file]

* updating DIRECTORY.md

* Rename recursive-quick-sort.py to recursive_quick_sort.py

* updating DIRECTORY.md

* Rename aho-corasick.py to aho_corasick.py

* updating DIRECTORY.md

* Rename polynom-for-points.py to polynom_for_points.py

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-19 07:13:10 +02:00
Christian Clauss
5f4da5d616
isort --profile black . ()
* 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
Martin Röbke
35319a2a2a
Update build_directory_md.py ()
Propagate argument `top_dir` to good_file_paths.
Previously this argument did not get passed to the helper function when calling print_directory_md.
2020-06-02 21:14:12 +02:00
matkosoric
7f04e5cd34
contribution guidelines checks ()
* spelling corrections

* review

* improved documentation, removed redundant variables, added testing

* added type hint

* camel case to snake case

* spelling fix

* review

* python --> Python # it is a brand name, not a snake

* explicit cast to int

* spaces in int list

* "!= None" to "is not None"

* Update comb_sort.py

* various spelling corrections in documentation & several variables naming conventions fix

* + char in file name

* import dependency - bug fix

Co-authored-by: John Law <johnlaw.po@gmail.com>
2020-03-04 13:40:28 +01:00
Ankur Chattopadhyay
a61b05b10c minor changes in format of DIRECTORY.md () 2019-10-25 19:33:24 +02:00
DanishSheikh1999
13802fcca1 Create greedy.py ()
* Create greedy.py

* Update greedy.py

* Add a doctest and format with black

* Update build_directory_md.py
2019-10-22 10:55:01 +02:00
William Zhang
9eac17a408 psf/black code formatting () 2019-10-05 10:14:13 +05:00
Jai Kumar Dewani
ab25079e16 Update DIRECTORY ()
* Update DIRECTORY

* Updated DIRECTORY

* Fixed bug in directory build and re-build the directory.md

* fixed url issue

* fixed indentation in Directory.md
2019-09-06 11:02:37 +02:00
Christian Clauss
a9ecdb33ca Validate Python filenames () 2019-07-30 15:32:13 +05:30
Christian Clauss
a0817bdcf0
Rewrite build_directory_md.py ()
* Rewrite build_directory_md.py

* Regenerate DIRECTORY.md
2019-07-28 17:27:23 +02:00
Hector S
d72586c5f4 Updated ~script.py per ()
* Added print function into matrix_multiplication_addition.py and removed blank space in data_structures/binary tree directory

* Removed .vs/ folder per 

* Rename matrix_multiplication_addition.py to matrix_operation.py

* Moved and renamed ~script.py to scripts/build_directory_md.py
Updated DIRECTORY.MD file

* Modified .travis.yml per suggestion in 

* Fixed typo per suggestions in 
2019-07-13 21:50:37 +02:00