logger.add("file_{time}.log")# 日志文件转存 logger.add("file_{time}.log",rotation="500 MB")logger.add("file_{time}.log",rotation="12:00")logger.add("file_{time}.log",rotation="1 week")# 多长时间之后清理 logger.add("file_X.log",retention="10 days")# 使用zip文件格式保存 logg...
importlogging# 配置日志logging.basicConfig(level=logging.DEBUG,format='%(asctime)s - %(levelname)s - %(message)s')defdivide(x,y):try:result=x/yexceptZeroDivisionError:logging.error("Attempted to divide by zero")else:logging.info(f"The result of{x}/{y}is{result}")if__name__=="__mai...
import plotly.graph_objects as goimport numpy as npimport pandas as pd# 读取数据temp = pd.read_csv('2016-weather-data-seattle.csv')# 数据处理, 时间格式转换temp['year'] = pd.to_datetime(temp['Date']).dt.year# 选择几年的数据展示即可year_list = [1950, 1960, 1970, 1980, 1990, 2000...
{} policy_dict['expiration'] = build_gmt_expired_time(expired_time) policy_dict['conditions'] = condition_list policy = json.dumps(policy_dict).strip() policy_encode = base64.b64encode(policy.encode())returnpolicy_encodedefbuild_signature(access_key_secret, date):"""生成签名 :param str ...
>>> for l in fileobj: >>> names.add(l) >>> collection = resources[1] >>> for r in collection: >>> names.add(r.name) # 这里可以通过字段名或者偏移来取。 >>> def h(x): >>> if x in names: >>> return True >>> else: >>> return False >>> return h >>> >>> df ...
git config --global user.name userName git config --global user.email userEmail 分支105 标签94 Khaleel Al-Adhamienable UP ruff rule (#5137)642233b8天前 2392 次提交 提交 .devcontainer prettier (#4941) 1个月前 .github add permission to all workflows (#5086) ...
python_dateutil>=2.5.3 setuptools>=21.0.0 urllib3>=1.15.1 flask>=1.1.1 requests>=2.22.0 -e git+https://codehub.devcloud.cn-north-4.huaweicloud.com/campus00001/CloudCampusPythonSDK.git@v300r021c10#egg=cloudcampuspythonsdk 安装Python SDK后,可调用API(setup.py),编码完成后,运行这段代码(Clo...
Name Last commit message Last commit date Latest commit Cannot retrieve latest commit at this time. History 6,801 Commits .github [Mod] update pythonapp.yml Mar 27, 2025 docs [Del] remove requirements.txt from install script Mar 31, 2025 ...
Add features to and simulator, and enhance the web design Development instructions The current code base is compatible with python >= 3.10. Here are some of the common commands to perform a range of activities: source .venv/bin/activate <-- Activate the virtual environment ./check_ci.sh <-...
",801 :"the file exist !",802 :"ready to receive datas",900 :"md5 valdate success"}#tcp_client = socket.socket(socket.AF_INET,socket.SOCK_STREAM)#tcp_client.connect(('127.0.0.1',8080))#tcp_client.send('ok'.encode('utf-8'))#以上是easy模式下的classClientHandler():def__init__(...