足球赛事分析

个人项目根据需求对这个 https://www.dszuqiu.com/ 足球赛事网站的比赛数据进行采集计算格式化处理,同时要满足支持手动设置翻页、指定分钟球队赛事信息、采集速度等 !
采集比赛结束球队赛事详情页面中 [四合一数据和现场数据] 计算逻辑比较复杂,需结合页面对四合一数据中让球,大小球、角球的全场半场值进行计算处理,现场数据中射正球门、射偏球门、危险进攻及进球角球信息进行计算格式化处理,具体的需求不罗列了较多
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
核心代码

# -*- coding: utf-8 -*-
import os
import re
import csv
import time
import requests
from lxml import etree
from log_decorator import _logger
from chaojiying import Chaojiying_Clientlogger = _logger()
class Football(object):def __init__(self):self.session = self.session()self.headers = self.headers()def session(self):session = requests.session()session.keep_alive = Falsesession.adapters.DEFAULT_RETRIES = 10return session"""Cookie已经注释掉,采用login()登陆函数模拟登陆成功,再通过session维持会话状态,如需要采用手动添加cookie的方式,可将整个login()函数注释掉,打开请求头中Cookie,将其换成浏览器中最新cookie信息即可"""def headers(self):headers = {"User-Agent": 'Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/78.0','Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8','Accept-Encoding': 'gzip, deflate','Accept-Language': 'en-US,en;q=0.5','Connection': 'keep-alive','Upgrade-Insecure-Requests': '1','Cookie':'uid=R-570329-33aa83de060094016f3d09; ds_session=n0411e3fo3i0n6sas7so42ks10; Hm_lvt_a68414d98536efc52eeb879f984d8923=1611208544,1611216752,1611371703,1611375529; Hm_lpvt_a68414d98536efc52eeb879f984d8923=1611537976'}return headers#自动登录def login(self):login_url = 'https://www.dszuqiu.com/w_login'captcha_url = 'https://www.dszuqiu.com/captcha'resp = self.session.get(captcha_url, headers=self.headers, timeout=30, verify=False)logger.info(resp.status_code)path = os.path.dirname(os.path.abspath(__file__))open(f"{path}/football.png", 'wb').write(resp.content)im = open(f'{path}/football.png', 'rb').read()chaojiying = Chaojiying_Client()code = chaojiying.PostPic(im, 1006)result = code["pic_str"].lower()logger.info('验证码识别结果为:')logger.info(result)#表单data = {"zhanghu": 'foreign.trade1@cibsc.biz',"password": '11223344o',"captcha_input": result,"rememberMe": '1',"is_ajax": '1'}response = self.session.post(login_url, headers=self.headers, data=data)logger.info(response.status_code)cookie = requests.utils.dict_from_cookiejar(self.session.cookies)return cookie#数据获取及存储def race(self):index_url = ['https://www.dszuqiu.com/league/{}/p.{}?type=ended_race'.format(id, page) for page in range(start_page, end_page + 1)]for url in index_url:response = self.session.get(url,headers=self.headers,timeout=30,verify=False)logger.info(response.status_code)html = etree.HTML(response.text)href_list = html.xpath('//section[@id="ended"]//a[text()="析"]/@href')try:match_name = html.xpath('//*[@class="dsBreadcrumbs2"]/text()')[-1].strip()for href in href_list:#四合一数据urlrace_sp = f'https://www.dszuqiu.com/race_sp/' + href.split('/')[-1]#现场数据urlrace_xc = f'https://www.dszuqiu.com/race_xc/' + href.split('/')[-1]#四合一数据请求race_sp_response = self.session.get(race_sp, headers=self.headers, timeout=30, verify=False)time.sleep(TM)logger.info(race_sp_response.status_code)# logger.info(race_sp_response.text)html = etree.HTML(race_sp_response.text)try:ball_name = html.xpath('//h3[@class="dsBreadcrumbs"]/text()')[-1].strip()except Exception as e:logger.info('cookie失效请重新替换cookie!启动')logger.warning(e)# 让球全场rang_whole = html.xpath('//tbody[@id="sp_rangfen"]/tr')ball_rang_quan = ''for i in rang_whole[::-1]:td_rangfen = i.xpath('./td/text()')if "{}'".format(rang_whole_minute) in td_rangfen[0].strip():ball_rang_quan += td_rangfen[3]breakelse:ball_rang_quan += " "# 让球半场rang_half = html.xpath('//tbody[@id="sp_half_rangfen"]/tr')ball_ban_rang = ''for i in rang_half[::-1]:td_half_rangfen = i.xpath('./td/text()')if "{}'".format(rang_half_minute) in td_half_rangfen[0].strip():ball_ban_rang += td_half_rangfen[3]breakelse:ball_ban_rang += " "# 大小球全场size_whole = html.xpath('//tbody[@id="sp_daxiao"]/tr')ball_quan_daxiao = ''for i in size_whole[::-1]:  # enumerate 枚举td_quan_daxiao = i.xpath('./td/text()')if "{}'".format(size_whole_minute) in td_quan_daxiao[0].strip():ball_quan_daxiao += td_quan_daxiao[2]breakelse:ball_quan_daxiao += " "# 大小球半场size_half = html.xpath('//tbody[@id="sp_half_daxiao"]/tr')ball_ban_daxiao = ''for i in size_half[::-1]:td_size_half_minute = i.xpath('./td/text()')if "{}'".format(size_half_minute) in td_size_half_minute[0].strip():ball_ban_daxiao += td_size_half_minute[2]breakelse:ball_ban_daxiao += " "# 角球全场jiao_whole = html.xpath('//tbody[@id="sp_corner"]/tr')ball_quan_jiao = ''for i in jiao_whole[::-1]:td_quan_jiao = i.xpath('./td/text()')if "{}'".format(jiao_whole_minute) in td_quan_jiao[0].strip():ball_quan_jiao += td_quan_jiao[2]breakelse:ball_quan_jiao += " "# 角球半场jiao_half = html.xpath('//tbody[@id="sp_half_corner"]/tr')ball_ban_jiao = ''for i in jiao_half[::-1]:td_jiao_half_minute = i.xpath('./td/text()')if "{}'".format(jiao_half_minute) in td_jiao_half_minute[0].strip():ball_ban_jiao += td_jiao_half_minute[2]breakelse:ball_ban_jiao += " "#现场数据请求race_xc_response = self.session.get(race_xc, headers=self.headers, timeout=30, verify=False)logger.info(race_xc_response.status_code)race_xc_html = race_xc_response.text.split('chart_options.series = ')# 射正球门1zheng = re.findall(f'"x":{zheng_minute},(.*?)"name"', race_xc_html[1])if zheng == []:zheng_minute_bak = zheng_minutewhile True:zheng_minute_bak = zheng_minute_bak - 1zheng = re.findall(f'"x":{zheng_minute_bak},(.*?)"name"', race_xc_html[1])if zheng != []:break# print('zheng_minute_bak',zheng_minute_bak)if len(zheng) == 1:zheng_front = re.findall('y":(.*?),"marker', zheng[0])[0]zheng_back = re.findall('info":"(.*?)"', zheng[0])[0]elif len(zheng) > 1:zheng_front = re.findall('y":(.*?),"marker', zheng[0])[0]zheng_back = re.findall('info":"(.*?)"', zheng[0])[0]zheng_front_bak = re.findall('y":(.*?),"marker', zheng[-1])[0]zheng_back_bak = re.findall('info":"(.*?)"', zheng[-1])[0]else:if len(zheng) == 1:zheng_front = re.findall('y":(.*?),"marker', zheng[0])[0]zheng_back = re.findall('info":"(.*?)"', zheng[0])[0]elif len(zheng) > 1:zheng_front = re.findall('y":(.*?),"marker', zheng[0])[0]zheng_back = re.findall('info":"(.*?)"', zheng[0])[0]zheng_front_bak = re.findall('y":(.*?),"marker', zheng[-1])[0]zheng_back_bak = re.findall('info":"(.*?)"', zheng[-1])[0]szqm = f'{zheng_front}{zheng_back}'try:szqm_bak = f'{zheng_front_bak}{zheng_back_bak}'if int(zheng_front) + int(zheng_back) > int(zheng_front_bak) + int(zheng_back_bak):szqm = szqmelif int(zheng_front) + int(zheng_back) < int(zheng_front_bak) + int(zheng_back_bak):szqm = szqm_bakexcept:pass# 射正球门2zheng2 = re.findall(f'"x":{zheng_minute2},(.*?)"name"', race_xc_html[1])if zheng2 == []:zheng_minute2_bak = zheng_minute2while True:zheng_minute2_bak = zheng_minute2_bak - 1zheng2 = re.findall(f'"x":{zheng_minute2_bak},(.*?)"name"', race_xc_html[1])if zheng2 != []:break# print('zheng_minute2_bak',zheng_minute2_bak)if len(zheng2) == 1:zheng_front2 = re.findall('y":(.*?),"marker', zheng2[0])[0]zheng_back2 = re.findall('info":"(.*?)"', zheng2[0])[0]elif len(zheng2) > 1:zheng_front2 = re.findall('y":(.*?),"marker', zheng2[0])[0]zheng_back2 = re.findall('info":"(.*?)"', zheng2[0])[0]zheng_front2_bak = re.findall('y":(.*?),"marker', zheng2[-1])[0]zheng_back2_bak = re.findall('info":"(.*?)"', zheng2[-1])[0]else:if len(zheng2) == 1:zheng_front2 = re.findall('y":(.*?),"marker', zheng2[0])[0]zheng_back2 = re.findall('info":"(.*?)"', zheng2[0])[0]elif len(zheng2) > 1:zheng_front2 = re.findall('y":(.*?),"marker', zheng2[0])[0]zheng_back2 = re.findall('info":"(.*?)"', zheng2[0])[0]zheng_front2_bak = re.findall('y":(.*?),"marker', zheng2[-1])[0]zheng_back2_bak = re.findall('info":"(.*?)"', zheng2[-1])[0]szqm2 = f'{zheng_front2}{zheng_back2}'try:szqm2_bak = f'{zheng_front2_bak}{zheng_back2_bak}'if int(zheng_front2) + int(zheng_back2) > int(zheng_front2_bak) + int(zheng_back2_bak):szqm2 = szqm2elif int(zheng_front2) + int(zheng_back2) < int(zheng_front2_bak) + int(zheng_back2_bak):szqm2 = szqm2_bakexcept:pass#射偏球门1pian = re.findall(f'"x":{pian_minute},(.*?)"name"', race_xc_html[2])if pian == []:pian_minute_bak = pian_minutewhile True:pian_minute_bak = pian_minute_bak - 1pian = re.findall(f'"x":{pian_minute_bak},(.*?)"name"', race_xc_html[2])if pian != []:break# print('pian_minute_bak',pian_minute_bak)if len(pian) == 1:pian_front = re.findall('y":(.*?),"marker', pian[0])[0]pian_back = re.findall('info":"(.*?)"', pian[0])[0]elif len(pian) > 1:pian_front = re.findall('y":(.*?),"marker', pian[0])[0]pian_back = re.findall('info":"(.*?)"', pian[0])[0]pian_front_bak = re.findall('y":(.*?),"marker', pian[-1])[0]pian_back_bak = re.findall('info":"(.*?)"', pian[-1])[0]else:if len(pian) == 1:pian_front = re.findall('y":(.*?),"marker', pian[0])[0]pian_back = re.findall('info":"(.*?)"', pian[0])[0]elif len(pian) > 1:pian_front = re.findall('y":(.*?),"marker', pian[0])[0]pian_back = re.findall('info":"(.*?)"', pian[0])[0]pian_front_bak = re.findall('y":(.*?),"marker', pian[-1])[0]pian_back_bak = re.findall('info":"(.*?)"', pian[-1])[0]spqm = f'{pian_front}{pian_back}'try:spqm_bak = f'{pian_front_bak}{pian_back_bak}'if int(pian_front) + int(pian_back) > int(pian_front_bak) + int(pian_back_bak):spqm = spqmelif int(pian_front) + int(pian_back) < int(pian_front_bak) + int(pian_back_bak):spqm = spqm_bakexcept:pass# 射偏球门2pian2 = re.findall(f'"x":{pian_minute2},(.*?)"name"', race_xc_html[2])if pian2 == []:pian_minute2_bak = pian_minute2while True:pian_minute2_bak = pian_minute2_bak - 1pian2 = re.findall(f'"x":{pian_minute2_bak},(.*?)"name"', race_xc_html[2])if pian2 != []:break# print('pian_minute2_bak',pian_minute2_bak)if len(pian2) == 1:pian_front2 = re.findall('y":(.*?),"marker', pian2[0])[0]pian_back2 = re.findall('info":"(.*?)"', pian2[0])[0]elif len(pian2) > 1:pian_front2 = re.findall('y":(.*?),"marker', pian2[0])[0]pian_back2 = re.findall('info":"(.*?)"', pian2[0])[0]pian_front2_bak = re.findall('y":(.*?),"marker', pian2[-1])[0]pian_back2_bak = re.findall('info":"(.*?)"', pian2[-1])[0]else:if len(pian2) == 1:pian_front2 = re.findall('y":(.*?),"marker', pian2[0])[0]pian_back2 = re.findall('info":"(.*?)"', pian2[0])[0]elif len(pian2) > 1:pian_front2 = re.findall('y":(.*?),"marker', pian2[0])[0]pian_back2 = re.findall('info":"(.*?)"', pian2[0])[0]pian_front2_bak = re.findall('y":(.*?),"marker', pian2[-1])[0]pian_back2_bak = re.findall('info":"(.*?)"', pian2[-1])[0]spqm2 = f'{pian_front2}{pian_back2}'try:spqm2_bak = f'{pian_front2_bak}{pian_back2_bak}'if int(pian_front2) + int(pian_back2) > int(pian_front2_bak) + int(pian_back2_bak):spqm2 = spqm2elif int(pian_front2) + int(pian_back2) < int(pian_front2_bak) + int(pian_back2_bak):spqm2 = spqm2_bakexcept:pass#危险进攻1weixian = re.findall(f'"x":{weixian_minute},(.*?)"name"', race_xc_html[3])if weixian == []:weixian_minute_bak = weixian_minutewhile True:weixian_minute_bak = weixian_minute_bak - 1weixian = re.findall(f'"x":{weixian_minute_bak},(.*?)"name"', race_xc_html[3])if weixian != []:break# print('weixian_minute_bak',weixian_minute_bak)if len(weixian) == 1:weixian_front = re.findall('y":(.*?),"marker', weixian[0])[0]weixian_back = re.findall('info":"(.*?)"', weixian[0])[0]elif len(weixian) > 1:weixian_front = re.findall('y":(.*?),"marker', weixian[0])[0]weixian_back = re.findall('info":"(.*?)"', weixian[0])[0]weixian_front_bak = re.findall('y":(.*?),"marker', weixian[-1])[0]weixian_back_bak = re.findall('info":"(.*?)"', weixian[-1])[0]else:if len(weixian) == 1:weixian_front = re.findall('y":(.*?),"marker', weixian[0])[0]weixian_back = re.findall('info":"(.*?)"', weixian[0])[0]elif len(weixian) > 1:weixian_front = re.findall('y":(.*?),"marker', weixian[0])[0]weixian_back = re.findall('info":"(.*?)"', weixian[0])[0]weixian_front_bak = re.findall('y":(.*?),"marker', weixian[-1])[0]weixian_back_bak = re.findall('info":"(.*?)"', weixian[-1])[0]wxjg = f'{weixian_front}{weixian_back}'try:wxjg_bak = f'{weixian_front_bak}{weixian_back_bak}'if int(weixian_front) + int(weixian_back) > int(weixian_front_bak) + int(weixian_back_bak):wxjg = wxjgelif int(weixian_front) + int(weixian_back) < int(weixian_front_bak) + int(weixian_back_bak):wxjg = wxjg_bakexcept:pass# 危险进攻2weixian2 = re.findall(f'"x":{weixian_minute2},(.*?)"name"', race_xc_html[3])if weixian2 == []:weixian_minute2_bak = weixian_minute2while True:weixian_minute2_bak = weixian_minute2_bak - 1weixian2 = re.findall(f'"x":{weixian_minute2_bak},(.*?)"name"', race_xc_html[3])if weixian2 != []:break# print('weixian_minute2_bak',weixian_minute2_bak)if len(weixian2) == 1:weixian_front2 = re.findall('y":(.*?),"marker', weixian2[0])[0]weixian_back2 = re.findall('info":"(.*?)"', weixian2[0])[0]elif len(weixian2) > 1:weixian_front2 = re.findall('y":(.*?),"marker', weixian2[0])[0]weixian_back2 = re.findall('info":"(.*?)"', weixian2[0])[0]weixian_front2_bak = re.findall('y":(.*?),"marker', weixian2[-1])[0]weixian_back2_bak = re.findall('info":"(.*?)"', weixian2[-1])[0]else:if len(weixian2) == 1:weixian_front2 = re.findall('y":(.*?),"marker', weixian2[0])[0]weixian_back2 = re.findall('info":"(.*?)"', weixian2[0])[0]elif len(weixian2) > 1:weixian_front2 = re.findall('y":(.*?),"marker', weixian2[0])[0]weixian_back2 = re.findall('info":"(.*?)"', weixian2[0])[0]weixian_front2_bak = re.findall('y":(.*?),"marker', weixian2[-1])[0]weixian_back2_bak = re.findall('info":"(.*?)"', weixian2[-1])[0]wxjg2 = f'{weixian_front2}{weixian_back2}'try:wxjg2_bak = f'{weixian_front2_bak}{weixian_back2_bak}'if int(weixian_front2) + int(weixian_back2) > int(weixian_front2_bak) + int(weixian_back2_bak):wxjg2 = wxjg2elif int(weixian_front2) + int(weixian_back2) < int(weixian_front2_bak) + int(weixian_back2_bak):wxjg2 = wxjg2_bakexcept:pass#角球进球信息ball_html = etree.HTML(race_xc_response.text)ball_info = ball_html.xpath('//span[@class="timeLineGoal" or @class="timeLineCorner"]/@title')jiao_ball = ''jin_ball = ''for ball in ball_info:if '35' in ball or '36' in ball or '37' in ball or '38' in ball or '39' in ball or '40' in ball or '41' in ball or '42' in ball or '43' in ball or '44' in ball or '45' in ball :if '角球' in ball and '上半场角球' not in jiao_ball:jiao_ball +=  '上半场角球: '  + '\n' + ball + '\n'elif '角球' in ball:jiao_ball +=  ball + '\n'if '进球' in ball and '上半场进球' not in jin_ball:jin_ball += '上半场进球: ' + '\n' + ball + '\n'elif '进球' in ball:jin_ball += ball + '\n'if  '85' in ball or '86' in ball or '87' in ball or '88' in ball or '89' in ball or '90' in ball:if '角球' in ball and '下半场角球' not in jiao_ball:jiao_ball += '下半场角球: ' + '\n' + ball + '\n'elif '角球' in ball:jiao_ball += ball + '\n'if '进球' in ball and '下半场进球' not in jin_ball:jin_ball += '下半场进球: ' + '\n' + ball  + '\n'elif '进球' in ball:jin_ball += ball + '\n'#比赛日期match_time = ball_html.xpath('//span[@class="analysisRaceTime"]/text()')[0].strip()#盘口走势just_move = ball_html.xpath('//a[@href="javascript:void(0)"]/text()')[0].strip().replace('/','//')info = [ball_name, race_xc, match_time, just_move, rang_half_minute, ball_ban_rang,size_half_minute, ball_ban_daxiao, jiao_half_minute, ball_ban_jiao, rang_whole_minute,ball_rang_quan, size_whole_minute, ball_quan_daxiao, jiao_whole_minute, ball_quan_jiao,zheng_minute, szqm, pian_minute, spqm, weixian_minute, wxjg, zheng_minute2, szqm2, pian_minute2, spqm2,weixian_minute2, wxjg2, jiao_ball, jin_ball]logger.info(info)if not os.path.exists(f'{match_name}.csv'):head = ['球队', '链接', '比赛日期', '盘口走势', '分钟', '半场让球', '分钟', '半场大小球', '分钟', '半场角球', '分钟', '全场让球','分钟', '全场大小球', '分钟', '全场角球', '分钟', '射正球门', '分钟', '射偏球门', '分钟', '危险进攻','分钟', '射正球门','分钟', '射偏球门', '分钟', '危险进攻',  '角球信息', '进球信息']csvFile = open(f'{match_name}.csv', 'a', newline='', encoding='utf-8-sig')writer = csv.writer(csvFile)writer.writerow(head)csvFile.close()else:csvFile = open(f'{match_name}.csv', 'a+', newline='', encoding='utf-8-sig')writer = csv.writer(csvFile)writer.writerow(info)csvFile.close()except:passreturn Noneif __name__ == '__main__':execute = Football()id = input('请输入联赛id:')start_page, end_page = map(int, input('设置开始和结束页,空格隔开:').split())rang_whole_minute, size_whole_minute, jiao_whole_minute = map(int, input('设置全场分钟,空格隔开(让球|大小球|角球):').split())rang_half_minute, size_half_minute, jiao_half_minute = map(int, input('设置半场分钟,空格隔开(让球|大小球|角球):').split())zheng_minute, zheng_minute2, pian_minute, pian_minute2, weixian_minute, weixian_minute2 = map(int, input('设置射正(两个值)、射偏(2个值)、危险进攻(2个值),空格隔开(射正|射正|射偏|射偏|危险进攻|危险进攻):').split())TM = int(input('请设置爬取速度/s:'))# execute.login()execute.race()

超级鹰模块 chaojiying.py

#!/usr/bin/env python
# coding:utf-8import requests
from hashlib import md5class Chaojiying_Client(object):# def __init__(self, username, password, soft_id):def __init__(self):self.username = 'mengniu专用'password =  'mengniu.专用'.encode('utf8')self.password = md5(password).hexdigest()self.soft_id = '912111'self.base_params = {'user': self.username,'pass2': self.password,'softid': self.soft_id,}self.headers = {'Connection': 'Keep-Alive','User-Agent': 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)',}def PostPic(self, im, codetype):"""im: 图片字节codetype: 题目类型 参考 http://www.chaojiying.com/price.html"""params = {'codetype': codetype,}params.update(self.base_params)files = {'userfile': ('ccc.jpg', im)}r = requests.post('http://upload.chaojiying.net/Upload/Processing.php', data=params, files=files, headers=self.headers)return r.json()def ReportError(self, im_id):"""im_id:报错题目的图片ID"""params = {'id': im_id,}params.update(self.base_params)r = requests.post('http://upload.chaojiying.net/Upload/ReportError.php', data=params, headers=self.headers)return r.json()

#日志模块 log_decorator.py

import os
import logging
from datetime import datetimedef _logger():logger = logging.getLogger(__name__)logger.setLevel(logging.INFO)sh = logging.StreamHandler()today = datetime.now()path = os.path.dirname(os.path.abspath(__file__))fh = logging.FileHandler(path + "{}log{}{}-{}-{}.log".format(os.sep, os.sep, today.year, today.month, today.day), encoding='utf-8')fmt = "[%(asctime)s][%(filename)s:%(lineno)d][%(levelname)s] - %(message)s"formatter = logging.Formatter(fmt)sh.setFormatter(formatter)fh.setFormatter(formatter)logger.addHandler(sh)logger.addHandler(fh)return logger

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

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

企业微信创建应用和开发应用的相关问题,获取外部联系人信息,聊天工具栏配置

企业微信创建应用&#xff0c;h5页面&#xff0c;获取外部联系人信息&#xff0c;聊天工具栏 创建 进入企业微信后台管理&#xff0c;应用管理 》应用 》自建 -> 创建应用 可见范围是该应用授权可见部门&#xff08;人员&#xff09; 配置 1、点开应用&#xff0c;配置…

脱不下孔乙己的长衫,现代的年轻人该怎么办?

“如果我没读过书&#xff0c;我还可以做别的工作&#xff0c;可我偏偏读过书” “学历本该是我的敲门砖&#xff0c;却成了我脱不下的长衫。” 最近&#xff0c;“脱下孔乙己的长衫”在网上火了。在鲁迅的原著小说中&#xff0c;孔乙己属于知识阶级&#xff08;长衫客&#…

校招污点公司名单火了/ 马斯克与库克误会解除/ 苹果M2 Max跑分泄露…今日更多新鲜事在此...

日报君 发自 凹非寺量子位 | 公众号 QbitAI 大家好&#xff0c;今天是12月1日星期 快来跟日报君看看&#xff0c;今天科技圈发生了哪些新鲜事&#xff5e; 马斯克与库克误会解除 马斯克与苹果的闹剧以和解告终。 当地时间周三下午&#xff0c;马斯克在推特上发布了一段苹果…

学习记录Day002

1.标准化 标准化的培养主要从以下几个方面培养&#xff1a; 规范周报&#xff1a;写好每一次周报就是为以后写小作文打下良好基础。规范代码&#xff1a;规范代码能够提升代码可读性&#xff0c;好的代码习惯能方便自己和他人查阅。小论文&#xff1a;写好小作文就能为未来写大…

高校就业管理系统设计与实现

一&#xff0c;项目简介 在如今社会上&#xff0c;关于信息上面的处理&#xff0c;没有任何一个企业或者个人会忽视&#xff0c;如何让信息急速传递&#xff0c;并且归档储存查询&#xff0c;采用之前的纸张记录模式已经不符合当前使用要求了。所以&#xff0c;对高校就业信息…

双色球号概率预知程序

说来好笑&#xff0c;自己怎么会抽一个小时做这么一个小程序&#xff0c;可能我是太喜欢买彩票但是老中不了的缘故吧。不过老实说这个程序也帮不了你中双色球&#xff0c;娱乐而已。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <meta…

Python数据分析:双色球的深度学习预测

双色球是福利彩票的一种玩法&#xff0c;已经卖了有很多年。之前在支付宝上app可以买的&#xff0c;每天2块钱很有益身心健康&#xff0c;比LOL有积极意义。对于双色球这门游戏&#xff0c;刚开始买的时候是纯粹靠感觉&#xff0c;后来百度又看到了百度预测&#xff08;虽然尼玛…

.NET Core 使用 ImageSharp 生成图片

前言 ImageSharp是对.NET Core平台扩展的一个图像处理方案&#xff0c;以往网上的案例多以生成文字及画出简单图形、验证码等方式进行探讨和实践。 分享一下所在公司项目的实际应用案例&#xff0c;导出微信二维码图片&#xff0c;圆形头像等等。 一、源码获取 Git项目地址…

高清Apriltag图片生成和制作

近期需要用到Apriltag图像&#xff0c;作者源码给的图像像素太差&#xff0c;无法满足需要。 国内网站相关资料太少&#xff0c;有的作者还要收费&#xff0c;不理解。本来就是开源的东西。本文详细说明如何生成&#xff0c;并免费附上tag36h11 全系列图片下载链接。 1。 生成…

微信小程序生成海报图片导出相册

前言 小程序内通过静态模板和样式绘制 canvas &#xff0c;导出图片&#xff0c;可用于生成分享图等场景 一、效果预览 二、使用步骤 1.安装引入wxml-to-canvas Step1.运行小程序npm安装命令 npm install --save wxml-to-canvasStep2.JSON 组件声明 {"usingComponents…

chatgpt赋能python:Python中打开图片的方法

Python中打开图片的方法 Python是一种高级编程语言&#xff0c;非常流行和使用&#xff0c;因为它具有简单易用、可读性强、适合各种领域等优点。其中&#xff0c;打开图片也是Python中一个非常常见的操作。 在Python中&#xff0c;可以通过几行代码轻松实现打开图片的功能。…

三分钟4行命令构建chatgpt webapp,支持高并发以及上下文对话功能(2)

个人主页:https://yang1he.gitee.io 干货会越来越多的&#xff0c;欢迎来玩 三分钟4行命令构建chatgpt webapp,支持高并发以及上下文对话功能&#xff08;2&#xff09; version2 version1介绍 上下文对话清除历史信息内网公开 version2新增 重复信息自动去重高并发&#xff0c…

客户端突如其来的“白屏”等待该如何解决?

简介&#xff1a;一起由离线包重构引起的“白屏”等待现象的排查和解决案例 ——本文选自《阿里云SRE技术期刊》2021年02月刊 移动端的混合架构模式给 App 开发带来了崭新的空间&#xff0c;通过 H5 构建的业务模块可以实现高效快速的版本迭代&#xff0c;满足多样化的业务需求…

Postman打开一直加载白屏

问题&#xff1a;以前用的好好的&#xff0c;突然有天白屏打不来&#xff0c;一直加载中无响应 1、上网搜教程&#xff0c;环境变量也设置了POSTMAN_DISABLE_GPU、true 2、%appdata%目录下的postman文件也删除了&#xff08;postman未登录的慎删&#xff0c;可以搜教程应该可以…

微信小游戏可视化开发工具

我们来自微信小游戏的一个小团队&#xff0c;我们希望每个人都可以创建自己的小游戏&#xff0c;分享自己的创意&#xff0c;所以我们实现了一个门槛极低的游戏开发工具&#xff0c;在设计的时候我们尽量注意概念简单同时又可以实现各种类型的游戏&#xff0c;当前还是内测阶段…

基于tkinter制作的一个策略小游戏

目录 前言 登录界面 主界面 宣政殿 地图 吏部 兵部 户部 刑部 工部 礼部 御书房 后宫 宗人府 御马监 锦衣卫 司礼监 京城 后记 前言 前年本科毕业时&#xff0c;利用暑假的时间学习了一点tkinter&#xff0c;当时比较痴迷《君成录》、《皇帝成长计划》等策略养成…

AI绘画初体验(6pen平台)

最近AI绘画似乎很火热&#xff0c;今天体验了AI绘画。 使用平台&#xff1a;6pen 似乎对幻想出来的图片效果不是很好&#xff0c;而对语言简练、写实的图片效果很棒&#xff01; 展示&#xff1a; 1 宇航员在火星上&#xff0c;坐着椅子下象棋&#xff0c;背景是远处的地球 2 …

【回答问题】ChatGPT上线了!给我推荐20个比较流行的AI作画模型!

目录 给我推荐20个比较流行的AI作画模型给我推荐20个比较流行的AI作画模型代码给我推荐20个比较流行的AI作画模型 好的,下面是20个比较流行的AI作画模型: DALL-E GAN Deep Dream CycleGAN StyleGAN pix2pix SketchRNN BigGAN ProGAN ESRGAN SPADE BigVAE StackGAN VQ-VAE 3…

AI绘画——ChilloutMix模型(现实真人,实现写实逼真的图像)

目录 重要提示&#xff1a;首先&#xff0c;我从不建议再生“真实”人物的图像&#xff0c; 但是&#xff0c;照片“逼真”图像。 本人郑重声明&#xff1a;本模型原则上禁止用于训练基于明星、公众人物肖像的风格模型训练&#xff0c;因为这会带来争议&#xff0c;对AI社区…

ai绘画软件“数画”上线元宇宙真人虚拟头像,技术远超国外

近日&#xff0c;国内AI绘画应用软件“数画”官方发布一条公告&#xff0c;引起整个AI绘画业界的轰动。公告显示“数画”上线真人元宇宙AI虚拟头像制作功能,并于2022年11月18日开始为画友正式投入服役。此种技术仅需几秒就可以将自已的照片或用手机自拍AI绘画成元宇宙中你的样子…