摘要: 摘自博客 https://blog.csdn.net/xc_zhou/article/details/80837962 如有侵权,请联系我删除 阅读全文
posted @ 2021-01-19 15:33 想扣篮的小矮子 阅读(67) 评论(0) 推荐(0) 编辑
摘要: py2 import urlparse result = urlparse.urlparse(url) host = result.hostname py3 from urllib.parse import urlparse result = urlparse(url) host = result. 阅读全文
posted @ 2021-01-19 15:32 想扣篮的小矮子 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 直接上sql: delete from tablename where id not in (select min(id) from tablename group by field_name); 该语句的解释为:先根据要去重的字段进行分组,查询出最小的id,这些id为不重复的id;然后删除记录的时 阅读全文
posted @ 2020-12-01 10:37 想扣篮的小矮子 阅读(680) 评论(0) 推荐(0) 编辑
摘要: 网上搜了很多资料,问题出现在一个地方,就是字段问题(integer),改为serial即可。 但是必须重新建表 ,如果不想重新建表,参考(本人没尝试过):https://stackoverflow.com/questions/23578427/changing-primary-key-int-typ 阅读全文
posted @ 2020-06-30 14:42 想扣篮的小矮子 阅读(9789) 评论(0) 推荐(0) 编辑
摘要: 16进制转中文 本人参考:https://blog.csdn.net/weixin_41449756/article/details/100652150 思路: 找到 \\x开头的所有字符,每3个转成一个中文,使用str.decode("hex")一个字一个字的转换 code: def str_to 阅读全文
posted @ 2020-06-22 10:07 想扣篮的小矮子 阅读(1310) 评论(0) 推荐(0) 编辑
摘要: 本人 ubuntu 系统 报错信息 ERROR: Command errored out with exit status 1: ...... ...... ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'i 阅读全文
posted @ 2020-06-13 15:59 想扣篮的小矮子 阅读(12604) 评论(0) 推荐(0) 编辑
摘要: 安装elasticsearch包 pip install elasticsearch # 豆瓣源 pip install -i https://pypi.doubanio.com/simple/ elasticsearch python连接elasticsearch from elasticsear 阅读全文
posted @ 2020-04-30 11:20 想扣篮的小矮子 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 微信小程序图片保存到本地服务器 img_front = request.FILES.get("img_front","") # 正面图片 img_front_name, img_front_url = receive_image(img_front) # 正面图片 return JsonRespon 阅读全文
posted @ 2019-12-06 11:14 想扣篮的小矮子 阅读(706) 评论(0) 推荐(0) 编辑
摘要: 附上ASCII字符与URL编码的对照表。 ASCII字符 URL编码 空格 %20 ! %21 " %22 # %23 $ %24 % %25 & %26 ' %27 ( %28 ) %29 * %2A + %2B , %2C - %2D . %2E / %2F 0 %30 1 %31 2 %32 3 %33 4 %34 5 %35 6 %36 7 %37 8 %38 9 %39 : %3A ; 阅读全文
posted @ 2019-09-19 07:31 想扣篮的小矮子 阅读(2773) 评论(0) 推荐(0) 编辑
摘要: 导出程序所使用的的依赖包,并生成requirements文件 import os, sys # 找到当前目录 project_root = os.path.dirname(os.path.realpath(__file__)) print(project_root) # 找到解释器,虚拟环境目录 p 阅读全文
posted @ 2019-09-18 15:04 想扣篮的小矮子 阅读(4160) 评论(0) 推荐(0) 编辑