Skip to content

Commit a2427eb

Browse files
Merge pull request avinashkranjan#2986 from juj-star/README_EXAMPLES
Created readme examples
2 parents ca4530e + 8600b33 commit a2427eb

File tree

3 files changed

+81
-20
lines changed

3 files changed

+81
-20
lines changed

AI Calculator/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
**User Guide: AI Calculator**
2+
3+
This user guide provides step-by-step instructions on how to use the AI Calculator script in the Amazing-Python-Scripts repository. This script uses the ChatterBot library to create a calculator chatbot that can evaluate mathematical expressions.
4+
5+
**Step 1: Install Dependencies**
6+
Before you can use the AI Calculator script, you need to make sure that you have all the necessary dependencies installed. This script requires Python 3 and the ChatterBot library. To install these dependencies, open a terminal or command prompt and run the following command:
7+
```
8+
pip install chatterbot
9+
```
10+
11+
**Step 2: Download the Script**
12+
Next, you need to download the AI Calculator script from the Amazing-Python-Scripts repository. You can do this by visiting the repository on GitHub and navigating to the `AI Calculator` directory. From there, you can download the `main.py` file to your computer.
13+
14+
**Step 3: Run the Script**
15+
Once you have downloaded the script, you can run it by opening a terminal or command prompt, navigating to the directory where you saved the file, and running the following command:
16+
```
17+
python main.py
18+
```
19+
This will start the script and open a command-line interface where you can interact with the calculator chatbot.
20+
21+
**Step 4: Use the Calculator**
22+
To use the AI Calculator, simply type a mathematical expression at the prompt and press enter. The calculator chatbot will evaluate the expression and return the result. For example:
23+
```
24+
me: 2 + 2
25+
Calculator: 4
26+
```
27+
You can enter any valid mathematical expression, including addition, subtraction, multiplication, division, and exponentiation. The calculator chatbot will evaluate the expression and return the result.
28+
29+
To exit the calculator, simply type `quit` at the prompt and press enter.
30+
31+
You can experiment with different expressions to see how they are evaluated by the calculator chatbot.

Air pollution prediction/README.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
1-
# Air pollution Prediction
2-
_______________________________________________________________________
31

4-
## What is it?
52

6-
This helps you find the levels of Air pollution plotted graphically with a provided dataset.
3+
**User Guide: Air Pollution Prediction**
74

8-
## TechStack
5+
This user guide provides step-by-step instructions on how to use the Air Pollution Prediction script in the Amazing-Python-Scripts repository. This script uses data from the World Air Quality Index API to predict air pollution levels in a given city.
96

10-
1. Module used:
7+
**Step 1: Install Dependencies**
8+
Before you can use the Air Pollution Prediction script, you need to make sure that you have all the necessary dependencies installed. This script requires Python 3 and the requests and matplotlib libraries. To install these dependencies, open a terminal or command prompt and run the following command:
9+
```
10+
pip install requests matplotlib
11+
```
1112

12-
- matplotlib
13+
**Step 2: Obtain an API Key**
14+
To use the World Air Quality Index API, you will need to obtain an API key. You can do this by visiting the following website and following the instructions to create an account and obtain an API key: https://aqicn.org/data-platform/token/
1315

14-
## How to use?
16+
**Step 3: Download the Script**
17+
Next, you need to download the Air Pollution Prediction script from the Amazing-Python-Scripts repository. You can do this by visiting the repository on GitHub and navigating to the `Air pollution prediction` directory. From there, you can download the `CodeAP.py` file to your computer.
1518

16-
You can clone the repository directly from
19+
**Step 4: Run the Script**
20+
Once you have downloaded the script and obtained an API key, you can run it by opening a terminal or command prompt, navigating to the directory where you saved the file, and running the following command:
21+
```
22+
python CodeAP.py
23+
```
24+
This will start the script and prompt you to enter your city name and API key.
1725

18-
```https://github.com/Pranjal-2001/Amazing-Python-Scripts.git```
26+
**Step 5: View the Results**
27+
After entering your city name and API key, the script will retrieve air pollution data from the World Air Quality Index API and display it in a pie chart. The chart shows the relative amounts of different pollutants in the air, such as PM2.5, PM10, NO2, SO2, and O3.
1928

20-
## To get your API
21-
22-
23-
[Click here to get your API](https://waqi.info/)
29+
You can use this information to get an idea of air pollution levels in your city and take appropriate precautions.
2430

25-
26-
[Click here to get your API key](https://aqicn.org/data-platform/token/#/)
31+
You can experiment with different cities to see how their air pollution levels compare.

Automated_scraper.py/readme.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
1-
The users can run the script
2-
Usage: python script.py [URL] "[CSS selector]" [Interval in minutes]
1+
**User Guide: Automated Scraper**
32

4-
Example : python script.py https://www.timeanddate.com/worldclock/ "body > div.main-content-div > section.bg--grey.pdflexi-t--small > div > div:nth-child(2) > div.my-city__clocks > div > div:nth-child(3) > span > span" 1
3+
This user guide provides step-by-step instructions on how to use the Automated Scraper script in the Amazing-Python-Scripts repository. This script uses the BeautifulSoup library to scrape data from a website and monitor it for changes.
54

6-
If there is a change in content it will be displayed in the command line.
5+
**Step 1: Install Dependencies**
6+
Before you can use the Automated Scraper script, you need to make sure that you have all the necessary dependencies installed. This script requires Python 3 and the BeautifulSoup and requests libraries. To install these dependencies, open a terminal or command prompt and run the following command:
7+
```
8+
pip install beautifulsoup4 requests
9+
```
10+
11+
**Step 2: Download the Script**
12+
Next, you need to download the Automated Scraper script from the Amazing-Python-Scripts repository. You can do this by visiting the repository on GitHub and navigating to the `Automated_scraper.py` directory. From there, you can download the `script.py` file to your computer.
13+
14+
**Step 3: Run the Script**
15+
Once you have downloaded the script, you can run it by opening a terminal or command prompt, navigating to the directory where you saved the file, and running the following command:
16+
```
17+
python script.py [URL] [CSS selector] [Interval in minutes]
18+
```
19+
Replace `[URL]` with the URL of the website you want to scrape, `[CSS selector]` with a CSS selector that matches the content you want to monitor, and `[Interval in minutes]` with the number of minutes between each check for changes.
20+
21+
For example, to scrape data from a website and check for changes every 5 minutes, you would run the following command:
22+
```
23+
python script.py https://example.com "h1" 5
24+
```
25+
26+
**Step 4: Monitor for Changes**
27+
After running the script, it will scrape data from the specified website and display it in the terminal. The script will then continue to check for changes at the specified interval and display a message if any changes are detected.
28+
29+
You can stop monitoring for changes at any time by pressing `Ctrl + C` in the terminal.
30+
31+
You can experiment with different URLs, CSS selectors, and intervals to see how they affect the results.

0 commit comments

Comments
 (0)