Python Projects & Free Books
38.1K subscribers
611 photos
93 files
307 links
Python Interview Projects & Free Courses

Admin: @Coderfun
Download Telegram
Large English learning resources collection
👇👇
https://t.iss.one/englishlearnerspro/111
👍15
Scrap Image from google using BeautifulSoup
import requests
from bs4 import BeautifulSoup as BSP

def get_image_urls(search_query):
url = f"https://www.google.com/search?q={search_query}&tbm=isch"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
}
rss = requests.get(url, headers=headers)
soup = BSP(rss.content, "html.parser")

all_img = []
for img in soup.find_all('img'):
src = img['src']
if not src.endswith("gif"):
all_img.append(src)

return all_img

print(get_image_urls("boy"))
👍20
Scrap Image from bing using BeautifulSoup
import requests
from bs4 import BeautifulSoup as BSP

def split_url(url):
return url.split('&')[0]

def get_image_urls(search_query):
url = f"https://cn.bing.com/images/search?q={search_query}&first=1&cw=1177&ch=678"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
}
rss = requests.get(url, headers=headers)
soup = BSP(rss.content, "html.parser")

all_img = []
for img in soup.find_all('img'):
img_url = img.get('src2')
if img_url and img_url.startswith('https://tse2.mm.bing.net/'):
img_url = split_url(img_url)
all_img.append(img_url)

return all_img

print(get_image_urls("cat"))


sample response :
['https://tse2.mm.bing.net/th?q=Cat+Portrait', ...']
👍19
Tips to Merge two dictionary

boy={"ram":70,"Sundar":80}

girl={"riya":80,"Sonali":70}

student=boy | girl

print(student)
👍23
Essential Python Libraries for Data Analytics 😄👇

Python Free Resources: https://t.iss.one/pythondevelopersindia

1. NumPy:
- Efficient numerical operations and array manipulation.

2. Pandas:
- Data manipulation and analysis with powerful data structures (DataFrame, Series).

3. Matplotlib:
- 2D plotting library for creating visualizations.

4. Scikit-learn:
- Machine learning toolkit for classification, regression, clustering, etc.

5. TensorFlow:
- Open-source machine learning framework for building and deploying ML models.

6. PyTorch:
- Deep learning library, particularly popular for neural network research.

7. Django:
- High-level web framework for building robust, scalable web applications.

8. Flask:
- Lightweight web framework for building smaller web applications and APIs.

9. Requests:
- HTTP library for making HTTP requests.

10. Beautiful Soup:
- Web scraping library for pulling data out of HTML and XML files.

As a beginner, you can start with Pandas and Numpy libraries for data analysis. If you want to transition from Data Analyst to Data Scientist, then you can start applying ML libraries like Scikit-learn, Tensorflow, Pytorch, etc. in your data projects.

Share with credits: https://t.iss.one/sqlspecialist

Hope it helps :)
👍24
Python code To download from Youtube

from pytube import YouTube

# Enter the YouTube video URL
url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

# Create a YouTube object with the URL
yt = YouTube(url)

# Select the highest resolution video
video = yt.streams.get_highest_resolution()

# Set the output directory and filename
output_dir = "/storage/emulated/0/Documents/"
filename = yt.title+".mp4"

# Download the video
video.download(output_dir, filename)

print(f"Download complete: {filename}")
👍40
👩‍🏫🧑‍🏫 PROGRAMMING LANGUAGES YOU SHOULD LEARN TO BECOME.

⚔️[ Web Developer]
PHP, C#, JS, JAVA, Python, Ruby

⚔️[ Game Developer]
Java, C++, Python, JS, Ruby, C, C#

⚔️[ Data Analysis]
R, Matlab, Java, Python

⚔️[ Desktop Developer]
Java, C#, C++, Python

⚔️[ Embedded System Program]
C, Python, C++

⚔️[Mobile Apps Development]
Kotlin, Dart, Objective-C, Java, Python, JS, Swift, C#
👍18