12 2023 档案

摘要: 阅读全文
posted @ 2023-12-17 17:03 yu4848 阅读(2) 评论(0) 推荐(0)
摘要:1. 有基本函数的用法 Numpy: 来存储和处理大型矩阵,比Python自身的嵌套列表(nested list structure)结构要高效的多,本身是由C语言开发。这个是很基础的扩展,其余的扩展都是以此为基础。数据结构为ndarray,一般有三种方式来创建。 Pandas: 基于NumPy 的 阅读全文
posted @ 2023-12-17 16:07 yu4848 阅读(14) 评论(0) 推荐(0)
摘要:球弹起来: # -*- coding:utf-8 -*- import sys # 导入sys模块 import pygame # 导入pygame模块 pygame.init() # 初始化pygame size = width, height = 640, 480 # 设置窗口 screen = 阅读全文
posted @ 2023-12-13 13:40 yu4848 阅读(35) 评论(0) 推荐(0)
摘要:import jieba txt = open("聊斋志异.txt", "r", encoding="utf-8").read() excludes = {"不知", "不可", "一日", "不敢", "数日", "家人", "以为"} words = jieba.lcut(txt) counts 阅读全文
posted @ 2023-12-13 09:27 yu4848 阅读(31) 评论(0) 推荐(0)
摘要:import requests url = 'https://www.bing.com' for i in range(20): response = requests.get(url) print(f"第{i+1}次访问") print(f'Response status: {response.s 阅读全文
posted @ 2023-12-09 10:15 yu4848 阅读(25) 评论(0) 推荐(0)