Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Commit 3140627

Browse files
committed
2 parents ef3d0a7 + 86ba426 commit 3140627

File tree

25 files changed

+47646
-1
lines changed

25 files changed

+47646
-1
lines changed

.all-contributorsrc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,42 @@
155155
"contributions": [
156156
"code"
157157
]
158+
},
159+
{
160+
"login": "madhavmehndiratta",
161+
"name": "Madhav Mehndiratta",
162+
"avatar_url": "https://avatars3.githubusercontent.com/u/43489174?v=4",
163+
"profile": "http://madhavmehndiratta.me",
164+
"contributions": [
165+
"code"
166+
]
167+
},
168+
{
169+
"login": "yogeshwaran01",
170+
"name": "YOGESHWARAN R",
171+
"avatar_url": "https://avatars1.githubusercontent.com/u/66836092?v=4",
172+
"profile": "http://www.linkedin.com/in/yogeshwaran01",
173+
"contributions": [
174+
"code"
175+
]
176+
},
177+
{
178+
"login": "pranav6670",
179+
"name": "Pranav Natekar",
180+
"avatar_url": "https://avatars1.githubusercontent.com/u/31882923?v=4",
181+
"profile": "http://pranav6670.github.io",
182+
"contributions": [
183+
"code"
184+
]
185+
},
186+
{
187+
"login": "nj1902",
188+
"name": "DopeKid",
189+
"avatar_url": "https://avatars0.githubusercontent.com/u/56442920?v=4",
190+
"profile": "https://github.com/nj1902",
191+
"contributions": [
192+
"code"
193+
]
158194
}
159195
],
160196
"contributorsPerLine": 7,

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea/
2+
.DS_Store

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com)
77

88
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
9-
[![All Contributors](https://img.shields.io/badge/all_contributors-16-orange.svg?style=flat-square)](#contributors-)
9+
[![All Contributors](https://img.shields.io/badge/all_contributors-20-orange.svg?style=flat-square)](#contributors-)
1010
<!-- ALL-CONTRIBUTORS-BADGE:END -->
1111

1212
![Issues](https://img.shields.io/github/issues/Python-World/Python_and_the_Web)
@@ -113,6 +113,10 @@ We now have a section for miscellaneous scripts as well.
113113
<tr>
114114
<td align="center"><a href="https://github.com/mendoza"><img src="https://avatars1.githubusercontent.com/u/30415552?v=4" width="100px;" alt=""/><br /><sub><b>David Mendoza</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=mendoza" title="Code">💻</a></td>
115115
<td align="center"><a href="https://github.com/dkarmy12"><img src="https://avatars1.githubusercontent.com/u/55491427?v=4" width="100px;" alt=""/><br /><sub><b>dkarmy12</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=dkarmy12" title="Code">💻</a></td>
116+
<td align="center"><a href="http://madhavmehndiratta.me"><img src="https://avatars3.githubusercontent.com/u/43489174?v=4" width="100px;" alt=""/><br /><sub><b>Madhav Mehndiratta</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=madhavmehndiratta" title="Code">💻</a></td>
117+
<td align="center"><a href="http://www.linkedin.com/in/yogeshwaran01"><img src="https://avatars1.githubusercontent.com/u/66836092?v=4" width="100px;" alt=""/><br /><sub><b>YOGESHWARAN R</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=yogeshwaran01" title="Code">💻</a></td>
118+
<td align="center"><a href="http://pranav6670.github.io"><img src="https://avatars1.githubusercontent.com/u/31882923?v=4" width="100px;" alt=""/><br /><sub><b>Pranav Natekar</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=pranav6670" title="Code">💻</a></td>
119+
<td align="center"><a href="https://github.com/nj1902"><img src="https://avatars0.githubusercontent.com/u/56442920?v=4" width="100px;" alt=""/><br /><sub><b>DopeKid</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=nj1902" title="Code">💻</a></td>
116120
</tr>
117121
</table>
118122

@@ -125,3 +129,4 @@ SR No | Project | Author
125129
2 | [Pycon Proposals Scraper](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Web_Scrappers/Pycon_Proposals)| [Aditya Jetely](https://github.com/AdityaJ7)
126130
3 | [Hacktoberfest Events Scraper](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Web_Scrappers/Hacktoberfest_Events)| [Aditya Jetely](https://github.com/AdityaJ7)
127131
4 | [Wifi Speed Tester](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Miscellaneous/Wifi_Speed)| [AdeshChoudhar19](https://github.com/AdeshChoudhar19)
132+
5 | [Google Search Using Python](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Miscellaneous/Wifi_Speed)| [Naman Jain](https://github.com/nj1902)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Python script that converts Image to base64 encoding and vice versa.
2+
3+
4+
### Prerequisites
5+
* Required modules:
6+
```base64```, ```PIL```, ```skimage``` and ```cv2```
7+
* The ```base64``` is an inbuilt module.
8+
* Install ```PIL``` by running ```pip install Pillow```.
9+
* Install ```skimage``` by running ```pip install scikit-image```.
10+
* Install OpenCV by running ```pip install opencv-python```.
11+
12+
13+
### How to run the script
14+
First you need to go to the ImageStr_ViceVersa directory.
15+
16+
```cd Scripts/Miscellaneous/ImageStr_ViceVersa```
17+
* Select the image from your PC by providing its path to ```im_path``` variable.
18+
19+
And then run the following command once you are in project directory.
20+
21+
```python3 ImageStr_ViceVersa.py```
22+
23+
24+
### Screenshot
25+
26+
![Screenshot](Screenshot.png)
27+
28+
29+
30+
31+
## *Author Name*
32+
Pranav Natekar
21 KB
Loading

Scripts/Miscellaneous/ImageStr_ViceVersa/base64_encoded.txt

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import base64
2+
from PIL import Image
3+
import io
4+
from skimage.metrics import structural_similarity
5+
import cv2
6+
7+
im_path = "test.jpg"
8+
# Convert to base64 encoding
9+
print("Encoding....")
10+
with open(im_path, "rb") as imageFile:
11+
base64_encoding = base64.b64encode(imageFile.read())
12+
# print(base64_encoding)
13+
14+
print("Decoding and writing to image...")
15+
# Write to the image
16+
f = io.BytesIO(base64.b64decode(base64_encoding))
17+
pilimage = Image.open(f)
18+
pilimage.save('image_from_encoding.jpg')
19+
print("Image saved!")
20+
21+
# Let's check for the structural similarity between original and generated image.
22+
original = cv2.imread('test.jpg', 0)
23+
generated = cv2.imread('image_from_encoding.jpg', 0)
24+
# Similarity index should be greater than 0.90
25+
similarity_index = structural_similarity(original, generated)
26+
print(F"Similarity index is {similarity_index}")
27+
28+
544 KB
Loading
748 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Instagram Analyzer
2+
3+
This Scripts analyze the Instagram user data like Followers, Followings and Posts with Matplotlib
4+
bar charts.
5+
6+
## Prerequisites
7+
8+
Install the required packages
9+
10+
`pip install -r requirements.txt`
11+
12+
## How to use this script?
13+
14+
1.Make a text file of list of Instagram username. For example
15+
`user.txt` contains
16+
17+
```
18+
github
19+
pubg
20+
facebook
21+
iplt20
22+
chennaiipl
23+
google
24+
```
25+
26+
2.Run the script
27+
28+
```python instagram_analyzer.py user.txt```
29+
30+
## Screenshot
31+
![screenshot](sample.png)
32+
## Author
33+
34+
[YOGESHWARAN R]("https://github.com/yogeshwaran01/)

0 commit comments

Comments
 (0)