Monday, July 30, 2012

Handy trick for using django runserver/testmaker on remote server

Thanks Bart for showing me how to have a local version of django running on my VPS.

On the VPS start django as required, eg

python runserver
python testmaker -a web

Now do this from a command line where is your vps ip:

ssh root@ -L 5984:localhost:8000 -N

enter the password and it should not come back with anything.

Now go to this URL and your website should start


Wednesday, July 25, 2012

What to do with a 17lb turnkey when there are only three of you for Christmas?

Due to unforeseen circumstances, we had less people and a bigger turnkey than planned. And we are not big eaters. So father butchered the monster into breasts, legs and carcass and we cut a small piece of one of the breasts and roasted that. Very tasty is was too and we split the leftovers between us to make at least a further mean each. So what was I going to do with the huge bowl of left over bits? After a bit of googling I came up with this recipe and am very pleased with it.

Turkey Burgers for the Freezer

Amounts approximate!

Cut up the raw turkey into chunks and whizz in the food processor to turn it into turkey mince.
20% (5 biggish onions) of turnkey mass in onions. Chop in food processor and fry gently and leave to cool.
10% (10 pieces) smoke streaky bacon add to onions and cook quickly. Didn't brown.
10% (1 large) cooking apple chopped.
1 clove of garlic, chopped finely.
1 inch cubed of ginger chopped finely.

Let the cooked ingrediants cool down and then mix all together.
Using polenta meal to coat the burgers, (Was going to use semolina, as recommended by Nigella for roast potatoes, but none in the shop. Polenta worked very well as an alternative.) I used a burger making device to form the burger and put on a baking tray coated with polenta. Freeze then take off the baking tray and put into plastic bags, ready for that need for a quick wholesome meal.

D3 Nest function - converting csv data to nested data for treemaps etc.

Just finished 8 examples of how to use the javascript visualisation library D3 nest function - notes to self really, but shared in case they are useful for others. to see the code to see all the examples run.

Thursday, July 12, 2012

Simple D3 examples to try

I learn by looking at examples and then trying to modify them to do what I want. I've started creating little gists to record how use different features of d3. In case they help others, here is a start. They can all be run in bl.ocks

Processing CSV strings and files and grouping with nest:

  • - processing csv string 
  • - processing csv file 
  • - nesting/grouping to two levels

Drawing Axes:

  • - simplest possible
  • - date axis
  • - prettified, angled date labels and uses extent
  • - rescale an axis using a transition