Call for presenters for 2012

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Call for presenters for 2012

Tony Cappellini-2


Hello and Happy New Year Everyone!

I hope your holidays were happy and safe.


Our first meeting for 2012 is on January 26th, and as yet we do not have anyone scheduled to give a presentation.

If you have a project you would like to talk about or suggest a topic for a presentation, please post you comments
to the list.


Thanks


Tony


_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Call for presenters for 2012

Simeon Franklin
Possibly relevant.
http://simeonfranklin.com/blog/2011/dec/23/calling-all-pycon-rejects/

We're also a great audience for a practice run-through of your accepted talk :)

-regards
Simeon Franklin


On Mon, Jan 2, 2012 at 5:30 PM, Tony Cappellini <[hidden email]> wrote:

>
>
> Hello and Happy New Year Everyone!
>
> I hope your holidays were happy and safe.
>
>
> Our first meeting for 2012 is on January 26th, and as yet we do not have
> anyone scheduled to give a presentation.
>
> If you have a project you would like to talk about or suggest a topic for a
> presentation, please post you comments
> to the list.
>
>
> Thanks
>
>
> Tony
>
>
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Call for presenters for 2012

Glen Jarvis
In reply to this post by Tony Cappellini-2
Tony,

I'm working on a virtualization introduction talk discussing setting up an EC2 instance on Amazon and then installing virtualenv on that instance.

It's still in rough planning stage as in more of a beginner/intermediate level tutorial on how these things work. It may be too basic for the typical BayPIGgies talk. But, one would walk away knowing how to create an Amazon Virtual Instance for free (and how these things are similar/different from virtualenv).

Glen

On Jan 2, 2012, at 5:30 PM, Tony Cappellini <[hidden email]> wrote:

>
>
> Hello and Happy New Year Everyone!
>
> I hope your holidays were happy and safe.
>
>
> Our first meeting for 2012 is on January 26th, and as yet we do not have anyone scheduled to give a presentation.
>
> If you have a project you would like to talk about or suggest a topic for a presentation, please post you comments
> to the list.
>
>
> Thanks
>
>
> Tony
>
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies

_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Call for presenters for 2012

Glen Jarvis
In reply to this post by Simeon Franklin
+1 on Simeon giving his talk that he isn't presenting at PyCon.

G

On Mon, Jan 2, 2012 at 6:49 PM, Simeon Franklin <[hidden email]> wrote:
Possibly relevant.
http://simeonfranklin.com/blog/2011/dec/23/calling-all-pycon-rejects/

We're also a great audience for a practice run-through of your accepted talk :)

-regards
Simeon Franklin


On Mon, Jan 2, 2012 at 5:30 PM, Tony Cappellini <[hidden email]> wrote:
>
>
> Hello and Happy New Year Everyone!
>
> I hope your holidays were happy and safe.
>
>
> Our first meeting for 2012 is on January 26th, and as yet we do not have
> anyone scheduled to give a presentation.
>
> If you have a project you would like to talk about or suggest a topic for a
> presentation, please post you comments
> to the list.
>
>
> Thanks
>
>
> Tony
>
>
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies



--
Things which matter most must never be at the mercy of things which matter least.

-- Goethe

_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Call for presenters for 2012

Tony Cappellini
In reply to this post by Glen Jarvis
When would you like to present this?

On Tue, Jan 3, 2012 at 9:30 AM, Glen Jarvis <[hidden email]> wrote:
Tony,

I'm working on a virtualization introduction talk discussing setting up an EC2 instance on Amazon and then installing virtualenv on that instance.

It's still in rough planning stage as in more of a beginner/intermediate level tutorial on how these things work. It may be too basic for the typical BayPIGgies talk. But, one would walk away knowing how to create an Amazon Virtual Instance for free (and how these things are similar/different from virtualenv).

Glen

On Jan 2, 2012, at 5:30 PM, Tony Cappellini <[hidden email]> wrote:

>
>
> Hello and Happy New Year Everyone!
>
> I hope your holidays were happy and safe.
>
>
> Our first meeting for 2012 is on January 26th, and as yet we do not have anyone scheduled to give a presentation.
>
> If you have a project you would like to talk about or suggest a topic for a presentation, please post you comments
> to the list.
>
>
> Thanks
>
>
> Tony
>
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies

_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies


_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Tricky dictionary iteration problem

Corey Coughlin
Hi all,
   Sorry to bug everybody, but I'm having some trouble with a somewhat tricky class I'm trying to make.  I have a class that inherits from collections.OrderedDict, in an effort to create an ordered dictionary with some extra functions.  Now what I'd like to do is to change the iteration so that when you iterate over it, it iterates over values instead of keys.  This is turning out to be harder than I thought.  First, I tried this:

class od2(collections.OrderedDict):
    def __iter__(self):
        return iter(self.values())

Now the code I'm running creates a dict and tries to do a .copy on it, but I'd expect the problem to come up with most kind of dictionary access.  The problem is that it goes into an infinite recursion with messages like this

File "...", line 57, in __iter__
  return iter(self.values())
File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 372 in values
  return [self[key] for key in self]

It looks like the values() function uses the iterator to generate the values.  OK, so maybe I'll try this:

class od2(collections.OrderedDict):
    def __iter__(self):
        values = [self[key] for key in self.keys()]
        return iter(values)

that gives me messages like this:

File "...", line 56, in __iter__
  values = [self[key] for key in self.keys()]
File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 366 in keys
  return list(self)

and list() uses the iterator.  Gah.  So I'm out of ideas here, even if I dig into OrderedDict and find some way to pull the keys out, I'll probably have to rewrite a bunch of access functions for it to still work like a dictionary.  Am I just tilting at windmills, or is doing something like this actually possible?  Or am I just being dense, and there's a super obvious way to do this? Thanks for any help!

(Oh, and forgive me if there's a known fix for this, googling for anything along these lines just sent me to tons of tutorials about using the .values() function.  No help there.)

      ------- Corey

_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Tricky dictionary iteration problem

Robert Zuber-2
using super to avoid the recursion seems to work:

>>> class od2(collections.OrderedDict):
...     def __iter__(self):
...         return (v for v in super(collections.OrderedDict, self).itervalues())
...
>>> od = od2()
>>> od['a'] = 'b'
>>> od['c'] = 'd'
>>> [v for v in od]
['b', 'd']



On Jan 5, 2012, at 4:57 PM, [hidden email] wrote:

> Hi all,
>    Sorry to bug everybody, but I'm having some trouble with a somewhat tricky class I'm trying to make.  I have a class that inherits from collections.OrderedDict, in an effort to create an ordered dictionary with some extra functions.  Now what I'd like to do is to change the iteration so that when you iterate over it, it iterates over values instead of keys.  This is turning out to be harder than I thought.  First, I tried this:
>
> class od2(collections.OrderedDict):
>     def __iter__(self):
>         return iter(self.values())
>
> Now the code I'm running creates a dict and tries to do a .copy on it, but I'd expect the problem to come up with most kind of dictionary access.  The problem is that it goes into an infinite recursion with messages like this
>
> File "...", line 57, in __iter__
>   return iter(self.values())
> File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 372 in values
>   return [self[key] for key in self]
>
> It looks like the values() function uses the iterator to generate the values.  OK, so maybe I'll try this:
>
> class od2(collections.OrderedDict):
>     def __iter__(self):
>         values = [self[key] for key in self.keys()]
>         return iter(values)
>
> that gives me messages like this:
>
> File "...", line 56, in __iter__
>   values = [self[key] for key in self.keys()]
> File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 366 in keys
>   return list(self)
>
> and list() uses the iterator.  Gah.  So I'm out of ideas here, even if I dig into OrderedDict and find some way to pull the keys out, I'll probably have to rewrite a bunch of access functions for it to still work like a dictionary.  Am I just tilting at windmills, or is doing something like this actually possible?  Or am I just being dense, and there's a super obvious way to do this? Thanks for any help!
>
> (Oh, and forgive me if there's a known fix for this, googling for anything along these lines just sent me to tons of tutorials about using the .values() function.  No help there.)
>
>       ------- Corey
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies

_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Tricky dictionary iteration problem

Jason Culverhouse
In reply to this post by Corey Coughlin

On Jan 5, 2012, at 4:57 PM, [hidden email] wrote:

> Hi all,
>    Sorry to bug everybody, but I'm having some trouble with a somewhat tricky class I'm trying to make.  I have a class that inherits from collections.OrderedDict, in an effort to create an ordered dictionary with some extra functions.  Now what I'd like to do is to change the iteration so that when you iterate over it, it iterates over values instead of keys.  This is turning out to be harder than I thought.  First, I tried this:
>
> class od2(collections.OrderedDict):
>     def __iter__(self):
>         return iter(self.values())

I know I'm confused about what you want to do here... perhaps a code sample would be better but I'm thinking you just want itervalues?
(An aside but I don't think anything happened along the lines of http://www.python.org/dev/peps/pep-3106/ )

>>> import collections
>>> d = collections.OrderedDict([(1,'one'), (2, 'two'), (3, 'three'), (4, 'four')])
>>> d
OrderedDict([(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')])
>>> d.values()
['one', 'two', 'three', 'four']
>>> [v for v in d.itervalues()]
['one', 'two', 'three', 'four']

It would be quite confusing for one to write the following and not get anything but
>>> [k for k in d]
[1, 2, 3, 4]


> and list() uses the iterator.  Gah.  So I'm out of ideas here, even if I dig into OrderedDict and find some way to pull the keys out, I'll probably have to rewrite a bunch of access functions for it to still work like a dictionary.  Am I just tilting at windmills, or is doing something like this actually possible?  Or am I just being dense, and there's a super obvious way to do this? Thanks for any help!
>
> (Oh, and forgive me if there's a known fix for this, googling for anything along these lines just sent me to tons of tutorials about using the .values() function.  No help there.)
>
>       ------- Corey
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies


Jason

_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Tricky dictionary iteration problem

Corey Coughlin
In reply to this post by Robert Zuber-2
Thanks, that looks pretty good.  It still fails doing a .copy(), so I'll have to rewrite that.  And see what else I need to fix. 

As far as why I want to do it goes, well, I originally had an IndexedList class, which contained a list and a dictionary.  All the objects in the list had a .reference string attribute, and it worked mostly like a list with an index on it.  I wrote getitem to check the index to see if it were an integer or a string, and if it was a string use the dictionary reference for a fast look up of the object.  The problem there is that it eats a lot of memory for big data sets, so I was looking at using an OrderedDict based object to emulate that behavior.  Works pretty well, except that I need to change all my loops from:
for obj in indexlist:
to
for obj in indexlist.values():
and that's kind of a pain.  The simpler way to pull it off is to not inherit from OrderedDict, but just have an object attribute that holds an ordered dict and add all the mapping and iteration function calls manually.  That works, but I was looking for a simpler way to do it.  Looks like either way, I'll have to rewrite some functions.  Thanks for the help!

------- Corey


From: "Robert Zuber" <[hidden email]>
To: "corey coughlin" <[hidden email]>
Cc: [hidden email]
Sent: Thursday, January 5, 2012 5:22:14 PM
Subject: Re: [Baypiggies] Tricky dictionary iteration problem

using super to avoid the recursion seems to work:

>>> class od2(collections.OrderedDict):
...     def __iter__(self):
...         return (v for v in super(collections.OrderedDict, self).itervalues())
...
>>> od = od2()
>>> od['a'] = 'b'
>>> od['c'] = 'd'
>>> [v for v in od]
['b', 'd']



On Jan 5, 2012, at 4:57 PM, [hidden email] wrote:

> Hi all,
>    Sorry to bug everybody, but I'm having some trouble with a somewhat tricky class I'm trying to make.  I have a class that inherits from collections.OrderedDict, in an effort to create an ordered dictionary with some extra functions.  Now what I'd like to do is to change the iteration so that when you iterate over it, it iterates over values instead of keys.  This is turning out to be harder than I thought.  First, I tried this:
>
> class od2(collections.OrderedDict):
>     def __iter__(self):
>         return iter(self.values())
>
> Now the code I'm running creates a dict and tries to do a .copy on it, but I'd expect the problem to come up with most kind of dictionary access.  The problem is that it goes into an infinite recursion with messages like this
>
> File "...", line 57, in __iter__
>   return iter(self.values())
> File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 372 in values
>   return [self[key] for key in self]
>
> It looks like the values() function uses the iterator to generate the values.  OK, so maybe I'll try this:
>
> class od2(collections.OrderedDict):
>     def __iter__(self):
>         values = [self[key] for key in self.keys()]
>         return iter(values)
>
> that gives me messages like this:
>
> File "...", line 56, in __iter__
>   values = [self[key] for key in self.keys()]
> File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 366 in keys
>   return list(self)
>
> and list() uses the iterator.  Gah.  So I'm out of ideas here, even if I dig into OrderedDict and find some way to pull the keys out, I'll probably have to rewrite a bunch of access functions for it to still work like a dictionary.  Am I just tilting at windmills, or is doing something like this actually possible?  Or am I just being dense, and there's a super obvious way to do this? Thanks for any help!
>
> (Oh, and forgive me if there's a known fix for this, googling for anything along these lines just sent me to tons of tutorials about using the .values() function.  No help there.)
>
>       ------- Corey
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies


_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Tricky dictionary iteration problem

Hy Carrinski

Here are a few brief thoughts and then documentation. I appreciate consideration of the limits of writing a note rapidly on my mobile device. 

1. I think it will be hard to develop maintainable clean code by subclassing a dictionary to make it function like a dictionary but produce alternate output.

2. When one opens IDLE and chooses "open module" from the "File" menu, one can look at the collections module. Several of the methods of the OrderedDict depend on __iter__() so overriding it may produce interesting results (see info on subclassing in Python below).

3. In the collections module one can see the prevalence of yield statements. An iterator rarely benefits from returning a list. 

From http://docs.python.org/tutorial/classes.html

"Derived classes may override methods of their base classes. Because methods have no special privileges when calling other methods of the same object, a method of a base class that calls another method defined in the same base class may end up calling a method of a derived class that overrides it."

For reference, here is an example of the __iter__ method being overridden. Apologies for removing comments/license when transcribing Python 2.7 source.

def __iter__():
    NEXT, KEY = 1, 2
    root = self.__root
    curr = root[NEXT]
    while curr is not root:
        yield curr[KEY]
        curr = curr[NEXT]

Hope these opinions and information add to the dialog.

Hy

On Jan 5, 2012, at 9:06 PM, "[hidden email]" <[hidden email]> wrote:

Thanks, that looks pretty good.  It still fails doing a .copy(), so I'll have to rewrite that.  And see what else I need to fix. 

As far as why I want to do it goes, well, I originally had an IndexedList class, which contained a list and a dictionary.  All the objects in the list had a .reference string attribute, and it worked mostly like a list with an index on it.  I wrote getitem to check the index to see if it were an integer or a string, and if it was a string use the dictionary reference for a fast look up of the object.  The problem there is that it eats a lot of memory for big data sets, so I was looking at using an OrderedDict based object to emulate that behavior.  Works pretty well, except that I need to change all my loops from:
for obj in indexlist:
to
for obj in indexlist.values():
and that's kind of a pain.  The simpler way to pull it off is to not inherit from OrderedDict, but just have an object attribute that holds an ordered dict and add all the mapping and iteration function calls manually.  That works, but I was looking for a simpler way to do it.  Looks like either way, I'll have to rewrite some functions.  Thanks for the help!

------- Corey


From: "Robert Zuber" <[hidden email]>
To: "corey coughlin" <[hidden email]>
Cc: [hidden email]
Sent: Thursday, January 5, 2012 5:22:14 PM
Subject: Re: [Baypiggies] Tricky dictionary iteration problem

using super to avoid the recursion seems to work:

>>> class od2(collections.OrderedDict):
...     def __iter__(self):
...         return (v for v in super(collections.OrderedDict, self).itervalues())
...
>>> od = od2()
>>> od['a'] = 'b'
>>> od['c'] = 'd'
>>> [v for v in od]
['b', 'd']



On Jan 5, 2012, at 4:57 PM, [hidden email] wrote:

> Hi all,
>    Sorry to bug everybody, but I'm having some trouble with a somewhat tricky class I'm trying to make.  I have a class that inherits from collections.OrderedDict, in an effort to create an ordered dictionary with some extra functions.  Now what I'd like to do is to change the iteration so that when you iterate over it, it iterates over values instead of keys.  This is turning out to be harder than I thought.  First, I tried this:
>
> class od2(collections.OrderedDict):
>     def __iter__(self):
>         return iter(self.values())
>
> Now the code I'm running creates a dict and tries to do a .copy on it, but I'd expect the problem to come up with most kind of dictionary access.  The problem is that it goes into an infinite recursion with messages like this
>
> File "...", line 57, in __iter__
>   return iter(self.values())
> File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 372 in values
>   return [self[key] for key in self]
>
> It looks like the values() function uses the iterator to generate the values.  OK, so maybe I'll try this:
>
> class od2(collections.OrderedDict):
>     def __iter__(self):
>         values = [self[key] for key in self.keys()]
>         return iter(values)
>
> that gives me messages like this:
>
> File "...", line 56, in __iter__
>   values = [self[key] for key in self.keys()]
> File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 366 in keys
>   return list(self)
>
> and list() uses the iterator.  Gah.  So I'm out of ideas here, even if I dig into OrderedDict and find some way to pull the keys out, I'll probably have to rewrite a bunch of access functions for it to still work like a dictionary.  Am I just tilting at windmills, or is doing something like this actually possible?  Or am I just being dense, and there's a super obvious way to do this? Thanks for any help!
>
> (Oh, and forgive me if there's a known fix for this, googling for anything along these lines just sent me to tons of tutorials about using the .values() function.  No help there.)
>
>       ------- Corey
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies

_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies

_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies