Skip to content

Commit 4e2eb9b

Browse files
committed
Sync from private repo
1 parent 5b7530a commit 4e2eb9b

217 files changed

Lines changed: 5925 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Sync to public repo (project-euler)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
sync:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout private repo (project-euler-full)
15+
uses: actions/checkout@v4
16+
17+
- name: Show files in private repo
18+
run: |
19+
echo "✅ Current directory: $(pwd)"
20+
echo "✅ Files:"
21+
ls -lah
22+
23+
- name: Checkout public repo into subfolder
24+
uses: actions/checkout@v4
25+
with:
26+
repository: aryans-15/project-euler
27+
token: ${{ secrets.TARGET_REPO_PAT }}
28+
path: public-repo
29+
30+
- name: Sync files to public repo
31+
run: |
32+
echo "✅ Copying files to public repo..."
33+
rsync -av --delete --exclude='.git' ./ public-repo/
34+
echo "✅ Files now in public repo:"
35+
ls -lah public-repo
36+
37+
- name: Commit & push to public repo
38+
run: |
39+
cd public-repo
40+
git config user.name "Aryan Sharma"
41+
git config user.email "aryan.sharma0714@gmail.com"
42+
git add .
43+
echo "✅ Staged changes:"
44+
git status -s
45+
git commit -m "Sync from private repo" || echo "Nothing to commit"
46+
git push
47+
echo "🎉 Sync complete!"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
def B(n):
2+
inc, dec = False, False
3+
for i in range(1, len(n)):
4+
inc = inc or n[i] > n[i-1]
5+
dec = dec or n[i] < n[i-1]
6+
return inc and dec
7+
8+
bouncy, total = 0, 1
9+
10+
while abs(bouncy/total - 0.99) > 1e-9:
11+
total += 1
12+
if B(str(total)):
13+
bouncy += 1
14+
15+
print(total)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
| Problem | Library |
2+
| -------- | ------- |
3+
| 17 | [inflect](https://pypi.org/project/inflect/) |
4+
| 54 | [treys](https://pypi.org/project/treys/) |
5+
| 96 | [python-constraint](https://pypi.org/project/python-constraint/) |
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Python solutions to the first 100 Project Euler problems. All programs will run in <1min. Due to Python supporting arbitrary-precision integers, some solutions are likely unintended. Furthermore, certain solutions use external libraries, as detailed in LIBRARIES.md (to prevent spoilers).
2+
3+
Please feel free to open a PR if you find any issues or have any suggestions!
4+
5+
![Full Project Euler profile](https://projecteuler.net/profile/aryans15.png)

public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/files/p22.txt

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/public-repo/files/p42.txt

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)