Skip to main content

Posts

Machine Learning Linear Regression

Machine Learning Linear Regression In this post, we will learn Machine Learning Techniques Linear Regression using  in Python. Requirement For this tutorial, following library  should be installed in your system. Pandas Quandl numpy sklearn Linear Regression: Taking continuous data and fitting a best possible function in it. References : Linear Regression Regression identifying data-set and importing it and making it into useful format. Code snippet used in video: import pandas as pd import quandl import math df=quandl.get('WIKI/GOOGL') df=df[['Adj. Open', 'Adj. High', 'Adj. Low', 'Adj. Close', 'Adj. Volume']] df['HL_PCT']=(df['Adj. High']-df['Adj. Close'])/df['Adj. Close']*100.00 df['PCT_Change']=(df['Adj. Close']-df['Adj. Open'])/df['Adj. Open']*100.00 df=df[['Adj. Close','HL_PCT',...

Install Ubuntu as Dual Boot in Windows

Install Dual Boot Windows In this post, we will be installing Ubuntu as dual boot in windows Operating System and subsequently Python.  References  Install Dual Boot in Windows Operating System. YouTube Video  Install Python on Ubuntu Install Python Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Introduction to Sensu

Introduction to Sensu Sensu is a monitoring framework. Sensu Server The Sensu server schedules and publishes check execution requests to client subscriptions (via a Publish/Subscribe model), and provides a scalable event processing platform for processing check results and monitoring events. Sensu Clients  Sensu clients are monitoring agents, which are installed and run on every system (e.g. server, container, etc) that needs to be monitored. The client is responsible for registering the system with Sensu. Sensu check Sensu checks are commands executed by the Sensu client which monitor a condition (e.g. is Nginx running?) or collect measurements (e.g. how much disk space do I have left?). Sensu named aggregate Sensu named aggregates are collections of check results. Sensu events A Sensu Event is created every time a check result is processed by the Sensu server. Sensu Silencing Silencing is used to prevent handlers from being triggered based on the check ...

Install PyCharm

Install PyCharm In this tutorial we will learn how to install  PyCharm  on Ubuntu. Download WebStorm Download PyCharm from official site  https://www.jetbrains.com/pycharm/download/#section=linux Extract PyCharm Navigate terminal to the downloaded folder and run following command. tar -xvzf <downloaded-file-name> Navigate to the <PyCharm-version/bin> and following command ./pycharm.sh Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Install WebStorm

Install WebStorm In this tutorial we will learn how to install WebStorm on Ubuntu. Download WebStorm Download WebStorm from official site  https://www.jetbrains.com/webstorm/ Extract WebStorm Navigate terminal to the downloaded folder and run following command. tar -xvzf <downloaded-file-name> Navigate to the <WebStorm-version/bin> and following command ./webstorm.sh Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Node.js Events

Node.js Events Every action on a computer is an event. Node.js object can fire an event like readStream object fires events when opening and closing a file. var fs = require('fs'); var rs = fs.createReadStream('./demo.txt'); rs.on('open', function () { console.log('The file is open'); }); Events Module Node.js has a built-in module, called "Events", where you can create-, fire-, and listen for- your own events. All event properties and methods of event module are an instance of an EventEmitter object. EventEmitter Object var events = require('events'); var eventEmitter = new events.EventEmitter(); //Create an event handler: var myEventHandler = function () { console.log('I hear a scream!'); } //Assign the event handler to an event: eventEmitter.on('scream', myEventHandler); //Fire the 'scream' event: eventEmitter.emit('scream'); ...

Node.js URL Module

Node.js URL Module In Node.js  URL module used splits up a web address into readable parts. Include Node.js URL Module var url = require('url'); Parse an address with url.parse() function. Example var url = require('url'); var adr = 'http://localhost:8080/home.htm?year=2019&month=january'; var q = url.parse(adr, true); console.log(q.host); //returns 'localhost:8080' console.log(q.pathname); //returns '/home.htm' console.log(q.search); //returns '?year=2019&month=january' var qdata = q.query; //returns an object: { year: 2019, month: 'january' } console.log(qdata. january); //returns 'january' Node.js File Server Create two file named home.html and contact.html home.html <!DOCTYPE html> <html> <body> <h1>Rozgardesh</h1> <p>Education for everyone</p> </body> </html> contact.html ...

Number system

Number system (Basic) 1. Addition : The mother of all calculation. Performing addition is no big deal for anyone but doing it at a pace of 5 to 10 times faster, which is required in competitive exams like CAT is surely a heck of work.  Following method also called as number-line method discussed below enables doing addition without carry-over and with proper practice increases addition capacity multi folds. Suppose we have to add 78 and 86,  #How to progress? Start with addition of two 2 digit numbers, then try adding multiple 2 digit number and finally multiple digits numbers.  2. Subtraction : As subtraction is extension of addition, the trick is just an extension of method discussed above. Suppose we have to subtract 38 from 72, treat it as what we have to add to 38 to get 72. Again number line system comes to rescue.                First we find the number which have to be added to 38 toe...

Node.js Send Email

Node.js Send Email Node.js Nodemailer Module The Nodemailer module allowed you to send an email. Download and Install Nodemailer npm install nodemailer Import nodemailer module npm install upper-case Send an Email var nodemailer = require('nodemailer'); var transporter = nodemailer.createTransport({ service: 'gmail', auth: { user: 'youremail@gmail.com', pass: 'yourpassword' } }); var mailOptions = { from: 'youremail@gmail.com', to: 'myfriend@yahoo.com', subject: 'Sending Email using Node.js', text: 'That was easy!' }; transporter.sendMail(mailOptions, function(error, info){ if (error) { console.log(error); } else { console.log('Email sent: ' + info.response); } }); Please write comments if you find anything incorrect, or you want to share more information about the topic disc...