Rahul Bhadani
Image for post
Image for post
Woodland, UK: Image Courtesy: https://forthewild.world/listen/starhawk

In the world of Machine Learning (ML), where researchers and practitioners are hunting to develop new methods, and giving yet another new algorithm for making predictions, Random Forest Classifier (RFC) remains as vital as it was yesterday. Modern biology is adopting the use of ML and Data Science (DS) at an unprecedented rate. Unlike neural networks, RFC is non-parametric, interpretable, efficient, and has a high prediction accuracy for several types of data. As a result, RFC is one of the top choices for classification among bioinformaticians. Further, RFC performs well in cases where the sample size is small yet, high-dimensional and the data-structure is complex. In this context, high-dimensional means a large number of features. The RFC utilizes random sampling and ensemble strategies to achieve accurate predictions and as well as better generalization. …


Image for post
Image for post

There are plenty of mapping services available dominated by Google Map, Here map, OpenStreetMaps, and a few lesser-known as such Mapbox. Of course, they all vary in features, services, and kind of use cases. For mapping applications that require precision and finer control, Google Map is the choice, but they are not convenient and free for all purposes. Some use-cases of Google MAP API are free but you probably need to enter credit card information for billing purposes to prevent any misuse. Recently, my research group started gathering GPS data from consumer cars and I was looking to overlay the GPS data on maps for further downstream analysis of GPS data. In the quest for a suitable python API, I stumbled upon plotly that uses various types of maps, with or without the need for an API key.


Image for post
Image for post
Source

Preprocessor directives are specific instructions to the compiler given before the compilation of actual code is invoked. There are several such directives. A few important categories of such directives include (i) macro definitions (ii) condition inclusions (iii) line control, and(iv) error directives

Macro definitions

Macro definitions can be achieved via #define and can be undefined using #undef

When a C++ preprocessor encounters #define directive, it replaces any occurrence of identifier in the rest of the code body by replacement. This replacement can be an expression, a statement, a block, or simply anything. …


Image for post
Image for post
source: pixabay.com

This directive is used to specify diverse options to the compiler. These options are specific for the platform and the compiler you use. Consult the manual or the reference of your compiler for more information on the possible parameters that you can define with #pragma. If the compiler does not support a specific argument for #pragma, it is ignored — no error is generated.

The compiler, unless otherwise directed, will line up structure members on 2-byte or 4-byte boundaries — this makes it easier and faster for the processor to handle. Here, the structure contains secret padding bytes to make it happen. The pragma pack directive allows you to change this alignment scheme. Some things (particularly in relation to hardware and embedded programming such as robotics, telecommunication) do not have the luxury to waste bytes like this and they send their data in an exact fit. This means that it is not wise to read data from a hardware device directly into a normal structure. …


Image for post
Image for post
https://free4kwallpapers.com/uploads/originals/2019/07/12/poisonous-red-mushroom-macro-wallpaper.jpg

Do you know that you can also stringify the MACRO?

Sometimes you want to convert MACRO arguments into a string constant. This is achieved by the stringification of MACRO.

“Stringification” means turning a code fragment into a string constant whose contents are the text for the code fragment. For example, stringifying foo (z) results in “foo (z)”.

In the C & C++ preprocessor, stringification is an option available when macro arguments are substituted into the macro definition. In the body of the definition, when an argument name appears, the character # before the name specifies the stringification of the corresponding actual argument when it is substituted at that point in the definition. …


Image for post
Image for post

Who doesn’t love a new version of Ubuntu! And that too Long Term Support (LTS)! Lots of new features and designs but most importantly if you are a ROS user then you are definitely looking for a new version of Ubuntu since each new version of ROS with long-term support is tightly tied to an Ubuntu LTS. However, upgrading Ubuntu from an existing version to a newer is always a nightmare, especially when you have a plethora of third-party softwares installed. This was definitely the case with me.

In this article, I provide a step-by-step journey of upgrading Ubuntu 18.04 to 20.04 that I recently went through. Definitely, this journey is marred with trenches and pitfalls and as usual, one should be very careful while upgrading Ubuntu. If you don’t have an urgent need to install Ubuntu 18.04 to 20.04, it is always good to install Ubuntu from scratch. Nonetheless, I hope if you decide to upgrade Ubuntu 18.04 to 20.04, my article may prove useful. …


Image for post
Image for post

Container technology has been proved to immensely useful when we are looking to use a package or a module or otherwise perform a quick task without worrying about dependencies because … uh, dependencies are a nightmare. Some may argue that in the case of python, the virtual environment solves dependencies issues to some extent. There is definitely some truth in that but is not so much. When your python package is using apt dependencies, they are sometimes harder to meet. In such cases, container technologies such as Docker are really helpful.

In this article, I will demonstrate how to use install docker, use docker to containerize a python package. That container is called a Docker image. The image is pushed to Docker Hub from where anyone can pull it to perform the task. For this article, I demonstrate how to create a docker image for thestrym package that I have written during graduate school. strym python package is used to decode and analyze CAN bus data obtained using libpanda and Comma.ai …


Image for post
Image for post

Chances are if you have worked with ROS, you know how painful it is to write code to decode ROS messages from the recorded bag files. There are only a few tools out there that offer full-fledged functionality to read rosbag files. One such tool that comes to mind is ROS Toolbox in MATLAB from Mathworks. Prior to the 2020a version, the toolbox was a part of the Robotics System Toolbox. However, if you don’t have a license to the Matlab or to the Toolbox, in particular, it is going to be hard. With this in mind, I recently produced a python package bagpy that enables reading large bag files of any message types. …


Image for post
Image for post

They say that only change is constant. Sometimes change engulfs the holiness of emotions gained with time. Attired in light yellow Indian Salwar with a gladsome smile on her face, Kuki bespoke tenderly, “Hey!!”. The music was vehemently loud that Rakesh appeared to be enthralled by the bass and chords of the guitar. Apparently, he did not appear to be hearkened to Kuki’s greeting. Rakesh, in his early 20s, slender, medium height had charismatic likableness. The College ground, which is used as a football ground by students of the institution, was throbbing with rock music. Everyone was in action, dancing, singing, and cheering up. Having understood the essence of the situation, she let him come to this physical realm. When the drummer stopped the beat and the bassist stopped tuning the guitar, dust that was soaring over the ground began to settle down. …


Image for post
Image for post

This gist explains the detail of migrating from SVN to Git. I have had a significant portion of my research work, paper, and
source code in Subversion (SVN) since 2015. Recently we decided to migrate everything to GitHub private repository. I am
detailing the steps below in case that will be helpful.

Checkout your code from SVN

svn co https://svn.engr.arizona.edu/svn/jms/jmsgroup/trunk/wildcat wildcat_SVN

This will save the subversion code in wildcat_SVN.
Run following inside `wildcat_SVN` directory to get the list of author information who have committed so far.

cd wildcat_SVNsvn log -q | awk -F ‘|’ ‘/^r/ {sub(“^ “, “”, $2); sub(“ $”, “”, $2); print $2" = “$2” <”$2">”}’ | sort -u > authors-transform.txt …

About

Rahul Bhadani

Automation, Quantification, and Communication. PhD, Electrical Engineering

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store