
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10476 Articles for Python

684 Views
Python now provides new way to format strings, called f-strings. This features is available from Python 3.6 under PEP-498. They are so called (f-string) because of the letter ‘f’ prefix with a string. The letter ‘f’ also indicates that these f-strings can be used for formatting.Below are some of the examples to demonstrates the use of f-strings.Program#1name = 'Rajesh' age = 13 * 3 fString = f'My name is {name} and my age is {age}' print(fString) #We can use Uppercase 'F' instead of lowercase 'f'. print(F'My name is {name} and my age is {age}') #As the fString valuation is done, ... Read More

938 Views
Steganography is a technique of hiding information behind the scene. It’s is not like cryptography which focuses on encrypting data(through different algorithms like SHA1, MD5 etc), steganography focuses more on hiding the data (data can be a file, image, message or video) within another file, image, message or video to avoid any attraction.So in this we’ll try to create a simple python program that hides the information behind the image without noticiable changes in the looks of the image. There are two main parts of the program – first is a decoding function that can extract secret information from an ... Read More

13K+ Views
Python provides lots of libraries for image processing, including −OpenCV − Image processing library mainly focused on real-time computer vision with application in wide-range of areas like 2D and 3D feature toolkits, facial & gesture recognition, Human-computer interaction, Mobile robotics, Object identification and others.Numpy and Scipy libraries − For image manipuation and processing.Sckikit − Provides lots of alogrithms for image processing.Python Imaging Library (PIL) − To perform basic operations on images like create thumnails, resize, rotation, convert between different file formats etc.In this section we are going to see some basics of image processing in python.Install required library Our first step ... Read More

1K+ Views
Folium is a very powerful python library which let you create seveal kind of Leaflet maps. As Leaflet/folium maps are interactive, so they are ideal for making dashborad building.InstallationInstalling folium is very easy using pip −$pip install foliumLike you can see from the below screenshot, you just need to type above command in your console/cmd and pip will install the folium as well as dependencies for your python installation.Basic Map#Import library import folium #Uses lat then lon. & zoomlevel 4.The bigger the zoom number, the closer in you get. mapOBJ = folium.Map(location=[17.3616, 78.4747], zoom_start = 4, tiles = 'Stamen ... Read More

306 Views
Image recognition used to be done using much simpler methods such as linear regression and comparison of similarities. The results were obviously not very good, even the simple task of recognizing hand-written alphabets proved difficult. Convolution neural networks (CNNs) are supposed to be a step up from what we traditionally do by offering a computationally cheap method of loosely simulating the neural activities of a human brain when it perceives images.Convolutional neural network overviewVery similar to how we recognise different objects, computer algorithms need to go through millions of images before it is able to generalize the input and make ... Read More

1K+ Views
Natural language processing is the study of automated generation and understanding of natural human languages. This is becoming more and more interesting tasks to solve, as computer technology is integrated into almost every industry nowadays. We are going to study one specific field within natural language processing; readability. This involves the topic of determining the readability of a text. This indicates how difficult it is to read or understand a text.A readability index is a numeric value that indicates how difficult (or easy) it is to read and understand a text. There are several different tests for determining readability, and ... Read More

204 Views
Scrapy spiderScrapy spider is a class which provides the facility to follow the links of a website and extract the information from the webpages.This is the main class from which other spiders must inherit.ScrapinghubScrapinghub is an open source application to run Scrapy spiders. Scrapinghub turns web content into some useful data or information. It allows us to extract the data from webpages, even for complex webpages.We are going to use scrapinghub to deploy scrapy spiders on cloud and execute it.Steps to deploy spiders on scrapinghub −Step1 −Create one scrapy project −After installing scrapy, just run the following command in your ... Read More

735 Views
One of the best frameworks for developing crawlers is scrapy. Scrapy is a popular web scraping and crawling framework utilizing high-level functionality to make scraping websites easier.Installation Installing scrapy in windows is easy: we can use either pip or conda(if you have anaconda). Scrapy runs on both python 2 and 3 versions.pip install ScrapyOrconda install –c conda-forge scrapyIf Scrapy is installed correctly, a scrapy command will now be available in the terminal −C:\Users\rajesh>scrapy Scrapy 1.6.0 - no active project Usage: scrapy [options] [args] Available commands: bench Run quick benchmark test fetch Fetch a URL using the ... Read More

346 Views
Python provides various easy to use libraries for data visualization. Good thing is that these libraries works with small or large datasets.Some of the most commonly used python libraries for data visualizations are −MatplotlibPandasPlotlySeabornBelow we are going to plot different types of visualization chart for one fixed data to better analyse that data.We are going to analyze below data set to visualize through different charts −Country or AreaYear(s)VariantValueIndia2019Medium1368737.513India2019High1378419.072India2019Low1359043.965India2019Constant fertility1373707.838India2019Instant replacement1366687.871India2019Zero migration1370868.782India2019Constant mortality1366282.778India2019No change1371221.64India2019Momentum1367400.614Basic Plot Let's create some basic plots: Line plots, scatter plots and histogramsLine PlotsLine graphs are plots where a line is drawn to indicate a relationship between a particular ... Read More

2K+ Views
Python provides numerous libraries for data analysis and visualization mainly numpy, pandas, matplotlib, seaborn etc. In this section, we are going to discuss pandas library for data analysis and visualization which is an open source library built on top of numpy.It allows us to do fast analysis and data cleaning and preparation.Pandas also provides numerous built-in visualization feautures which we are going to see below.InstallationTo install pandas, run the below command in your terminal −pipinstall pandasOrwe have anaconda, you can usecondainstall pandasPandas-DataFramesData framesa re the main tools when we are working with pandas.code −import numpy as np import pandas as ... Read More