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.

 

Posted on

5 Best IDE for Python Programmers

An integrated development environment (IDE) is a software suite that consolidates the basic tools developers need to write and test software. Typically, an IDE contains a code editor, a compiler or interpreter and a debugger that the developer accesses through a single graphical user interface (GUI). An IDE may be a standalone application, or it may be included as part of one or more existing and compatible applications. In this article we will know about the 5 best IDE (according to me) for Python Developers

1. VIM

VIM is one of the most advanced text editors and is very popular one among the community of Python developers. It is open source and available free of cost under GPL license. Vim though is best known as an editor but it offers nothing less than a full featured Python development environment when configured correctly for Python development. VIM is light weight, modular and fast and is best suited for programmers who love keyboards and only keyboards, no mouse use while coding.

 


2. Sublime Text 3 / Anaconda Python IDE

Sublime Text 3 is one of the most powerful cross platform lightweight code editors till date. With the use of plugins Sublime Text 3 can be used as a full featured IDE – the Sublime Python IDE. You get elegance of sublime text and powers of Python at one place to create your own magic. The most powerful transformation is brought to you by Anaconda package which provides code completion and linting for Python.

3. Pydev with Eclipse – Best Python IDE (Free Tier)

Pydev is the Python IDE for masses for the simple reason that it is free of cost and comes packed with powerful features for efficient Python programming. It is an open source plugin that runs on top of Eclipse and brings Python to the kingdom of Eclipse. If you are an existing Eclipse user then Pydev is just home for you, if not, then Eclipse might sound intimidating in the beginning but worth the efforts.

4. Emacs – Python Editor cum IDE

Emacs has an ecosystem of its own. It is the GNU text editor which is extensible and highly customizable. When it comes to Python programming, Emacs can be configured in such a way that it gets transformed into a fully functional free Python IDE.

5. Spyder Python

Spyder Python is an open source IDE for Python, best suited for scientific python development. It is a lightweight software, written in Python itself and available as free to use under MIT license. Some of the basic features of Spyder python are multi language editor, interactive console, documentation viewer, variable explorer, Find in files, files explorer etc. It can get Spyder IDE package for windows, Mac or Linux.

 

 

Posted on

Top 5 nodeJs framework for Developers

Node.js is one of the more groundbreaking additions to the web development landscape, offering an environment that enables full-stack JavaScript applications for the first time ever. Prior to Node.js, JavaScript was limited to client-side scripting, but Node transformed the script into a cross-over language, capable of writing software that’s portable between the front and back ends.

JavaScript brought its speed and cross-platform compatibility to back-end development, along with its devoted community of JavaScript programmers. In its 2015 developer survey, Stack Overflow found that JavaScript was the most popular programming language—even among back-end developers. This soaring popularity, along with Node’s expansion into an entire development ecosystem, has fueled the creation of numerous Node.js frameworks that both extend and add to Node.js’s existing features.

Node.js_logo

Let us look at the Node.js framework list representing most powerful and feature rich frameworks available today that help you build real time and scalable web applications with ease.

Express.js

Express.js a lightweight, efficient middleware and routing framework. Express.js is best known as another quarter of the MEAN (MongoDB, Express, AngularJS and Node) stack, and is the most popular Node.js framework. Because Node.js itself wasn’t intended to build websites, the Express framework is able to create an HTTP server in Node, layering in the middleware structure and response/request functions needed to actually run a site. It’s a pretty minimalist framework that’s great for giving developers extra, built-in web application features and the Express API without overriding the already robust, feature-packed Node.js platform. Note that it does require a bit more manual tasks, which can be tedious and time consuming, and has a bit larger footprint than other frameworks.

Socket.io

Socket.io is all about real-time communication and chat apps—the kind of software that hinges on robust event-driven, bidirectional communication between browsers and servers. It’s a websocket-compatible server that’s great at providing collaborative features and real-time analytics, whether they’re in the form of a counter or more in-depth metrics. Socket.io is compatible with every device, operating system, and browser. It’s been used by top tech companies like Trello, Zendesk, Microsoft, and Yammer, as well as Flightcar, a startup that lets people rent out their cars from the airport while they’re traveling.

Hapi.js

Need more enterprise-level functionality? Working with distributed engineering teams? Hapi.js may be the best route for you. Hapi.js was created by developers at Walmart in preparation for Black Friday traffic as an answer to limitations they’d run into with Express—mainly extensibility and maintainability issues. They found that, as the application grew, Express code was more difficult to split into chunks and delegate to different teams. Hapi’s plug-in system enables it to be worked on in sections without breaking the rest of the code base.

Right out of the box, Hapi does a lot more than Express. While there are similarities and differences between the two frameworks, Hapi—which is primarily used for rapidly building and testing application programming interfaces (APIs)—generally enables developers to focus more on writing reusable application logic instead of spending time building infrastructure. It supports API development with an array of plug-ins from authorization and authentication to metrics and logging. It’s been used by heavy-hitters like OpenTable, Macy’s, Condé Nast, and Disney.

Mean.io

Mean.js and Mean.io are frameworks written by the same author with subtle differences. Mean.io was developed first, so it has a bit more documentation and a larger community behind it. It’s based on Node modules, with client- and server-side files in separate modules. Mean.js uses an MVC-style Express/Node back end and an AngularJS-based front end. It also leverages the Grunt tool to enable automated testing.

Mojito

Mojito is an MVC framework based on Yahoo! Cocktails, a JavaScript-based mobile development platform built by developers in house at Yahoo!. Mojito acts like a module that layers very well with other core Node modules, while implementing Cocktails’ on-line/off-line, multi-device, hosted application platform.

 

Posted on

Use Python to get more than 0.75 accuracy in Titanic problem by Kaggle

Ship_image
The sinking of the RMS Titanic is one of the most infamous shipwrecks in history. On April 15, 1912, during her maiden voyage, the Titanic sank after colliding with an iceberg, killing 1502 out of 2224 passengers and crew. This sensational tragedy shocked the international community and led to better safety regulations for ships. One of the reasons that the shipwreck led to such loss of life was that there were not enough lifeboats for the passengers and crew. Although there was some element of luck involved in surviving the sinking, some groups of people were more likely to survive than others, such as women, children, and the upper-class.

The problem statement was to complete the analysis of what sorts of people were likely to survive and apply the machine learning tools to predict which passengers survived the tragedy. The Kaggle Titanic problem page can be found here. The full solution in python can be found here on github. The data in the problem is given in two CSV files, test.csv and train.csv. The variable used in the data and their description are as follows

Variable Name Definition
survival If an individual survived the tragedy or not
pclass Ticket class
Name Name of the individual
sex Sex
Age Age in years
sibsp # of siblings/spouses aboard the Titanic
parch # of parents/children aboard the Titanic
ticket Ticket Number
fare Passenger fare
cabin Cabin Number
embarked Port of Embarkation

The target variable here is Survived which takes the value 0 or 1. Since the target value takes the binary values we can say that the this is an example of classification problem. We have to train the model using train.csv and predict the outcomes using test.csv and submit the predictions on kaggle. At first we will read the data from CSV file using the pandas library in python, for that we have to import pandas library. The data is loaded in pandas dataframe format. We can see how the data looks like using dataframe.head() command. We can also see the columns using dataframe.columns command. We can check the number of rows and columns of the dataframe using the dataframe.shape command.

import pandas as pd
dataframe=pd.read_csv('train.csv')
print(dataframe.head(10))
print(dataframe.columns)
print(dataframe.shape)

The ‘Name’ variable present here contains the full name of the person. In this format the ‘Name’ variable is not useful for us as almost all the entries here will be unique and that would not help in our prediction. We can make this useful by trimming and partitioning the string to get the title and first name of the individual.

dataframe['Name']=dataframe['Name'].str.partition(',')[2]
dataframe['Name']=dataframe['Name'].str.partition(',')[0]

We can check the values taken by a variable by values_count() function. We can also check whether a variable contains NaN(Not a Number) values or not. After checking value_counts for age variable we found out that the age variable contained NaN values. We can wither drop the NaN values using dropna() function or we can impute the values. In this example we will impute the missing values using MICE(Multiple Imputation by Chained Equations). To use MICE function we have to import a python library called ‘fancyimpute’. Mice uses the other variables to impute the missing values and iterate it till the value converges such that our imputed value balances the bias and variance of that variable.

print(dataframe['Age'].value_counts(dropna=False)
from fancyimpute import MICE
solver=MICE()
Imputed_dataframe=solver.complete(dataframe.values)

Since this is a classification problem we can solve it by methods such as Logistic Regression, Decision Tree, Random Forest etc. Here we will use Random Forest to solve this problem. Variables present here are categorical and continuous. Some of the categorical variables are in the string format. So we have to first change that in the integer categorical format so that we can feed the data directly for our model to learn. We can use factorize function from pandas library to do this.

cols=['Name','Ticket','Pclass','Fare','Embarked','Cabin']
for x in cols:
    a=pd.factorize(dataframe[x])
    dataframe[x]=a[0]

We can create an addition variable named ‘family_size’ using the variables ‘parch’ and ‘sibsp’. Now our data is ready and we can train our model using the data. We will first divide the data into target variables and and features as Y and X. We will train the model using X and Y.

dataframe['family_size']=dataframe['SibSp'] + dataframe['Parch'] + 1
y=dataframe[['Survived']].values
x=dataframe.values
import numpy as np
x=np.delete(dataframe,0,axis=1)
model=RandomForestClassifier(n_estimators=100,criterion='gini',max_depth=10,min_samples_split=10)
model=model.fit(x,y)

Now our model has been trained. We can use this model to predict whether a person survived the tragedy or not. Now we will read the test.csv file and use the variables present as test features for prediction.

test=pd.read_csv('test.csv')
test['Name']=test['Name'].str.partition(',')[2]
test['Name']=test['Name'].str.partition('.')[0]
cols=['Name','Ticket','Pclass','Fare','Embarked','Cabin']
for x in cols:
    a=pd.factorize(test[x])
    test[x]=a[0]
test_features=test.values
my_prediction = model.predict(test_features)

Now we have our predictions in ‘my_prediction’ variable. Now we are ready to submit the solution to kaggle. For kaggle submission a specific format is given for problems. We will write our solution in a CSV file in suitable format which we can submit at kaggle.

PassengerId =np.array(test["PassengerId"]).astype(int)
my_solution = pd.DataFrame(my_prediction, PassengerId, columns = ["Survived"])
my_solution.to_csv("my_solution.csv", index_label = ["PassengerId"])

Now we have our solution in a CSV file ‘my_solution.csv’. We can submit this file on to kaggle submission page and check our accuracy.

 

 

Posted on

Node-RED for Internet of Things

Node RED

Node-RED is a programming tool developed by IBM for wiring together hardware devices, APIs and online services in new and interesting ways.

It is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network on low-cost hardware such as the Raspberry Pi as well as in the cloud.

It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click.
Features

  • Browser-based flow editing
  • Built on Node.js
  • Social Development

Node-RED Comes along with the Bluemix IOT Starter Application. Adding IoT Foundation Service with Bluemix allows to use Node-RED. You can use the incoming and outgoing MQTT nodes in your flows. Most of them use Node-RED to define flows where either incoming sensor data from ‘things’ is handled, e.g. stored in databases, or where commands are sent to devices.

GitHub Link: https://github.com/node-red/node-red