修改Python项目并补充Readme.md

This commit is contained in:
Crany-web
2025-01-10 17:02:37 +08:00
parent dfbc7900f1
commit 32fc85abfd
42 changed files with 33 additions and 21 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
# 执行
```shell
$ cd Awesome-Love-Code/Python/001
$ python3 -m venv ./venv && source venv/bin/activate
$ python3 -m pip install pygame
$ cd be_my_girlfriend
$ python3 love.py
```
+1 -1
View File
@@ -10,7 +10,7 @@ import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')
[x, t] = np.meshgrid(
np.array(range(25)) / 24.0,
np.arange(0, 575.5, 0.5) / 575 * 30 * np.pi - 4 * np.pi)
+1 -1
View File
@@ -3,7 +3,7 @@ import matplotlib.pyplot as plt
from matplotlib import cm
fig = plt.figure()
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')
[x, t] = np.meshgrid(
np.array(range(25)) / 24.0,
np.arange(0, 575.5, 0.5) / 575 * 17 * np.pi - 2 * np.pi)
+1 -1
View File
@@ -3,7 +3,7 @@ import matplotlib.pyplot as plt
from matplotlib import cm
fig = plt.figure()
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')
[x, t] = np.meshgrid(
np.array(range(25)) / 24.0,
np.arange(0, 575.5, 0.5) / 575 * 17 * np.pi - 2 * np.pi)
+1 -1
View File
@@ -2,7 +2,7 @@ import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')
# 将相位向后移动了6*pi
[x, t] = np.meshgrid(
np.array(range(25)) / 24.0,
+1 -1
View File
@@ -2,7 +2,7 @@ import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')
[x, t] = np.meshgrid(
np.array(range(25)) / 24.0,
np.arange(0, 575.5, 0.5) / 575 * 6 * np.pi - 4 * np.pi)
+4 -4
View File
@@ -1,16 +1,16 @@
# 安装所需库
```
pip install pillow
pip install matplotlib
pip install numpy
python3 -m venv venv && source venv/bin/activate
pip3 install pillow matplotlib numpy
```
# 运行
```
python 文件名.py
python code/flower_{x}.py.py
```
> 上面命令中的{x}表示可以替换为1-6的数值
![](./img/eg.png)
+3 -9
View File
@@ -1,22 +1,16 @@
# 安装所需库
```
pip install matplotlib
pip install numpy
python3 -m venv venv && source venv/bin/activate
pip3 install matplotlib numpy
```
# 运行
```
python 文件名.py
python3 love.py
```
![](./img/eg.jpg)
# 运行
```
python 文件名.py
```
![](./img/1.jpg)
+3 -2
View File
@@ -1,13 +1,14 @@
# 安装依赖
```
pip install turtle
python3 -m venv venv && source venv/bin/activate
pip3 install turtle
```
# 运行
```
python 文件名.py
python index.py
```
# 效果
Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

+16
View File
@@ -0,0 +1,16 @@
# 安装依赖
```
python3 -m venv venv && source venv/bin/activate
pip3 install opencv-python scipy
```
# 运行
```
python3 main.py
```
# 效果
![](../../assets/img/python/010.png)
Binary file not shown.

After

Width:  |  Height:  |  Size: 630 KiB