Here are some basic steps to get a virtual ARM Development board which will allows to practice our embedded systems skills or test code / firmware or whatever we want to do but without the need of having a physical device. The following takes place in a Linux machine running on Virtual Box (512MB RAM), [...]
The simplest socket server, don’t know why but I always forget how bind is used in python. import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind(("127.0.0.1", 1024 + 666)) sock.listen(5) client, details = sock.accept() while 1: data = client.recv(1024) print "data : %s" % repr(data)
Short post to remind myself how to do HTTP requests using python, really easy stuff that I quickly forget. Straight forward example using httplib and urllib from python. In the example I just perform some kind of login request retrieve the session id and then other request sending XML data using POST. Code! Feel free [...]
As a toy project to play a little bit more with Python and accessing Twitter, I came out with the idea of calculating the Internal Fragmentation of user’s tweet. To interface with Twitter services I used the Twitter extension located at http://code.google.com/p/python-twitter/, which has a pretty straightforward API. The script shown below gives you back [...]