About Matt

Cloud Systems Engineer at Reed Elsevier; cloud computing advocate, rock climber, swing dancer, amateur photographer, professional idiot....

Starting out with pyNEST

pyNEST is a python extension and interface for the NEST Neural Simulation Tool. I will be using it to create my models for the NEST simulator. My first task is to get familiar with pyNEST and its features.

So far with pyNest, I have been trying out the basics; creating a single neuron (as opposed to a population of neurons), a Poisson Generator (a stochastic function) to interact with the neuron and a voltmeter to record the voltage of the neuron.

It would appear that the Poisson Generators can have several different rates which have corresponding convergence values. To begin with, I created a Poisson Generator which had just one rate. I set the initial rate to 40000.0 and a convergence value of 1.0. I then ran the simulator for one second (1000 ms) with a heuristic output. This lead to a neuron which never fired, with its membrane potential hovering around the -60mV point. Neurons need to reach aprox -55mV to fire and discharge to the rest potential rate of -70mV.

I next modified the convergence value to 2.0. This had much more satisfactory results. The neuron fired and discharged with a frequency of 45/second (45Hz). The peaks had a very uniformed structure. Increasing the convergence rate further causes the neuron to fire more frequently. Increasing it to 3.0 causes a spike frequency of 93Hz, more than double then before. A rate of 4.0 gives a frequency of 128Hz which suggests that the difference in growth is logarithmic.

I also tried altering the initial rate for the Poisson Generator. I decreased the rate from 40000 to 30000 in steps of 1000. At each step the result was less spikes within the same timeframe until 31000 where the neuron ceased to spike, between 37000 and 31000 the curves became increasingly less uniformed.

Increasing the Poisson rate increases the number of spikes. Interestingly the ratio is exactly the same as when I altered the convergence rate. Multiplying the convergence by 5 (2.0*5 = 10.0) produces 252 spikes. Doing the same to the Poisson rate (40,000 * 5 = 200,000) gives the same result.

At this point I decided to add an additional rate to the Poisson Generator. On doing so, the effects were immediately clear; a secondary rate can be used to amplify or to counteract the first by assigning positive or negative values for its convergence. I used two identical rates, with identical convergence values, the firing frequency was greatly increased. Setting the second convergence rate as the negative of the first (2.0, -2.0) causes the neuron to not fire at all. Setting the convergence rate at a lower negative value reduced the firing rate, providing the second Poisson rate is set significantly lower than the first. While I can see these effects, I can not establish exactly why we would do this.

Questions:
  1. What are the values being put into SetStatus() for the voltmeter and why are they required?
  2. What is the final argument given in ConvergentConnect()? Only positive numbers, seems to offset the initial state of the neuron
  3. Why would we use multiple rates in the Poisson Generator?
  4. Is there any documentation for pyNEST?

First week back

This week was the start of the academic year proper. Still with that feverish bustle of freshers week, it was a hectic one. There is much to be done, people to see, places to get to. Something which takes just that bit longer now that the Roger Stevens Building is once again so overcrowded and congested. It is of course made worse by the fact that half the poor hapless freshers have no idea where they’re going. It has been quite comical seeing the familiar, bemused expression on their faces as they look across from lecture theatre 17 and wonder why they are now outside lecture theatre 20. I’m sure that’s exactly the effect the architect was going for.

Top of the agenda for myself and my fellow finalist Computing students was deciding our preferences for Final Year Projects. I know from bitter experience last year, that this is a daunting and often terrifying prospect. It certainly seemed to have hit a few people hard, it was getting to me even, despite the fact that I’ve been thinking about projects since before July. Even after the official deadline of 9am Friday, many were still stressing over what to decide.

As well as worrying about projects, we have already been given two pieces of coursework. The first being on the Tuesday, welcome to Third Year! Personally I do welcome this early coursework, despite the fact that one is an essay (I hate essays) as it does mean we can get some of it done now before our projects start, and before the torrent of other coursework that will undoubtedly follow in the next few weeks. I am taking 5 modules this semester, so the prospect of having 5 pieces of coursework and an FPY on the go does not sound fun to me.

I was appropriately reminded that for those lucky youngsters just starting their degrees, that this time of year is still quite literally a carnival. I went into the union yesterday to pick up some much needed stationary items, and was greeted by a ferris wheel and a burger stand parked outside the union. It’s all fun and games for some obviously, but not for me – its time to get some serious work done

Foxes

I used to see foxes all the time when I lived in London, they were always rather interested in making a meal out of the cat. However it has taken three and a half years for me to come across a Leodien fox, last night being the first time ever.

They seem to be a lot more timid then there southern cousins. Whenever I encountered a fox in London it took a good soaking from the water gun or a barrage of rubber bands to convince them that the tasty cat-sized meal wasn’t worth the bother. I wasn’t even able to get a photo of the fox I saw last night because the moment I opened the window it was off like a shot. I am quite surprised by the difference in attitude. I always thought of foxes as being cunning and bold, but it seems they can also be complete pussies.

I miss my old life (an ode to everyone I knew back then)

I miss Walthamstow and everything in it, and how it all was back in the day.

I miss my old flat; the dodgy peach wall paper, the dodgy cigarette smell, the tiny kitchen, the giant texaco sign in the hall way, the hole in the wall. I miss having the place to myself, I miss having all my buddies over, I miss being able to chose which. I miss my dad dropping by to get high with us.

I miss my job; I loved the people I worked with, some of whom I still talk to but others I will never see again. I miss the sense of purpose and belonging, I miss the responsibility, I miss having a wage, even a really shit one. I miss the Tryst on Friday evenings.

I miss the Garage; though it is still there it will never be the same again. I miss the freezing cold, the smell of dead chickens, the damp and mouldy sofas, the hot boxing.

I miss The Standard; I miss Supersonic, I miss watching bands like Route 215 and Cider, I miss the watered down Stella, the watered down steps outside the cab office. I miss the atmosphere, the people that I’ve met there. I miss getting so drunk I nearly fell into a coma.

I miss my friends; I miss Gaz (rest in peace mate). I miss Lee, Andre, Nathan and Claire. I miss Eddy, Damien and Sam. I miss Martin, Sarah, Al and Daryl. I miss Matt, Dave, Lewis and Saher. I miss Beccy. I miss Tessa. I miss Joe. When I think of all my best memories, you guys are all there. I miss going to the Dome and other dodgy clubs. I miss all the random parties, the random talks, the random nights down the pub and at the town hall.

I MISS MY OLD LIFE!

I know it does no good to look backwards, to dwell on the past. However, those who know me best might understand; the problems and issues that I am struggling with now didn’t start to manifest until I was about 21 and certainly didn’t become some troublesome that they interfere with my day to day life until recently. Since I came to uni, they have become so pronounced that I would give anything for them to go back to how they were before.

For that reason I can’t help but hanker for those good old days (even though I know they weren’t really that great) where everything seemed to work out, where I was able to relax enough to go out and enjoy myself properly. When I felt like I had everything and anything was possible and the stage was set for a bright future. Now I feel so jaded and dissolutioned that I look back at those days, shitty as they were, and feel that I’ll never have it that good again, that it’s all down hill from here and I have nothing to look forward to. I hate feeling this way, but its reality right now.

Weight Gain 4000

At the beginning of July, when I moved house, which brought with it “The Smoking Ban” I weighed an unhealthy 8st10, which at 5’9″ is underweight. However since then I have had such an increase in appetite which has craved non stop bacon and eggs, pasta and curries with loads of rice and bread, as well as the usual snacks. I have managed to bulk up to 10st6 in just two and a half months. I am happily reminded of an excellent South Park Episode 😉

“Say it with me, beefcake! Beefcake! BEEFCAKE!!”

Mind Your Manners pt II

Also last Friday, when I went to see Bad Manners (see pt I) CJ and I stopped off at Santiago’s Bar which across the way from Rios before heading home after the show. As I walked in  I saw a familiar face; one with twitching eyes, framed with gaudy purple hair and contorted in an expression of mixed rage, frustration and fear. Guess who?

Their have been several occasions recently where I have nearly bumped into Claire but this was the first where our paths actually crossed since her least appropriate exploits after our little falling out. Despite these I merely smiled, waved and said hello, then turned away to talk to some people we knew. I thought Claire might either come over and start an argument, but she simply ran off to find her boyfriend (poor sod) and high tailed out of the bar.

I thought that was the end of it, though at 1:48am I received the following text message:

Why do you not fuck off and die abit like your parents did. It would be t best thing t world has ever seen!

Those who have been readers of Chris Worfolk‘s blog for a while may recall the similarity to what she’d said to Chris et al last May. Now I could get angry about it, but all I really felt was pity for Claire.

She moved out because she was too inept at trying to resolve an issue and so simply ran away. She blamed me for this. She then had no success in finding someone to take her room. She blamed me for this as well and resorted to endangering the life of my cat to try and punish me. As I understood it, she was even incapable of holding down a warehouse job for three days (she did not leave, she got fired) and has, ever since moving out, been sofa surfing. A year later she is still homeless and jobless. She has not even been able to think of any better insults and hurtful comments in a whole four months.

The girl needs some serious help. Oh well, her spiteful issuing did not detract from my night out and I certainly didn’t lose any sleep over it.

Mind Your Manners Pt I

Last Friday was an excellent night out. My cousin CJ and I went out to Rio’s night club for the first time since he finished working there. The new tech manager who took over from CJ is a good friend so we were still able to get in for free 😀 .

The event on that night just happened to be Bad Manners, a celebration gig on Buster Bloodvessel’s 50th birthday. For those who do not know, Bad Manners are a ska revival band, part of the scene in the mid 70s/80s which also saw such acts as Madness, The Specials and The Selecter. The exploits of their front man, Buster earned them considerable notoriety. They still tour and host an annual music festival in Bedfordshire titled Bad Fest.

In 2006, CJs band, ‘The Attic Project’ (along with their roadie crew, which included yours truly) was invited to play at Bad Fest alongside The Beat, The Selecter along with Bad Manners themselves, who headlined the festival. It was at this event that I first saw Bad Manners and their incredibly entertaining show.

When Buster first walked on stage at Rios last Friday and started the show with his signatured chant “This…IS…Skaaaa!” I was immediately reminded of the first time when I saw him on a much bigger stage in an old airfield.

The show was no less impress despite this. The crowd was just as lively as you’d expect them to be; jumping, skanking and moshing all over the place, chanting “You Fat Bastard! You Fat Bastard!” at Buster, which he actively encourages (note that it is bar-stard not bass-tard even though we are in the north, as Buster is from Hackney). It was the first time in ages that I’d been n the middle of such an atmosphere and I enjoyed every second of it. It did make taking photos particularly difficult mind, so this was the best I could manage from the balcony above.

Not that I really needed more photos of Buster mind you. When we were at Bad Fest we met Buster in the bar backstage along with all the other bands. It really made me wish we could back to that time, it was an amazing experience, one we’re unlikely to be able to repeat these days. Still, I was happy to be able to enjoy the atmosphere last Friday anyway.

I ♥ Python

Oh what a wonderful language it is!

Whenever I start up my Windows desktop, it is programmed to wake up my Linux server where I keep all my music and movies. I often make the mistake of just opening up Winamp and expecting it to play whatever I choose from the media library. The reason this does not work, fundamentally, is because Windows is shite (on several counts in this case); The only way to automate tasks at startup is through the autoexec.bat batch file which means that if it tries to reconnect to a mapped drive at that time, it obviously fails as the server takes just over 40 seconds to boot. So I do not do this, instead I have to connect by opening the drive.

Having to remember to do this every time has been pissing me off. Today I’d finally had enough and decided to find a way to make the autoexec.bat file check if the drive is available, if not wait 60 seconds and set up the mapping. After looking into how to simply wait 60 seconds in Batch, I shuddered and heard a voice (which was actually George) say “If you’re gonna script, do it in Python!”. Excellent advice as the code to do it in python is import time, time.sleep(60). I had another problem though, again due to Windows’ inadequacies;

Unlike *nix, Windows does not have comprehensive command line tools. It is supposed to sometimes but its attempts are feeble! Try running net use <drive> <location> <user> on a letter already assigned and you will be in a world of pain! Even if you don’t it still seems to completely b0rk the gui created link to the drive and so still screws everything up. Excellent work! Luckily pyWin32 with its array of API extensions can handle this flawlessly.

One final problem here though is that using this script meant having my username and password for my server in plain text on a Windows machine. Not a good idea! Oh well, a distutil extension called py2exe sorts that out. It isn’t perfect as it turned a 500byte script into a 3.5Mb .exe file (its includes a python interpreter and deppendancies so it can run on systems without a python install) but still, a small price to pay to have a 2 line autoexec.bat file which wakes up the server, waits 60 seconds and connects the drive.

I ♥ Python!

Happy Birthday CJ

On Monday, it was time to celebrate my cousin’s birthday, which wasn’t actually until the next day but it was also his leaving do from Rio’s Night Club as well as a day that most people could make it.

We started out at Rio’s, where the proprietor, known as Ziggy to the staff, treated us all to free drinks to start the night off. From here we moved on to the Verve bar which was just across the road for posh beer, or in my case gin cocktails 😛

After this we headed on down to the Fab cafe where we lasted out most of the remainder of the evening. Whilst fun, the night so far was quite uneventful; except for one twat being a complete dick to one of the girls, resulting in her running for a cab, crying. Nice one dude! It wasn’t until the remaining revellers joined CJ and I back at our flat that things started to descend into the sort of chaos we’ve become accustomed to.

A few members of the Rio’s staff who had keys to the stock room, went on a booze mission (apparently with permission), returning with what looked like a lot more than they’d been allowed; People started getting mischievous, occupying the bathroom for long periods (and the garden at one point); I found some blue liquid on the table, which I tried tasting only to find it was thread sealant (not nice!); everyone was becoming totally incoherent not least CJ himself. This was the state of him, at the end of the night.

By the time I said goodbye to the last guests who were not already unconscious in the living room it was light outside. I wasn’t quite sure what to make of the sight I saw across the road, though I was sure that our neighbours were going to be less impressed. I actually found it hilarious but then it was not my car.

I think most people over did it that night. CJ, myself and at least one other are still feeling rough two days later. Not entirely surprising given the list of alcohols we each got through which included absinth, poitin, vodka, gin, lager, ale, apple sourz and jagermeister. Ouch!

I can has change plz?

Yesterday I was feeling decidedly under par. I did not feel like cooking, in fact I didn’t even feel like entering the kitchen given its post-party state. So I ordered myself some takeaway from my preferred establishment. As usual the guy on the phone was polite, as usual the delivery was lightening quick, but that’s where usual stopped.

Despite the fact that the takeaway is based just up the road, the delivery driver had to phone me to check he was on the right street and asked me to come outside. This reminded me more of how dodgy drug dealers (as opposed to reputable drug dealers) operate.

When he finally located my house and parked up, he handed me my order and asked for the £3 I owed. On opening my wallet I realised I only had a £20 note, which is often annoying to delivery men (presumably because it uses all their float and they have to return to base) it has never really been a problem. This guy however was really annoyed.

He first tried to give me £5 short (after counting out £2 in 10p & 5p coins) insisting, in the worst English I’ve yet heard from a delivery man (and that’s saying something), that he would return with my change. As I was not at all impressed with the guys performance, even before he started getting stroppy about the £20 note, I declined, handed him the change he had given me and the takeaway, and took my £20 back, and told him to come back with more change. Surely not a big deal if he was going to come back anyway to give me an extra £5, right?

Apparently not. The guy didn’t refuse, but he was not at all happy. He tried to tell me that if I’m only ordering £3 worth of food I should make sure I have a £10 note. Is it just me that feels that is taking the piss? I mean surely if you are running a takeaway business, its not much hassle to give your delivery drivers enough change to handle a £20 note. If I’d tried to pay with a £50 that’d be one thing, but a £20? According to this idiot though, that is the responsibility of the customer! What a wanker.