Category Archives: Python

scikit-learn Cookbook by Trent Hauck, Packt Publishing Book Review

This book was released back in Fall 2014, but I did not had a chance to read it until recently. A big miss. As far as I can tell, it is the one of the few books covering as much ground as possible in concern to scikit-learn as free Machine Learning (ML) libraries available for Python. In general, the Machine Learning is a fascinated piece of science seeing a lot of traction these days, but it is a tad intimidating to grasp at the beginning, besides, its potential use cases given it fallen into the wrong hands (g-d forbid) can be scary. Otherwise I foresee a huge potential for it’s use in the IOT.

This book aims at easing the ML adoption hurdles providing with not less than 50 recipes which cover pretty much the whole scikit-learn landscape. I could see Trent made every effort to deliver a hight quality product. The book has a supplementary file that covers what an end user needs to install to go through all the material in the book and obtain sample data.

In terms of a general note, since this product is aiming at mostly the data scientist, engineers or research staff many topics are not going to be quite familiar to a wide non-technical or general IT audience, but please ensure you put an extra effort in understanding the concepts. Like I have said, the benefits are enormous. And prepare yourself to scratch your head a few times or more :-). Yes, this is a very advanced book. Yet, it seems that it covers all the possible scenarios and industry fields one can imagine off. Numerous graphics, detailed code samples and output examples, all are ready to copy and paste into the mighty Python REPL.

When I was reading the book I had a task at hand and I concentrated on the KMeans algorithm which is elegantly covered, and I enjoyed the most the chapter on Classifying Data. At the same time I think the cornerstone of the book is chapter 1 on pre-model workflow and the last on the post-model, I just did not see books to date going this far.

While this book is more like an ‘Academia’ publication it does have many practical applications, but for a less Data Science savvy person it desires to have more explanation on why XYZ and ABCs are necessary, or what each library function is used for and under what circumstances one would choose to use it.

Overall it is a tad dry, technical read, but at the same time no extra, volume inflating words were mixed in, so it is worth what you are paying for.

My verdict, it 4.5 our of 5.

Rapid Flask by Gareth Dwyer, Packt Publsihing Video Review

Python has seen a rapid adoption rate recently and seems to have been proliferated many IT shops as it now boasts a myriad of helpful libraries in addition to having adapters and connectors for most of the data storage offerings and of course is very much suitable for the web development where Flask appears to me being the leader in the Python Web Frameworks space.

Would it be suffice to say it is looking like the most used language in 2015 to motivate you coding in Python?

With this popularity in sight the amount of training material started to grow significantly. Packt Publishing among the other leading technical education content providers quickly spotted the potential and released a barrage of products among them the Rapid Flask training course I happened to enjoy watching.

In short, the objective of this course is to quickly get you up and running a Python powered modern Single Page web Application (SPA), yes, not more or less, in under 50 min. well 42 in fact. Yes, no kidding. Python is so wicked!

This is of course not without mentioning the author Gareth Dwyer who put a lot of effort into making this video tutorial so effective. I like how the environment was set up on all-in-the-box plain and simple Ubuntu with all what you need to develop anything.

The video shows all the development cycles from simple URL submissions, handling JSON, to user input handling, omitting the unit tests, error handling and ends with some road-map to exploring Flask add-ons and libraries to take you into more advanced topics as database integration.

Verdict: 5 out of 5. If you are in a hurry or have a tight budget, this video is for you. As a next step to mastering Flask I would recommend a more in depth book or video.

Python for Secret Agents By Steven F. Lot, Packt Publishing Book Review

Attention! A fun, quality read!

And this book is about learning Python, but in such a way you will be hardly able to put the book aside. So do not be fooled by the title. Yes, you will learn about modules, classes and even unit tests!And eventhough Python for Secret Agents isseeminglyaimedat beginner programmers it shouldbe pure fun for the rest of us. In my view this book constitutes serious workcovering such important and frequently used techniques as accessingremote data, getting files over FTP, RESTAPIs, JSON(including serialization), ZIParchives, Geospatialcalculationsor simply teaching such common techniques as file path processing, numericalcomputations, listsand dictionaries or Unit Testing. And clever statistical data processing, too. NumPy,SciPylibraries are covered which is a great plus.

I was able to extract a ton of useful approaches to dealing with web data – BeatifulSoup is among the ones. The book became more and more exiting as I progressed through it until that all unfolded into one aha moment and finally exploded in a-la Cirque De Soleil kind of finale – last chapter: “A Spymaster’s More SensitiveAnalyses”. 

A great, great rare read I did not experience for a long time. Thank you Steven F. Lott! I am looking forward to reading more books from you.

For the sake of this review and by means to downgrade my mark if I had to mention a few deficiencies that would be the lack of sample output (I just not always had the time for running each code example), nor does it provide examples on how towork with shape data (geolocations), but the Shapes is old school.

So all in all it is worth your buck.

Five out of five!