python3学习手册
集合是由若干个元素组成的,基本功能是 进行成员关系测试 和 删 除重复元素 set可以进行数学上的集合运算(差集,并集,交集等) 可用 { ... } 和 set() 函数创建集合,创建空集合必须使用 set()而不能用 {} 例: a=set("fldsaj") b=set("fdslj") a - b #a和b的差集 a | b #a和b的并集 a & b #a和b的交集 a ^ b #a和b中不同时存在的元素 ★判断变量类型 type(x) #返回x的类型,如isinstance(x, int) #返回True或False type()不会 认为子类是父类的一种类型 isinstance(x,int)会认为子类是父类的一种类型 # 右对齐,*补全 ★print输出带颜色的字linux 此种方法仅linux命令行下有效 print( "\033[0m 带颜色的文字 \033[0m" ) # \033[和m之间的数字为显示效果及颜色的 数字代码 数 字 代 码 效果 颜色 前景色代 码 背景色代 码 0 默 认 , 灰 白 黑 30 40 1 粗体 红 31 41 4 下划线 绿 32 42 0 码力 | 213 页 | 3.53 MB | 1 年前3k8s操作手册 2.3
61 k8s-node02.cof-lee.com 10.99.1.62 规划Pod网络: 10.244.0.0/16 规划Service网络: 10.7.0.0/16 # pod网络和service网络都要求为16位的地址块,且不能与环境中其他网络地址 段冲突 # hostnamectl set-hostname k8s-master1.cof-lee.com #设置主机名称,所有结 gateway 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 码力 | 126 页 | 4.33 MB | 1 年前3git 操作手册
#自带光盘里有 # git --version #查看git软件版本 git version 2.39.1 ★全局设置 设置用户名和邮箱,只用于提交commit时做metadata信息,不用于身份验证 #全局设置信息保存在 ~/.gitconfig 文件里 # git config --global user.name cof 在中央仓库工作流程模式下,只能推送到与本地分支名一致的 upstream分支中,如果推送的远程仓库和拉取数据的远程仓库不一 致,那么该模式会像current模式一样进行操作。因为该选项对于新 手来说是最安全的,所以在git 2.0中,simple是push.default的默认 值配置项(2.0以前的默认配置项是matching) matching 推送本地和远程都存在的同名分支 ★仓库操作 # mkdir git子目录,子目录里 有此git仓库的相关信息,初始化后要设置当前工作的用户名等相关信息,否则 使用全局设置 # git status #查看当前工作目录和暂存区的状态 On branch master No commits yet nothing to commit (create/copy files and use "git add" to track)0 码力 | 35 页 | 1.69 MB | 1 年前3Predictably Irrational
Predictably 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 月前3Open Discussion on Project Planning
make 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 月前3The DevOps Handbook
Way – 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 月前3Velocity Conference 2015
Velocity 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 月前3The DevOps Handbook
a. 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 月前3The DevOps Handbook
Foreword 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 月前3The DevOps Handbook
1. 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