摘要: #例题 具体的统计性描述操作步骤,看下面博客: 数模-描述性统计(均值、方差、中位数...) #皮尔逊相关系数的计算 #对皮尔逊相关系数进行假设检验 代码: clear;clc load 'physical fitness test.mat' %文件名如果有空格隔开,那么需要加引号 % https: 阅读全文
posted @ 2022-05-06 11:18 司砚章 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 功能 利用百度地图API提供的全球逆地理编码服务可以实现经纬度批量转地址的功能。 数据的excel 申请自己的AK https://lbsyun.baidu.com/index.php?title=jspopular3.0/guide/getkey 注意一定要选择服务器端! 代码 # -*- cod 阅读全文
posted @ 2023-02-16 15:09 司砚章 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 按住win+R快捷键运行,然后输入regedit.exe 阅读全文
posted @ 2022-12-03 11:32 司砚章 阅读(221) 评论(0) 推荐(0) 编辑
摘要: package main import ( "errors" "fmt" ) type Queue struct { maxSize int array [5]int front int rear int } //添加队列 func (q *Queue) AddQueue(val int) (err 阅读全文
posted @ 2022-06-13 10:52 司砚章 阅读(34) 评论(0) 推荐(0) 编辑
摘要: login.go package main import "fmt" func login(userId int, userPwd string) (err error) { fmt.Printf("userId=%d userPwd=%s\n", userId, userPwd) return n 阅读全文
posted @ 2022-06-13 10:49 司砚章 阅读(263) 评论(0) 推荐(0) 编辑
摘要: Redis 命令参考 Redis 命令参考 — Redis 命令参考 Set Get 字符串 package main import ( "fmt" "github.com/garyburd/redigo/redis" ) func main() { conn, err := redis.Dial( 阅读全文
posted @ 2022-06-13 10:48 司砚章 阅读(57) 评论(0) 推荐(0) 编辑
摘要: ![image](https://img2022.cnblogs.com/blog/2140721/202203/2140721-20220306095256181-1145825589.png) 阅读全文
posted @ 2022-06-13 10:48 司砚章 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 综合案例 package main import ( "encoding/json" "fmt" "io/ioutil" ) type Monster struct { Name string Age int Skill string } func (m *Monster) Store() bool 阅读全文
posted @ 2022-06-13 10:47 司砚章 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 测试之前一定要把360关闭 package demo func addUpper(n int) int { res := 0 for i := 1; i <= n-1; i++ { res += i } return res } package demo import "testing" func 阅读全文
posted @ 2022-06-13 10:47 司砚章 阅读(20) 评论(0) 推荐(0) 编辑
摘要: goroutine package main import ( "fmt" "strconv" "time" ) func test() { for i := 1; i <= 10; i++ { fmt.Println("test () hello world" + strconv.Itoa((i) 阅读全文
posted @ 2022-06-13 10:47 司砚章 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 命令行参数基本使用 package main import ( "fmt" "os" ) func main() { fmt.Println("命令行的参数有", len(os.Args)) for i, v := range os.Args { fmt.Printf("args[%v]=%v\n" 阅读全文
posted @ 2022-06-13 10:36 司砚章 阅读(147) 评论(0) 推荐(0) 编辑
摘要: JSon json数据在线解析 https://www.json.cn/ 结构体 map 切片 序列化 结构体序列化 package main import ( "encoding/json" "fmt" ) type Monster struct { Name string Age int Bir 阅读全文
posted @ 2022-06-13 10:36 司砚章 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 指定结构体的tag标签 package main import ( "encoding/json" "fmt" ) type Monster struct { Name string `json:"moster_name"` Age int `json:"moster_age"` Birthday 阅读全文
posted @ 2022-06-13 10:36 司砚章 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 前言 Go 是一门简单有趣的编程语言,与其他语言一样,在使用时不免会遇到很多坑,不过它们大多不是 Go 本身的设计缺陷。如果你刚从其他语言转到 Go,那这篇文章里的坑多半会踩到。 如果花时间学习官方 doc、wiki、讨论邮件列表、 Rob Pike 的大量文章以及 Go 的源码,会发现这篇文章中的 阅读全文
posted @ 2022-06-13 10:32 司砚章 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 协程求素数 package main import ( "fmt" "time" ) func putNum(intChan chan int) { for i := 1; i <= 8000; i++ { intChan <- i //fmt.Println("写入数据", i) } close( 阅读全文
posted @ 2022-06-13 10:32 司砚章 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 将一个文件内容写入到另一个文件 package main import ( "fmt" "io/ioutil" ) func main() { file1Path := "C:/Users/pc/Desktop/1.txt" file2Path := "C:/Users/pc/Desktop/2.t 阅读全文
posted @ 2022-06-13 10:32 司砚章 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 打开文件 关闭文件 package main import ( "fmt" "os" ) func main() { file, err := os.Open("C:/Users/pc/Desktop/1.txt") if err != nil { fmt.Println("err=", err) 阅读全文
posted @ 2022-06-13 10:31 司砚章 阅读(23) 评论(0) 推荐(0) 编辑
摘要: ![image](https://img2022.cnblogs.com/blog/2140721/202201/2140721-20220126212628398-1107615227.png) 阅读全文
posted @ 2022-06-13 10:31 司砚章 阅读(22) 评论(0) 推荐(0) 编辑
摘要: ![image](https://img2022.cnblogs.com/blog/2140721/202201/2140721-20220124195653227-524878986.png) 阅读全文
posted @ 2022-06-11 10:27 司砚章 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 记账软件 面向对象 main.go package main import ( "fmt" "go_code/family/utils" ) func main() { fmt.Println("这个是面向对象的方式完成~") utils.NewFamilyAccount().MainMenu() 阅读全文
posted @ 2022-06-11 10:25 司砚章 阅读(33) 评论(0) 推荐(0) 编辑
摘要: channel管道 package main import "fmt" func main() { intChan := make(chan int, 3) fmt.Printf("intChan的值%v intChan本身的地址%p\n", intChan, &intChan) intChan < 阅读全文
posted @ 2022-06-11 10:24 司砚章 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 程序框架 服务器server.go package main import ( "fmt" "net" ) func process(conn net.Conn) { defer conn.Close() for { buf := make([]byte, 1024) fmt.Printf("服务器 阅读全文
posted @ 2022-06-11 10:24 司砚章 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 反射的示意图 案例1 package main import ( "fmt" "reflect" ) func reflectTest01(b interface{}) { //通过反射获取传入变量的type kind value rTyp := reflect.TypeOf(b) fmt.Prin 阅读全文
posted @ 2022-06-11 10:23 司砚章 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 单链表-往最后面插入 package main import "fmt" type HeroNode struct { no int name string nickname string next *HeroNode } //在单链表之后加入 func InsertHeroNode(head *H 阅读全文
posted @ 2022-06-11 10:23 司砚章 阅读(20) 评论(0) 推荐(0) 编辑
摘要: ![image](https://img2022.cnblogs.com/blog/2140721/202203/2140721-20220309111454966-82806504.png) 阅读全文
posted @ 2022-06-11 10:23 司砚章 阅读(153) 评论(0) 推荐(0) 编辑
摘要: ![image](https://img2022.cnblogs.com/blog/2140721/202202/2140721-20220204221704484-1748942315.png) 阅读全文
posted @ 2022-06-11 10:21 司砚章 阅读(30) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" ) func main() { key := "" loop := true balance := 10000.0 count := false money := 0.0 note := "" details := "收支\t账户金额\t收支金 阅读全文
posted @ 2022-06-11 10:21 司砚章 阅读(28) 评论(0) 推荐(0) 编辑
摘要: ![image](https://img2022.cnblogs.com/blog/2140721/202202/2140721-20220204091501580-1291554275.png) ![image](https://img2022.cnblogs.com/blog/2140721/202202/2140721-20220204092016034-216578758.png) ![i 阅读全文
posted @ 2022-06-11 10:21 司砚章 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 先创建文件夹 在一个包中设计需要引入的东西 然后进行引包 阅读全文
posted @ 2022-06-11 10:20 司砚章 阅读(42) 评论(0) 推荐(0) 编辑
摘要: model.go package model import "fmt" type person struct { Name string age int //其他包不能直接访问 sal float64 //其他包不能直接访问 } //写一个工厂模式的函数,相当于构造函数 func NewPerson 阅读全文
posted @ 2022-06-11 10:20 司砚章 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 1.自己写方法 package main import ( "fmt" "net/http" ) type MyHandler struct{} func (m *MyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { fmt.F 阅读全文
posted @ 2022-06-11 10:20 司砚章 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 创建新项目 测试: import torch import torchvision print(torch.randn(3,4)) 阅读全文
posted @ 2022-06-11 10:10 司砚章 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 1.设计的GUI界面为: 2.对象查看器 3.myWidget.py文件 import sys from PyQt5.QtWidgets import (QApplication, QMainWindow,QLabel, QTableWidgetItem, QAbstractItemView) fr 阅读全文
posted @ 2022-06-11 10:10 司砚章 阅读(185) 评论(0) 推荐(0) 编辑
摘要: QPainter绘图系统 paintEvent事件和绘图区 PyQt5的绘图系统使用户可以在屏幕或打印设备上用相同的API绘图,QPainter是用来进行绘图操作的类,一般的绘图设备包括QWidget、QPixmap、QImage等,这些绘图设备为QPainter提供了一个“画布”。 QWidget 阅读全文
posted @ 2022-06-11 10:10 司砚章 阅读(1492) 评论(0) 推荐(0) 编辑
摘要: 本文是将PyTorch上的MNIST手写数字的识别、CNN网络 在PyCharm 上进行展示 可以看我这篇博客 PyTorch-CNN Model 关于MNIST数据集无法下载的问题 可以看我另一篇博客 PyTorch-MNIST数据集无法下载-采用手动下载的方式 在PyCharm中导入PyTorc 阅读全文
posted @ 2022-06-11 09:50 司砚章 阅读(640) 评论(0) 推荐(0) 编辑
摘要: 一、列表介绍 想一想: 字符串可以用来存储一串信息,那么想一想,怎样存储所有同学的名字呢?定义100个变量,每个变量存放一个学生的姓名可行吗?有更好的办法吗? 答:列表。 1. 列表的格式 namesList= ['xiaoWang','xiaoZhang','xiaoHua'] 比C语言的数组强大 阅读全文
posted @ 2022-06-09 09:32 司砚章 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1.最大池化层算法 2.平均池化算法 3.乘幂平均池化算法 4.分数池化算法 5.自适应池化算法 6.反池化算法 阅读全文
posted @ 2022-06-09 09:30 司砚章 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 在命令行输入pip install jovian --upgrade 对于WARNING进行pip version更新 在命令行输入d:\python\python.exe -m pip install --upgrade pip 这样就成功啦! 阅读全文
posted @ 2022-06-09 09:29 司砚章 阅读(54) 评论(0) 推荐(0) 编辑
摘要: MNIST数据集的下载网站: http://yann.lecun.com/exdb/mnist/ 下载四个文件 放到文件夹里面 把上面的四个压缩文件放在raw里面 然后在进行下载一遍 就可以把剩下的没有下载的东西下载完成 在Pycharm中依然可以这么进行 剩下的就可以看我另外一篇博客 Pytorc 阅读全文
posted @ 2022-06-09 09:29 司砚章 阅读(859) 评论(0) 推荐(0) 编辑
摘要: 代码: def binary_search(li,val): left=0 right=len(li)-1 while left<=right: #候选区有值 mid=(left+right)//2 if li[mid]==val: return mid elif li[mid]>val:#待查找的 阅读全文
posted @ 2022-06-09 09:27 司砚章 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 除了使用xlrd库或者xlwt库进行对excel表格的操作读与写,而且pandas库同样支持excel的操作;且pandas操作更加简介方便。 首先是pd.read_excel的参数:函数为: pd.read_excel(io, sheetname=0,header=0,skiprows=None, 阅读全文
posted @ 2022-06-09 09:27 司砚章 阅读(4674) 评论(0) 推荐(0) 编辑