摘要: 一、神经网络算法建立模型 # -*- coding: utf-8 -*- """ Created on Tue Mar 29 22:20:37 2022 @author: lizijia """ def cm_plot(y, yp): from sklearn.metrics import conf 阅读全文
posted @ 2022-03-29 22:26 睡务局局长 阅读(79) 评论(0) 推荐(0)
摘要: 数学建模学到第6讲 6.2纯随机性检验 阅读全文
posted @ 2021-10-23 21:56 睡务局局长 阅读(41) 评论(0) 推荐(0)
摘要: 数学建模学到第四讲 4.9多目标规划 阅读全文
posted @ 2021-10-09 22:20 睡务局局长 阅读(23) 评论(0) 推荐(0)
摘要: package Size; import java.util.Scanner; import java.util.Random; import static java.lang.Math.*; public class CalculateText{ public static void main(S 阅读全文
posted @ 2021-09-27 17:55 睡务局局长 阅读(110) 评论(0) 推荐(0)
摘要: import random from math import *def printIntro():#打印程序的介绍性信息 print("模拟乒乓球竞赛") print("学号31") print("程序运行需要A和B的能力值(以0到1之间的小数表示)")try: printIntro()except 阅读全文
posted @ 2020-05-13 17:19 睡务局局长 阅读(96) 评论(0) 推荐(0)
摘要: Matplotlib Matplotlib 是一个 Python 的 2D绘图库,它以各种硬拷贝格式和跨平台的交互式环境生成出版质量级别的图形。 通过 Matplotlib,开发者可以仅需要几行代码,便可以生成绘图,直方图,功率谱,条形图,错误图,散点图等。 实例 import numpy as n 阅读全文
posted @ 2020-05-06 19:53 睡务局局长 阅读(162) 评论(0) 推荐(0)
摘要: Image模块是在Python PIL图像处理中常见的模块,对图像进行基础操作的功能基本都包含于此模块内。如open、save、conver、show…等功能。 from PIL import Image m = Image.open("D:\\picture.jpg") 生成缩略图: im.thu 阅读全文
posted @ 2020-04-15 09:36 睡务局局长 阅读(117) 评论(0) 推荐(0)
摘要: jieba库对英文单词的统计 # -*- coding: utf-8 -*- def get_text():txt = open("1.txt", "r", encoding='UTF-8').read()txt = txt.lower()for ch in '!"#$%&()*+,-./:;<=> 阅读全文
posted @ 2020-04-08 09:22 睡务局局长 阅读(89) 评论(0) 推荐(0)
摘要: import turtle class Stack: def __init__(self): self.items = [] def isEmpty(self): return len(self.items) == 0 def push(self, item): self.items.append( 阅读全文
posted @ 2020-03-31 09:57 睡务局局长 阅读(129) 评论(0) 推荐(0)
摘要: 五角星 from turtle import * fillcolor('red') hideturtle() begin_fill() while True: forward(200) right(144) if abs(pos())<1: break end_fill() 六角形 import t 阅读全文
posted @ 2020-03-15 18:14 睡务局局长 阅读(336) 评论(0) 推荐(0)