Python
anping_wang
not at all , process can be access!
展开
-
leetcode 第6题 ZigZag Conversion
class Solution: def convert(self, s: str, numRows: int) -> str: if numRows == 1: #当层数为1的时候就直接输出原来的序列即可 return s res=list() #存储所有行的 字符串输出 for i in range(numR...原创 2019-02-27 22:19:33 · 222 阅读 · 0 评论 -
排序方法-堆排序,基数排序,快速排序 python实现
1 堆排序,大顶堆示例 def getLeft(i): return i*2 +1 def getRight(i): return i * 2 + 2 def adjust_max_heap(nums,length,i): # 定义一个int值保存当前序列最大值的下标 largest = i while True: # 找到当前调整节点...原创 2019-04-22 23:20:25 · 225 阅读 · 0 评论 -
pytorch环境安装 for Windows 2019年7月
pytorch windows 安装 1 在官网历史版本https://pytorch.org/get-started/previous-versions/ 下载对应的到本地文件 本地安装 命令行键入 pip install 本地位置 即可 2 安装 torchvision(注意版本号对应关系,网上没有一个系统的对照表) pytorch 1.0.0 对应的 torchvision版...原创 2019-09-29 10:57:27 · 218 阅读 · 0 评论