把图片转换成字符画的小程序python

把图片转换成字符画的小程序,效果如下 from PIL import Image color = ‘MNHQ$OC?7>!:-;.’ #zifu def to_html(func): html_head = ”’ <html> <head> <style type=”text/css”> body {font-family:Monospace; font-size:5px;} </style> </head> <body> ”’ html_tail = ‘</body></html>’ # ding yi HTML def wrapper(img): pic_str = func(img) pic_str = ”.join(l + ‘ <br/>’ for l in pi…

Read More

Python 抓取网站最新文章并且发送到邮箱提醒

import requests import smtplib import schedule import time from bs4 import BeautifulSoup from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.image import MIMEImage from email.header import Header account = ‘121942198@qq.com’ password = ”#QQ授权码 receiver = ‘76123708@qq.com’ #发送邮件 def send_email(): mailhost=’smtp.qq.com’ qqmail = smtplib.SMTP_SSL(host=…

Read More

Python可视化神器——pyecharts的超详细使用指南!

pyecharts 是一个用于生成 Echarts 图表的类库。Echarts 是百度开源的一个数据可视化 JS 库。用 Echarts 生成的图可视化效果非常棒,为了与 Python 进行对接,方便在 Python 中直接使用数据生成图 具体可以参考:https://www.jianshu.com/p/554d64470ec9