Showing posts with label basics. Show all posts
Showing posts with label basics. Show all posts

Monday, 19 June 2017

Big Data and Hadoop - Introduction

What is Big Data?

The process of storing and analysing data to make some sense for the organization is called Big data. In simple terms, data which is very large in size and yet growing exponentially with time is called as Big data. 

Why we need Big Data?

For any application that contains limited amount of data we normally use Sql/Postgresql/Oracle/MySQL, but what in case of large applications like Facebook,Google,Youtube? This data is so large and complex that none of the traditional data management system is able to store and process it. 

Facebook generates 500+ TB data per day as people upload various images, videos, posts etc. Similarly sending text/multimedia messages, updating Facebook/WhatsApp status, comments etc. generates huge data. If we use traditional data processing applications (SQL/Oracle/MySQL) to handle it, it will lead to loss of efficiency. So in order to handle exponential growth of data, data analysis becomes a required task. To overcome this problem, we use Big data. Big data includes both structured and unstructured data. 
Traditional data management systems and existing tools are facing difficulties to process such a big data. R is one of the main computing tool used in statistical education and research. It is also widely used for data analysis and numerical computing in scientific research.

Where does Big Data come from?

1.Social data : This could be data coming from social media services such as Facebook Likes, photos and videos uploads, putting comments, Tweets and YouTube views.
2.Share Market: Stock exchange generates huge amount of data through its daily transaction.
3.E-commerce site: E-commerce Sites like Flipkart,Amazon,Snapdeal generates huge amount of data.
4.Airplane: Single airplane can generate 10+ TB of data in 30 minutes of a flight time. 

What is the need for storing such huge amount of data?

The main reason behind storing data is analysis. Data analysis is a process used to clean, transform and remodel data with a view to reach to a certain conclusion for a given situation. More accurate analyses leads to better decision making and better decision making leads to increase in efficiency and risk reduction.

Example-
1. When we search anything on e-commerce websites(Flipkart,Amazon), we get some recommendations of product that we search. The analysis of data that we entered is done by these websites, then accordingly the related products are displayed.
Example - When we search any smart phone, we get recommendations to buy back covers,screen guard etc.

2. Similarly, why facebook stores our images,videos? The reason is advertisement.
There are two types of marketing-
a) Global marketing - Show advertisement to all users.
b) Target marketing - Show advertisement to particular groups/people. So in target marketing, facebook analyses it's data and it shows advertisements to selected people. 
Exm - If advertiser wants to advertise for cricket kit and he/she wants to show that advertisement to only interested set of people so facebook tracks a record of all those people who are member of cricket groups or post anything related to cricket and displays it to them.

Saturday, 25 June 2016

PowerShell Basics for Dummies - ConvertTo-Html

PowerShell Basics for Dummies - ConvertTo-Html


ConvertTo-Html:

  • Converts Microsoft .NET Framework objects into HTML that can be displayed in a Web browser.
  • The ConvertTo-Html cmdlet converts .NET Framework objects into HTML that can be displayed in a Web browser. You can use this cmdlet to display the output of a command in a Web page.
  • You can use the parameters of ConvertTo-Html to select object properties, to specify a table or list format, to specify the HTML page title, to add text before and after the object, and to return only the table or list fragment, instead of a strict DTD page.
  • When you submit multiple objects to ConvertTo-Html, Windows PowerShell creates the table (or list) based on the properties of the first object that you submit. If the remaining objects do not have one of the specified properties, the property value of that object is an empty cell. If the remaining objects have additional properties, those property values are not included in the file.

Get-EventLog -LogName "Windows PowerShell" | ConvertTo-Html > PSEventlog.htm

  • The command sends the HTML code to the PSEventlog.htm file.

PowerShell Basics for Dummies - Get-Service

PowerShell Basics for Dummies - Get-Service


Get-Service:

  • Gets the services running on the specified computers. The default is the local computer.

 Get-Service -ComputerName "Server1"

  • This command gets the services on the "Server1" remote computer.

  • Because the ComputerName parameter of Get-Service does not use Windows PowerShell remoting, you can use this parameter even if the computer is not configured for remoting in Windows PowerShell.


Get-Service "wmi*"

  • This command retrieves services with service names that begin with WMI

Powershell Basics for Dummies - Get-ExecutionPolicy

Powershell Basics for Dummies - Get-ExecutionPolicy

Get-ExecutionPolicy

  • If you'll need to know what execution policy is in use before you attempt to run a script. You can find out by using the Get-ExecutionPolicy command.
  • This will show the current status of Execution policy.
Get-ExecutionPolicy

Four levels of security exist:

  • Restricted — Restricted is the default execution policy and locks PowerShell down so that commands can be entered only interactively. PowerShell scripts are not allowed to run.
  • All Signed — If the execution policy is set to All Signed then scripts will be allowed to run, but only if they are signed by a trusted publisher.
  • Remote Signed — If the execution policy is set to Remote Signed, any PowerShell scripts that have been locally created will be allowed to run. Scripts created remotely are allowed to run only if they are signed by a trusted publisher.
  • Unrestricted — As the name implies, Unrestricted removes all restrictions from the execution policy.

Powershell Basics for Dummies - Set-ExecutionPolicy

Powershell Basics for Dummies - Set-ExecutionPolicy

Set-ExecutionPolicy

  • By Default Microsoft has disabled scripting  in an effort to prevent malicious code from executing in a PowerShell environment. 
  • You should use Set-ExecutionPolicy command to control the level of security surrounding PowerShell scripts. 

Four levels of security exist:

  • 1. Restricted — Restricted is the default execution policy and locks PowerShell down, so that commands can be entered only interactively. PowerShell scripts are not allowed to run.
  • 2. All Signed — If the execution policy is set to All Signed then scripts will be allowed to run, but only if they are signed by a trusted publisher like Microsft etc.
  • 3.Remote Signed — If the execution policy is set to Remote Signed, any PowerShell scripts that have been locally created will be allowed to run. Scripts created remotely are allowed to run only if they are signed by a trusted publisher like Microsoft.
  • 4. Unrestricted — Unrestricted removes all restrictions from the execution policy.

You can set an execution policy by entering the Set-ExecutionPolicy command followed by the name of the policy. For example, if you wanted to allow scripts to run in an All Signed manner you could type:

Set-ExecutionPolicy All Signed

Powershell Get-Help Command Usages and uses- Powershell Basics

Powershell Get-Help Command Usages and uses


Get-Help:

  • The Help Command in PowerShell cmdlet . You can use this command to get help with any other command. For example, if you want to know how the Get-Service command works, you can type:

Get-Help -Name Get-Service
and Windows will display the full command syntax.

  • You can also use Get-Help with individual nouns and verbs. For example, to find out all the commands you can use with the Get verb, type:

Get-Help -Name Get-*

Saturday, 8 November 2014

How to Check if Powershell is installed on your Computer?

How to Check if Powershell is installed on your Computer?


  • To check if Powershell is installed on your Computer
  • Go to C: Drive and  Click on "Windows" Folder
  • Now click on Sytem32 folder then Click on "WindowsPowerShell" Folder
  • Now depending on the Version of Powershell installed You will se it as v1.0 or v2.0 or v3.0. This tell you what version of Powershell is installed.
  • Now in our case is v1.0. Click on v1.0 folder.
  • You will see a "Powershell.exe". This confirms that Powershell is installed on your system.