Suramya's Blog

Visit suramya.com Who am I?

April 20, 2014

Facebook Stat generation followup

Filed under: Computer Tips,Linux/Unix Related,My Thoughts,Techie Stuff — Suramya @ 2:16 AM

In my previous post I had talked about some of the stats I pulled from Facebook about it’s usage by my friends. This was an ad-hoc number crunching done just because I was bored and got curious. After the post went live a friend of mine, Ankush asked for more details on how I generated the numbers so in this post I am going to go over my process and how I got the numbers I shared.

Before we start, keep in mind that this is all data that is publicly available on FB, or at least shared with me. If you don’t want others to generate data about your activity on FB, you should change your privacy settings on FB and restrict access. Please don’t try to use this information to try to get access to data you are not supposed to. You will get in trouble and I will not take responsibility for it. Now that all that is out of the way, lets get to the details of the process.

The first thing you need is to have the Facebook Command Line client installed. Instructions on how to install are here so I am not going to repost them here. Make sure you authenticate the install and follow the steps in ‘Obtain Additional Authorization’ section of the installation guide otherwise the rest of the guide won’t be of much use to you.

Once you have FBCMD installed and configured, you can start playing with the options. Check out fbcmd Commands for the list of available options. You can also run the script with –help for the same.

/usr/bin/php /var/www/fbcmd/lib/fbcmd/fbcmd.php --help

Since I was interested in the photos uploaded the first command I ran was:

/usr/bin/php /var/www/fbcmd/lib/fbcmd/fbcmd.php OPICS =all FB_Pics

This command gets all the photos uploaded by folks in my friend list and downloaded them to the FB_Pics folder. As I mentioned in the previous post, this downloaded over 58k photos to my system. So be careful when you run it. You can also restrict it to a particular user by passing their name as a parameter.

To get the wall post count’s of all my friends, I ran the following command:

/usr/bin/php /var/www/fbcmd/lib/fbcmd/fbcmd.php FINFO wall_count =all

This gave me a output similar to the following:


NAME WALL_COUNT
Suramya Tomar 247
ABC 1405

I took this output, put it in an Excel file and did some analysis on it to get the max post count, least post count, Total count and top 10 user post counts. I could have done this using shell commands as well, but since this was a one time task I didn’t see the point. Maybe in the future I could set up a job that would do this periodically and do trending on the data but lets see. I don’t see much use for this data except for the coolness factor and to satisfy my curiosity.

Getting the birthday count was as easy as running the following command:

/usr/bin/php /var/www/fbcmd/lib/fbcmd/fbcmd.php FINFO birthday_date =all |wc -l

This returned the number of folks who had shared their birthday’s on FB and then I got the current location count using the following command:

/usr/bin/php /var/www/fbcmd/lib/fbcmd/fbcmd.php FINFO current_location =all |wc -l

So there you have it. This is how I generated the numbers I had posted earlier. As you can see there is nothing too complicated about it, so if you want you can generate similar stats for your friends as well.

Let me know if you have any questions and I will do my best to answer.

Well this is all for now. I should go and get some sleep now.

- Suramya

April 19, 2014

Some stats & numbers from my friends on Facebook

Filed under: My Life,My Thoughts,Techie Stuff — Suramya @ 1:54 AM

A few days ago I was trying to get a download of all the photos/events I was a part of from Facebook just so that I have a local copy of them. After looking around a bit I got the bright idea of using the Facebook Commandline interface that I was already using to sync the blog to the site. Instead of running it for only photos I was tagged in, I thought it would be easier if I ran it for all photos my friends had uploaded and then remove the ones where I am not there and events I wasn’t part of. I kicked it off at night before I went to sleep expecting it to have completed by the time I got up. The download ran for almost 36 hours and downloaded over 58,000 photos.

Keep in mind that these are all photos that I have access to on Facebook i.e. I can view the pic by clicking on the photogallery of the person that uploaded the photo. There might be more pics posted by these folks that I don’t have access to which are not accounted in this total.

The time it took to download it all wasn’t the most surprising part, that was for the number of photographs I downloaded. I have ~250 friends on Facebook and between all of them they have uploaded over 58k photos. Yes you read that correctly over 58,000 photos totaling about 4GB in size. Looking at the number of photos I just deleted all of them as I don’t have the time or energy to go through all of them searching for photos of me. I will at a later time kick off another download which will be restricted to only photos where I am tagged.

Once I got these numbers I got curious to see what other numbers I could get while looking at my friend circle. So I tried getting the number of wall posts that were made by friends. For some reason I only got results for 206 friends when I ran this query, which could be because of many reasons, most likely of which would be that these folks have blocked the access for the program to look that their post count, or they haven’t made any posts (which is highly unlikely). These 206 friends made a total of 89182 posts to Facebook with the highest no of posts being 3047 and the lowest being 4 with an average of 432.9. My post count is 207 in case you are wondering. 164 friends publicly shared their birthdays on FB and 187 of them posted their current location. (Not sure how accurate that is, but I did get GPS coordinates with the results…)

I am sure there is a lot more data I can pull out from FB, if I felt like it. But this is about as far as my desire to collect this data goes. I knew people posted a lot on FB but these numbers are way over what I thought the count would be…

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

- Suramya

March 26, 2014

Using E coli to build futuristic materials

Filed under: My Thoughts,News/Articles,Techie Stuff — Suramya @ 1:44 AM

Back in 2000 I had written an article for NJIT’s college newspaper ‘The Vector’ about how boffins at the University of Texas were using viruses to create semi-conductor chips. This weekend I was going through my files and I found a scanned copy of the article that I had been meaning to transcribe and post on the site but never got around doing, Then today I had a story about MIT researchers using Bacteria to assemble furniture pop-up in my feeds so I had to write a post about it. :)

Specifically, the MIT researchers were able to put bacteria to work producing conducting biofilms, some of which were studded with quantum dots, and arranging gold nanowires. This paves the way for the development of mass manufactured cell-based material factories, and even “living materials” that have some of the desirable properties of bones or trees, Lu confirmed.

They were able to do this by using E. coli, which naturally creates biofilms containing amyloid fibril proteins which, somewhat like the hooks in Velcro, help it attach to surfaces. The hooks on this gloopy velcro are made from a repeating chain of protein units called CsgA, which can be modified by adding peptides, which can be used to let parts of the film capture specific materials, like gold nanoparticles.

Basically the researches were able to make the bacteria grow in a particular design using a genetically engineered strain of CsgA, opening the way for future generations to be able to create bio-engineered equipment on demand. One of the things that is a bit scary is that they are using live bacteria for this experiment so they would have to be absolutely sure that they don’t mutate and cause a potential outbreak down the line.

I don’t know if this research is going to go anywhere or will it become another curiosity like the story on chip manufacture in 2000′s that never really went anywhere after the initial story. I did a cursory search today on that story but didn’t find any follow up articles or papers on it. Guess not every initial success is followed up by later successes and commercial successes.

Thanks to Slashdot and The Register for the original links.

- Suramya

March 4, 2014

MIT wants you to Peel a Pine tree branch if you need a water filter

Filed under: Interesting Sites,Techie Stuff — Suramya @ 1:12 AM

Boffins at MIT have run some tests and found out that if you peel the bark off a Pine tree branch and pour water through the stick, then it will block upto 99% of e-coli bacteria and a host of other bad stuff giving up to four liters of drinkable water per day. This makes it a lot cheaper than any current commercial water filtration implementation in the market and a lot more scalable.

Dirty water is a major cause of mortality in the developing world. ‘The most common water-borne pathogens are bacteria (e.g. Escherichia coli, Salmonella typhi, Vibrio cholerae), viruses (e.g. adenoviruses, enteroviruses, hepatitis, rotavirus), and protozoa (e.g. giardia). These pathogens cause child mortality and also contribute to malnutrition and stunted growth of children.’ People have been working on engineering cheaper and cheaper filtration systems for years, but now a group of researchers has found a promising and simple solution: a tree branch. ‘Approximately 3 cm^3 of sapwood can filter water at the rate of several liters per day, sufficient to meet the clean drinking water needs of one person.’

Of course there are some caveats; the system can trap most types of bacteria, the smallest of which measure about 200 nanometers but currently cannot trap viruses most of which are much smaller in size. Also, the stick needs to be kept wet or the filtration is not that effective.

The researchers have published a paper in this week’s journal PLoS ONE where they go over their findings and demo this functionality. Check it out if you have some time.

I am definitely adding this to my things to know in case of an emergency list. :)

Thanks to Slashdot for the initial story.

Additional reading: Need a water filter? Peel a tree branch – MIT News Office

- Suramya

July 24, 2013

My RaspberryPi Camera module finally arrived and it works great!

Filed under: Computer Hardware,Linux/Unix Related,My Thoughts,Techie Stuff — Suramya @ 2:06 AM

After months of waiting (about 2 to be exact) my RaspberryPi Camera module finally arrived today and I took it for a brief spin. Setting it up was really easy, I just installed the Rasbian image I have, updated the install to the latest version and then enabled the camera. Once that was done and I rebooted the Pi, the camera started working without any issues. The instructions I followed are at: RaspberryPi Camera.

As part of the test I got the pi to transmit the images to my desktop and the clarity was pretty good, there was a slight lag in the display of about 1/2 a second but at 1080p I don’t think I can complain. Below are some pics I took of the setup and of the image being streamed to my desktop.


The Camera module next to my keyboard for a size comparison


Photo of my hand being streamed live to my desktop from the Pi.

I do plan to take pics using the camera module itself, but there is nothing interesting on my desk that I wanted to take photos of so you will have to wait for a day or two and I will take pics of the view from my window and post.

Well this is all for now, I should go get some sleep now considering I have an early start tomorrow.

- Suramya

April 16, 2013

Adafruit launches educational show aimed at kids

Filed under: Computer Hardware,My Thoughts,Techie Stuff — Suramya @ 4:11 PM

If you are like me you love tinkering with technology and honestly speaking there is no age too early to start teaching kids about electronics and how they work. Adafruit has launched an educational show aimed at kids which is going to be a episode based series and their first episode is titled “A is for Ampere” and teaches the basic theory behind electrical current.

If you have young kids in the family, you should definitely check it out. I am going to try get Vir hooked on to it once he reaches the age where he doesn’t try to eat everything that is given to him. Don’t think Surabhi and Vinit will be happy with me if he manages to swallow a diode or a capacitor. :)

Source: Adafruit Launches educational show for Kids

- Suramya

March 30, 2013

Will you get fired over your Twitter history?

Filed under: Interesting Sites,My Thoughts,Techie Stuff — Suramya @ 6:00 PM

Ideally you should know if you have posted something online that will get you fired, but as we all know there are people in the world who are a bit slow and need extra help in figuring out stuff. So for these people there is a new web service called “FireMe! Who wants to get fired?” that goes over your tweets and uses an algorithm to figure out the chances of you getting fired if you boss reads your Twitter history.

Personally I think that if you need help figuring out whether you said something online that will get you fired then there is a high chance that you actually did post something which will get you fired. :)

According to the site, they are doing this to raise awareness about the dangers of public online data. Plenty of folks have been fired for things they posted online. Don’t become another statistic, post responsibly.

Thanks to PopSci for the initial Link,

- Suramya

March 28, 2013

A Wedding ring that reminds you of the Day of your anniversary by burning your finger.

Filed under: Humor,My Thoughts,Techie Stuff — Suramya @ 1:05 AM

Found this while surfing the web. This is not an actual product yet but once it’s available I think people who don’t know how to setup a reminder on their phone or online (I use google Calendar), are really forgetful and like pain might want to invest in this. As per the site once the ring is on sale you can buy it for a measly price of $760 only.

From the product description:

If you’re prone to memory lapses — or simply have too many secret second families on the side — then you may want to consider the Remember Ring. Here’s how it works: A full 24 hours before your special day begins, a “hot spot” on the ring’s interior will begin to warm up to 120º F for approximately 10 seconds. And in case that doesn’t do the trick, the ring will continue to warm up every hour, on the hour, all day long!

120 Deg F (~49 Deg C)! Ouch… I think I will stick to my SMS alerts and reminders. :)

Thanks to Gadget Lab for the link.

- Suramya

March 24, 2013

“Cloud haters: You too will be assimilated” – Yeah Right…

Filed under: My Thoughts,Techie Stuff — Suramya @ 10:39 PM

Cloud Computing is the supposedly ultimate in computing experience where all data is stored on online central servers and all you need is a computer with internet connection to access the applications/data. People keep talking about this as if this is something new but it’s not. If you remember the era of computing before personal computers became popular that is exactly what they used (albeit on a much smaller scale and with lesser speed). So its not something new, and it’s not something that will fit all use cases. Today I read an article on ZDNet where the author (Jason Perlow) talks about Cloud Computing and basically tells us that we should stop whining and embrace this new and great technology because we don’t have a choice. My response: *yeah right*.

Don’t take me wrong, Cloud computing has its advantages, but it has it’s disadvantages as well. Telling folks who point out the disadvantages that their complaints don’t matter and that they have to come on to the bandwagon no matter what is irresponsible and potentially dangerous. You should go read the article and see what Jason has to say about this. I am not going to nitpick on his article as he is entitled to have an opinion. :)

Here are some reasons that I think you need to be careful about Cloud computing:

Data Access Control/Security: When I have a document on my local computer, I control who can see it. If someone who I don’t want to see the document wants to view it, they will have to break into my computer, steal it, put a court order or something similar. The same is not the case with data stored in the Cloud. In that case the company you are using to store the data controls who can be granted access and for what reason. A government can send a legal request to your provider or a bored employee can decide to check out what you have stored in the account. The company hosting the data will react based on what is best for them and not what is best for you. If you got a court order to share your data then you have to option of contesting it but if your provider gets the same order they will comply with it because it’s easier for them.

Secondly, people target the cloud servers because it’s a bigger target and the payoff is much larger if they manage to break in. They don’t care about your ‘secret recipe’ or your financial documents so they won’t target your computer specifically, but if they break into the Cloud server they get all that and a whole lot more so plenty of folks will be trying to break in.

One of the common responses that some people give when we talk about people breaking into cloud servers is that these companies hire some of the smartest people in the industry so your data is safe. However that is not true as it only takes one vulnerability and since no system is perfect sooner or later someone will get access. The more the no of people trying to break in the higher the chances are that someone will succeed.

System/Service Availability: You spend a couple of days uploading your data to a cloud based service, what guaranty do you have that the company won’t decide that it’s not worth it and shut it down? It’s happened too many times in the past for anyone to claim that this is not a possibility. What if you have a critical presentation and Google Docs has an outage, or your ISP (Internet Service Provider) has an outage? It has happened multiple times this year (e.g. Google Drive , Microsoft Cloud Storage.

Personally I don’t like access to my data dependent on others. I have been burnt multiple times by that in the past so I prefer running my own services whenever I can and keep multiple backup copies of stuff I have put up online.

Any new technology has it’s downsides and we should be aware of the risks before we start putting all our eggs in the same basket.

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

Original source: Cloud haters: You too will be assimilated | ZDNet.

- Suramya

March 12, 2013

Does your Handwriting suck? Now you can have a machine write for you.

Filed under: My Thoughts,Techie Stuff — Suramya @ 1:20 AM

This is something I really need. :) Those of you who know me, know that my writing is horrible and most of the time only I can read it. Here’s an invention by students from Olin College that solves this problem. Meet Herald, a machine that can produce beautiful calligraphy.

The machine uses a gantry to move the writing tip along the X and Y axes. The flexible-nib calligraphy pen is mounted on a sprocket which rotates the tip onto the writing surface, taking care of the third axis. The rig was beautifully rendered from their CAD drawings, then tweaked to ensure the smoothest motion possible before the quintet of Sophomores began the physical build.

Check it out in action at Herald Calligraphy. Now if only someone makes a portable version of this, I will be all set :)

Thanks to Hackaday.com for the initial scoop.

- Suramya

Older Posts »

Powered by WordPress