python3学习手册else: 语句体 ★循环语句 ① for循环 for i in xx : # xx为可遍历的数据,如list,tuple,bytes,bytearray break #跳出当前循环,跳出for #使用索引: for i in range(10) : #生成10个数,从0开始,0到9 [0, 0, 0]] 间接定义: matrix = [[0 for i in range(3)] for i in range(4)] # 4个 小list,每小list为3元素 print(matrix) matrix = [0 for _ in range(10)] # 下划线表示占位符,如果写 i,有时会提示i未被使用 print(matrix) 三维类推: matrix = [[[0 把元素x追加到列表的末尾 listxx.insert(i, x) # 在索引i指定位置插入元素x,原 listxx[i]后移一位 listxx.extend(listyy) # 把listyy追加到列表的末尾 listxx.remove(x) # 删除列表中第一个值为x的元素,若无这样的 元素则返回一个error listxx.pop(i) # 从列表的指定索引位置移除元素,并返回此元素值,0 码力 | 213 页 | 3.53 MB | 1 年前3
k8s操作手册 2.3gateway 10.99.1.1 # nmcli con up ens33 ③关闭seLinux 若不会配置selinux,则可关闭SELinux,若对安全性要求较高,则需自行配置 # sed -i '/^SELINUX/s/enforcing/disabled/' /etc/selinux/config # setenforce 0 #关闭selinux local <I DOCKER 1 -s 0.0.0.0/0 -j ACCEPT /usr/sbin/iptables -I DOCKER-USER 1 -s 0.0.0.0/0 -j ACCEPT /usr/sbin/iptables -I DOCKER-ISOLATION-STAGE-1 1 -s 0.0.0 0.0/0 -j ACCEPT /usr/sbin/iptables -I DOCKER-ISOLATION-STAGE-2 1 -s 0.0.0.0/0 -j ACCEPT EOF ★最好的做法是让docker不生成默认的docker0网桥,不修改iptables规则 # cat > /etc/docker/daemon.json < 0 码力 | 126 页 | 4.33 MB | 1 年前3
Predictably IrrationalPredictably Irrational – The Hidden Forces That Shape Our Decisions By Dan Ariely “If I were to distill one main lesson from the research described in this book, it is that we are pawns in a game whose Is Relative – Even When It Shouldn’t Be Examples: House Shopping, Vacations, Observations: o “humans rarely choose things in absolute terms. We don’t have an internal value meter that tells us Rather, we focus on the relative advantage of one thing over another, and estimate value accordingly” o “we not only tend to compare things with one another but also tend to focus on comparing things that0 码力 | 3 页 | 234.46 KB | 5 月前3
Open Discussion on Project Planningmake detailed plans beyond a program’s ability to control or accurately predict future circumstances o Agile methodology does not force programs to establish their full scope, requirements, and design at define the desired system functions and provide the foundation for Agile estimation and planning. o They describe what the users want to accomplish with the resulting system. User stories help ensure requirements than large requirements documents. DON’T treat planning as a one-time up front activity o In lieu of CDDs and CPDs, programs can develop Requirements Definition Packages (RDPs) to capture a0 码力 | 2 页 | 49.30 KB | 5 月前3
The DevOps HandbookWay – The Technical Practices of Feedback 1. Introduction a. Goal – Implement fast feedback loops i. Enable working towards shared goals ii. See problems as they occur iii. Enable quick detection & Create Telemetry to Enable Seeing and Solving Problems a. Fact – Things will go wrong in Operations! i. 2001 Microsoft Operation Framework study found the best-performing organization were better at diagnosing performers had MTTR 168x faster than low performers b. CREATE OUR CENTRALIZED TELEMETRY INFRASTRUCTURE i. Remove the silos of information – Developers don’t just log what’s interesting to development. Operations0 码力 | 8 页 | 24.02 KB | 5 月前3
Velocity Conference 2015Velocity Conference 2015 What is Velocity all about? What did I learn? Service Workers: The Practical Bits by Patrick Meenan (Google) @patmeenan http://www.slideshare.net/patrickmeenan/service-workers-for-performance Monitoring: more valuable than any other metric Web Performance: 2 seconds is the magic number Whom did I meet?Attributions and References [1] Speaker Slides and Videos: http://velocityconf.com/devops-web e/proceedings [2] YouTube Playlist: https://www.youtube.com/playlist?list=PL055Epbe6d5Y86GSg3nhUH3o_v62FGpCI0 码力 | 4 页 | 176.79 KB | 5 月前3
git 操作手册★配置yum源 # curl -ks h�ps://packages.gitlab.com/install/repositories/gitlab/gitlab- ce/script.rpm.sh -o script.rpm.sh # bash script.rpm.sh #安装官方yum源 # cat /etc/yum0 码力 | 35 页 | 1.69 MB | 1 年前3
The DevOps Handbooka. Goal – practices to enable learning as quickly, frequently, cheaply, and as soon as possible i. Institutionalize rituals to increase safety, continuous improvement, and learning ii. Create mechanism and Inject Learning into Daily Work a. Complex systems are impossible to predict for all outcomes i. Dr. Steven Spear - resilient organizations are “skilled at detecting problems, solving them, and multiplying architected for failure, tested for failure, and evolved beyond it b. ESTABLISH A JUST, LEARNING CULTURE i. Unjust responses to incidents 1. Impede safety 2. Promote fear over mindfulness 3. Create bureaucracy0 码力 | 9 页 | 25.13 KB | 5 月前3
The DevOps HandbookForeword xix 3. Imagine a World Where Dev and Ops Become DevOps: a. THE CORE, CHRONIC CONFLICT i. Among them are the two following goals, which must be pursued simultaneously: 1. Respond to the rapidly 2. Provide stable, reliable, and secure service to the customer b. THE BUSINESS VALUE OF DEVOPS i. Code and change deployments (thirty times more frequent) ii. Code and change deployment lead time service (168 times faster) 4. An Introduction to The DevOps Handbook xxi 5. PART I—THE THREE WAYS 1 a. Introduction i. THE LEAN MOVEMENT 1. manufacturing lead time required to convert raw materials0 码力 | 8 页 | 22.57 KB | 5 月前3
The DevOps Handbook1. Introduction a. Goal – Enable & sustain fast flow of work by implementing continuous delivery i. Create the foundation of our deployment pipeline ii. Enabling fast & reliable automated testing iii reduced from 8 weeks to 1 day b. ENABLE ON-DEMAND CREATION OF DEV, TEST, AND PRODUCTION ENVRIONMENTS i. Major contributing cause of issues stems from releases representing the first time we see how an application stable, reliable, consistent, & secure c. CREATE OUR SINGLE REPOSITORY OF TRUTH FOR THE ENTIRE SYSTEM i. ALL parts (code & environments) of the system are shared in a version control repository ii. Version0 码力 | 8 页 | 23.08 KB | 5 月前3
共 19 条
- 1
- 2













