Posted on

10 python modules you must know about

Python_logoWithout any doubt Python is one of the most talked about programming language in this Universe. It’s everywhere, and because of how simple it is to learn it – many beginners start their career with Python. The syntax of Python is very similar to that of English language, with the exception of a few extra characters here and there. In this post you will know about 10 important python modules you should know.

 

1. NumPy

 

NumPy provides some advance math functionalities to python. This package is mainly designed to efficiently manipulate large multi-dimensional arrays of arbitrary records without sacrificing too much speed for small multi-dimensional arrays. There are also basic facilities for discrete fourier transform, basic linear algebra and random number generation.

 

2. SciPy

 

SciPy is a library of algorithms and mathematical tools for python and has caused many scientists to switch from ruby to python. It is mainly used for scientific computing and technical computing. SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, signal and image processing, ODE solvers and other tasks common in science and engineering.

 

3. Pandas

 

Pandas is a Python package designed to do work with “labeled” and “relational” data simple and intuitive. Pandas is a perfect tool for data wrangling. It designed for quick and easy data manipulation, aggregation, and visualization.

 

4. matplotlib

 

matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It is a library mainly used for making 2D plots of arrays in Python. It is very useful for any data scientist or any data analyzer.

 

5. IPython

 

IPython is a command shell for interactive computing in Python and other programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history.

 

6. PyGame

 

This is a interesting python module for developers who like to play games and develop them.This library will help you achieve your goal of 2d game development.

 

7. Twisted

 

Twisted is an event-driven networking engine written in Python and licensed under the open source MIT license.It is the most important tool for any network application developer. It has a very beautiful api and is used by a lot of famous python developers.

 

8. PrettyTable

 

As the name already suggests, prettytable is a table printing library which displays the contents of the table as a pretty formatted table on the console.

 

9. nose

 

nose is a testing framework for Python. Their tagline is: “nose extends unit test to make testing easier.” It is used by millions of python developers. It is a must have if you do test driven development.

 

10. Scrapy

 

Scrapy is a free and open source web crawling framework, written in Python. Originally designed for web scraping, it can also be used to extract data using APIs or as a general purpose web crawler.

 

 

Posted on

Make portions of image responsive on your web page

Images are nowadays an important part of web pages. We make our web pages look more attractive and appealing to the users by adding images. We can make it more attractive by adding responsive images. So the big question is how can we make an image responsive.

 

responsive

 

The basic formats of images that we use in our daily life are JPEGs , PNGs , BMPs etc. These formats identify image as one whole entity.So how our code will identify small portions that are there in the image.One thing that we could do is crop our image and break it into smaller images of the portions that we want to make responsive. This will be like our brute force approach to the problem not a smart approach. We might be able to do the task but it will be a very complicated solution and we will have to take care of various corner cases.Smart approach of this problem is using a different less common image format SVG. SVG stands for Scalable Vector Graphics.

technology-1283624_640 We can change our image format into SVG easily either by using an online converter or using an image editing software as Illustrator. The benefit of SVG is that we can see and manipulate parts of our image as code. We can see the code by opening a SVG image into any text editor. Small portions of image is represented as small part of the code which we can manipulate.We can use SVG as HTML attribute. We can directly put the code in HTML code of our web page and manipulate the code by adding on-click and on-hover events to the different parts of the images.