<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[LXYDAYTOY的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/LXYDAYTOY</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; LXYDAYTOY]]></copyright><item><title><![CDATA[Python爬虫基础5天速成——文件操作、异常处理]]></title><link>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115028710</link><guid>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115028710</guid><author>LXYDAYTOY</author><pubDate>Sat, 20 Mar 2021 17:08:57 +0800</pubDate><description><![CDATA[指路：添加链接描述
文件的操作可以简单归为四种：开、关、读、写
在开文件指令中，要注意两种模式：
r:以只读方式打开文件（默认模式）
w:打开一个文件只用于写入，如果该文件已存在则将其覆盖，否则新建该命名文件。
f = open("test.txt","w")    #如果没有这个文件，会默认在主文件夹下新建一个，"w"代表模式为：写入
f.close()   #关闭文件


文件操作笔记：
#文件操作
'''
f = open("test.txt","w")    #如果没有这个文件，会默认在主文件夹下新]]></description><category></category></item><item><title><![CDATA[Python爬虫基础5天速成——元组、字典、集合]]></title><link>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115027952</link><guid>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115027952</guid><author>LXYDAYTOY</author><pubDate>Sat, 20 Mar 2021 15:02:26 +0800</pubDate><description><![CDATA[指路：添加链接描述
笔记：
#元组 tuple(),元素不可改变
'''
tup1 = ()       #创建空元组
tup2 = (50,)    #只有一个元素也要加逗号
'''

#tup1 = ("abc","def",123,456)
#print(tup1[-1])         #-1代表访问最后一个元素

#增
'''
tup2 = (1,2,"cv")
tup = tup1 + tup2
print(tup)      #连接两个元组
'''

#删
'''
del tup1
prin]]></description><category></category></item><item><title><![CDATA[Python爬虫基础5天速成——列表]]></title><link>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115023355</link><guid>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115023355</guid><author>LXYDAYTOY</author><pubDate>Sat, 20 Mar 2021 11:53:23 +0800</pubDate><description><![CDATA[指路：添加链接描述
常用的列表处理方法——增删改查排

笔记：
#namelist = []   #定义一个空列表

testlist = [1,"aa","bb","cc"]   #列表中可以存储混合类型
'''
print(type(testlist[1]))
print(testlist[0])

length = len(testlist)      #len可以得到列表长度
i = 0
while i &lt; length:
    print(testlist[i])
    i += 1
']]></description><category></category></item><item><title><![CDATA[Python爬虫基础5天速成——字符串]]></title><link>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115023057</link><guid>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115023057</guid><author>LXYDAYTOY</author><pubDate>Sat, 20 Mar 2021 10:09:28 +0800</pubDate><description><![CDATA[指路：添加链接描述
'''
my_str = "I'm a student"        #单引号和双引号的区别
print(my_str)
your_str = 'I\'m a student'     #单引号易与英文字符混淆，可加\变为转义字符加以区分
print(your_str)
'''

str = "beijing"
print(str[0:5])     #注意中间用冒号分隔而不是逗号
print(str[2:])      #从第二个开始输到最后
print(str + ",你好")

]]></description><category></category></item><item><title><![CDATA[Python爬虫基础5天速成——循环控制语句]]></title><link>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115022493</link><guid>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115022493</guid><author>LXYDAYTOY</author><pubDate>Sat, 20 Mar 2021 09:38:41 +0800</pubDate><description><![CDATA[指路：添加链接描述
本节课笔记：
'''
for i in range(5):
    print(i)        #区间取左不取右，输出0，1，2，3，4
'''

'''
for i in range(0,11,3):     #步进值为3
    print(i)
'''
'''
name = "beijing"
for x in name:
    print(x,end='\t')       #输出字符串中的每个字符
'''
'''
a = ["aa","bb","cc","dd"]
for]]></description><category></category></item><item><title><![CDATA[Python爬虫基础5天速成——条件判断语句]]></title><link>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115013864</link><guid>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115013864</guid><author>LXYDAYTOY</author><pubDate>Sat, 20 Mar 2021 09:00:29 +0800</pubDate><description><![CDATA[1、pycharm不能直接输出表达式，要加print
e.g.
结果输出：

2、格式化输出
#格式化输出

age = 21
print("I'm %d years old"%age)   #注意“ ”后不加逗号
print("My name is %s, I'm from %s"%("lu","China"))     #如果同时输出两个，%（ ，）

print("a","b","c")
print("www","Google","com",sep=".")     #sep代表分隔符为.
print]]></description><category></category></item><item><title><![CDATA[关于python的解释器、编辑器、库管理器等]]></title><link>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115011513</link><guid>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/115011513</guid><author>LXYDAYTOY</author><pubDate>Fri, 19 Mar 2021 17:41:43 +0800</pubDate><description><![CDATA[用了半个学期的python了，关于它的配置还有环境都不明白。在这里整体梳理以下。
一、解释器
用来将我们编程写的高级语言转换为机器语言的工具。在官网下载的python 2.7、python 3.8等都是解释器。
二、编辑器
用来编写代码的工具。python中会自带idle,可以用来编写代码，但比较简单，功能不强。其他如Pycharm、Spyder、Jupyter Notebook等都是此类编辑器。
三、库（包）管理器
pip(package installer for python),是专门的包管理器，一般]]></description><category></category></item><item><title><![CDATA[Pytorch深度学习实践（二）—— 线性模型]]></title><link>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/113061063</link><guid>https://blog.youkuaiyun.com/LXYDAYTOY/article/details/113061063</guid><author>LXYDAYTOY</author><pubDate>Sat, 23 Jan 2021 20:58:25 +0800</pubDate><description><![CDATA[import numpy as np
import matplotlib.pyplot as plt

x_data = [1.0, 2.0, 3.0]
y_data = [2.0, 4.0, 6.0]

def forward(x):
    return x * w

def loss(x, y):
    y_pred = forward(x)
    return (y_pred - y) * (y_pred - y)

w_list = []
mse_list = []
for w in np.a]]></description><category></category></item></channel></rss>