Blog

Celebrating Songkran 2013 in Chiang Mai, Thailand

April 19, 2013

I came to Chiang Mai without even knowing about this festival called “Songkran.” Songkran is basically Thailand’s New Year’s Day celebration (except it’s 3 days long), and probably the biggest and most famous festival in the country.

It’s officially celebrated on April 13-15, but you can see people celebrating it a day early. You celebrate this festival by throwing water at each other while drinking and partying. From what I’ve heard, Chiang Mai is the …

A simple Python program for exporting a list of dictionaries to a PDF table using ReportLab

April 16, 2013

I’m currently working on a project where I need to generate some reports in PDF format. Pretty much all of them use tables to display some data from a database, so I created this small program for easily exporting a list of dictionaries to a table in a PDF file.

data_to_pdf.py

from operator import itemgetter

from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib.units import inch
from reportlab.lib.pagesizes import letter
from reportlab.platypus import Paragraph, …

How to submit a form in a POST request using JavaScript

April 16, 2013

I was working on a Django project a couple of days ago where I needed to use JavaScript to submit a form in a POST request. The response of this request is a PDF file generated with ReportLab. I wanted the browser to prompt the user to download the file or open it in the browser in another window.

I was trying to do this with AJAX at first, but apparently you’re not really supposed …

Cost of Living in Chiang Mai, Thailand (Month 1)

April 4, 2013

I’ve been living in Chiang Mai for just over a month now. Below are my living expenses from March 4, 2013 – April 3, 2013 (31 days). I’m using an exchange rate of 1 USD = 29.50 THB, which I estimated to be the average exchange rate as the rate during this time fluctuated around 29.20 to 29.90.

My total expense for this period was around $887. I budgeted $1,000/month here in …

Searching for an apartment in Chiang Mai, Thailand

April 3, 2013

Chiang Mai is a popular city for digital nomads due to the low cost of living, relaxing atmosphere, and lots of coffee shops to work from. Many stay here for a few months to work on projects and renting a fully-furnished apartment monthly is usually the way to go.

It’s good to have some idea of which apartments to check out before arriving in Chiang Mai to speed up the process. I recommend you stay …