抓取ip的python脚本:via1.py#!/usr/bin/pythonimportoshttp=os.popen(‘ifconfig|grep10‘,‘r‘).readlines()str1=‘‘.join(http)pid=str1.split()[1].strip(‘addr:‘)printpid:wqpythona1.py
分类:
编程语言 时间:
2018-06-05 16:20:32
阅读次数:
164
抓取apache2的进程pid:via1.py#!/usr/bin/pythonimportoshttp=os.popen(‘netstat-ntpl|grep-w80‘,‘r‘).readlines()str1=‘‘.join(http)pid=str1.split()[6].strip(‘/apache2‘)printpid:wq
分类:
Web程序 时间:
2018-06-05 15:36:50
阅读次数:
207
strip,lstrip,rstirp,split,format,join, replace,startswith,endswith,lower, upper,isdigit append,(del,remove,pop), insert,index,count,clear,copy, extend ...
分类:
其他好文 时间:
2018-06-04 00:57:43
阅读次数:
183
一、字符串操作:name = 'aabc,dddd,a'name1 = 'q '# print(name[3]) #字符串也可以取下标# print(name.capitalize()) #把字符串首字母大写# print(name.center(11,'*')) #把name放中间,字符串少于11 ...
分类:
编程语言 时间:
2018-06-03 23:27:36
阅读次数:
295
1. ORC是什么 ORC,全称 Optimized Row Columnar.是Hadoop生态圈的列式存储概念,最早由Hive提出.\ 在Hive的ORC,首先依然是根据行组分割整个表,但是在每个行组中,按列存储.ORC文件是自描述的,它的元数据使用Protocol Buffers进行序列化,并 ...
分类:
其他好文 时间:
2018-06-03 17:32:02
阅读次数:
1536
原来的代码是 if (string.IsNullOrWhiteSpace(seal)) seal = null; ctx.Terminal.FirstOrDefault(ent=>ent.Seal==seal) 当seal是null时成长的sql语句如下,采用=null执行结果不是需要的 exec ...
分类:
其他好文 时间:
2018-06-03 12:28:50
阅读次数:
1219
复制代码代码如下: s.strip().lstrip().rstrip(',') 2、复制字符串 复制代码代码如下: #strcpy(sStr1,sStr2)sStr1 = 'strcpy'sStr2 = sStr1sStr1 = 'strcpy2'print sStr2 3、连接字符串 复制代码代 ...
分类:
编程语言 时间:
2018-06-03 12:17:55
阅读次数:
178
#!/usr/bin/env python # encoding: utf-8 # Date: 2018/6/3# 实现方式一:# 基于元类控制类的实例行为,单例模式# class MySQL:# __instance=None## def __init__(self):# self.host = ...
分类:
其他好文 时间:
2018-06-03 10:53:02
阅读次数:
115
#连续三级跳 a=True while a: print("level1") choice=input("level1>>: ").strip() if choice=="quit":break if choice =="quit_all":a=False while a: print("level... ...
分类:
其他好文 时间:
2018-06-02 17:39:37
阅读次数:
139
1 menu = { 2 '北京':{ 3 '朝阳':{ 4 '国贸':{ 5 'CICC':{}, 6 'HP':{}, 7 '渣打银行':{}, 8 'CCTV':{}, 9 ... ...
分类:
其他好文 时间:
2018-06-02 13:00:32
阅读次数:
194