随笔分类 - dev_python
摘要:python 的asyncio的相关文章:https://realpython.com/async-io-python/#the-event-loop-and-asynciorun https://glyph.twistedmatrix.com/2014/02/unyielding.html
阅读全文
摘要:运行openai相关api的时候,需要用到代理。 key就在环境变量中建立:OPENAI_API_KEY 和 OPENAI_PROXY 在pycharm中如果想让整个python运行的时候都走代理,可以设置Environment Variables:http_proxy=http://127.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
阅读全文
摘要:pip安装出错: error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install py
阅读全文
摘要:以下文章非常好的解释了python中的async wait的用法。copy自:https://fastapi.tiangolo.com/async/#in-a-hurry Details about the async def syntax for path operation functions
阅读全文
摘要:我在terminal中设置了proxy后,开启proxyon后,执行npm install包错误: (proxyon是通过在~/.zshrc 中添加export http_proxy来实现的) 把proxyoff后,错误又没有了,不知道是啥问题。如果碰到这个问题就用: npm config set
阅读全文
摘要:在pycharm的Edit configuration中:“save console output to file”. see also: https://www.jetbrains.com/help/idea/setting-log-options.html?_ga=2.133841998.196
阅读全文
摘要: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
阅读全文
摘要:本文的重点介绍python中的yield用法及这样的表达式: comp_list = [x * 2 for x in range(10)] -- List Comprehensions 和 (x ** 2 for x in range(10)) -- Generator Expressions 摘抄
阅读全文