本文基于 Frost Ming “friendly python” 标签下的文章,整理出偏向工程实践的开发范式、规范与典型好/坏代码范式示例。重点是“对使用者友好 + 对维护者友好”,并强调在 Python 中利用语言特性与生态扩展点进行合理抽象。
Relax, I only have one Sunday to work on idea, literally my weekend project. So I tried Deepseek to see if it can help. Surprisingly, it works and it saves me another weekend...
Just chat.deepseek.com (cost = free) with prompts adapted from this gist.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import jax | |
| import jax.numpy as jnp | |
| def tree_stack(trees): | |
| """Takes a list of trees and stacks every corresponding leaf. | |
| For example, given two trees ((a, b), c) and ((a', b'), c'), returns | |
| ((stack(a, a'), stack(b, b')), stack(c, c')). | |
| Useful for turning a list of objects into something you can feed to a | |
| vmapped function. |
This is a list of the most commonly used and relevant vtubing software. The "best" will always be subjective and depend on your specific requirements. Overall, the information in this list is as accurate as I could figure it out, but there might be errors or some details might become out of date. If you find anything that needs to be corrected, please let me know. You can also note it in a comment.
Additional explanations:
- iPhone means that an iPhone is basically required
- iFacialMocap support means that tracking data can be received from the iFacialMocap iPhone app
- VMC protocol means that the application can send and/or receive tracking data from other VMC protocol capable applications, allowing the combination of multiple tracking methods (e.g. VSeeFace receiving VR tracking from Virtual Motion Capture and iPhone/ARKit face tracking from Waidayo)
- Tobii means that the Tobii eye tracker is supported
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| # -1. 感谢tongyifan,本脚本由他的qBittorrent版本修改而来,项目地址 https://gist.github.com/tongyifan/83220b417cffdd23528860ee0c518d15 | |
| # 0. 免责:仅在本人的Transmission v2.94上测试通过,本人不承担任何责任 | |
| # 1. 安装依赖: pip3 install requests transmissionrpc | |
| # 2. 修改代码开头的apikey和transmission_config | |
| # 3. 运行: python3 u2_update.py | |
| # 4. 中间有报错就再运行,直到显示找到0个未被更新的种子为止 | |
| # 5. 请勿手动中断脚本运行! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import requests | |
| import json | |
| import os | |
| """"""""""""""""""""""""""""""""""""""" | |
| Please enter your cookies below | |
| after login in https://i.qq.com | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/nsmb.conf - macOS 11.3 - 2021-04-29 | |
| #------------------------------------------------------------------------------ | |
| # SMB configuration for macOS 11.3 <-> Synology | |
| #------------------------------------------------------------------------------ | |
| # Additional information: | |
| # ----------------------- | |
| # https://support.apple.com/de-de/HT211927 | |
| # https://support.apple.com/en-us/HT208209 | |
| # https://apple.stackexchange.com/questions/309016/smb-share-deadlocks-since-high-sierra | |
| # https://photographylife.com/afp-vs-nfs-vs-smb-performance |
Author: Chris Lattner
NewerOlder