Posted on

Should I use Python 2 or Python 3 for my development activity?

thinker-28741_640Python is without any doubt 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. Currently there are two main versions of Python, Python 2 and Python 3, that have slight differences in their syntax and their support of different libraries. You can refer this post to know the key differences between Python 2 and Python 3.

No doubt both versions of Python are good but many a times, beginners get confused while choosing one of the two for their development purpose. In this article I will try to explain which Python version can you use to start your development.

What are the differences?

Short version: Python 2.x is legacy, Python 3.x is the present and future of the language

In order to avoid making this post too long, I will be avoiding the details of differences between the two versions. The detailed post on differences between Python 2 and Python 3 can be found here.

Which version should I use?

Which version you ought to use is mostly dependent on what you want to accomplish.

If you can do exactly what you want with Python 3.x, great! There are a few minor downsides, such as very slightly bad library support and the fact that some current Linux distributions and Macs are still using 2.x as default (although Python 3 ships with many of them), but as a language Python 3.x is definitely ready. As long as Python 3.x is installed on your user’s computers (which ought to be easy, since many people reading this may only be developing something for themselves or an environment they control) and you’re writing things where you know none of the Python 2.x modules are needed, it is an excellent choice. Also, most Linux distributions have Python 3.x already installed, and available for end-users. Some are phasing out Python 2 as pre-installed default.

In particular, instructors introducing Python to new programmers should consider teaching Python 3 first and then introducing the differences in Python 2 afterwards (if necessary), since Python 3 eliminates many quirks that can unnecessarily trip up beginning programmers trying to learn Python 2.

However, there are some key issues that may require you to use Python 2 rather than Python 3.

  • Firstly, if you’re deploying to an environment you don’t control, that may impose a specific version, rather than allowing you a free selection from the available versions.
  • Secondly, if you want to use a specific third party package or utility that doesn’t have a released version that is compatible with Python 3, and porting that package is a non-trivial task, you may choose to use Python 2 in order to retain access to that package.

Python 3 already broadly supports creating GUI applications, with Tkinter in the standard library. Python 3 has been supported by PyQt almost from the day Python 3 was released; PySide added Python 3 support in 2011. GTK+ GUIs can be created with PyGObject which supports Python 3 and is the successor to PyGtk.
Many other major packages have been ported to Python 3 including:

  • NumPy and SciPy (for number crunching and scientific computing)
  • Django, Flask, CherryPy and Pyramid (for Web sites)
  • NumPy and SciPy (for number crunching and scientific computing)
  • Django, Flask, CherryPy and Pyramid (for Web sites)
  • And many, many more!

If you want to use Python 3.x, but you’re afraid to because of a dependency, it’s probably worthwhile doing some research first. This is a work in progress. Furthermore, with the large common subset supported by both Python 2.6+ and Python 3.3+, many modern Python code should run largely unmodified on Python 3, especially code written to interoperate with web and GUI frameworks that force applications to correctly distinguish binary data and text (some assistance from the six compatibility module may be needed to handle name changes).

Even though the official python documentation and the tutorial have been completely updated for Python 3, there is still a lot of documentation (including examples) on the Web and in reference books that use Python 2, although more are being updated all the time. This can require some adjustment to make things work with Python 3 instead.

Some people just don’t want to use Python 3.x, which is their prerogative. However, they are in the minority.
It is worth noting that if you wish to use an alternative implementation of Python such as IronPython, Jython or Pyston (or one of the longer list of Python platform or compiler implementations), Python 3 support is still relatively rare. This may affect you if you are interested in choosing such an implementation for reasons of integration with other systems or for performance.

Thumbs Up

 

 

Posted on

Why IoT is important in Smart Cities?

warsaw-897372_640

 

Optimized Energy Use

IoT may provide a service to monitor the energy consumption of the whole city, thus enabling authorities and citizens to get a clear and detailed view of the amount of energy required by the different services (public lighting, transportation, traffic lights, control cameras, heating/cooling of public buildings, and so on). In order to obtain this, power draw monitoring must be integrated with the power grid in the city.

 

Traffic Monitoring

Even though camera-based traffic monitoring systems are already available and deployed in many cities, low-power widespread communication can provide a denser source of information. GPS installed vehicles or collecting data from mobile devices on the route, provide realtime and fast monitoring of Traffic Congestion. This will make it faster and more reliable.

 

Waste Management:

Waste management is a primary issue in many modern cities, due to both the cost of the service and the problem of the storage of garbage in landfills. A deeper penetration of ICT solutions in this domain, however, may result in significant savings and economical and ecological advantages. For instance, the use of intelligent waste containers, which detect the level of load and allow for an optimization of the collector trucks route, can reduce the cost of waste collection and improve the quality of recycling. The use of IoT by connecting the intelligent waste containers provide optimal management of collector truck fleet.

Posted on

Top 7 Websites and Apps built with AngularJs

AngularJS is a popular framework for building web applications. When I created my first AngularJS app, I got advice from a colleague at work who had experience on how to set everything up. That helped me tremendously because I didn’t have to guess at best practices.  AngularJS provides a great platform to build your website.Today we will look upon top 7 websites built with AngularJS to let you know more about this technology.

1. freelancer.com

 

Screenshot from 2017-06-27 13-41-18

Freelancer is the world’s most renowned marketplace for outsourcing. The employer just needs to post the project to get their work done. There are around 15.7 million freelancers registered on this site who compete against each other by bidding on the project.

2. paypal.com

 

Screenshot from 2017-06-27 13-43-07

Paypal is one of the worldwide leading Internet payment companies. It’s another example of large websites using AngularJS.

3. angularjs.org

 

Screenshot from 2017-06-27 13-57-49

Angularjs.org is a website for learning AngularJS. This site contains videos, free course, tutorials, case studies, documentations and API references to learn AngularJS. This site gives a perfect platform for learning AngularJS to novice.

4. istockphoto.com

 

Screenshot from 2017-06-27 15-02-19

Istockphoto has a huge collection of images, videos and photo clips. These images can be purchased at a nominal price of US $0.95 to $1.50 with price range varying on the credits allotted to an image.

5. upwork.com

 

Screenshot from 2017-06-27 15-09-14

UpWork is another great website which provides a platform where employer can find freelancers for any job at any time. It allows client to work, hire and interview with freelancers thereby, reducing the efforts to find a suitable employee for the role.

6. localytics.com

 

Screenshot from 2017-06-27 15-16-25

Localytics is a marketing platform for mobile and web app owners to build a strong customer relationship through their analytics. This service offering platform is used by 6,000 companies, like Microsoft, eBay, ESPN, and others. Localytics developers were previously using Backbone before they decided to move to AngularJS framework. And now their integrated approach to app helps users to deliver a more personalized experience. They believed AngularJS helped to solve common UI related problems and reduce the amount of code comparing to the previous framework.

7. netflix.com

 

Screenshot from 2017-06-27 15-20-01

Netflix is headquartered at California (United States) and provides on request internet streaming media to viewers. It brings the latest movies and TV series at your doorstep by sending you DVDs via Permit Reply Mail.

 


 

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

What is the Difference Between Big Data and IoT?

Difference Between Big Data and Analytics

What is the Difference between Big Data and IoT?

Big Data is a collection of data from places like Articles, Social Media posts, Sensor Data and Device data, etc., which is accessible by the organization for Analysis and used for Predictions. IoT is one source of Big Data which collects data through Sensors and stores it in a Database.

IoT can do much more functions than Big Data. How? It collects data analyzing it in real time events and make sure to integrate any insight of rest of your Business.
For Example, Consider a Smart car is having multiple sensors like Engine Temperature, Brakes, Fuel Sensor and More. Using IoT you can detect the problems and correct them by sending a notification about Engine Temperature or Brake Failures. Even it can notify the nearest Service Station. Ok, that’s all about IoT but what is the use of Big Data. Using Big Data the data collected from all the vehicles are analyzed. If a problem occurs in a car, we can find out which Manufacturing Unit caused the problem and also the root cause of the problem.
In simple words, Big data is all about Data and IoT is about Data, Devices and Connectivity.