Encoding Bangla (Unicode) SMS for SSLWireless in Python

If you are wondering why you cannot send Bengali text encoded in Unicode properly through the SSLWireless Push API in Python, well you are not alone. The solution is, encoding your UTF-8 text into UTF-16 (Big Endian) and then taking the hexadecimal value of it, transformed into uppercase.

Continue reading Encoding Bangla (Unicode) SMS for SSLWireless in Python

Simple Python Profiling with IPython

Profiling is imperative to understand your application. However, getting started with profiling might seem to be a steep learning curve; but it doesn’t have to be! IPython has a lot of built-in magic commands, and some of them are helpful to profile your Python code. %timeit and %prun are among the ones I found most useful. Continue reading Simple Python Profiling with IPython