Converting image into sketch using python

 Here in this post, we presented a very easy python code to convert any image into sketch. First of all you need to install OpenCv Library: pip install    opencv-python Python Code: from cv2 import cv2 image=cv2.imread("E:/Drive/msc/anshucln/Images/420.jpg") gray_image=cv2.cvtColor(image,cv2.COLOR_BGR2GRAY) inverted=255-gray_image blurred=cv2.GaussianBlur(inverted,(21,21),0) invertedblur=255-blurred pencilsketch=cv2.divide(gray_image,invertedblur,scale=256.0) cv2.imwrite("E:/Drive/msc/anshucln/Images/42111.jpg",pencilsketch)

covid 19 python project | Latest Covid data analysis udsing Juypter Notebook

 Code and Output is provided bolow: 1. import pandas as pd 2. import seaborn as sn 3. import matplotlib.pyplot as plt 4. data=pd.read_csv('C:/Users/sunny/Desktop/MACHINE                LEARNING/python_project/coviddata.csv') data.head() 5. data.columns 6. data.count() 7. data=data.drop(["date", "total_cases", "total_deaths", "weekly_cases", "weekly_deaths", "biweekly_cases","biweekly_deaths"], axis=1) 8. data.columns 9. data.rename( columns={     "new_cases": "cases",     "new_deaths": "deaths" },  inplace=True ) 10. data.columns 11. data.groupby('location').sum().head() 12. data.groupby('location')['cases'].sum().sort_values(ascending=False).head(5) 13. data[data.location=="India"].head()

Learn Web Scraping in one Post | 2020

 Web Scraping is the process of retrieving the web information automatically using bots. Here in this tutorial, we used Python. IDE used: Visual Editor. Programming Language: Python. Steps to perform: Step 1:  Open the Visual Editor or any editor, and Install the following dependencies: pip install requests pip install bs4 pip install html5lib Step 2: Get the HTML Step 3: Parse the HTML Step 4: HTML Tree Traversal Complete Code #Step 1 import  requests from  bs4  import  BeautifulSoup url= "" # step2: Get the HTML r=requests.get(url) htmlcontent=r.content #print(htmlcontent) # step3: Parse the HTML soup=BeautifulSoup(htmlcontent,  'html.parser' ) #print(soup) # It will print all the html code of your website. # step 4: HTML Tree traversal # commonly used objects here: Tag, NavigableString, BeautifulSoup, Comment title=soup.title  # It will print the title of website. print (title) # Get all the paragraphs from the page paras=soup.find_all( 'p&#

Basic functions of python used in Data Science for data exploration.

head (): It shows the first five rows of the dataset. shape : It shows the total rows and columns of the dataset. index : It shows an index of the data frame. columns : It shows the name of each column dtypes : It shows the data type of each column unique : It provides the unique values. It can be applied on a single column only. nunique: It shows the total number of unique values in a column. It can also be applied on a whole  data frame. count : It shows the total no of non-null values in each column. info : it provides the basic information about the data frame. I have applied all the above commands in a data science project. You must also practice these commands. The data set can be downloaded from here . The source code having all the above commands: import pandas as pd data=pd.read_csv('C:/Users/sunny/Desktop/MACHINE LEARNING/python_project/weather.csv') data.head() data.shape data.index data.columns data.dtypes data['Weather'].unique() data.nunique() data.count()

How to perform web automation using Python? | Web Scraping using Selenium.

For performing web automation or web scraping using python: Install Selenium using pip command. Download browser driver. Write Python code using any IDE. How to install Selenium using pip command? Open command prompt and type pip install selenium and wait for a while to get it installed. If you are using mac or linux, write pip3 instead of pip. How to Download browser driver? Download browser driver from the internet. Here in my case, I am using driver for Google Chrome. However, you can use other browser also. Go to the I am suing Google Chrome 86 version, so i am selecting second option. I am selecting, since i am using windows. Extract the driver and place it in the c->proramme File folder for easy access. However, you can place it anywhere in your computer. Copy this path. Write the following python code in an IDE. I am using Visual Editor.   from  selenium  import  webdrive

Accountancy mcq of previous year question paper

Objective Type Questions:  The following multiple-choice questions are taken from the question papers of various Government recruitments that occurred in the past. [1] In Accounting Money is the:   (a) Measurement Value (b) Scale of Measurement (c) Scale of Soc1al Measurement (d) Store of Value ANSWER-(b)   [2] Money is a measurement scale and has a universal denomination:   (a) True (b) Partly True (c) False (d) Can't Say ANSWER-(c)   [3] Gross Book Value of a Fixed Asset is its:   (a) Cost less depreciation (b) Historical Cost (c) Fair Market value (d) Realizable value ANSWER-(b)   [4] ABC Ltd. purchased a building by paying ~ 50,00,000 as on pI April, 2000. On 151 April, 2007 it found that it would cost ~1 ,50,00,000 to purchase the similar building. This value of ~1 ,50,00,000 is known as   (a) Historical Cost (b) Realizable value (c) Curr.ent Cost (d) Present ANSWER-(c)   [5] Change in accounting estimate means: (a) D