python3学习手册
�tle() #将每单词首字母大写 strx.swapcase() #全部大小写翻转,互换 strx.replace("old", "new") #把strx中的old替换成new strx.rstrip() #过滤掉换行符及行尾的所有空白符 strx.lstrip() #过滤掉行首的所有空白符 #添加多个元素,这些元素是 iterablexx里的,iterablexx可为list,set,tuple ③dic�onary数据操作(无序,key不重复) dictxx["new_key"] = "new_value" # 新增键值对,如果已存在则 更新值 dictxx.update(lx) #添加多个键值对,lx为另一 dictionary value2 list推导式 newlist=[表达式 for 变量 in 源列表 if 条件] #直接返回list类型 例: names=["abc", "xd�l", "fdklsaj"] new_names=[name.upper() for name in names if len(name) >3 ] ② dic�onary推导式 newdic={ key表达式: value表达式0 码力 | 213 页 | 3.53 MB | 1 年前3git 操作手册
master No commits yet Changes to be commi�ed: (use "git rm --cached..." to unstage) new file: main.py #暂存区有了一个新的文件:main.py # git commit -m "msgxxx" #将暂存区提交到仓库区(commit为提交操作),- #删除指定的tag # git push rmtRepo --delete v1.2 #删除远程tag # git tag new-tag old-tag #基于原有的old-tag创建新tag(可用于重命名,生 成新tag后,再删除旧的tag) ★git远程协作开发 远程协作的基本流程: ① password #查看初始化后自动生成的root密码,会 在24小时后自动删除此文件 Password: Vx5HgVtCjOr09ZB6u0M+rHAb476Wp5BP5YmWqTyU5ng= # gitlab-ctl status #查看gitlab状态 # gitlab-ctl start 0 码力 | 35 页 | 1.69 MB | 1 年前3k8s操作手册 2.3
#查看当前结点注册的pod子网信息 ⑦部署calico网络插件(与flannel二选一) 官 方 指 导 : h�ps://docs.�gera.io/calico/latest/ge�ng- started/kubernetes/quickstart # mkdir ~/calico # cd ~/calico # wget h�ps://raw.githubusercontent sed -i 's/192.168.0.0\/16/10.244.0.0\/16/g' custom-resources.yaml #创建资源 Install Calico by crea�ng the necessary custom resource # kubectl create -f custom-resources.yaml #如果需要更改镜像,只能部署 cd /etc/kubernetes/pki # openssl genrsa -out kube-user01.key 2048 #创建用户的私钥 # openssl req -new -key kube-user01.key -out kube-user01.csr \ -subj "/CN=kube-user01/O=kubeusers" #创建证书申请文件0 码力 | 126 页 | 4.33 MB | 1 年前3The DevOps Handbook
environments (Prod, pre-prod(s), dev, & new) iv. Immutable Infrastructure 1. Once created no changes are allowed 2. Changes must be put into version control and then new infrastructure is created 3. To add” 2. Ensure the tests pass – “Write the functional code until the test passes”3. “Refactor both new and old code to make it well structured” j. AUTOMATE AS MANY OF OUR MANUAL TESTS AS POSSIBLE i. Reduce the build in a green state ii. When a change causes the build or automated tests to fail: 1. No new work is allowed to enter the system until the problem is fixed. 2. Bring in whatever help is needed0 码力 | 8 页 | 23.08 KB | 5 月前3DoD CIO Enterprise DevSecOps Reference Design - Summary
production: the average time it takes from when new software features are required until they are running in production. Average lead-time: how long it takes for a new requirement to be delivered and deployed deployed. Deployment speed: how fast a new version of the application can be deployed into the production environment. Deployment frequency: how often a new release can be deployed into the production environment0 码力 | 8 页 | 3.38 MB | 5 月前3A Seat at the Table - IT Leadership in the Age of Agility
incrementally modernize a legacy system as defined by Martin Fowler. Instead of building an entirely new system, we take a small piece of the legacy system and rebuild it in a way that lets it interoperate strangler pattern, we would develop a new system on the modernized architecture and then move the users over to it. The problem is that the users cannot begin using the new system until its capabilities at least match those of the legacy system. Because this usually takes a while, the first release of the new system doesn’t come for quite some time, which works against the Agile principle of delivering value0 码力 | 4 页 | 379.23 KB | 5 月前3A Seat at the Table - IT Leadership in the Age of Agility
making the decision, we would do research, debate the choice, maybe do a proof of concept. In our new world, we can simply implement one of the approaches and see how it works for us. We could even try reinforce the changes I have been describing, making them almost inevitable. Respect for skill: Your new IT workforce will respect co-workers who have impressive technical skills, and will have little respect in particular, must look at their jobs in a new way if they want to secure that seat at the table. Here are a few of the critical characteristics of the new IT leadership role. Driver of Outcomes: IT0 码力 | 7 页 | 387.48 KB | 5 月前3The DevOps Handbook
including strict compliance with budget and schedule 2. Experimental Model – every day every exercise and new piece of information is evaluated and debated; more similar to R&D lab. f. REDEFINE FAILURE AND ENCOURAGE tools (Hubot) into the middle of their chatrooms 1. Everyone saw everything that was happening 2. New engineers could see what daily work and how it was performed 3. People were more likely to ask for facilitate mitigation strategies m. PROTECT OUR DEPLOYMENT PIPELINE i. CD pipelines represent a new attack surface. If not properly secured, credentials could be compromised or malicious code & changes0 码力 | 9 页 | 25.13 KB | 5 月前3Velocity Conference 2015
brave quickly Seize opportunitiesGreat, you're now a software company. Now what? Patrick Lightbody (New Relic) Monitoring evolved from servers and networks to applications to what users do with applications problem to come along Changing the Laws of Engineering with GitHub Pull Requests by Ralph Bodenner (New Relic) https://bit.ly/pull-request-your-culture How you change your process matters Terms: culture0 码力 | 4 页 | 176.79 KB | 5 月前3The DevOps Handbook
built ii. Generate graphs with overlays of production changes iii. Tools – StatsD, JMX, codahale, New Relic, Prometheus, etc. f. CREATE SELF-SERVICE ACCESS TO TELEMETRY AND INFORMATION RADIATORS i. Director of Production Engineering) iii. Find the proper balance between fixing production issues and new features development – feature is only “done” when it’s performing as expected in production c.0 码力 | 8 页 | 24.02 KB | 5 月前3
共 16 条
- 1
- 2