会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
notomatoes
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
2022年7月14日
Golang bufio输入
摘要: Golang 输入 package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func main() { // input a int num var a int fmt.Scan(&a) fmt.Println(a) var b,
阅读全文
posted @ 2022-07-14 00:42 Notomato
阅读(289)
评论(0)
推荐(0)
2022年5月25日
pytroch多卡训练保存的参数用CPU加载方法
摘要: 下面是有用的参考链接 参考链接
阅读全文
posted @ 2022-05-25 14:38 Notomato
阅读(36)
评论(0)
推荐(0)
2022年5月24日
python调用dll的一些问题
摘要: 参考链接 python调用dll是,要使用绝对路径,不然会存在其他包import这个包是发生错误 import os from ctypes import * dllpath = os.path.abspath(r"D:\python********\****\**\*******.dll") dl
阅读全文
posted @ 2022-05-24 20:43 Notomato
阅读(196)
评论(0)
推荐(0)
2022年5月20日
Go list的介绍与使用
摘要: 介绍 Go的list是一个双向链表,链表可以高效的删除插入元素,很多场景是需要用到这个结构的,比如cache 使用 list在包container/list下,可以通过NeW()初始化或者var声明 两种方法如下 mylist := list.New() var mylist list.List 常
阅读全文
posted @ 2022-05-20 10:51 Notomato
阅读(1171)
评论(0)
推荐(0)
2022年5月19日
Go 堆排序
摘要: 本文主要介绍Golang的堆排序使用方法,通过container/heap实现堆相关的操作 堆因为其插入删除的操作时间复杂度低,因此优先队列通常是靠堆来实现的。Go的堆使用要实现heap包下的Interface接口 type Interface interface { sort.Interface
阅读全文
posted @ 2022-05-19 17:35 Notomato
阅读(186)
评论(0)
推荐(0)
python heapq堆排序高阶用法
摘要: python heapq相关操作 heapq 的一些常用方法: heapify(list)将列表转换为小根堆的数据结构。 heappush(heap, x),将 x 加入堆中。 heappop(heap),从堆中弹出最小的元素。 heapreplace(heap, x),弹出最小的元素,并将 x 加
阅读全文
posted @ 2022-05-19 16:50 Notomato
阅读(1245)
评论(0)
推荐(0)
2022年5月16日
Go sort包
摘要: sort包简介 官方文档 Golang的sort包用来排序,二分查找等操作。本文主要介绍sort包里常用的函数,通过实例代码来快速学会使用sort包 sort包内置函数 sort.Ints(x []int) ints := []int{1, 4, 3, 2} fmt.Printf("%v\n", i
阅读全文
posted @ 2022-05-16 17:18 Notomato
阅读(565)
评论(0)
推荐(0)
上一页
1
2
3
公告