Skip to content

Commit c29448e

Browse files
committed
家里电脑数据同步
1 parent 82ef65e commit c29448e

21 files changed

Lines changed: 343 additions & 141 deletions

File tree

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Created by .ignore support plugin (hsz.mobi)
22
### Python template
33
# 自定义忽略文件
4-
*.pyc
54
/logs/*.log
65
/logs/*.txt
76
/logs/*.html
@@ -12,6 +11,4 @@
1211
/workModel/work_project/GroupBuy.py
1312
/workModel/work_project/requestsDemo.py
1413
/workModel/work_project/ConnectSql.py
15-
/venv/*
16-
/papi/*.sqlite3
17-
/utils/encrypt/__pycache__/*.pyc
14+
/WorkModel/work_project/groupModel.py

.idea/MyPython.iml

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/shelf/Uncommitted_changes_before_Update_at_2020-11-04_21_21_[Default]/shelved.patch

Lines changed: 82 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/shelf/Uncommitted_changes_before_Update_at_2020-11-04_21_21__Default_.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 154 additions & 90 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FunctionDemo/get_dir_file.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# !/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
# @Author : anne yang
4+
5+
def get_dir_file(pathname):
6+
import os
7+
for root, dirs, files in os.walk(pathname, topdown=False):
8+
for name in files:
9+
print(os.path.join(root, name), '当前目录下的文件遍历')
10+
for name in dirs:
11+
print(os.path.join(root, name), '当前文件夹下的目录遍历')
12+
13+
if __name__ == '__main__':
14+
get_dir_file('../')

FunctionDemo/lambda练习.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# !/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
# @Author : anne yang
4+
5+
a = lambda x, y: x + y
6+
print(a(1, 2))
7+
8+
def fun_a(x, y):
9+
sum = x + y
10+
return sum
11+
print(fun_a(1, 2))
12+
13+
def factorial_fun(n):
14+
if n == 1:
15+
return n
16+
return n * factorial_fun(n-1)
17+
print(factorial_fun(5))
18+
19+
def factorial_fun1(n):
20+
assert n >= 0, 'n不能小于0'
21+
if n <= 1:
22+
return n
23+
return factorial_fun1(n-1) + factorial_fun1(n-2)
24+
print(factorial_fun1(4))

0 commit comments

Comments
 (0)