自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(40)
  • 收藏
  • 关注

原创 离线混合部署,tf-operator, tensorflow部署,Prometheus+grafana监控

文章目录部署环境及要求具体部署1、K8s搭建完毕(docker等)2、下载kfctl包与源码包**错误1)** 导致在执行kfctl命令时报错:Segmentation fault3、下载yaml文件并修改3、apply yaml文件4、阿里云构建拉取所需要的镜像5、创建pv6、修改各个deploy statefulset 的镜像下载策略部署环境及要求阿里云k8s集群k8s version :1.14.6工作节点配置:4核 16G Memory 50G HD由于配置要求相对较高,因此推荐使用阿里

2020-10-03 23:22:02 664

原创 K8s中资源优先级(Priority)文档

文章目录一、优先级1、定义2、功能3、使用二、驱逐(Eviction)1.背景2.软驱逐(Soft Eviction)和硬驱逐(Hard Eviction)1、软驱逐2、硬驱逐3、意义3.实现4.依据(QoS与优先级)5.流程总结6.特例一、优先级1、定义Priority:在除去 QoS之外,K8s同时存在着一种可行的自定义方式,即Priority,优先级表明了一个 Pod 相对于其它 Pod 的重要性。PriorityClass:是一个不受命名空间约束的对象,它定义了优先级类名跟优先级整数值的映射

2020-09-27 20:03:08 1888

原创 QoS文档

文章目录一、定义二、k8s与QoS1.背景一、定义QoS并不是运用于Kubernetes的专项技术,事实上它是一个广义的定义满足用户对不同应用不同服务质量的要求,需要网络能根据用户的要求分配和调度资源,对不同的数据流提供不同的服务质量,因此QoS应运而生QoS:Quality of Service,即服务质量,指一个网络能够利用各种基础技术,为指定的网络通信提供更好的服务能力,是网络的一种安全机制, 是用来解决网络延迟和阻塞等问题的一种技术,其特别对于容量有限制的网络具有特别的意义。针对某种类别的

2020-09-27 18:57:47 251

原创 Kubernetes 资源管理文档

文章目录一、Kubernetes 资源管理的概念1、资源2、节点可用资源二、资源对象1.请求(Requests)2.上限(Limits)3.三种管理方式1、单个资源对象的资源管理2、Limit Range3、Resource Quotas资源配额三、配置规则总结一、Kubernetes 资源管理的概念1、资源在 Kubernetes 中,我们已经明确Node和Pod的概念,针对于资源来说,Node 提供资源,而 Pod 使用资源。资源可以区分为:1)计算资源:CPU、Memory、GPU2)存储

2020-09-27 13:47:01 152

原创 CGroup文档

文章目录一、CGroup简述1、定义2、组成与基础概念2.1 control group 控制族群2.2 task 任务2.3 hierarchy 层级树2.4 subsystem 子系统2.5 CGroup 虚拟文件系统:进行分组管理和各子系统设置的用户接口2.6 层级图二、原理的简单分析1、task_struct2、cgroup结构3、cg_cgroup_link一、CGroup简述1、定义CGroup 是Linux 内核提供的一种可以限制、记录、隔离进程组所使用的物力资源的机制:它以分组的形式对

2020-09-25 21:39:00 143

原创 120. Triangle

120. TriangleGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[[2],[3,4],[6,5,7],[4,1,8,3]]The minimum path sum from top to bottom

2020-09-25 11:39:18 51

原创 200. Number of Islands

200. Number of IslandsGiven a 2d grid map of '1’s (land) and '0’s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are a

2020-09-24 21:46:08 91

原创 64. Minimum Path Sum

64. Minimum Path SumGiven a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at any point in time.Example:Input:[

2020-09-23 18:34:30 78

原创 78. Subsets

78. SubsetsGiven a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Example:Input: nums = [1,2,3]Output:[[3],[1],[2],[1,2,3],[1,3],[2,3],[1,2],[]]来源:力扣(Lee

2020-09-20 10:15:51 97

原创 kubernetes学习文档

kubernetes文章目录前言一、pandas是什么?二、使用步骤1.引入库2.读入数据总结前言提示:这里可以添加本文要记录的大概内容:例如:随着人工智能的不断发展,机器学习这门技术也越来越重要,很多人都开启了学习机器学习,本文就介绍了机器学习的基础内容。提示:以下是本篇文章正文内容,下面案例可供参考一、pandas是什么?示例:pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的。二、使用步骤1.引入库代码如下(示例):import numpy as

2020-09-20 00:49:10 940

原创 121. Best Time to Buy and Sell Stock

121. Best Time to Buy and Sell StockSay you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm

2020-09-17 23:21:51 104

原创 11. Container With Most Water

11. Container With Most WaterGiven n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with

2020-09-17 12:23:41 66

原创 14. Longest Common Prefix

14. Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string “”.Example 1:Input: [“flower”,“flow”,“flight”]Output: “fl”Example 2:Input: [“dog”,“ra

2020-09-16 14:48:35 66

原创 22. Generate Parentheses

22. Generate ParenthesesGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For examplegiven n = 3, a solution set is:[“((()))”,“(()())”,“(())()”,“()(())”,“()()()”]来源:力扣(LeetCode)链接:https://lee

2020-09-15 16:17:53 106

原创 70. Climbing Stairs

70. Climbing StairsYou are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Example 1:Input: 2Output: 2Explanation: There are two ways to climb

2020-09-14 12:28:44 109

原创 42. Trapping Rain Water

42. Trapping Rain WaterGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In th

2020-09-11 17:40:03 118

原创 496. Next Greater Element I

496. Next Greater Element IYou are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1’s elements in the corresponding places of nums2.The Next Greater Number of a

2020-09-11 16:21:25 76

原创 29. Divide Two Integers

29. Divide Two IntegersGiven two integers dividend and divisor, divide two integers without using multiplication, division and mod operator.Return the quotient after dividing dividend by divisor.The integer division should truncate toward zero, which me

2020-09-10 16:07:30 73

原创 31. Next Permutation

31. Next PermutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order)

2020-09-09 21:21:06 68

原创 1370. Increasing Decreasing String

1370. Increasing Decreasing StringGiven a string s. You should re-order the string using the following algorithm:Pick the smallest character from s and append it to the result.Pick the smallest character from s which is greater than the last appended ch

2020-09-08 16:00:50 86

原创 347. Top K Frequent Elements

347. Top K Frequent ElementsGiven a non-empty array of integers, return the k most frequent elements.Example 1:Input: nums = [1,1,1,2,2,3], k = 2Output: [1,2]Example 2:Input: nums = [1], k = 1Output: [1]Note:You may assume k is always valid, 1 ≤ k

2020-09-07 19:19:36 125

原创 容器(Docker)学习文档

在面对一个全新的概念之时,我们通常会有这样的几个简单的问题作为先导?1、我们为什么需要它?它是什么?2、它怎么样(有什么)?它是怎么来的(怎么做到的)?3、它现在发展到什么程度了呢?本学习文档就基于这样的三个视角,给出作者个人在学习过程中的理解、体会以及一些简单的实践过程。Q1、我们为什么需要它?它是什么?在接触容器之前,在于云计算相识的过程中,我已然接触了“虚拟机”这一概念以及实际应用,寻找他的一个出发点,某种意义上都是为了对应用程序及运行的环境进行隔离,构建一套能够不依赖于具体环境而运行的方

2020-09-05 22:34:04 371

原创 179. Largest Number

179. Largest NumberGiven a list of non negative integers, arrange them such that they form the largest number.Example 1:Input: [10,2]Output: “210”Example 2:Input: [3,30,34,5,9]Output: “9534330”Note: The result may be very large, so you need to retu

2020-09-05 11:08:21 66

原创 365. Water and Jug Problem

365. Water and Jug ProblemYou are given two jugs with capacities x and y litres. There is an infinite amount of water supply available. You need to determine whether it is possible to measure exactly z litres using these two jugs.If z liters of water is

2020-09-04 21:17:15 109

原创 leetcode1030. Matrix Cells in Distance Order

leetcode1030. Matrix Cells in Distance OrderWe are given a matrix with R rows and C columns has cells with integer coordinates (r, c), where 0 <= r < R and 0 <= c < C.Additionally, we are given a cell in that matrix with coordinates (r0, c0).

2020-09-04 11:23:42 90

原创 973. K Closest Points to Origin

973. K Closest Points to OriginWe have a list of points on the plane. Find the K closest points to the origin (0, 0).(Here, the distance between two points on a plane is the Euclidean distance.)You may return the answer in any order. The answer is gua

2020-09-02 16:38:40 84

原创 leetcode242 Anagram

leetcode242 AnagramGiven two strings s and t, write a function to determine if t is an alphabetic word of s.给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的字母异位词。来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/valid-anagram著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。Exam

2020-09-01 16:34:33 91

原创 leetcode56 intervals merge

leetcode56 intervals merge给出一个区间的集合,请合并所有重叠的区间。Given a set of intervals, merge all overlapped intervals.Examples:Input:intervals = [[1,3],[2,6],[8,10],[15,18]]Output:[[1,6],[8,10],[15,18]]Input:intervals = [[1,4],[4,5]]Output[[1,5]]来源:力扣(LeetCo

2020-08-31 17:08:23 97

原创 Git 学习文档

一、介绍Git是一款免费、开源的分布式版本控制系统,不必服务器端软件支持。用以有效、高速的处理从很小到非常大的项目版本管理。Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。二、安装配置1、安装在linux系统上进行安装事实上是非常便利的,以作者使用的CentOS系统为例,安装命令如下:yum install curl-devel expat-devel gettext-devel \ openssl-devel zlib-devel

2020-08-30 11:25:04 440

原创 Go语言学习文档(一)

背景:“Go是一个开源的编程语言,它很容易用于构建简单、可靠和高效的软件。”这是Go语言官方网站对自身的表述。Go语言由来自Google公司的Robert Griesemer,Rob Pike和Ken Thompso于 2007年9月开始设计和实现,于2009年的11月对外正式发布,旨在具有表达力,高效的编译和执行效率,有效地编写高效和健壮的程序。特点:1、Go语言中具有和并发编程相关的特性,对数据抽象和面向对象编程的灵活支持,同时还集成了自动垃圾收集技术用于更好地管理内存。2、Go语言尤其适合

2020-08-30 09:57:24 1117

原创 云计算学习文档

一、序言与典型代表之一阿里云云计算的定义:“云计算”按照维基百科地定义是一种基于互联网的计算方式,通过这种方式,共享的软硬件资源和信息可以按需求提供给计算机各种终端和其他设备,使用服务商提供的电脑基建作计算和资源。阿里云:建立的背景:早期阿里的IT架构深度依赖于国外的“IOE”模式,即I(IBM)、O(Oracle)、E(EMC),伴随着中国互联网产业的发展,针对于阿里自身即用户数量的大幅增加,服务器处理器使用率接近饱和。单纯进一步购买服务器的解决方案无论从成本以及效果上来说都不再合适,急需新的技术

2020-08-29 20:39:56 695

原创 Linux学习文档(二) CentOS虚拟机上安装Go语言开发环境以及运行简单的go web程序

实验环境:Vmware上的CentOS7虚拟机参考资料:安装.一、安装vscode(其实只是一个编辑器)打开终端,以root身份安装:su --login安装sudo rpm --import https://packages.microsoft.com/keys/microsoft.ascsudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos

2020-08-29 15:54:23 688

原创 阿里云ECS go web程序学习文档(一)

本地环境:Vmware CentOS7一、阿里云ECS服务器1、购买官方介绍:云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。链接: 阿里云ECS.24岁以下爱的朋友可以直接使用学生特惠,第一个月免费体验,并有后续优惠。本人操作系统选用CentOS7.6 64位,避免了交叉编译的麻烦,这一点在后文详述。2、可以根据需要重置登录密码3、安全组配置进入实例列表接下去配置规则:使用手

2020-08-29 15:05:44 296

原创 leetcode350 两个数组的交集 II

leetcode350 两个数组的交集 II给定两个数组,编写一个函数来计算它们的交集。示例1输入:nums1 = [1,2,2,1], nums2 = [2,2]输出:[2,2]示例 2:输入:nums1 = [4,9,5], nums2 = [9,4,9,8,4]输出:[4,9]说明:输出结果中每个元素出现的次数,应与元素在两个数组中出现次数的最小值一致。我们可以不考虑输出结果的顺序。进阶:如果给定的数组已经排好序呢?你将如何优化你的算法?来源:力扣(LeetCode)链接:h

2020-08-29 10:55:31 64

原创 leetcode969 煎饼排序

leetcode 969 煎饼排序给定数组 A,我们可以对其进行煎饼翻转:我们选择一些正整数 k<=A.length,然后反转 A 的前 k 个元素的顺序。我们要执行零次或多次煎饼翻转(按顺序一次接一次地进行)以完成对数组 A 的排序。返回能使 A 排序的煎饼翻转操作所对应的 k 值序列。任何将数组排序且翻转次数在 10 * A.length 范围内的有效答案都将被判断为正确。示例:输入:[3,2,4,1]输出:[4,2,4,3]解释:我们执行 4 次煎饼翻转,k 值分别为 4,2,4,

2020-08-28 10:17:26 158

原创 leetcode164 最大间距

164 最大间距给定一个无序的数组,找出数组在排序之后,相邻元素之间最大的差值。如果数组元素个数小于 2,则返回 0。示例 1:输入: [3,6,9,1]输出: 3解释: 排序后的数组是 [1,3,6,9], 其中相邻元素 (3,6) 和 (6,9) 之间都存在最大差值 3。示例 2:输入: [10]输出: 0解释: 数组元素个数小于 2,因此返回 0。说明:你可以假设数组中所有元素都是非负整数,且数值在 32 位有符号整数范围内。请尝试在线性时间复杂度和空间复杂度的条件下解决此问题

2020-08-27 09:57:24 167

原创 leetcode17 电话号码的字母组合

leetcode17 电话号码的字母组合给定一个仅包含数字 2-9 的字符串,返回所有它能表示的字母组合。给出数字到字母的映射如下(与电话按键相同)。注意 1 不对应任何字母。示例输入:“23”输出:[“ad”, “ae”, “af”, “bd”, “be”, “bf”, “cd”, “ce”, “cf”].说明:尽管上面的答案是按字典序排列的,但是你可以任意选择答案输出的顺序。答题思路:可以认为是广度优先的搜索思路,例如针对于“23”这样的输入:首先考虑2对应的三种情况即:a,b,c

2020-08-26 11:25:15 73

原创 Linux学习文档(一)Vmware与CentOS7(NAT模式网络配置问题的解决)

Part1 Virtual Machine概述虚拟机(Virtual Machine)指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。在实体计算机中能够完成的工作在虚拟机中都能够实现。在计算机中创建虚拟机时,需要将实体机的部分硬盘和内存容量作为虚拟机的硬盘和内存容量。每个虚拟机都有独立的CMOS、硬盘和操作系统。优势:在独立的虚拟系统里面进行,可以独立安装运行软件,保存数据,不会对真正的系统产生任何影响 ,无须担心操作不当导致宿主机系统崩溃。流行的虚拟机软件,例如所用

2020-08-25 19:50:36 148

原创 leetcode75 颜色分类

75 颜色分类给定一个包含红色、白色和蓝色,一共 n 个元素的数组,原地对它们进行排序,使得相同颜色的元素相邻,并按照红色、白色、蓝色顺序排列。此题中,我们使用整数 0、 1 和 2 分别表示红色、白色和蓝色。注意:不能使用代码库中的排序函数来解决这道题。示例输入: [2,0,2,1,1,0]输出: [0,0,1,1,2,2]进阶:一个直观的解决方案是使用计数排序的两趟扫描算法。首先,迭代计算出0、1 和 2 元素的个数,然后按照0、1、2的排序,重写当前数组。你能想出一个仅使用常数空

2020-08-25 09:57:42 107

原创 leetcode 7整数反转

7 整数反转给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。示例1输入:123输出:321示例2输入-123输出-321示例3输入:120输出:21注意:假设我们的环境只能存储得下 32 位的有符号整数,则其数值范围为 [−231, 231 − 1]。请根据这个假设,如果反转后整数溢出那么就返回 0。解题思路:作为作者写的第一份Go语言的代码,选择了这样一道思路清晰,但比较注重概念的一题作为开端。正如官方文档所提及的,解题的关键点就在于判断是否**“溢出

2020-08-24 20:32:39 95

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除