#Python
2025-01-23
Monty Python's Flying Circus
由 [[Monty Python|巨蟒剧团]] 于 1969 年创作的一部英国超现实主义喜剧,据说编程语言 [[Python]] 名称来源于此。

2024-08-19
Monty Python
成立于 1969 的喜剧团队,他们的创作的喜剧片 [[Monty Python's Flying Circus|巨蟒剧团之飞翔的马戏团]] 于 1969年10月5日在 BBC 上公开播出。
2024-08-13
urllib.parse
- import:: from urllib.parse import urlparse - doc:: [urllib.parse](https://docs.python.org/zh-cn/3/library/urllib.parse.html) - desc:: [[Python]] URL 解析和转码模块
2024-07-24
exceptions
- import:: - doc:: [exceptions](https://docs.python.org/zh-cn/3/library/exceptions.html) - desc:: 内置异常
2023-11-06
python-pip
使用 [[Dockerfile]] 部署 Python 服务的几种方式,同时也支持通过 [[Docker Compose]] 进行构建和运行,配置可参考:[[dockerfile.yml]]。
2022-12-15
collections
- import:: import collections - doc:: [collections](https://docs.python.org/zh-cn/3/library/collections.html)
2022-11-29
multiprocessing
- import:: import multiprocessing - doc:: [multiprocessing](https://docs.python.org/zh-cn/3/library/multiprocessing.html)
2022-06-02
Sanic
- install:: `python -m pip install asnic` - use:: `from sanic import Sanic` - github:: - docs:: https://sanic.dev/zh/guide/
2022-02-01
如何在字符串中插入变量
```python # 方式一 var = 'Hello {0}'.format('World') # 方式二 var = 'Hello {name}'.format(name = 'World') ```
2022-02-01
如何把列表转换为字符串
- `''.join(<list>)`:可指定任意间隔字符(无法转换 int 类型列表) - `''.join([sgr(_) for _ in <list>])` #列表推导 - `''.join(map(str, <list>))` #map()
2020-04-19
搭建 HTTP 静态文件服务的几种方法
在搭建 YUM 源仓库时最后一个步骤便是运行 HTTP 服务,当时用 httpd 实现,前段时间因故导致仓库需重新配置后改用 nginx。接下来打算用 Go 写一个,所以顺便简要记录下用过的几个 HTTP 服务。
2018-05-09
使用 Python 3 转 HTML 实体字符,防邮箱爬取
起源于在 [V2EX](https://v2ex.com) 上看到一篇文章,作者在最后附上用 `Base64` 编码的邮箱,虽然能够有效防止一般爬虫,但感觉不够优雅。在网上搜了一圈,发现可以把邮箱转为 `HTML 字符实体` 的方式达到类似目的,在网页上能够正常显示,但邮箱地址并不会直接出现在源码中...

2018-04-10
如何在 Pythonista for iOS 中安装 lxml
学 《用 Python 写网络爬虫》第二章时,需要用到 `BeautifulSoup` 和 `lxml`,前者已经自带,后者则需要自行安装,而在 `Pythonista` 中是无法直接使用 `pip` 和 `Git` 的,需要通过第三方模块来实现。