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 年前3
k8s操作手册 2.361 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 #设置主机名称,所有结 json文件 里配置信任此镜像仓库地址! # cat >> /etc/hosts <和上面命令行方式二选一) # kubeadm config print init-defaults > /etc/kubeadm-init.yaml #输出初始化配 置文件并编辑 #修改以下2行配置 SystemdCgroup = true sandbox_image = "cof-lee.com:5443/k8s/pause:3.9" #和k8s需要的pause镜 像版本保持一致 #如果要启用CRI-Plugin,注释掉其中的 disabled_plugins = ["cri"] #再重启containerd即可有 unix:///ru 0 码力 | 126 页 | 4.33 MB | 1 年前3
git 操作手册#自带光盘里有 # 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 年前3
A Seat at the Table - IT Leadership in the Age of Agilityproduct. Management for the sake of management is not respected. Get things done: The hierarchy must be flattened. Layers of management get in the way of goals. The employee wants the shortest possible ever since. Follow Us Follow our Agile for Defense group on Meetup, Facebook, and GitHub where we post events and many of our table topics. https://www.meetup.com/Agile-for-Defense/ https://www trying? On the Agile for Defense Facebook group, I created a post where you can post your feedback as comments on the post. The URL to that post is: https://www.facebook.com/groups/AgileForDefense/perm0 码力 | 7 页 | 387.48 KB | 6 月前3
The DevOps Handbookpractices 1. Blameless post-mortems 2. Controlled introduction of failures for practice c. SCHEDULE BLAMELESS POST-MORTEM MEETINGS AFTER ACCIDENTS OCCUR i. Blameless Post-Mortem – meeting to examine the decision- making process of individuals proximate to the failure.” – John Allspaw ii. Blameless Post-Mortem – Actions: 1. Construct a timeline and gather details of the failure from multiple perspectives2 these countermeasures are recorded with ta target date and an owner for follow-up. iii. Blameless Post-Mortem – Stakeholders: 1. The people involved in decisions that may have contributed to the problem0 码力 | 9 页 | 25.13 KB | 6 月前3
A Seat at the Table: IT Leadership in the Age of Agility - Part 2features that we don’t actually use. It resists change—we can’t even change it ourselves, but have to get the vendor to change it. Our IT Skills Asset also becomes less flexible when we acquire an off-the-shelf use them correctly, enable a fast try-and-learn cycle in which developers can produce something, get feedback, and then adjust what they have produced. As a result, the code can be developed in a user-centric actual delivery. The more advance planning we do, the longer it takes to get a product to market; the longer it takes to get a product to market, the more risk we assume. our governance decisions0 码力 | 7 页 | 387.61 KB | 6 月前3
The DevOps Handbookservers like pets: “You name them and when they get sick, you nurse them back tohealth. [Now] servers are [treated] like cattle. You number them and when they get sick, you shoot them.” iii. Ensure consistency PULL THE ANDON CORD i. If not, it becomes increasing difficult to get back to a deployable state ii. If not, undoes the work done to get to a known workable state 4. Ch. 11 Enable and Practice Continuous0 码力 | 8 页 | 23.08 KB | 6 月前3
Redis操作手册Centos123 #-h指定服务器地 址, # -p指定端口,-a指定密码 10.99.1.51:6379> config get dbfilename 1) "dbfilename" 2) "dump.rdb" 10.99.1.51:6379> config get requirepass 1) "requirepass" 2) "Centos123" 10.99.1.51:6379> info #查看所有的key 1) "what" 2) "namexx" 3) "keyxx" 10.99.1.51:6379> 10.99.1.51:6379> get keyxx #查看指定key对应的值 "valuexx" ★可视化客户端工具 官网: h�ps://redis.com/redis-0 码力 | 5 页 | 80.37 KB | 1 年前3
The Phoenix Projectin a change request, they have to wait a lifetime to get approvals, let alone get on the schedule. We have the business breathing down our neck to get crap done. We can’t wait for you to hem and haw, complaining0 码力 | 3 页 | 154.45 KB | 6 月前3
DevOps Meetup Left development because I was frustrated that it took so much time to get my products into production. Thought I would get over there fix “their” problems. Discovered, multiple teams involved0 码力 | 2 页 | 246.04 KB | 6 月前3
共 12 条
- 1
- 2













