Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rainyear/pytips
Useful Python tips!
https://github.com/rainyear/pytips
Last synced: 3 days ago
JSON representation
Useful Python tips!
- Host: GitHub
- URL: https://github.com/rainyear/pytips
- Owner: rainyear
- License: mit
- Created: 2016-03-06T05:31:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-12-09T16:35:50.000Z (about 3 years ago)
- Last Synced: 2024-12-15T04:06:47.127Z (11 days ago)
- Language: Jupyter Notebook
- Homepage: https://git.io/pytips
- Size: 268 KB
- Stars: 551
- Watchers: 82
- Forks: 100
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Python Tips
[![Join the chat at https://gitter.im/rainyear/pytips](https://badges.gitter.im/rainyear/pytips.svg)](https://gitter.im/rainyear/pytips)受[jstips](https://github.com/loverajoel/jstips)项目启发。
> 每天一条有用的 Python 小提示
~~每天花费不到两分钟,学习一条可以提高Python代码质量,更Pythonic的方法解决问题的小技巧。~~
写了一段时间之后发现越来越难控制在关于某一条语法点的小技巧,而更像是关于某一『话题』的讨论,例如某一语法特性或某几个标准库的应用。我会继续按照这种惯性写下去,也不打算更名为『PyTopics』。内容和风格不会有刻意的转变,只是在这里说明一下。 :neutral_face:
*主要基于 Python 3.5 并尽量做到向后兼容(至Python 2.7)。*
文档已托管在 Read the Docs: [Tips.PyHub.cc](http://tips.pyhub.cc/zh/latest/)。
### Tips list
- **0x1a** - [Floating Point Arithmetic](https://github.com/rainyear/pytips/blob/master/Tips/2016-05-11-Floating-Point-Arithmetic.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-05-11-Floating-Point-Arithmetic.md)]
- **0x19** - [Class and Metaclass ii](https://github.com/rainyear/pytips/blob/master/Tips/2016-05-02-Class-and-Metaclass-ii.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-05-02-Class-and-Metaclass-ii.md)]
- **0x18** - [Class and Metaclass i](https://github.com/rainyear/pytips/blob/master/Tips/2016-05-01-Class-and-Metaclass-i.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-05-01-Class-and-Metaclass-i.md)]
- **0x17** - [Enum](https://github.com/rainyear/pytips/blob/master/Tips/2016-04-30-Enum.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-04-30-Enum.md)]
- **0x16** - [Iterator Tools](https://github.com/rainyear/pytips/blob/master/Tips/2016-04-13-Iterator-Tools.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-04-13-Iterator-Tools.md)]
- **0x15** - [Module future](https://github.com/rainyear/pytips/blob/master/Tips/2016-04-12-Module-future.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-04-12-Module-future.md)]
- **0x14** - [Descriptor](https://github.com/rainyear/pytips/blob/master/Tips/2016-04-08-Descriptor.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-04-08-Descriptor.md)]
- **0x13** - [Thread vs Coroutine ii](https://github.com/rainyear/pytips/blob/master/Tips/2016-04-07-Thread-vs-Coroutine-ii.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-04-07-Thread-vs-Coroutine-ii.md)]
- **0x12** - [Thread vs Coroutine i](https://github.com/rainyear/pytips/blob/master/Tips/2016-04-07-Thread-vs-Coroutine-i.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-04-07-Thread-vs-Coroutine-i.md)]
- **0x11** - [Date and Time](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-30-Date-and-Time.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-30-Date-and-Time.md)]
- **0x10** - [Heap and Queue](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-28-Heap-and-Queue.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-28-Heap-and-Queue.md)]
- **0x0f** - [Decorator and functools](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-25-Decorator-and-functools.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-25-Decorator-and-functools.md)]
- **0x0e** - [Sort and Sorted](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-24-Sort-and-Sorted.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-24-Sort-and-Sorted.md)]
- **0x0d** - [With Context Manager](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-23-With-Context-Manager.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-23-With-Context-Manager.md)]
- **0x0c** - [Shallow and Deep Copy](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-22-Shallow-and-Deep-Copy.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-22-Shallow-and-Deep-Copy.md)]
- **0x0b** - [Try else](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-21-Try-else.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-21-Try-else.md)]
- **0x0a** - [String Format](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-18-String-Format.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-18-String-Format.md)]
- **0x09** - [Bytes decode Unicode encode Bytes](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-17-Bytes-decode-Unicode-encode-Bytes.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-17-Bytes-decode-Unicode-encode-Bytes.md)]
- **0x08** - [Bytes and Bytearray](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-16-Bytes-and-Bytearray.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-16-Bytes-and-Bytearray.md)]
- **0x07** - [Unicode String](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-15-Unicode-String.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-15-Unicode-String.md)]
- **0x06** - [Command Line tools in Python](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-14-Command-Line-tools-in-Python.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-14-Command-Line-tools-in-Python.md)]
- **0x05** - [Arguments and Unpacking](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-11-Arguments-and-Unpacking.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-11-Arguments-and-Unpacking.md)]
- **0x04** - [Scope and Closure](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-10-Scope-and-Closure.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-10-Scope-and-Closure.md)]
- **0x03** - [List Comprehension](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-09-List-Comprehension.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-09-List-Comprehension.md)]
- **0x02** - [Functional Programming in Python](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-08-Functional-Programming-in-Python.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-08-Functional-Programming-in-Python.md)]
- **0x01** - [Iterator and Generator](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-07-iterator-and-generator.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-07-iterator-and-generator.md)]
- **0x00** - [The Zen of Python](https://github.com/rainyear/pytips/blob/master/Tips/2016-03-06-The-Zen-of-Python.ipynb) [[markdown](https://github.com/rainyear/pytips/blob/master/Markdowns/2016-03-06-The-Zen-of-Python.md)]### How to Contribute
1. 提供问题、话题或应用场景:[Issue](https://github.com/rainyear/pytips/issues)
### Thanks
- [Python](http://www.python.org/)
- [Jupyter](https://jupyter.org/)
- [jupyter-vim-binding](https://github.com/lambdalisue/jupyter-vim-binding)### License
[MIT](./LICENSE)