摘要:
import requests, os, xlrd, json, xlwings as xwclass readXls(): def read(self, name, sheetname): try: self.path = os.path.abspath(os.path.join(os.path. 阅读全文
摘要:
# coding:utf-8import requests, json, yagmail, os, timefrom config.config import *def Send_Email(content): day = time.strftime("%Y-%m-%d %H:%M*", time. 阅读全文
摘要:
# coding:utf-8class getvales(): def getdict(dict1, values): global values1,va #定义全局变量 values1 = values for k, v in dict1.items(): #把字典的key和values变成数组 阅读全文
摘要:
from faker import Faker# fake=Faker() #默认生成美国英文数据fake = Faker(locale='zh_CN')# fake = Faker(locale='si_LK')# 地址类print("地址类".center(20, "-"))print(fake 阅读全文
摘要:
from PIL import Imagefrom MyQR import myqrimport oslist = [ "TE1111000004046", "TE1111000074046"]def qr_code(str_list): curpath = os.path.dirname(os.p 阅读全文
摘要:
# coding:utf-8from socket import *HOST = '127.0.0.1'PORT = 8088BUFSIZ =1024ADDR = (HOST,PORT)tcpCliSock = socket(AF_INET,SOCK_STREAM)tcpCliSock.connec 阅读全文
摘要:
#!/usr/bin/expectset timeout 20set username xxxset password sxxxspawn scp /home/appxxxrovider.zip ${username}@xxx:/app/new-pkg/ expect { "(yes/no)?" { 阅读全文
摘要:
class readXls(): def read(self, name, sheetname): try: print('start read excel !') self.path = os.path.abspath(os.path.join(os.path.dirname(__file__), 阅读全文
摘要:
# coding:utf-8import osimport jpypefrom jpype import * # python,Java,win位数要相同# Java扩展包的路径,在Java的jar包中用到扩展模块,不导入此包会报错jarpath = os.path.join(os.path.abs 阅读全文
摘要:
# coding:utf-8from kafka import KafkaConsumerfrom kafka.structs import TopicPartitionimport timeconsumer = KafkaConsumer('test', group_id='my-group', 阅读全文
摘要:
# coding:utf-8import jsonfrom pykafka import KafkaClientdef readkafka(): with open('oms.json', 'r') as f: msg = f.read() # msg_d=eval(msg) d = json.lo 阅读全文
摘要:
import jsonfrom pykafka import KafkaClientfrom pykafka.simpleconsumer import SimpleConsumerimport timetopic = 'qq'data = { "ddgd":"dgdfg", "ddd":"fdg" 阅读全文
摘要:
#!/bin/bashos_check() { if [ -e /etc/redhat-release ]; then REDHAT=`cat /etc/redhat-release |cut -d' ' -f1` else DEBIAN=`cat /etc/issue |cut -d' ' -f1 阅读全文
摘要:
import threading, time, requests# class ThreadDemo(threading.Thread):## def run(self):# time.sleep(1)# now = time.strftime('%Y-%m-%d %H:%M:%S')# print 阅读全文
摘要:
作者:IBM刘欣 我是一个线程,我一出生就被编了个号: 0x3704,然后被领到一个昏暗的屋子里, 这里我发现了很多和我一模一样的同伴。 我身边的同伴0x6900待的时间比较长, 他带着沧桑的口气对我说: “我们线程的宿命就是处理包裹。把包裹处理完以后还得马上回到这里,否则可能永远回不来了。” 我一 阅读全文
该文被密码保护。 阅读全文