Merge pull request #24 from cwiki-us-docs/naming_rules

根据学习进程添加一些测试代码
This commit is contained in:
YuCheng Hu 2021-03-19 00:10:11 -04:00 committed by GitHub
commit 4b4e68d22d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 3 deletions

View File

@ -14,6 +14,8 @@ GitHub 上有关 CWIKIUS 的项目:[https://github.com/cwiki-us-docs/cwikius-d
| 网站名称 | URL | NOTE |
|---|---|---|
| WWW.CWIKIUS.CN | [http://www.cwikius.cn/](http://www.cwikius.cn/) | CWIKIUS.CN 一个有独立思考和温度的清新站 |
| [Python - 100天从新手到大师](https://github.com/jackfrued/Python-100-Days) | [https://github.com/jackfrued/Python-100-Days](https://github.com/jackfrued/Python-100-Days) | 我们参考了原作者的一些代码和测试用例。 |
| [Python语言基础50课](https://github.com/jackfrued/Python-Core-50-Courses) | [https://github.com/jackfrued/Python-Core-50-Courses](https://github.com/jackfrued/Python-Core-50-Courses) | 参考了原作者的部分内容和编排目录 |
| WWW.CWIKIUS.CN | [http://www.cwikius.cn/](http://www.cwikius.cn/) | CWIKIUS.CN 一个有独立思考和温度的清新站 |
| [Python 脚本收集](https://github.com/fnplus/Python-scripts-collection) | [https://github.com/fnplus/Python-scripts-collection](https://github.com/fnplus/Python-scripts-collection) | 针对 Python 使用的一些实际脚本的收集 |

View File

@ -1,4 +1,7 @@
yfinance==0.1.54
python-dateutil~=2.8.1
setuptools~=54.0.0
setuptools~=54.0.0
ruamel.yaml
qrcode
Pillow

View File

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
# Python Random String Password
# Author - https://www.ossez.com
# Author - HoneyMoose(huyuchengus@gmail.com)
# Link Article - https://www.ossez.com/c/open-source/python/14
import string
from random import choice
@ -19,6 +20,8 @@ def random_password(length, printable):
if __name__ == "__main__":
3
print(__name__)
amount = int(input("请输入需要生成随机字符串的数量: "))
number = int(input("请输入随机字符串的长度: "))

View File

@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
# Python __name__ module ImportVarName
# Author - HoneyMoose(huyuchengus@gmail.com)
# Link Article - https://www.ossez.com/t/python-name/13393
print("ImportVarName __name__ = %s" % __name__)
if __name__ == "__main__":
print("ImportVarName is being run directly")
else:
print("ImportVarName is being imported")

View File

@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
# Python __name__ module Test
# Author - HoneyMoose(huyuchengus@gmail.com)
# Link Article - https://www.ossez.com/t/python-name/13393
import ImportVarName
print("Main VarName __name__ = %s" % __name__)
if __name__ == "__main__":
print("VarName is being run directly")
else:
print("VarName is being imported")