Author name: SKB

Python and MySQL

Database connectivity using Python In this article we’ll be covering all database examples like SELECT, INSERT, UPDATE and DELETE operations using Python and MySQL database. First,, create database[college_db] and table[student_info] as per following image and insert few records  [here we using wamp server]  before you execute all programs in Python. a) SELECT operation # pip […]

Share

Python and MySQL Read More »

Face recognition using Python

Face detection In this machine learning example identify face using Python programming. Package  used in this example is opencv [computer vision]. To install this package simply use following syntax: pip install opencv-python import cv2 #pip install opencv-python # Load the cascade face_cascade = cv2.CascadeClassifier(‘face_detector.xml’) # Read the input image img = cv2.imread(‘test2.jpg’) # Detect faces

Share

Face recognition using Python Read More »

Data Science – 4 [extract gold price using web scrap]

Extract live gold price using web scrap – Data Science in the following example we used three packages, they are a) bs4 [Beautiful Soup for web scraping] b) pandas [panel data for data representation ] c) request [to get source / url] #data science with Python – extracting Gold Price import bs4 import pandas as

Share

Data Science – 4 [extract gold price using web scrap] Read More »

Data Science – 3 [web scraping]

Retrieve current temperature using BeautifulSoup #extract current temp import requests import bs4 #url=”https://weather.com/en-IN/weather/today/l/12.96,77.59?par=google&temp=c” url=”https://weather.com/en-IN/weather/today/l/17.31,76.81?par=google&temp=c” r=requests.get(url) soup=bs4.BeautifulSoup(r.text, “html.parser”) val= soup.find(‘span’, “data-testid=’TemperatureValue'”, class_=’CurrentConditions–tempValue–3KcTQ’) print(“Current temp is : “, val.text) Output of the above program is : Current temp is : 30° 2. To check live price, title and ratings of particular product #data science with Python –

Share

Data Science – 3 [web scraping] Read More »

Data Science – 2 [web scraping]

Data science with using Python In the following example we will be retrieving live population records using BeautifulSoup package.[web scraping] Live Population record #data science with Python – world’s population stat import bs4 import pandas as pd import requests url = ‘https://www.worldometers.info/world-population/#:~:text=Population%20in%20the%20world%20is,it%20was%20at%20around%202%25.’ result = requests.get(url) soup = bs4.BeautifulSoup(result.text,’lxml’) pop = soup.find_all(‘table’ ,class_= ‘table table-striped table-bordered

Share

Data Science – 2 [web scraping] Read More »

Data Science – 1 [web scraping]

Data science Data science: is the field of study that combines domain expertise, programming skills, and knowledge of mathematics and statistics to extract meaningful insights from ocean of data. Web scraping can be a solution to speed up the data collection process. Instead of looking at the job site every day, you can use Python

Share

Data Science – 1 [web scraping] Read More »

Multilevel, Hierarchical and Hybrid Inheritance

Multilevel, Hierarchical and Hybrid Inheritance Multi-Level Inheritance in Python #Multilevel Inheritance in Python class India: def first(self): print (‘India is the largest democratic country in the world’) class Karnataka(India): def sec(self): print (‘Karnataka is famous for IT and Coffee Production’) class Bengaluru(Karnataka): def third(self): print (‘Bengaluru also known as Garden city!’) b=Bengaluru() b.first() b.sec() b.third()

Share

Multilevel, Hierarchical and Hybrid Inheritance Read More »

Single and Multiple inheritance in Python

Single and Multiple inheritance in Python 1.  Single Inheritance  # Single Inheritance in Python with Student and Marks Details #-Base class class std_per_det: regno = input(“Enter RegNo:”) name = input(“Enter Name:”) course = input(“Enter Course:”) #Base class Method def show_std(self): print(‘Base Class value:’,self.regno) print(‘Base Class value:’,self.name) print(‘Base Class value:’,self.course) #-Derived class class marks_det(std_per_det): p=int(input(“Enter Physics

Share

Single and Multiple inheritance in Python Read More »

pip commands for python

pip(Pip Installs Packages): is a command to install various python packages. some of the following pip commands for different packages of python as well as pip upgrade. pip upgrade ———————- python -m pip install –upgrade pip to check pip version ——————————– c:\python34\scripts>pip –version [press enter, shows pip version] to install scipy ———————— c:\python34>pip install scipy

Share

pip commands for python Read More »

Share
Scroll to Top