上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要: Numpy的shape返回数组的维度,如下图,在ipython里面实践: 由此可知:shape返回的是数组的维度,其实shape返回的是一个元组:如下: 阅读全文
posted @ 2017-12-21 13:38 PirateLHX 阅读(256) 评论(0) 推荐(0)
摘要: class Solution(object): def countAndSay(self, n): """ :type n: int :rtype: str """ s=[] for i in range(n): if i==0: s.a... 阅读全文
posted @ 2017-12-18 09:43 PirateLHX 阅读(120) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/weixin_40416637/article/details/78783791 fatal error: caffe/proto/caffe.pb.h: No such file or directory: $ protoc src/caffe/proto 阅读全文
posted @ 2017-12-17 20:29 PirateLHX 阅读(1113) 评论(0) 推荐(0)
摘要: class Solution(object): def searchInsert(self, nums, target): """ :type nums: List[int] :type target: int :rtype: int """ if target in nums: ... 阅读全文
posted @ 2017-12-17 16:06 PirateLHX 阅读(111) 评论(0) 推荐(0)
摘要: class Solution(object): def strStr(self, haystack, needle): """ :type haystack: str :type needle: str :rtype: int """ return haystack.find(needle) ... 阅读全文
posted @ 2017-12-17 16:00 PirateLHX 阅读(78) 评论(0) 推荐(0)
摘要: class Solution(object): def removeElement(self, nums, val): """ :type nums: List[int] :type val: int :rtype: int """ if not nums: retur... 阅读全文
posted @ 2017-12-17 15:24 PirateLHX 阅读(83) 评论(0) 推荐(0)
摘要: class Solution(object): def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 0 flag... 阅读全文
posted @ 2017-12-17 15:13 PirateLHX 阅读(93) 评论(0) 推荐(0)
摘要: class Solution(object): def isValid(self, s): """ :type s: str :rtype: bool """ l=[] candidate=['(',')','{','}','[',']'] d={'(':')','{':'}'... 阅读全文
posted @ 2017-12-16 16:18 PirateLHX 阅读(131) 评论(0) 推荐(0)
摘要: class Solution(object): def longestCommonPrefix(self, strs): """ :type strs: List[str] :rtype: str """ if not strs: return "" for i,le... 阅读全文
posted @ 2017-12-16 15:00 PirateLHX 阅读(145) 评论(0) 推荐(0)
摘要: class Solution(object): def romanToInt(self, s): """ :type s: str :rtype: int """ d={"I":1,"V":5,"X":10,"L":50,"C":100,"D":500,"M":1000} sum=0 ... 阅读全文
posted @ 2017-12-16 14:15 PirateLHX 阅读(150) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 10 下一页