The mystery of the forest cage

On one of the runs to work this week, I came across this small fenced off area in the middle of bushland.

2013 08 05 08 27 39

It’s odd: there is nothing obviously special inside the cage: no unusual vegetation, no animal habitat, no gold mine shaft. It is well padlocked and (I think) recently constructed, but there is no signage to explain its purpose or owner. I love a mystery!

Posted in Local and/or General, Running | Comments Off on The mystery of the forest cage

Gorge-ous

Salomon trail run #2 – Plenty Gorge.

There are five things you need to know if you are going to do the long course here next year.

1. There are hills. Short, sharp hills. Nasty little buggers. And lots of them.

Plenty gorge altitude

 

2. There are four river crossings. Calf to knee deep. You need shoes that drain well.

3. On a cold, windy winter’s day as you wade through the fourth river crossing, you will question your sanity and ask why you didn’t stay in a nice warm bed. 

4. You’ll find yourself running along the top of a beautiful gorge in suburban Melbourne, watching kangaroos bounce by and realise that you are actually quite sane and that life is good… even if you are running in wet shoes!

5. Trail running shoes are your friend on this course. I learnt that the hard way last year when the shortened course was a mud bath.

Bring on the Silvan 21km run later this month. 2 runs in the series down, 2 to go.

Posted in Running | Comments Off on Gorge-ous

Highlights of PyCon AU 2013

One day of miniconf, two days of conference, two talks and two days of sprints later and I am exhausted!

Some of the highlights for me, in no particular order:

  • The Django core developer panel discussion at the DjangoCon AU miniconf – intelligent, insightful, interesting
  • Lex Hider’s lightning talk on interfacing PANDAS to Django: Pandas loves ponies (and not just for the name!)
  • Nick Coghlan’s overview of the Python Packaging Authority
  • Jacob Kaplan-Moss’s walkthrough of the OWASP Top 10 and how well the Pyramid, Flask and Django frameworks help with web security
  • Simon Knight’s talk on large scale networks: using yEd, networkx, DS3, Mako, Netkit and TextFSM to automate network configuration
  • Simon Meers’ lightning talk on Fitocracy and EatThisMuch, as well as the early-morning runs with Simon and others
  • The talk and follow-up discussions about Growing open source seeds by Kenneth Reitz
  • Richard Jones simultaneously appalling, amusing and educating us with “Don’t do this!
  • Screenshots of Turbo Pascal, a great overview of the current state of Tk and the launch of Cricket, a GUI test runner tool, by Russell Keith-Magee
  • python-nation (don’t install it)
  • The hallway and sprint conversations
  • Lark Distillery whisky! Thanks to whoever organised the night

Presentations that I didn’t get to (but should have) included the talks by Luke Miller and Cody Lovett. The videos will be out soon on both Youtube and PyVideo.

It was another brilliant conference. Thanks to Chris and the other organisers for a fantastic effort (again).

See you in Brisbane for PyCon AU 2014.

Posted in Python | Comments Off on Highlights of PyCon AU 2013

PyCon AU 2013 running update

Following up from an earlier post, we’ve had three runs so far at PyCon AU.

Saturday morning’s forecast was 4°C, 50km/hr winds, hailstorms and snow down to 200 metres. Fortunately, we managed to miss the wild weather and had a great run through Battery Point across to Constitution Dock and back.

Sunday was colder, with black ice out on some of the roads, which eight of us avoided with a beautiful beach run down to Long Beach and back, with the sun rise casting spectacular colours over the snow on Mt Wellington.

This morning we had five runners to tackle the bush tracks just north of the casino. A plan to just run some trails became a climb to the signal station at the top of Mount Nelson, watching the sun rise over southeast Tasmania.

Mt Nelson panorama

Thanks to Simon Meers for the panorama photo and Strava data.

Mount Nelson run

We will be doing our final run tomorrow morning before the last day of sprints. 7am at the casino reception if you are interested — it will be a flatter run!

Posted in Python, Running | Comments Off on PyCon AU 2013 running update

My slides from PyCon AU 2013

Here are the slides (PDF) and
demo code (ZIP archive) from my PyCon AU talk “Modules 101: how to avoid spaghetti, big balls of mud and houses of straw!” yesterday.

And here are the slides from my lightning talk on Citizen Engineering (PDF) this afternoon.

My notes from the two days of the conference will be coming next.

Posted in Python, Talks | Comments Off on My slides from PyCon AU 2013

PyCon AU 2013, day 0

PyCon Au 2013 started yesterday with miniconferences for Django and OpenStack and snow on Mt Wellington.

P1050668_m

The DjangoCon AU miniconference had a capacity audience and an excellent set of presentations, with keynotes from Alex Gaynor and Dylan Jay.

The opening night was devoted to Code Wars (not Cod Wars), with a fiendish set of puzzles to whittle the competing teams down to the eventual winners: team IC. The theme of the night revolved around PRISM, the NSA, conspiracy theories and Geocities-styled web pages. The puzzles were:

  1. Find a backdoor on a website to access a login page and then convert CSS tags into binary and then ASCII to get the password
  2. Convert a base64 encoded string into a PNG image, recreate the original image through rotating image tiles (to get an image of a prism) and do some bit manipulation of the image to get another password
  3. Convert an embedded Midi file into a CSV, decode data in the CSV file to get yet another password (this was the round where desperate people resorted to Ruby and Perl…)
  4. The creative round for the final showdown: Create a UFO tracker for the Canadian government, with an NSA backdoor
Posted in Python | Comments Off on PyCon AU 2013, day 0

Notes from MPUG, July 2013

23 people braved a winter’s night on Monday for the June meeting of the Melbourne Python User Group, which had four talks, including some PyCon AU previews later this week.

Andrew Walker previewed part of his PyCon AU talk on “Managing scientific simulations with RQ (Redis Queue)”

Andrew works with scientists working in diverse fields solving large problems; they are not Python programmers.

Scientific simulators can vary significantly in complexity and in his work:

  • assume the job is too hard for a sinple process or machine
  • also assume the job is too small for a supercomputer
  • can’t solve in the cloud
  • assume 20 – 50 cores on 5 – 10 machines

There are a range of good simulation tools where you need parallelism. IPython parallel is the best place to start and works well if not calling native functions that crash or leak memory.

There are tools that aren’t traditionally used for scientific simulation and can be very hard for scientists to set up, configure, use, monitor:

  • celery
  • Parallel Python
  • pymq
  • snakeMQ

There are some good talks from the last two years of PyCon US, worth looking at for more information on these, but what Andrew wanted something that you could get running easily in an afternoon, which led him to Redis and RQ:

  • Lets you associate a data structure with a key
  • Server is written in C
  • Python bindings (as well as other languages)
  • Python example code is very straightforward
  • Demo on one machine with 4 queues
  • Can set worker priorities

There was an example with the travelling salesman problem, starting with a naive iteration through all possible tours, improving it an approximation to find the smallest solution from a set of possibilities, which is faster, can scale this up by running in parallel tasks and you get the best result from each queue and then amalgamate to get best answer. He showed us how to do this with RQ.

RQ comes with an inbuilt monitoring tool for checking on queues, worker nodes, failures, etc., all via a web interface. The user has to ensure the code is robust, distribute source code (eg. via NFS) and use data structures that are serialisable. Potential issues included memory consumption and issues around spinning up new Python instances and cleanly killing workers.

Ed Schofield and Chris Boesch tag-teamed for another PyCon AU preview on “Big data analytics in Python”

This talk focused on using Python in a number of the big data domains, including denoising, optimisation, image interpolation, prediction, compression, clustering, classification and anomoly detection. There were plenty of interesting applications using libraries such as scipy, scikit.learn, PyTables, pandas, Hadoop and PySpark.

For me, one of the interesting parts was the discussion on scaling with MapReduce. Some random notes:

  • Be aware of deadlocks, race conditions, etc
  • pandas: great tool once you get data into it and can generate schemas on the fly?
  • Can access EC2 instances with IPython notebooks via a web browser or SSH – cool for quick jobs
  • Keeping data gets cheaper every year
  • Music Machinery blog posting
    • 20M songs, 300GB data
    • wanted to analyse songs with fastest beats per minute
    • 1M songs in 20 minutes in Python?
  • Configure cloud images once, snapshot, can then deploy as many times as needed (and tweak)
    • Amazon EC2: can choose # cores, amount of RAM, storage, etc
    • Pick the hardware you need, when you need it
    • “On demand” pricing
  • MapReduce
    • robust, builds in a lot of parallelism: build it for 2 cores, can then run on 200 cores
    • if a task fails, it can get re-run
    • MapReduce is idempotent, can chase down slow processes
    • need to shard data, map partitions, combine (optional), shuffle & sort, reduce
    • map() -> do something in parallel on every item (eg filter)
    • reduce() -> do something on all of the maps to produce a single result
    • mrjob: in PyPi, very nice! Can run:
      • single thread
      • multiple local threads
      • EMR (Amazon Elastic MapReduce) on the Amazon cloud: up to 20 instances with up to 16 cores per instance

Noon Silk was defeated by HDMI technologies so spoke briefly (and without his laptop) about PhoneGap, which is not Python based, but still worth mentioning as it took 2 hours to get an app running for iPhone and/or Android. Noon also discussed Okular, the KDE PDF (and other format) file viewer, and manipulating the XML output of embedded annotations (I missed the rest of this as I was organising the arrival of pizzas!)

Chris Boesch spoke again about “Making learning more fun”, covering SingPath, a web-based tool for (originally) learning Python. It now covers Python, Java, Ruby, Javascript, R, and uses a range of pedagological concepts including gameification, adaptive difficulty, “drag-n-drop” (which helps reading Python) and quests to teach programming.

It has been used for lots of programming tournaments over last few years, with:

  • Collaborative learning
  • Fun rounds (everyone can participate)
  • Prize rounds
  • Pair programming tournaments (you code half, your buddy codes half)

SingPath runs in Google App Engine, is freely available (on GitHub) and has been built by students for students.

Posted in Python | Comments Off on Notes from MPUG, July 2013

PyCon AU runs

Last year I organised casual morning runs at PyCon AU 2012 and it worked well; various people joined in for different runs across the four days of the conference and sprints.

We saw some great parts of Hobart and had some interesting conversations spanning everything from Django and Python to Strava, veganism, and programming while working out on an exercise bike (apparently fun but the sweat is murder on keyboards).

So, the runs are back again for this year’s PyCon AU; if you would like to join us for an early morning run, pack your running shoes and read the info below.

If you are a runner and not sure you are fit enough:

  1. These runs are designed to be inclusive, not a race
  2. The runs are designed to be 5 – 6 km long and we will aim to run them at a 5:30 – 6:00 min/km pace. If we have enough people who want to run faster, we can always split into two groups
  3. The runs are out and back, so even if you fall back, we will pick you up on the way back and you can’t get lost (unless you try really hard 🙂

If you are not a runner:

  • I would encourage you to still get some exercise in the midst of days of talks and hacking on a laptop; perhaps organise a ride or walk around Hobart: it is a beautiful old city with waterfront vistas, historical buildings, hills, good coffee and excellent pastries (if you haven’t found Jackman & McRoss yet, then add it to your Hobart to-do list)
  • Consider joining us next year. There are some good “introduction to running” programs that you can do yourself, including “Couch to 5K”

The details for the runs

MEETING PLACE: Wrest Point Casino main entrance (Riverview level), near Reception and the Gift Shop. [1]

START TIME: 7am sharp, aiming to be back around 7:30 – 7:40, giving you time to shower and eat before the conference starts at 9am.

SATURDAY: Run to Constitution Dock and back via Battery Point and Salamanca Market. 6km

SUNDAY: Sandy Bay run — out to the Sandy Bay foreshore track (lots of great beach views) ~ 5.5km

MONDAY: Hills! Up to Lambert Park and the bushland near Nelson Rd. 4.5 – 5km and a really good workout

TUESDAY: Popular vote — any of the previous runs or perhaps a longer run up to Cascade Gardens & Brewery (8.5km)

IF IT’S WET? I will still run if it’s drizzling. If it’s a torrential downpour, I’m sleeping in. On the sliding scale between drizzle and downpour, it is safe to assume that I will be more likely to run than not, so see you there.

AND REMEMBER: It can get a bit cold in Hobart in winter. Long sleeve top, mittens and a running cap or beanie are probably worth packing.

[1] Here is the casino floor plan (PDF) in case you are not sure of the location.

Posted in Python, Running | Comments Off on PyCon AU runs

River running

The first race in the Salomon trail running series was this morning: 15km at Studley Park & Yarra Bend Park. I have only done a few races so far this year (a trail run in the USA, Puffing Billy and a Sri Chinmoy 15km run), so entering this series was designed to get me back into more serious training.

This run is a kind introduction to the series: no serious hills (the altitude graph below ranges from about 5m to 35m) and good trails along the Yarra River. The weather was perfect, meaning no rain, mud or deep rivers to avoid, as anyone who ran the Plenty Gorge race last year would remember.

 

Salomon trail run  1 Altitude

 

I found myself starting at the back of the race, due to my own stupidity: if you are going to visit the toilet before a race, do it well before the start time so you’re not sitting in the toilet listening to the announcer start the race!

Here’s the map of the course (the blue line with kilometre markings). If you haven’t explored the trails of Yarra Bend Park, it is well worth it: we are lucky to have such good running tracks so close to the heart of Melbourne.

Salomon trail run  1 Studley Park map

Posted in Running | Comments Off on River running

Boneshaking

Melburn-Roobaix was on last Sunday.

44 kilometres, with thirteen bone-shaking cobblestone sectors, north of the river, starting at Hawthorn velodrome, ending at Brunswick velodrome with a course winding through Kew, Clifton Hill, North Carlton, Kensington and Moonee Ponds.

It was a crisp start (1.8°C when we left home) and glorious sunshine all day. I didn’t think the queue to register could be worse than last year, but I was wrong!

P1050535

Highlights of the day?

The “tall” bike at Squirrel cafe — I’m not sure how he navigated the low hanging trees in some of the laneways.

P1050538

Climbing the Col d’Arden!

P1050546

The mille-feuille at Filou’s and the cleansing ale at the end as the sun set.

P1050553

Lowlight? Richard blowing out the rear tyre on his Moulton in West Brunswick and having to walk to the finish!

Here’s the GPS trace for the day with kilometre marks.

Melburn Roobaix course

Pencil it in for next year and start planning your costume…

Posted in Cycling | Comments Off on Boneshaking