https://github.com/khuyentran1401/python_snippet
Python and data science snippets on the command line
https://github.com/khuyentran1401/python_snippet
cli command-line command-line-tool data-science python python3 snippet
Last synced: about 1 year ago
JSON representation
Python and data science snippets on the command line
- Host: GitHub
- URL: https://github.com/khuyentran1401/python_snippet
- Owner: khuyentran1401
- Created: 2021-06-26T14:22:36.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-04T00:19:24.000Z (almost 5 years ago)
- Last Synced: 2025-03-27T03:51:18.804Z (about 1 year ago)
- Topics: cli, command-line, command-line-tool, data-science, python, python3, snippet
- Language: Python
- Homepage: https://mathdatasimplified.com/
- Size: 3.78 MB
- Stars: 21
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Snippet Tool
A tool to get Python and data science snippets at [Data Science Simplified](https://mathdatasimplified.com/) on the command line. You can read [my article](https://towardsdatascience.com/python-and-data-science-snippets-on-the-command-line-2673d5d9e55d) to learn how I created this tool.
## Installation
```bash
python3 -m pip install --user python-snippet
```
**Note**: _The `--user` is important. It ensures you install it in your directory and not in the global system. `python3 -m` ensures that you install python_snippet using Python 3._
Make sure your Python version is >= 3.6.2.
```bash
python3 --version
```
## Usage
### Search for posts based on category

You can search for posts based on category by typing:
```bash
python-snippet search-category
```
Once you select a post, you will receive an output like below:

### Search for posts based on a string pattern

You can also search for posts using a string pattern such as `pandas`
```bash
python-snippet search-posts pandas
```

To view all commands python-snippet provides, type:
```bash
python-snippet --help
```
