小陆同学

python 中文名:蟒蛇,设计者:Guido van Rossum

导航

2020年5月27日 #

npm--安装taro遇到的问题

摘要: cnpm install -g @tarojs/cli 全局安装完taro之后应该直接就可以使用taro了,但是在docker容器里安装taro之后执行taro bash: taro: command not found # 在网上查分别npm cache verify和cnpm cache ver 阅读全文

posted @ 2020-05-27 21:54 小陆同学 阅读(3445) 评论(0) 推荐(0) 编辑

关于报错ImportErrorNomodulenamedCrypto Cipher

摘要: # from Crypto.Cipher import AES ImportErrorNomodulenamedCrypto Cipher 在遇到这个问题之后,普遍的方法去安装对应的模块就可以 pip install crypto pip install pycrypto 在经过安装之后还是奇葩报错 阅读全文

posted @ 2020-05-27 21:47 小陆同学 阅读(1986) 评论(0) 推荐(0) 编辑

python--生成二维码娱乐一下(转发)

摘要: import qrcode # 复杂的生成二维码 def make_code(text): # version是二维码的尺寸,数字大小决定二维码的密度 error_correction:是指误差 # box_size:参数用来控制二维码的每个单元(box)格有多少像素点 # border: 参数用控 阅读全文

posted @ 2020-05-27 21:43 小陆同学 阅读(181) 评论(0) 推荐(0) 编辑

python--发送文本消息、链接消息带图片到钉钉告警群

摘要: 发送文本消息 def sendDingDing(self,text): headers = {'Content-Type': 'application/json'} webhook = "https://oapi.dingtalk.com/robot/send?access_token="+self 阅读全文

posted @ 2020-05-27 21:40 小陆同学 阅读(1465) 评论(0) 推荐(0) 编辑

python--字符串类型的列表转换成列表类型

摘要: from ast import literal_eval apply_type = str([1,2,3]) new_list = literal_eval(apply_type) print(new_list) print(type(new_list)) # 此时的new_list的类型为list 阅读全文

posted @ 2020-05-27 21:33 小陆同学 阅读(3387) 评论(0) 推荐(0) 编辑

python--生成随机字符串

摘要: import random,string ran_str = ''.join(random.sample(string.ascii_letters + string.digits, 43)) print(ran_str) 随机生成43位a-zA-Z0-9字符串 阅读全文

posted @ 2020-05-27 21:32 小陆同学 阅读(385) 评论(0) 推荐(0) 编辑

django orm group_by Q查询

摘要: from django.db.models import Max,Avg,F,Q,Min,Count,Sum this_year = datetime.datetime.now().year this_year_data = UserPrice.objects.filter(year=this_ye 阅读全文

posted @ 2020-05-27 21:27 小陆同学 阅读(553) 评论(0) 推荐(0) 编辑

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

摘要: pip2 install django-import-export DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 i 阅读全文

posted @ 2020-05-27 21:17 小陆同学 阅读(24569) 评论(0) 推荐(1) 编辑