Skip to main content

Posts

Python Python Python - Everywhere

 

MATLAB DeepLearning Certificate

 

Review: Elon Musk by Ashlee Vance

Elon Musk has been called eccentric, egomaniac and outright crazy by his detractors.  That said, Ashlee Vance presents a well researched unbiased biography of Musk, after talking to people from all walks of his life, people from both the pro and anti Musk groups. My verdict -> it is an amazing book and very well narrated by Fred Sanders. Yes books these days mean ‘Audible’ to me as I go through my daily morning biking. Musk had a very difficult childhood and came to the US with absolutely no wealth. But his ambition to change the world and his brilliant mind has made him a billionaire today. He has created ‘history changing’ companies like SpaceX, Tesla, SolarCity and many more. Probably history will look back at him and worship him as one of the top contributors to humanity and its survival. The real life iron man. Musk has set out to correct humanity’s path - a path towards sustainable energy and clean earth, and to turn us to a multi planet species. We do...

AI for Everyone

Few days ago, Coursera launched the ' AI for Everyone ' online non-technical course by deeplearning.ai conducted by the famous Andrew NG  himself. 'AI for Everyone' gives a very good introduction to AI and you don't have to be a techie to understand this course. It is useful regardless of your background or your current job role. This is a course even CEOs and business leaders can take to get a quick insight of what AI can and can't do. It will provide pointers on how you can get your company and/or your career ready to ride the coming wave of AI. AI is already here and Andrew keeps repeating it is the next Electricity for us. The course provides practical steps and checklists to get you started with your first AI project. I enjoyed the learning.

MATLAB Onramp course

I recently registered for the Machine Learning, Stanford University online course at Coursera - conducted by the famous Andrew Ng himself. An amazing experience I must say. He puts across the concepts so well that even your lack of advanced Math knowledge is not a barrier and you soon pick up the concepts quite well. The quizzes and assignments are real good. As part of this course you have to submit your ML algorithms in either Octave or Matlab and I chose the latter. Did a quick online self paced course on Matlab at Mathworks, which was quite interesting and lo and behold the completion certificate is seen below 😊

Sapiens, Homo Deus & 21 Lessons for the 21st Century

Posting after a long long time and this is not a post on development. Just finished listening to these 3 mind blowing audio books @ Audible by Yuval Noah Harari  https://www.ynharari.com/ Sapiens Homo Deus 21 Lessons for the 21st Century Amazing the way he describes -- how we became the number one species on this planet and the unknown future that we are heading into. Some very interesting topics that I personally liked: 1. How tech (AI, ML etc) are going to change and affect everything and everyone 2. A world run by algorithms 3. Humans now trying to evolve into "Gods" - Immortal, Omnipresent and Omniscient 4. Billions of years of Organic evolution vs Human invented Inorganic rapid evolution Do read these books and they will seed many new ideas and thoughts in you. Next onto Elon Musk's biography...

Winners of the jQuery Mobile Cookbook giveaway

I had earlier announced that I would be giving away 2 copies of my book, jQuery Mobile Cookbook here . I wish to thank all the participants who sent in their entries from across the world. Thrilled by your response.  Due to unavoidable circumstances, there was a delay in me procuring the books and so I was not able to announce the winners sooner. But now here they are: Congratulations !!! Winner of the hard copy from India:  Vasudevan P Winner of the e-book from Spain:  Miguel Angel The two winners were randomly chosen by me without any bias and have been informed by direct email. They will be receiving their copies soon. The decision is final and not subject to review or contest. Thanks again to all those who participated! Link to the book:  http://www.packtpub.com/jquery-mobile-cookbook/book Extract from the publisher website: Overview: Create applications that use custom animations and use various techniques to improve application perfo...

Giving away 2 free copies of jQuery Mobile Cookbook

I wish to thank all my friends, readers and well wishers. Your constant encouragement and support helped me complete my very first published book. I'm now very glad to announce that my book jQuery Mobile Cookbook just got published by Packt Publishers. The link is here:  http://www.packtpub.com/jquery-mobile-cookbook/book Extract from the publisher website: Overview: Create applications that use custom animations and use various techniques to improve application performance Use and customize the various controls such as toolbars, buttons, and lists with custom icons, icon sprites, styles, and themes Write simple but powerful scripts to manipulate the various configurations and work with the events, methods, and utilities which are provided by the framework What you will learn from this book: Create single-page and multi-page applications that use custom CSS and JavaScript transitions; improve performance using Prefetch, DOM-Cache, and Application Cache Use fi...

Node.js: Notes on Install and Upgrade on Ubuntu

To install Node.js, first install the below prerequisite and add the node.js repository. # sudo apt-get install python-software-properties # sudo apt-add-repository ppa:chris-lea/node.js  Now install Node.js and npm (the Node Packet Manager). # sudo apt-get update # sudo apt-get install nodejs npm Thats it. Your Node.js is ready. Test by running the below command. # node -v v0.6.18 Node.js stable releases are done quite frequently. To upgrade run, # sudo apt-get update # sudo apt-get upgrade nodejs npm   You could also use the Ubuntu Update Manager to do the update. If you are the kind who prefers to directly build from the sources then, # cd <directory> # sudo wget http://nodejs.org/dist/v0.6.18/node-v0.6.18.tar.gz # sudo tar -zxf node-v0.6.18.tar.gz # cd node-v0.6.18 # sudo ./configure # sudo make # sudo make install # node -v v0.6.18 The latest version was v0.6.18 at the time of writing this post. For other platforms, installation is...

Ubuntu: Easy steps to install and use Notepad++ and IE on Ubuntu

I like using Notepad++, but it is a windows program and is not available for Linux. There are some jQuery Mobile apps that I need to test on IE. I need a Windows platform. But my primary laptop has Ubuntu. The solution is to use Wine and boy does it taste good! First install wine # sudo apt-get install wine Download the latest notepad++ installer from http://notepad-plus-plus.org/ and launch it using wine. # sudo wine <download folder>/npp.xxx.Installer.exe This will launch the Npp installer and you can complete the fairly simple installation. Thats it, you are done ! Now you can just launch Npp and its a touchdown ! # cd ~/.wine/drive_c/Program Files/Notepad++ # ./notepad++.exe There is a version of IE available too  # cd ~/.wine/drive_c/Program Files/Internet Explorer # ./iexplore.exe This IE scores pretty decent on www.html5test.com . Now how about try installing other Windows apps on Ubuntu and having more fun...

Fixing Date, Time and Zone on RHEL 6 command line

Had to fix all time related issues on a remote RHEL 6 server which runs without any windowing system. Plain ol' command line. Documenting steps here for future reference: Check to see if your date and timezone settings are accurate: # date # cat /etc/sysconfig/clock The server I accessed had wrong settings for both the commands. Here are the steps I used to correct: Find out your timezone from the folder /usr/share/zoneinfo # ls /usr/share/zoneinfo Mine was pointing to America/EDT instead of  Asia/Calcutta Update and save the /etc/sysconfig/clock file to # sudo vi /etc/sysconfig/clock ZONE="Asia/Calcutta" UTC=true ARC=false Remove the /etc/localtime # sudo rm /etc/localtime Create a new soft link to your time zone # cd /etc # sudo ln -s /usr/share/zoneinfo/Asia/Calcutta /etc/localtime # ls -al localtime Now it should show the link to your time zone Set your hardware clock to UTC # sudo hwclock --systohc --utc # hwclock --show Update your t...

CouchDB on RHEL6 (Red Hat Enterprise Linux)

Had to install a Couch DB instance on a fresh Red Hat Enterprise 6 Linux Box and it required some time before I got the whole thing up. Better have it documented here for future reference: 1. Get the Prerequisites First you will have to add the RPM Forge YUM Repository if not already available. Add the new repo: sudo vi /etc/yum.repos.d/rpmforge.repo # Name: RPMforge RPM Repository for Red Hat Enterprise 6 - dag # URL: http://rpmforge.net/ # (Put "x86_64" instead of "i386" if appropriate.) [rpmforge] name = Red Hat Enterprise $releasever - RPMforge.net - dag baseurl = ftp://ftp.pbone.net/mirror/atrpms.net/el6-i386/atrpms/stable enabled = 1 protect = 0 gpgcheck = 0 Save the file and get the prerequisites: sudo yum clean all sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development' sudo yum install \   cvs zip gcc-c++ glib2-devel gtk2-devel fontconfig-devel libnotify-devel \   libIDL...

2 new Page Transitions in jQuery Mobile v1.1

In my earlier post I had written a simple demo to show the various transitions that are available with jQuery Mobile. The official documentation v1.0.1 for page transitions is available here . But with jQuery Mobile v1.1, the official documentation has been updated and is much better compared to the older version. You will also see the page looks much simpler and showcases how the transitions would look for pages and also dialogs. Just click on the buttons and you can see the live demo. Excellent work on updating the documentation. Also very exciting to see that two new transitions have been added, the Turn and the Flow . So now we have a total of 8 transitions that are available by default. Pretty cool. Of course the brave can extend the framework and try to create their own custom transitions using CSS3 and JS.

TV apps using jQuery Mobile

The idiot box finally graduates to an internet box! Internet on TV is catching on quite fast. I've been reading reports that predict a billion(s) dollar market that will open up for TV apps. Ah the hype .. these things are always in billions. But anyways, considering the number of people who have a TV and the number who watch it (almost everyone?), I guess this could be quite realistic. Many advantages I guess, lesser strain on the eyes, no burnt laps and no lost fertility with laptops on top of laps. I'm online 100% of the time. Definitely I stand to gain. My 6 year old kid too. I'd rather have him play Angry birds and all those HD games on TV compared to him holding my super heated mobile and straining his eyes watching the small screen. So now that I've made my point beyond all doubt, it is agreed that TV apps is the next big thing! So where do I start? I do not have an Internet TV yet! Not to despair, one could install the recently launched Opera TV Emulator...

It pays to blog

" See one, Make one, Teach one! " - [video:  Charles McCathieNevile (Opera) , see @00:19:00] Working on a pet project, I stumbled upon jQuery Mobile a few months ago and have been hooked on to it since then. There were quite a few things that I learnt and few more things that I discovered. I started to blog a few posts on the topic and boy does it pay to blog! One morning I log on to my blog and find that the traffic had jumped by a few hundred page views within a single night. I used to have just a handful of daily visits earlier. Initial thought was that some bot had tried to wreck havoc on my blog. Eventually I found the true reason. My post on prefetching pages using jQuery Mobile , had been  retweeted by @jquerymobile . Traffic hasn't looked down since. Even today the number of pageviews on a daily basis, is tenfold more than the earlier days. Its been two months now. Within a week of this, I got an email by a leading international publisher asking if I w...

jQuery Mobile and Duplicated Page IDs

In the previous post , I touched upon how browsers safely handle duplicate IDs in a html file. Things seem to work fine for the three main uses of element IDs, i.e. linking to fragments, styling and referencing the element in javascript. The first element with matching ID is picked up and styling is done for all matches. Now let us extend this test to the jQuery Mobile framework. You can launch the below multi-page code here.   Launch   <!DOCTYPE html> <html>   <head>     <title>jQuery Mobile Duplicate IDs</title>     <meta name="viewport" content="width=device-width, initial-scale=1">     <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />      <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>     <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"...

Using duplicate IDs in HTML

Well today I'm being a bit controversial. Let us see what the HTML5 spec says about unique IDs in a HTML file. The  id  attribute specifies its element's  unique identifier (ID) . The value must be unique amongst all the IDs in the element's  home subtree  and must contain at least one character. The value must not contain any  space characters . An element's  unique identifier  can be used for a variety of purposes, most notably as a way to link to specific parts of a document using fragment identifiers, as a way to target an element when scripting, and as a way to style a specific element from CSS. Yes its been mentioned almost everywhere on the planet that ID must be unique. Now let us look at the below code, Launch dup.css #p2 {   background-color: yellow;  } dup-id.html <!DOCTYPE html> <html>   <head>     <title>Duplicate ID Tester</title> <link rel="stylesh...

jQuery Mobile Page Caching demo

In my previous post , I outlined how to prefetch links to make jQuery mobile app load your pages faster. The ui-loader spinning animation was not shown as you navigate from one page to another. Launch   - The previous example with prefetch But, as also mentioned, it has certain limitations, If there are more pages, more http requests are sent out and more bandwidth is required to prefetch If a page hasn't been fully prefetched, the ui-loader spinner animation comes up till the page is fully loaded. Try to click fast and you will see Once you visit a prefetched page, navigating away from the page will remove the page from DOM. So this is not same as caching the page. The next visit to the page will again need the page to be fetched. So the obvious solution seems to be to cache the frequently visited pages in the DOM. This way, every link doesn't have to be prefetched on every visit to the page. This is easily done in jQuery Mobile by adding the attribute data-dom-cach...

jQuery Mobile Prefetching pages demo

Using a single-page template for your mobile app makes your app faster and lighter. But you have to fetch each page during navigation and you end up seeing the ui-loader spinning icon animation every time. It can get to your nerves.  Launch   - Example without prefetch The above example, from my previous post shows how the spinning icon comes up each time you navigate from the main page to page 2. I will not list the code here as its already listed in an earlier post . In a multi-page template whereas, the entire set of pages are already loaded into the DOM and the navigation is much faster. A similar behavior can be obtained in a single-page application by prefetching pages. This is done by just adding the attribute data-prefetch  to all the links that you want to prefetch. As soon as the page loads, it starts fetching these links and loads it into the DOM. You can observe this behavior with the code inspector open (CTRL+SHIFT+I) in your browser. Now navigating to...

jQuery Mobile Page Transitions with data-ajax=false

In my earlier post here , I outlined the various page transitions that are available in jQuery Mobile.  In single-page template documents, jQM uses Ajax to smoothly transition between pages and when not possible, the framework does a simple HTTP request to pull in the page. Situations where Ajax transitions are not used are: When a page loaded is: from an external domain data-ajax="false" attribute is used rel="external" is specified target attribute is specified This is also well documented  (with examples) . In multi-page template documents, jQM needs Ajax to transition between the multiple page containers. Now lets play with this a bit. Let us try to override this with the data-ajax attribute and see what happens. Consider below code, you can click on the link below to launch it in a separate browser tab: Launch <!DOCTYPE html> <html>   <head>     <title>jQuery Mobile Transitions Demo with data-ajax="false...