From darius at obsidian.com.au Mon Jul 2 05:01:10 2007 From: darius at obsidian.com.au (Kevin Littlejohn) Date: Mon, 2 Jul 2007 13:01:10 +1000 Subject: [melbourne-pug] apologies for missing lunch Message-ID: I just looked up and discovered I've missed the lunch today. I was really hoping to get out to that today to catch up with people, but we're caught in the middle of a tender rush :( Hope people had a good meet-up. KevinL --- Obsidian Consulting Group web: http://www.obsidian.com.au/ phone: +613 9355 7844 (ext 2001) fax: +613 9350 4097 From tleeuwenburg at gmail.com Mon Jul 2 08:27:09 2007 From: tleeuwenburg at gmail.com (Tennessee Leeuwenburg) Date: Mon, 2 Jul 2007 16:27:09 +1000 Subject: [melbourne-pug] apologies for missing lunch In-Reply-To: References: Message-ID: <43c8685c0707012327j2edf9ee4o135cf8f127a5f941@mail.gmail.com> No worries Kevin. Hopefully you can make it next time. In attendence were Anthony Baxter, Richard Jones, Neville, Mike DeWhirst, Ryan, Stephanie and Tennessee Leeuwenburg (me). It was pretty informal, but Neville demonstrated some of the functionality of Sage to a few of us, and there was some discussion of Pythonesque database support packages. I don't do much with DBs myself, but there was some general interest. Some people were mostly interested in having lunch sometimes, and others were interested in pursuing other options like presentations and group code explorations, and some were interested in an MPUG new project. Personally, I doubt that I have the hours available to pioneer / run a new project. However, I would be happy to take part in presentations, group code explorations, or sprints. For those who don't know, a 'sprint' is where typically a small-medium sized group of Python developers meets for anywhere from an hour to a couple of days, and works on a common tasks. Obviously, shorter sprints require all members to be pretty familiar with the problem at hand and the goals of the sprint, but they are possible. Mike DeWhirst has previously suggested a few project ideas. I don't know if it is possible to run a group project that is truly leaderless, so either we could prevail on him to drive the process, or we could have a go at true groupthink. Another great suggestion was that of the road test. The idea, as I understood it, would be to pick some Python-related application, download and install it, run it, kick the tyres a little and compile a report on its functionality. Group members would then over time be introduced to a large number of Python applications, greatly broadening their knowledge. It would also contribute a little back to the Python community in the form of documentation and evaluation of the packages in question. I'm not sure if anyone is aware of a good venue for presentations etc. I am reasonably familiar with the CBD and South Yarra local surrounds -- if the weather was okay, we could meet outdoors someplace and try to network all our laptops together for added coolness. Alternatively, we could invade a Starbucks for their free wireless. Maybe some others could suggest some decent venues that might be available via a workplace or just a little-known hideout. At the social level, I'm sure we will have further lunchtime gatherings in the city. Loco bar worked well enough, although the rectangular tables fragmented the discussion groups somewhat -- if anyone knows of any round-tabled venues, let the group know! Cheers, -T On 7/2/07, Kevin Littlejohn wrote: > > I just looked up and discovered I've missed the lunch today. I was > really hoping to get out to that today to catch up with people, but > we're caught in the middle of a tender rush :( Hope people had a > good meet-up. > > KevinL > --- > Obsidian Consulting Group > web: http://www.obsidian.com.au/ > phone: +613 9355 7844 (ext 2001) > fax: +613 9350 4097 > > > _______________________________________________ > melbourne-pug mailing list > melbourne-pug at python.org > http://mail.python.org/mailman/listinfo/melbourne-pug > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/melbourne-pug/attachments/20070702/7e475994/attachment.htm From NevilleD.python at sgr-a.net Mon Jul 2 10:59:44 2007 From: NevilleD.python at sgr-a.net (NevilleDNZ) Date: Mon, 2 Jul 2007 01:59:44 -0700 (PDT) Subject: [melbourne-pug] functionality of Sage demo Message-ID: <11390718.post@talk.nabble.com> Good to meet you all.... Tennessee Leeuwenburg-3 wrote: > > It was pretty informal, but Neville demonstrated some of the functionality > of Sage to a few of us... > Apologies to anyone who got indigestion, below is a cut an paste of the demo... As a python user I consider SAGE to be python with a warped sense of humor. SAGE is a computer algebra system written in Python... Once the equations are solved, C-code can be emitted. I guess the best business application for SAGE is in optimising some process in an organisation, either squeezing 3% saving from nowhere, our getting you head around square-peg/round-hole problems. Cheers NevilleD Here is the demo: BEGINNING OF DEMO: ./sage ---------------------------------------------------------------------- | SAGE Version 2.4, Release Date: 2007-03-25 | Type notebook() for the GUI, and license() for information. ---------------------------------------------------------------------- >>> print [ i*i for i in range(10)] [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] >>> x=1.1 >>> y=2.3 >>> x+y 3.40000000000000 ## SEE, it is python!! except.... >>> type(x+y) ## Hmm... ## How about: >>> x=1/2 >>> y=1/3 >>> x+y 5/6 ## OK, lets see if it really knows what a REAL number is!! >>> type(x+y) ## Maybe that is actually rational. OK... Can it handle algebra? >>> F. = FreeAlgebra(GF(7),3) # a class? >>> x=sin(z) >>> y=1+cos(z)^2 >>> x+y (sin(z) + (1 + (cos(z)^2))) >>> type(x+y) ## but can we integrate this? >>> integral(x+y,z) (sin(2*z)/2 + z)/2 - cos(z) + z OK... at this point I have maxed out my high-school math... lucky I did some more at Uni. END OF DEMO ps. it also can generate rather nice graphs. http://en.wikipedia.org/wiki/Image:Sagescreenshotbluehat.jpg http://en.wikipedia.org/wiki/Software_for_Algebra_and_Geometry_Experimentation -- View this message in context: http://www.nabble.com/re%3A-functionality-of-Sage-demo-tf4011028.html#a11390718 Sent from the Python - melbourne-pug mailing list archive at Nabble.com. From NevilleD.python at sgr-a.net Mon Jul 2 07:14:55 2007 From: NevilleD.python at sgr-a.net (NevilleDNZ) Date: Sun, 1 Jul 2007 22:14:55 -0700 (PDT) Subject: [melbourne-pug] Reminder -- Meetup at Loco Bar on Monday In-Reply-To: <43c8685c0706281905u37d52ef8m8aa72837745d0f6e@mail.gmail.com> References: <43c8685c0706281905u37d52ef8m8aa72837745d0f6e@mail.gmail.com> Message-ID: <11388710.post@talk.nabble.com> Tennessee Leeuwenburg-3 wrote: > > Spencer St Station (Southern Cross) food court meetup. > Good to meet you all. Hopefully I will be back in Melbourne for the next meetup. It was interesting to find out a bit about Python3. Does py3 have the infamous "is not" operator in it? http://www.freepatentsonline.com/20040230959.html f so, then guess who owns the "is not" software patent! Cheers N -- View this message in context: http://www.nabble.com/Reminder----Meetup-at-Loco-Bar-on-Monday-tf3997818.html#a11388710 Sent from the Python - melbourne-pug mailing list archive at Nabble.com. From pcholt at gmail.com Mon Jul 2 14:02:02 2007 From: pcholt at gmail.com (Paul Holt) Date: Mon, 2 Jul 2007 22:02:02 +1000 Subject: [melbourne-pug] apologies for missing lunch In-Reply-To: <43c8685c0707012327j2edf9ee4o135cf8f127a5f941@mail.gmail.com> References: <43c8685c0707012327j2edf9ee4o135cf8f127a5f941@mail.gmail.com> Message-ID: <200707022202.06304.pcholt@gmail.com> On Monday 02 July 2007 16:27, Tennessee Leeuwenburg wrote: > No worries Kevin. Hopefully you can make it next time. Same here. Unfortunately duty called and I couldn't justify travelling into the city for an extended lunchtime. I was there in spirit... but debugging in Java :( Would have been excellent to meet fellow pythonistas. Or is that pythonites? http://mail.python.org/pipermail/python-list/1999-November/015549.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.python.org/pipermail/melbourne-pug/attachments/20070702/978e56a6/attachment.pgp From mauriceling at gmail.com Tue Jul 3 10:20:08 2007 From: mauriceling at gmail.com (Maurice Ling) Date: Tue, 03 Jul 2007 18:20:08 +1000 Subject: [melbourne-pug] apologies for missing lunch In-Reply-To: <43c8685c0707012327j2edf9ee4o135cf8f127a5f941@mail.gmail.com> References: <43c8685c0707012327j2edf9ee4o135cf8f127a5f941@mail.gmail.com> Message-ID: <468A06B8.5000802@acm.org> > Some people were mostly interested in having lunch sometimes, and > others were interested in pursuing other options like presentations > and group code explorations, and some were interested in an MPUG new > project. > > Personally, I doubt that I have the hours available to pioneer / run a > new project. However, I would be happy to take part in presentations, > group code explorations, or sprints. For those who don't know, a > 'sprint' is where typically a small-medium sized group of Python > developers meets for anywhere from an hour to a couple of days, and > works on a common tasks. Obviously, shorter sprints require all > members to be pretty familiar with the problem at hand and the goals > of the sprint, but they are possible. > > Mike DeWhirst has previously suggested a few project ideas. I don't > know if it is possible to run a group project that is truly > leaderless, so either we could prevail on him to drive the process, or > we could have a go at true groupthink. > > Another great suggestion was that of the road test. The idea, as I > understood it, would be to pick some Python-related application, > download and install it, run it, kick the tyres a little and compile a > report on its functionality. Group members would then over time be > introduced to a large number of Python applications, greatly > broadening their knowledge. It would also contribute a little back to > the Python community in the form of documentation and evaluation of > the packages in question. I can't help it but have to ask - what project ideas did Mike suggest? Cheers maurice From miked at dewhirst.com.au Tue Jul 3 12:37:28 2007 From: miked at dewhirst.com.au (Mike Dewhirst) Date: Tue, 03 Jul 2007 20:37:28 +1000 Subject: [melbourne-pug] apologies for missing lunch In-Reply-To: <468A06B8.5000802@acm.org> References: <43c8685c0707012327j2edf9ee4o135cf8f127a5f941@mail.gmail.com> <468A06B8.5000802@acm.org> Message-ID: <468A26E8.1040901@dewhirst.com.au> Maurice Ling wrote: >> Some people were mostly interested in having lunch sometimes, and >> others were interested in pursuing other options like presentations >> and group code explorations, and some were interested in an MPUG new >> project. >> >> Personally, I doubt that I have the hours available to pioneer / run a >> new project. However, I would be happy to take part in presentations, >> group code explorations, or sprints. For those who don't know, a >> 'sprint' is where typically a small-medium sized group of Python >> developers meets for anywhere from an hour to a couple of days, and >> works on a common tasks. Obviously, shorter sprints require all >> members to be pretty familiar with the problem at hand and the goals >> of the sprint, but they are possible. >> >> Mike DeWhirst has previously suggested a few project ideas. I don't >> know if it is possible to run a group project that is truly >> leaderless, so either we could prevail on him to drive the process, or >> we could have a go at true groupthink. >> >> Another great suggestion was that of the road test. The idea, as I >> understood it, would be to pick some Python-related application, >> download and install it, run it, kick the tyres a little and compile a >> report on its functionality. Group members would then over time be >> introduced to a large number of Python applications, greatly >> broadening their knowledge. It would also contribute a little back to >> the Python community in the form of documentation and evaluation of >> the packages in question. > > I can't help it but have to ask - what project ideas did Mike suggest? Maurice I'd love to list them but unfortunately I didn't suggest any. I think I was making a meta-suggestion. I might have wracked my brain except Tennessee let me off the hook by saying he probably has my original project suggestion(s) from two years ago in his email collection. When he said that my mind started to wander to other topics - namely that our third grandson was (at lunchtime) well on his way. Charlie (3.18kg) arrived a couple of hours later. I can't help it either so here he is ... http://www.cambric.com.au/charlie :) Mike > > Cheers > maurice > _______________________________________________ > melbourne-pug mailing list > melbourne-pug at python.org > http://mail.python.org/mailman/listinfo/melbourne-pug > > From mauriceling at gmail.com Tue Jul 3 12:55:09 2007 From: mauriceling at gmail.com (Maurice Ling) Date: Tue, 03 Jul 2007 20:55:09 +1000 Subject: [melbourne-pug] apologies for missing lunch In-Reply-To: <468A26E8.1040901@dewhirst.com.au> References: <43c8685c0707012327j2edf9ee4o135cf8f127a5f941@mail.gmail.com> <468A06B8.5000802@acm.org> <468A26E8.1040901@dewhirst.com.au> Message-ID: <468A2B0D.3050907@acm.org> >>I can't help it but have to ask - what project ideas did Mike suggest? >> >> > >Maurice > >I'd love to list them but unfortunately I didn't suggest any. I think I >was making a meta-suggestion. > >I might have wracked my brain except Tennessee let me off the hook by >saying he probably has my original project suggestion(s) from two years >ago in his email collection. When he said that my mind started to wander >to other topics - namely that our third grandson was (at lunchtime) well >on his way. Charlie (3.18kg) arrived a couple of hours later. > >I can't help it either so here he is ... > > http://www.cambric.com.au/charlie > >:) > >Mike > > > > > Congratulations Mike. Actually I do have a project idea...... I've always considered that it is useful to have an algorithm and data structures library... starting with a re-implementation of the codes in Numerical Recipes in C into Python and then perhaps collecting the data structures from Python cookbook or Handbook of Data Structures and its Applications..... No idea if this is even worth thinking .... but I've started some coding to re-implement of the codes in Numerical Recipes in Pascal into Python very slowly. Cheers maurice From brianna.laugher at gmail.com Thu Jul 19 03:43:58 2007 From: brianna.laugher at gmail.com (Brianna Laugher) Date: Thu, 19 Jul 2007 11:43:58 +1000 Subject: [melbourne-pug] A list of strings vs a list of list of strings Message-ID: Hello Melbourne pythonistas, A quick question... I'm doing some text processing, creating and sorting n-grams (n-word phrases - a single word is a 1-gram) from text files. At the moment I'm doing something like this: - get value for n - read in files - determine clauses (n-grams shouldn't cross clause boundaries): list of strings, 1 string = 1 clause - determine words (split on whitespace): list of list of strings, 1 list = 1 clause, 1 string = 1 word - create all n-grams (list splices): resulting in an n-gram being a list of n strings - determine frequencies this last bit is where I'm possibly running into trouble. If I just had a list of strings, I would do this: pairs = [ ( ngram, ngrams.count(ngram) ) for ngram in list( set( ngrams ) ) ] I can't use set() when my list items are more lists, apparently. So I'm trying this: uniqngrams = [] freqs = [] for ngram in ngrams: try: indice = uniqngrams.index(ngram) freqs[indice] += 1 except ValueError: uniqngrams.append(ngram) freqs.append(1) pairs = zip(uniqngrams, freqs) It's not throwing errors, it's just too slow (the file I'm running it on has nearly 224,000 words). I have a suspicion that representing the ngrams as lists of strings rather than plain lists is causing some of the trouble. Just wondering if anyone had any thoughts about this. also, in general, which of these should be faster? 'foo' in 'very long string foo' 'foo' in ['very','long','string','foo'] I thought the latter would be because it should make fewer checks (after checking 'f'!='v', it can jump to 'l'.) But maybe it's already optimised for string searching. shrug. thanks, Brianna From jimmy.briggs at gmail.com Thu Jul 19 04:26:21 2007 From: jimmy.briggs at gmail.com (James Briggs) Date: Thu, 19 Jul 2007 12:26:21 +1000 Subject: [melbourne-pug] A list of strings vs a list of list of strings In-Reply-To: References: Message-ID: <23b1b67f0707181926l16894228qe7735bbed6f39d50@mail.gmail.com> Why not try using a dictionary rather two lists? It can use the ngram as key and will take up little more than your two lists in space in memory. i.e. { 'abc': 2, 'def': 3, 'ghi':1 } freqs = {} for ngram in ngrams: # if it finds the ngram in the dictionary it increments it by 1, otherwise sets it to 1 freqs[ngram]=freqs.get(ngram,0)+1 pairs = freqs.items() # will return a list of (ngram,freq) unique = freq.keys() # will return a list of all unique ngrams When ever I find myself matching up indices on multiple lists I usually discover what I really want to use is a dictionary. Especially as the keys are 'hashed' and can be search very efficiently Good Luck. James On 7/19/07, Brianna Laugher wrote: > Hello Melbourne pythonistas, > > A quick question... > > I'm doing some text processing, creating and sorting n-grams (n-word > phrases - a single word is a 1-gram) from text files. At the moment > I'm doing something like this: > > - get value for n > - read in files > - determine clauses (n-grams shouldn't cross clause boundaries): list > of strings, 1 string = 1 clause > - determine words (split on whitespace): list of list of strings, 1 > list = 1 clause, 1 string = 1 word > - create all n-grams (list splices): resulting in an n-gram being a > list of n strings > - determine frequencies > > this last bit is where I'm possibly running into trouble. If I just > had a list of strings, I would do this: > > pairs = [ ( ngram, ngrams.count(ngram) ) for ngram in list( set( ngrams ) ) ] > > I can't use set() when my list items are more lists, apparently. So > I'm trying this: > > uniqngrams = [] > freqs = [] > for ngram in ngrams: > try: > indice = uniqngrams.index(ngram) > freqs[indice] += 1 > except ValueError: > uniqngrams.append(ngram) > freqs.append(1) > > pairs = zip(uniqngrams, freqs) > > > It's not throwing errors, it's just too slow (the file I'm running it > on has nearly 224,000 words). > > I have a suspicion that representing the ngrams as lists of strings > rather than plain lists is causing some of the trouble. Just wondering > if anyone had any thoughts about this. > > also, in general, which of these should be faster? > > 'foo' in 'very long string foo' > > 'foo' in ['very','long','string','foo'] > > I thought the latter would be because it should make fewer checks > (after checking 'f'!='v', it can jump to 'l'.) But maybe it's already > optimised for string searching. shrug. > > thanks, > Brianna > _______________________________________________ > melbourne-pug mailing list > melbourne-pug at python.org > http://mail.python.org/mailman/listinfo/melbourne-pug > From brianna.laugher at gmail.com Thu Jul 19 04:50:20 2007 From: brianna.laugher at gmail.com (Brianna Laugher) Date: Thu, 19 Jul 2007 12:50:20 +1000 Subject: [melbourne-pug] A list of strings vs a list of list of strings In-Reply-To: <23b1b67f0707181926l16894228qe7735bbed6f39d50@mail.gmail.com> References: <23b1b67f0707181926l16894228qe7735bbed6f39d50@mail.gmail.com> Message-ID: On 19/07/07, James Briggs wrote: > Why not try using a dictionary rather two lists? It can use the ngram > as key and will take up little more than your two lists in space in > memory. I tried this first, but the dictionary won't accept a list as a key because it's not hashable -- same reason I couldn't use set(). hmm...actually... maybe all I need to do is tuple-ise my lists! I might try that. cheers, Brianna -- They've just been waiting in a mountain for the right moment: http://modernthings.org/ From mailkylie at optushome.com.au Tue Jul 24 10:26:25 2007 From: mailkylie at optushome.com.au (Kylie Davies) Date: Tue, 24 Jul 2007 18:26:25 +1000 Subject: [melbourne-pug] Software Freedom Day - Saturday September 15th - Melbourne Town Hall - Get involved Message-ID: <1185265586.3425.3.camel@localhost> Hi to all, but especially to folks in Melbourne, Last year we put on an event to celebrate our own software freedom and to let other people know about it. Along with free and open source (FOSS) software we showcased different FOSS groups and their interests. There were talks and we watched the code breakers. This year we plan to run the event again but with a slightly different focus. We've decided to drop the talks and have demo zones instead. Within the demo zones there will be scope to do 10 minute talks and demos. We will showcase all that is cool in FOSS as well as have a community stand and a burning station. We plan to show videos too. To do this we need volunteers to help out with demo zones, at the community table and at the burning station. We'll also need people to help spruik the event out the front of the town hall. Computerbank will provide two computers at each of the demo zones. LUV will supply the burning station. MLUG have suggested they can bring in a few laptops running different distros. Melbourne Wireless will provide access points. The community stand will be the place where groups can leave information about themselves. Members from different groups can be rostered to help with it. We can also hang posters on display boards. Depending on funding, we imagine having a number of t-shirts available for volunteers helping at demo zones or with spruiking. People from groups who have their own branded t-shirts (other) should wear them if possible. We have a planning wiki over at http://vic.computerbank.org.au/wiki/SoftwareFreedomDay and our main page for the event is at http://www.softwarefreedomday.org/melb We need to know who is interested in attending and helping on the day. We need to know if your group wants to be represented on the community table? If you have a preference to help with a particular demo-zone or task don't forget to let us know (check the wiki for a list of demo-zones). We also need help with letting the general public know about this event, we need people to help put posters and flyers out there. If you can help with this please get in touch. We really want to get the word out there! If anyone has any ideas or opportunities for publicity we'd love your help. We really want the day to rock! If you are on mailing lists or forums you might consider plugging our event in your sig. We have a Melbourne SFD planning and volunteers list, if you are planning on helping out as a volunteer or if you are coming along to represent your group, let me know, and we'll subscribe you to it. Software Freedom Day - only 53 days to go. Get involved. :) Feel free to forward this email far and wide. Thanks! Kylie -- Kylie Davies President/Coordinator Computerbank Victoria Inc http://vic.computerbank.org.au Recycling computers with care for the community and the environment. Low cost Linux computers for concession card holders. From mauriceling at gmail.com Wed Jul 25 14:22:48 2007 From: mauriceling at gmail.com (Maurice Ling) Date: Wed, 25 Jul 2007 22:22:48 +1000 Subject: [melbourne-pug] Intra-package import Message-ID: <46A74098.2040105@acm.org> Hi all, I have a problem with intra-package import. Assuming this is my directory structure: dws/ __init__.py common/ threadpool.py dal/ d_connect.py How can I, in d_connect.py, import a class from ../common/threadpool.py, say ThreadPool.py? Basically I am trying to do a C equivalent of #include "../include/my_header.h". Any ideas? Thanks in advance. Cheers Maurice From darius at obsidian.com.au Wed Jul 25 14:27:45 2007 From: darius at obsidian.com.au (Kevin Littlejohn) Date: Wed, 25 Jul 2007 22:27:45 +1000 Subject: [melbourne-pug] Intra-package import In-Reply-To: <46A74098.2040105@acm.org> References: <46A74098.2040105@acm.org> Message-ID: <89622DEC-372C-4927-8181-7C451D8B94F6@obsidian.com.au> If dws is in the python path, you can do "from dws.common.threadpool import ThreadPool". If dws is not in sys.path, perhaps you should put it there? :) (At least in pre-2.4, I'm not aware of a nice answer for this except for to put your package into site-packages or add it to sys.path via another method. Other people may have better ideas for you.) KevinL On 25/07/2007, at 10:22 PM, Maurice Ling wrote: > Hi all, > > I have a problem with intra-package import. Assuming this is my > directory structure: > > dws/ > __init__.py > > common/ > threadpool.py > > dal/ > d_connect.py > > How can I, in d_connect.py, import a class from ../common/ > threadpool.py, > say ThreadPool.py? > Basically I am trying to do a C equivalent of #include > "../include/my_header.h". > > Any ideas? > > Thanks in advance. > > Cheers > Maurice > _______________________________________________ > melbourne-pug mailing list > melbourne-pug at python.org > http://mail.python.org/mailman/listinfo/melbourne-pug KevinL --- Obsidian Consulting Group web: http://www.obsidian.com.au/ phone: +613 9355 7844 (ext 2001) fax: +613 9350 4097 From john.larooy at gmail.com Thu Jul 26 00:15:21 2007 From: john.larooy at gmail.com (John La Rooy) Date: Thu, 26 Jul 2007 08:15:21 +1000 Subject: [melbourne-pug] Intra-package import In-Reply-To: <46A74098.2040105@acm.org> References: <46A74098.2040105@acm.org> Message-ID: What Kevin said is the best answer. I can't think of a reason not to have your top level package in your path. Otherwise look at imp.find_module and imp.load_module