【风变】Python爬虫精进复习-20240430

参考笔记

下面给出一个巨佬学习风变pyhton基础语法和爬虫精进的笔记(链接)
风变编程笔记(一)-Python基础语法
风变编程笔记(二)-Python爬虫精进

技术总结

request + BeautifulSoup
selenium + BeautifulSoup

练习0-1:文章下载

import requests
res=requests.get('https://localprod.pandateacher.com/python-manuscript/crawler-html/exercise/HTTP%E5%93%8D%E5%BA%94%E7%8A%B6%E6%80%81%E7%A0%81.md')
files=res.text
print(files)
myfiles=open('myfiles.txt','w+')
myfiles.write(files)
myfiles.close()

练习0-2:图像下载

import requests
res=requests.get('https://res.pandateacher.com/2019-01-12-15-29-33.png')
pic = res.content
photo = open('ppt1.jpg','wb')
#新建了一个文件ppt.jpg,这里的文件没加路径,它会被保存在程序运行的当前目录下。
#图片内容需要以二进制wb读写。你在学习open()函数时接触过它。
photo.write(pic) 
#获取pic的二进制内容
photo.close()

练习0-3:音频下载

import requests
rec=requests.get('https://static.pandateacher.com/Over%20The%20Rainbow.mp3')
req=rec.content
mymusic=open('mymusic1.mp3','wb')
mymusic.write(req)
mymusic.close()

练习1-1:我的书苑我做主

必做:
修改网页标题
增加至少一本书的描述
修改网页底部

选做:
修改已有书籍的描述
增加多本书的描述
自由地在HTML文档上修改任意内容

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>这个书苑不太冷5.0</title>
        <style>
        a {
            text-decoration: none;
        }

        body {
            margin: 0;
            width:100%;
            height: 100%;
        }

        #header {
            background-color:#0c1f27;
            color:#20b2aa;
            text-align:center;
            padding:15px;
        }
        
        #nav {
            line-height:60px;
            background-color:#e0f2f0;
            width:80px;
            padding:30px;
            position: absolute;
            left: 0;
            top:0;
            bottom: 0;
        }

        #footer {
            background-color:#0c1f27;
            color:#20b2aa;
            clear:both;
            text-align:center;
            padding:35px;
        }

        #main {
            margin-left: 140px;
            padding-left: 150px;
            padding-right: 220px;
            overflow: scroll;
        }

        #article {
            display: flex;
            position: relative;
        }

        .catlog{
            font-size:20px;
            color:black;
            font-family: sans-serif;
        }

        .title {
            color:#20b2aa;
            font-size:20px;
        }

        .img {
            width: 185px;
            height: 266px;
        }
        </style>
    </head>

    <body>
        <div id="header">
        <h1 style="font-size:50px;">这个书苑不太冷</h1>
        </div>

        <div id="article">
            <div id="nav">
                <a href="#type1" class="catlog">科幻小说</a><br>
                <a href="#type2" class="catlog">人文读物</a><br>
                <a href="#type3" class="catlog">技术参考</a><br>
            </div>
            <div id="main">
                <div class="books">
                    <h2><a name="type1">科幻小说</a></h2>
                    <a href="https://book.douban.com/subject/27077140/" class="title">《奇点遗民》</a>
                    <p class="info">本书精选收录了刘宇昆的科幻佳作共22篇。《奇点遗民》融入了科幻艺术吸引人的几大元素:数字化生命、影像化记忆、人工智能、外星访客……刘宇昆的独特之处在于,他写的不是科幻探险或英雄奇幻,而是数据时代里每个人的生活和情感变化。透过这本书,我们看到的不仅是未来还有当下。</p> 
                    <img class="img" src="https://img3.doubanio.com/view/subject/l/public/s29492583.jpg">
                    <br/>
                    <br/>
                    <hr size="1">
                </div>
                <div class="books">
                    <h2><a name="type2">人文读物</a></h2>
                    <a href="https://book.douban.com/subject/26943161/" class="title">《未来简史》</a>
                    <p class="info">未来,人类将面临着三大问题:生物本身就是算法,生命是不断处理数据的过程;意识与智能的分离;拥有大数据积累的外部环境将比我们自己更了解自己。如何看待这三大问题,以及如何采取应对措施,将直接影响着人类未来的发展。</p> 
                    <img class="img" src="https://img3.doubanio.com/view/subject/l/public/s29287103.jpg">
                    <br/>
                    <br/>
                    <hr size="1">
                </div>
                
                <div class="books">
                    <h2><a name="type3">技术参考</a></h2>
                    <a href="https://book.douban.com/subject/25779298/" class="title">《利用Python进行数据分析》</a>
                    <p class="info">本书含有大量的实践案例,你将学会如何利用各种Python库(包括NumPy、pandas、matplotlib以及IPython等)高效地解决各式各样的数据分析问题。由于作者Wes McKinney是pandas库的主要作者,所以本书也可以作为利用Python实现数据密集型应用的科学计算实践指南。本书适合刚刚接触Python的分析人员以及刚刚接触科学计算的Python程序员。</p> 
                    <img class="img" src="ttps://img3.doubanio.com/view/subject/l/public/s27275372.jpg">
                    <br/>
                    <br/>
                    <hr size="1">
                </div>
            </div>
        </div>

        <div id="footer">Copyright © ForChange 风变科技
        </div>
    </body>
</html>

第2关:这个书苑不太冷(静态网页)

目标网址:https://localprod.pandateacher.com/python-manuscript/crawler-html/spider-men5.0.html
即爬取这个书苑不太冷网站中每本书的类型、名字、链接和简介的文字

# 调用requests库
import requests 
# 调用BeautifulSoup库
from bs4 import BeautifulSoup 
# 返回一个response对象,赋值给res
res =requests.get('https://localprod.pandateacher.com/python-manuscript/crawler-html/spider-men5.0.html')
# 把res解析为字符串
html=res.text
# 把网页解析为BeautifulSoup对象
soup = BeautifulSoup( html,'html.parser')
# 通过匹配属性class='books'提取出我们想要的元素
items = soup.find_all(class_='books')  
# 遍历列表items
for item in items:       
    # 在列表中的每个元素里,匹配标签<h2>提取出数据               
    kind = item.find('h2')     
    #  在列表中的每个元素里,匹配属性class_='title'提取出数据          
    title = item.find(class_='title')  
    # 在列表中的每个元素里,匹配属性class_='info'提取出数据   
    brief = item.find(class_='info')      
    # 打印书籍的类型、名字、链接和简介的文字
    print(kind.text,'\n',title.text,'\n',title['href'],'\n',brief.text) 

练习2-1:博客爬虫

目标网址:https://wordpress-edu-3autumn.localprod.oc.forchange.cn/all-about-the-future_04/
在这里插入图片描述

在这里插入图片描述

import requests
from bs4 import BeautifulSoup

res=requests.get('https://wordpress-edu-3autumn.localprod.oc.forchange.cn/all-about-the-future_04/')
html=res.text
soup=BeautifulSoup(html,'html.parser')
Aitems=soup.find(class_='comment-list')#用find找出大的地址
items=Aitems.find_all('article')#在大的地址中用find_all来找出小地址的列表

for item in items:
    user1=item.find('b') #    user1=item.find(class_='fn')
    comment1=item.find(class_='comment-content')
    print('评论者',user1.text,'\n','评论',comment1.text)

练习2-2:书店寻宝

目标网址:http://books.toscrape.com/
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

import requests
from bs4 import BeautifulSoup

res=requests.get('http://books.toscrape.com/')
html=res.text
soup=BeautifulSoup(html,'html.parser')
items=soup.find('ul',class_='nav nav-list').find('li').find('ul').find_all('li')

'''
for item in items:
    fenlei=item.find('a')
    print((fenlei.text).strip())
    with open('doc3.doc','a+') as doc3:
        doc3.write((fenlei.text).strip())
        doc3.write('\n')
'''

item_book=soup.find('ol',class_='row').find_all('li')
#print(item_book)

for item in item_book:
    item_name=item.find('article',class_='product_pod').find('h3').find('a')
    item_price=item.find('article',class_='product_pod').find('div',class_='product_price').find('p',class_='price_color')
    item_rate=item.find('article',class_='product_pod').find('p')
#    print(item_rate['class'][1])
#    print(item_name['title'],'\t')
#    print(item_price.text)
#    print(item_name['title'],'\t',item_price.text)
    print(item_name['title'],'\t',item_price.text,'\t',item_rate['class'][1])

练习2-3:博客文章

目标网址:https://wordpress-edu-3autumn.localprod.oc.forchange.cn/
在这里插入图片描述

import requests
from bs4 import BeautifulSoup

res=requests.get('https://wordpress-edu-3autumn.localprod.oc.forchange.cn/')
html=res.text
soup=BeautifulSoup(html,'html.parser')
Aitems=soup.find(id='main')#用find找出大的地址
items=Aitems.find_all('article')#在大的地址中用find_all来找出小地址的列表

for item in items:
    item1=item.find(class_="entry-title") 
    item2=item.find(class_='entry-date published')
    item3=item.find('h2').find('a')['href']
    print('标题',item1.text,'\n','时间',item2.text,'\n','链接',item3)

第3关:下厨房

目标网址:https://www.xiachufang.com/explore/
在这里插入图片描述

写一个循环,提取当前页面的所有菜名、URL、食材,并将它存入列表。其中每一组菜名、URL、食材是一个小列表,小列表组成一个大列表。

# 引用requests库
import requests
# 引用BeautifulSoup库
from bs4 import BeautifulSoup

# 获取数据
res_foods = requests.get('http://www.xiachufang.com/explore/')
# 解析数据
bs_foods = BeautifulSoup(res_foods.text,'html.parser')
# 查找最小父级标签
list_foods = bs_foods.find_all('div',class_='info pure-u')

# 创建一个空列表,用于存储信息
list_all = []

for food in list_foods:
    # 提取第0个父级标签中的<a>标签
    tag_a = food.find('a')
    # 菜名,使用[17:-13]切掉了多余的信息
    name = tag_a.text[17:-13]
    # 获取URL
    URL = 'http://www.xiachufang.com'+tag_a['href']
    # 提取第0个父级标签中的<p>标签
    tag_p = food.find('p',class_='ing ellipsis')
    # 食材,使用[1:-1]切掉了多余的信息
    ingredients = tag_p.text[1:-1]
    # 将菜名、URL、食材,封装为列表,添加进list_all
    list_all.append([name,URL,ingredients])

# 打印
print(list_all)

我的做法:顺便下载图片(大同小异)

import requests
from bs4 import BeautifulSoup


headers = {
    'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36',
    # 标记了请求从什么设备,什么浏览器上发出
    }


res=requests.get('https://www.xiachufang.com/explore/',headers=headers)
html=res.text
soup=BeautifulSoup(html,'html.parser')
Aitems=soup.find(class_='normal-recipe-list')#用find找出大的地址
items=Aitems.find_all('li')#在大的地址中用find_all来找出小地址的列表

item_list = []

for item in items:
    item1=item.find(class_="name") .text.replace('\n\n                ','').replace('\n            \n\n','').replace('\n','').replace('\n','')
    item2=item.find(class_='ing ellipsis').text.replace('\n','').replace('\n','').replace('\n','')
    item3=item.find('a')['href']
    item4=item.find('img')['data-src']
    item_list.append([item1,item2,'https://www.xiachufang.com/'+item3])
    print('菜名',item1,'\n','材料',item2,'\n','链接',item3,'图片链接',item4)

    res=requests.get(item4)
    pic = res.content
    photo = open(item1+'.jpg','wb')
    photo.write(pic) 
    photo.close()
#print(item_list)

在这里插入图片描述

练习3-1:豆瓣电影爬虫

目标网址:https://movie.douban.com/top250?start=25&filter=
在这里插入图片描述

在这里插入图片描述

import requests, bs4

# 为躲避反爬机制,伪装成浏览器的请求头
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36'}

for x in range(10):
    url = 'https://movie.douban.com/top250?start=' + str(x*25) + '&filter='
    res = requests.get(url, headers=headers)
    bs = bs4.BeautifulSoup(res.text, 'html.parser')
    bs = bs.find('ol', class_="grid_view")
    for titles in bs.find_all('li'):
        num = titles.find('em',class_="").text
        #查找序号
        title = titles.find('span', class_="title").text
        #查找电影名
        tes = titles.find('span',class_="inq").text
        #查找推荐语
        comment = titles.find('span',class_="rating_num").text
        #查找评分
        url_movie = titles.find('a')['href']

        print(num + '.' + title + '——' + comment + '\n' + '推荐语:' + tes +'\n' + url_movie)

我的答案(差不多)

import requests
from bs4 import BeautifulSoup

headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36'}
for i in range(0,10):
    url = 'https://movie.douban.com/top250?start='+ str(i*25) +'&filter='
    res=requests.get(url=url,headers=headers)
    html=res.text
    soup=BeautifulSoup(html,'html.parser')
    Aitems=soup.find(class_='grid_view')#用find找出大的地址
    items=Aitems.find_all('li')#在大的地址中用find_all来找出小地址的列表

    item_list = []

    for item in items:
        item0=item.find('em').text
        item1=item.find('span', class_="title").text
        item2=item.find('a')['href']
        if item.find(class_='inq'): 
          item3=item.find(class_='inq').text
        else:
          item3=''
        item4=item.find(class_='rating_num').text
        #item_list.append([item1,item2,item3])
        print('序号',item0,'\n','电影名',item1,'\n','链接',item2,'\n','推荐语',item3,'\n','评分',item4)

在这里插入图片描述

练习3-1B:豆瓣电影爬虫(非风变)

目标网址:https://movie.douban.com/cinema/nowplaying/foshan/
在这里插入图片描述

import requests
from bs4 import BeautifulSoup

headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36'}
for i in range(0,1):
    url = 'https://movie.douban.com/cinema/nowplaying/foshan/'
    res=requests.get(url=url,headers=headers)
    html=res.text
    soup=BeautifulSoup(html,'html.parser')
    Aitems=soup.find('ul',class_='lists')#用find找出大的地址
    items=Aitems.find_all('li',class_="list-item")#在大的地址中用find_all来找出小地址的列表

    item_list = []

    for item in items:
        item0=item['data-title']
        item1=item['data-region']
        item2=item['data-actors']
        item3=item.find('li',class_="srating").text.replace('\n','')
        item4=item.find('a',class_="ticket-btn")['href']
        print('\n','电影名',item0,'\n','地区',item1,'\n','演员',item2,'\n','评分',item3,'\n','详细链接',item4)

在这里插入图片描述

练习3-2:一键下电影(风变网址已变更)

在这里插入图片描述
1.步骤一
“输名字”,学过基础课的同学一定可以想到,用input()就可以啦。

2.步骤二
”搜索结果页面“ 这里面涉及到一个坑,我们要一起填上。输入不同的电影名,观察搜索结果页面的URL:

《无名之辈》的搜索结果URL:http://s.ygdy8.com/plus/s0.php?typeid=1&keyword=%CE%DE%C3%FB%D6%AE%B1%B2
《神奇动物》的搜索结果URL:http://s.ygdy8.com/plus/s0.php?typeid=1&keyword=%C9%F1%C6%E6%B6%AF%CE%EF
《狗十三》 的搜索结果URL:http://s.ygdy8.com/plus/s0.php?typeid=1&keyword=%B9%B7%CA%AE%C8%FD

观察URL,不难发现:http://s.ygdy8.com/plus/s0.php?typeid=1&keyword= 这些都是一样的,只不过不同的电影名对应URL后面加了一些我们看不懂的字符,请阅读以下代码,注意注释哦:

a= '无名之辈'
b= a.encode('gbk')
# 将汉字,用gbk格式编码,赋值给b
print(quote(b))
# quote()函数,可以帮我们把内容转为标准的url格式,作为网址的一部分打开

#%CE%DE%C3%FB%D6%AE%B1%B2

中文 - gbk - url - 拼接

3.步骤三 + 步骤四
”进入下载页面“ 与 “找到下载链接” 就是解析网页定位啦,利用find() 和 find_all(),都是你会的内容,加油呀~

练习3-2B:一键下电影(新网址–利用Selenium+BS解决)

目标网址:https://www.dygod.net/
在这里插入图片描述

import requests
from bs4 import BeautifulSoup
from urllib.parse import quote,unquote
from selenium import webdriver
import os
import time

#movie_name = input('请输入电影名')
movie_name = '怦然心动'



# Selenium模拟人工进入
chromedriver = r"C:/Program Files (x86)/Google/Chrome/Application/chromedriver.exe" #这里写本地的chromedriver 的所在路径
os.environ['webdriver.Chrome.driver'] = chromedriver #调用chrome浏览器
driver = webdriver.Chrome(chromedriver)
driver.maximize_window()
driver.get('https://www.dygod.net/')
time.sleep(1)

item1 = driver.find_element_by_name('keyboard')
item1.send_keys(movie_name)
time.sleep(1)

item2 = driver.find_element_by_name('Submit')
item2.click()
time.sleep(1)
print('Submit')



# 解析新网页
page_sourse = driver.page_source
#print('page_sourse',page_sourse)
soup=BeautifulSoup(page_sourse,'html.parser')
#print('soup',soup)
Aitems=soup.find('div',class_='co_content8').find_all('table')
#print('Aitems',Aitems)

for item in Aitems:
    item1 = item.find('a',class_="ulink").text
    item2 = item.find('a',class_="ulink")['href']
    print('\n','电影名',item1,'\n','链接',item2)

在这里插入图片描述

第4关:寻找周杰伦(QQ音乐网页已变更,原代码失效)

目标网站:https://y.qq.com/

在这里插入图片描述

# 引用requests库   
import requests
# 调用get方法,下载这个字典
res_music = requests.get('https://c.y.qq.com/soso/fcgi-bin/client_search_cp?ct=24&qqmusic_ver=1298&new_json=1&remoteplace=txt.yqq.song&searchid=60997426243444153&t=0&aggr=1&cr=1&catZhida=1&lossless=0&flag_qc=0&p=1&n=20&w=%E5%91%A8%E6%9D%B0%E4%BC%A6&g_tk=5381&loginUin=0&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq.json&needNewCode=0')
# 使用json()方法,将response对象,转为列表/字典
json_music = res_music.json()
# 一层一层地取字典,获取歌单列表
list_music = json_music['data']['song']['list']
# list_music是一个列表,music是它里面的元素
for music in list_music:
    # 以name为键,查找歌曲名
    print(music['name'])
    # 查找专辑名
    print('所属专辑:'+music['album']['name'])
    # 查找播放时长
    print('播放时长:'+str(music['interval'])+'秒')
    # 查找播放链接
    print('播放链接:https://y.qq.com/n/yqq/song/'+music['mid']+'.html\n\n')
    

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/625843.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

TypeScript学习日志-第二十六天(weakMap,weakSet,set,map)

weakMap,weakSet,set,map 一、set set 的基本用法如下&#xff1a; 二、map map 与 set 的 区别 就是 map 的 key 可以是引用类型 object array , map 的添加时使用 set 三、weakmap weakset weakmap和weakset 都是弱项 弱引用 其键必须是引用类型&#xff0c;不能是其它类…

【C/C++笔试练习】DNS劫持、三次握手、TCP协议、HTTPS、四次挥手、HTTP报文、拥塞窗口、POP3协议、UDP协议、收件人列表、养兔子

文章目录 C/C笔试练习选择部分&#xff08;1&#xff09;DNS劫持&#xff08;2&#xff09;三次握手&#xff08;3&#xff09;TCP协议&#xff08;4&#xff09;HTTPS&#xff08;5&#xff09;四次挥手&#xff08;6&#xff09;HTTP报文&#xff08;7&#xff09;拥塞窗口&a…

网优干货:ACP交付详解版(3)

1. 全局指标分析 点击GIS页面左侧的 按钮&#xff0c;展开指标树&#xff0c;可查看各项优化目标的当前值、预测值和差值。 拖动指标树中的某个指标到GIS页面&#xff0c;可呈现该指标的整体分布。GIS页面共有两个半屏&#xff0c;用户可以做优化前后相同指标的对比&#xff0c…

从CSDN搬家到微信公众号

博主将会在微信公众号里不断输出精品内容&#xff0c;陪伴大家共同成长。 如果你对博主的经历感兴趣&#xff0c;或者对博主的IT技术感兴趣&#xff0c;欢迎关注我的微信公众号&#xff0c;阅读我的技术文章&#xff0c;免费获取各种IT资源。也可以加我的微信成为我的好友&…

【Javaer学习Python】 1、Django安装

安装 Python 和 PyCharm 的方法就略过了&#xff0c;附一个有效激活PyCharm的链接&#xff1a;https://www.quanxiaoha.com/pycharm-pojie/pycharm-pojie-20241.html 1、安装Django # 安装Django pip install Django# 查看当前版本 python -m django --version 5.0.62、创建项…

ollama离线部署llama3(window系统)

首先介绍下ollama是什么&#xff1f;Ollama是一个开源的大型语言模型服务工具&#xff0c;旨在为用户提供本地化的运行环境&#xff0c;满足个性化的需求。具体来说&#xff0c;Ollama是一个功能强大的开源框架&#xff0c;可以简化在Docker容器中部署和管理大型语言模型&a…

24深圳杯C题18页高质量论文+可执行代码+图表

比赛题目的完整版思路可执行代码数据参考论文都会在第一时间更新上传的&#xff0c;大家可以参考我往期的资料&#xff0c;所有的资料数据以及到最后更新的参考论文都是一次付费后续免费的。注意&#xff1a;&#xff08;建议先下单占坑&#xff0c;因为随着后续我们更新资料数…

2024年5月中,AITOP100平台活动专区迎来六场AI大赛盛事!

AITOP100平台的活动专区在2024年5月中旬更新的6场AI大赛来了&#xff01; 随着人工智能技术的飞速发展&#xff0c;AI设计已经成为了创新与创意的新领域。2024年5月中旬&#xff0c;由腾讯研究院、剪映、站酷等互联网大厂主办的6场AI设计大赛震撼来袭&#xff0c;为广大AI设计…

文本到语音的学习笔记:从Docker开始

1.docker 是什么意思&#xff1f; Docker 是一种开源的容器化平台&#xff0c;它允许开发者将应用及其依赖打包到一个轻量级、可移植的容器中&#xff0c;然后可以在任何支持Docker的系统上运行这个应用&#xff0c;而不必担心环境差异导致的问题。 以下是Docker的一些关键特…

【接口测试_03课_-接口自动化思维梳理及Requests库应用】

一、通过代码&#xff0c;实现Jmeter 1、项目要放在虚拟环境里面&#xff0c;解释器要使用虚拟环境的 上面是虚拟环境&#xff0c;下面是系统环境。2选一 venv目录 查看当前虚拟环境已存在的依赖包 2、安装Requests依赖包 1&#xff09;安装命令 pip install requests 如果…

Windows Server 2022 环境下WEB和DNS服务器配置方法

目录 实验名称&#xff1a;WEB和DNS服务器配置实验目的实验原理&#xff1a;主要设备、器材&#xff1a;实验内容&#xff1a;配置本地WEB站点配置本地DNS服务器 实验名称&#xff1a;WEB和DNS服务器配置 实验目的 掌握 Windows Server 2022 环境下WEB服务器配置方法 掌握 Wi…

RT Thread + CLion环境搭建

RT Thread CLion环境搭建 0.前言一、准备工具1. Env RT Thread v5.12.CLion安装3.编译及下载工具 二、新建Env工程三、CLion配置四、运行测试 0.前言 事情的起因是最近在使用RT Thread Studio时&#xff0c;发现默认的 rtt 内核版本及交叉编译链版本都过于陈旧&#xff0c;于…

【科研】常用的实验结果评价指标(2) —— MAE 是什么? !

了解MAE 提示&#xff1a;先说概念&#xff0c;后续再陆续上代码 文章目录 了解MAE前言一、MAE 基本概念1. MAE 是什么&#xff1f;2. MAE 的起源3. MAE 的计算公式 二、MAE的适用场景是什么&#xff1f;三、MAE 的劣势&#xff0c;或 不适用于那些场景或者数据&#xff1f;四、…

2024成都现代职业教育及装备展6月1日举办 免费参观

2024成都现代职业教育及装备展6月1日举办 免费参观 同期举办&#xff1a;中国西部职业教育产教融合高峰论坛 主办单位&#xff1a; 中国西部教体融合博览会组委会 承办单位&#xff1a;重庆港华展览有限公司 博览会主题&#xff1a;责任教育 职教兴邦 组委会&#xff1a;…

ssti学习(1)

一、成因&#xff1a; 渲染模板时&#xff0c;没有严格控制对用户的输入。&#xff08;使用了危险的模板&#xff0c;导致用户可以和flask程序进行交互&#xff09; flask是一种基于web开发的web服务器&#xff0c;如果用户可以和flask交互&#xff0c;则可以执行eval、syste…

嵌入式学习-通用定时器

简介 框图介绍 时钟选择 计数器部分 输入捕获和输出比较框图 嵌入式学习全文参考&#xff08;小向是个der&#xff09;做笔记&#xff1a;https://blog.csdn.net/qq_41954556/article/details/129735708

Runes 生态一周要览 ▣ 2024.5.06-5.12

1、香港「Runes Asia 2024」符文峰会之行圆满结束。 2、BEVM 宣布首次大规模 RUNES 空投现已结束&#xff01;符文桥即将上线。 3、来自 Book of Blob 的交互式视听信息铭刻了第一个 Epic Sat 在 coinex 上市交易。 4、 Binance Research 发布了对 Runes 的报告。 5、HOPE•…

re--SMC

参考&#xff1a;http://t.csdnimg.cn/g7fUY 参考&#xff1a;http://t.csdnimg.cn/qi3q5 简介 SMC&#xff0c;即Self Modifying Code&#xff0c;动态代码加密技术&#xff0c;指通过修改代码或数据&#xff0c;阻止别人直接静态分析&#xff0c;然后在动态运行程序时对代…

嵌入式Linux:编译和使用Protobuf库

目录 1、开发环境和工具 2、安装和编译Protobuf、Protobuf-C库 3、编写和编译proto文件 4、修改makefile文件 5、测试示例 6、参考资料 Protobuf&#xff08;Protocol Buffers&#xff09;是由 Google 开发的一种轻量级、高效的结构化数据序列化方式&#xff0c;用于在不同应用…

SSM【Spring SpringMVC Mybatis】——Mybatis(二)

如果对一些基础理论感兴趣可以看这一期&#x1f447; SSM【Spring SpringMVC Mybatis】——Mybatis 目录 1、Mybatis中参数传递问题 1.1 单个普通参数 1.2 多个普通参数 1.3 命名参数 1.4 POJO参数 1.5 Map参数 1.6 Collection|List|Array等参数 2、Mybatis参数传递【#与…