![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
清风中的农民工。
这个作者很懒,什么都没留下…
展开
-
pytorch3D conda安装的坑
conda linux 装pytorch3D原创 2022-12-17 13:45:30 · 409 阅读 · 1 评论 -
python 四种高级type
Any from typing import Any def get_first(items: list) -> Any: return items[0] Warning: beginners often get lazy with their type annotations, and tend to write Any even when a more specific type ann...原创 2019-01-14 05:05:33 · 893 阅读 · 1 评论 -
Class里 print 整个class的办法
str__和__repr 如果要把一个类的实例变成 str,就需要实现特殊方法__str__(): class Person(object): def init(self, name, gender): self.name = name self.gender = gender def str(self): return ‘(Person: %s, %s)’ % (self.name, self...原创 2019-01-16 01:19:22 · 2170 阅读 · 1 评论 -
在dick字典里找最大值并返回key的办法
在dick字典里找最大值并返回key的办法 a={‘ndp’: 1234, ‘lib’: 1345, ‘pc’: 1456} max(a[“r1”],key =a[“r1”].get) “pc”原创 2019-01-22 09:34:18 · 1651 阅读 · 0 评论