SL4A stands for Scripting Layer for Android.
One of my deceptions with Android platform was the lack of Python support. Nokia (while supporting Symbian and Maemo) had a great commitment with Python support [audio]. In fact, SL4A isn’t just Python, it’s scripting language support for Android: it means that you can use: Lua, Perl, Rhino, TCL, [...]
When using dd it’s very common typos that f*ck your important data. I create this 5-minutes python code do wrapper dd and make my life more safe. The usage is simple, just a config file with partition(s) you should avoid. Suppose that you have 2 disks in your computer and want avoid playing both with [...]
This week I needed update some files on remote hosts. rsync is the tool when you need synchronize your files with a remote directory but I tried to use a different approach: a small Python script to transfer files on the same way scp do. I used paramiko module do access different hosts and transfer [...]
I’m a heavy user of command line interface and often named files without extension. This behavior forces me to use file utility every time I have doubts.
$ file stick-note1
stick-note1: ASCII text
When organizing my home/ I came across with many files like that, so I decided make this script to walk throughout files and check if it’s text file [...]
Yesterday I came across with an interesting contruction for IP address. Suppose that you want store the address ‘192.168.10.33′ no matter the dot.
192<<24|168<<16|10<<8|33
That produces
3232238113 (0xc0a80a21)
To return is just get the address in hex format and split in 4 sections. Means that: c0 (192) a8 (168) 0a (10) 21 (33). An example using Python generators to [...]
After a video demostrating the use of Python inside a Tex document. I decided to do a document explaining how to use, check it:
Embed Python Inside Latex (pdf ~ 100KB)
Update: I also published online through Scribd, check here.
I was trying some GCC options and decided see how they affect assembly code generated. I’ve created a simple Python script that parses .s output and put in a human readable way. Suppose the classical Hello World program. The output will be something like:
$ python stats_opcodes.py file
For Cortex-m3 (check previous post):
At my laptop (x86):
Download the script here.
From Python to silicon
Depois de uma longa história estou participando de dois um curso aberto sobre hardware: um abordando VHDL e outro Verilog. Até aí nada de novo, quando… descobri algo interessante. Algo que realmente motivou a mudar minha rotina de trabalho para (durante alguns dias) levantar as 7h. a escrever sobre o assunto aqui [...]