会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
是阿杰呀
study hungry,study foolish.
首页
新随笔
联系
管理
上一页
1
2
3
4
5
6
7
8
9
10
下一页
2022年11月11日
【Linux】virtualenvwrapper模块配置
摘要: 1. ~/.bashrc 配置 export WORKON_HOME=$HOME/.virtualenvs # virtualenv folder path source /usr/local/bin/virtualenvwrapper.sh # which virtualenvwrapper.sh
阅读全文
posted @ 2022-11-11 10:32 是阿杰呀
阅读(30)
评论(0)
推荐(0)
2022年11月4日
【python】后端文件流下载数据
摘要: 后台实现下载接口 1.1 通过文件流下载 import os import time from django.http import StreamingHttpResponse def download_file_blob(name, url): """ :param name: 文件名称(带后缀)
阅读全文
posted @ 2022-11-04 16:19 是阿杰呀
阅读(622)
评论(0)
推荐(0)
2022年9月8日
【Python小工具】文件解压
摘要: 文件解压 # -*- coding: utf-8 -*- import os import sys import time import shutil import filetype import gzip import tarfile import zipfile class FileUtils:
阅读全文
posted @ 2022-09-08 10:29 是阿杰呀
阅读(131)
评论(0)
推荐(0)
2022年9月7日
【Python】 map() 函数
摘要: map()函数 map(function, iterable,...) >>> import map # 计算平方 >>> list(map(lambda: x: x**2, [1,2,3,4,5])) # 使用 lambda匿名函数 [1,4,9,16,25] # 提供了两个列表,对相同位置的列表
阅读全文
posted @ 2022-09-07 15:10 是阿杰呀
阅读(36)
评论(0)
推荐(0)
【Python】operator 模块
摘要: operator 模块 python2.x版本中, 使用 **cmp()函数来比较两个列表, 数字, 字符串等的大小关系 python3.x版本中已经没有cmp()**函数, 需要引入 operator模块 lt < le <= gt > ge >= eq == ne != x = 10 y = 2
阅读全文
posted @ 2022-09-07 15:05 是阿杰呀
阅读(41)
评论(0)
推荐(0)
【Python】math 模块用法
摘要: math模块一些用法 trunc(x) 传入整数或浮点数, 返回 数值的整数部分, 忽略小数部分,不会四舍五入 import math math.trunc(2.77) # 2 math.trunc(8.32) # 8 math.trunc(-99.99) # -99
阅读全文
posted @ 2022-09-07 14:36 是阿杰呀
阅读(76)
评论(0)
推荐(0)
2022年9月6日
【Django】celery 队列启动
摘要: Windowds 运行 安装pip install eventlet celery -A AtmosphericTransportPlatform worker -c 10 -l info -P eventlet -Q reconstruct_task_compute AtmosphericTran
阅读全文
posted @ 2022-09-06 16:27 是阿杰呀
阅读(56)
评论(0)
推荐(0)
【python】sort 排序
摘要: sort排序 from operator import itemgetter a = [ {'name':'小张', 'create_time':'2020-10-16 09:56'}, {'name':'小王', 'create_time':'2020-10-16 09:57'}, {'name'
阅读全文
posted @ 2022-09-06 12:13 是阿杰呀
阅读(62)
评论(0)
推荐(0)
2022年8月25日
【python】图片转成base64
摘要: 1. 图片转成base64格式 png_path = '' with open(png_path, 'rb') as f: base64_data = "data:image/png;base64,{}".format(str(base64.b64encode(f.read()).decode('u
阅读全文
posted @ 2022-08-25 12:31 是阿杰呀
阅读(1253)
评论(0)
推荐(0)
2022年8月17日
【redis】redis.exceptions.AuthenticationError: Client sent AUTH, but no password is set
摘要: 关于 redis密码有关错误问题
阅读全文
posted @ 2022-08-17 17:46 是阿杰呀
阅读(39)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
下一页