摘要: class Node(object): def __init__(self,value=None,prev=None,next=None): self.value,self.prev,self.next = value,prev,next class DoubleLinkedList(object) 阅读全文
posted @ 2020-04-10 14:12 ColaIce 阅读(146) 评论(0) 推荐(0)
摘要: def quickly_sort(array): if len(array) < 2: return array else: mid_index = 0 mid = array[mid_index] less_port = [i for i in array[mid_index+1:] if i < 阅读全文
posted @ 2020-04-02 12:02 ColaIce 阅读(122) 评论(0) 推荐(0)
摘要: # 分而治之 def merge_sort(lists): if len(lists) <= 1: return lists else: mid = int(len(lists) / 2) left_half = merge_sort(lists[:mid]) right_half = merge_ 阅读全文
posted @ 2020-04-02 10:55 ColaIce 阅读(106) 评论(0) 推荐(0)
摘要: def binary_search(list,want): # 首先确定查找队列的首位,以及中间数的位置 min = 0 max = len(list)-1 #首位不一致说明有中间数 while min <= max: mid = int((min + max) // 2) if list[mid] 阅读全文
posted @ 2020-04-01 16:21 ColaIce 阅读(121) 评论(0) 推荐(0)
摘要: def cfb(n): if n > 9: return for i in range(1,n+1): print(f"{i} * {n} = {i * n}", end="\t") print("") cfb(n+1) cfb(1) 需要注意的是: 在递归中,算法逻辑应该尽量避免发生自循环,发生的 阅读全文
posted @ 2020-04-01 16:11 ColaIce 阅读(66) 评论(0) 推荐(0)
摘要: def bublle_sort(lists): n = len(lists) for i in range(n-1): for j in range(n-1-i): if lists[j] > lists[j+1]: lists[j],lists[j+1] = lists[j+1],lists[j] 阅读全文
posted @ 2020-04-01 15:01 ColaIce 阅读(97) 评论(0) 推荐(0)
摘要: 配置好服务后,发现启动失败,因为 kubelet 启动时会先向 kubectl注册自己,注册时用到一个 clusterrolebinding 概念下的一个角色。首先进行校验定义在 kubelet-bootstrap.kubeconfig 文件中的urser: # apiVersion: v1# cl 阅读全文
posted @ 2020-03-24 09:32 ColaIce 阅读(1066) 评论(0) 推荐(0)
摘要: 7za x -so 文件.tar.7z | tar xf - 和文件权限有关 持续踩坑中。。。。。 阅读全文
posted @ 2020-02-07 11:41 ColaIce 阅读(1588) 评论(0) 推荐(0)
摘要: pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple源列表: 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.us 阅读全文
posted @ 2019-09-26 16:25 ColaIce 阅读(239) 评论(0) 推荐(0)
摘要: ##上传下载文件 下载文件 scp username@servername:/path/filename /local_dir 上传文件 scp /path/filename username@servername:/path ##上传下载文件夹下所有内容 +-r就行 阅读全文
posted @ 2019-08-11 12:38 ColaIce 阅读(106) 评论(0) 推荐(0)