摘要: import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier import sea 阅读全文
posted @ 2022-03-27 20:29 Leeingli 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 一、需求分析 1.能自动生成小学四则运算题目并且每一道题目的运算结果不能为负; 2.数字在0-100,运算符2-5个; 3.输入参数n,随机产生n道加减乘除。 二、功能设计 基础功能:四则运算,随机产生n道算式题目; 升级功能:1)带有两位小数的两个数之间加减运算; 2)两个分数之间加减乘除运算; 阅读全文
posted @ 2021-09-19 22:25 Leeingli 阅读(32) 评论(0) 推荐(0) 编辑
摘要: from bs4 import BeautifulSoup import re soup=BeautifulSoup("<head><title>菜鸟教程(runoob.com)</title></head><body><h1>我的第一个标题</h1><p id="frist">我的第一个段落。</ 阅读全文
posted @ 2020-05-13 14:50 Leeingli 阅读(532) 评论(0) 推荐(0) 编辑
摘要: import requests def getHTMLText(_): try: r=requests.get(url,timeout=30) r.raise_for_status() r.encoding='utf-8' return r.text except: return "" url="h 阅读全文
posted @ 2020-05-13 14:16 Leeingli 阅读(121) 评论(0) 推荐(0) 编辑
摘要: class Vecter3: def_init_(self,x=0,y=0,z=0): self.X=x self.Y=y self.Z=z def_add_(self,n): r=Vecter3() r.X=self.X+n.X r.Y=self.Y+n.Y r.Z=self.Z+n.Z retu 阅读全文
posted @ 2020-04-21 08:51 Leeingli 阅读(6995) 评论(0) 推荐(0) 编辑
摘要: import PIL.Image as Image def get_gif(pics_dir,n,t=0.1): imgs = [] for i in range(n): pic_name = '{}/{}.png'.format(pics_dir,i) temp = Image.open(pic_ 阅读全文
posted @ 2020-04-14 12:47 Leeingli 阅读(205) 评论(0) 推荐(0) 编辑
摘要: # 图像基础调整: 图像的亮度、对比度、色度,还可以用于增强图像的锐度,美白 # """ from PIL import Image from PIL import ImageEnhance import cv2 import numpy as np # image = Image.open('14 阅读全文
posted @ 2020-04-14 12:40 Leeingli 阅读(115) 评论(0) 推荐(0) 编辑
摘要: from PIL import Image from PIL import ImageEnhance from PIL import ImageFilter im = Image.open("C:\\Users\\Leeing\\Pictures\\微信图片_20191128212811.jpg") 阅读全文
posted @ 2020-04-14 09:48 Leeingli 阅读(135) 评论(0) 推荐(0) 编辑
摘要: from PIL import Image im = Image.open('C:\\Users\\Leeing\\Pictures\\打死都不放手.gif') # 读入一个GIF文件 try: im.save('picframe{:02d}.png'.format(im.tell())) whil 阅读全文
posted @ 2020-04-14 09:37 Leeingli 阅读(117) 评论(0) 推荐(0) 编辑
摘要: # 图像基础调整: 图像的亮度、对比度、色度,还可以用于增强图像的锐度,美白 # """ from PIL import Image from PIL import ImageEnhance import cv2 import numpy as np # image = Image.open('14 阅读全文
posted @ 2020-04-14 03:09 Leeingli 阅读(154) 评论(0) 推荐(0) 编辑