python3学习手册sys.stdin.readline() #读取一行,读到换行符结束,内容包含换行 符,返回sys.stdin.readlines() #读取所有行,读到Ctrl+D结束,内容包含换行 符,返回 - ,每行作为一个元素
★命令行输入列表sys.argv import sys print("以下为命令行参数:", sys.argv) ②print()旧式字符串格式化 同C语言的sprin�()的格式化字符串用法,用 % 操作符 print( "这是第%2d号,体重%5.2f公折" % (num, wei) ) %-6.3f 表示左对齐,共6位宽,3位小数,浮点型(默认左对齐) 类 型 码 含义 类型码 含义 %c 字符 %s 字符串 %d 十进制整数 %u 无符号整数 %o 八进制数 %x 小写十六进制数 %X 大写十六进制数 %f 浮点数 输出带0b前缀 #o 输出带0o前缀 #x 输出带0x前缀 ,数字分组分隔 让数字以3个一组带上逗号分隔符 ,d 仅对应,d,不可用,f ,x之类 _d _o _x _b 可对应这4个,以每4个字符为一组带_下划线输出 %百分比形式 {:%} 自动将数字乘以100带上%号,浮点数表示了,默认6位小数 0 码力 | 213 页 | 3.53 MB | 1 年前3
k8s操作手册 2.3#设置时区 # systemctl restart chronyd # chronyc sources -v ⑦设置网络参数 #首先加载模块 # cat > /etc/modules-load.d/br_ne�ilter.conf </etc/modules-load.d/k8s-ipvs.conf < d # docker info ★docker会修改防火墙规则,导致pod网络不通 # vi /usr/lib/systemd/system/docker.service #在[Servi 0 码力 | 126 页 | 4.33 MB | 1 年前3
The DevOps HandbookMyth—DevOps is Only for Startups: b. Myth—DevOps Replaces Agile c. Myth—DevOps is incompatible with ITIL d. Myth—DevOps is Incompatible with Information Security and Compliance: e. Myth—DevOps Means Eliminating follows this progression: a. Environment creation: b. Code deployment: c. Test setup and run: d. Overly tight architecture: iv. ELIMINATE HARDSHIPS AND WASTE IN THE VALUE STREAM 1. In the book Implementing work: b. Extra processes: c. Extra features: d. Task switching: e. Waiting: f. Motion: g. Defects: h. Nonstandard or manual work:i. Heroics: d. The Second Way: The Principles of Feedback 270 码力 | 8 页 | 22.57 KB | 5 月前3
git 操作手册main.py # git log #查看提交记录;显示完整的hash值 commit 7b8ff6902bf14780a413a021cc1d946fd82fa82e (HEAD -> master) # commit后面为hash值,HEAD表示 Author: Cofbranch -v #查看所有分支的最新的提交 # git branch -D xxxxx #强制删除分支(不能删除当前所处的分支) # git branch -d xxxxx #删除空的分支,删除已被合并的分支 # git merge yyy #将指定的tag推送到远程仓库,先参考下一节 进行远程仓库的映射 # git push rmtRepo --tags #推送所有tag到远程仓库 # git tag -d v1.0.1 #删除指定的tag # git push rmtRepo --delete v1.2 #删除远程tag 0 码力 | 35 页 | 1.69 MB | 1 年前3
The DevOps HandbookI took that action?” 5. Brainstorm on real, implementable countermeasures – not Be more Careful d. PUBLISH OUR POST-MORTEMS AS WIDELY AS POSSIBLE i. After the meeting, widely publish the minutes, artifacts every day every exercise and new piece of information is evaluated and debated; more similar to R&D lab. f. REDEFINE FAILURE AND ENCOURAGE CALCULATED RISK-TAKING i. Leaders reinforce the culture through Single repository with over 1B files and over 2B SLOC, over 25K engineers for every Google property d. SPREAD KNOWLEDGE BY USING AUTOMATED TESTS AS DOCUMENTATION AND COMMUNITIES OF PRACTICE i. Ensure0 码力 | 9 页 | 25.13 KB | 5 月前3
The DevOps Handbookversion control by Ops was the highest predictor of both IT performance & organizational performance d. MAKE INFRASTRUCTURE EASIER TO REBUILD THAN TO REPAIR i. Quickly building enables quickly re-creating – lose the ability to learn from mistakes and diminish integrating that learning into future work d. Google Web Server (GWS) team was struggling with changes – Hard line: no changes would be accepted potential rework and merge problems 1. Cross-cutting dependency improvements often provide high-payoffs d. ADOPT TRUNK-BASED DEVELOPMENT PRACTICES i. CI and Trunk-based development (TBD) are countermeasures0 码力 | 8 页 | 23.08 KB | 5 月前3
postgresql操作手册#提示符=>前的postgres表示当前数据库名 # psql -h x.x.x.x -p 5432 -U cof -d db_test #使用cof用户登录pg,连接 db_test这个库 db_test=> #提示符 1.122 -p 5432 -U postgres #连接pg数据库, # -h指定地址,-p指定端口号,-U指定用户(默认为当前shell用户名),-W指定 用户密码, # -d指定数据库,默认连接的数据库名同用户名 Password for user postgres: #输入密码 psql (13.13) Type "help" create table tablexx (name VARCHAR(32), age INT, class INT); #创建名 为tablexx的表,3个字段 db_test=# \d tablexx; #查看表结构 Table "public0 码力 | 17 页 | 445.84 KB | 1 年前3
The DevOps HandbookStartups & shutdowns 9. Faults & errors 10. Circuit breaker trips 11. Delays 12. Backup success/failure d. USE TELEMETRY TO GUIDE PROBLEM-SOLVING i. Don’t practice “Mean Time until Declared Innocent” – culture probably a better way to do this.” Unfortunately, there wasn’t a better way to do that operation.” d. HAVE DEVELOPERS INITIALLY SELF-MANAGE THEIR PRODUCTION SERVICE i. Google has development groups self-manage add features to the baseline that also increase maintenance costs and identify opportunity costs. d. INTEGRATE A/B TESTING INTO OUR RELEASE i. A/B testing requires fast CD to support ii. Use feature0 码力 | 8 页 | 24.02 KB | 5 月前3
Government Excerptbad behavior?” I truly doubt that any of the Beltway bandits sees themselves as bad people, and I’d bet that most are truly well-meaning. It’s the system that has failed them, and us. But how do we change and accountability? You know the answer: Scrum. Let’s start a few thousand miles west of Washington, D.C., in the Washington state capital, Olympia. There, the past two administrations—first a Republican goals. This is what people should expect from their government. The very fact that they sound clichéd is an indicator of their importance. A cliché, after all, is just a truth repeated enough times to0 码力 | 3 页 | 414.99 KB | 5 月前3
Pomodoro Technique• No conversations • No meetings • No eating • No preening How does it work? 1. Choose a task you’d like to get done 2. Set the Pomodoro for 25 minutes 3. Work on the task until the Pomodoro rings Personal Productivity Using The Pomodoro Technique, Daniel Hinojosa, https://docs.google.com/presentation/d/1ufjcILARuowbv3Y9r-FP9-x3kmlIzq7bvOJBxRVh3-w/ present#slide=id.i0 [3] Flow: The Psychology of Optimal0 码力 | 3 页 | 289.16 KB | 5 月前3
共 12 条
- 1
- 2













