随笔分类 -  python入门到精通

摘要:import sys import time import os import paramiko from pygments.lexers import shell import zipfile import json baseconfig =None # baseconfig={ # "ip": 阅读全文
posted @ 2023-07-25 15:00 wujf 阅读(20) 评论(0) 推荐(0) 编辑
摘要:import time def log(delay=0): def decorator(func): def wrapper(*args, **kwargs): """我是 wrapper 的注释""" time1 = time.time() newargs = list(args) newargs 阅读全文
posted @ 2023-02-06 10:36 wujf 阅读(72) 评论(0) 推荐(0) 编辑
摘要:import traceback try: a=1/0 except: print(traceback.format_exc()) 阅读全文
posted @ 2022-07-26 11:56 wujf 阅读(333) 评论(0) 推荐(0) 编辑
摘要:import sys import time import os import paramiko from pygments.lexers import shell baseconfig = { "ip": ", "port": , "username": "", "password": "“, " 阅读全文
posted @ 2022-06-13 16:50 wujf 阅读(43) 评论(0) 推荐(0) 编辑
摘要:import sys from orator import DatabaseManager import xlrd dbconfig = { 'mysql': { 'driver': 'mysql', 'host': "", 'database': "", 'user': "", 'password 阅读全文
posted @ 2022-06-06 10:30 wujf 阅读(85) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2022-06-01 12:12 wujf 阅读(205) 评论(0) 推荐(0) 编辑
摘要:import sys sys.path.append("d:\\") ll = __import__("ll") if __name__ == '__main__': ll.bb() 放在d盘下的ll.py文件 def bb(): print(111) 阅读全文
posted @ 2022-04-26 12:08 wujf 阅读(128) 评论(0) 推荐(0) 编辑
摘要:a = "#1+#5+#8+#10+#11+#12+#13+#14+#15-#22-#23-#24-#25-#26-#27-#28" b = re.findall("#\d+", a) print(b) 阅读全文
posted @ 2022-03-02 18:05 wujf 阅读(168) 评论(0) 推荐(0) 编辑
摘要:背景: 在开发的过程中涉及到动态的根据公式计算数值 技术上选择了python a= eval("1+2*(3+1)") print(a) 阅读全文
posted @ 2022-03-02 15:26 wujf 阅读(456) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- """ __title__ = logging工具类 __Time__ = 2019/8/8 19:26 """ import logging import os import sys import time 阅读全文
posted @ 2022-01-30 11:30 wujf 阅读(35) 评论(0) 推荐(0) 编辑
摘要:import json import time from concurrent.futures import ThreadPoolExecutor, wait, ALL_COMPLETED import requests from Db import Db db = Db() url = "" ma 阅读全文
posted @ 2022-01-29 17:01 wujf 阅读(3815) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2021-09-09 15:57 wujf 阅读(346) 评论(0) 推荐(0) 编辑
摘要:python代码如下: import random import time import requests cookies = { '__gads': 'ID=3c504aa17c4a7048:T=1628576892:S=ALNI_MY9Ppx3sxnhZ1y2muUyXgSPRxKDbg', ' 阅读全文
posted @ 2021-08-31 09:03 wujf 阅读(188) 评论(0) 推荐(0) 编辑
摘要:''' pip install pymupdf pip install pillow ''' import os import uuid import fitz from PIL import Image, ImageDraw, ImageFont import zipfile basedir = 阅读全文
posted @ 2021-07-27 11:18 wujf 阅读(157) 评论(0) 推荐(0) 编辑
摘要:import os import paramiko baseconfig = { "ip": "121.4.38.187", "port": 22, "username": "", "password": "", "localdir": "E:\\javawork\\moodapi\\target\ 阅读全文
posted @ 2021-05-28 11:29 wujf 阅读(96) 评论(0) 推荐(0) 编辑
摘要:#卸载已安装的 pip uninstall xlrd #下载对应的版本 pip install xlrd==1.2.0 #卸载已安装的pip uninstall xlrd #下载对应的版本pip install xlrd==1.2.0 阅读全文
posted @ 2021-05-20 20:22 wujf 阅读(7110) 评论(0) 推荐(0) 编辑
摘要:from selenium import webdriver from selenium.webdriver import ActionChains import time dr = webdriver.Chrome() dr.get('http://www.ylq.com/neidi/yangmi 阅读全文
posted @ 2020-08-13 17:11 wujf 阅读(1369) 评论(0) 推荐(1) 编辑
摘要:from py2neo import Graph, Node, Relationship graphdb = Graph(host='localhost', http_port=7978, user='neo4j', password='123456') # 检查当前步是否有效 def checkE 阅读全文
posted @ 2020-07-28 13:53 wujf 阅读(940) 评论(0) 推荐(0) 编辑
摘要:import re s = ''' {"type":"buy","order_no":"2020061613141386691649969"} ''' ret = re.search(r'"type":"(.*?)"', s) print(ret.group()) print(ret.group(0 阅读全文
posted @ 2020-07-02 14:32 wujf 阅读(382) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示