Python – Excel – How to merge cells with xlwt

October 13th, 2011  / Author: Greg Pinero (Primary Searcher)

The sheet object has this method:

write_merge(r1,r2,c1,c2,label,style)

Style and label are optional.

There is an example of its use here:

https://secure.simplistix.co.uk/svn/xlwt/trunk/xlwt/examples/merged0.py

Mini Searches with Answers

October 13th, 2011  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

Statistical Computing with R: A tutorial
This is a refreshingly straight-forward R tutorial. The first I’ve seen.

Requests: HTTP for Humans — Requests 0.6.2 (dev) documentation
Most existing Python modules for sending HTTP requests are extremely verbose and cumbersome. Python’s builtin urllib2 module provides most of the HTTP capabilities you should need, but the api is thoroughly broken. It requires an enormous amount of work (even method overrides) to perform the simplest of tasks.

Things shouldn’t be this way. Not in Python.

Basics: Master Control Genes and Pax-6 : Pharyngula
A very interesting discussion of master control genes. Did you know you can take a single squid gene, put it into a fly cell, and have it create a fly eye?

R Tutorials
These are supposed to be good R tutorials

Tags: , , , , , , , , , , , , ,

Pro Tips – Things to know before sealing a deck

October 9th, 2011  / Author: Greg Pinero (Primary Searcher)

I sealed my deck for the first time today. Here are some things I’d wish I’d known, or that you should know:

  • I used Thompson’s WaterSeal – Waterproofer plus clear wood protector.
  • It’s not really clear, it made the deck quite dark.
  • It needs 48 hours to dry and the nighttime low can’t go below 50 degrees Fahrenheit so watch the weather carefully.
  • I tried to use as little as possible but it still took 3 gallons to cover my 400-500 square foot deck. (The can said I’d only need 1.5 gallons)
  • Wear dish gloves, it will get on your hands and it’s hard to get off.
  • Buy an 8 dollar garden sprayer, I used it at the end but it would have saved me 4 hours, and it lets you apply a thinner coat.
  • Have mineral spirits (or paint thinner) on hand to clean up.
  • KEEP sealer far away from siding, don’t spray near siding. Now I need to figure out how to get it off the siding :-( I think I’ll tape newspaper over the siding next time.
  • Spray towards deck if you have a choice, that way excess spray will coat the deck.

Mini Searches with Answers

September 23rd, 2011  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

The Mouse as a Model System
This somewhat explains why a backcross experiment would be desired or necessary. It also explains some interesting ideas about genetics in general.

Autodesk Labs Utilities Project Photofly 2.1
Allows anyone with a digital camera to create near accurate 3D models from photographs using the web.

Django Model Field to MySQL Datatype – The Glenbot
This page tells you what MySQL datatype each Django model field type uses … as of 2009. It’s still pretty handy.
My search term was “django time field mysql datatype”

Tags: , , , , , , , , , , , ,

Fixing Django Error – Caught AttributeError while rendering: ‘datetime.date’ object has no attribute ‘date’

September 21st, 2011  / Author: Greg Pinero (Primary Searcher)

Just a dumb mistake I made that I thought I’d mention.

I was getting this Django template error after I changed a datetime model field to a date model field:

Caught AttributeError while rendering: 'datetime.date' object has no attribute 'date'

Well, it turns out I had left the Django field as models.DateTimeField. Once I actually switched it to models.DateField, everything worked fine.