Suramya's Blog : Welcome to my crazy life…

August 21, 2020

Emotion detection software for Pets using AI and some thoughts around it (and AI in general)

Filed under: Computer Software,Emerging Tech,Humor,My Thoughts,Techie Stuff — Suramya @ 5:32 PM

Pet owners are a special breed of people, they willingly take responsibility for another life and take care of them. I personally like pets as long as I can return them to the owner at the end of the day (or hour, depending on how annoying the pet is). I had to take care of a puppy for a week when Surabhi & Vinit were out of town and that experience was more than enough to confirm my belief in this matter. Others however feel differently and spend quite a lot of time and effort talking to the pets and some of them even pretend that the dog is talking back.

Now leveraging the power of AI there is a new app created that analyses & interprets the facial expressions of your pet. Folks over at the University of Melbourne decided to build an Convolutional Neural Networks based application called Happy Pets that you can download from the Android or Apple app stores to try on your pet. They claim to be able to identify the emotion the pet is feeling when the photo was taken.

While the science behind it is cool and a lot of pet owners who tried out the application over at Hacker News seem to like it, I feel its a bit frivolous and silly. Plus its hard enough for us to classify emotions in Humans reliably using AI so I would take the claims with a pinch of salt. The researchers themselves have also not given any numbers around the accuracy percentage of the model.

When I first saw the post about the app it reminded me of another article I had read a few days ago which postulated that ‘Too many AI researchers think real-world problems are not relevant’. At first I thought that this was an author trolling the AI developers but after reading the article I kind of agree with him. AI has a massive potential to advance our understanding of health, agriculture, scientific discovery, and more. However looking at the feedback AI papers have been getting it appears that AI researchers are allergic to practical applications (or in some cases useful applications). For example, below is a review received on a paper submitted to the NeurIPS (Neural Information Processing Systems) conference:

“The authors present a solution for an original and highly motivating problem, but it is an application and the significance seems limited for the machine-learning community.”

If I read this correctly then basically they are saying that this AI paper is for a particular application so its not interesting enough for the ML community. There is a similar bias in the theoretical physics/mathematics world where academics who talk about implementing the concepts/theories are looked down upon by the ‘purists’. I personally believe that while the theoretical sciences are all well & good and we do need people working on them to expand our understanding, at the end of the day if we are not applying these learnings/theorems practically they are of no use. There will be cases where we don’t have the know-how to implement or apply the learnings but we should not let that stand in the way of practical applications for things we can implement/use.

To quote a classic paper titled “Machine Learning that Matters” (pdf), by NASA computer scientist Kiri Wagstaff: “Much of current machine learning research has lost its connection to problems of import to the larger world of science and society.” The same year that Wagstaff published her paper, a convolutional neural network called AlexNet won a high-profile competition for image recognition centered on the popular ImageNet data set, leading to an explosion of interest in deep learning. Unfortunately, the disconnect she described appears to have grown even worse since then.

What do you think? Do you agree/disagree?

Source: HackerNews

– Suramya

August 20, 2020

Transparent Solar Panels hit Record 8.1% Efficiency

Filed under: Emerging Tech,My Thoughts,Techie Stuff — Suramya @ 5:24 PM

Solar panels for electricity are awesome, however the major issue with deploying solar panels is that you need a lot of space for them. Although the efficiency of the panels has been going up reducing the space requirements but its still a non-trivial amount of space to generate enough power to be useful to power a house, Portable solar panels are well and good but they are slow and expensive. I tried to figure out a way to power my apartment via solar power but it wasn’t possible without having panels setup on the apartment roof.

Which is where the Transparent Solar panels come into play as they allow you to replace your existing windows for solar panel which would make them ideal for Apartments & office buildings. Because you don’t need extra space for the panels and just need to replace the windows. The transparent solar panels were created in 2014 by researchers at Michigan State University (MSU) however the efficiency of the panels was quite low compared to the traditional panels making it less productive and more expensive than the traditional panels so since then the race has been on to make the panels more efficient.

The researches from University of Michigan have made a significant break through in the manufacturing of color-neutral, transparent solar cells achieving 8.1% efficiency by using a carbon-based design rather than conventional silicon. The created cells do have a slight greenish tinge like sunglasses but for the most part appear to be usable as a window pane. More details are available in their release here.

The new material is a combination of organic molecules engineered to be transparent in the visible and absorbing in the near infrared, an invisible part of the spectrum that accounts for much of the energy in sunlight. In addition, the researchers developed optical coatings to boost both power generated from infrared light and transparency in the visible range—two qualities that are usually in competition with one another.

The color-neutral version of the device was made with an indium tin oxide electrode. A silver electrode improved the efficiency to 10.8%, with 45.8% transparency. However, that version’s slightly greenish tint may not be acceptable in some window applications.

Transparent solar cells are measured by their light utilization efficiency, which describes how much energy from the light hitting the window is available either as electricity or as transmitted light on the interior side. Previous transparent solar cells have light utilization efficiencies of roughly 2-3%, but the indium tin oxide cell is rated at 3.5% and the silver version has a light utilization efficiency of 5%.

The researchers are still working on improving the efficiency further and I am looking forward to the new breakthroughs in the field. Hopefully soon we will have panels efficient enough that I will be able to replace my apartment’s windows with Solar panel and break even in a reasonable amount of time. 🙂

Source: Slashdot.org

– Suramya

August 19, 2020

Convert typed text to realistic handwriting

Filed under: Computer Related,Computer Software,Techie Stuff — Suramya @ 6:45 PM

There are some tools or projects that really don’t make any practical sense but are a lot of fun to use or just impressive in how they implement technology. The Handwritten.js project by ‘alias-rahil’ is one such project. Basically what it does is take any Plain Text document and convert it into a realistic looking handwritten page. I tried it out on a few sample documents (logs) and it worked great. The programs does coredump if you try converting a 5MB file, but other than that it worked as expected.

Below is a sample file with some quotes that I converted as a test :

* Mountain Dew and doughnuts… because breakfast is the most important meal of the day

* Some days you’re the dog; some days you’re the hydrant.

* He who smiles in a crisis has found someone to blame.

* Marriage is one of the chief causes of divorce

* Earth is 98% full…please delete anyone you can.

* I came, I saw, I decided to order take out.

* F U CN RD THS U CNT SPL WRTH A DM!

* Work hard for eight hours a day, and eventually you may become a
boss and be able to work twelve.

* Quitters never win, and winners never quit, but those who never quit AND never win are idiots.

* What’s the difference between a bad golfer and a bad skydiver?

A bad golfer goes, WHACK! “Damn.”
A bad skydiver goes, “Damn.” WHACK!

* Beware of the light at the end of the tunnel. It could be an oncoming train.

* A girl is like a road. The more curves she has the more dangerous she is!

* A woman who dresses to kill probably cooks the same.

The script is fast and didn’t take more than a few seconds to process the file and create a PDF file with the output. The output for my test run is as below:


Output generated by Handwritten.js

I did also try converting a word file with the software but it didn’t take the content of the file for the conversion, instead it converted the XML & Code from the file. One suggestion for improvement I have is to enhance the script to support word files. It would be awesome if it could also convert any of the diagrams, tables etc to look like they were drawn by hand.

Maybe if I have some time I will look into this and see how easy it is to enhance the script. But no promises as I have a ton of other things I need to take complete first. 🙂

Source: Hacker News

– Suramya

August 18, 2020

Finally moved the Website & Blog to https

Filed under: Computer Tips,Techie Stuff,Website Updates — Suramya @ 12:02 PM

After spending way too much time avoiding the work due I finally configured both suramya.com & the Blog to be https by default. The setup was fairly simple, I added the certificate on the 1and1.com portal, then after a few mins I was able to access the site over https. In order to redirect http to https automatically I followed the following steps:

Auto Redirect to https in Apache

Configure .htaccess to force a redirect, you can also configure it in the Apache main configuration (under the virtualhosts directive) but since I don’t have root access and can’t modify it I updated the .htaccess config to do the same thing. Basically you need to add the following lines to .htaccess :

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.suramya.com/$1 [R,L]

Change www.suramya.com to your domain, else every visitor to your site will be sent to my site. Not that I will mind that, but you might. 🙂

Then I did the same thing for the blog with a small change, The .htaccess for the blog reads as the following:


RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.suramya.com/blog/$1 [R,L]

When updating the file, you need to ensure you put the changes outside the # BEGIN WordPress & # END WordPress as the content is dynamically generated and would be overwritten.

Updating all the urls in WordPress

After I made the changes above, I found that the site was being redirected to https but I was getting errors about mixed content on the page because all the URL’s/Images that I had uploaded to WP till now were saved as http and not https. So I had to change every URL in the blog from http to https and to be honest I wasn’t looking forward to doing this manually. I searched the web and found this site that had instructions on how to update the url’s using the WordPress commandline interface. From the blog directory you need to issue the following command:

wp search-replace http://www.suramya.com/blog/ https://www.suramya.com/blog/ --dry-run

This command does a dry run and tells you what all changes will be made and if everything looks ok, then you can run the above command again without the ‘dry-run’ call.

wp search-replace http://www.suramya.com/blog/ https://www.suramya.com/blog/

If all goes well you will get an output similar to the following:

(uiserver):~/public_html/suramya.com/blog$ wp search-replace http://www.suramya.com/blog/ https://www.suramya.com/blog/ 
+------------------+-----------------------+--------------+------+
| Table            | Column                | Replacements | Type |
+------------------+-----------------------+--------------+------+
| wp_commentmeta   | meta_key              | 0            | SQL  |
| wp_commentmeta   | meta_value            | 572          | PHP  |
| wp_comments      | comment_author        | 0            | SQL  |
| wp_comments      | comment_author_email  | 0            | SQL  |
| wp_comments      | comment_author_url    | 29           | SQL  |
| wp_comments      | comment_author_IP     | 0            | SQL  |
| wp_comments      | comment_content       | 2            | SQL  |
| wp_comments      | comment_approved      | 0            | SQL  |
| wp_comments      | comment_agent         | 0            | SQL  |
| wp_comments      | comment_type          | 0            | SQL  |
| wp_links         | link_url              | 0            | SQL  |
| wp_links         | link_name             | 0            | SQL  |
| wp_links         | link_image            | 0            | SQL  |
| wp_links         | link_target           | 0            | SQL  |
| wp_links         | link_description      | 0            | SQL  |
| wp_links         | link_visible          | 0            | SQL  |
| wp_links         | link_rel              | 0            | SQL  |
| wp_links         | link_notes            | 0            | SQL  |
| wp_links         | link_rss              | 0            | SQL  |
| wp_options       | option_name           | 0            | SQL  |
| wp_options       | option_value          | 3            | PHP  |
| wp_options       | autoload              | 0            | SQL  |
| wp_postmeta      | meta_key              | 0            | SQL  |
| wp_postmeta      | meta_value            | 0            | PHP  |
| wp_posts         | post_content          | 591          | SQL  |
| wp_posts         | post_title            | 0            | SQL  |
| wp_posts         | post_excerpt          | 0            | SQL  |
| wp_posts         | post_status           | 0            | SQL  |
| wp_posts         | comment_status        | 0            | SQL  |
| wp_posts         | ping_status           | 0            | SQL  |
| wp_posts         | post_password         | 0            | SQL  |
| wp_posts         | post_name             | 0            | SQL  |
| wp_posts         | to_ping               | 0            | SQL  |
| wp_posts         | pinged                | 20           | SQL  |
| wp_posts         | post_content_filtered | 0            | SQL  |
| wp_posts         | guid                  | 2775         | SQL  |
| wp_posts         | post_type             | 0            | SQL  |
| wp_posts         | post_mime_type        | 0            | SQL  |
| wp_term_taxonomy | taxonomy              | 0            | SQL  |
| wp_term_taxonomy | description           | 0            | SQL  |
| wp_termmeta      | meta_key              | 0            | SQL  |
| wp_termmeta      | meta_value            | 0            | SQL  |
| wp_terms         | name                  | 0            | SQL  |
| wp_terms         | slug                  | 0            | SQL  |
| wp_usermeta      | meta_key              | 0            | SQL  |
| wp_usermeta      | meta_value            | 0            | PHP  |
| wp_users         | user_login            | 0            | SQL  |
| wp_users         | user_nicename         | 0            | SQL  |
| wp_users         | user_email            | 0            | SQL  |
| wp_users         | user_url              | 0            | SQL  |
| wp_users         | user_activation_key   | 0            | SQL  |
| wp_users         | display_name          | 0            | SQL  |
+------------------+-----------------------+--------------+------+
Success: Made 3992 replacements.

That’s it. After running the command, the blog is completely on https and the security gods are happy :). Now I need to update all the URL’s on the main site to reference https instead of http and that is going to be painful. It will require a whole lot of script-fu to do it automatically as it will have to be a regex/awk or something similar. Maybe someone already did the work and posted the solution online. Alas that was not the case. I ended up manually updating the files since there were only about 20-25 of them. Opened all of them in the editor one-shot and then did a search & replace. Now both sites are coming up properly in https.

– Suramya

August 17, 2020

Issue with Site Posts

Filed under: Website Updates — Suramya @ 2:50 PM

Update 8/17/2020: Issue resolved. The problem was caused because I had a missing single quote in the previous post. Once I added the quote to the post things went back to normal.

There seems to be an issue with WordPress where some of my posts have gone MIA on the main page even though the direct links work. Also some of the posts are being merged together for some reason.
I am looking into it, so please be patient.

– Suramya

Parents freaking out about their kid being fed Indian food and my thoughts on it

Filed under: My Thoughts — Suramya @ 2:31 PM

A few days ago a post popped up in my twitter feed where this person was complaining about how they had sent their kid (‘Chris’) to a friends place (‘Neil’) and Neil’s parents fed Chris Indian food without asking for permission from the parents. Neil’s parents are both Doctors of Indian origin and settled in the US. This guy was complaining about how they should have asked him for permission because kids tummies are sensitive etc etc and wanted to know if it was ok to tell Neil’s parents that they would only allow Chris and Neil to play at their house going forward. This was sent to a online help personality “Dear Prudence” and they posted it online. When I first saw the headline (“Help! I can’t believe my Son’s friend fed him Indian food without calling me first”) I thought it was a joke so I clicked to get more details which are in the screenshot below:

This is incredibly controlling behavior from Chris’s parents and I think there is a race aspect to the whole thing as well which is evident from the comment near the end about how further conversations on the topic would be racial in nature. There is no mention anywhere about any Allergies or diet restrictions that Chris might have, and if that was the case I understand the parents panicking when the kid is fed something that could be actively dangerous to them or if they were vegetarians and the kid was fed meat. But panicking just because they were fed spicy food is a bit too much.

As a kid I couldn’t handle any Spices and my food was made with minimal levels of spice, then I was visiting relatives who fed me Radish with salt, lemon & chilly powder and I loved it. I felt that my tongue was about to fall off but I loved it and slowly started increasing my spice tolerance. As a kid and even now I eat at my friends place all the time. Some of the food are things that I had never eaten before and it was an experience trying out new cuisines and food. We had a south-Indian family living next to us when Dad was posted in Delhi and we (me & Surabhi) were at their house every other day eating whatever they had cooked, which was my first experience of South Indian food that I remember. Surabhi fell in love with the Dosa’s & Idli’s etc at the time and till date its her favorite food. When they would come to our place we fed them classic north Indian dishes and they loved it as well…

Variety is the spice of life and food from other parts of the world is amazing. Chris’s parents should be happy that he is getting to experience other cultures and traditions at such a young age. When we travel we always explore the local food and try to each as much of it as possible. Which is why as times I do feel sad that I am a vegetarian because of which I can’t try the authentic local cuisine at a lot of places but I still make the effort to try the veg options. When I was in the US we had a whole semester where we went out every weekend to try a new cuisine and it was awesome. There were times that I hated the dish I ordered but that’s still part and parcel of exploring. I fell in love with Mexican food because I ate it in the US, if I had stuck to Indian food as a few of my friends did then I wouldn’t have found out about this amazing cuisine.

In my opinion there is no food that is inappropriate, there could be food that you can’t eat due to restrictions, medical issues or whatever but that’s it. In this case Chris’s parents are teaching their kid that ‘foreign’ food is something bad/dangerous and needs to be avoided. We are in a global world now, I can guarantee that Chris will end up with Indian friends/co-workers (or folks from other nationalities) down the line and have to eat the food. Its better that he tries the food now and gets used to it than have issues later in life.

What do you think?

Source: Twitter

– Suramya

August 14, 2020

Updating the BIOS to address a AMD Ryzen bug

Filed under: Computer Related,Computer Software,Techie Stuff — Suramya @ 5:13 PM

Over the past few months I have been infrequently seeing the following warning message in the Terminal and had been ignoring it because apparently the fix was to update the BIOS and I didn’t have the patience/time to do the upgrade at that point in time:

WARNING: CPU random generator seem to be failing, disable hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
WARNING: CPU random generator seem to be failing, disable hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff

Today I thought that I should fix the error, a bit of Google searching confirmed that I needed to update the BIOS because apparently there was a bug in the AMD Ryzen 3000 series processor that causes the onboard random number generator to always return 0xffffffff when asked to generate a Random number. Obviously getting the same number every time is not optimal even though Dilbert feels otherwise.


Random Number Generator in Accounting

AMD was notified about it last year and they released a BIOS update to fix the issue, however each Motherboard company had to validate and release the new BIOS which took time. The fix was to upgrade the BIOS and I really wasn’t looking forward to it as the last time I upgraded the BIOS it was a painful exercise involving floppy disks and cursing etc.

I looked up my BIOS version using the dmidecode command but that didn’t give me enough information to find the new BIOS version for my motherboard (‘ROG STRIX X570-E GAMING’). So I rebooted the computer and found the built in BIOS upgrade section under Tools. I decided to give it a try and see what options are available so I clicked on the Upgrade option and it gave me the option of connecting to the Internet and automatically downloading the latest version of the BIOS or installing it from a USB/Disk Drive. I selected the Network Install option and the system happily downloaded the latest version of the BIOS from the Internet and then gave me the option to Install the new version. I selected ‘Yes’ and the BIOS was upgraded.

The system had to reboot a few times for the upgrade to complete and there was a boot where the system played a bunch of beeps without anything coming up on the display which scared the life out of me but then it immediately rebooted and the display came back. After the upgrade completed I got a screen with a bunch of messages about BIOS settings needing to be reinitialized but when I went into the BIOS the settings were all there. So I rebooted and now all looks good and I don’t see any more weird error messages in the Console or the logs.

I am happy to see that the process to upgrade the BIOS is now so simple and I will be upgrading the BIOS more frequently going forward.

– Suramya

August 13, 2020

Penguin Poop Seen From Space Leads To Discovery of New Colonies

Filed under: My Thoughts — Suramya @ 4:16 PM

If we go back in time to 1957 and tell people that in future Satellites are going to be powerful enough to detect Penguin Poop from space they would look at you as if you were insane. However now due to improvements in the Satellite-mapping technology we now have the capacity to detect & identify Penguin poop from space. At first this might sound ridiculous and you might be asking why would we spend the time and effort to be able to identify poop from space. Basically the problem we are trying to solve is to locate penguin nesting sites to get an idea of how many penguins are there in the wild and how endangered they are currently.

Traditional methods involve going across Antarctica and other places where they nest to find their nesting places. This is very time consuming, expensive and at times dangerous. The first survey folks used sledges etc to travel across, then we moved on to using planes to view the area from the air now we can do it remotely without leaving the comfort of our homes thanks to the advances in technologies. The scientists used images from Europe’s Copernicus Sentinel-2 mission and were able to identify Eleven new Colonies of the Emperor penguin.

Satellite-mapping technology that detects stains on the ice from penguin droppings has revealed there are nearly 20% more Emperor colonies than previously identified in fast-warming Antarctica.

“This is an exciting discovery,” said lead author and geographer Peter Fretwell in a statement. “Whilst this is good news, the colonies are small and so only take the overall population count up by 5-10%, to just over half a million penguins.””

The discovery will be used by scientists who are monitoring the birds and raising concerns because they’re particularly vulnerable to sea ice melting from climate change… Scientists warned that most of the newly found colonies are in locations likely to be lost as the climate warms and large sections of seasonal ice — where penguins mate — risk disappearing. “Birds in these sites are therefore probably the ‘canaries in the coal mine’,” said Phil Trathan, head of conservation biology at BAS.

While its great that there are more Emperor Penguins than we thought they are still at risk of extinction due to Global Warming/Climate Change. We need to seriously spend more effort to combat Climate change and the time to make the changes is running out faster than we thought.

Source: Slashdot.org

– Suramya

August 6, 2020

Thoughts on Cybercrime in the Covid world

Filed under: Computer Security,My Thoughts — Suramya @ 1:07 PM

The Cyber Security industry has seen a massive boost during the current pandemic, with users working remotely for the first time and permissions granted on the fly the Security teams in the enterprise have been working round the clock to ensure critical data and systems are secure. But due to the general chaos of Covid combined with the need to keep businesses running there are systems that have been less than optimally configured.

All this gives us the impression that the Cybercrime world must be thriving in the current environment. But apparently that is not always the case, the Cambridge Cybercrime Centre has released a series of reports on how the Pandemic has impacted cybercrime. The reports are a fascinating read as they show how even the criminals are facing hardships due to the pandemic. For example, below is an extract from the report on the impact on International drug trade due to the shipping disruptions caused by lockdowns.

“The initial wave of COVID lockdowns in China caused substantial disruption to international shipping,compounded by the subsequent lockdowns in the rest of the world. Despite their ‘online’ character, drugscryptomarkets (online markets for legal and illegal drugs which are accessed securely through anonymitynetworks such as Tor) are reliant on the postal and shipping services for the delivery of drugs and precursorsto suppliers and end users. We have observed, in our scraped datasets of illicit online forums and discussionboards, evidence of significant disruption of these pathways, and a range of effects on these illicit markets.At the initial peak of lockdown measures, shipping times (especially in international routes which passedthrough China) were being routinely delayed by up to three months (as reported in cryptomarket discussions).This caused significant friction to international orders for postal drug delivery, with many dealers reportingthat they were switching to orders within the same nation only, and others struggling to source supply.”

Brian Kerbs from Kerbs on Security wrote a comprehensive article on How Cybercriminals are Weathering COVID-19 and its worth a read as well.

But apparently a number of criminal reshipping services are reporting difficulties due to the increased wait time when calling FedEx or UPS (to divert carded goods that merchants end up shipping to the cardholder’s address instead of to the mule’s). In response, these operations are raising their prices and warning of longer shipping times, which in turn could hamper the activities of other actors who depend on those services.

That’s according to Intel 471, a cyber intelligence company that closely monitors hundreds of online crime forums. In a report published today, the company said since late March 2020 it has observed several crooks complaining about COVID-19 interfering with the daily activities of their various money mules (people hired to help launder the proceeds of cybercrime).

The same is happening for real world crime also, Jani was telling me about this article on Goa where the local drug dealers are out of job because no tourists are visiting so they all are now selling fish to survive.

Well this is all for now. Will write more later.

– Suramya

« Newer Posts

Powered by WordPress