随笔分类 - Python3常用函数封装
摘要:import threading import time import inspect import ctypes from queue import Queue class ThreadTTLMonitor(threading.Thread): def __init__(self, threads
阅读全文
摘要:import threadpool import threading import time class FuncTTLMonitorDecorator(object): class _ResultThread(threading.Thread): def __init__(self, target
阅读全文
摘要:1 import time 2 import os 3 from pyvirtualdisplay import Display 4 from selenium import webdriver 5 6 DOMAIN = 'http://127.0.0.1:8000' # Use flask as
阅读全文
摘要:1 import datetime 2 3 4 def get_next_month(date_t: datetime.date) -> datetime.date: 5 """ 6 :param date_t: datetime.date or datetime.datetime -> 2020-
阅读全文
摘要:import datetime import socket import json import re from OpenSSL import SSL import logging """ pip install pyOpenSSL """ def choice2dict(choices): """
阅读全文
摘要:1 from Crypto.Cipher import AES 2 from binascii import b2a_hex, a2b_hex 3 4 """ 5 pip install pycryptodome 6 """ 7 8 9 class Cipher(object): 10 MODE =
阅读全文
摘要:import ldap3 AD_USER_PROPERTIES = [ 'userPrincipalName', 'department', 'sn', 'physicalDeliveryOfficeName', 'msExchOWAPolicy', 'lastLogonTimestamp', 'm
阅读全文
摘要:1 from ftplib import FTP 2 3 4 class FtpManager(object): 5 def __init__(self, host: str, username: str, password: str, port: int = 21): 6 self.ftp = F
阅读全文
摘要:关于json.dumps出现datetime, tuple等问题,reids读取数据出现bytes等问题,可用代码中的例进行改善 1 import datetime 2 3 4 class DataConverter(object): 5 def __init__(self, data: (list
阅读全文
摘要:1 from jira import JIRA 2 from jira.resources import Issue 3 import datetime 4 5 """ 6 pip install jira 7 """ 8 9 10 class JIRATool(object): 11 def __
阅读全文
摘要:1 import gitlab 2 3 """ 4 pip install python-gitlab 5 """ 6 7 8 class Gitlab(object): 9 def __init__(self, url: str, private_token: str, project_id: i
阅读全文

浙公网安备 33010602011771号