随笔分类 -  python

摘要:a = f'da' f'da' 报错 a = (f'da' f'da') 没问题 不用f时候也是这样 阅读全文
posted @ 2023-09-10 18:02 种树人 阅读(3) 评论(0) 推荐(0) 编辑
摘要:a = [1,2,3,4,5,6] x = 0 a[x] = 1 a[a[x]] = 2 a[x], a[a[x]] = a[a[x]], a[x] # 实质执行了 xxx = a[a[x]], a[x] ; a[x], a[a[x]] = xxx print(a) # [2, 2, 1, 4, 5 阅读全文
posted @ 2023-03-06 12:25 种树人 阅读(54) 评论(0) 推荐(0) 编辑
摘要:做 leetcode 1774时候遇到的一个bug class Solution: def closestCost(self, baseCosts: List[int], toppingCosts: List[int], target: int) -> int: ans = min(baseCost 阅读全文
posted @ 2022-12-04 22:45 种树人 阅读(506) 评论(0) 推荐(0) 编辑
摘要:res = ListNode(1) res.next = ListNode(2) # res 1->2 方式1 打印 1 2 , 这里是为什么? res1 = res.next res1 = None 方式2 打印 1 res.next = None while res: print(res.val 阅读全文
posted @ 2022-11-23 02:27 种树人 阅读(21) 评论(0) 推荐(0) 编辑
摘要:###参考 http://www.elecfans.com/d/779631.html https://blog.csdn.net/ashome123/article/details/117110042 import torch from torch import einsum a = torch. 阅读全文
posted @ 2021-10-26 17:31 种树人 阅读(286) 评论(0) 推荐(0) 编辑
摘要:转自https://www.cnblogs.com/qinchao0317/p/10699717.html 目录 %用法 format用法 %用法 1、整数的输出 %o —— oct 八进制%d —— dec 十进制%x —— hex 十六进制 1 >>> print('%o' % 20) 2 24 阅读全文
posted @ 2021-03-07 15:40 种树人 阅读(1131) 评论(0) 推荐(0) 编辑
摘要:转自https://blog.csdn.net/edogawachia/article/details/80515038 阅读全文
posted @ 2021-03-06 20:05 种树人 阅读(231) 评论(0) 推荐(0) 编辑
摘要:###转载于https://blog.csdn.net/qq_31347869/article/details/104794515 画了这么久的图,脑子里还是乱的,每次想实现个效果都能查到不同的实现方法,什么 plt.plot 啦,ax.plot 啦,看起来好像都能达到目的?特别是到了精调绘图细节, 阅读全文
posted @ 2021-03-05 22:59 种树人 阅读(2179) 评论(0) 推荐(0) 编辑
摘要:![](https://img2020.cnblogs.com/blog/1956115/202008/1956115-20200821152922310-1906244565.png) 阅读全文
posted @ 2020-08-21 15:30 种树人 阅读(68) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/ftimes/article/details/107216346 怎么会有等号不写成等号的人呢哈哈哈哈 阅读全文
posted @ 2020-08-16 21:19 种树人 阅读(68) 评论(0) 推荐(0) 编辑
摘要:对于__init__.py方法的说明 阅读全文
posted @ 2020-07-31 00:09 种树人 阅读(112) 评论(0) 推荐(0) 编辑
摘要:Pytorch详解BCELoss和BCEWithLogitsLoss torch.ge 函数 torch.clamp函数 Pytorch 中 nn.Linear 函数解读(包含维度) 各种优化算法(ps:梯度下降的解释去看矩阵微积分那篇文章) pytorch中RNN参数的详细解释 RNN 详解PyT 阅读全文
posted @ 2020-06-17 22:24 种树人 阅读(125) 评论(0) 推荐(0) 编辑
摘要:python二维图像输出操作大全(非常全) 分别使用plot()和scatter()画散点图,以及如何改变点的大小 阅读全文
posted @ 2020-06-14 21:31 种树人 阅读(86) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/weixin_42128329/article/details/100005642 在Pycharm的Setting里安装的第三方库仅仅只针对于本项目有效(新装的库也就存在这个项目的Lib目录下)。如果每次做项目用的库差别不大,想要高效复用之前本地已经装好 阅读全文
posted @ 2020-05-29 14:11 种树人 阅读(231) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示