Dead Heroes make great T Shirts

Some of my heroes whom I wear on my T Shirts

1 Kurt Cobain – marrying the wrong woman can lead to a hole in your head

2 John Lennon – marrying the wrong woman can break up your band no matter how big. Imagine.

3 Bob Marley – Too many Drugs will kill you everytime

4 Freddy Mercury – Too much love will kill you everytime

5 Gandhi – Peace and Non Violence. Forever

6 Steve Jobs – I can be a jerk and get way with it if I am an iGenius

7 Jesus Christ –  Even Jesus can get angry

Jesus entered the temple courts and drove out all who were buying and selling there. He overturned the tables of the money changers

Data Science to kill and Data science to sell

My computer science professor at University of Tennesse tried to teach me genetic algorithms. I managed to score an A thanks to the brilliance of my team member who created a genetic algorithm using C. For some reason the loveable professor had something against C ++. Real men talk to the metal using C.

Anyways the professor had this theory to say about computer science. He said computer science had two principal sources of revenue.  One is increase kill ratio. The other is to make people sing your tune.

Department of Defense consumes the maximum revenue a nation produces globally across most nations and it funds the maximum data science atleast in the USA.  Making people click you ad is the other source that data science gets funded for. Apparently there is history involved here.  The Italian navy funded Galileo’s telescope ( but stood aside when the Pope disagreed). DARPA funded the internet. Insert here- standard joke on Al Gore inventing the internet.

Principal sources of data for this signal intelligence (sigint) fueled data science comes from telecom, websites and sensors. Principal sources of analysis is actually a huge amount of reports (written on conversations with humint) that are better of  mathematically text mined but are in practice dissected one by one.

Real intelligence begins when no guns are fired. The cold war on the internet is a real threat to free internet and cyberwar is just a way to combine kill ratios for servers to data sourced from ads.

In the meantime, I prefer the maths of Good Will Hunting than the maths of Patriot Games. I prefer the music of Bourne again.

 

 

Terrorists Robots and Data Scientists

Will Smith stars in

The rules for Robots from “Handbook of Robotics, 56th Edition, 2058 A.D.”, are:

  1. A robot may not injure a human being or, through inaction, allow a human being to come to harm.
  2. A robot must obey the orders given it by human beings except where such orders would conflict with the First Law.
  3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Laws

0. A robot may not harm humanity, or, by inaction, allow humanity to come to harm.

The zeroth law is why democratic governments kill terrorists using all means possible. One dead terrorist  is better than many innocents killed.

to be continued

Java by Code Academy

I love the Java by Code Academy course, even though it is very new and quite possibly one of the first of many Java courses that hopefully appear on this beloved website. I crossed 800 points today on CodeAcademy.

https://www.codecademy.com/courses/learn-java

Summaries  from Code Academy on Java- these are sourced by the nifty help provided and are cited to Code Academy ( how does one cite it!)

Java is an object-oriented programming (OOP) language, the coder can design classes, objects, and methods that can perform certain actions. These behaviours are important in the construction of larger, more powerful Java programmes. Java is a programming language designed to build secure, powerful applications that run across multiple operating systems. The Java language is known to be flexible, scalable, and maintainable.

 

  • Data Types are int, boolean, and char.
  • Variables are used to store values.
  • Whitespace helps make code easy to read for you and others.
  • Comments describe code and its purpose.
  • Arithmetic Operators include +, -, *,/, and %.
  • Relational Operators include <, <=, >, and >=.
  • Equality Operators include == and !=.

 

 

Control flow allows Java programs to execute code blocks depending on Boolean expressions.

  • Boolean Operators: &&, ||, and ! are used to build Boolean expressions and have a defined order of operations
  • Statements: if, if/else, andif/else if/else statements are used to conditionally execute blocks of code
  • Ternary Conditional: a shortened version of an if/else statement that returns a value based on the value of a Boolean expression
  • Switch: allows us to check equality of a variable or expression with a value that does not need to be a Boolean

	

Ajay Ohri interviews Dr Bradley Jones for StatisticsViews.com

I had the good fortune and privilege to interview a  genuine statistical hero, Dr Bradley Jones

http://www.statisticsviews.com/details/feature/8510051/For-me-the-fun-of-working-with-scientists-and-engineers-is-helping-them-generate.html

He holds a patent on the use of DOE for minimizing registration errors in the manufacture of laminated circuit boards and is the inventor of the prediction profile plot for interactive exploration of multiple input and output response surfaces. In both 2009 and 2011, he received the American Society for Quality’s Brumbaugh Award for the paper making the largest contribution to industrial quality control. He also won the 2010 Lloyd S. Nelson Award for the article having the greatest immediate impact to practitioners. Jones is the Editor-in-Chief of the Journal of Quality Technology, a Fellow of the ASA and co-author of the award winning Optimal Design of Experiments with Peter Goos.

Typically, DOE is taught by rote using pre-packaged designs. This makes it hard for an engineer to see the practical applicability of DOE. In addition, most DOE texts devote most of their pages to analysis rather than the core principles of design. Students do not learn how to evaluate and compare prospective designs for their appropriateness to a specific problem. The textbooks (and professors) need to catch up with the software.

You can read the complete article at http://www.statisticsviews.com/details/feature/8510051/For-me-the-fun-of-working-with-scientists-and-engineers-is-helping-them-generate.html

Famous in X but Failure in Y

Some of my friends on the internet and in real life love food. Note the distinction between internet friends and real life friends. There is more to genuine long lasting relationships than exchange of engaging bits bytes and moving your mouse on icons to say I love this, I plus one that, I really adore it.

Well my friends and I, we love food. Some of us , in fact most of us eat food. Some of us click pictures and share in on the anti-social media. Anti-social because it is anti-real life socializing. A few of us cook food. One or two write recipes. Occasionally one of us tries to make food his business by floating the idea of opening a restaurant. This is despite the fact that just eating food is ahem easy and running a restaurant  business  is inherently risky.

Making your passion into a business is a dream and privilege that is offered to very few of us.  Athletes, technology startup founders, Drug Lords.

Occasionally one may be a success in one line of the business. Someone who loves food can write good books, but will you exchange your mom’s apple pie for that telegenic chef. Someone who writes good books on food can automatically run a very good restaurant. No. Good in books doesnot mean good in business in the same thing.

Genius doesnt travel. IF you are reading this, probability says you are not a genius anyway.

 

 

Twitter Analysis Redefined

Because code keeps changing on Twitter


#dev.twitter.com and apps.twitter.com to generate these tokens
#install.packages("twitteR")
#install.packages("ROAuth")
#PACKAGES
library(twitteR)
library(ROAuth)
#ACCESS URLS
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "https://api.twitter.com/oauth/authorize"

#ACCESS KEYS
consumerKey <- "4LEjfrnbzMQvxpJzRKnx6v0JM"
consumerSecret <- "aCsJA6jEHhpqFioKmxwtu9BzMm0TnOFQyZv6mgCUo1j82PzRIn"
access_token="3232641518-IFIlyB5oJ7QbFXT3arO218BWbycGMA6q5NO1b7k"
access_secret='XPfpH3l6QjCnRxpZwHtMbRMqnwmhmxlZqFZxnxgEg35K4'

#HANDSHAKE
setup_twitter_oauth(consumerKey,
consumerSecret,
access_token="3232641518-IFIlyB5oJ7QbFXT3arO218BWbycGMA6q5NO1b7k",
access_secret='XPfpH3l6QjCnRxpZwHtMbRMqnwmhmxlZqFZxnxgEg35K4')

a=searchTwitter("delhi", n=2000)
tweets_dfa = twListToDF(a)
tweets_dfa
b=searchTwitter("mumbai", n=200)
tweets_dfb = twListToDF(b)
c=searchTwitter("bangalore", n=200)
tweets_dfc = twListToDF(c)
tweets=rbind(tweets_dfa,tweets_dfb,tweets_dfc)
#tweets
write.csv(tweets,file="tweets.csv")
head(tweets)
library(tm)
library(wordcloud)
b=Corpus(VectorSource(tweets$text), readerControl = list(language = "eng"))
b=tm_map(b, PlainTextDocument)
inspect(b)
b<- tm_map(b, content_transformer(tolower))
#Changes case to lower case
b<- tm_map(b, stripWhitespace) #Strips White Space
b <- tm_map(b, removePunctuation) #Removes Punctuation
inspect(b)
tdm <- TermDocumentMatrix(b)
m1 <- as.matrix(tdm)
v1<- sort(rowSums(m1),decreasing=TRUE)
d130,]
wordcloud(d2$word,d2$freq,colors =brewer.pal(7,"Set1"))

Rplot