python3学习手册⑤内置类属性 __dict__ #类的属性,一个字典,由类的数据属性组成 __doc__ #类的文档字符串 __name__ #类名 __module__ #类定义所在的模块 __bases__ #类的所有父类,一个元组 ⑥析构函数 __del__(self) #析构方法,在对象销毁时被调用 ★python解释器查找模块顺序 python解释器会去哪里找要导入的模块呢? 1,首先查找sys.modules字典里的模块(这是以前导入的所有模块的缓 存) 2,然后匹配内置的模块sys.buil�n_module_names 3,最后根据sys.path路径下去找(包含有程序当前路径;pip安装的包 在"site-packages"目录下) 都找不到就报错ModuleNotFoundError # python2 mkdir(dir1) #创建目录,若目录已存在则报错 os.makedirs(dir1, exist_ok=True) #创建目录,若目录已存在 也不报错 ret = os.system("dir") # 执行系统命令,成功执行返回0,失 败返回非0数值 import os current_dir = os.getcwd() path1 = os.path.join(current_dir0 码力 | 213 页 | 3.53 MB | 1 年前3
postgresql操作手册ad.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasev er-$basearch enabled=1 gpgcheck=0 # yum module disable postgresql -qy # yum install postgresql13-server -y # /usr/pgsql-13/bin/postgresql-13-setup mv /var/lib/pgsql/13/* /data_pg/ #将原数据目录下所有内容移动到新 数据目录下 # vi /usr/lib/systemd/system/postgresql-13.service #pg-13版本,修改systemd服 务文件,指定数据目录 #修改这行:Environment=PGDATA=/var/lib/pgsql/13/data/ # mv /var/lib/pgsql/* /data_pg/ #将原数据目录下所有内容移动到新数 据目录下 # vi /usr/lib/systemd/system/postgresql.service #pg-10版本,修改systemd服务 文件,指定数据目录 #修改这行:Environment=PGDATA=/var/lib/pgsql/data/0 码力 | 17 页 | 445.84 KB | 1 年前3
A Seat at the Table - IT Leadership in the Age of Agilityand last, that the business should be thought of as a community, or perhaps as a Complex Adaptive System, which needs to be led and managed through an inspect-and- adapt, feedback-and-vision-oriented approach dysfunctional transformation cycle. It lies, I believe, in our distinction between the development of a system and its operation and maintenance. Dividing our IT spending into development and maintenance buckets way to 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 it0 码力 | 4 页 | 379.23 KB | 5 月前3
k8s操作手册 2.3cgroupdriver=systemd" ] } # mkdir -p /etc/systemd/system/docker.service.d # docker info ★docker会修改防火墙规则,导致pod网络不通 # vi /usr/lib/systemd/system/docker.service #在[Service]下的ExecStart=/usr/bin/dockerd 置文件并编辑 # vi /etc/kubeadm-init.yaml apiVersion: kubeadm.k8s.io/v1beta2 bootstrapTokens: - groups: - system:bootstrappers:kubeadm:default-node-token token: abcdef.0123456789abcdef �l: 24h0m0s usages: 置文件并编辑 # vi /etc/kubeadm-init.yaml apiVersion: kubeadm.k8s.io/v1beta3 bootstrapTokens: - groups: - system:bootstrappers:kubeadm:default-node-token token: abcdef.0123456789abcdef �l: 24h0m0s usages:0 码力 | 126 页 | 4.33 MB | 1 年前3
The DevOps Handbookconsistent, & 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. Version control is for 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 needed to resolve the problem iii. Prioritize tests of the integrated system as a whole 3. Work towards single-piece flow iii. Trunk & state of Deployment Pipeline represents & communicates the current state of the system iv. Modified Definition0 码力 | 8 页 | 23.08 KB | 5 月前3
The DevOps HandbookAccidents are due to the inevitable design problems in complex systems that we build; they are system problems – not individual problems iii. Effective practices 1. Blameless post-mortems 2. Controlled “could have” a. These are counterfactual statements b. Frames the problem as the system as imagined rather than the system that actually exists 4. Focus on – “Why did it make sense to me when I took that and behavior of libraries and components ii. Test suite becomes the living documentation of the system specification and represent working examples of API use e. DESIGN FOR OPERATIONS THROUGH CODIFIED0 码力 | 9 页 | 25.13 KB | 5 月前3
The DevOps HandbookLogging Levels 1. Debug – anything that happens in the program 2. Info – user driven actions or system specific 3. Warn – conditions that could become an error and will likely trigger an alert 4. Error GTP Security & Risk Management group) 1. Authentication/authorization decisions 2. System and data access 3. System and application changes, especially privileged changes 4. Data changes (CRUD) 5. Invalid friction by adding more steps/approvals which tends to increase batch size ii. Toyota Production System – “people closest to a problem typically know the most about it.” iii. 2014 State of DevOps Report0 码力 | 8 页 | 24.02 KB | 5 月前3
The DevOps Handbookorganization iii. ENABLING ORGANIZATIONAL LEARNING AND A SAFETY CULTURE 1. When we work within a complex system, by definition it is impossible for us to perfectly predict all the outcomes for any action we processes, often to help individual departments maintain their “turf.” Failure is processed through a system of judgment, resulting in either punishment or justice and mercy. c. Generative organizations OF RECORD AND SYSTEMS OF ENGAGEMENT i. Gartner Bi-modal IT 1. Type 1 – System of Record – “Doing it right” 2. Type 2 – System of Engagement – “Doing it fast” ii. DevOps helps reject the bi-modal IT0 码力 | 8 页 | 22.57 KB | 5 月前3
The Phoenix ProjectUnlimited. Key Concepts The Three Ways [2] The First Way emphasizes the performance of the entire system, as opposed to the performance of a specific silo of work or department. The outcomes of putting degradation, always seeking to increase flow, and always seeking to achieve profound understanding of the system (as per Deming). The Second Way is about creating the right to left feedback loops. The goal of daily work, creating rituals that reward the team for taking risks, and introducing faults into the system to increase resilience. Four Types of Work 1. Business projects 2. IT projects 3. Changes 40 码力 | 3 页 | 154.45 KB | 5 月前3
A Seat at the Table: IT Leadership in the Age of Agility - Part 2systems that preserve many of the advantages of buying off the shelf. The risk of developing a system incrementally and altering it based on user feedback is often lower than that of buying a finished change. The advantages of the agility that can be gained through a flexible, changeable, custom system —a smooth rather than a lumpy EA, as we put it in the last chapter—are becoming morecompelling, and assembling best-practice frameworks with continuous user feedback and then continuing to adapt the system over time as the business changes versus buying an undefined stream of future services from a vendor0 码力 | 7 页 | 387.61 KB | 5 月前3
共 17 条
- 1
- 2













