Skip to content

Commit 263aa4d

Browse files
committed
init
1 parent c6f65a8 commit 263aa4d

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

easyleetcode/config.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88

99
root_path = os.path.dirname(__file__)
1010

11-
statics = StaticFiles(directory=os.path.join(root_path, 'web/static'))
12-
templates = Jinja2Templates(directory=os.path.join(root_path, 'web/templates'))
13-
python_path = 'python3 '
14-
count_day = os.path.join(root_path, 'logs/count_day.txt')
15-
count_view_code = os.path.join(root_path, 'logs/count_view_code.txt')
11+
web_path = os.path.join(root_path, 'web')
12+
logs_path = os.path.join(root_path, 'logs')
13+
s_path = os.path.join(web_path, 'static')
14+
statics = StaticFiles(directory=s_path)
1615

16+
templates = Jinja2Templates(directory=os.path.join(web_path, 'templates'))
17+
python_path = 'python3 '
18+
count_day = os.path.join(logs_path, 'count_day.txt')
19+
count_view_code = os.path.join(logs_path, 'count_view_code.txt')

easyleetcode/leetcodes_md/L_001_Two_Sum.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
```
66
class Solution(object):
7-
# 思路1
87
def twoSum(self, nums, target):
98
nums_index = [(v, index) for index, v in enumerate(nums)]
109
nums_index.sort()
@@ -17,7 +16,6 @@ class Solution(object):
1716
begin += 1
1817
else:
1918
end -= 1
20-
# 思路2
2119
def twoSum2(self, nums, target):
2220
hashset = {}
2321
for i, m in enumerate(nums):

easyleetcode/logs/count_day.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2
1+
3

easyleetcode/logs/count_view_code.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2
1+
3

easyleetcode/web/code_all_in_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def get_all_code_map(code_dir=os.path.join(root_path, 'leetcodes'),
2222

2323

2424
def get_file_read(path: str):
25-
pycode = open(path).read()
25+
pycode = open(path,encoding='utf-8').read()
2626
return pycode
2727

2828

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name="easyleetcode",
12-
version="1.3.0",
12+
version="1.4.1",
1313
keywords=("easyleetcode", "bilibili", 'youtube', 'leetcode'),
1414
description="Leetcode easy study use Python on web",
1515
long_description=long_description,
@@ -21,5 +21,5 @@
2121
packages=find_packages(),
2222
include_package_data=True,
2323
platforms="any",
24-
install_requires=['uvicorn', 'fastapi', 'pydantic', 'aiofiles']
24+
install_requires=['uvicorn', 'fastapi', 'pydantic', 'aiofiles', 'jinja2']
2525
)

0 commit comments

Comments
 (0)