Skip to content

Commit 129f7bb

Browse files
committed
Merge branch 'iss_718' into conflicts
2 parents dd9de75 + 8625011 commit 129f7bb

File tree

126 files changed

+144
-165
lines changed

Some content is hidden

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

126 files changed

+144
-165
lines changed

Python/Automate_LinkedIN/login.JPG

1.31 KB

Python/Automate_LinkedIN/work.png

1.61 KB

Python/Automate_Telegram/code.png

9.32 KB

Python/Automate_Telegram/login.png

7.98 KB

Python/Automate_Telegram/send.png

4.46 KB

Python/Discord_Bot/image.jpg

27.6 KB
File renamed without changes.
File renamed without changes.

Python/Execution_Time/image.png

7.04 KB

Python/IMDB_Scrapper/sample.PNG

96.5 KB

Python/Markov_Memes/markovmeme.png

542 KB
File renamed without changes.

Python/Merge_2_PFDs/MergedFiles.pdf

27.8 KB
Binary file not shown.
Lines changed: 37 additions & 37 deletions
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
import PyPDF2
2-
import sys
3-
4-
# Open the pdf file
5-
file1 = sys.argv[1]
6-
file2 = sys.argv[2]
7-
pdf1 = open(file1, 'rb')
8-
pdf2 = open(file2, 'rb')
9-
10-
# Read the files
11-
reader1 = PyPDF2.PdfFileReader(pdf1)
12-
reader2 = PyPDF2.PdfFileReader(pdf2)
13-
14-
# Create a new PdfFileWriter object which represents a blank PDF document
15-
writer = PyPDF2.PdfFileWriter()
16-
17-
# Loop through all the pagenumbers for the first document
18-
for i in range(reader1.numPages):
19-
pages = reader1.getPage(i)
20-
writer.addPage(pages)
21-
22-
# Loop through all the pagenumbers for the second document
23-
for i in range(reader2.numPages):
24-
pages = reader2.getPage(i)
25-
writer.addPage(pages)
26-
27-
# Now that you have copied all the pages in both the documents, write them into the a new document
28-
mergedfile = open('MergedFiles.pdf', 'wb')
29-
writer.write(mergedfile)
30-
31-
# Close all the files - Created as well as opened
32-
mergedfile.close()
33-
pdf1.close()
34-
pdf2.close()
1+
import PyPDF2
2+
import sys
3+
4+
# Open the pdf file
5+
file1 = sys.argv[1]
6+
file2 = sys.argv[2]
7+
pdf1 = open(file1, 'rb')
8+
pdf2 = open(file2, 'rb')
9+
10+
# Read the files
11+
reader1 = PyPDF2.PdfFileReader(pdf1)
12+
reader2 = PyPDF2.PdfFileReader(pdf2)
13+
14+
# Create a new PdfFileWriter object which represents a blank PDF document
15+
writer = PyPDF2.PdfFileWriter()
16+
17+
# Loop through all the pagenumbers for the first document
18+
for i in range(reader1.numPages):
19+
pages = reader1.getPage(i)
20+
writer.addPage(pages)
21+
22+
# Loop through all the pagenumbers for the second document
23+
for i in range(reader2.numPages):
24+
pages = reader2.getPage(i)
25+
writer.addPage(pages)
26+
27+
# Now that you have copied all the pages in both the documents, write them into the a new document
28+
mergedfile = open('MergedFiles.pdf', 'wb')
29+
writer.write(mergedfile)
30+
31+
# Close all the files - Created as well as opened
32+
mergedfile.close()
33+
pdf1.close()
34+
pdf2.close()
272 KB
64.5 KB

Python/QR_Code_Generator/Capture.PNG

23 KB

Python/README.md

Lines changed: 6 additions & 6 deletions
File renamed without changes.

Python/Subtitle_Downloader/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

Python/Table_to_CSV/img/csv_img.PNG

13.6 KB

Python/Table_to_CSV/img/excel_img.PNG

9.06 KB

Python/Table_to_CSV/img/grid.PNG

24.3 KB

Python/Table_to_CSV/img/option.PNG

10.1 KB

Python/Table_to_CSV/img/test.PNG

13.7 KB
File renamed without changes.
Lines changed: 37 additions & 37 deletions
120 KB

Python/Toonify_Image/images/rohit.png

12.1 KB
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
# shutil is used to save image locally
2-
import requests
3-
import sys
4-
import shutil
5-
from decouple import config
6-
7-
imagePath=sys.argv[1]
8-
api_key=config("API_KEY")
9-
r = requests.post(
10-
"https://api.deepai.org/api/toonify",
11-
files={
12-
'image': open(imagePath, 'rb'),
13-
},
14-
headers={'api-key': api_key}
15-
)
16-
y=r.json()
17-
image_url=y['output_url']
18-
filename = image_url.split("/")[-1]
19-
# Open the url image
20-
r1 = requests.get(image_url, stream = True)
21-
# Check if the image was retrieved successfully
22-
if r1.status_code == 200:
23-
# Set decode_content value to True, otherwise the downloaded image file's size will be zero.
24-
r1.raw.decode_content = True
25-
# Open a local file with wb ( write binary ) permission.
26-
with open(filename,'wb') as f:
27-
shutil.copyfileobj(r1.raw, f)
28-
print('Image sucessfully Downloaded: ',filename)
29-
else:
30-
print('Image Couldn\'t be retreived')
1+
# shutil is used to save image locally
2+
import requests
3+
import sys
4+
import shutil
5+
from decouple import config
6+
7+
imagePath=sys.argv[1]
8+
api_key=config("API_KEY")
9+
r = requests.post(
10+
"https://api.deepai.org/api/toonify",
11+
files={
12+
'image': open(imagePath, 'rb'),
13+
},
14+
headers={'api-key': api_key}
15+
)
16+
y=r.json()
17+
image_url=y['output_url']
18+
filename = image_url.split("/")[-1]
19+
# Open the url image
20+
r1 = requests.get(image_url, stream = True)
21+
# Check if the image was retrieved successfully
22+
if r1.status_code == 200:
23+
# Set decode_content value to True, otherwise the downloaded image file's size will be zero.
24+
r1.raw.decode_content = True
25+
# Open a local file with wb ( write binary ) permission.
26+
with open(filename,'wb') as f:
27+
shutil.copyfileobj(r1.raw, f)
28+
print('Image sucessfully Downloaded: ',filename)
29+
else:
30+
print('Image Couldn\'t be retreived')
560 KB

Python/Watermark_It/sample.PNG

115 KB

Python/Wifi_Speed_Tester/Capture.PNG

103 KB

0 commit comments

Comments
 (0)