05 2020 档案

摘要:import requests from bs4 import BeautifulSoup import bs4 info=[] url ="http://www.zuihaodaxue.com/zuihaodaxuepaiming2018.html" try: r=requests.get(url 阅读全文
posted @ 2020-05-16 14:42 liuchun玲 阅读(111) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鸟教程(runoob.com)</title> </head> <body> <h1>欢迎您的加入23</h1> <p>有你想不到的意外哦!</p> </body> <table 阅读全文
posted @ 2020-05-16 13:23 liuchun玲 阅读(106) 评论(0) 推荐(0)
摘要:import requests def getHTMLText(url): try: r=requests.get(url,timeout=30) r.raise_for_status() r.encoding='utf-8' return r.text except: return "" url= 阅读全文
posted @ 2020-05-16 10:12 liuchun玲 阅读(71) 评论(0) 推荐(0)
摘要:from random import random def printIntro(): #打印程序介绍信息 print("19信计1班23号刘春玲进行比赛分析结果:") print("这个程序模拟两个选手A和B的某种竞技比赛") print("程序运行需要A和B的能力值(以0到1之间的小数表示)") 阅读全文
posted @ 2020-05-16 09:40 liuchun玲 阅读(81) 评论(0) 推荐(0)
摘要:#接收代码 import socket # 使用IPV4协议,使用UDP协议传输数据 s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # 绑定端口和端口号,空字符串表示本机任何可用IP地址 s.bind(('', 5000)) while Tru 阅读全文
posted @ 2020-05-12 21:47 liuchun玲 阅读(141) 评论(0) 推荐(0)
摘要:from PIL import Image from PIL import ImageEnhance import numpy as np # image = Image.open('file:///C:/Users/25764/Desktop/新建位图图像.bmp') #image.show() 阅读全文
posted @ 2020-05-06 20:09 liuchun玲 阅读(139) 评论(0) 推荐(0)
摘要:from PIL import Image import numpy as np vec_el = np.pi/2.2 # 光源的俯视角度,弧度值 vec_az = np.pi/4. # 光源的方位角度,弧度值 depth = 10. # (0-100) im = Image.open('C:/Us 阅读全文
posted @ 2020-05-06 19:05 liuchun玲 阅读(136) 评论(0) 推荐(0)
摘要:import numpy as np import matplotlib.pyplot as plt import matplotlib matplotlib.rcParams['font.family']='SimHei' matplotlib.rcParams['font.sans-serif' 阅读全文
posted @ 2020-05-06 16:16 liuchun玲 阅读(97) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-05-06 15:57 liuchun玲 阅读(107) 评论(0) 推荐(0)