Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Kwan的解忧杂货铺@新空间代码工作室
python-demo
提交
e17c86ef
P
python-demo
项目概览
Kwan的解忧杂货铺@新空间代码工作室
/
python-demo
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
python-demo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e17c86ef
编写于
7月 04, 2023
作者:
Kwan的解忧杂货铺@新空间代码工作室
🐭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:整理
上级
3520ef46
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
42 addition
and
16 deletion
+42
-16
.idea/workspace.xml
.idea/workspace.xml
+13
-16
14_http/http_01.py
14_http/http_01.py
+6
-0
14_http/http_02.py
14_http/http_02.py
+5
-0
14_http/http_03.py
14_http/http_03.py
+11
-0
14_http/http_04.py
14_http/http_04.py
+7
-0
未找到文件。
.idea/workspace.xml
浏览文件 @
e17c86ef
...
...
@@ -4,11 +4,7 @@
<option
name=
"autoReloadType"
value=
"SELECTIVE"
/>
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"6e2dcba5-8bc3-4d83-9a9c-00cb8e922bae"
name=
"Changes"
comment=
"fix:项目分开处理"
>
<change
afterPath=
"$PROJECT_DIR$/13_高级技巧/13_numpy.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/python-demo.iml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/python-demo.iml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
</list>
<list
default=
"true"
id=
"6e2dcba5-8bc3-4d83-9a9c-00cb8e922bae"
name=
"Changes"
comment=
"fix:numpy 使用"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_NON_ACTIVE_CHANGELIST"
value=
"false"
/>
...
...
@@ -251,14 +247,7 @@
<workItem
from=
"1688352051008"
duration=
"671000"
/>
<workItem
from=
"1688353213007"
duration=
"54000"
/>
<workItem
from=
"1688358752469"
duration=
"1216000"
/>
<workItem
from=
"1688391371881"
duration=
"2757000"
/>
</task>
<task
id=
"LOCAL-00004"
summary=
"fix:成员方法"
>
<created>
1685543714594
</created>
<option
name=
"number"
value=
"00004"
/>
<option
name=
"presentableId"
value=
"LOCAL-00004"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1685543714594
</updated>
<workItem
from=
"1688391371881"
duration=
"2793000"
/>
</task>
<task
id=
"LOCAL-00005"
summary=
"fix:自己的key不行"
>
<created>
1685544241606
</created>
...
...
@@ -596,7 +585,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1688347105382
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"53"
/>
<task
id=
"LOCAL-00053"
summary=
"fix:numpy 使用"
>
<created>
1688438009416
</created>
<option
name=
"number"
value=
"00053"
/>
<option
name=
"presentableId"
value=
"LOCAL-00053"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1688438009417
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"54"
/>
<servers
/>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
...
@@ -616,7 +612,6 @@
</component>
<component
name=
"VcsManagerConfiguration"
>
<option
name=
"CHECK_NEW_TODO"
value=
"false"
/>
<MESSAGE
value=
"fix:整理知识点"
/>
<MESSAGE
value=
"fix:异步执行"
/>
<MESSAGE
value=
"fix:算法题目"
/>
<MESSAGE
value=
"fix:移除元素"
/>
...
...
@@ -641,7 +636,8 @@
<MESSAGE
value=
"fix:链表 两数相加"
/>
<MESSAGE
value=
"fix:删除chatgpt"
/>
<MESSAGE
value=
"fix:项目分开处理"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"fix:项目分开处理"
/>
<MESSAGE
value=
"fix:numpy 使用"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"fix:numpy 使用"
/>
</component>
<component
name=
"XDebuggerManager"
>
<breakpoint-manager>
...
...
@@ -757,6 +753,7 @@
<SUITE
FILE_PATH=
"coverage/python_demo$problem_solving_09.coverage"
NAME=
"problem_solving_09 Coverage Results"
MODIFIED=
"1687436865797"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/14_刷题"
/>
<SUITE
FILE_PATH=
"coverage/python_demo$problem_solving_26.coverage"
NAME=
"problem_solving_26 Coverage Results"
MODIFIED=
"1688180543971"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/14_刷题/day03"
/>
<SUITE
FILE_PATH=
"coverage/python_demo$problem_solving_03.coverage"
NAME=
"problem_solving_03 Coverage Results"
MODIFIED=
"1687394007041"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/14_刷题"
/>
<SUITE
FILE_PATH=
"coverage/python_demo$13_numpy.coverage"
NAME=
"13_numpy Coverage Results"
MODIFIED=
"1688437985729"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/13_高级技巧"
/>
<SUITE
FILE_PATH=
"coverage/python_demo$test.coverage"
NAME=
"test Coverage Results"
MODIFIED=
"1687173284032"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/05_数据容器"
/>
<SUITE
FILE_PATH=
"coverage/python_demo$problem_solving_15.coverage"
NAME=
"problem_solving_15 Coverage Results"
MODIFIED=
"1687503685240"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/14_刷题/day02"
/>
<SUITE
FILE_PATH=
"coverage/python_demo$01_2_while_1_100.coverage"
NAME=
"01_2_while循环练习题_求1-100的和 Coverage Results"
MODIFIED=
"1685618959790"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/04_Python循环语句"
/>
...
...
14_http/http_01.py
0 → 100644
浏览文件 @
e17c86ef
# 使用urllib发送GET请求的示例代码如下:
import
urllib.request
response
=
urllib
.
request
.
urlopen
(
'https://www.baidu.com/'
)
html
=
response
.
read
()
print
(
html
)
14_http/http_02.py
0 → 100644
浏览文件 @
e17c86ef
# 使用requests发送GET请求的示例代码如下:
import
requests
response
=
requests
.
get
(
'https://www.baidu.com/'
)
print
(
response
.
text
)
14_http/http_03.py
0 → 100644
浏览文件 @
e17c86ef
# 对于POST请求,您可以通过向请求函数传递data参数来发送数据,如下所示:
import
urllib.request
import
urllib.parse
url
=
'https://www.baidu.com/'
values
=
{
'name'
:
'John'
,
'age'
:
25
}
data
=
urllib
.
parse
.
urlencode
(
values
)
data
=
data
.
encode
(
'ascii'
)
# data应该是bytes类型
req
=
urllib
.
request
.
Request
(
url
,
data
)
response
=
urllib
.
request
.
urlopen
(
req
)
print
(
response
.
read
())
14_http/http_04.py
0 → 100644
浏览文件 @
e17c86ef
# 使用requests发送POST请求的示例代码如下:
import
requests
url
=
'https://www.baidu.com/'
values
=
{
'name'
:
'John'
,
'age'
:
25
}
response
=
requests
.
post
(
url
,
data
=
values
)
print
(
response
.
text
)
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录