PYTHON FOR R USERS : ; Come September

I am writing a new book on a new language for me (python) for a new publisher ( Wiley)

 

This book is the first of its kind to provide a reference that enables students and practitioners to easily learn to code in Python if they are familiar with R and vice versa, even if they are beginners in the second language. It also provides a detailed introduction and overview of each language to the reader who might be unfamiliar with the other. While R has better statistical and graphical tools, Python has good machine learning tools and proves to be more useful software for the analysis of Big Data. A unique feature of this book is how it provides a command-by-command translation between R and Python for many mathematical, visualization and machine learning techniques. The intended audience is statistical practitioners and data scientists trying to learn one of R or Python or both, as well as students that are familiar with one of the languages.

http://www.amazon.co.uk/Python-R-Users-Ajay-Ohri/dp/1119126762

 

Coming to Bay Area in April

Despite my visa blues ( see more at https://todayilearnedinamerica.wordpress.com/2016/02/15/night-13-make-epic-shit/ ) I am still hanging on and traveling on in the United States of America. I might have posted some blog posts here by mistake but I corrected that today since I am traveling by an Amtrac pass and I dont have wifi there.

I am also going to TWO of the best conferences I have never attended despite being a blog Partner since past three years.

Predictive Analytics World San Francisco – April 3-7, 2016http://www.predictiveanalyticsworld.com/sanfrancisco/2016/

pawsf16_blog
Predictive Analytics World for Workforce – April 3-6, 2016http://www.predictiveanalyticsworld.com/workforce/2016/

Do you want to go to San Fransisco for this conference ?

MAGIC CODE TO USE- You can get a 15% off the price of registration for 2 Day and Combo passes:    AJAYBP16

pawwf16_blog

Secured Communication for Hacker Activists and Liberals

Does the NSA track Git requests. I mean can’t the terrorists just be talking to each other by Visual Cryptography of Arabic through Git Repo requests.

Basically increase the cost of decryption.

vispixel

This is Visual Cryptography. Now Imagine using a one time pad codebook of just emojis and talking through mobile and Kik.

Etherpad is a highly customizable Open Source online editor providing collaborative editing in really real-time

Think of it as Kik for laptops.

06kik-ss1-blog427-v206kik-ss2-blog427-v2

Unfortunately NSA killed Waste Again

What is “WASTE again”?

“WASTE again” enables you to create a decentralized and secure private mesh network using an unsecure network, such as the internet. Once the public encryption keys are exchanged, sending messages, creating groupchats and transferring files is easy and secure.

Creating a mesh

To create a mesh you need at least two computers with “WASTE again” installed. During installation, a unique pair of public and private keys for each computer is being generated. Before the first connection can be established, you need to exchange these public keys. These keys enable “WASTE again” to authenticate every connection to other “WASTE again” clients.

After exchanging the keys, you simply type in the computers IP address to connect to. If that computer is located behind a firewall or a NAT-router, you have to create a portmap first to enable incoming connections.

At least one computer in your mesh has to be able to accept incoming connections, making it a “public node”. If no direct connection between two firewalled computers can be made, “WASTE again” automatically routes your traffic through one or more of the available public nodes.

Every new node simply has to exchange keys with one of the connected nodes and then connect to it. All the other nodes will exchange their keys automatically over the mesh.

Google Drive safety for government as well as corporate espionage.

Post Snowden- we know that that company cofounded by a Russian Jewish immigrant went back on those very core values and helped create a benign version of the KGB. So you run away from Russia because hey the State is monitoring everything and then you refuse to stop your company from helping the new country’s government to do exactly the same. Google’s post snowden loss of credibility should make businesses think whether Microsoft Exchange servers are more secure than Google’s. Atleast Microsoft offers no – Dont be Evil Hypocricy”

Chinese hackers  are just a Google bogey. Pakistani Intelligence ISI helping ISIS with ideas and consulting is what is the real threat. Too bad, we were too busy creating algorithms to click more ads.

The TOR- ONION Project is more like the ONION comedy thanks to its proliferation of NSA nodes.

 

The Tree of Liberty needs to be watered with the blood of patriotic cryptographers not accepting easy money but staying true to the ideals of a public free from espionage from Government with the fourth amendment rights secured digitally as well.

Lost in New York : A R Writer uses code to analyze

I was in New York for past two days. New York is very pretty, very cold and the trains are very confusing. So I ended up walking and going back and forth.

Later on, when I reached home, heat, food, bed and jet lag, I decided to analyze where and what did I see in the visual ephiphany tour.

This was my route

Screenshot from 2016-02-10 06:13:03

This was my R code

library(jsonlite)
a=fromJSON("/home/ajay/Desktop/Takeout/Location History/LocationHistory.json")
b=as.data.frame(a)
 
mygoog=NULL
mygoog$latitude=b$locations.latitudeE7/10000000
mygoog$longitude=b$locations.longitudeE7/10000000
mygoog$time=as.POSIXct(as.numeric(b$locations.timestampMs)/1000 , origin="1970-01-01")
 
 
mygoog=as.data.frame(mygoog)
head(mygoog)
nrow(mygoog)
#Clearly that is over the API limit for free usage
length(unique(mygoog$longitude))
library(magrittr) #to make code easier to read
mygoog$longitude%>%unique%>%length
unique(mygoog$latitude)
mygoog$latitude%>%unique%>%length
 
fivenum(mygoog$latitude) #tukey
 
#or using Dr H over Tukey
library(Hmisc)
describe(mygoog$latitude)
describe(mygoog$longitude)
 
#deleting Non NY data
mygoog2=mygoog[mygoog$longitude<0,]
describe(mygoog2$longitude)
rm(mygoog2)
mygoog2=mygoog[mygoog$latitude<48,]
describe(mygoog2$latitude)
rm(mygoog2)
 
mygoog=mygoog[mygoog$longitude<0&mygoog$latitude<48,]
 
 
library(ggmap)=
#Starting Point
revgeocode(c(mygoog$longitude[1],mygoog$latitude[1]))
#Starting Time
mygoog$time[1]
------
  #Median Location
a1=median(mygoog$longitude)
print(a1)
a2=median((mygoog$latitude))
print(a2)
revgeocode(c(a1,a2))
 
#Lingering Location
Mode <- function(x) {
  ux <- unique(x)
  ux[which.max(tabulate(match(x, ux)))]
}
b1=Mode(mygoog$longitude)
b1
b2=Mode(mygoog$latitude)
b2
 
revgeocode(c(b1,b2))
#Creating New Fields to minimize API calls to Google Maps
unique(mygoog$longitude)
unique(mygoog$latitude)
 mygoog2=mygoog[!duplicated(mygoog[c("longitude", "latitude")]),]
nrow(mygoog2)
 
result <- do.call(rbind,
                  lapply(1:nrow(mygoog2),
                         function(i)revgeocode(as.numeric(mygoog2[i,1:2]))))
mygoog2 <- cbind(mygoog2,result)
 
library(stringr)
mygoog2$zipcode <- substr(str_extract(mygoog2$result," [0-9]{5}, .+"),2,6)
mygoog2[,-4]
 
#merge(x, y, by=c("k1","k2")) # NA's match
 
#Cleaning up workspace
             #rm(a1)
             #rm(a2)
             #gc()
 
Map <- get_googlemap(center = c(lon = median(mygoog$longitude), lat = median(mygoog$latitude)),
                     zoom = 13, 
                     size = c(640, 640), 
                     scale = 2, maptype = c("terrain"), 
                     color = "color")
 
plot1 <- ggmap(Map) + 
  geom_path(data = mygoog, aes(x = longitude, y = latitude
  ), 
  alpha = I(0.9), 
  size = 1.8)
suppressWarnings(print(plot1))

Code contains Easter Eggs created by Pretty R at inside-R.org

How I became a social media expert without spamming people

  • social_media_expertPolite hello gets me more work contracts than aggressive pitches. I am not afraid to say hello, but I always write a crisp two line on why I am saying hello. Short and sweet messaging rules today’s era. Attention span is short. Brevity is the soul of tweet.

 

  • There is no such thing as a free lunch or a free connection. People are getting too many emails asking them for stuff. I dont ask for free advice, jobs, or anything in first three exchanges on a digital medium

 

  • I try to curb my impatience and listen to people. Everyone has an interesting story.

 

  • Internet and Social media change everyday. This will lead to you making mistakes if you are passionate on expanding your network. I make mistakes while learning new things on internet. I learn from mistakes. I make new mistakes next time not repeat them

 

  • everyone dislikes spammers. A spam is an unsolicited email a digital cold call that asks the receiver for his time. yes we all have to build our brand, project our knowledge and sell our services. minimize digital spam.

 

  • Sense of humor helps build connections. If you can make them smile they are on the hook. 1902893_10152395459325658_5599190800305402465_n

 

  • I avoid search engine optimization because I assume people at Google are smarter than me. I use honesty and common sense in my blog writing titles and categories.

 

  • Loving my job and my field of expertise is more important than showing my greed for new contracts or clients. As Warren Buffet said , balance your greed and your fear.

 

  • When someone is unpleasant to me on Internet, I use block button very fast. That is why I try and not lose my temper at all on internet. It is working better as I am growing older

 

  • I am curious to learn new things from new people. 80% of my business has come from my 11000 LinkedIn  connections in past five years.