Courtesy : C.L. Moffatt
What is Yeoman?
Yeoman is a scaffolding tool that helps you to kickstart new projects using best practices. It creates the project hierarchy & the basic files required for many projects using technology specific generators.
e.g. Yeoman provides a generator for angular project called as generator-angular
Node has to be installed to progress.
Steps to get started with Yeoman
1) Steps to setup dev env
Install yo & its dependencies using the below command
npm install –global yo bower grunt-cli
If you see issues related to permission please execute the command with sudo privileges.
2) Check if everything is installed properly. If everything is fine, the versions of yo, bower & grunt should be displayed
yo –-version && bower –-version && grunt –-version
3) Install a Yeoman Generator for Angular. Note that there are many generators which you can use yeoman for
sudo npm install -g generator-angular
4) Make a new directory (say demoYeoman)
5) Goto the newly created directory (demoYeoman in our case)
6) Hit the ‘yo’ command by selecting ‘Run the Angular Generator’. At this step yo will ask for configuring your project. Select the defaults.Yeoman will automatically scaffold your app along with the necessary dependencies
7) Check the project structure generated
8) Start the server. In mac, python is installed by default which provides a simple http server. Start that server using the below command
python -m SimpleHTTPServer 9999
9) Check your application. Run the below command
If any point you get errors related to karma, hit the following 2 commands-
sudo npm install grunt-karma –save-dev
npm install karma-phantomjs-launcher –save-dev
The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.
Here’s an excerpt:
The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 10,000 times in 2014. If it were a concert at Sydney Opera House, it would take about 4 sold-out performances for that many people to see it.
Removing Cygwin from your windows machine can become quite a task at times. Here is the 3 step process which I followed to uninstall Cygwin
On the Command prompt type following commands in order –
1) C:\>takeown /r /d y /f cygwin
Read this command properly; It is takeown & not takedown.
2) icacls cygwin /t /grant Everyone:F
3) rmdir /s /q cygwin
Apache Spark is a general purpose large scale clustering solution which claims to be faster than Hadoop & other HDFS implementations. More theory on Spark can be accessed on the internet.
Here I will focus only on the Installation steps of Apache Spark on Windows
You need JDK1.6+ to proceed with the steps below or in PDF
Step 1: Download & Untar SPARK
Download the version 1.0.2 of Spark from the official website.
Untar the downloaded file to any location (say C:\spark-1.0.2)
Step 2: Download SBT msi (needed for Windows)
Download sbt.MSI & execute it.
You may need to restart the machine so that command line can identify the sbt command
Step 3: Package Spark using SBT
Note: This step takes enormous amount of time. Please be patient
Step 4: Download SCALA
Spark 1.0.2 needs Scala 2.10. This is extremely important to note. And you can read the README.MD file in the SPARK folder to find the correct scala version needed for your spark.
Download and unzip the scala to any location (say C:\ scala-2.10.1)
Set SCALA_HOME environment variable & set the PATH variable to the bin directory of scala
Verify the scala version (and thus the download)
Step 5: Start the spark shell
Sample program in SPARK
- Create a data set of 1…10000 integers
scala> val data = 1 to 10000
- Use Spark Context to create an RDD [Resilient Distributed Dateset] from that data
scala> val distData = sc.parallelize(data)
- Perform a filter mechanism on that data
scala> distData.filter(_ < 10).collect()
Recently India’s finance budget 2014 was presented by the Finance Minister. I took the transcipt of the speech from the budget website of Indian government & plotted a bubble chart of top 50 words spoken (of course minus the stop words like I, is, was, them, etc).
Some observations –
1) Government was the top spoken word. It was spoken 71 times (71x)
2) Tax (70x) & Taxes (18x) [Not surprising]
3) Development – 53x
Infrastructure – 33x
Growth – 31x
Investment – 28x
Banks – 24x
Economy – 23x
Coal – 21x
Agriculture – 20x
Manufacture – 18x