Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
9640f8c
convert to python
retiman Mar 20, 2025
22217af
temp commit
retiman Mar 20, 2025
00ef47b
build using poetry
retiman Mar 21, 2025
9a0dd56
runs 1.py with make
retiman Mar 21, 2025
e7e1a39
builds with poetry
retiman Mar 21, 2025
444ad48
add numpy
retiman Mar 21, 2025
5d1aa85
adds 53
retiman Mar 21, 2025
76f0786
tmp
retiman Mar 21, 2025
525252a
divisors
retiman Mar 21, 2025
e829aff
add the primes
retiman Mar 21, 2025
40944d6
rename to generate_primes
retiman Mar 21, 2025
dcba26c
memoized divisors
retiman Mar 21, 2025
99fdac4
fixed bug with prime factors
retiman Mar 21, 2025
645ead1
sigma and tau
retiman Mar 21, 2025
15e1807
totient
retiman Mar 21, 2025
ac25b55
48
retiman Mar 21, 2025
c486165
order
retiman Mar 21, 2025
7e5baa2
modular tetration
retiman Mar 21, 2025
7530337
use functools
retiman Mar 21, 2025
b5c0953
2py
retiman Mar 21, 2025
9bcd377
p 1 through 4
retiman Mar 21, 2025
34818d2
reformatted
retiman Mar 21, 2025
40a67ab
removed
retiman Mar 21, 2025
4900b54
problem 5
retiman Mar 21, 2025
c22777a
5
retiman Mar 21, 2025
015f030
poetry for mac
retiman Mar 21, 2025
cedd234
7
retiman Mar 21, 2025
bbc6cc4
8
retiman Mar 21, 2025
e6977d7
9
retiman Mar 21, 2025
6151313
10
retiman Mar 21, 2025
8f3b250
11
retiman Mar 21, 2025
fc74a1b
11
retiman Mar 21, 2025
cef609c
12
retiman Mar 21, 2025
266d4d4
formatting
retiman Mar 21, 2025
85092b0
17
retiman Mar 21, 2025
50a2a3d
18
retiman Mar 21, 2025
66e1f64
22
retiman Mar 21, 2025
23cdf89
24
retiman Mar 21, 2025
a8bbe7e
27
retiman Mar 22, 2025
5f7d139
removed
retiman Mar 22, 2025
d20ec24
27
retiman Mar 22, 2025
7915419
28
retiman Mar 22, 2025
58a5c5c
29
retiman Mar 22, 2025
e1493fc
30
retiman Mar 22, 2025
e0cd283
31
retiman Mar 22, 2025
a4e8906
33
retiman Mar 22, 2025
df57c3b
36
retiman Mar 22, 2025
95c088b
37
retiman Mar 22, 2025
d0ec571
41
retiman Mar 22, 2025
a089a36
69
retiman Mar 22, 2025
c688c4d
76
retiman Mar 22, 2025
4937524
107
retiman Mar 22, 2025
cc70f5c
123
retiman Mar 22, 2025
fc8e942
lints
retiman Mar 22, 2025
049cca9
splitlines
retiman Mar 22, 2025
0aadb9e
cache
retiman Mar 22, 2025
128fbdd
fixes 70
retiman Mar 22, 2025
0e97083
run with implicitg arg
retiman Mar 22, 2025
4617b41
builds
retiman Mar 22, 2025
24bbb34
python
retiman Mar 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.py]
indent_size = 4
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Build and Test
name: Build

on:
pull_request:
paths-ignore:
- CODEOWNERS
- LICENSE
- README.md
push:
Expand All @@ -27,19 +28,31 @@ jobs:
ref: ${{ github.head_ref }}
token: ${{ steps.generate-token.outputs.token }}

- name: Setup NodeJS
uses: actions/setup-node@v3
- name: Setup Python
uses: actions/setup-python@v5
with:
node-version: 20
python-version: '3.13'

- name: Install poetry
run: python -m pip install poetry==2.1.1

- name: Configure poetry
run: poetry config virtualenvs.in-project true

- name: Cache the virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: npm ci
run: poetry install

- name: Fix
run: npm run fix
- name: Run format
run: poetry run format

- name: Build
run: npm run build
- name: Run lint
run: poetry run lint

- name: Commit
if: ${{ github.ref != 'refs/heads/main' }}
Expand All @@ -49,7 +62,3 @@ jobs:
author_name: github-actions[bot]
author_email: github-actions[bot]@github.com
message: Automatic commit via GitHub Actions

- name: Test
if: ${{ steps.commit.outputs.committed == 'false' }}
run: npm run test
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
build/
coverage/
dist/
node_modules/
__pycache__/
.env/
.mypy_cache/
.venv/
.vscode/

*.tgz
.env
*.egg-info/
*.pyc
*.pyo
18 changes: 0 additions & 18 deletions .prettierignore

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: %

%:
npm run test -- -t="problem $@"
poetry run pytest project_euler/$@.py
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@

These are solutions to [Project Euler](https://projecteuler.net/) problems. It's easy to find solutions on the net, so if you don't want to spoil the fun, don't look at these.

## Usage
## Development

1. Run `npm install`.
1. Run `npm run all` to build the entire project.
1. Run `make <NUMBER>` to run a specific solution.

Some solution explanations on the [GitHub Pages](http://retiman.github.io/project-euler/) for this repository (published from the `docs` directory).

Some solutions are written in Racket.
1. Install poetry: `curl -sSL https://install.python-poetry.org | python`
1. Install dependencies: `poetry install`
1. Run tests: `poetry run test`
150 changes: 0 additions & 150 deletions eslint.config.mjs

This file was deleted.

Loading