mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-17 14:58:10 +00:00
actions/setup-python@v2 (#1986)
* actions/setup-python@v2 * fixup! Format Python code with psf/black push * Update autoblack.yml * updating DIRECTORY.md * Update codespell.yml Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
parent
a29a2a3a06
commit
565060aa99
2
.github/workflows/autoblack.yml
vendored
2
.github/workflows/autoblack.yml
vendored
|
@ -10,7 +10,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1 # Use v1, NOT v2
|
- uses: actions/checkout@v1 # Use v1, NOT v2
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v2
|
||||||
- run: pip install black
|
- run: pip install black
|
||||||
- run: black --check .
|
- run: black --check .
|
||||||
- name: If needed, commit black changes to a new pull request
|
- name: If needed, commit black changes to a new pull request
|
||||||
|
|
2
.github/workflows/codespell.yml
vendored
2
.github/workflows/codespell.yml
vendored
|
@ -7,7 +7,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v2
|
||||||
- run: pip install codespell flake8
|
- run: pip install codespell flake8
|
||||||
- run: |
|
- run: |
|
||||||
SKIP="./.*,./other/dictionary.txt,./other/words,./project_euler/problem_22/p022_names.txt"
|
SKIP="./.*,./other/dictionary.txt,./other/words,./project_euler/problem_22/p022_names.txt"
|
||||||
|
|
4
.github/workflows/directory_writer.yml
vendored
4
.github/workflows/directory_writer.yml
vendored
|
@ -7,7 +7,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1 # v1, NOT v2
|
- uses: actions/checkout@v1 # v1, NOT v2
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- name: Write DIRECTORY.md
|
- name: Write DIRECTORY.md
|
||||||
|
@ -20,4 +20,4 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git add DIRECTORY.md
|
git add DIRECTORY.md
|
||||||
git commit -am "updating DIRECTORY.md" || true
|
git commit -am "updating DIRECTORY.md" || true
|
||||||
git push --force origin HEAD:$GITHUB_REF || true
|
git push --force origin HEAD:$GITHUB_REF || true
|
||||||
|
|
|
@ -293,6 +293,7 @@
|
||||||
* [Abs Max](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_max.py)
|
* [Abs Max](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_max.py)
|
||||||
* [Abs Min](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_min.py)
|
* [Abs Min](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_min.py)
|
||||||
* [Add](https://github.com/TheAlgorithms/Python/blob/master/maths/add.py)
|
* [Add](https://github.com/TheAlgorithms/Python/blob/master/maths/add.py)
|
||||||
|
* [Aliquot Sum](https://github.com/TheAlgorithms/Python/blob/master/maths/aliquot_sum.py)
|
||||||
* [Allocation Number](https://github.com/TheAlgorithms/Python/blob/master/maths/allocation_number.py)
|
* [Allocation Number](https://github.com/TheAlgorithms/Python/blob/master/maths/allocation_number.py)
|
||||||
* [Area Under Curve](https://github.com/TheAlgorithms/Python/blob/master/maths/area_under_curve.py)
|
* [Area Under Curve](https://github.com/TheAlgorithms/Python/blob/master/maths/area_under_curve.py)
|
||||||
* [Armstrong Numbers](https://github.com/TheAlgorithms/Python/blob/master/maths/armstrong_numbers.py)
|
* [Armstrong Numbers](https://github.com/TheAlgorithms/Python/blob/master/maths/armstrong_numbers.py)
|
||||||
|
|
|
@ -65,5 +65,6 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
# Let's benchmark them side-by-side...
|
# Let's benchmark them side-by-side...
|
||||||
from timeit import timeit
|
from timeit import timeit
|
||||||
|
|
||||||
print(timeit("slow_primes(1_000_000)", setup="from __main__ import slow_primes"))
|
print(timeit("slow_primes(1_000_000)", setup="from __main__ import slow_primes"))
|
||||||
print(timeit("primes(1_000_000)", setup="from __main__ import primes"))
|
print(timeit("primes(1_000_000)", setup="from __main__ import primes"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user