https://github.com/brianlusina/pythonsnips
Python Snippets containing small Python :snake: programs, algorithms and puzzles
https://github.com/brianlusina/pythonsnips
algorithms hacktoberfest python-snippets
Last synced: 8 months ago
JSON representation
Python Snippets containing small Python :snake: programs, algorithms and puzzles
- Host: GitHub
- URL: https://github.com/brianlusina/pythonsnips
- Owner: BrianLusina
- License: mit
- Created: 2016-05-30T22:13:08.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-03-18T05:40:47.000Z (9 months ago)
- Last Synced: 2025-04-24T02:12:15.410Z (8 months ago)
- Topics: algorithms, hacktoberfest, python-snippets
- Language: Python
- Homepage:
- Size: 20.6 MB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
## Python Snippets
[](https://travis-ci.org/BrianLusina/Python_Snippets)
Repository for some of my simple [Python](https://www.python.org/ "Python") functions and snippets. Each directory
and/or python package has a readme for more information about the Python program
Clone the repo
``` sh
git clone
```
Activate a virtual env
``` sh
virtualenv venv
```
or activate a virtual env with Python 3.+(this is recommended as most snippets run on Python3)
``` sh
virtualenv -p python3 venv
```
install the requirements
``` sh
poetry install
```
**Enjoy!**
### Running tests
To run tests use `py.test`
``` sh
$ py.test tests
```
> This will run all the tests in the tests directory
To add tests, name your test folders `test_.py`. This is to enable py.test to detect your tests. Place
these tests in the `tests` folder.
#### Special file (documenter)
I call this special because it prints out the documentation for Python built in functions Python has many built-in
functions, and if you do not know how to use it, you can read document online or find some books. But Python has a
built-in document function for every built-in functions. Prints some Python built-in functions documents, such as abs(),
int(), raw_input()
> Hint The built-in document method is __doc__ is used