python3学习手册isinstance(x,int)会认为子类是父类的一种类型 ★类型转换 map(type, listxx) 将字符串str型list转为int型list strlist = ["23","15","6","44"] #元素类型为str strnn = list(map(int, strlist)) #map()将strlist的元素 都转为int型, range(3)] for _ in range(4)] for _ in range(2)] print(matrix) #查看数组行数与列数 arr = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]] print(len(arr)) # 行数 print(len(arr[0])) # 列数 utf-8 -*- str1 = "我们" # 默认同 b"我们" str2 = u"我们" print len(str1) print len(str2) 结果: 6 # str1默认是bytes,"我们"用u�8编码时为6字节长度 2 # str2强制指定为unicode,2字符长度 让py2也默认使用py3的unicode字面量 #!/usr/bin/env python0 码力 | 213 页 | 3.53 MB | 1 年前3
git 操作手册#提交的说明信息 # git log --oneline #同上,提交记录以一行显示一次提交;只显示hash 值前6个字符 7b8ff69 (HEAD -> master) msgxxx # git log 文件名 #查看目标文件的提交记录 # git log -p branch xxx #在当前提交的对象上创建新的分支,名为xxx # git branch yyy 7b8ff6 #在指定的提交对象上创建新的分支;提交的hash值 可写全,也可只写前6字符 # git checkout xxx #切换分支 # git branch master * xxx cat /etc/gitlab/ini�al_root_password #查看初始化后自动生成的root密码,会 在24小时后自动删除此文件 Password: Vx5HgVtCjOr09ZB6u0M+rHAb476Wp5BP5YmWqTyU5ng= # gitlab-ctl status #查看gitlab状态 # gitlab-ctl start0 码力 | 35 页 | 1.69 MB | 1 年前3
k8s操作手册 2.3modprobe overlay # modprobe br_ne�ilter # cat >> /etc/sysctl.conf <6tables = 1 net.bridge.bridge-nf-call-iptables = 1 net.bridge.bridge-nf-call-arptables = 1 net.ipv4.ip_forward -y # containerd --version #查看版本 containerd containerd.io 1.6.24 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523 ★配置containerd服务 # mkdir -p /etc/containerd # containerd config default > �gera-operator NAME READY STATUS RESTARTS AGE �gera-operator-59b69c49dc-t6crt 1/1 Running 1 (10m ago) 51m # kubectl get pods -n calico-system NAME 0 码力 | 126 页 | 4.33 MB | 1 年前3
The DevOps HandbookThe DevOps Handbook – Parts 5 & 6 – Part 5: The Third Way – The Technical Practices of Continual Learning and Experimentation; 1. Introduction a. Goal – practices to enable learning as quickly, frequently responded to the problem 4. People who diagnosed the problem 5. People who were affected by the problem 6. Anyone else who is interested in attending the meeting iv. Guidance 1. Pull all factual evidence standards and tools, including security 4. Deployment pipeline tools 5. Monitoring and analysis tools 6. Tutorials and standards ii. Google – Single repository with over 1B files and over 2B SLOC, over 25K0 码力 | 9 页 | 25.13 KB | 5 月前3
The DevOps Handbookworking on now? f. What is your next step? g. What is your expected outcome? h. When can we check? 6. PART II—WHERE TO START 47 7. Ch. 5 Selecting Which Value Stream to Start With 51 a. GREENFIELD vs Any Leader needs to be brave enough to allocate teams to do some calcuated risk- taking.” 8. Ch. 6 Understanding the Work in Our Value Stream, Making it Visible, and Expanding it Across the Organization AGREE ON A SHARED GOAL i. Define a measurable goal with a clearly defined deadline approximately 6 months to 2 years out.e. KEEP OUR IMPROVEMENT PLANNING HORIZONS SHORT i. Act like a startup, strive0 码力 | 8 页 | 22.57 KB | 5 月前3
The DevOps HandbookEnvironment scripts & creation tools 3. DB scripts and reference data 4. Containers 5. Automated tests 6. Project artifacts – documentation, procedures, etc. 7. Application configuration files 8. This also middleware 4. Copying packages to production servers 5. Restarting VMs, containers, applications, etc. 6. Generating configuration files 7. Run automated smoke tests 8. Running test procedures 9. Scripting progressive rollouts 4. Eliminates big bang, have already evaluated for considerable time before releasing 6. Ch. 13 Architect for Low-Risk Releases a. Principle of Evolutionary Architecture – Jez Humble – “any0 码力 | 8 页 | 23.08 KB | 5 月前3
DoD CIO Enterprise DevSecOps Reference Design - Summarybehavior. 4. Vulnerability Management 5. A service mesh proxy to connect to the service mesh 6. Zero Trust down to the container level. Zero trust requires strict controls, never trust anything Runtime Behavior Analysis Artificial Intelligence (AI) service 5. DCAR for the hardened containers 6. Common Vulnerabilities and Exposures (CVE)Service / host-based security to provide CVEs for the security0 码力 | 8 页 | 3.38 MB | 5 月前3
The DevOps Handbookprivileged changes 4. Data changes (CRUD) 5. Invalid input, possible malicious injections or threats 6. Resources (RAM, disk, CPU, bandwidth, and others with hard or soft limits) 7. Health & availability metric improvement>. We WillHave Confidence To Proceed When6. Ch. 18 – Create Review and Coordination Process to Increase Quality of Our Current Work a. Goal – 0 码力 | 8 页 | 24.02 KB | 5 月前3
Velocity Conference 2015/public/schedule/proceedings [2] YouTube Playlist: https://www.youtube.com/playlist?list=PL055Epbe6d5Y86GSg3nhUH3o_v62FGpCI0 码力 | 4 页 | 176.79 KB | 5 月前3
Pomodoro Techniquethe Pomodoro rings 4. When the Pomodoro rings, put a checkmark on a paper 5. Take a short break 6. Every 4 Pomodoros, take a longer break What does this buy me? 1. Find out how much effort an activity0 码力 | 3 页 | 289.16 KB | 5 月前3
共 11 条
- 1
- 2













