From cbc at unc.edu Tue Jun 7 07:27:28 2011 From: cbc at unc.edu (Chris Calloway) Date: Tue, 07 Jun 2011 01:27:28 -0400 Subject: [PyAR2] Seattle PyCamp 2011 Message-ID: <4DEDB6C0.5070809@unc.edu> University of Washington Marketing and the Seattle Plone Gathering host the inaugural Seattle PyCamp 2011 at The Paul G. Allen Center for Computer Science & Engineering on Monday, August 29 through Friday, September 2, 2011. Register today at http://trizpug.org/boot-camp/seapy11/ For beginners, this ultra-low-cost Python Boot Camp makes you productive so you can get your work done quickly. PyCamp emphasizes the features which make Python a simpler and more efficient language. Following along with example Python PushUps? speeds your learning process. Become a self-sufficient Python developer in just five days at PyCamp! PyCamp is conducted on the campus of the University of Washington in a state of the art high technology classroom. -- Sincerely, Chris Calloway http://nccoos.org/Members/cbc office: 3313 Venable Hall phone: (919) 599-3530 mail: Campus Box #3300, UNC-CH, Chapel Hill, NC 27599 From jhjaggars at gmail.com Mon Jun 20 00:53:35 2011 From: jhjaggars at gmail.com (Jesse Jaggars) Date: Sun, 19 Jun 2011 17:53:35 -0500 Subject: [PyAR2] Car Talk Puzzler In-Reply-To: References: Message-ID: Here is my solution that disregards leading zeros in the hour spot. Feel free to point out the bugs. from collections import defaultdict def fmt(bit): return "%02d" % bit def test(hour, minute): counter = defaultdict(int) for pos in str(hour) + fmt(minute): counter[pos] += 1 for key,value in counter.iteritems(): if value >= 3: return True return False if __name__ == "__main__": times = 0 for half in ('am', 'pm'): for hour in range(1,13): for minute in range(0, 60): if test(hour,minute): print "%s:%s %s" % (str(hour), fmt(minute), half) times += 1 print times On Mon, May 2, 2011 at 11:45 AM, Greg Lindstrom wrote: > Each week, the radio program "Car Talk" (NPR) offers up a puzzler; a quirky > problem that usually requires some sort of "aha" to solve. Sometimes > they're mathematical, sometimes not. This week, the puzzler asks "How many > times in a day does a digital clock (in 12-hour mode) display a time with 3 > of the same digits (1:11, 2:22, etc.). It's a "trick" question, of course, > but it took less than 5 minutes for me to write a python program to solve it > (my boss will be happy to know that because I should be working). > > Can you write a routine to solve it? > > > > _______________________________________________ > PyAR2 mailing list > PyAR2 at python.org > http://mail.python.org/mailman/listinfo/pyar2 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gslindstrom at gmail.com Fri Jun 24 16:20:58 2011 From: gslindstrom at gmail.com (Greg Lindstrom) Date: Fri, 24 Jun 2011 09:20:58 -0500 Subject: [PyAR2] Obfuscated Python! Message-ID: Ok. It IS possible to write obfuscated code in Python, especially when you use "lambda" functions. This little ditty writes out one of my (and, I hope, your) favorite mathematical constants in just a couple seconds (on my machine). This is not my doing; it was posted on the Python list. Can you figure out how it does what it does? --greg print((lambda f:((lambda p:p[0]+'.'+p[1:])(str((lambda Q:2*Q[0]*Q[0]//Q [3])((lambda F:(lambda S:f(lambda T,_:((T[0]+T[1])//2,S((T[0]*T[1])// F),2*T[2],(T[3]-(T[2]*(((T[0]+T[1])//2)**2-(S((T[0]*T[1])//F))**2))//F)), [0]*13,(F,(F*F)//S(2*F),2,F//2)))(lambda n:f(lambda x,_:(x-x//2+(n*F)// (2*x)),[0]*15,n//2)))(10**(5010))))[:5000])))(reduce)) -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.curtin at gmail.com Wed Jun 29 05:29:34 2011 From: brian.curtin at gmail.com (Brian Curtin) Date: Tue, 28 Jun 2011 22:29:34 -0500 Subject: [PyAR2] Python User Group International Survey Message-ID: The PSF is happy to launch today an international survey of Python user group organizers to help it better serve the large and ever-expanding international Python user community. The survey contains questions on user group organization, events, demographics, and growth. There are some questions with numerical answers, and while your best guess is fine, you may find it helpful to gather some statistics on your user group membership before starting the survey (example statistics include the number of active members and the size and topics for recent user group events). We expect this survey to take around 30 minutes to complete. We appreciate your time and honesty in answering these questions. The PSF blog post announcing the survey: http://pyfound.blogspot.com/2011/06/tell-us-about-your-user-group.html The survey was written by Jessica McKellar (http://jesstess.com), organizer for the Boston Python Meetup (http://meetup.bostonpython.com), and Jesse Noller (http://jessenoller.com/), PSF board member and PyCon chair with input and feedback from survey specialists and others. https://www.surveymonkey.com/s/BWLG8SZ The survey was pretested with a handful of user group organizers, and their answers were phenomenal. Organizers have tons to say about these topics, and we hope to get a lot of great, actionable data for strengthening the relationship between the PSF and Python user groups out of this effort. Outreach, education, diversity and community building are critical for Python as a community, and the Foundation - this data should greatly assist in our targeting our resources and furthering the mission of the Foundation in all ways. Thank you The Python Software Foundation Jessica McKellar Jesse Noller -------------- next part -------------- An HTML attachment was scrubbed... URL: