03 2020 档案

摘要:and 和 or 的用法 and 和 or 是python的两个逻辑运算符,可以使用and和or进行多个条件内容的判断. and是当and连接的所有的表达式的值为真时,才为真 or是当or连接的所有表达式的值一个为真时,这个表达式就为真 and和or表达式返回的本质 and 的返回结果问题: 从左到 阅读全文
posted @ 2020-03-17 17:09 ainimore 阅读(4470) 评论(0) 推荐(0) 编辑
摘要:输入一个字符串, 返回倒序排列的结果 如: abcdef, 返回 fedcba text = 'abcdef' 1、字符串本身的翻转 print(text[:: 1]) 2、利用列表的reversed函数,在格式化 print(''.join(reversed(text))) 3、新建一个列表,从后 阅读全文
posted @ 2020-03-17 16:20 ainimore 阅读(1121) 评论(0) 推荐(0) 编辑
摘要:CentOS7默认的防火墙不是iptables,而是firewalld. 安装iptable iptable service 先检查是否安装了iptables service iptables status 安装iptables yum install y iptables 升级iptables y 阅读全文
posted @ 2020-03-16 11:18 ainimore 阅读(3160) 评论(0) 推荐(0) 编辑
摘要:!/bin/bash file=log.txt HOST=172.16.16.11 USER=zhangsan PASSWORD=123456 remote_path=/data/Log local_path=/home/Log echo "welcome to sftp..." lftp u ${ 阅读全文
posted @ 2020-03-13 16:06 ainimore 阅读(681) 评论(0) 推荐(0) 编辑
摘要:apiVersion: apps/v1 kind: Deployment metadata: name: nginx deployment spec: selector: matchLabels: app: nginx replicas: 2 template: metadata: labels: 阅读全文
posted @ 2020-03-12 22:55 ainimore 阅读(666) 评论(0) 推荐(0) 编辑
摘要:碰到常规问题无法解释的 CPU 使用率情况时,首先要想到有可能是短时应用导致的问题,比如有可能是下面这两种情况。 第一,应用里直接调用了其他二进制程序,这些程序通常运行时间比较短,通过 top 等工具也不容易发现。 第二,应用本身在不停地崩溃重启,而启动过程的资源初始化,很可能会占用相当多的 CPU 阅读全文
posted @ 2020-03-04 23:32 ainimore 阅读(732) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示