Monthly Archives: July 2015

Dumping data from Excel files

In my area of work, Excel files are the predominant form of data storage which is quite sad. And the amount of data kept in these files can be rather large. So I wrote a small python script to dump out the data in tab delimited form to STDOUT using openpyxl.

#!/usr/bin/env python

from openpyxl import load_workbook
import sys
import string

wb = load_workbook(sys.argv[1], read_only=True)
for ws in wb:
        for row in ws.rows:
                print string.join([ws.title] + map(lambda x: str(x.value), row), "\t")

Not bad for 4 lines of actual codes.

Esther having durians

Durian season is upon us and Esther seeing so many stores wanted to try it again. Ernest and her had a try one time after watching a Hong Kong TV drama where the cast had durians. They hated it and it is no different for Esther this time round.  

 

Lunch at Swensen’s

We had a good lunch at Swensen’s. The kids had fried chicken and a really creative dessert. It was a scoop of chocolate ice cream with strawberry and gummy worms in a bed of milo powder. It came with a shovel for digging. Really fun and creative. 

    
 

Another 3TB bites the dust

Another of the Western 3TB Green drive has bit the dust. The ZFS pool was running in degraded mode for the last 2 days or so. Got a 6TB drive to replace it and it is working fine now. Re-silvering will probably take the next 5-6 hours.

The defective disk was identified using zpool status and then the id of the new drive was provided to zpool replace using the syntax zpool replace data defective_drive_label /dev/disk/by-id/disk-id.

This is the second 3TB green to die. The last one failed about 3 months ago. Hopefully this is not a batch issue. So 2 of the 8 drives are now 6TB rather than 3TB. Another 6 down and I can double my storage.