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.

Posted on

Code easy with these 3 Array hacks

Arrays are everywhere in JavaScript and with the new spread operators introduced in ECMAScript 6, you can do awesome things with them. In this post I will show you 3 useful tricks you can use when programming.

 

technology-1283624_640

 

1. Iterating through an empty array

JavaScript arrays are sparse in nature in that there are a lot of holes in them. Try creating an array using the Array’s constructor and you will see what I mean.

> const arr = new Array(4);
[undefined, undefined, undefined, undefined]

You may find that iterating over a sparse array to apply a certain transformation is hard.

> const arr = new Array(4);
> arr.map((elem, index) => index);
[undefined, undefined, undefined, undefined]

To solve this, you can use Array.apply when creating the array.

> const arr = Array.apply(null, new Array(4));
> arr.map((elem, index) => index);
[0, 1, 2, 3]

2. Passing an empty parameter to a method

If you want to call a method and ignore one of its parameters, then JavaScript will complain if you keep it empty.

> method('parameter1', , 'parameter3');
Uncaught SyntaxError: Unexpected token ,

A workaround that people usually resort to is to pass either null or undefined.

> method('parameter1', null, 'parameter3') // or
> method('parameter1', undefined, 'parameter3');

I personally don’t like using null since JavaScript treats it as an object and that’s just weird. With the introduction of spread operators in ES6, there is a neater way of passing empty parameters to a method. As previously mentioned, arrays are sparse in nature and so passing empty values to it is totally okay. We’ll use this to our advantage.

> method(...['parameter1', , 'parameter3']); // works!

3. Unique array values

I always wonder why the Array constructor does not have a designated method to facilitate the use of unique array values. Spread operators are here for the rescue. Use spread operators with the Set constructor to generate unique array values.

> const arr = [...new Set([1, 2, 3, 3])];
[1, 2, 3]

 

Posted on

5 Top Python Frameworks For Web Developers

A Web framework can be very helpful for developers to write Web applications without having to handle low-level details as protocols, sockets or process/thread management. But a perfect choice might depend on a developer specific needs, preferences, and skill level. Python is a dynamic, object-oriented language. It was originally designed as an object-oriented language and some more advanced features were added in the later versions. In addition to the design purpose of language itself, the Python standard library is worth praising, and it even brings its own server. In other aspects, Python has enough free data library, free Web page template system and the library interacting with the Web server, which can be designed to your Web application. In this article we are going to look at 5 top Python Frameworks(according to me) for web development purpose.
1. Django

Screenshot from 2017-06-26 17-15-46
Django is a high-level Python Web framework that encourages fast growth and clean, pragmatic design. In case you are building something that’s much like a e-commerce web site, then it’s best to, in all probability, go along with Django. It would get your work executed fast. You do not have to fret about too many expertise selections. It gives the whole lot factor you want from template engine to ORM. If you wish to use your web app framework as a CMS, Django might be a more sensible choice. It’s free and open source.

2. Flask
Screenshot from 2017-06-26 17-22-07
Flask Python framework is highly extensible. A newbie programmer may find Flask inefficient due to lack of features like form validation, and database abstraction layer. In such a case, know that Flask allows you to implement extensions; therefore, you can add any required functionality.

3. CherryPy
Screenshot from 2017-06-26 17-28-40
CherryPy is a Web application development framework based on Python, that greatly simplifies the work of Python Web developers. It provides a friendly HTTP protocol interfaces for Python developers. CherryPy has a built in HTTP server or Web server, so the users of CherryPy can directly run CherryPy application without building Web server.

4. Pyramid
Screenshot from 2017-06-26 17-30-23
Pyramid is an open source, Python web application development framework. Its primary goal is to make it easier for a Python developer to create web applications. Pyramid is similar to Flask . Pyramid is compatible with python3, with a great documentation, its minimal, fast and flexible and has an integration of nosql: mongodb, couchdb . Pyramid is best for Developers working on API projects, prototyping a concept & developing large web applications, such as a CMS.

5. Web2py
Screenshot from 2017-06-26 20-13-12
Web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python.

 

 

Posted on

Best Free-Online tools for your IoT Projects

Best Online Tools for IoT Projects

Arduino Create

 

Create

 

Arduino Create (Arduino Web Editor) is an integrated online platform that enables Makers to write code, access content, configure boards and share projects. Traditionally speaking, going from an idea to a fully-functional IoT device has been a tedious process even for the most advanced engineers and developers. Until now, they would have to frequently switch back and forth between various tools and screens, from IDEs to cloud services.

That’s why Arduino has set out to launch a one-stop shop for the Maker experience, which will change the way you create, collaborate and communicate with your projects and the rapidly growing community.

 

Arduino Cloud

 

Screenshot_48

 

Arduino Cloud is fully integrated in the Arduino Create ecosystem, you will be able to generate a template code in Arduino Cloud and then edit and upload it to your board using the Arduino Web Editor.

 

PubNub

 

pubnub

 

The PubNub Data Stream Network provides global cloud infrastructure and key building blocks for real-time interactivity. PubNub also offers advanced features for enterprise level services such as a real-time dashboard to track all connected devices, EON a framework used to easily convert data into charts and graphs for easier analysis and also the ability to integrate easily into the Microsoft Azure enterprise solutions platform.

 

Circuits.io

 

Screenshot_50

 

Circuits.io tools bring you to make Breadboard Circuits that can be viewed as Schematic and PCB View as well. As a creator, most of your interests will be in the first and last options, though Circuit Scribe is interesting to check out if you’ve not heard of it until now.

Recently, Electronics lab is moved to tinker card.

 

Tinkercad is a simple, online 3D design and 3D printing app for everyone.

 

Screenshot_49

 

Tinkercad is used by designers, hobbyists, teachers, and kids, to make toys, prototypes, home decor, Minecraft models, jewelry – the list is truly endless!

 

GitHub

Screenshot_51

 

GitHub is a web-based Git or version control repository and Internet hosting service. It is mostly used for code. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management and More.

 

MIT App Inventor

 

Screenshot_52

 

App Inventor for Android is an open-source web application originally provided by Google and now maintained by the Massachusetts Institute of Technology (MIT).

It allows newcomers to computer programming to create software applications for the Android operating system (OS). It uses a graphical interface, very similar to Scratch and the StarLogo TNG user interface, which allows users to drag-and-drop visual objects to create an application that can run on Android devices. In creating App Inventor, Google drew upon significant prior research in educational computing, as well as work done within Google on online development environments. Using this tool you can create Android apps without any coding Knowledge. It will be more useful in creating Home Automation Projects.