Skip to content

Commit 90567fd

Browse files
author
William Yang
committed
feat: add Python and Java starters for all stages
1 parent 2355279 commit 90567fd

File tree

26 files changed

+592
-5
lines changed

26 files changed

+592
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ CS50 是哈佛大学的计算机科学入门课程,由 David J. Malan 教授
2828
**macOS / Linux:**
2929

3030
```bash
31-
curl -fsSL https://bootcs.cn/install.sh | bash
31+
curl -fsSL https://bootcs.dev/install.sh | bash
3232
```
3333

3434
安装后直接使用:
@@ -40,15 +40,15 @@ bootcs check cs50/credit
4040
### 方式二:直接使用 Docker
4141

4242
```bash
43-
docker run --rm -v $(pwd):/workspace ghcr.io/bootcs-cn/bootcs-cli:cs50 check cs50/<stage>
43+
docker run --rm -v $(pwd):/workspace ghcr.io/bootcs-dev/bootcs-cli:cs50 check cs50/<stage>
4444
```
4545

4646
### 方式三:设置别名
4747

4848
将以下内容添加到 `~/.zshrc``~/.bashrc`
4949

5050
```bash
51-
alias bootcs='docker run --rm -v $(pwd):/workspace ghcr.io/bootcs-cn/bootcs-cli:cs50'
51+
alias bootcs='docker run --rm -v $(pwd):/workspace ghcr.io/bootcs-dev/bootcs-cli:cs50'
5252
```
5353

5454
然后使用:

course.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ description: README.md
88
summary: |
99
哈佛大学计算机科学入门课程,涵盖 C、Python、SQL 和 Web 开发。
1010
11-
icon: https://cdn.bootcs.cn/icons/cs50.svg
11+
icon: https://cdn.bootcs.dev/icons/cs50.svg
1212
difficulty: medium
1313
status: beta
1414

1515
# 支持的语言(有序,第一个是推荐语言)
1616
languages:
1717
- c
18-
# - python # 未来扩展
18+
- python
19+
- java
1920

2021
# 评测配置
2122
evaluation:
@@ -29,6 +30,7 @@ access:
2930
tags:
3031
- c
3132
- python
33+
- java
3234
- algorithms
3335
- data-structures
3436

stages/cash.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ languages:
2222
blocked:
2323
- "*.o"
2424
- "*.exe"
25+
python:
26+
starter_path: starters/python/cash
27+
check_path: checks/python/cash
28+
files:
29+
required:
30+
- cash.py
31+
allowed:
32+
- "*.py"
33+
blocked:
34+
- "__pycache__"
35+
- "*.pyc"
36+
java:
37+
starter_path: starters/java/cash
38+
check_path: checks/java/cash
39+
files:
40+
required:
41+
- Cash.java
42+
allowed:
43+
- "*.java"
44+
blocked:
45+
- "*.class"
2546

2647
evaluation:
2748
timeout: 60

stages/credit.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ languages:
2222
blocked:
2323
- "*.o"
2424
- "*.exe"
25+
python:
26+
starter_path: starters/python/credit
27+
check_path: checks/python/credit
28+
files:
29+
required:
30+
- credit.py
31+
allowed:
32+
- "*.py"
33+
blocked:
34+
- "__pycache__"
35+
- "*.pyc"
36+
java:
37+
starter_path: starters/java/credit
38+
check_path: checks/java/credit
39+
files:
40+
required:
41+
- Credit.java
42+
allowed:
43+
- "*.java"
44+
blocked:
45+
- "*.class"
2546

2647
evaluation:
2748
timeout: 60

stages/hello.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,25 @@ languages:
2222
blocked:
2323
- "*.o"
2424
- "*.exe"
25+
python:
26+
starter: starters/python/hello
27+
files:
28+
required:
29+
- hello.py
30+
allowed:
31+
- "*.py"
32+
blocked:
33+
- "__pycache__"
34+
- "*.pyc"
35+
java:
36+
starter: starters/java/hello
37+
files:
38+
required:
39+
- Hello.java
40+
allowed:
41+
- "*.java"
42+
blocked:
43+
- "*.class"
2544

2645
# 评测配置
2746
evaluation:

stages/mario-less.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ languages:
2222
blocked:
2323
- "*.o"
2424
- "*.exe"
25+
python:
26+
starter_path: starters/python/mario-less
27+
check_path: checks/python/mario-less
28+
files:
29+
required:
30+
- mario.py
31+
allowed:
32+
- "*.py"
33+
blocked:
34+
- "__pycache__"
35+
- "*.pyc"
36+
java:
37+
starter_path: starters/java/mario-less
38+
check_path: checks/java/mario-less
39+
files:
40+
required:
41+
- Mario.java
42+
allowed:
43+
- "*.java"
44+
blocked:
45+
- "*.class"
2546

2647
evaluation:
2748
timeout: 60

stages/mario-more.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ languages:
2222
blocked:
2323
- "*.o"
2424
- "*.exe"
25+
python:
26+
starter_path: starters/python/mario-more
27+
check_path: checks/python/mario-more
28+
files:
29+
required:
30+
- mario.py
31+
allowed:
32+
- "*.py"
33+
blocked:
34+
- "__pycache__"
35+
- "*.pyc"
36+
java:
37+
starter_path: starters/java/mario-more
38+
check_path: checks/java/mario-more
39+
files:
40+
required:
41+
- Mario.java
42+
allowed:
43+
- "*.java"
44+
blocked:
45+
- "*.class"
2546

2647
evaluation:
2748
timeout: 60

stages/me.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ languages:
2222
blocked:
2323
- "*.o"
2424
- "*.exe"
25+
python:
26+
starter_path: starters/python/me
27+
check_path: checks/python/me
28+
files:
29+
required:
30+
- hello.py
31+
allowed:
32+
- "*.py"
33+
blocked:
34+
- "__pycache__"
35+
- "*.pyc"
36+
java:
37+
starter_path: starters/java/me
38+
check_path: checks/java/me
39+
files:
40+
required:
41+
- Hello.java
42+
allowed:
43+
- "*.java"
44+
blocked:
45+
- "*.class"
2546

2647
evaluation:
2748
timeout: 60

stages/readability.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ languages:
2222
blocked:
2323
- "*.o"
2424
- "*.exe"
25+
python:
26+
starter_path: starters/python/readability
27+
check_path: checks/python/readability
28+
files:
29+
required:
30+
- readability.py
31+
allowed:
32+
- "*.py"
33+
blocked:
34+
- "__pycache__"
35+
- "*.pyc"
36+
java:
37+
starter_path: starters/java/readability
38+
check_path: checks/java/readability
39+
files:
40+
required:
41+
- Readability.java
42+
allowed:
43+
- "*.java"
44+
blocked:
45+
- "*.class"
2546

2647
evaluation:
2748
timeout: 60

stages/scrabble.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ languages:
2222
blocked:
2323
- "*.o"
2424
- "*.exe"
25+
python:
26+
starter_path: starters/python/scrabble
27+
check_path: checks/python/scrabble
28+
files:
29+
required:
30+
- scrabble.py
31+
allowed:
32+
- "*.py"
33+
blocked:
34+
- "__pycache__"
35+
- "*.pyc"
36+
java:
37+
starter_path: starters/java/scrabble
38+
check_path: checks/java/scrabble
39+
files:
40+
required:
41+
- Scrabble.java
42+
allowed:
43+
- "*.java"
44+
blocked:
45+
- "*.class"
2546

2647
evaluation:
2748
timeout: 60

0 commit comments

Comments
 (0)