Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply flake8 suggestions #34

Merged
merged 2 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.5
python-version: 3.11
- run: pip install --upgrade pip aheui
- run: bash test.sh --disable logo
env:
Expand Down
8 changes: 7 additions & 1 deletion _tools/aheuilize/aheuilize.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import math


def divide(a):
b = int(a / 2)
if a % 2 == 1:
return [b, b + 1]
return [b, b]


def factorization(a):
primes = []
factor = 2
Expand All @@ -18,6 +20,7 @@ def factorization(a):
a = int(a / factor)
return primes


def compress_factors(a):
is_first_2 = True
is_first_3 = True
Expand Down Expand Up @@ -47,6 +50,7 @@ def compress_factors(a):
result.append(3)
return result


def is_prime(a):
sqrt = int(math.sqrt(a))
if a < 2:
Expand All @@ -56,6 +60,7 @@ def is_prime(a):
i += 1
return sqrt + 1 == i


def number2Aheui(a):
cnt = -1
result = ""
Expand All @@ -78,8 +83,9 @@ def number2Aheui(a):
result += "따"
return result


def trace2Aheui(a):
result = ""
for i in range(len(a)):
result += number2Aheui(ord(a[i]))+"맣"
result += number2Aheui(ord(a[i])) + "맣"
return result
Loading