Solo Mapping 
I've written about Open Street Map before. Unfortunately since that Mapping Party I have been unable to contribute due to a lack of owning a GPS device.

This has been particularly frustrating as most of my area (Harborne, B17) is almost completely barren on OSM.

OSM were exhibiting at LRL this year, and after speaking to Andy Robinson I was allowed to borrow a Garmin Geko GPS device from the Open Street Map Foundation. I knew they had a stock of GPS devices, but I didn't know they were willing to lend them out! As long as you have someone they trust to vouch for your trustworthiness they are happy to let you have one.

Using the shiny Geko I was able to map a (in my opinion) large chunk of the surrounding area.

Before


After


It took me about 4 hours worth of cycling to get all the traces, and about another 2 hours of editing in JOSM to get it all tagged. I'm very pleased with the results. Even I was impressed by how much can be done by one person.

I would like to organise a mapping party for south Birmingham, along the lines of the one that I firsts attended. If anyone wants to give me a hand just leave a comment or email me.

Update:

I had to return the Geko of course, but I have purchased my own Geko 201 from Ebay for the princely sum of £51 plus £10 P&P. Have not done any serious mapping with it yet, just need to find a spare hour or two.

[ add comment ] ( 1 view )   |  permalink
Wordcount 1.2 
Yet more tweaking of my wee python script.

It can now take the variable from the command line.

$ python wordcount.py <file>




#! /usr/bin/python
import sys


def wordcount(a):
""" Wordcount will count how many instances there are of a word in a string, a. """
memory = [] # create memory
a = a.lower().split()

for i in a:
if i not in memory:
print "There are %(number)i instances of \" %(word)s \"\
in the string" % {"number": a.count(i), "word": i}
memory.append(i)

file = sys.argv[1]
a = open(file, "r").read()

wordcount(a)


[ add comment ] ( 1 view )   |  permalink
Wordcount 1.1 

#! /usr/bin/python


def wordcount(a):
memory = [] # create memory
a = a.lower()
a = a.split()


for i in a:
if i not in memory:
print "There are %(number)i instances of \" %(word)s \"\
in the string" % {"number": a.count(i), "word": i}
memory.append(i)




[ add comment ] ( 1 view )   |  permalink
Improved Python 
Currently sitting in a Python sprint feeling like a complete fraud. So I decided to go back and improve my old python script. Only to find that the "memorylength==0" was throwing up an error because I had not defined memorylength!

So with a bit of tweaking I have got the script to actually work. I suppose this could be called the 1.0 release. :)

I also though there may be a simpler way of doing the memory check bit, the core of the script. And manged to take out a whole 4 lines of code. Whoop.


#! /usr/bin/python

def wordcount(a):
memory = [] # create memory
a = a.lower()
a = a.split()


for i in a:
if i not in memory:
print i
print a.count(i)
memory.append(i)


[ add comment ] ( 1 view )   |  permalink
First Python Steps 
Today I completed my first completely useless python script.

All it does it look at a string, and tell you how many times a word occurs. Thats it.

It took me 2 days, and I'm sure it could be done another way, and better. Still I am very proud.

Here it is. Enjoy.


#! /usr/bin/python

def wordcount(a):
memory = [] # create memory
a = a.lower()
a = a.split()


for i in a:
if memorylength == 0:
print i
print a.count(i)
memory.append(i)

elif i not in memory:
print i
print a.count(i)
memory.append(i)



[ 3 comments ] ( 13 views )   |  permalink

<<First <Back | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Next> Last>>