随笔分类 - python入门到精通
摘要:import sys import time import os import paramiko from pygments.lexers import shell import zipfile import json baseconfig =None # baseconfig={ # "ip":
阅读全文
摘要:import time def log(delay=0): def decorator(func): def wrapper(*args, **kwargs): """我是 wrapper 的注释""" time1 = time.time() newargs = list(args) newargs
阅读全文
摘要:import traceback try: a=1/0 except: print(traceback.format_exc())
阅读全文
摘要:import sys import time import os import paramiko from pygments.lexers import shell baseconfig = { "ip": ", "port": , "username": "", "password": "“, "
阅读全文
摘要:import sys from orator import DatabaseManager import xlrd dbconfig = { 'mysql': { 'driver': 'mysql', 'host': "", 'database': "", 'user': "", 'password
阅读全文
摘要:def encrypt(self, params: str, key: str, iv: str) -> str: """加密""" generator = AES.new(key.encode("utf8"), AES.MODE_CBC, iv.encode("utf8")) bs = AES.b
阅读全文
摘要:import sys sys.path.append("d:\\") ll = __import__("ll") if __name__ == '__main__': ll.bb() 放在d盘下的ll.py文件 def bb(): print(111)
阅读全文
摘要:a = "#1+#5+#8+#10+#11+#12+#13+#14+#15-#22-#23-#24-#25-#26-#27-#28" b = re.findall("#\d+", a) print(b)
阅读全文
摘要:背景: 在开发的过程中涉及到动态的根据公式计算数值 技术上选择了python a= eval("1+2*(3+1)") print(a)
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- """ __title__ = logging工具类 __Time__ = 2019/8/8 19:26 """ import logging import os import sys import time
阅读全文
摘要:import json import time from concurrent.futures import ThreadPoolExecutor, wait, ALL_COMPLETED import requests from Db import Db db = Db() url = "" ma
阅读全文
摘要:import json import requests headers = { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198
阅读全文
摘要:python代码如下: import random import time import requests cookies = { '__gads': 'ID=3c504aa17c4a7048:T=1628576892:S=ALNI_MY9Ppx3sxnhZ1y2muUyXgSPRxKDbg', '
阅读全文
摘要:''' pip install pymupdf pip install pillow ''' import os import uuid import fitz from PIL import Image, ImageDraw, ImageFont import zipfile basedir =
阅读全文
摘要:import os import paramiko baseconfig = { "ip": "121.4.38.187", "port": 22, "username": "", "password": "", "localdir": "E:\\javawork\\moodapi\\target\
阅读全文
摘要:#卸载已安装的 pip uninstall xlrd #下载对应的版本 pip install xlrd==1.2.0 #卸载已安装的pip uninstall xlrd #下载对应的版本pip install xlrd==1.2.0
阅读全文
摘要:from selenium import webdriver from selenium.webdriver import ActionChains import time dr = webdriver.Chrome() dr.get('http://www.ylq.com/neidi/yangmi
阅读全文
摘要:from py2neo import Graph, Node, Relationship graphdb = Graph(host='localhost', http_port=7978, user='neo4j', password='123456') # 检查当前步是否有效 def checkE
阅读全文
摘要:import re s = ''' {"type":"buy","order_no":"2020061613141386691649969"} ''' ret = re.search(r'"type":"(.*?)"', s) print(ret.group()) print(ret.group(0
阅读全文