python3学习手册
函数func_out()里的变量 str1 = str1 + " World" func_inner() return str1 if __name__ == "__main__": print(func_out()) 结果: Hello World ★第6章、python3内置函数 内置函数是指不用import导入任何模块就能直接使用的函数 包名x 下的__init__.py里的 __all__=[这里列出的函 数及变量] 一个模块被另一程序第一次导入时,其主程序将运行,若不想让它运 行,可做个判断: if __name__=="__main__": #被导入模块的主程序写这里,只有它自己执行时才运行这里的代码 else: #来自另一程序的调用 import sys as xx #将导入的模块名 tar.gz模块安装包一样打包我们的源代码并执行setup.py去安装我们 的代码模块,可以使用distu�ls模块里的setup函数去打包 例如,我们写的代码有cof.py及lee.py两个模块,main.py只是用于测试 的主函数 现在需要把cof.py及lee.py打包成一个安装包 在我们的源程序目录下再创建一个setup.py文件,内容如下: from distutils.core import0 码力 | 213 页 | 3.53 MB | 1 年前3git 操作手册
nothing to commit (create/copy files and use "git add" to track) # echo 'print("hello world")' > main.py #随便创建一个文件 # git add . #提交当前工作目录的所有文件到暂存区(add为暂存操 作),命令最后有一个点. # new file: main.py #暂存区有了一个新的文件:main.py # git commit -m "msgxxx" #将暂存区提交到仓库区(commit为提交操作),- m后指定本次提交的说明信息 1 file changed, 1 inser�on(+) create mode 100644 main.py # git config --global init.defaultBranch main #设置默认分支名为main,默认 为master;设置完成后,再init其他仓库,则默认名称生效(只对新创建仓库生 效) # git branch -m main #将当前分支更名为main ★tag操作 tag是git版本库的一个标记命令,指向0 码力 | 35 页 | 1.69 MB | 1 年前3k8s操作手册 2.3
kubeadm init --kubernetes- version=v1.19.4 \ --apiserver-adver�se- address=10.99.1.51 \ # api server地址 --pod-network-cidr=10.244.0.0/16 \ # pod容器网段 --service-cidr=10.7.0.0/16 \ # service网段,即cluster kubeadm init --kubernetes- version=v1.28.2 \ --apiserver-adver�se- address=10.99.1.51 \ # api server地址 --pod-network-cidr=10.244.0.0/16 \ # pod容器网段 --service-cidr=10.7.0.0/16 \ # service网段,即cluster kube-flannel-ds-24�m -n kube-system I0430 11:16:34.505952 1 main.go:518] Determining IP address of default interface E0430 11:16:34.506062 1 main.go:204] Failed to find any valid interface to use: failed0 码力 | 126 页 | 4.33 MB | 1 年前3Predictably Irrational
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 forces we more to do with our desires – with how we want to view ourselves – than with reality. “A second main lesson lesson is that althrough irrationality is commonplace, it does not necessarily mean that we0 码力 | 3 页 | 234.46 KB | 5 月前3The DevOps Handbook
that could become an error and will likely trigger an alert 4. Error – error conditions such as API failures, internal issues 5. Fatal – forces a termination iv. Examples of potentially significant Use telemetry to measure outcomes iv. Etsy open-sourced their experimentation framework – Feature API e. INTEGRATE A/B TESTING INTO OUR FEATURE PLANNING i. Product owners should consider each feature0 码力 | 8 页 | 24.02 KB | 5 月前3The DevOps Handbook
suite becomes the living documentation of the system specification and represent working examples of API use e. DESIGN FOR OPERATIONS THROUGH CODIFIED NON-FUNCTIONAL REQUIREMENTS i. Designing for fast changes through pair programming or code review 3. Instrument the repository to detect suspicious code (API calls from certain types of test code) 4. Ensure every CI process is in an isolated container 50 码力 | 9 页 | 25.13 KB | 5 月前3DoD CIO Enterprise DevSecOps Reference Design - Summary
practice that aims at unifying software development (Dev), security (Sec) and operations (Ops). The main characteristic of DevSecOps is to automate, monitor, and apply security at all phases of the software0 码力 | 8 页 | 3.38 MB | 5 月前3A Seat at the Table: IT Leadership in the Age of Agility - Part 2
quick meeting between the program team, me, and the business unit leader who was my peer. The main purpose of these meetings was to laugh a lot, make fun of the Star Chamber’s serious facial expressions0 码力 | 7 页 | 387.61 KB | 5 月前3A Seat at the Table - IT Leadership in the Age of Agility
adapting. This is deeply opposed—let me say that again—deeply opposed to the control paradigm. If the main goal of IT leadership is to demonstrate that they can control projects and make them deliver according0 码力 | 7 页 | 387.48 KB | 5 月前3The DevOps Handbook
Coined by Martin Fowler in 2004 ii. Strangler Application 1. Put existing functionality behind an API 2. New functionality implemented in new services with new architecture 3. Make calls to old system0 码力 | 8 页 | 23.08 KB | 5 月前3
共 10 条
- 1