Skip to content

Commit f6cb385

Browse files
authored
Merge branch 'main' into main
2 parents 463b902 + 9285b34 commit f6cb385

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1423
-36
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This document will give you a detailed overview over how to contribut
77

88
## New contributors guide
99

10-
See the [README](README.md) to get an overview of the project and find other necessary information. Here are some great resources to get you comfortable with open source contributions:
10+
See the [README](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/blob/main/README.md) to get an overview of the project and find other necessary information. Here are some great resources to get you comfortable with open source contributions:
1111
- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)
1212
- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git)
1313
- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow)

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ You can open an issue with us for a bug, feature or a new script or start workin
1717

1818
## Things to keep in mind when contributing
1919

20-
If you are adding a script to the respository, please create a seperate directory with the name of the script inside the `scripts` directory of this repository and work within it. Make sure your script comes with its very own `README.md` with proper documentation for the end user, if possible add screenshots of your script working in the `README.md` as well. In case you are uploading screenshots and/or other relevant images please create a seperate `images` folder inside your script folder, this is where you will be keeping your images. Alternatively, you can also upload your images on platforms like [imgur](https://imgur.com/) and use the resulting link in your `README.md` file.
20+
If you are adding a script to the repository, please create a separate directory with the name of the script inside the `scripts` directory of this repository and work within it. Make sure your script comes with its very own `README.md` with proper documentation for the end user, if possible add screenshots of your script working in the `README.md` as well. In case you are uploading screenshots and/or other relevant images please create a separate `images` folder inside your script folder, this is where you will be keeping your images. Alternatively, you can also upload your images on platforms like [imgur](https://imgur.com/) and use the resulting link in your `README.md` file.
2121

2222
Once you are done working on your script edit this `README.md` file and add the relevant information regarding your script in the table below.
2323

@@ -56,7 +56,7 @@ Once you are done working on your script edit this `README.md` file and add the
5656
29| Reddit Image Scrapper | Downloads Reddit Images according to given SubReddit without using API | [Find me here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/Reddit-Image-Scrapper) |
5757
30| SMS Sender | Easy CLI interface for users looking to test their SMS campaign integration with Kaleyra | [Find me here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/SMS%20Sender) |
5858
31| Shorty | Shorty uses python code to shorten URLs on the go | [Find me here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/Shorty) |
59-
32| Sketch image converter | script which convert a colored photo into sketch photo | [Find me here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/image_converter) |
59+
32| Image to Sketch Converter | Script which converts a colored photo into pencil sketch or cartoonized sketch | [Find me here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/image_to_sketch_converter) |
6060
33| Song-Lyrics-Fetcher | Fetch lyrics of a song and store in a text file | [Find me here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/Song-Lyrics-Fetcher) |
6161
34| Spectrogram | script to visualize wav files using spectrogram | [Find me here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/spectrogram) |
6262
35| Terminal Video Editor | Edit Small Videos (less than : 10 mins) directly from your Terminal | [Find me here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/Terminal-Video-Editor) |
@@ -100,5 +100,6 @@ Once you are done working on your script edit this `README.md` file and add the
100100
73| PDF-Delete-Pages | Deletes pages from PDF as entered by the user | [Find me Here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/PDF-Delete-Pages) |
101101
74| Copy to clipboard | Copies contents form a text file to your clipboard | [Find me Here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/Copy%20to%20clipboard) |
102102
75| Video-to-audio Convertor | Extracts audios from videos. | [Find me here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/Video-to-audio-convertor) |
103+
76| Audio Recorder | Records audio from system's audio input device for `n` seconds | [Find me Here](https://github.com/GDSC-RCCIIT/General-Purpose-Scripts/tree/main/scripts/Audio%20Recorder) |
103104

104105
### Good Luck and don't forget to have fun with Open Source 🚀

scripts/Audio Recorder/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## How to run
2+
1. Clone the repository
3+
```
4+
git clone [email protected]:GDSC-RCCIIT/General-Purpose-Scripts.git
5+
```
6+
2. Install the script requirements
7+
```
8+
pip install -r requirements.txt
9+
```
10+
3. Navigate to `Audio Recorder` directory
11+
```
12+
cd General-Purpose-Scripts/scripts/Audio Recorder
13+
```
14+
4. Run the script to record audio
15+
```
16+
python audio.py
17+
```

scripts/Audio Recorder/audio.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import time
2+
import sounddevice as sd
3+
import wavio as wv
4+
5+
# Sampling frequency
6+
freq = 45000
7+
8+
# Recording duration
9+
duration = int(input("Enter the duration (in seconds): "))
10+
11+
print("Recording...")
12+
# Start recorder with the given values of duration and sample frequency
13+
recording = sd.rec(int(duration * freq), samplerate=freq, channels=2)
14+
15+
# View timer and record audio for the given number of seconds
16+
while duration:
17+
mins, secs = divmod(duration, 60)
18+
timer = "{:02d}:{:02d}".format(mins, secs)
19+
print(timer, end="\r")
20+
time.sleep(1)
21+
duration -= 1
22+
23+
print("Done!")
24+
num = input("Enter a number for your file name: ")
25+
26+
# Convert the NumPy array to audio file
27+
wv.write("recording" + num + ".wav", recording, freq, sampwidth=2)
28+
29+
print("Saved file as recording" + num + ".wav in the present directory.")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sounddevice==0.4.3
2+
wavio==0.0.4
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## How to run
2+
3+
1. Clone the repository
4+
```
5+
git clone [email protected]:GDSC-RCCIIT/General-Purpose-Scripts.git
6+
```
7+
2. Install the script requirements
8+
```
9+
pip install -r requirements.txt
10+
```
11+
3. Navigate to `Copy to clipboard` directory
12+
```
13+
cd General-Purpose-Scripts/scripts/Copy to clipboard
14+
```
15+
4. Run the script to copy text from the desired file to your clipboard
16+
```
17+
python clipboard.py <file_name>
18+
```
19+
### Note
20+
Replace <file_name> with the name of the file present in the same directory as the script or replace it with the path of the file.
21+
For Linux users, install [xclip](https://linoxide.com/copy-paste-commands-output-xclip-linux/) in your system before running the script.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import os
2+
import sys
3+
import platform
4+
import subprocess
5+
import pyperclip
6+
7+
# Seeing if the file exists
8+
if os.path.exists(sys.argv[1]):
9+
f = open(sys.argv[1], "r")
10+
f_contents = f.read()
11+
f.close()
12+
else:
13+
print(
14+
"Usage: python clipboard.py file_name\n OR\n python clipboard.py 'path_of_the_file'"
15+
)
16+
exit(1)
17+
18+
whatos = platform.system()
19+
20+
if whatos == "Darwin":
21+
subprocess.run("pbcopy", universal_newlines=True, input=f_contents)
22+
print("Success! Copied to clipboard.")
23+
elif whatos == "Linux":
24+
pyperclip.copy(f_contents)
25+
print("Success! Copied to clipboard.")
26+
elif whatos == "Windows":
27+
subprocess.run("clip", universal_newlines=True, input=f_contents)
28+
print("Success! Copied to clipboard.")
29+
else:
30+
print("Failed! Clipboard not supported.")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pyperclip==1.8.2

scripts/Instagram Photo Downloader/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
3. Install chromedriver simply from the `chromedriver.exe` file.
66
4. Change your working directory to the directory of this script using: `cd General-Purpose-Scripts/scripts/Instagram Photo Downloader`.
77
5. Install the dependencies using `pip install -r requirements.txt`.
8-
6. Run the typing_speed_test.py file in terminal with `python3 insta_pic_downloader.py`.
8+
6. Run the insta_pic_downloader.py file in terminal with `python3 insta_pic_downloader.py`.
99
7. Enter the URL of the photo you want to download and press Enter.
1010
8. The photo will be downloaded in the same directory as `insta_pic_downloader.py`.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Mood Sentiment Analyzer
2+
3+
![built by developers](http://ForTheBadge.com/images/badges/built-by-developers.svg)
4+
![python](https://img.shields.io/badge/language-Python-orange?style=for-the-badge)
5+
6+
## Setup and activate virtual environment
7+
8+
```python
9+
Video on how to activate virtual environment:
10+
For Windows: https://youtu.be/APOPm01BVrk
11+
For Unix: https://youtu.be/Kg1Yvry_Ydk
12+
```
13+
14+
Analyzes and evaluate the general mood of a given paragraph from a text file:
15+
16+
- (Either Positive, Negative or Neutral.)
17+
- Provide sentiment polarity percentage of the expressed sentiment.
18+
- Evaluate each sentences 'mood'
19+
20+
## Steps to utilize script
21+
22+
1. Create your text file.
23+
2. open `app.py` and replace file name with your create file.
24+
3. `python app.py`
25+
4. View result on `ms-analyzer.log`
26+
27+
_**Installing**_
28+
29+
- [x] Requires Python3.
30+
- [x] Requests modules. You can check out the versions in `requirements.txt` file.

0 commit comments

Comments
 (0)