Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/progrmoiz/python-snippets

:100: The most useful python snippets
https://github.com/progrmoiz/python-snippets

awesome code-snippets collection python

Last synced: 3 months ago
JSON representation

:100: The most useful python snippets

Lists

README

        

# ![Python Snippets](./logo.png "Python Snippets")
These Snippets can make your life a lot easier than expected, use it wisely.

---

## Snippets TO LEARN

- [string_import.py](string_import.py) example to show import module from string
- [classtools.py](classtools.py) assorted class utilities and tools
- [formats.py](formats.py) various specialized string display formatting utilities.
- [mydir.py](mydir.py) a module that lists the namespaces of other module
- [mymap.py](mymap.py) different ways of implementing map
- [myzip.py](myzip.py) different ways of implementing zip
- [permute.py](permute.py) implemented permute
- [reloadall.py](reloadall.py) transitively reload nested module
- [scramble.py](scramble.py) a iterable scrambler
- [streams.py](streams.py) give me reader, writer and a converter
- [timer.py](timer.py) Homegrown timing tools for function calls.
- [timer2.py](timer2.py) Homegrown timing tools for function calls.
- [timer3.py](timer3.py) Homegrown timing tools for function calls.
- [classtree.py](classtree.py) Climb inheritance tree using namespace links, displaying higher superclasses with indentation for height
- [listinstance.py](listinstance.py) Mix-in class that provides a formatted print() or str()
- [listinherited.py](listinherited.py) Mix-in class that provides a formatted print() or str() (Use dir() to collect both instance attr and names inherited from its classes)
- [listinherited2.py](listinherited2.py) Same as listinherited.py, but more formatted
- [listtree.py](listtree.py) Trace the entire class and all its object's attrs at and above self
- [mapattrs.py](mapattrs.py) Map all attributes on or inherited by an
instance to the instance or class from which they are inherited.

---

## Contributing

__Open an issue or a pull request to suggest changes or additions.__

## Authors

[Abdul Moiz](https://github.com/progrmoiz)

## License



CC0



To the extent possible under law,

Abdul Moiz

has waived all copyright and related or neighboring rights to
Snippets.

[:arrow_up: __Back To Top__](#python-snippets)