上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 27 下一页
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 lst = ['hongkong','xiantyk','chinat','guangdong','z'] lst2 = [] lst3 = [] lst4 = [] def get_num(): for i in 阅读全文
posted @ 2021-01-13 22:13 tigergaonotes 阅读(511) 评论(0) 推荐(0) 编辑
摘要: #(1)临时关闭swap分区, 重启失效; swapoff -a #(2)永久关闭swap分区 sed -ri 's/.*swap.*/#&/' /etc/fstab 也可以在sysctl.conf中进行限制。 vm.swappiness=10 阅读全文
posted @ 2021-01-12 22:17 tigergaonotes 阅读(1380) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-01-12 22:15 tigergaonotes 阅读(51) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 class Car: """一次模拟汽车的简单尝试""" def __init__(self,make,model,year): """初始化汽车的属性""" self.make = make self.model 阅读全文
posted @ 2021-01-11 22:07 tigergaonotes 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-01-11 21:55 tigergaonotes 阅读(63) 评论(0) 推荐(0) 编辑
摘要: ① 物理CPU 实际Server中插槽上的CPU个数 物理cpu数量,可以数不重复的 physical id 有几个 ② 逻辑CPU Linux用户对 /proc/cpuinfo 这个文件肯定不陌生. 它是用来存储cpu硬件信息的 信息内容分别列出了processor 0 – n 的规格。这里需要注 阅读全文
posted @ 2021-01-11 21:45 tigergaonotes 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 class Dog: """一次模拟小狗的简单尝试""" def __init__(self,name,age): """初始化属性名字和年龄""" self.name = name self.age = age 阅读全文
posted @ 2021-01-09 22:09 tigergaonotes 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 导入整个模块: import 模块名 导入特定函数: from module_name import function_name 通过逗号可以分割函数名,如果需要导入多个则 from a import b,c,d,e View Code 阅读全文
posted @ 2021-01-09 21:38 tigergaonotes 阅读(115) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 def make_pizza(*toppings): print("\nmaking a pizza with the following toppings:") for topping in toppings: 阅读全文
posted @ 2021-01-09 21:24 tigergaonotes 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 此时测试表中有7条数据,做个全备。 全备: mongodump --host=192.168.43.43 --port=37017 --oplog --out=/opt/mongo/fullbackup 在插入一条: 此时做增备,找出oplog中最近新增数据的ts时间:并记录下这个时间:157484 阅读全文
posted @ 2021-01-09 14:18 tigergaonotes 阅读(736) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 27 下一页