09 2022 档案
摘要:文件解压 # -*- coding: utf-8 -*- import os import sys import time import shutil import filetype import gzip import tarfile import zipfile class FileUtils:
阅读全文
摘要:map()函数 map(function, iterable,...) >>> import map # 计算平方 >>> list(map(lambda: x: x**2, [1,2,3,4,5])) # 使用 lambda匿名函数 [1,4,9,16,25] # 提供了两个列表,对相同位置的列表
阅读全文
摘要:operator 模块 python2.x版本中, 使用 **cmp()函数来比较两个列表, 数字, 字符串等的大小关系 python3.x版本中已经没有cmp()**函数, 需要引入 operator模块 lt < le <= gt > ge >= eq == ne != x = 10 y = 2
阅读全文
摘要:math模块一些用法 trunc(x) 传入整数或浮点数, 返回 数值的整数部分, 忽略小数部分,不会四舍五入 import math math.trunc(2.77) # 2 math.trunc(8.32) # 8 math.trunc(-99.99) # -99
阅读全文
摘要:Windowds 运行 安装pip install eventlet celery -A AtmosphericTransportPlatform worker -c 10 -l info -P eventlet -Q reconstruct_task_compute AtmosphericTran
阅读全文
摘要:sort排序 from operator import itemgetter a = [ {'name':'小张', 'create_time':'2020-10-16 09:56'}, {'name':'小王', 'create_time':'2020-10-16 09:57'}, {'name'
阅读全文