随笔分类 -  dev_python

摘要:python 的asyncio的相关文章:https://realpython.com/async-io-python/#the-event-loop-and-asynciorun https://glyph.twistedmatrix.com/2014/02/unyielding.html 阅读全文
posted @ 2024-12-02 23:29 saaspeter 阅读(6) 评论(0) 推荐(0) 编辑
摘要:运行openai相关api的时候,需要用到代理。 key就在环境变量中建立:OPENAI_API_KEY 和 OPENAI_PROXY 在pycharm中如果想让整个python运行的时候都走代理,可以设置Environment Variables:http_proxy=http://127.0.0 阅读全文
posted @ 2024-11-27 20:52 saaspeter 阅读(9) 评论(0) 推荐(0) 编辑
摘要:install packages in a virtual environment using pip and venv https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environmen 阅读全文
posted @ 2024-07-18 14:32 saaspeter 阅读(4) 评论(0) 推荐(0) 编辑
摘要:pip安装出错: error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install py 阅读全文
posted @ 2024-07-13 17:04 saaspeter 阅读(411) 评论(0) 推荐(0) 编辑
摘要:以下文章非常好的解释了python中的async wait的用法。copy自:https://fastapi.tiangolo.com/async/#in-a-hurry Details about the async def syntax for path operation functions  阅读全文
posted @ 2023-08-03 21:12 saaspeter 阅读(15) 评论(0) 推荐(0) 编辑
摘要:我在terminal中设置了proxy后,开启proxyon后,执行npm install包错误: (proxyon是通过在~/.zshrc 中添加export http_proxy来实现的) 把proxyoff后,错误又没有了,不知道是啥问题。如果碰到这个问题就用: npm config set 阅读全文
posted @ 2023-05-30 12:34 saaspeter 阅读(2413) 评论(0) 推荐(0) 编辑
摘要:在pycharm的Edit configuration中:“save console output to file”. see also: https://www.jetbrains.com/help/idea/setting-log-options.html?_ga=2.133841998.196 阅读全文
posted @ 2023-04-22 11:14 saaspeter 阅读(3494) 评论(0) 推荐(0) 编辑
摘要:https://docs.scrapy.org/en/latest/intro/tutorial.html https://docs.scrapy.org/en/latest/topics/selectors.html https://docs.scrapy.org/en/latest/topics 阅读全文
posted @ 2023-03-28 19:01 saaspeter 阅读(21) 评论(0) 推荐(0) 编辑
摘要:本文的重点介绍python中的yield用法及这样的表达式: comp_list = [x * 2 for x in range(10)] -- List Comprehensions 和 (x ** 2 for x in range(10)) -- Generator Expressions 摘抄 阅读全文
posted @ 2023-03-28 14:49 saaspeter 阅读(19) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示