This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Xshell 5 商业版 注册码:101210-450789-147200 | |
Xftp 5 注册码:101210-450789-147200 | |
Xmanager 5 注册码:101210-450789-147200 | |
VMWare 12 Pro 注册码: | |
5A02H-AU243-TZJ49-GTC7K-3C61N | |
AG1N8-DZZ53-484QP-0YN5C-QQ0F2 | |
GG59U-DVZD5-M854Y-NYN7C-P3KW4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.mysql', | |
'NAME': 'cmdb', | |
'USER': 'root', | |
'PASSWORD': '', | |
'HOST': '127.0.0.1', | |
'PORT': '3306', | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import os | |
import sys | |
from subprocess import Popen, PIPE | |
def getPidList(prog_name): | |
"""获取进程的所有PID | |
输入:进程名 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import subprocess | |
def test(size=1024*64): | |
""" pip默认为 64k""" | |
print 'start' | |
cmd = 'dd if=/dev/urandom bs=1 count=%d 2>/dev/null' % size | |
p = subprocess.Popen(args=cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
""" return 返回的是完整的结果 | |
yield 返回的是一个值""" | |
def myzip1(*seqs): | |
"""使用返回值""" | |
seqs = [list(S) for S in seqs] | |
res = [] | |
while all(seqs): |