Records to Grid in Python

So one of the big problems I’ve had is how to convert data in recordset, from an SQL database into a grid so it can be plotted with Matplotlib. So you maybe asking what recordset is, well its where each entry is in a row.

Example

Recordset

X Y Z
0 0 1

Grid

Recordset

table.tr:last-child{background-color:black;}
table.tr.td:first-child{background-color:black;}

1
0 1
0 1
Advertisements

Ten Years and a Day…

An event that changed the world and so many peoples lives :/

In the Dark

Today is the tenth anniversary of the terrorist attacks that killed 58 people in London on 7th July 2005. Can that really have been ten years ago?

It seems apt to post this recollection again.

–o–

One summer morning in 2005 I rose early and left my house – I was living in Nottingham then – and took a train to London. I was quite excited. I was going to be interviewed later that day for a programme in the BBC TV series Horizon called The Hawking Paradox. The filming was to take place inside the Café de Paris near Piccadilly Circus, for the simple reason that it wasn’t used during the daytime, and would therefore be both quiet and cheap to hire. I was keen not to be late so I got a train that was due to arrive at St Pancras Station in London at about 9.30am.

View original post 269 more words

Bad Statistics, Bad Science

Wise words 🙂

In the Dark

I saw an interesting article in Nature the opening paragraph of which reads:

The past few years have seen a slew of announcements of major discoveries in particle astrophysics and cosmology. The list includes faster-than-light neutrinos; dark-matter particles producing γ-rays; X-rays scattering off nuclei underground; and even evidence in the cosmic microwave background for gravitational waves caused by the rapid inflation of the early Universe. Most of these turned out to be false alarms; and in my view, that is the probable fate of the rest.

The piece goes on to berate physicists for being too trigger-happy in claiming discoveries, the BICEP2 fiasco being a prime example. I agree that this is a problem, but it goes fare beyond physics. In fact its endemic throughout science. A major cause of it is abuse of statistical reasoning.

Anyway, I thought I’d take the opportunity to re-iterate why I statistics and statistical…

View original post 1,625 more words

Fit For Opps Its Summer!

USN Goodies

Ok, so back in January, I, like many people, maybe even you made that dreaded resolution to improve myself. Now its June I realise that I still avoid going the gym due to other commitments, eat far too much rubbish and consequently haven’t lost any weight at all!

My target was to slim down and loose about a stone, but maybe putting some muscle on. I have made some minor progress, increasing strength and times on the treadmill but the all illusive confidence hasn’t appeared. So I was surprised when this massive parcel from USN appeared for me out of the blue. The parcel was accompanied by a letter telling me I had won an Attitude competition for a USN pack. So here goes, I’m going to try some protein shakes, meal replacements and green tea extracts, along with a simple fitness plan and see if it works.

Science Speed Dating

So this week I went Science Speed Dating, the idea wasn’t to find someone who shares my passion for Python and Pussy cats but to inspire young local students about science and in my case astronomy careers.

I gave the students a short talk about what I do for a job, where I have been and whats its like to be in astronomy and allow them to ask questions. I got to discuss in detail with a student who is keen to study physics further and it was exciting to share some of my research with a young physicist.

Meg, a much loved pussy cat!

The last photo we tool of Meg

She Made It HOME!

Its been a whole week since I last saw my darling black cat Meg. I was getting ready to head out to work and the last thing I said is “Do you want to join in the car?” she bounded down the pavement as she always did, because she didn’t like the car, and I’m starting to accept that I will never see this ball of fluffy joy ever again!

Meg was a cat we rescued off a friend and she was very needy, but we loved her for it. She would walk me part of the way to the train in the morning, she would walk me to the corner shop and she would always be found asleep on my unattended MacBook. I’d never considered life without her, but I always knew she was my favourite cat. She was what I always looked forward to returning from a business trip away or even just a day at the office. From the moment I first met her I fell in love with her, and cam still remember settling her into my home.

We still don’t know what has happened to her, she could have been hit by a car although she was pretty street smart so its unlikely, become trapped somewhere in the neighbourhood, been taken in by some other family. Although she will never read this being a cat, but all her friends, including our neighbours who knew her, are devastated she hasn’t come home. She was a cheeky cat and an amazing friend, always there for me when I was down.

I would still really love her back, but sadly it looks unlikely.

These are some of her finer moments:

If you live near Church Road, Higher Tranmere and know anything about our little girl please help us find her, or what has happened. There is a reward for safe return. She maybe trapped in your shed or garage. She was last seen on Saturday, 12th June 2015, wearing her blue collar with name tag.

Network Launch

Ohhh we should have had one at LJMU

In the Dark

As promised, last night saw the launch of the new Sussex University staff LGBT network. I was quite nervous ahead of the event, unsure of how it would go.

LGBT_staff

In the end most of the people who said they would come did so,  25 people or thereabouts. The mailing list is over 50, but this is a busy time of year so there were quite a few who couldn’t come last night. In fact if there had been many more people it might have made it more difficult for people to have their opinions heard.

At least most of the food and drink was consumed…

nibbles

Anyway, we had a nice discussion of the things we might do and a few people stepped up to volunteer their time to help organize various events. Now for some serious work over the summer to get things really moving and plan a programme…

View original post 4 more words