Monthly Archives: December 2010

My Social Network: A Simple Connected Graph

My Social Graph

A Social Network, literally. The image above is my Facebook social graph; with my friends, my friends of friends and so on as the vertices connected by edges representing their Facebook friendships, limited only by members’ individual privacy options. You can click on it (a better idea would be to right-click and then do a “Save Link As”) to open a 32MB ultra high-res .png file where you can actually zoom in to read the names and stuff.

The graph’s split up into dense clusters of friends, corresponding to my current college, junior college and school. An interesting thing I noticed was Varun Vaswani, Chinmay Deshpande, Kunal Bhatia and Prashant Sriram happen to be my bridge vertices; if all four of you somehow just disappeared, or never existed, there would be no connection between my Facebook friends at Goa (The bottom BITS Goa cluster) and at Bangalore (the top-left Deeksha cluster and the top-right VNS cluster). I guess we’re all special and indispensable to each other in some way.

Image generated using a slight mod of the very intuitive fbfriendsgraph python script

GraphML With JUNG: Loading From GraphML

This is a follow up to my earlier post on saving to GraphML using the JUNG library. It would make more sense if you browsed through my earlier post before reading this one.

BufferedReader fileReader = new BufferedReader(
                            new FileReader(filename));

You first need to read from your file. This snippet creates a standard Java BufferedReader, which in turn is fed from a FileReader that reads from the file specified by the String filename.

Continue reading

GraphML With JUNG: Saving Out

This one of two posts I’m dedicating to saving out to and loading from GraphML using the JUNG library. These are two parts of a really good library that lack sufficient documentation.

GraphMLWriter<MyVertex, MyEdge> graphWriter =
                 new GraphMLWriter<MyVertex, MyEdge> ();

PrintWriter out = new PrintWriter(
                      new BufferedWriter(
                          new FileWriter(filename)));

You first need to create your writers. The first line of code creates your GraphMLWriter with your custom Edge and Vertex classes specified.

Continue reading

Cell Phone + Bluetooth = Webcam!

wireless webcam

While I’m posting the instructions specifically for Linux boxes, a little perseverance should have you running it on any box that’s supported! What you’ll need is:

1. A Linux/Windows Box
2. A Symbian/Android/Windows Mobile 6 Phone
3. The Smartcam DEB
4. The Smartcam Source
5. The file for your cell phone, you can select the one you need from here
6. The Smartcam Kernel Module Patch

Continue reading