The beauty of Bitcoin P2P network

So, in the last days I just releasedProtocoin, a framework in pure Python with a Bitcoin P2P network implementation. While I’m in process of development of the v.0.2 of the framework (with new and nice features like Bitcoin keys management – you can see some预览在这里) I would like to show a real-time visualization I’ve made with Protocoin andUbigraphof a node connecting to a seed node and then issuing GetAddr message for each node and connecting on the received nodes in a breadth-first search fashion. I’ll release the code used to create this visualization in the next release of Protocoin as soon as possible. I hope you enjoy it !

Color legend

Yellow= Connecting
Green= Connected
Blue= Disconnected after connection


Python: 3D real-time debugging and function call structure

Here is two videos of a small script (python and xmlrpc calls to ubigraph visualization server) created to show a 3D graph of the function call structure of a python application, the first shows only the structure created while running the application and the next video shows a debugging-like tool, it changes the node color to red when the function is called, and the labels shows: function name, python file name and the line on the python file where the code is.

Update (26/02):download herethe script source-code.

来use the script, start the Ubigraph visualization server and add the profile module to your python application, it will looks like this:

import prof3d def run_main(): # your code if __name__ == "__main__": prof3d.profile_me() run_main()

Twitter in 3D !

我正在做一些测试Ubigraphdynamic graph visualization tool and I have this idea to use the Ubigraph tool to render 3D graphs of Twitter friends on real-time. Follows the video of the scripting utility I’ve created, it starts with a red node ofyour twitterand when you click, it shows your friends, when you click on your friends, it shows their friends, and so on. I think it is interesting those social network graphs, when I got more time I’ll put more ideas on the pratice =)

Update (26/02):download herethe script source-code.
来use it, you must install python-twitter, use the easy_install:

easy_install python-twitter

I’ve tested with Python 2.5, but it should works on 2.4 and 2.6 too.

Start the Ubigraph visualization server and run the script. The syntax for the script is like this:

python -u username

You can get a help using:

python –help