From wirth.jason at gmail.com Sun Mar 1 15:40:40 2015 From: wirth.jason at gmail.com (Jason Wirth) Date: Sun, 1 Mar 2015 08:40:40 -0600 Subject: [Chicago] How can ChiPy be better? Message-ID: Tell us how! While you wait for your Sunday morning coffee to brew take a couple minutes to give us feedback on how things are going. ChiPy does a lot of things -- some of it we do well, some of it probably not so well. Now is the time to let us know which. Please fill out our survey! https://www.surveymonkey.com/s/JQZHKMB We truly value the voice of the community and want to hear your thoughts. In only 2-minutes you can make ChiPy more awesome. So click the link to our anonymous survey to make your voice count! Thank you, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From brianhray at gmail.com Mon Mar 2 03:32:41 2015 From: brianhray at gmail.com (Brian Ray) Date: Sun, 1 Mar 2015 20:32:41 -0600 Subject: [Chicago] Talks for March Meeting Message-ID: Anyone got something they want to present on? You can enter your talks here: http://www.chipy.org/meetings/topics/propose Give me your best stuff. Does not have to be long; however, can be. Cheers! Brian -- Brian Ray @brianray (773) 669-7717 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tanya at tickel.net Mon Mar 2 16:08:20 2015 From: tanya at tickel.net (Tanya Schlusser) Date: Mon, 2 Mar 2015 09:08:20 -0600 Subject: [Chicago] Talks for March Meeting Message-ID: > > > Anyone got something they want to present on? > > You can enter your talks here: > http://www.chipy.org/meetings/topics/propose I have a request -- I'd love to hear lightning talks on "Why << P >> is my favorite package" ... -------------- next part -------------- An HTML attachment was scrubbed... URL: From brianhray at gmail.com Mon Mar 2 23:38:55 2015 From: brianhray at gmail.com (Brian Ray) Date: Mon, 2 Mar 2015 16:38:55 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: Just some small formatting issues. Try to use spaces (4) not tabs. and "while not L.next.next" is preferred over "while L.next.next != None" On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas wrote: > Hey guys--and ladies too! It's been a while since I shared any Python > work with this forum, so I figured hey, why not? > > This is my first effort at implementing a *linked list* in Python. Fun > stuff! I'm taking a Java data structures course right now at > Northeastern. Java is a nice language, and according to the online > statistics Java is the king of all programming languages, at least for > right now. (The computer world is extremely fickle, so we really don't > know which programming language will be "the king" in 5 or 10 years.) > > Anyhow, I purchased this book on Python data structures by Magnus Lie > Hetland. Great book and so helpful! It has even helped me better > understand the concepts in my Java course. (The languages are > different--sure thing--but I think the core concepts are almost exactly the > same.) The name of the book is PYTHON ALGORITHMS. Magnus Lie Hetland is > the author. It's really good. > > So I'm attaching my code. Please be kind in your criticisms! I know it's > not the Mona Lisa of computer programming, but hey, if I'm lucky my mother > will tape a printed copy of the program to the refrigerator door and leave > it there with a gold star on it for the next few days!!! ;-) Is that > really asking for too much?! LOL!!! > > Best, > > Douglas. > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -- Brian Ray @brianray (773) 669-7717 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fibonacci_pep8.py Type: text/x-python-script Size: 2555 bytes Desc: not available URL: From brianhray at gmail.com Mon Mar 2 23:40:14 2015 From: brianhray at gmail.com (Brian Ray) Date: Mon, 2 Mar 2015 16:40:14 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: i probably meant ""while L.next.next", but you get what I mean, I hope. On Mon, Mar 2, 2015 at 4:38 PM, Brian Ray wrote: > Just some small formatting issues. Try to use spaces (4) not tabs. > > and "while not L.next.next" is preferred over "while L.next.next != None" > > > > On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas wrote: > >> Hey guys--and ladies too! It's been a while since I shared any Python >> work with this forum, so I figured hey, why not? >> >> This is my first effort at implementing a *linked list* in Python. Fun >> stuff! I'm taking a Java data structures course right now at >> Northeastern. Java is a nice language, and according to the online >> statistics Java is the king of all programming languages, at least for >> right now. (The computer world is extremely fickle, so we really don't >> know which programming language will be "the king" in 5 or 10 years.) >> >> Anyhow, I purchased this book on Python data structures by Magnus Lie >> Hetland. Great book and so helpful! It has even helped me better >> understand the concepts in my Java course. (The languages are >> different--sure thing--but I think the core concepts are almost exactly the >> same.) The name of the book is PYTHON ALGORITHMS. Magnus Lie Hetland is >> the author. It's really good. >> >> So I'm attaching my code. Please be kind in your criticisms! I know >> it's not the Mona Lisa of computer programming, but hey, if I'm lucky my >> mother will tape a printed copy of the program to the refrigerator door and >> leave it there with a gold star on it for the next few days!!! ;-) Is >> that really asking for too much?! LOL!!! >> >> Best, >> >> Douglas. >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > > -- > Brian Ray > @brianray > (773) 669-7717 > -- Brian Ray @brianray (773) 669-7717 -------------- next part -------------- An HTML attachment was scrubbed... URL: From MDiPierro at cs.depaul.edu Mon Mar 2 23:59:45 2015 From: MDiPierro at cs.depaul.edu (DiPierro, Massimo) Date: Mon, 2 Mar 2015 22:59:45 +0000 Subject: [Chicago] DePy 2015 In-Reply-To: References: Message-ID: Hello Chipy, Collaborators and I are organizing a medium size conference in Chicago about Python: http://mdp.cdm.depaul.edu/DePy2015 I would really like to do this in collaboration with Chipy because Chicago+Python = Chipy. What does it mean? I hope to have a few volunteers from Chipy to join our organizing committee. I also hope to have talk proposals and/or suggestions from Chipy members. If you know of any good speakers who did or did not make to PyCon this year, please let me know. Massimo From brianhray at gmail.com Tue Mar 3 00:03:32 2015 From: brianhray at gmail.com (Brian Ray) Date: Mon, 2 Mar 2015 17:03:32 -0600 Subject: [Chicago] DePy 2015 In-Reply-To: References: Message-ID: Do you still teach on Thursdays? If not, you might want to come to our next meeting. Also we have a meetup.com discussion board. On Mon, Mar 2, 2015 at 4:59 PM, DiPierro, Massimo wrote: > Hello Chipy, > > Collaborators and I are organizing a medium size conference in Chicago > about Python: > > http://mdp.cdm.depaul.edu/DePy2015 > > I would really like to do this in collaboration with Chipy because > Chicago+Python = Chipy. > > What does it mean? I hope to have a few volunteers from Chipy to join our > organizing committee. > I also hope to have talk proposals and/or suggestions from Chipy members. > If you know of any good speakers who did or did not make to PyCon this > year, please let me know. > > Massimo > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -- Brian Ray @brianray (773) 669-7717 -------------- next part -------------- An HTML attachment was scrubbed... URL: From MDiPierro at cs.depaul.edu Tue Mar 3 00:07:55 2015 From: MDiPierro at cs.depaul.edu (DiPierro, Massimo) Date: Mon, 2 Mar 2015 23:07:55 +0000 Subject: [Chicago] DePy 2015 In-Reply-To: References: Message-ID: I teach on Tuesday and Thursday night. I will not teach on Thursday in April and I will try attend your April meeting. Look forward to. Massimo On Mar 2, 2015, at 5:03 PM, Brian Ray > wrote: Do you still teach on Thursdays? If not, you might want to come to our next meeting. Also we have a meetup.com discussion board. On Mon, Mar 2, 2015 at 4:59 PM, DiPierro, Massimo > wrote: Hello Chipy, Collaborators and I are organizing a medium size conference in Chicago about Python: http://mdp.cdm.depaul.edu/DePy2015 I would really like to do this in collaboration with Chipy because Chicago+Python = Chipy. What does it mean? I hope to have a few volunteers from Chipy to join our organizing committee. I also hope to have talk proposals and/or suggestions from Chipy members. If you know of any good speakers who did or did not make to PyCon this year, please let me know. Massimo _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago -- Brian Ray @brianray (773) 669-7717 _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago From d-lewit at neiu.edu Tue Mar 3 17:57:58 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Tue, 3 Mar 2015 10:57:58 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: I was thinking about that last night! ;-) So then I assume that "None" is equivalent to Java's null, but according to what you wrote above "None" evaluates to False in a truth test? I didn't know that! Very cool. What's the difference between spaces and tabs? My favorite text editors for program writing are the Unix/Linux/Mac editors *Vim* and *Emacs*. Both of those have builtin tab functions. Emacs is especially good with deciding where to place tab indentations. Vim is okay too, but Emacs is really, really good. I repeated the same program in Python 3. Some interesting changes! 10/3 gives you 3 in Python 3. 10/3 gives you 3.333333333333 in Python 3. To get 3 you need 10//3. We all know about the print function. And some other changes too. Do you think the language benefitted from these backward INcompatible changes? I think the Python community is still wondering about that. On Mon, Mar 2, 2015 at 4:40 PM, Brian Ray wrote: > > i probably meant ""while L.next.next", but you get what I mean, I hope. > > On Mon, Mar 2, 2015 at 4:38 PM, Brian Ray wrote: > >> Just some small formatting issues. Try to use spaces (4) not tabs. >> >> and "while not L.next.next" is preferred over "while L.next.next != None" >> >> >> >> On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas wrote: >> >>> Hey guys--and ladies too! It's been a while since I shared any Python >>> work with this forum, so I figured hey, why not? >>> >>> This is my first effort at implementing a *linked list* in Python. Fun >>> stuff! I'm taking a Java data structures course right now at >>> Northeastern. Java is a nice language, and according to the online >>> statistics Java is the king of all programming languages, at least for >>> right now. (The computer world is extremely fickle, so we really don't >>> know which programming language will be "the king" in 5 or 10 years.) >>> >>> Anyhow, I purchased this book on Python data structures by Magnus Lie >>> Hetland. Great book and so helpful! It has even helped me better >>> understand the concepts in my Java course. (The languages are >>> different--sure thing--but I think the core concepts are almost exactly the >>> same.) The name of the book is PYTHON ALGORITHMS. Magnus Lie Hetland is >>> the author. It's really good. >>> >>> So I'm attaching my code. Please be kind in your criticisms! I know >>> it's not the Mona Lisa of computer programming, but hey, if I'm lucky my >>> mother will tape a printed copy of the program to the refrigerator door and >>> leave it there with a gold star on it for the next few days!!! ;-) Is >>> that really asking for too much?! LOL!!! >>> >>> Best, >>> >>> Douglas. >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >>> >> >> >> -- >> Brian Ray >> @brianray >> (773) 669-7717 >> > > > > -- > Brian Ray > @brianray > (773) 669-7717 > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinaldo at gmail.com Tue Mar 3 18:06:38 2015 From: dinaldo at gmail.com (Don Sheu) Date: Tue, 3 Mar 2015 09:06:38 -0800 Subject: [Chicago] DePy 2015 In-Reply-To: References: Message-ID: <6B2D0A43-EC8E-4415-9615-A9B651CD1941@gmail.com> PuPPy meets Wednesday nights by design so ChiPy members may join us. Sent from my iPhone > On Mar 2, 2015, at 3:07 PM, DiPierro, Massimo wrote: > > I teach on Tuesday and Thursday night. I will not teach on Thursday in April and I will try attend your April meeting. Look forward to. > > Massimo > > On Mar 2, 2015, at 5:03 PM, Brian Ray > wrote: > > Do you still teach on Thursdays? If not, you might want to come to our next meeting. Also we have a meetup.com discussion board. > > > On Mon, Mar 2, 2015 at 4:59 PM, DiPierro, Massimo > wrote: > Hello Chipy, > > Collaborators and I are organizing a medium size conference in Chicago about Python: > > http://mdp.cdm.depaul.edu/DePy2015 > > I would really like to do this in collaboration with Chipy because Chicago+Python = Chipy. > > What does it mean? I hope to have a few volunteers from Chipy to join our organizing committee. > I also hope to have talk proposals and/or suggestions from Chipy members. If you know of any good speakers who did or did not make to PyCon this year, please let me know. > > Massimo > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > > > -- > Brian Ray > @brianray > (773) 669-7717 > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago From brianhray at gmail.com Tue Mar 3 18:09:38 2015 From: brianhray at gmail.com (Brian Ray) Date: Tue, 3 Mar 2015 11:09:38 -0600 Subject: [Chicago] DePy 2015 In-Reply-To: <6B2D0A43-EC8E-4415-9615-A9B651CD1941@gmail.com> References: <6B2D0A43-EC8E-4415-9615-A9B651CD1941@gmail.com> Message-ID: Don: It will take me 669hours walking time to get from Chicago Loop to your meetup. On Tue, Mar 3, 2015 at 11:06 AM, Don Sheu wrote: > PuPPy meets Wednesday nights by design so ChiPy members may join us. > > Sent from my iPhone > > > On Mar 2, 2015, at 3:07 PM, DiPierro, Massimo > wrote: > > > > I teach on Tuesday and Thursday night. I will not teach on Thursday in > April and I will try attend your April meeting. Look forward to. > > > > Massimo > > > > On Mar 2, 2015, at 5:03 PM, Brian Ray brianhray at gmail.com>> wrote: > > > > Do you still teach on Thursdays? If not, you might want to come to our > next meeting. Also we have a meetup.com discussion > board. > > > > > > On Mon, Mar 2, 2015 at 4:59 PM, DiPierro, Massimo < > MDiPierro at cs.depaul.edu> wrote: > > Hello Chipy, > > > > Collaborators and I are organizing a medium size conference in Chicago > about Python: > > > > http://mdp.cdm.depaul.edu/DePy2015 > > > > I would really like to do this in collaboration with Chipy because > Chicago+Python = Chipy. > > > > What does it mean? I hope to have a few volunteers from Chipy to join > our organizing committee. > > I also hope to have talk proposals and/or suggestions from Chipy > members. If you know of any good speakers who did or did not make to PyCon > this year, please let me know. > > > > Massimo > > > > _______________________________________________ > > Chicago mailing list > > Chicago at python.org > > https://mail.python.org/mailman/listinfo/chicago > > > > > > > > -- > > Brian Ray > > @brianray > > (773) 669-7717 > > _______________________________________________ > > Chicago mailing list > > Chicago at python.org > > https://mail.python.org/mailman/listinfo/chicago > > > > _______________________________________________ > > Chicago mailing list > > Chicago at python.org > > https://mail.python.org/mailman/listinfo/chicago > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -- Brian Ray @brianray (773) 669-7717 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinaldo at gmail.com Tue Mar 3 18:13:26 2015 From: dinaldo at gmail.com (Don Sheu) Date: Tue, 3 Mar 2015 09:13:26 -0800 Subject: [Chicago] DePy 2015 In-Reply-To: References: <6B2D0A43-EC8E-4415-9615-A9B651CD1941@gmail.com> Message-ID: <8F1DE6D8-B043-4F04-8C53-E5A95567E268@gmail.com> Run Sent from my iPhone > On Mar 3, 2015, at 9:09 AM, Brian Ray wrote: > > Don: > > It will take me 669hours walking time to get from Chicago Loop to your meetup. > >> On Tue, Mar 3, 2015 at 11:06 AM, Don Sheu wrote: >> PuPPy meets Wednesday nights by design so ChiPy members may join us. >> >> Sent from my iPhone >> >> > On Mar 2, 2015, at 3:07 PM, DiPierro, Massimo wrote: >> > >> > I teach on Tuesday and Thursday night. I will not teach on Thursday in April and I will try attend your April meeting. Look forward to. >> > >> > Massimo >> > >> > On Mar 2, 2015, at 5:03 PM, Brian Ray > wrote: >> > >> > Do you still teach on Thursdays? If not, you might want to come to our next meeting. Also we have a meetup.com discussion board. >> > >> > >> > On Mon, Mar 2, 2015 at 4:59 PM, DiPierro, Massimo > wrote: >> > Hello Chipy, >> > >> > Collaborators and I are organizing a medium size conference in Chicago about Python: >> > >> > http://mdp.cdm.depaul.edu/DePy2015 >> > >> > I would really like to do this in collaboration with Chipy because Chicago+Python = Chipy. >> > >> > What does it mean? I hope to have a few volunteers from Chipy to join our organizing committee. >> > I also hope to have talk proposals and/or suggestions from Chipy members. If you know of any good speakers who did or did not make to PyCon this year, please let me know. >> > >> > Massimo >> > >> > _______________________________________________ >> > Chicago mailing list >> > Chicago at python.org >> > https://mail.python.org/mailman/listinfo/chicago >> > >> > >> > >> > -- >> > Brian Ray >> > @brianray >> > (773) 669-7717 >> > _______________________________________________ >> > Chicago mailing list >> > Chicago at python.org >> > https://mail.python.org/mailman/listinfo/chicago >> > >> > _______________________________________________ >> > Chicago mailing list >> > Chicago at python.org >> > https://mail.python.org/mailman/listinfo/chicago >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago > > > > -- > Brian Ray > @brianray > (773) 669-7717 > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago -------------- next part -------------- An HTML attachment was scrubbed... URL: From shekay at pobox.com Tue Mar 3 18:13:20 2015 From: shekay at pobox.com (sheila miguez) Date: Tue, 3 Mar 2015 11:13:20 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: On Tue, Mar 3, 2015 at 10:57 AM, Lewit, Douglas wrote: > What's the difference between spaces and tabs? My favorite text editors > for program writing are the Unix/Linux/Mac editors *Vim* and *Emacs*. > Both of those have builtin tab functions. Emacs is especially good with > deciding where to place tab indentations. Vim The preferred convention is spaces over tabs. https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces Both vim and emacs can be configured to use spaces for tabs and can also be configured to auto-indent with spaces. -- shekay at pobox.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From japhy at pearachute.com Tue Mar 3 18:18:46 2015 From: japhy at pearachute.com (Japhy Bartlett) Date: Tue, 3 Mar 2015 11:18:46 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: Spaces and tabs both work, but if you mix them it creates a terrible mess. So by convention, we all agreed to use spaces for our collective sanity. I wanted to make another very slight criticism of your code; often when people start learning Python they get to the part about classes and inheritance and start using classes for everything. So it's good to see that you've figured out how that works, but it's not really helpful to your program. I can see ways that all could be much simpler! Well done though, and thank you for posting actual Python code :) - Japhy On Tue, Mar 3, 2015 at 10:57 AM, Lewit, Douglas wrote: > I was thinking about that last night! ;-) So then I assume that "None" > is equivalent to Java's null, but according to what you wrote above "None" > evaluates to False in a truth test? I didn't know that! Very cool. > > What's the difference between spaces and tabs? My favorite text editors > for program writing are the Unix/Linux/Mac editors *Vim* and *Emacs*. > Both of those have builtin tab functions. Emacs is especially good with > deciding where to place tab indentations. Vim is okay too, but Emacs is > really, really good. > > I repeated the same program in Python 3. Some interesting changes! 10/3 > gives you 3 in Python 3. 10/3 gives you 3.333333333333 in Python 3. To > get 3 you need 10//3. We all know about the print function. And some > other changes too. Do you think the language benefitted from these > backward INcompatible changes? I think the Python community is still > wondering about that. > > On Mon, Mar 2, 2015 at 4:40 PM, Brian Ray wrote: > >> >> i probably meant ""while L.next.next", but you get what I mean, I hope. >> >> On Mon, Mar 2, 2015 at 4:38 PM, Brian Ray wrote: >> >>> Just some small formatting issues. Try to use spaces (4) not tabs. >>> >>> and "while not L.next.next" is preferred over "while L.next.next != None" >>> >>> >>> >>> On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas >>> wrote: >>> >>>> Hey guys--and ladies too! It's been a while since I shared any Python >>>> work with this forum, so I figured hey, why not? >>>> >>>> This is my first effort at implementing a *linked list* in Python. >>>> Fun stuff! I'm taking a Java data structures course right now at >>>> Northeastern. Java is a nice language, and according to the online >>>> statistics Java is the king of all programming languages, at least for >>>> right now. (The computer world is extremely fickle, so we really don't >>>> know which programming language will be "the king" in 5 or 10 years.) >>>> >>>> Anyhow, I purchased this book on Python data structures by Magnus Lie >>>> Hetland. Great book and so helpful! It has even helped me better >>>> understand the concepts in my Java course. (The languages are >>>> different--sure thing--but I think the core concepts are almost exactly the >>>> same.) The name of the book is PYTHON ALGORITHMS. Magnus Lie Hetland is >>>> the author. It's really good. >>>> >>>> So I'm attaching my code. Please be kind in your criticisms! I know >>>> it's not the Mona Lisa of computer programming, but hey, if I'm lucky my >>>> mother will tape a printed copy of the program to the refrigerator door and >>>> leave it there with a gold star on it for the next few days!!! ;-) Is >>>> that really asking for too much?! LOL!!! >>>> >>>> Best, >>>> >>>> Douglas. >>>> >>>> _______________________________________________ >>>> Chicago mailing list >>>> Chicago at python.org >>>> https://mail.python.org/mailman/listinfo/chicago >>>> >>>> >>> >>> >>> -- >>> Brian Ray >>> @brianray >>> (773) 669-7717 >>> >> >> >> >> -- >> Brian Ray >> @brianray >> (773) 669-7717 >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shekay at pobox.com Tue Mar 3 18:21:06 2015 From: shekay at pobox.com (sheila miguez) Date: Tue, 3 Mar 2015 11:21:06 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas wrote: > So I'm attaching my code. Please be kind in your criticisms! I know I have a suggestion -- you might consider using gists or pastebins for sharing code, for example. https://gist.github.com/ http://paste.ubuntu.com/ I bet people have better suggestions than these. I do that sometimes when I want to share some one-off things. e.g. I was talking to a co-maintainer of pyvideo about what I needed to do to use the youtube api since we want to ditch vidscraper and I shared some sloppy one-off code here https://gist.github.com/codersquid/8c1aa67f29c97ad0572f it is not ready for prime time and definitely does not fit with what I'd want to do to add it to our library. -- shekay at pobox.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl at personnelware.com Tue Mar 3 18:39:50 2015 From: carl at personnelware.com (Carl Karsten) Date: Tue, 3 Mar 2015 11:39:50 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: anytime this comes up I post this cuz it sums things up nicely. http://www.jwz.org/doc/tabs-vs-spaces.html On Tue, Mar 3, 2015 at 11:21 AM, sheila miguez wrote: > > On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas wrote: > >> So I'm attaching my code. Please be kind in your criticisms! I know > > > I have a suggestion -- you might consider using gists or pastebins for > sharing code, for example. > > https://gist.github.com/ > http://paste.ubuntu.com/ > > I bet people have better suggestions than these. > > I do that sometimes when I want to share some one-off things. e.g. I was > talking to a co-maintainer of pyvideo about what I needed to do to use the > youtube api since we want to ditch vidscraper and I shared some sloppy > one-off code here https://gist.github.com/codersquid/8c1aa67f29c97ad0572f > it is not ready for prime time and definitely does not fit with what I'd > want to do to add it to our library. > > > -- > shekay at pobox.com > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -- Carl K -------------- next part -------------- An HTML attachment was scrubbed... URL: From prometheus235 at gmail.com Tue Mar 3 21:36:16 2015 From: prometheus235 at gmail.com (Nick Timkovich) Date: Tue, 3 Mar 2015 14:36:16 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: Looking at your code, the biggest stylistic faux pas is the "casting"--(int)(input)--you can wrap nearly anything in parenthesis (i.e. a function call), but it's really strange. I did a few passes through your code at lunch and went a bit overboard, but here's a Gist that's maybe how I'd go about it https://gist.github.com/nicktimko/39a41948cff170ae7d0b Check the revisions for some slightly more incremental changes and ask if you have any questions. Arguing Python 2 vs. Python 3 is pointless IMHO; Python 3 is the future and there are fewer reasons to use 2 every day as old modules are updated. It should be used by default for all new projects unless there is a concrete reason at the outset why it won't work (e.g. you need to use Twisted). On Tue, Mar 3, 2015 at 11:39 AM, Carl Karsten wrote: > anytime this comes up I post this cuz it sums things up nicely. > > http://www.jwz.org/doc/tabs-vs-spaces.html > > On Tue, Mar 3, 2015 at 11:21 AM, sheila miguez wrote: > >> >> On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas wrote: >> >>> So I'm attaching my code. Please be kind in your criticisms! I know >> >> >> I have a suggestion -- you might consider using gists or pastebins for >> sharing code, for example. >> >> https://gist.github.com/ >> http://paste.ubuntu.com/ >> >> I bet people have better suggestions than these. >> >> I do that sometimes when I want to share some one-off things. e.g. I was >> talking to a co-maintainer of pyvideo about what I needed to do to use the >> youtube api since we want to ditch vidscraper and I shared some sloppy >> one-off code here https://gist.github.com/codersquid/8c1aa67f29c97ad0572f >> it is not ready for prime time and definitely does not fit with what I'd >> want to do to add it to our library. >> >> >> -- >> shekay at pobox.com >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > > -- > Carl K > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl at personnelware.com Wed Mar 4 01:37:51 2015 From: carl at personnelware.com (Carl Karsten) Date: Tue, 3 Mar 2015 18:37:51 -0600 Subject: [Chicago] Video sponsorship for March ChiPy Message-ID: $200 gets your logo on the title slide of the videos (however many video's get made this month) and the warm fuzzy of supporting me. http://www.chipy.org Click Donate to Chipy, drop $200 and email me a logo (or URL) (unless we have done this before, I keep them around) This month is *A Talk on Giving a Pythonic Talk * By: Xan and Catherine Vongsathorn and maybe one or two more. -- Carl K -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Wed Mar 4 00:53:06 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Tue, 3 Mar 2015 17:53:06 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: Oh I know, I found a "hammer" that works and now I want to strike every nail with it. But I'm semi-new to Python and the whole object-oriented thing is kind of interesting. Also, it's amazing how fast the linked list implementation works compared to using recursion for the Fibonacci series. With recursion it takes FOREVER, especially if n is some integer larger than let's say 40 or something like that. On a totally different subject.... does anyone in the group know anything about a Kali Linux installation??? PLEASE HELP! Long story, I have (or had) Ubuntu on my HP PC. (I have three laptops actually, two Macs and one PC.) Okay, the Ubuntu installation is pretty painless and whoever wrote the install program did an awesome job. Someone in my data structures class showed me Kali Linux and my first reaction was, WOW!!!! So I thought I would get clever and do a dual boot, Ubuntu and Kali together on the same hard drive. Well I managed to download and configure (after much research via Google) a thumb drive with .iso on it. The problem is that if you boot off the thumb drive, sure Kali Linux works just great, but your changes won't be saved. You can change the date, time, create files, change the font size in Terminal, etc, etc, but then when shut down the computer and boot back into a Live session of Kali Linux all your changes and files are gone.... so why bother? So.... I tried a Graphical Install of Kali Linux after shrinking my partition with Ubuntu on it, right? All was fine and copacetic, no problems. I used GParted and the partitions were created, okay--lovely. THEN THINGS GOT REALLY F--KED up when I did the Graphical Installation of Kali. (No doubt the Hindu goddess Kali put a curse on me or my computer!!!!) The installer prompted me for all this technical information about my network in order to configure the apt command. (In Linux you can use "apt" to install updates and programs from the nearest repository or "mirror".) I mean.... I know the name and password for my wireless setup, but I don't have all this other techie info about my "network"! So the Installer warned me that I would have a minimal installation. Okay, fine. So then when I booted up to Kali, it would not accept my username and password!!!! So I said screw it, I'll just erase the partition that contains Kali.... A VERY DUMB THING TO DO! Because the Kali Linux partition contained Grub!!!!! So..... I screwed myself royally. I just decided to insert the Ubuntu CD and do a fresh install of Ubuntu--which of course means that all my files on the previous install got erased! (Yes, I have a backup on an external hard drive, but for some reason Ubuntu's default backup program isn't reading the backup! Very strange since the backup is made up entirely of .tar.gz files, which should be very easy for Ubuntu to read!!!!!) Totally frustrated here! Two questions: 1. What's a good backup program/strategy for Linux (especially the Ubuntu distro) that is on par with Apple's Time Machine backup program. (Time Machine rocks! It is without question the best backup program out there, but it only works on Macs.) 2. Does anyone out there in Chicago Python land have any experience with the Kali Linux installation??? It sounds like a great OS to play with.... and besides, I love their dragon logo! (I know, how superficial of me to choose an OS just for its logo, right? Well I figure that any OS that uses the dragon as its main symbol must be worth checking out, right?! LOL!) Well.... there's nothing like wiping your hard drive clean and NOT being able to read your backed up files on your external hard drive! When I realized what I had done to my computer my stomach sank to the floor and I had a really sick feeling, but.... I guess this inevitably happens when you spend a lot of time messing around with computers, huh? Am I really dumb or what? Thanks for the feedback! Any information would be helpful. Kind regards, Douglas Lewit On Tue, Mar 3, 2015 at 11:18 AM, Japhy Bartlett wrote: > Spaces and tabs both work, but if you mix them it creates a terrible > mess. So by convention, we all agreed to use spaces for our collective > sanity. > > > I wanted to make another very slight criticism of your code; often when > people start learning Python they get to the part about classes and > inheritance and start using classes for everything. So it's good to see > that you've figured out how that works, but it's not really helpful to your > program. I can see ways that all could be much simpler! > > > Well done though, and thank you for posting actual Python code :) > > - Japhy > > On Tue, Mar 3, 2015 at 10:57 AM, Lewit, Douglas wrote: > >> I was thinking about that last night! ;-) So then I assume that "None" >> is equivalent to Java's null, but according to what you wrote above "None" >> evaluates to False in a truth test? I didn't know that! Very cool. >> >> What's the difference between spaces and tabs? My favorite text editors >> for program writing are the Unix/Linux/Mac editors *Vim* and *Emacs*. >> Both of those have builtin tab functions. Emacs is especially good with >> deciding where to place tab indentations. Vim is okay too, but Emacs is >> really, really good. >> >> I repeated the same program in Python 3. Some interesting changes! 10/3 >> gives you 3 in Python 3. 10/3 gives you 3.333333333333 in Python 3. To >> get 3 you need 10//3. We all know about the print function. And some >> other changes too. Do you think the language benefitted from these >> backward INcompatible changes? I think the Python community is still >> wondering about that. >> >> On Mon, Mar 2, 2015 at 4:40 PM, Brian Ray wrote: >> >>> >>> i probably meant ""while L.next.next", but you get what I mean, I hope. >>> >>> On Mon, Mar 2, 2015 at 4:38 PM, Brian Ray wrote: >>> >>>> Just some small formatting issues. Try to use spaces (4) not tabs. >>>> >>>> and "while not L.next.next" is preferred over "while L.next.next != >>>> None" >>>> >>>> >>>> >>>> On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas >>>> wrote: >>>> >>>>> Hey guys--and ladies too! It's been a while since I shared any Python >>>>> work with this forum, so I figured hey, why not? >>>>> >>>>> This is my first effort at implementing a *linked list* in Python. >>>>> Fun stuff! I'm taking a Java data structures course right now at >>>>> Northeastern. Java is a nice language, and according to the online >>>>> statistics Java is the king of all programming languages, at least for >>>>> right now. (The computer world is extremely fickle, so we really don't >>>>> know which programming language will be "the king" in 5 or 10 years.) >>>>> >>>>> Anyhow, I purchased this book on Python data structures by Magnus Lie >>>>> Hetland. Great book and so helpful! It has even helped me better >>>>> understand the concepts in my Java course. (The languages are >>>>> different--sure thing--but I think the core concepts are almost exactly the >>>>> same.) The name of the book is PYTHON ALGORITHMS. Magnus Lie Hetland is >>>>> the author. It's really good. >>>>> >>>>> So I'm attaching my code. Please be kind in your criticisms! I know >>>>> it's not the Mona Lisa of computer programming, but hey, if I'm lucky my >>>>> mother will tape a printed copy of the program to the refrigerator door and >>>>> leave it there with a gold star on it for the next few days!!! ;-) Is >>>>> that really asking for too much?! LOL!!! >>>>> >>>>> Best, >>>>> >>>>> Douglas. >>>>> >>>>> _______________________________________________ >>>>> Chicago mailing list >>>>> Chicago at python.org >>>>> https://mail.python.org/mailman/listinfo/chicago >>>>> >>>>> >>>> >>>> >>>> -- >>>> Brian Ray >>>> @brianray >>>> (773) 669-7717 >>>> >>> >>> >>> >>> -- >>> Brian Ray >>> @brianray >>> (773) 669-7717 >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >>> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike at mwbeatty.org Wed Mar 4 04:05:24 2015 From: mike at mwbeatty.org (Micheal Beatty) Date: Tue, 3 Mar 2015 21:05:24 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: Hi Douglas, A couple of things re: Kali Linux.? 1. It?s really intended to be used for security auditing and penetration testing environments and not as an everyday OS on your production machine. Most important reason is because the default user is a root account. 2. The reason you couldn?t save anything is that Kali Linux is a Live ISO and the changes you make only occur in RAM and are not stored to physical media. It is possible to use the ISO to create a bootable USB or as you found out, install it in a partition on your hard drive. Your best option though is to install it in a virtual machine like VMWare or VirtualBox. If you have any further questions about Kali Linux I?d be happy to answer them off-list. Micheal Beatty Sent with Airmail On March 3, 2015 at 20:37:20, Lewit, Douglas (d-lewit at neiu.edu) wrote: Oh I know, I found a "hammer" that works and now I want to strike every nail with it.? But I'm semi-new to Python and the whole object-oriented thing is kind of interesting.? Also, it's amazing how fast the linked list implementation works compared to using recursion for the Fibonacci series.? With recursion it takes FOREVER, especially if n is some integer larger than let's say 40 or something like that. On a totally different subject.... does anyone in the group know anything about a Kali Linux installation???? PLEASE HELP!? Long story, I have (or had) Ubuntu on my HP PC.? (I have three laptops actually, two Macs and one PC.)? Okay, the Ubuntu installation is pretty painless and whoever wrote the install program did an awesome job.? Someone in my data structures class showed me Kali Linux and my first reaction was, WOW!!!!? So I thought I would get clever and do a dual boot, Ubuntu and Kali together on the same hard drive.? Well I managed to download and configure (after much research via Google) a thumb drive with .iso on it.? The problem is that if you boot off the thumb drive, sure Kali Linux works just great, but your changes won't be saved.? You can change the date, time, create files, change the font size in Terminal, etc, etc, but then when shut down the computer and boot back into a Live session of Kali Linux all your changes and files are gone.... so why bother?? So.... I tried a Graphical Install of Kali Linux after shrinking my partition with Ubuntu on it, right?? All was fine and copacetic, no problems.? I used GParted and the partitions were created, okay--lovely.? THEN THINGS GOT REALLY F--KED up when I did the Graphical Installation of Kali.? (No doubt the Hindu goddess Kali put a curse on me or my computer!!!!)? The installer prompted me for all this technical information about my network in order to configure the apt command.? (In Linux you can use "apt" to install updates and programs from the nearest repository or "mirror".)? I mean.... I know the name and password for my wireless setup, but I don't have all this other techie info about my "network"!? So the Installer warned me that I would have a minimal installation.? Okay, fine.? So then when I booted up to Kali, it would not accept my username and password!!!!? So I said screw it, I'll just erase the partition that contains Kali.... A VERY DUMB THING TO DO!? Because the Kali Linux partition contained Grub!!!!!? So..... I screwed myself royally.? I just decided to insert the Ubuntu CD and do a fresh install of Ubuntu--which of course means that all my files on the previous install got erased!? (Yes, I have a backup on an external hard drive, but for some reason Ubuntu's default backup program isn't reading the backup!? Very strange since the backup is made up entirely of .tar.gz files, which should be very easy for Ubuntu to read!!!!!)? Totally frustrated here!? Two questions: 1.? What's a good backup program/strategy for Linux (especially the Ubuntu distro) that is on par with Apple's Time Machine backup program.? (Time Machine rocks!? It is without question the best backup program out there, but it only works on Macs.) 2.? Does anyone out there in Chicago Python land have any experience with the Kali Linux installation???? It sounds like a great OS to play with.... and besides, I love their dragon logo!? (I know, how superficial of me to choose an OS just for its logo, right?? Well I figure that any OS that uses the dragon as its main symbol must be worth checking out, right?!? LOL!)? Well.... there's nothing like wiping your hard drive clean and NOT being able to read your backed up files on your external hard drive!? When I realized what I had done to my computer my stomach sank to the floor and I had a really sick feeling, but.... I guess this inevitably happens when you spend a lot of time messing around with computers, huh? Am I really dumb or what? Thanks for the feedback!? Any information would be helpful.? Kind regards, Douglas Lewit On Tue, Mar 3, 2015 at 11:18 AM, Japhy Bartlett wrote: Spaces and tabs both work, but if you mix them it creates a terrible mess.? So by convention, we all agreed to use spaces for our collective sanity. I wanted to make another very slight criticism of your code; often when people start learning Python they get to the part about classes and inheritance and start using classes for everything.? So it's good to see that you've figured out how that works, but it's not really helpful to your program.? I can see ways that all could be much simpler! Well done though, and thank you for posting actual Python code :) - Japhy On Tue, Mar 3, 2015 at 10:57 AM, Lewit, Douglas wrote: I was thinking about that last night! ?;-) ? So then I assume that "None" is equivalent to Java's null, but according to what you wrote above "None" evaluates to False in a truth test?? I didn't know that!? Very cool. What's the difference between spaces and tabs?? My favorite text editors for program writing are the Unix/Linux/Mac editors Vim and Emacs.? Both of those have builtin tab functions.? Emacs is especially good with deciding where to place tab indentations.? Vim is okay too, but Emacs is really, really good. I repeated the same program in Python 3.? Some interesting changes! ?10/3 gives you 3 in Python 3. ?10/3 gives you 3.333333333333 in Python 3.? To get 3 you need 10//3.? We all know about the print function.? And some other changes too.? Do you think the language benefitted from these backward INcompatible changes?? I think the Python community is still wondering about that. ? On Mon, Mar 2, 2015 at 4:40 PM, Brian Ray wrote: i probably meant ""while L.next.next", but you get what I mean, I hope. On Mon, Mar 2, 2015 at 4:38 PM, Brian Ray wrote: Just some small formatting issues. Try to use spaces (4) not tabs. and "while not L.next.next" is preferred over "while L.next.next != None" On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas wrote: Hey guys--and ladies too!? It's been a while since I shared any Python work with this forum, so I figured hey, why not? This is my first effort at implementing a linked list in Python.? Fun stuff!? I'm taking a Java data structures course right now at Northeastern.? Java is a nice language, and according to the online statistics Java is the king of all programming languages, at least for right now. ?(The computer world is extremely fickle, so we really don't know which programming language will be "the king" in 5 or 10 years.) Anyhow, I purchased this book on Python data structures by Magnus Lie Hetland.? Great book and so helpful!? It has even helped me better understand the concepts in my Java course. ?(The languages are different--sure thing--but I think the core concepts are almost exactly the same.) ?The name of the book is PYTHON ALGORITHMS.? Magnus Lie Hetland is the author.? It's really good. So I'm attaching my code.? Please be kind in your criticisms!? I know it's not the Mona Lisa of computer programming, but hey, if I'm lucky my mother will tape a printed copy of the program to the refrigerator door and leave it there with a gold star on it for the next few days!!! ?;-) ? Is that really asking for too much?!? LOL!!! Best, Douglas.? _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago -- Brian Ray? @brianray (773) 669-7717 -- Brian Ray? @brianray (773) 669-7717 _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at adamforsyth.net Thu Mar 5 02:52:43 2015 From: adam at adamforsyth.net (Adam Forsyth) Date: Wed, 4 Mar 2015 19:52:43 -0600 Subject: [Chicago] Email list for people going to PyCon 2015 Montreal Message-ID: Anyone can join: pycon-2015-chicago at googlegroups.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From walkersam at gmail.com Wed Mar 4 05:41:24 2015 From: walkersam at gmail.com (Sam Walker) Date: Tue, 3 Mar 2015 22:41:24 -0600 Subject: [Chicago] Just sharing with everyone in the group. In-Reply-To: References: Message-ID: Hi Douglas, Again, not sure how much off-topic chatter is appreciated here so I'll keep it short... For a low-maintenance recovery solution on linux, I think most people would advise installing /home on a separate partition. Then in theory you just reinstall the OS while leaving your /home partition alone. You might run into minor quirks and of course you'd have to get all your packages set up again. If you want all the snazzy file-level history stuff you'd need to look at a file system like ZFS. And regardless of your setup, a scheduled `rsync` script to back up /home is a pretty foolproof route. You could even use python to give this script a fancy GUI (bingo! On-topic ;> ) If you erased your disk and *really* need to recover files from it you can do some tricks with `dd`, but only if you haven't overwritten it yet, which it sounds like you did. ?Sam On Tue, Mar 3, 2015 at 9:05 PM, Micheal Beatty wrote: > Hi Douglas, > A couple of things re: Kali Linux. > 1. It?s really intended to be used for security auditing and penetration > testing environments and not as an everyday OS on your production machine. > Most important reason is because the default user is a root account. > 2. The reason you couldn?t save anything is that Kali Linux is a Live ISO > and the changes you make only occur in RAM and are not stored to physical > media. It is possible to use the ISO to create a bootable USB or as you > found out, install it in a partition on your hard drive. Your best option > though is to install it in a virtual machine like VMWare or VirtualBox. > > If you have any further questions about Kali Linux I?d be happy to answer > them off-list. > > > Micheal Beatty > Sent with Airmail > > On March 3, 2015 at 20:37:20, Lewit, Douglas (d-lewit at neiu.edu) wrote: > > Oh I know, I found a "hammer" that works and now I want to strike > every nail with it. But I'm semi-new to Python and the whole > object-oriented thing is kind of interesting. Also, it's amazing how fast > the linked list implementation works compared to using recursion for the > Fibonacci series. With recursion it takes FOREVER, especially if n is some > integer larger than let's say 40 or something like that. > > On a totally different subject.... does anyone in the group know anything > about a Kali Linux installation??? PLEASE HELP! Long story, I have (or > had) Ubuntu on my HP PC. (I have three laptops actually, two Macs and one > PC.) Okay, the Ubuntu installation is pretty painless and whoever wrote > the install program did an awesome job. Someone in my data structures > class showed me Kali Linux and my first reaction was, WOW!!!! So I thought > I would get clever and do a dual boot, Ubuntu and Kali together on the same > hard drive. Well I managed to download and configure (after much research > via Google) a thumb drive with .iso on it. The problem is that if you boot > off the thumb drive, sure Kali Linux works just great, but your changes > won't be saved. You can change the date, time, create files, change the > font size in Terminal, etc, etc, but then when shut down the computer and > boot back into a Live session of Kali Linux all your changes and files are > gone.... so why bother? So.... I tried a Graphical Install of Kali Linux > after shrinking my partition with Ubuntu on it, right? All was fine and > copacetic, no problems. I used GParted and the partitions were created, > okay--lovely. THEN THINGS GOT REALLY F--KED up when I did the Graphical > Installation of Kali. (No doubt the Hindu goddess Kali put a curse on me > or my computer!!!!) The installer prompted me for all this technical > information about my network in order to configure the apt command. (In > Linux you can use "apt" to install updates and programs from the nearest > repository or "mirror".) I mean.... I know the name and password for my > wireless setup, but I don't have all this other techie info about my > "network"! So the Installer warned me that I would have a minimal > installation. Okay, fine. So then when I booted up to Kali, it would not > accept my username and password!!!! So I said screw it, I'll just erase > the partition that contains Kali.... A VERY DUMB THING TO DO! Because the > Kali Linux partition contained Grub!!!!! So..... I screwed myself > royally. I just decided to insert the Ubuntu CD and do a fresh install of > Ubuntu--which of course means that all my files on the previous install got > erased! (Yes, I have a backup on an external hard drive, but for some > reason Ubuntu's default backup program isn't reading the backup! Very > strange since the backup is made up entirely of .tar.gz files, which should > be very easy for Ubuntu to read!!!!!) > > Totally frustrated here! Two questions: > > 1. What's a good backup program/strategy for Linux (especially the Ubuntu > distro) that is on par with Apple's Time Machine backup program. (Time > Machine rocks! It is without question the best backup program out there, > but it only works on Macs.) > > 2. Does anyone out there in Chicago Python land have any experience with > the Kali Linux installation??? It sounds like a great OS to play with.... > and besides, I love their dragon logo! (I know, how superficial of me to > choose an OS just for its logo, right? Well I figure that any OS that uses > the dragon as its main symbol must be worth checking out, right?! LOL!) > > Well.... there's nothing like wiping your hard drive clean and NOT being > able to read your backed up files on your external hard drive! When I > realized what I had done to my computer my stomach sank to the floor and I > had a really sick feeling, but.... I guess this inevitably happens when you > spend a lot of time messing around with computers, huh? > > Am I really dumb or what? > > Thanks for the feedback! Any information would be helpful. > > Kind regards, > > Douglas Lewit > > > > On Tue, Mar 3, 2015 at 11:18 AM, Japhy Bartlett > wrote: > >> Spaces and tabs both work, but if you mix them it creates a terrible >> mess. So by convention, we all agreed to use spaces for our collective >> sanity. >> >> >> I wanted to make another very slight criticism of your code; often when >> people start learning Python they get to the part about classes and >> inheritance and start using classes for everything. So it's good to see >> that you've figured out how that works, but it's not really helpful to your >> program. I can see ways that all could be much simpler! >> >> >> Well done though, and thank you for posting actual Python code :) >> >> - Japhy >> >> On Tue, Mar 3, 2015 at 10:57 AM, Lewit, Douglas wrote: >> >>> I was thinking about that last night! ;-) So then I assume that >>> "None" is equivalent to Java's null, but according to what you wrote above >>> "None" evaluates to False in a truth test? I didn't know that! Very cool. >>> >>> What's the difference between spaces and tabs? My favorite text editors >>> for program writing are the Unix/Linux/Mac editors *Vim* and *Emacs*. >>> Both of those have builtin tab functions. Emacs is especially good with >>> deciding where to place tab indentations. Vim is okay too, but Emacs is >>> really, really good. >>> >>> I repeated the same program in Python 3. Some interesting changes! >>> 10/3 gives you 3 in Python 3. 10/3 gives you 3.333333333333 in Python 3. >>> To get 3 you need 10//3. We all know about the print function. And some >>> other changes too. Do you think the language benefitted from these >>> backward INcompatible changes? I think the Python community is still >>> wondering about that. >>> >>> On Mon, Mar 2, 2015 at 4:40 PM, Brian Ray wrote: >>> >>>> >>>> i probably meant ""while L.next.next", but you get what I mean, I hope. >>>> >>>> On Mon, Mar 2, 2015 at 4:38 PM, Brian Ray wrote: >>>> >>>>> Just some small formatting issues. Try to use spaces (4) not tabs. >>>>> >>>>> and "while not L.next.next" is preferred over "while L.next.next != >>>>> None" >>>>> >>>>> >>>>> >>>>> On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas >>>>> wrote: >>>>> >>>>>> Hey guys--and ladies too! It's been a while since I shared any >>>>>> Python work with this forum, so I figured hey, why not? >>>>>> >>>>>> This is my first effort at implementing a *linked list* in Python. >>>>>> Fun stuff! I'm taking a Java data structures course right now at >>>>>> Northeastern. Java is a nice language, and according to the online >>>>>> statistics Java is the king of all programming languages, at least for >>>>>> right now. (The computer world is extremely fickle, so we really don't >>>>>> know which programming language will be "the king" in 5 or 10 years.) >>>>>> >>>>>> Anyhow, I purchased this book on Python data structures by Magnus Lie >>>>>> Hetland. Great book and so helpful! It has even helped me better >>>>>> understand the concepts in my Java course. (The languages are >>>>>> different--sure thing--but I think the core concepts are almost exactly the >>>>>> same.) The name of the book is PYTHON ALGORITHMS. Magnus Lie Hetland is >>>>>> the author. It's really good. >>>>>> >>>>>> So I'm attaching my code. Please be kind in your criticisms! I know >>>>>> it's not the Mona Lisa of computer programming, but hey, if I'm lucky my >>>>>> mother will tape a printed copy of the program to the refrigerator door and >>>>>> leave it there with a gold star on it for the next few days!!! ;-) Is >>>>>> that really asking for too much?! LOL!!! >>>>>> >>>>>> Best, >>>>>> >>>>>> Douglas. >>>>>> >>>>>> _______________________________________________ >>>>>> Chicago mailing list >>>>>> Chicago at python.org >>>>>> https://mail.python.org/mailman/listinfo/chicago >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Brian Ray >>>>> @brianray >>>>> (773) 669-7717 <%28773%29%20669-7717> >>>>> >>>> >>>> >>>> >>>> -- >>>> Brian Ray >>>> @brianray >>>> (773) 669-7717 >>>> >>>> _______________________________________________ >>>> Chicago mailing list >>>> Chicago at python.org >>>> https://mail.python.org/mailman/listinfo/chicago >>>> >>>> >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >>> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From proba at allstate.com Fri Mar 6 00:20:00 2015 From: proba at allstate.com (Robare, Phillip (Randstant)) Date: Thu, 5 Mar 2015 23:20:00 +0000 Subject: [Chicago] Is pypi.python.org really running with a self-signed cert? Message-ID: <50869A74BA4F07468AD797C9BFF1FE3E04300F98@A0185-XPO1026-C.ad.allstate.com> I was trying to get my environment set up on a new work computer (Cygwin with cygwin's python 2.7 under Windows) so I downloaded and ran ez_setup.py. It errored on a line where it calls curl to download setuptools. I pulled the line out and ran it from the command line without the -silent parameter. $ curl https://pypi.python.org/packages/source/s/setuptools/setuptools-12.3.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option. Some weirdness with Cygwin? So I tried it with insecure mode. $ curl --insecure https://pypi.python.org/packages/source/s/setuptools/setuptools-12.3.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 Not much more enlightening. So I tried wget. $ wget https://pypi.python.org/packages/source/s/setuptools/setuptools-12.3.zip --2015-03-05 16:17:06-- https://pypi.python.org/packages/source/s/setuptools/setuptools-12.3.zip Resolving pypi.python.org (pypi.python.org)... 23.235.40.223 Connecting to pypi.python.org (pypi.python.org)|23.235.40.223|:443... connected. ERROR: The certificate of 'pypi.python.org' is not trusted. ERROR: The certificate of 'pypi.python.org' hasn't got a known issuer. Does anyone else have a problem with pypi's certificate? Or a work-around for getting ez_install to run? Thanks, Phil Robare From bainada.iit at gmail.com Fri Mar 6 04:58:37 2015 From: bainada.iit at gmail.com (Adam Bain) Date: Fri, 06 Mar 2015 03:58:37 +0000 Subject: [Chicago] Is pypi.python.org really running with a self-signed cert? References: <50869A74BA4F07468AD797C9BFF1FE3E04300F98@A0185-XPO1026-C.ad.allstate.com> Message-ID: Definitely not self-signed, on my browser its signed by DigiCert. SHA256 fingerprint beginning with 9f249e91. Not really sure whats causing your error, do you maybe need to tell curl about which root certs to trust? On Thu, Mar 5, 2015, 9:16 PM Robare, Phillip (Randstant) wrote: > I was trying to get my environment set up on a new work computer (Cygwin > with cygwin's python 2.7 under Windows) so I downloaded and ran > ez_setup.py. It errored on a line where it calls curl to download > setuptools. I pulled the line out and ran it from the command line without > the -silent parameter. > > $ curl https://pypi.python.org/packages/source/s/setuptools/ > setuptools-12.3.zip > % Total % Received % Xferd Average Speed Time Time Time > Current > Dload Upload Total Spent Left > Speed > 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- > 0 > curl: (60) SSL certificate problem: unable to get local issuer certificate > More details here: http://curl.haxx.se/docs/sslcerts.html > > curl performs SSL certificate verification by default, using a "bundle" > of Certificate Authority (CA) public keys (CA certs). If the default > bundle file isn't adequate, you can specify an alternate file > using the --cacert option. > If this HTTPS server uses a certificate signed by a CA represented in > the bundle, the certificate verification probably failed due to a > problem with the certificate (it might be expired, or the name might > not match the domain name in the URL). > If you'd like to turn off curl's verification of the certificate, use > the -k (or --insecure) option. > > Some weirdness with Cygwin? So I tried it with insecure mode. > > $ curl --insecure https://pypi.python.org/packages/source/s/setuptools/ > setuptools-12.3.zip > % Total % Received % Xferd Average Speed Time Time Time > Current > Dload Upload Total Spent Left > Speed > 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- > 0 > curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 > > Not much more enlightening. So I tried wget. > > $ wget https://pypi.python.org/packages/source/s/setuptools/ > setuptools-12.3.zip --2015-03-05 16:17:06-- https://pypi.python.org/ > packages/source/s/setuptools/setuptools-12.3.zip > Resolving pypi.python.org (pypi.python.org)... 23.235.40.223 > Connecting to pypi.python.org (pypi.python.org)|23.235.40.223|:443... > connected. > ERROR: The certificate of 'pypi.python.org' is not trusted. > ERROR: The certificate of 'pypi.python.org' hasn't got a known issuer. > > Does anyone else have a problem with pypi's certificate? Or a work-around > for getting ez_install to run? > > Thanks, > > Phil Robare > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paaschpa at gmail.com Fri Mar 6 16:58:35 2015 From: paaschpa at gmail.com (Pat P.) Date: Fri, 6 Mar 2015 09:58:35 -0600 Subject: [Chicago] Chicago Code Camp Message-ID: Hey Chipy - just wanted to let everyone know that the Chicago Code Camp is coming up on Saturday, April 18 and will be held at the Illinois Institue of Technology (3300 South Federal Street). Recent years it was held at the College of Lake County (in Grayslake, IL) so 'Chicago' Code Camp was a little spurious. Regardless, it is a free all day event run by volunteers and various members of Chicagoland technical community. More info at www.chicagocodecamp.com. *Call for speakers is open* and it would be great to see some Python talks which, in my humble opinion, have been underrepresented in previous years. Any topic is fair game though and I submitted one on using JavaScript in Minecraft. Hope to see you there. Cheers, Pat -------------- next part -------------- An HTML attachment was scrubbed... URL: From wesclemens at gmail.com Fri Mar 6 20:39:44 2015 From: wesclemens at gmail.com (William E. S. Clemens) Date: Fri, 6 Mar 2015 13:39:44 -0600 Subject: [Chicago] Is pypi.python.org really running with a self-signed cert? In-Reply-To: References: <50869A74BA4F07468AD797C9BFF1FE3E04300F98@A0185-XPO1026-C.ad.allstate.com> Message-ID: Are you behind a proxy? I was able to curl the file without issue. -- William Clemens Phone: 847.485.9455 E-mail: wesclemens at gmail.com On Thu, Mar 5, 2015 at 9:58 PM, Adam Bain wrote: > Definitely not self-signed, on my browser its signed by DigiCert. SHA256 > fingerprint beginning with 9f249e91. Not really sure whats causing your > error, do you maybe need to tell curl about which root certs to trust? > > > On Thu, Mar 5, 2015, 9:16 PM Robare, Phillip (Randstant) < > proba at allstate.com> wrote: > >> I was trying to get my environment set up on a new work computer (Cygwin >> with cygwin's python 2.7 under Windows) so I downloaded and ran >> ez_setup.py. It errored on a line where it calls curl to download >> setuptools. I pulled the line out and ran it from the command line without >> the -silent parameter. >> >> $ curl https://pypi.python.org/packages/source/s/setuptools/ >> setuptools-12.3.zip >> % Total % Received % Xferd Average Speed Time Time Time >> Current >> Dload Upload Total Spent Left >> Speed >> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- >> 0 >> curl: (60) SSL certificate problem: unable to get local issuer certificate >> More details here: http://curl.haxx.se/docs/sslcerts.html >> >> curl performs SSL certificate verification by default, using a "bundle" >> of Certificate Authority (CA) public keys (CA certs). If the default >> bundle file isn't adequate, you can specify an alternate file >> using the --cacert option. >> If this HTTPS server uses a certificate signed by a CA represented in >> the bundle, the certificate verification probably failed due to a >> problem with the certificate (it might be expired, or the name might >> not match the domain name in the URL). >> If you'd like to turn off curl's verification of the certificate, use >> the -k (or --insecure) option. >> >> Some weirdness with Cygwin? So I tried it with insecure mode. >> >> $ curl --insecure https://pypi.python.org/packages/source/s/setuptools/ >> setuptools-12.3.zip >> % Total % Received % Xferd Average Speed Time Time Time >> Current >> Dload Upload Total Spent Left >> Speed >> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- >> 0 >> curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 >> >> Not much more enlightening. So I tried wget. >> >> $ wget https://pypi.python.org/packages/source/s/setuptools/ >> setuptools-12.3.zip --2015-03-05 16:17:06-- https://pypi.python.org/ >> packages/source/s/setuptools/setuptools-12.3.zip >> Resolving pypi.python.org (pypi.python.org)... 23.235.40.223 >> Connecting to pypi.python.org (pypi.python.org)|23.235.40.223|:443... >> connected. >> ERROR: The certificate of 'pypi.python.org' is not trusted. >> ERROR: The certificate of 'pypi.python.org' hasn't got a known issuer. >> >> Does anyone else have a problem with pypi's certificate? Or a >> work-around for getting ez_install to run? >> >> Thanks, >> >> Phil Robare >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hundredpercentjuice at gmail.com Fri Mar 6 21:08:32 2015 From: hundredpercentjuice at gmail.com (JS Irick) Date: Fri, 6 Mar 2015 14:08:32 -0600 Subject: [Chicago] Is pypi.python.org really running with a self-signed cert? In-Reply-To: References: <50869A74BA4F07468AD797C9BFF1FE3E04300F98@A0185-XPO1026-C.ad.allstate.com> Message-ID: Some businesses insert self signed certificates as a "man in the middle" attack of sorts. Go to any https site and see if the cert is real, or belonging to your client. This includes many business that should really know better than teaching users to accept invalid certs. On Fri, Mar 6, 2015 at 1:39 PM, William E. S. Clemens wrote: > Are you behind a proxy? I was able to curl the file without issue. > > -- > William Clemens > Phone: 847.485.9455 > E-mail: wesclemens at gmail.com > > On Thu, Mar 5, 2015 at 9:58 PM, Adam Bain wrote: > >> Definitely not self-signed, on my browser its signed by DigiCert. SHA256 >> fingerprint beginning with 9f249e91. Not really sure whats causing your >> error, do you maybe need to tell curl about which root certs to trust? >> >> >> On Thu, Mar 5, 2015, 9:16 PM Robare, Phillip (Randstant) < >> proba at allstate.com> wrote: >> >>> I was trying to get my environment set up on a new work computer (Cygwin >>> with cygwin's python 2.7 under Windows) so I downloaded and ran >>> ez_setup.py. It errored on a line where it calls curl to download >>> setuptools. I pulled the line out and ran it from the command line without >>> the -silent parameter. >>> >>> $ curl https://pypi.python.org/packages/source/s/setuptools/ >>> setuptools-12.3.zip >>> % Total % Received % Xferd Average Speed Time Time Time >>> Current >>> Dload Upload Total Spent Left >>> Speed >>> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- >>> --:--:-- 0 >>> curl: (60) SSL certificate problem: unable to get local issuer >>> certificate >>> More details here: http://curl.haxx.se/docs/sslcerts.html >>> >>> curl performs SSL certificate verification by default, using a "bundle" >>> of Certificate Authority (CA) public keys (CA certs). If the default >>> bundle file isn't adequate, you can specify an alternate file >>> using the --cacert option. >>> If this HTTPS server uses a certificate signed by a CA represented in >>> the bundle, the certificate verification probably failed due to a >>> problem with the certificate (it might be expired, or the name might >>> not match the domain name in the URL). >>> If you'd like to turn off curl's verification of the certificate, use >>> the -k (or --insecure) option. >>> >>> Some weirdness with Cygwin? So I tried it with insecure mode. >>> >>> $ curl --insecure https://pypi.python.org/packages/source/s/setuptools/ >>> setuptools-12.3.zip >>> % Total % Received % Xferd Average Speed Time Time Time >>> Current >>> Dload Upload Total Spent Left >>> Speed >>> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- >>> --:--:-- 0 >>> curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 >>> >>> Not much more enlightening. So I tried wget. >>> >>> $ wget https://pypi.python.org/packages/source/s/setuptools/ >>> setuptools-12.3.zip --2015-03-05 16:17:06-- https://pypi.python.org/ >>> packages/source/s/setuptools/setuptools-12.3.zip >>> Resolving pypi.python.org (pypi.python.org)... 23.235.40.223 >>> Connecting to pypi.python.org (pypi.python.org)|23.235.40.223|:443... >>> connected. >>> ERROR: The certificate of 'pypi.python.org' is not trusted. >>> ERROR: The certificate of 'pypi.python.org' hasn't got a known issuer. >>> >>> Does anyone else have a problem with pypi's certificate? Or a >>> work-around for getting ez_install to run? >>> >>> Thanks, >>> >>> Phil Robare >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -- ==== JS Irick 312-307-8904 Consultant: truqua.com Coach: atlascrossfit.com Programmer: juicetux.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick271828 at gmail.com Fri Mar 6 22:19:09 2015 From: nick271828 at gmail.com (Nick Bennett) Date: Fri, 6 Mar 2015 15:19:09 -0600 Subject: [Chicago] Is pypi.python.org really running with a self-signed cert? In-Reply-To: References: <50869A74BA4F07468AD797C9BFF1FE3E04300F98@A0185-XPO1026-C.ad.allstate.com> Message-ID: Behold, mitmproxy is an "interactive SSL-capable man-in-the-middle proxy for HTTP" built with Python: http://mitmproxy.org/index.html https://github.com/mitmproxy/mitmproxy A video on "mitmproxy - use and abuse of a hackable SSL-capable man-in-the-middle proxy" - https://www.youtube.com/watch?v=kQ1-0G90lQg if the SSL cert is self-signed or otherwise invalid and you're downloading binaries, Danger Will Robinson. Nick Bennett github: tothebeat 224-392-2326 On Fri, Mar 6, 2015 at 2:08 PM, JS Irick wrote: > Some businesses insert self signed certificates as a "man in the middle" > attack of sorts. Go to any https site and see if the cert is real, or > belonging to your client. > > This includes many business that should really know better than teaching > users to accept invalid certs. > > On Fri, Mar 6, 2015 at 1:39 PM, William E. S. Clemens < > wesclemens at gmail.com> wrote: > >> Are you behind a proxy? I was able to curl the file without issue. >> >> -- >> William Clemens >> Phone: 847.485.9455 >> E-mail: wesclemens at gmail.com >> >> On Thu, Mar 5, 2015 at 9:58 PM, Adam Bain wrote: >> >>> Definitely not self-signed, on my browser its signed by DigiCert. SHA256 >>> fingerprint beginning with 9f249e91. Not really sure whats causing your >>> error, do you maybe need to tell curl about which root certs to trust? >>> >>> >>> On Thu, Mar 5, 2015, 9:16 PM Robare, Phillip (Randstant) < >>> proba at allstate.com> wrote: >>> >>>> I was trying to get my environment set up on a new work computer >>>> (Cygwin with cygwin's python 2.7 under Windows) so I downloaded and ran >>>> ez_setup.py. It errored on a line where it calls curl to download >>>> setuptools. I pulled the line out and ran it from the command line without >>>> the -silent parameter. >>>> >>>> $ curl https://pypi.python.org/packages/source/s/setuptools/ >>>> setuptools-12.3.zip >>>> % Total % Received % Xferd Average Speed Time Time Time >>>> Current >>>> Dload Upload Total Spent Left >>>> Speed >>>> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- >>>> --:--:-- 0 >>>> curl: (60) SSL certificate problem: unable to get local issuer >>>> certificate >>>> More details here: http://curl.haxx.se/docs/sslcerts.html >>>> >>>> curl performs SSL certificate verification by default, using a "bundle" >>>> of Certificate Authority (CA) public keys (CA certs). If the default >>>> bundle file isn't adequate, you can specify an alternate file >>>> using the --cacert option. >>>> If this HTTPS server uses a certificate signed by a CA represented in >>>> the bundle, the certificate verification probably failed due to a >>>> problem with the certificate (it might be expired, or the name might >>>> not match the domain name in the URL). >>>> If you'd like to turn off curl's verification of the certificate, use >>>> the -k (or --insecure) option. >>>> >>>> Some weirdness with Cygwin? So I tried it with insecure mode. >>>> >>>> $ curl --insecure https://pypi.python.org/packages/source/s/setuptools/ >>>> setuptools-12.3.zip >>>> % Total % Received % Xferd Average Speed Time Time Time >>>> Current >>>> Dload Upload Total Spent Left >>>> Speed >>>> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- >>>> --:--:-- 0 >>>> curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 >>>> >>>> Not much more enlightening. So I tried wget. >>>> >>>> $ wget https://pypi.python.org/packages/source/s/setuptools/ >>>> setuptools-12.3.zip --2015-03-05 16:17:06-- https://pypi.python.org/ >>>> packages/source/s/setuptools/setuptools-12.3.zip >>>> Resolving pypi.python.org (pypi.python.org)... 23.235.40.223 >>>> Connecting to pypi.python.org (pypi.python.org)|23.235.40.223|:443... >>>> connected. >>>> ERROR: The certificate of 'pypi.python.org' is not trusted. >>>> ERROR: The certificate of 'pypi.python.org' hasn't got a known issuer. >>>> >>>> Does anyone else have a problem with pypi's certificate? Or a >>>> work-around for getting ez_install to run? >>>> >>>> Thanks, >>>> >>>> Phil Robare >>>> >>>> _______________________________________________ >>>> Chicago mailing list >>>> Chicago at python.org >>>> https://mail.python.org/mailman/listinfo/chicago >>>> >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >>> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > > -- > ==== > JS Irick > 312-307-8904 > Consultant: truqua.com > Coach: atlascrossfit.com > Programmer: juicetux.com > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lane at strapr.com Fri Mar 6 19:40:01 2015 From: lane at strapr.com (Lane Campbell) Date: Fri, 6 Mar 2015 12:40:01 -0600 Subject: [Chicago] Chicago Code Camp In-Reply-To: References: Message-ID: Pat, Is there a way for people register for the event? On my phone and can't find a register option. Sent from my iPhone > On Mar 6, 2015, at 9:58 AM, Pat P. wrote: > > Hey Chipy - just wanted to let everyone know that the Chicago Code Camp is coming up on Saturday, April 18 and will be held at the Illinois Institue of Technology (3300 South Federal Street). Recent years it was held at the College of Lake County (in Grayslake, IL) so 'Chicago' Code Camp was a little spurious. Regardless, it is a free all day event run by volunteers and various members of Chicagoland technical community. More info at www.chicagocodecamp.com. > > Call for speakers is open and it would be great to see some Python talks which, in my humble opinion, have been underrepresented in previous years. Any topic is fair game though and I submitted one on using JavaScript in Minecraft. > > Hope to see you there. > > Cheers, > Pat > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago -------------- next part -------------- An HTML attachment was scrubbed... URL: From proba at allstate.com Fri Mar 6 21:10:04 2015 From: proba at allstate.com (Robare, Phillip (Randstant)) Date: Fri, 6 Mar 2015 20:10:04 +0000 Subject: [Chicago] Is pypi.python.org really running with a self-signed cert? In-Reply-To: References: <50869A74BA4F07468AD797C9BFF1FE3E04300F98@A0185-XPO1026-C.ad.allstate.com> Message-ID: <50869A74BA4F07468AD797C9BFF1FE3E04301011@A0185-XPO1026-C.ad.allstate.com> I have found that the problem is that Cygwin does not come with any certificates. curl and wget are looking for them in the Cygwin directory /usr/ssl which holds a link to an empty certificate bundle. StackOverflow has a discussion at http://stackoverflow.com/questions/9224298/how-do-i-fix-certificate-errors-when-running-wget-on-an-https-url-in-cygwin. Unfortunately the suggestions there did not work for me, probably because of a lack of administrative privs on this machine. There is a script at https://github.com/bagder/curl/blob/master/lib/firefox-db2pem.sh that will take the certificates out of Firefox and put them into a bundle, and said bundle is supposed to work with curl. Another option is that OpenSSL on their page http://curl.haxx.se/docs/caextract.html offers a cert bundle that can retrieved through the web browser. That last is what I will probably do although trusting stuff downloaded without even a verification hash seems wrong. Although not as wrong as turning off certificate checking in curl. Phil Robare probare at rcnchicago.com =========================================== On : Friday, March 06, 2015 at 1:40 PM, William Clemens < wesclemens at gmail.com > wrote: Are you behind a proxy? I was able to curl the file without issue. =========================================== On Thu, Mar 5, 2015 at 9:58 PM, Adam Bain wrote: Definitely not self-signed, on my browser its signed by DigiCert. SHA256 fingerprint beginning with 9f249e91. Not really sure whats causing your error, do you maybe need to tell curl about which root certs to trust? =========================================== On Thu, Mar 5, 2015, 9:16 PM?Robare, Phillip wrote: I was trying to get my environment set up on a new work computer (Cygwin with cygwin's python 2.7 under Windows) so I downloaded and ran ez_setup.py.? It errored on a line where it calls curl to download setuptools ... Does anyone else have a problem with pypi's certificate?? Or a work-around for getting ez_install to run? Thanks, Phil Robare From d-lewit at neiu.edu Fri Mar 6 21:16:28 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Fri, 6 Mar 2015 14:16:28 -0600 Subject: [Chicago] Chicago Code Camp In-Reply-To: References: Message-ID: How cool! I took a couple courses at IIT a couple years back. It'll be nice to revisit the campus. I'm not sure how much (or how little) they endorse Python over there. If I remember correctly, IIT is a big citadel of Matlab programming and Matlab research. They may regard Python as a contemptuous competitor! Best, Douglas. On Fri, Mar 6, 2015 at 9:58 AM, Pat P. wrote: > Hey Chipy - just wanted to let everyone know that the Chicago Code Camp is > coming up on Saturday, April 18 and will be held at the Illinois Institue > of Technology (3300 South Federal Street). Recent years it was held at the > College of Lake County (in Grayslake, IL) so 'Chicago' Code Camp was a > little spurious. Regardless, it is a free all day event run by volunteers > and various members of Chicagoland technical community. More info at > www.chicagocodecamp.com. > > *Call for speakers is open* and it would be great to see some Python > talks which, in my humble opinion, have been underrepresented in previous > years. Any topic is fair game though and I submitted one on using > JavaScript in Minecraft. > > Hope to see you there. > > Cheers, > Pat > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paaschpa at gmail.com Sat Mar 7 01:03:32 2015 From: paaschpa at gmail.com (Pat P.) Date: Fri, 6 Mar 2015 18:03:32 -0600 Subject: [Chicago] Chicago Code Camp In-Reply-To: References: Message-ID: Lane - I don't think registration is open right now (will look into it). In the past registration has been done via Eventbrite and I don't see anything there. I will keep you (and the list) posted. Douglas - The last time Chicago Code Camp was at IIT I think there was a pretty diverse selection of Sessions. If I recall correctly I attended a session on Clojure, Rack (Ruby's middleware) and Unit Testing...I don't recall if there was a Session involving Python or Matlab (not sure Matlab has ever had a Session in the camps I've attended). The most recent Session I recall involving Python was about App Engine (given by a local Microsoft employee). Cheers, Pat On Fri, Mar 6, 2015 at 12:40 PM, Lane Campbell wrote: > Pat, > > Is there a way for people register for the event? On my phone and can't > find a register option. > > Sent from my iPhone > > On Mar 6, 2015, at 9:58 AM, Pat P. wrote: > > Hey Chipy - just wanted to let everyone know that the Chicago Code Camp is > coming up on Saturday, April 18 and will be held at the Illinois Institue > of Technology (3300 South Federal Street). Recent years it was held at the > College of Lake County (in Grayslake, IL) so 'Chicago' Code Camp was a > little spurious. Regardless, it is a free all day event run by volunteers > and various members of Chicagoland technical community. More info at > www.chicagocodecamp.com. > > *Call for speakers is open* and it would be great to see some Python > talks which, in my humble opinion, have been underrepresented in previous > years. Any topic is fair game though and I submitted one on using > JavaScript in Minecraft. > > Hope to see you there. > > Cheers, > Pat > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tathagatadg at gmail.com Sun Mar 8 18:04:55 2015 From: tathagatadg at gmail.com (Tathagata Dasgupta) Date: Sun, 8 Mar 2015 12:04:55 -0500 Subject: [Chicago] Update on ChiPy's Mentorship program Message-ID: Hi folks, ChiPy's Mentorship program is now going full steam ahead! Thanks to Computer Futures for sponsoring the Mentors dinner last Friday. You can read more about what the mentors discussed about the future of the event in the link below. http://blog.tathagata.me/2015/03/chipy-python-mentorship-dinner-march.html If you are interested about what each Mentor and Mentee is working on: http://www.meetup.com/_ChiPy_/messages/boards/thread/48756823 Two of our mentors, Catherine and Xan, will be doing a joint talk on how to give a Pythonic talk next Thursday. Oh, you don't want to miss this one! In addition to Best Ever this talk will have a number of First Evers as well ... -- Cheers, T -------------- next part -------------- An HTML attachment was scrubbed... URL: From brianhray at gmail.com Wed Mar 11 14:07:02 2015 From: brianhray at gmail.com (Brian Ray) Date: Wed, 11 Mar 2015 07:07:02 -0600 Subject: [Chicago] [ANN] ChiPy March Meeting Tomorrow Thursday 12th Message-ID: March will be our best meeting ever. All levels are welcome. Bring a friend. Thank you for Knowledgehound for hosting the best meeting ever by sponsoring Venue, Food and Drink *When:* March 12, 2015, 7 p.m. *Where:* Knowledgehound Elelsee at Hubbard St Lofts 1821 W Hubbard Topics: - *A Talk on Giving a Pythonic Talk * (0:25:00 Minutes) By: Xan Vongsathorn , Catherine Vongsathorn Xan Vongsathorn and Catherine Vongsathorn will be giving a talk about talks. It turns out that many of python's core principles apply very well to presentations -- or for that matter, communication more generally -- which may be why we like python so much. Xan and Catherine want to get people excited not only about giving talks but also about using them to *actually communicate*. You don?t have to be an expert, nor do you need natural talent, to give a good talk; this metatalk will discuss guiding principles that set effective presentations apart and can be applied to any technical talk. - *From Code to Coffee Table with Blender* By: Matt Meshulam I've been developing a Python library for turning 3D models into CNC-machinable parts. I will demonstrate the basics of the library and how I used it to build a wood coffee table. RSVP on Meetup: http://www.meetup.com/_ChiPy_/events/220672175/ Or RSVP on ChiPy: http://chipy.org -- Brian Ray @brianray (773) 669-7717 -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl at personnelware.com Thu Mar 12 21:13:22 2015 From: carl at personnelware.com (Carl Karsten) Date: Thu, 12 Mar 2015 15:13:22 -0500 Subject: [Chicago] 2n talk: coding a coffee table (blender, python, plywood cutting machine) Message-ID: sorry if this is a 2nd post, very last minute and 2 is way better than 0. ---------- Forwarded message ---------- From: Matt Meshulam Date: Thu, Mar 12, 2015 at 12:27 AM Subject: [PS1] Plug: Hear me talk about coding a coffee table To: pumping-station-one at googlegroups.com Yesterday I did a 300 Seconds of Fame about my project building a coffee table with the help of some Python code and the ShopBot. Photos here: https://carousel.dropbox.com/photos/cc/q10MrxqM3PBXBK2 Carl kindly invited me to give a more in-depth talk at the Chicago Python User Group tomorrow (Thursday) evening. The event is free and open to the public. The details: http://www.meetup.com/_ChiPy_/events/220672175/ There was also some interest in a more hands-on class going through the design and build process. I'm thinking I'll do a series covering different aspects of the project, probably starting in early April. Stay tuned. -- You received this message because you are subscribed to the Google Groups "Pumping Station One" group. To unsubscribe from this group and stop receiving emails from it, send an email to pumping-station-one+unsubscribe at googlegroups.com. To post to this group, send email to pumping-station-one at googlegroups.com. Visit this group at http://groups.google.com/group/pumping-station-one. For more options, visit https://groups.google.com/d/optout. -- Carl K -------------- next part -------------- An HTML attachment was scrubbed... URL: From shekay at pobox.com Fri Mar 13 00:08:39 2015 From: shekay at pobox.com (sheila miguez) Date: Thu, 12 Mar 2015 18:08:39 -0500 Subject: [Chicago] Google Summer of Code for NumFOCUS projects Message-ID: Hi all, Google Summer of Code is upon us again, and NumFOCUS was accepted as an organization this year. This means all of the NumFOCUS projects are open for GSoC projects. Take a look at https://github.com/numfocus/gsoc to see how to apply. http://numfocus.org/projects/index.html -- shekay at pobox.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paaschpa at gmail.com Fri Mar 13 16:19:18 2015 From: paaschpa at gmail.com (Pat P.) Date: Fri, 13 Mar 2015 10:19:18 -0500 Subject: [Chicago] Chicago Code Camp Registration Message-ID: Hi Chipy, Just want to announce that registration for Chicago Code Camp is now open. Register here ( http://www.eventbrite.com/e/chicago-code-camp-2015-registration-15323189071) via Eventbrite or via the website www.chicagocodecamp.com. I spoke briefly with the one of the volunteers and he didn't recall any Python related talks within the submission pool. Hopefully that changes (nudge, nudge). Call for speakers closes on Monday (3/16). I'll throw a couple talk ideas out there...Python-Do it for the Pandas: An intro to the Pandas data analysis library or Pygame of Thrones: a simple game using Pygame and characters from Game of Thrones. Hope to see you there (as a speaker or attendee). Pat -------------- next part -------------- An HTML attachment was scrubbed... URL: From xan.vongsathorn at gmail.com Sat Mar 14 03:07:40 2015 From: xan.vongsathorn at gmail.com (Xan Vongsathorn) Date: Fri, 13 Mar 2015 21:07:40 -0500 Subject: [Chicago] Giving a Pythonic Talk Message-ID: Thanks again to everyone who came to our talk at ChiPy yesterday! If you missed it, you can watch it here: https://www.youtube.com/watch?v=xK7uxQkoIeM&feature=youtu.be Or grab the slides here: http://xanvong.com/talks/ And a big thanks to everyone who was kind enough to fill out the feedback forms. It looks like we may be giving this talk a few more times, so it is especially helpful. If you did not get a chance but have something to say, you are always welcome to email us at xan.vongsathorn at gmail.com or cvongsathorn at narrativescience.com. Thanks, Xan & Catherine -------------- next part -------------- An HTML attachment was scrubbed... URL: From wirth.jason at gmail.com Sat Mar 14 17:19:57 2015 From: wirth.jason at gmail.com (Jason Wirth) Date: Sat, 14 Mar 2015 11:19:57 -0500 Subject: [Chicago] ChiPy Feedback Message-ID: For those that attended ChiPy this week we learned from Xan and Catherine that feedback is important . (As programmers, engineers, geeks, etc. we often know this intuitively.) ChiPy would like your feedback. Please take our quick survey let us know how we can improve! Your answers are important because they help up make better meetings and events. https://www.surveymonkey.com/s/JQZHKMB Thank you, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinaldo at gmail.com Sat Mar 14 23:47:32 2015 From: dinaldo at gmail.com (Don Sheu) Date: Sat, 14 Mar 2015 15:47:32 -0700 Subject: [Chicago] Help Out Sister User Group PuPPy -- Raising for Our Rep Travel Expenses to PyCon Message-ID: Hey ChiPys, my group in Seattle applied for and received approval as a community sponsor for PyCon Montreal. However our selection was after the financial aid deadline for PyCon. Also PSF does not make grants for PyCon as a matter of policy. Luke Swart our community selected representative needs help with travel expenses to make it to Montreal. Contribute to his crowdfund at this link today, http://bit.ly/1wZYj9P Our community selected Luke on the strength of his contribution to the PuPPy community and his work on a local open source project 'Hey Duwamish!' The Duwamish River is Seattle's only river, and is one of the most polluted waterways in the US. After 100 years of urban industrialization, it contains more than 40 toxic chemicals above safe limits for humans and the environment, including PCBs, dioxins, carcinogenic PAHs, and arsenic. Studies show that the low income communities living along the river have higher rates of heart disease, asthma, and other illnesses than other Seattle areas. It is also home to salmon, osprey, sea lions, and other creatures who face unsafe levels of contamination. After more than a decade of public deliberation, the EPA came to a final decision in December 2014, and ordered a $342 million cleanup to take place over the next 17 years. 'Hey Duwamish' is a community monitoring system to help ensure that the $342 million is well spent. Luke contributes software engineering for this worthy project. Help our worthy rep reach Montreal, contribute now at http://bit.ly/1wZYj9P -- Don Sheu (312) 880-9389 *Apply to join us at www.openforcetour.org * *CONFIDENTIALITY NOTICE*: *The information contained in this message may be protected trade secrets or protected by applicable intellectual property laws of the United States and International agreements. If you believe that it has been sent to you in error, do not read it. Please immediately reply to the sender that you have received the message in error. Then delete it. Thank you.* ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Sat Mar 14 21:22:03 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sat, 14 Mar 2015 15:22:03 -0500 Subject: [Chicago] Has anyone used Maple? Message-ID: Hi everyone, First off, thanks for the invitation to the meeting on Thursday evening. What's the parking situation like at the Merchandise Mart? I'm tempted to just park at Loyola and then take the train over. I hate parking in downtown. Difficult and expensive. Has anyone used Maple software for mathematics? I used it a lot when I was working on my math degree, and then kind of forgot about it for a few years, and just it used on and off a little. I recently purchased their 2015 version and wow! I love it. It actually has a lot in common with Python. There are of course some big differences. The arrays are 1-indexed instead of 0-indexed. Python is a general-purpose programming language while Maple is really intended for mathematical and statistical research. Python is object-oriented. Maple can implement modules of code, and can also implement subroutines or sub-programs, but I think technically Maple's programming language is procedural. But both are interpreted and weakly typed (or dynamically typed, depending on the terminology that you prefer to use) and both are excellent choices for complex data analysis. Of course the big difference is Maple is commercial software while Python is free and open source. Also, I suspect that Maple's computer algebra power surpasses the power of Python's Sympy package. Sympy is very good, but when it comes to computer algebra you really can't compete with Maple. In fact, I think that's really what Maple was originally designed for--computer algebra. I appreciate your feedback. Best, Douglas Lewit P.S. Don't forget to let me know about parking at the Merchandise Mart! Is anyone driving from the northern suburbs? Can I persuade anyone to carpool with me? I'm a good suburban driver, but I get kind of nervous when I'm forced to drive in Chicago, especially downtown Chicago. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lane at strapr.com Sun Mar 15 08:11:33 2015 From: lane at strapr.com (Lane Campbell) Date: Sun, 15 Mar 2015 03:11:33 -0400 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: Parking does suck around merchandise mart. I either cab it over or try to find something close using spot hero. Sent from my iPhone > On Mar 14, 2015, at 4:22 PM, Lewit, Douglas wrote: > > Hi everyone, > > First off, thanks for the invitation to the meeting on Thursday evening. What's the parking situation like at the Merchandise Mart? I'm tempted to just park at Loyola and then take the train over. I hate parking in downtown. Difficult and expensive. > > Has anyone used Maple software for mathematics? I used it a lot when I was working on my math degree, and then kind of forgot about it for a few years, and just it used on and off a little. I recently purchased their 2015 version and wow! I love it. It actually has a lot in common with Python. There are of course some big differences. The arrays are 1-indexed instead of 0-indexed. Python is a general-purpose programming language while Maple is really intended for mathematical and statistical research. Python is object-oriented. Maple can implement modules of code, and can also implement subroutines or sub-programs, but I think technically Maple's programming language is procedural. But both are interpreted and weakly typed (or dynamically typed, depending on the terminology that you prefer to use) and both are excellent choices for complex data analysis. > > Of course the big difference is Maple is commercial software while Python is free and open source. Also, I suspect that Maple's computer algebra power surpasses the power of Python's Sympy package. Sympy is very good, but when it comes to computer algebra you really can't compete with Maple. In fact, I think that's really what Maple was originally designed for--computer algebra. > > I appreciate your feedback. > > Best, > > Douglas Lewit > > P.S. Don't forget to let me know about parking at the Merchandise Mart! Is anyone driving from the northern suburbs? Can I persuade anyone to carpool with me? I'm a good suburban driver, but I get kind of nervous when I'm forced to drive in Chicago, especially downtown Chicago. > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Sun Mar 15 15:20:06 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sun, 15 Mar 2015 09:20:06 -0500 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: Hey thanks Lane. I never heard of Spot Hero. Sounds interesting. When I visit Chicago I usually just park at Loyola University on the north side (Devon & Sheridan) and then take buses and trains, or I park my car at Northeastern.... and again take buses and trains! Why did this meetup group decide on the Merchandise Mart? On Sun, Mar 15, 2015 at 2:11 AM, Lane Campbell wrote: > Parking does suck around merchandise mart. I either cab it over or try to > find something close using spot hero. > > Sent from my iPhone > > On Mar 14, 2015, at 4:22 PM, Lewit, Douglas wrote: > > Hi everyone, > > First off, thanks for the invitation to the meeting on Thursday evening. > What's the parking situation like at the Merchandise Mart? I'm tempted to > just park at Loyola and then take the train over. I hate parking in > downtown. Difficult and expensive. > > Has anyone used Maple software for mathematics? I used it a lot when I > was working on my math degree, and then kind of forgot about it for a few > years, and just it used on and off a little. I recently purchased their > 2015 version and wow! I love it. It actually has a lot in common with > Python. There are of course some big differences. The arrays are > 1-indexed instead of 0-indexed. Python is a general-purpose programming > language while Maple is really intended for mathematical and statistical > research. Python is object-oriented. Maple can implement modules of code, > and can also implement subroutines or sub-programs, but I think technically > Maple's programming language is procedural. But both are interpreted and > weakly typed (or dynamically typed, depending on the terminology that you > prefer to use) and both are excellent choices for complex data analysis. > > Of course the big difference is Maple is commercial software while Python > is free and open source. Also, I suspect that Maple's computer algebra > power surpasses the power of Python's Sympy package. Sympy is very good, > but when it comes to computer algebra you really can't compete with Maple. > In fact, I think that's really what Maple was originally designed > for--computer algebra. > > I appreciate your feedback. > > Best, > > Douglas Lewit > > P.S. Don't forget to let me know about parking at the Merchandise Mart! > Is anyone driving from the northern suburbs? Can I persuade anyone to > carpool with me? I'm a good suburban driver, but I get kind of nervous > when I'm forced to drive in Chicago, especially downtown Chicago. > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shekay at pobox.com Sun Mar 15 16:17:49 2015 From: shekay at pobox.com (sheila miguez) Date: Sun, 15 Mar 2015 10:17:49 -0500 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: On Sun, Mar 15, 2015 at 9:20 AM, Lewit, Douglas wrote: > Why did this meetup group decide on the Merchandise Mart? For people in the city, Merchandise Mart is very easy to access. It's a brownline stop and it's connected to the building which is good for inclement weather. For people in the suburbs, it's a 15 minute walk from the train stations (or a quick cab ride). If you need to drive, there is a parking garage catercorner to the mart. see here https://goo.gl/maps/GZksr I'm very grateful to Braintree for hosting us every month. -- shekay at pobox.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From shekay at pobox.com Sun Mar 15 16:22:54 2015 From: shekay at pobox.com (sheila miguez) Date: Sun, 15 Mar 2015 10:22:54 -0500 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: On Sat, Mar 14, 2015 at 3:22 PM, Lewit, Douglas wrote: > computer algebra power surpasses the power of Python's Sympy Speaking of which, SymPy is a Google Summer of Code project. https://github.com/numfocus/gsoc#organizations-confirmed-under-numfocus-umbrella Registration for GSoC starts tomorrow. https://www.google-melange.com/gsoc/homepage/google/gsoc2015 -- shekay at pobox.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From randy7771026 at gmail.com Sun Mar 15 16:51:06 2015 From: randy7771026 at gmail.com (Randy Baxley) Date: Sun, 15 Mar 2015 10:51:06 -0500 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: Braintree hosts the event. Cars in the loop are moronic not pythonic. On Sun, Mar 15, 2015 at 9:20 AM, Lewit, Douglas wrote: > Hey thanks Lane. I never heard of Spot Hero. Sounds interesting. When I > visit Chicago I usually just park at Loyola University on the north side > (Devon & Sheridan) and then take buses and trains, or I park my car at > Northeastern.... and again take buses and trains! Why did this meetup > group decide on the Merchandise Mart? > > > On Sun, Mar 15, 2015 at 2:11 AM, Lane Campbell wrote: > >> Parking does suck around merchandise mart. I either cab it over or try >> to find something close using spot hero. >> >> Sent from my iPhone >> >> On Mar 14, 2015, at 4:22 PM, Lewit, Douglas wrote: >> >> Hi everyone, >> >> First off, thanks for the invitation to the meeting on Thursday evening. >> What's the parking situation like at the Merchandise Mart? I'm tempted to >> just park at Loyola and then take the train over. I hate parking in >> downtown. Difficult and expensive. >> >> Has anyone used Maple software for mathematics? I used it a lot when I >> was working on my math degree, and then kind of forgot about it for a few >> years, and just it used on and off a little. I recently purchased their >> 2015 version and wow! I love it. It actually has a lot in common with >> Python. There are of course some big differences. The arrays are >> 1-indexed instead of 0-indexed. Python is a general-purpose programming >> language while Maple is really intended for mathematical and statistical >> research. Python is object-oriented. Maple can implement modules of code, >> and can also implement subroutines or sub-programs, but I think technically >> Maple's programming language is procedural. But both are interpreted and >> weakly typed (or dynamically typed, depending on the terminology that you >> prefer to use) and both are excellent choices for complex data analysis. >> >> Of course the big difference is Maple is commercial software while Python >> is free and open source. Also, I suspect that Maple's computer algebra >> power surpasses the power of Python's Sympy package. Sympy is very good, >> but when it comes to computer algebra you really can't compete with Maple. >> In fact, I think that's really what Maple was originally designed >> for--computer algebra. >> >> I appreciate your feedback. >> >> Best, >> >> Douglas Lewit >> >> P.S. Don't forget to let me know about parking at the Merchandise Mart! >> Is anyone driving from the northern suburbs? Can I persuade anyone to >> carpool with me? I'm a good suburban driver, but I get kind of nervous >> when I'm forced to drive in Chicago, especially downtown Chicago. >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Sun Mar 15 16:58:13 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sun, 15 Mar 2015 10:58:13 -0500 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: The brown line is quite doable. Thanks! On Sun, Mar 15, 2015 at 10:17 AM, sheila miguez wrote: > > On Sun, Mar 15, 2015 at 9:20 AM, Lewit, Douglas wrote: > >> Why did this meetup group decide on the Merchandise Mart? > > > For people in the city, Merchandise Mart is very easy to access. It's a > brownline stop and it's connected to the building which is good for > inclement weather. For people in the suburbs, it's a 15 minute walk from > the train stations (or a quick cab ride). > > If you need to drive, there is a parking garage catercorner to the mart. > see here > https://goo.gl/maps/GZksr > > I'm very grateful to Braintree for hosting us every month. > > > -- > shekay at pobox.com > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Sun Mar 15 17:02:00 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sun, 15 Mar 2015 11:02:00 -0500 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: Hi Sheila, I've used Sympy. It is impressive, but still can't compete with Maple and Mathematica when it comes to serious high-level computer algebra. Matlab seems to be the software of choice with most engineers, although I've found that when it comes to plotting Matplotlib can do pretty much whatever Matlab can do. But in the area of computer algebra I still have to cast my vote with Maple and Mathematica, but especially Maple. (Maple is also Canadian software, and Canada is one of my favorite countries! I don't mind spending some money on top quality commercial software that comes out of Canada.) On Sun, Mar 15, 2015 at 10:22 AM, sheila miguez wrote: > > On Sat, Mar 14, 2015 at 3:22 PM, Lewit, Douglas wrote: > >> computer algebra power surpasses the power of Python's Sympy > > > Speaking of which, SymPy is a Google Summer of Code project. > > https://github.com/numfocus/gsoc#organizations-confirmed-under-numfocus-umbrella > > Registration for GSoC starts tomorrow. > https://www.google-melange.com/gsoc/homepage/google/gsoc2015 > > > -- > shekay at pobox.com > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shekay at pobox.com Sun Mar 15 18:22:38 2015 From: shekay at pobox.com (sheila miguez) Date: Sun, 15 Mar 2015 12:22:38 -0500 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: Yes, I did see that you'd used SymPy. I followed up to mention that SymPy is a Google Summer of Code project. Since you are a student, you can apply to a GSoC project. If you are accepted as a GSoC student for SymPy you could make a proposal to improve it if that interests you. I want to make sure people in college know about GSoC. On Sun, Mar 15, 2015 at 11:02 AM, Lewit, Douglas wrote: > Hi Sheila, > > I've used Sympy. It is impressive, but still can't compete with Maple and > Mathematica when it comes to serious high-level computer algebra. Matlab > seems to be the software of choice with most engineers, although I've found > that when it comes to plotting Matplotlib can do pretty much whatever > Matlab can do. But in the area of computer algebra I still have to cast my > vote with Maple and Mathematica, but especially Maple. (Maple is also > Canadian software, and Canada is one of my favorite countries! I don't > mind spending some money on top quality commercial software that comes out > of Canada.) > > On Sun, Mar 15, 2015 at 10:22 AM, sheila miguez wrote: > >> >> On Sat, Mar 14, 2015 at 3:22 PM, Lewit, Douglas wrote: >> >>> computer algebra power surpasses the power of Python's Sympy >> >> >> Speaking of which, SymPy is a Google Summer of Code project. >> >> https://github.com/numfocus/gsoc#organizations-confirmed-under-numfocus-umbrella >> >> Registration for GSoC starts tomorrow. >> https://www.google-melange.com/gsoc/homepage/google/gsoc2015 >> >> >> -- >> shekay at pobox.com >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -- shekay at pobox.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From robkapteyn at gmail.com Sun Mar 15 20:04:57 2015 From: robkapteyn at gmail.com (Rob Kapteyn) Date: Sun, 15 Mar 2015 14:04:57 -0500 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: I'm not sure how a python list can discuss Maple, Mathematica and "serious computer algebra" and NOT mention Sage: http://www.sagemath.org Sage is awesome, it has been around for years, and it deserves a lot more visibility. It is completely open source, the top layer glue is all Python and matplotlib (I saw C and even fortran when I built it from source). I don't do a lot of heavy math -- but when I do -- Sage does everything that I would do with Mathematica. The big plus is -- it's FREE -- and an easy way to impress clients who would never put out for a Mathematica license. The Sage wiki is full of awesome examples. Here is one I quickly grabbed that shows python code, algebra, and matplotlib. http://wiki.sagemath.org/interact/algebra It makes nice workbooks for saving your work and coming back to it later. Oh well . . . Anyone else use Sage ? On Sun, Mar 15, 2015 at 12:22 PM, sheila miguez wrote: > Yes, I did see that you'd used SymPy. I followed up to mention that SymPy > is a Google Summer of Code project. Since you are a student, you can apply > to a GSoC project. If you are accepted as a GSoC student for SymPy you > could make a proposal to improve it if that interests you. > > I want to make sure people in college know about GSoC. > > > On Sun, Mar 15, 2015 at 11:02 AM, Lewit, Douglas wrote: > >> Hi Sheila, >> >> I've used Sympy. It is impressive, but still can't compete with Maple >> and Mathematica when it comes to serious high-level computer algebra. >> Matlab seems to be the software of choice with most engineers, although >> I've found that when it comes to plotting Matplotlib can do pretty much >> whatever Matlab can do. But in the area of computer algebra I still have >> to cast my vote with Maple and Mathematica, but especially Maple. (Maple >> is also Canadian software, and Canada is one of my favorite countries! I >> don't mind spending some money on top quality commercial software that >> comes out of Canada.) >> >> On Sun, Mar 15, 2015 at 10:22 AM, sheila miguez wrote: >> >>> >>> On Sat, Mar 14, 2015 at 3:22 PM, Lewit, Douglas >>> wrote: >>> >>>> computer algebra power surpasses the power of Python's Sympy >>> >>> >>> Speaking of which, SymPy is a Google Summer of Code project. >>> >>> https://github.com/numfocus/gsoc#organizations-confirmed-under-numfocus-umbrella >>> >>> Registration for GSoC starts tomorrow. >>> https://www.google-melange.com/gsoc/homepage/google/gsoc2015 >>> >>> >>> -- >>> shekay at pobox.com >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >>> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > > -- > shekay at pobox.com > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Sun Mar 15 18:41:10 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sun, 15 Mar 2015 12:41:10 -0500 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: Hi Sheila, It sounds like a great opportunity, but I'm an older student. (Not as much stamina as when I was in my 20's, unfortunately.) Between work and school I have very little leftover time for extra projects. I actually teach part-time at Oakton Community College, where I take advantage of Wolfram Mathematica. (That's the computer algebra system that we use at Oakton. ) Again, it's commercial software but I really don't object to spending some money on a company that produces a worthwhile product. (Oh god, if only Richard Stallman heard me say that! He would probably beat me up severely for spending money on copyrighted software rather than software that is "copylefted"! ) And speaking of Stallman, I find the whole copyright vs. copyleft issue very amusing. I know that much of Linux, the Free Software Foundation, Open Source, etc, grew out of some terribly unpleasant legal battles between BSD and AT&T, but I have a really hard time respecting Stallman after he said something like this in response to an interviewer's question, "But Mr. Stallman, if all software is free, how will programmers make a living?", to which Stallman coldly replied, "Who forced you to become a programmer?" Hmmm...... Andrew Carnegie would be very happy! Carnegie and his partner Frick didn't believe in paying their steelworkers much money, and did a great job of breaking the labor unions and craft guilds in their steel factories. I'm a big advocate of labor laws and hence I have a really hard time accepting any institution that forces or encourages people to work for free hence my skepticism when it comes to the vision of Richard Stallman and like-minded individuals. If computer science majors are going to borrow $100,000 to pay for their college education, how will they be able to repay those loans if they contribute all of their work to free and open source projects? (Not to mention the financial necessities of day-to-day living. ) I really got off on a tangent here! But I do have some reservations about this new movement of free software that is trying to undermine all commercial software enterprises. Why bother becoming a programmer if nobody will pay me to program and if all my programs are copylefted and belong to the public domain? I think I would rather become a banker! On Sun, Mar 15, 2015 at 12:22 PM, sheila miguez wrote: > Yes, I did see that you'd used SymPy. I followed up to mention that SymPy > is a Google Summer of Code project. Since you are a student, you can apply > to a GSoC project. If you are accepted as a GSoC student for SymPy you > could make a proposal to improve it if that interests you. > > I want to make sure people in college know about GSoC. > > > On Sun, Mar 15, 2015 at 11:02 AM, Lewit, Douglas wrote: > >> Hi Sheila, >> >> I've used Sympy. It is impressive, but still can't compete with Maple >> and Mathematica when it comes to serious high-level computer algebra. >> Matlab seems to be the software of choice with most engineers, although >> I've found that when it comes to plotting Matplotlib can do pretty much >> whatever Matlab can do. But in the area of computer algebra I still have >> to cast my vote with Maple and Mathematica, but especially Maple. (Maple >> is also Canadian software, and Canada is one of my favorite countries! I >> don't mind spending some money on top quality commercial software that >> comes out of Canada.) >> >> On Sun, Mar 15, 2015 at 10:22 AM, sheila miguez wrote: >> >>> >>> On Sat, Mar 14, 2015 at 3:22 PM, Lewit, Douglas >>> wrote: >>> >>>> computer algebra power surpasses the power of Python's Sympy >>> >>> >>> Speaking of which, SymPy is a Google Summer of Code project. >>> >>> https://github.com/numfocus/gsoc#organizations-confirmed-under-numfocus-umbrella >>> >>> Registration for GSoC starts tomorrow. >>> https://www.google-melange.com/gsoc/homepage/google/gsoc2015 >>> >>> >>> -- >>> shekay at pobox.com >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >>> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > > -- > shekay at pobox.com > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Sun Mar 15 22:31:56 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sun, 15 Mar 2015 16:31:56 -0500 Subject: [Chicago] Has anyone used Maple? In-Reply-To: References: Message-ID: I've heard of Sage, but never used it. There are so many platforms out there! I can't learn them all! I think people generally stick with the platforms that they learned in school or learned from very good teachers. I hope those Sage developers have great jobs because otherwise how can they afford to continue developing Sage? Inquiring minds would like to know! I know that Sage works well on Windows, but I've heard very bad things about its performance on Linux and Mac OS-X. Since I greatly prefer UNIX-based systems I think for me that might be an issue. I also had an amazing Maple programming professor in school, so I am obviously going to be biased in favor of Maple because I have had so much success with it. Different computational platforms for different folks, right? Ultimately you have to use whichever one your professor or boss tells you to use. Either that or your professor will give you an F or your boss will tell you to go find another job! :-) On Sun, Mar 15, 2015 at 2:04 PM, Rob Kapteyn wrote: > I'm not sure how a python list can discuss Maple, Mathematica and "serious > computer algebra" and NOT mention Sage: > > http://www.sagemath.org > > Sage is awesome, it has been around for years, and it deserves a lot more > visibility. > > It is completely open source, the top layer glue is all Python and > matplotlib (I saw C and even fortran when I built it from source). > > I don't do a lot of heavy math -- but when I do -- Sage does everything > that I would do with Mathematica. The big plus is -- it's FREE -- and an > easy way to impress clients who would never put out for a Mathematica > license. > > The Sage wiki is full of awesome examples. > > Here is one I quickly grabbed that shows python code, algebra, and > matplotlib. > http://wiki.sagemath.org/interact/algebra > It makes nice workbooks for saving your work and coming back to it later. > > Oh well . . . > Anyone else use Sage ? > > On Sun, Mar 15, 2015 at 12:22 PM, sheila miguez wrote: > >> Yes, I did see that you'd used SymPy. I followed up to mention that SymPy >> is a Google Summer of Code project. Since you are a student, you can apply >> to a GSoC project. If you are accepted as a GSoC student for SymPy you >> could make a proposal to improve it if that interests you. >> >> I want to make sure people in college know about GSoC. >> >> >> On Sun, Mar 15, 2015 at 11:02 AM, Lewit, Douglas >> wrote: >> >>> Hi Sheila, >>> >>> I've used Sympy. It is impressive, but still can't compete with Maple >>> and Mathematica when it comes to serious high-level computer algebra. >>> Matlab seems to be the software of choice with most engineers, although >>> I've found that when it comes to plotting Matplotlib can do pretty much >>> whatever Matlab can do. But in the area of computer algebra I still have >>> to cast my vote with Maple and Mathematica, but especially Maple. (Maple >>> is also Canadian software, and Canada is one of my favorite countries! I >>> don't mind spending some money on top quality commercial software that >>> comes out of Canada.) >>> >>> On Sun, Mar 15, 2015 at 10:22 AM, sheila miguez >>> wrote: >>> >>>> >>>> On Sat, Mar 14, 2015 at 3:22 PM, Lewit, Douglas >>>> wrote: >>>> >>>>> computer algebra power surpasses the power of Python's Sympy >>>> >>>> >>>> Speaking of which, SymPy is a Google Summer of Code project. >>>> >>>> https://github.com/numfocus/gsoc#organizations-confirmed-under-numfocus-umbrella >>>> >>>> Registration for GSoC starts tomorrow. >>>> https://www.google-melange.com/gsoc/homepage/google/gsoc2015 >>>> >>>> >>>> -- >>>> shekay at pobox.com >>>> >>>> _______________________________________________ >>>> Chicago mailing list >>>> Chicago at python.org >>>> https://mail.python.org/mailman/listinfo/chicago >>>> >>>> >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >>> >> >> >> -- >> shekay at pobox.com >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeremy.mcmillan at gmail.com Mon Mar 16 00:33:28 2015 From: jeremy.mcmillan at gmail.com (Jeremy McMillan) Date: Sun, 15 Mar 2015 18:33:28 -0500 Subject: [Chicago] hark! datasize.data_size class for understanding data_size('2TiB') > data_size('2TB') Message-ID: I am doing some SaltStack states at work, and I decided I will not write any more data size string parsing or formatting human readable memory or storage footprint demand/capacity. I'm tired of reinventing the wheel. I'm done. Well, I'm done with the first draft anyway. https://github.com/aphor/data_size There's a better than fair chance I will get to open source the SaltStack formula work too, which means I need to be kind about the dependency on this little data_size utility class, and that means publishing it on PyPI. Before it gets there, I sadly don't work in a Python shop, so I need to ask for help from you, the Python community, to review the code. For your effort, maybe you will be able to scratch your own itch with this wee snippet. If you've ever needed to compare two data allocations, or report on even one, I hope you will try it. Criticism, issues on GitHub, kudos, and especially pull requests are appreciated with gratitude. From the README.md: There is support for metric and IEC units in both bits and bytes and nonstandard abbreviated IEC units (for legacy Java -Xmx). There is support for variable word-lengths, but because I thought it would get confusing, converting between two different word lengths is not supported. The word length constructor keyword argument will allow converting counts of weird (actually non-byte) word or symbol bit lengths to bit rates, which can then be explicitly converted to standard 8-bit bytes. The really sweet feature that everyone (now everybody's me!) should love is the Python 3 string.format() support! Help on method __format__ in module datasize.data_size: __format__(self, code) unbound datasize.__data_size__.data_size method formats as a decimal number, but recognizes data units as type format codes. Precision is ignored for integer multiples of the unit specified in the format code. format codes: a autoformat will choose a unit defaulting to the largest size with a quantity >= 1 (default) A abbreviated number of bytes (implied IEC units, and implied 'B' bytes suffix omitted) B bytes (1) kiB kibibytes (1024) kB kilobytes (1000) ... GiB Gibibytes (1024**3) GB Gigabytes (10**9) ... YiB Yobibytes (1024**8) YB Yottabytes (10**24) >>> from datasize import data_size >>> 'My new {0:GB} SSD really only stores {1:.2GiB} of data.'.format(data_size('750GB'),data_size(data_size('750GB') * 0.8)) 'My new 750GB SSD really only stores 558.79GiB of data.' >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From brianhray at gmail.com Mon Mar 16 22:48:49 2015 From: brianhray at gmail.com (Brian Ray) Date: Mon, 16 Mar 2015 16:48:49 -0500 Subject: [Chicago] hark! datasize.data_size class for understanding data_size('2TiB') > data_size('2TB') In-Reply-To: References: Message-ID: Very cool, so you subclass int and overwrite __format__ if i read correctly? I would recommend writing some unit tests. On Sunday, March 15, 2015, Jeremy McMillan wrote: > I am doing some SaltStack states at work, and I decided I will not write > any more data size string parsing or formatting human readable memory or > storage footprint demand/capacity. I'm tired of reinventing the wheel. > > I'm done. > > Well, I'm done with the first draft anyway. > > https://github.com/aphor/data_size > > There's a better than fair chance I will get to open source the SaltStack > formula work too, which means I need to be kind about the dependency on > this little data_size utility class, and that means publishing it on PyPI. > Before it gets there, I sadly don't work in a Python shop, so I need to ask > for help from you, the Python community, to review the code. For your > effort, maybe you will be able to scratch your own itch with this wee > snippet. > > If you've ever needed to compare two data allocations, or report on even > one, I hope you will try it. Criticism, issues on GitHub, kudos, and > especially pull requests are appreciated with gratitude. > > From the README.md: > > There is support for metric and IEC units in both bits and bytes and > nonstandard abbreviated IEC units (for legacy Java -Xmx). There is support > for variable word-lengths, but because I thought it would get confusing, > converting between two different word lengths is not supported. The word > length constructor keyword argument will allow converting counts of weird > (actually non-byte) word or symbol bit lengths to bit rates, which can then > be explicitly converted to standard 8-bit bytes. > > The really sweet feature that everyone (now everybody's me!) should love > is the Python 3 string.format() support! > > Help on method __format__ in module datasize.data_size: > > __format__(self, code) unbound datasize.__data_size__.data_size method > formats as a decimal number, but recognizes data units as type format codes. > Precision is ignored for integer multiples of the unit specified in the format code. > format codes: > a autoformat will choose a unit defaulting to the largest > size with a quantity >= 1 (default) > A abbreviated number of bytes (implied IEC units, and implied 'B' bytes suffix omitted) > B bytes (1) > kiB kibibytes (1024) > kB kilobytes (1000) > ... > GiB Gibibytes (1024**3) > GB Gigabytes (10**9) > ... > YiB Yobibytes (1024**8) > YB Yottabytes (10**24) > > >>> from datasize import data_size > >>> 'My new {0:GB} SSD really only stores {1:.2GiB} of data.'.format(data_size('750GB'),data_size(data_size('750GB') * 0.8)) > 'My new 750GB SSD really only stores 558.79GiB of data.' > >>> > > > > > -- Brian Ray @brianray (773) 669-7717 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeremy.mcmillan at gmail.com Mon Mar 16 23:08:22 2015 From: jeremy.mcmillan at gmail.com (Jeremy McMillan) Date: Mon, 16 Mar 2015 17:08:22 -0500 Subject: [Chicago] hark! datasize.data_size class for understanding data_size('2TiB') > data_size('2TB') In-Reply-To: References: Message-ID: That's pretty much it, except subclassing immutable base types requires splitting the constructor work between __init__() and __new__(). Yeah, unit tests are good. I should add some coverage. Aside from asserting some deterministic values, I'm uneasy about converting back and forth between int and float values. What's the best way to cover that? On Mar 16, 2015 4:49 PM, "Brian Ray" wrote: > Very cool, so you subclass int and overwrite __format__ if i read > correctly? I would recommend writing some unit tests. > > > > On Sunday, March 15, 2015, Jeremy McMillan > wrote: > >> I am doing some SaltStack states at work, and I decided I will not write >> any more data size string parsing or formatting human readable memory or >> storage footprint demand/capacity. I'm tired of reinventing the wheel. >> >> I'm done. >> >> Well, I'm done with the first draft anyway. >> >> https://github.com/aphor/data_size >> >> There's a better than fair chance I will get to open source the SaltStack >> formula work too, which means I need to be kind about the dependency on >> this little data_size utility class, and that means publishing it on PyPI. >> Before it gets there, I sadly don't work in a Python shop, so I need to ask >> for help from you, the Python community, to review the code. For your >> effort, maybe you will be able to scratch your own itch with this wee >> snippet. >> >> If you've ever needed to compare two data allocations, or report on even >> one, I hope you will try it. Criticism, issues on GitHub, kudos, and >> especially pull requests are appreciated with gratitude. >> >> From the README.md: >> >> There is support for metric and IEC units in both bits and bytes and >> nonstandard abbreviated IEC units (for legacy Java -Xmx). There is support >> for variable word-lengths, but because I thought it would get confusing, >> converting between two different word lengths is not supported. The word >> length constructor keyword argument will allow converting counts of weird >> (actually non-byte) word or symbol bit lengths to bit rates, which can then >> be explicitly converted to standard 8-bit bytes. >> >> The really sweet feature that everyone (now everybody's me!) should love >> is the Python 3 string.format() support! >> >> Help on method __format__ in module datasize.data_size: >> >> __format__(self, code) unbound datasize.__data_size__.data_size method >> formats as a decimal number, but recognizes data units as type format codes. >> Precision is ignored for integer multiples of the unit specified in the format code. >> format codes: >> a autoformat will choose a unit defaulting to the largest >> size with a quantity >= 1 (default) >> A abbreviated number of bytes (implied IEC units, and implied 'B' bytes suffix omitted) >> B bytes (1) >> kiB kibibytes (1024) >> kB kilobytes (1000) >> ... >> GiB Gibibytes (1024**3) >> GB Gigabytes (10**9) >> ... >> YiB Yobibytes (1024**8) >> YB Yottabytes (10**24) >> >> >>> from datasize import data_size >> >>> 'My new {0:GB} SSD really only stores {1:.2GiB} of data.'.format(data_size('750GB'),data_size(data_size('750GB') * 0.8)) >> 'My new 750GB SSD really only stores 558.79GiB of data.' >> >>> >> >> >> >> >> > > -- > Brian Ray > @brianray > (773) 669-7717 > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brianhray at gmail.com Tue Mar 17 02:51:30 2015 From: brianhray at gmail.com (Brian Ray) Date: Mon, 16 Mar 2015 20:51:30 -0500 Subject: [Chicago] hark! datasize.data_size class for understanding data_size('2TiB') > data_size('2TB') In-Reply-To: References: Message-ID: Are you talking about the complexity of floating point numbers? I am guessing for consistency you might want is: int(round(some_float)) and float(some_int) However, I am not entirely sure this solves all problems. You may want to do decimal math instead of floating point. On Mon, Mar 16, 2015 at 5:08 PM, Jeremy McMillan wrote: > That's pretty much it, except subclassing immutable base types requires > splitting the constructor work between __init__() and __new__(). > > Yeah, unit tests are good. I should add some coverage. Aside from > asserting some deterministic values, I'm uneasy about converting back and > forth between int and float values. What's the best way to cover that? > On Mar 16, 2015 4:49 PM, "Brian Ray" wrote: > >> Very cool, so you subclass int and overwrite __format__ if i read >> correctly? I would recommend writing some unit tests. >> >> >> >> On Sunday, March 15, 2015, Jeremy McMillan >> wrote: >> >>> I am doing some SaltStack states at work, and I decided I will not write >>> any more data size string parsing or formatting human readable memory or >>> storage footprint demand/capacity. I'm tired of reinventing the wheel. >>> >>> I'm done. >>> >>> Well, I'm done with the first draft anyway. >>> >>> https://github.com/aphor/data_size >>> >>> There's a better than fair chance I will get to open source the >>> SaltStack formula work too, which means I need to be kind about the >>> dependency on this little data_size utility class, and that means >>> publishing it on PyPI. Before it gets there, I sadly don't work in a Python >>> shop, so I need to ask for help from you, the Python community, to review >>> the code. For your effort, maybe you will be able to scratch your own itch >>> with this wee snippet. >>> >>> If you've ever needed to compare two data allocations, or report on even >>> one, I hope you will try it. Criticism, issues on GitHub, kudos, and >>> especially pull requests are appreciated with gratitude. >>> >>> From the README.md: >>> >>> There is support for metric and IEC units in both bits and bytes and >>> nonstandard abbreviated IEC units (for legacy Java -Xmx). There is support >>> for variable word-lengths, but because I thought it would get confusing, >>> converting between two different word lengths is not supported. The word >>> length constructor keyword argument will allow converting counts of weird >>> (actually non-byte) word or symbol bit lengths to bit rates, which can then >>> be explicitly converted to standard 8-bit bytes. >>> >>> The really sweet feature that everyone (now everybody's me!) should love >>> is the Python 3 string.format() support! >>> >>> Help on method __format__ in module datasize.data_size: >>> >>> __format__(self, code) unbound datasize.__data_size__.data_size method >>> formats as a decimal number, but recognizes data units as type format codes. >>> Precision is ignored for integer multiples of the unit specified in the format code. >>> format codes: >>> a autoformat will choose a unit defaulting to the largest >>> size with a quantity >= 1 (default) >>> A abbreviated number of bytes (implied IEC units, and implied 'B' bytes suffix omitted) >>> B bytes (1) >>> kiB kibibytes (1024) >>> kB kilobytes (1000) >>> ... >>> GiB Gibibytes (1024**3) >>> GB Gigabytes (10**9) >>> ... >>> YiB Yobibytes (1024**8) >>> YB Yottabytes (10**24) >>> >>> >>> from datasize import data_size >>> >>> 'My new {0:GB} SSD really only stores {1:.2GiB} of data.'.format(data_size('750GB'),data_size(data_size('750GB') * 0.8)) >>> 'My new 750GB SSD really only stores 558.79GiB of data.' >>> >>> >>> >>> >>> >>> >>> >> >> -- >> Brian Ray >> @brianray >> (773) 669-7717 >> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -- Brian Ray @brianray (773) 669-7717 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeremy.mcmillan at gmail.com Tue Mar 17 14:35:08 2015 From: jeremy.mcmillan at gmail.com (Jeremy McMillan) Date: Tue, 17 Mar 2015 08:35:08 -0500 Subject: [Chicago] hark! datasize.data_size class for understanding data_size('2TiB') > data_size('2TB') In-Reply-To: References: Message-ID: Not really. I'm concerned about accumulated rounding errors. It's something I haven't completely thought through yet. Also I remember vaguely that I had trouble using string format with decimals, but that may have been a long time ago. It seems more correct than floats, but I'll need to think hard about a test case. On Mon, Mar 16, 2015 at 8:51 PM, Brian Ray wrote: > Are you talking about the complexity > of floating > point numbers? > > I am guessing for consistency you might want is: > > int(round(some_float)) > > and > > float(some_int) > > However, I am not entirely sure this solves all problems. You may want to > do decimal math instead > of floating point. > > > > > > On Mon, Mar 16, 2015 at 5:08 PM, Jeremy McMillan < > jeremy.mcmillan at gmail.com> wrote: > >> That's pretty much it, except subclassing immutable base types requires >> splitting the constructor work between __init__() and __new__(). >> >> Yeah, unit tests are good. I should add some coverage. Aside from >> asserting some deterministic values, I'm uneasy about converting back and >> forth between int and float values. What's the best way to cover that? >> On Mar 16, 2015 4:49 PM, "Brian Ray" wrote: >> >>> Very cool, so you subclass int and overwrite __format__ if i read >>> correctly? I would recommend writing some unit tests. >>> >>> >>> >>> On Sunday, March 15, 2015, Jeremy McMillan >>> wrote: >>> >>>> I am doing some SaltStack states at work, and I decided I will not >>>> write any more data size string parsing or formatting human readable memory >>>> or storage footprint demand/capacity. I'm tired of reinventing the wheel. >>>> >>>> I'm done. >>>> >>>> Well, I'm done with the first draft anyway. >>>> >>>> https://github.com/aphor/data_size >>>> >>>> There's a better than fair chance I will get to open source the >>>> SaltStack formula work too, which means I need to be kind about the >>>> dependency on this little data_size utility class, and that means >>>> publishing it on PyPI. Before it gets there, I sadly don't work in a Python >>>> shop, so I need to ask for help from you, the Python community, to review >>>> the code. For your effort, maybe you will be able to scratch your own itch >>>> with this wee snippet. >>>> >>>> If you've ever needed to compare two data allocations, or report on >>>> even one, I hope you will try it. Criticism, issues on GitHub, kudos, and >>>> especially pull requests are appreciated with gratitude. >>>> >>>> From the README.md: >>>> >>>> There is support for metric and IEC units in both bits and bytes and >>>> nonstandard abbreviated IEC units (for legacy Java -Xmx). There is support >>>> for variable word-lengths, but because I thought it would get confusing, >>>> converting between two different word lengths is not supported. The word >>>> length constructor keyword argument will allow converting counts of weird >>>> (actually non-byte) word or symbol bit lengths to bit rates, which can then >>>> be explicitly converted to standard 8-bit bytes. >>>> >>>> The really sweet feature that everyone (now everybody's me!) should >>>> love is the Python 3 string.format() support! >>>> >>>> Help on method __format__ in module datasize.data_size: >>>> >>>> __format__(self, code) unbound datasize.__data_size__.data_size method >>>> formats as a decimal number, but recognizes data units as type format codes. >>>> Precision is ignored for integer multiples of the unit specified in the format code. >>>> format codes: >>>> a autoformat will choose a unit defaulting to the largest >>>> size with a quantity >= 1 (default) >>>> A abbreviated number of bytes (implied IEC units, and implied 'B' bytes suffix omitted) >>>> B bytes (1) >>>> kiB kibibytes (1024) >>>> kB kilobytes (1000) >>>> ... >>>> GiB Gibibytes (1024**3) >>>> GB Gigabytes (10**9) >>>> ... >>>> YiB Yobibytes (1024**8) >>>> YB Yottabytes (10**24) >>>> >>>> >>> from datasize import data_size >>>> >>> 'My new {0:GB} SSD really only stores {1:.2GiB} of data.'.format(data_size('750GB'),data_size(data_size('750GB') * 0.8)) >>>> 'My new 750GB SSD really only stores 558.79GiB of data.' >>>> >>> >>>> >>>> >>>> >>>> >>>> >>> >>> -- >>> Brian Ray >>> @brianray >>> (773) 669-7717 >>> >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >>> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > > -- > Brian Ray > @brianray > (773) 669-7717 > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl at personnelware.com Wed Mar 18 02:36:08 2015 From: carl at personnelware.com (Carl Karsten) Date: Tue, 17 Mar 2015 20:36:08 -0500 Subject: [Chicago] hark! datasize.data_size class for understanding data_size('2TiB') > data_size('2TB') In-Reply-To: References: Message-ID: I only 1/2 understand your problem, and I only half understand what this does,. and I half think I saw this at a PyOhio lightning talk that I can't find now. https://readthedocs.org/projects/python-measurement/ Maybe some of this is useful. On Tue, Mar 17, 2015 at 8:35 AM, Jeremy McMillan wrote: > Not really. I'm concerned about accumulated rounding errors. It's > something I haven't completely thought through yet. > > Also I remember vaguely that I had trouble using string format with > decimals, but that may have been a long time ago. It seems more correct > than floats, but I'll need to think hard about a test case. > > On Mon, Mar 16, 2015 at 8:51 PM, Brian Ray wrote: > >> Are you talking about the complexity >> of floating >> point numbers? >> >> I am guessing for consistency you might want is: >> >> int(round(some_float)) >> >> and >> >> float(some_int) >> >> However, I am not entirely sure this solves all problems. You may want to >> do decimal math instead >> of floating point. >> >> >> >> >> >> On Mon, Mar 16, 2015 at 5:08 PM, Jeremy McMillan < >> jeremy.mcmillan at gmail.com> wrote: >> >>> That's pretty much it, except subclassing immutable base types requires >>> splitting the constructor work between __init__() and __new__(). >>> >>> Yeah, unit tests are good. I should add some coverage. Aside from >>> asserting some deterministic values, I'm uneasy about converting back and >>> forth between int and float values. What's the best way to cover that? >>> On Mar 16, 2015 4:49 PM, "Brian Ray" wrote: >>> >>>> Very cool, so you subclass int and overwrite __format__ if i read >>>> correctly? I would recommend writing some unit tests. >>>> >>>> >>>> >>>> On Sunday, March 15, 2015, Jeremy McMillan >>>> wrote: >>>> >>>>> I am doing some SaltStack states at work, and I decided I will not >>>>> write any more data size string parsing or formatting human readable memory >>>>> or storage footprint demand/capacity. I'm tired of reinventing the wheel. >>>>> >>>>> I'm done. >>>>> >>>>> Well, I'm done with the first draft anyway. >>>>> >>>>> https://github.com/aphor/data_size >>>>> >>>>> There's a better than fair chance I will get to open source the >>>>> SaltStack formula work too, which means I need to be kind about the >>>>> dependency on this little data_size utility class, and that means >>>>> publishing it on PyPI. Before it gets there, I sadly don't work in a Python >>>>> shop, so I need to ask for help from you, the Python community, to review >>>>> the code. For your effort, maybe you will be able to scratch your own itch >>>>> with this wee snippet. >>>>> >>>>> If you've ever needed to compare two data allocations, or report on >>>>> even one, I hope you will try it. Criticism, issues on GitHub, kudos, and >>>>> especially pull requests are appreciated with gratitude. >>>>> >>>>> From the README.md: >>>>> >>>>> There is support for metric and IEC units in both bits and bytes and >>>>> nonstandard abbreviated IEC units (for legacy Java -Xmx). There is support >>>>> for variable word-lengths, but because I thought it would get confusing, >>>>> converting between two different word lengths is not supported. The word >>>>> length constructor keyword argument will allow converting counts of weird >>>>> (actually non-byte) word or symbol bit lengths to bit rates, which can then >>>>> be explicitly converted to standard 8-bit bytes. >>>>> >>>>> The really sweet feature that everyone (now everybody's me!) should >>>>> love is the Python 3 string.format() support! >>>>> >>>>> Help on method __format__ in module datasize.data_size: >>>>> >>>>> __format__(self, code) unbound datasize.__data_size__.data_size method >>>>> formats as a decimal number, but recognizes data units as type format codes. >>>>> Precision is ignored for integer multiples of the unit specified in the format code. >>>>> format codes: >>>>> a autoformat will choose a unit defaulting to the largest >>>>> size with a quantity >= 1 (default) >>>>> A abbreviated number of bytes (implied IEC units, and implied 'B' bytes suffix omitted) >>>>> B bytes (1) >>>>> kiB kibibytes (1024) >>>>> kB kilobytes (1000) >>>>> ... >>>>> GiB Gibibytes (1024**3) >>>>> GB Gigabytes (10**9) >>>>> ... >>>>> YiB Yobibytes (1024**8) >>>>> YB Yottabytes (10**24) >>>>> >>>>> >>> from datasize import data_size >>>>> >>> 'My new {0:GB} SSD really only stores {1:.2GiB} of data.'.format(data_size('750GB'),data_size(data_size('750GB') * 0.8)) >>>>> 'My new 750GB SSD really only stores 558.79GiB of data.' >>>>> >>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> -- >>>> Brian Ray >>>> @brianray >>>> (773) 669-7717 >>>> >>>> >>>> _______________________________________________ >>>> Chicago mailing list >>>> Chicago at python.org >>>> https://mail.python.org/mailman/listinfo/chicago >>>> >>>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >>> >> >> >> -- >> Brian Ray >> @brianray >> (773) 669-7717 >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -- Carl K -------------- next part -------------- An HTML attachment was scrubbed... URL: From MDiPierro at cs.depaul.edu Wed Mar 18 02:58:38 2015 From: MDiPierro at cs.depaul.edu (DiPierro, Massimo) Date: Wed, 18 Mar 2015 01:58:38 +0000 Subject: [Chicago] hark! datasize.data_size class for understanding data_size('2TiB') > data_size('2TB') In-Reply-To: References: Message-ID: This does the same. Also does error propagation. I recently migrated to github but the project is quite old. https://github.com/mdipierro/buckingham On Mar 17, 2015, at 8:36 PM, Carl Karsten > wrote: I only 1/2 understand your problem, and I only half understand what this does,. and I half think I saw this at a PyOhio lightning talk that I can't find now. https://readthedocs.org/projects/python-measurement/ Maybe some of this is useful. On Tue, Mar 17, 2015 at 8:35 AM, Jeremy McMillan > wrote: Not really. I'm concerned about accumulated rounding errors. It's something I haven't completely thought through yet. Also I remember vaguely that I had trouble using string format with decimals, but that may have been a long time ago. It seems more correct than floats, but I'll need to think hard about a test case. On Mon, Mar 16, 2015 at 8:51 PM, Brian Ray > wrote: Are you talking about the complexity of floating point numbers? I am guessing for consistency you might want is: int(round(some_float)) and float(some_int) However, I am not entirely sure this solves all problems. You may want to do decimal math instead of floating point. On Mon, Mar 16, 2015 at 5:08 PM, Jeremy McMillan > wrote: That's pretty much it, except subclassing immutable base types requires splitting the constructor work between __init__() and __new__(). Yeah, unit tests are good. I should add some coverage. Aside from asserting some deterministic values, I'm uneasy about converting back and forth between int and float values. What's the best way to cover that? On Mar 16, 2015 4:49 PM, "Brian Ray" > wrote: Very cool, so you subclass int and overwrite __format__ if i read correctly? I would recommend writing some unit tests. On Sunday, March 15, 2015, Jeremy McMillan > wrote: I am doing some SaltStack states at work, and I decided I will not write any more data size string parsing or formatting human readable memory or storage footprint demand/capacity. I'm tired of reinventing the wheel. I'm done. Well, I'm done with the first draft anyway. https://github.com/aphor/data_size There's a better than fair chance I will get to open source the SaltStack formula work too, which means I need to be kind about the dependency on this little data_size utility class, and that means publishing it on PyPI. Before it gets there, I sadly don't work in a Python shop, so I need to ask for help from you, the Python community, to review the code. For your effort, maybe you will be able to scratch your own itch with this wee snippet. If you've ever needed to compare two data allocations, or report on even one, I hope you will try it. Criticism, issues on GitHub, kudos, and especially pull requests are appreciated with gratitude. >From the README.md: There is support for metric and IEC units in both bits and bytes and nonstandard abbreviated IEC units (for legacy Java -Xmx). There is support for variable word-lengths, but because I thought it would get confusing, converting between two different word lengths is not supported. The word length constructor keyword argument will allow converting counts of weird (actually non-byte) word or symbol bit lengths to bit rates, which can then be explicitly converted to standard 8-bit bytes. The really sweet feature that everyone (now everybody's me!) should love is the Python 3 string.format() support! Help on method __format__ in module datasize.data_size: __format__(self, code) unbound datasize.__data_size__.data_size method formats as a decimal number, but recognizes data units as type format codes. Precision is ignored for integer multiples of the unit specified in the format code. format codes: a autoformat will choose a unit defaulting to the largest size with a quantity >= 1 (default) A abbreviated number of bytes (implied IEC units, and implied 'B' bytes suffix omitted) B bytes (1) kiB kibibytes (1024) kB kilobytes (1000) ... GiB Gibibytes (1024**3) GB Gigabytes (10**9) ... YiB Yobibytes (1024**8) YB Yottabytes (10**24) >>> from datasize import data_size >>> 'My new {0:GB} SSD really only stores {1:.2GiB} of data.'.format(data_size('750GB'),data_size(data_size('750GB') * 0.8)) 'My new 750GB SSD really only stores 558.79GiB of data.' >>> -- Brian Ray @brianray (773) 669-7717 _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago -- Brian Ray @brianray (773) 669-7717 _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago -- Carl K _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago From brian at imagescape.com Wed Mar 18 19:27:14 2015 From: brian at imagescape.com (Brian Moloney) Date: Wed, 18 Mar 2015 13:27:14 -0500 Subject: [Chicago] Chicago Djangonauts meetup next THURSDAY (3/26) at Grind (2 N. LaSalle) Message-ID: Hi Everyone. Thanks to Trent Jurewicz at Riot, we have secured a Loop location for this spring's Djangonauts meetup. It will be next Thursday, March 26th at 6:30pm at Grind, 2 N. LaSalle Street, 14th Floor. As of now, we have two short talks on the agenda, but it would be great for a longer one or a couple additional short ones. Doesn't have to be about Django specifically, just something that would be of interest to us Djangonauts. Please reply to the list if you have a topic you'd like to present. - Reusable Webapp Deployment Scripts, walkthrough and discussion by Trent Jurewicz - Formsets, Concurrent Edits and Uncaught Exceptions by Brad Martsberger I have a Facebook event page for RSVPing. Alternatively, you can visit chicagodjango.com and leave a RSVP on the contact form. https://www.facebook.com/events/407945816050702/ Thanks, Brian Moloney From greg at tablexi.com Wed Mar 18 21:46:44 2015 From: greg at tablexi.com (Greg Baugues) Date: Wed, 18 Mar 2015 15:46:44 -0500 Subject: [Chicago] Chicago Djangonauts meetup next THURSDAY (3/26) at Grind (2 N. LaSalle) In-Reply-To: References: Message-ID: If you still need a speaker, I can give a 30-45 minute talk on *How My Dog Sends Selfies *about writing Python on the Arduino Yun based on a series of tutorials I wrote here: Getting started on the Arduino Yun How to Build a Photobooth with Arduino and Dropbox Send SMS and MMS with the Arduino Yun It would also involve pictures of my dog. Here's a teaser: ? On Wed, Mar 18, 2015 at 1:27 PM, Brian Moloney wrote: > Hi Everyone. > > Thanks to Trent Jurewicz at Riot, we have secured a Loop location for > this spring's Djangonauts meetup. It will be next Thursday, March > 26th at 6:30pm at Grind, 2 N. LaSalle Street, 14th Floor. > > As of now, we have two short talks on the agenda, but it would be > great for a longer one or a couple additional short ones. Doesn't > have to be about Django specifically, just something that would be of > interest to us Djangonauts. Please reply to the list if you have a > topic you'd like to present. > > - Reusable Webapp Deployment Scripts, walkthrough and discussion by > Trent Jurewicz > - Formsets, Concurrent Edits and Uncaught Exceptions by Brad Martsberger > > I have a Facebook event page for RSVPing. Alternatively, you can > visit chicagodjango.com and leave a RSVP on the contact form. > > https://www.facebook.com/events/407945816050702/ > > > Thanks, > Brian Moloney > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -- Greg Baugues Director of Client Services Table XI Partners LLC Work: 312.450.6340 Mobile: 312.952.6796 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: kaira-puppy.jpg Type: image/jpeg Size: 37497 bytes Desc: not available URL: From d-lewit at neiu.edu Thu Mar 19 18:48:43 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Thu, 19 Mar 2015 12:48:43 -0500 Subject: [Chicago] Looking forward to this evening's event. Message-ID: Hey there fellow Python addicts, Well this is my first in-person Pythonistas meeting! I'm looking forward to meeting the other Chicagoland Python enthusiasts. I've played around with Python for a while, but haven't gotten too deeply into it.... at least not yet! Maybe some of you could point me in the right direction so that in a couple of years I'll be the world's greatest Python developer!!!! :-) On a more practical note, I'll be parking my car at Loyola University (north side of Chicago, near Devon & Sheridan) and then taking the red line and brown line trains to McCormick Place. (I'm a big chicken about parking in downtown Chicago. ) It would be great if someone could drive me back north after our meeting is over. Is anyone going that way? My cell # is 773-567-8999. Just send a text message if I don't answer. Please let me know. Thanks!!!! Hey Sheila.... how come Braintree at McCormick Place? How about choosing a place on the north side of Chicago?! Was that a big enough hint? ;-) Take care and I'm looking forward to the meeting this evening. Best, Douglas. P.S. My final group project in my computational biology class is on *phylogenetic analysis*. (We use a lot of Python in that course to implement various string-manipulation algorithms to analyze various combinations of "A", "T", "C", "G".... you know, the genetic nucleotide bases. ) I haven't got a clue about phylogenetic analysis!!!! If anyone out there in Python land can point me in the right direction, THANK YOU! The instructions for the assignment were rather vague and open-ended, just write a paper and give an oral presentation on the subject. However, phylogenetic analysis is a HUGE topic that can be approached from many angles, so I'm not quite sure what my professor expects. When spring break is over I'll have to ask her and get a few more details regarding her expectations. The Python part of the course is really fun! The biology part of the course is just downright painful!!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Thu Mar 19 23:12:47 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Thu, 19 Mar 2015 17:12:47 -0500 Subject: [Chicago] Oh well, can't attend this evening. Message-ID: Hey guys, Never got a reply to that last message, so I think it's safer not to show up tonight. I don't relish the idea of taking the train late in the evening in downtown Chicago. After getting gang mugged a person can get a little paranoid about those things! Just let me know if a similar meeting is scheduled for the north side of Chicago or northern suburbs at some point in the future. That would be great. And if anyone has information on using Python for phylogenetic analysis, please give me a heads up. That would be very helpful. Thank you. Best, Douglas. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at adamforsyth.net Fri Mar 20 01:16:41 2015 From: adam at adamforsyth.net (Adam Forsyth) Date: Thu, 19 Mar 2015 19:16:41 -0500 Subject: [Chicago] Cassandra Day Chicago 2015 Message-ID: Missing PyCon? Interested in Cassandra? Free on April 9th? DataStax has told me that one of their evangelists is a Python + Cassandra expert, and will be at the Chicago event next month. http://www.eventbrite.com/e/cassandra-day-chicago-2015-april-9th-2015-tickets-15053032024?aff=Meetup Cassandra Days are full day conferences designed to bring together beginner and expert Apache Cassandra users in an environment that fosters: beginner-level training, advanced use cases/tutorials, executive sessions, and networking. *Track 1 ? Technical ? Getting Started with Apache Cassandra (Beginner)* Audience Type: Beginner level Apache Cassandra users looking to learn the basics. Description: In this track, you?ll learn everything you need to get started with Apache Cassandra, including: Apache Cassandra + Java, Data Modeling 101, Diagnosing Problems in Production & Building Your First Application. *Track 2 ? Technical ? Deep Dive into Apache Cassandra and Use Cases (Intermediate to Advanced)* Audience Type: Intermediate to advanced level Apache Cassandra users who are in development and/or production. Description: In this track, you?ll learn intermediate to advanced Apache Cassandra topics, such as: Advanced Optimization of Your Apache Cassandra Cluster, Advanced Data Modeling, Combining Apache Cassandra with Other Technologies, and Real-World Technical Use Cases. *Track 3 ? Business ? Internet Enterprise Executive Track (Managers and Senior Level Decision Makers)* Audience Type: Managers and/or senior-level decision makers. Description: Join the Internet Enterprise Executive Track at Cassandra Days and learn about the business value of bringing new NoSQL technologies, such as Apache Cassandra, into your organization. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at adamforsyth.net Fri Mar 20 01:45:25 2015 From: adam at adamforsyth.net (Adam Forsyth) Date: Thu, 19 Mar 2015 19:45:25 -0500 Subject: [Chicago] April Meeting Canceled for PyCon & Mailing List for PyCon Attendees from Chicago Message-ID: Hi Everyone! The April meeting is canceled because it falls during PyCon again this year, and so may of us are attending. I've started a mailing list for people going to ChiPy from Chicago. To sign up, visit https://groups.google.com/forum/#!forum/pycon-2015-chicago or email pycon-2015-chicago+subscribe at googlegroups.com. To send an email to the group, it's pycon-2015-chicago at googlegroups.com. If you've got any questions, don't hesitate to ask! See you in Montreal, Adam & The ChiPy Organizers -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Fri Mar 20 19:33:24 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Fri, 20 Mar 2015 13:33:24 -0500 Subject: [Chicago] Suggestions on improving histogram in matplotlib? Message-ID: Hey there, I'm attaching my script (done in Python 3 but it should work almost the same in Python 2) and also a .png file that shows the resulting histogram. It looks really good! However, a couple of comments or criticisms. First off, if you look at my command *pyplot.title(.....)* you'll see that the title begins with "\n" (the newline character) but it doesn't cause an extra blank line above the title in my plot. Any suggestions? Or is that just a minor bug in matplotlib? Also, please note that the rectangles of the histogram are not squarely placed over the corresponding tickmarks, except when you get closer to the center of the histogram, around 11, 12, 13, 14, 15, 16, 17, 18, etc. But further out the rectangles appear toward the side of the corresponding tickmark. Again, I'm not sure if that's a true "bug" or maybe I'm just not interpreting the histogram properly or maybe that's how all histograms should be drawn! I really don't know, but if you have any suggestions please let me know. In case you're wondering, this is the problem of rolling 4 dice and recording their sums. So the smallest sum should be 4 (1 + 1 + 1 + 1) and the largest sum should be 24 (6 + 6 + 6 + 6). The sum of 14 is the most probable of all the sums, with a probability of close to 12%. The other sums are less probable, and the least probable sums of all are 4 and 24. The data look normally distributed with a mean of about 14, but I'm not sure about the variance and standard deviation. I didn't bother to compute those, but they are probably not that difficult to compute from the raw data generated by Python. The script won't work unless you have matplotlib as part of your Python installation! Matplotlib is pretty amazing, and produces graphics that are on par with Maple, Mathematica and Matlab. (Matplotlib's plots look very "Matlabby" to me. I'm not sure if that's a coincidence or if that was an intentional part of the design. What do you think? ) Okay, thanks! I appreciate any constructive suggestions on improving the histogram so that it has professional textbook quality. Best, Douglas Lewit -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Histogram4Dice.png Type: image/png Size: 64743 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Histogram4Dice.py Type: text/x-python-script Size: 924 bytes Desc: not available URL: From robkapteyn at gmail.com Fri Mar 20 23:13:09 2015 From: robkapteyn at gmail.com (Rob Kapteyn) Date: Fri, 20 Mar 2015 17:13:09 -0500 Subject: [Chicago] Suggestions on improving histogram in matplotlib? In-Reply-To: References: Message-ID: <550C9B75.5090501@gmail.com> On 03/20/2015 01:33 PM, Lewit, Douglas wrote: > (Matplotlib's plots look very "Matlabby" to me. I'm not sure if > that's a coincidence or if that was an intentional part of the > design. What do you think? ) Before he died, John Hunter gave presentations at ChiPy a couple of times. He said he deliberately mimicked the look of Matlab ;) -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Sat Mar 21 01:50:13 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Fri, 20 Mar 2015 19:50:13 -0500 Subject: [Chicago] Suggestions on improving histogram in matplotlib? In-Reply-To: <550C9B75.5090501@gmail.com> References: <550C9B75.5090501@gmail.com> Message-ID: Too bad about John Hunter. How did he pass? How old was he? I took a couple courses at IIT. While there I noticed that a lot of people mentioned Matlab and Python in the same sentence. I don't know enough about Matlab to make an intelligent comparison, but according to some of the "experts" that I've chatted with Matlab is really good at implementing some super complex numerical linear algebra algorithms on giant matrices (like 100,000 rows and 100,000 columns) in just a couple of seconds. I don't use Python to handle matrices that large, so I'm not really qualified to comment on that, but Python sure is fun to work with, and so far I think it has a much smoother learning curve than Java. On Fri, Mar 20, 2015 at 5:13 PM, Rob Kapteyn wrote: > On 03/20/2015 01:33 PM, Lewit, Douglas wrote: > > (Matplotlib's plots look very "Matlabby" to me. I'm not sure if that's a > coincidence or if that was an intentional part of the design. What do you > think? ) > > > Before he died, John Hunter gave presentations at ChiPy a couple of times. > He said he deliberately mimicked the look of Matlab ;) > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From MDiPierro at cs.depaul.edu Sat Mar 21 02:51:47 2015 From: MDiPierro at cs.depaul.edu (DiPierro, Massimo) Date: Sat, 21 Mar 2015 01:51:47 +0000 Subject: [Chicago] Suggestions on improving histogram in matplotlib? In-Reply-To: References: <550C9B75.5090501@gmail.com> Message-ID: <9A03DDB7-3855-4EC4-82DD-9A9620F82C64@cs.depaul.edu> Linear algebra operations on matrices larger than 100x100 make almost no sense because of large numerical errors, unless they are sparse. In Lattice QCD we even invert sparse matrices 10^9x 10^9 (not with Matlab). SciPy can do linear algebra with large sparse matrices http://docs.scipy.org/doc/scipy/reference/sparse.html . On Mar 20, 2015, at 7:50 PM, Lewit, Douglas > wrote: Too bad about John Hunter. How did he pass? How old was he? I took a couple courses at IIT. While there I noticed that a lot of people mentioned Matlab and Python in the same sentence. I don't know enough about Matlab to make an intelligent comparison, but according to some of the "experts" that I've chatted with Matlab is really good at implementing some super complex numerical linear algebra algorithms on giant matrices (like 100,000 rows and 100,000 columns) in just a couple of seconds. I don't use Python to handle matrices that large, so I'm not really qualified to comment on that, but Python sure is fun to work with, and so far I think it has a much smoother learning curve than Java. On Fri, Mar 20, 2015 at 5:13 PM, Rob Kapteyn > wrote: On 03/20/2015 01:33 PM, Lewit, Douglas wrote: (Matplotlib's plots look very "Matlabby" to me. I'm not sure if that's a coincidence or if that was an intentional part of the design. What do you think? ) Before he died, John Hunter gave presentations at ChiPy a couple of times. He said he deliberately mimicked the look of Matlab ;) _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago From tathagatadg at gmail.com Sat Mar 21 14:04:24 2015 From: tathagatadg at gmail.com (Tathagata Dasgupta) Date: Sat, 21 Mar 2015 08:04:24 -0500 Subject: [Chicago] Friendly Django Message-ID: Hello all, For those who are looking for some hands on, friendly lessons on with django, check out http://www.meetup.com/friendlydjango/ Thanks to Richard Cornish for organizing this! And Lane Campbell for informing me about it. They are looking for a TA for their upcoming meetup, so please reach out to Richard if you would like to help. Have a nice weekend ... -- Cheers, T -------------- next part -------------- An HTML attachment was scrubbed... URL: From randy7771026 at gmail.com Sat Mar 21 16:16:08 2015 From: randy7771026 at gmail.com (Randy Baxley) Date: Sat, 21 Mar 2015 10:16:08 -0500 Subject: [Chicago] Northside Chicago Pythonistas Message-ID: Thoughts prompted by Doug and ITKAN Chicago has a lot of strong people who overcome mental and physical limitations to produce a wonderful community. The Pythonistas do have a monthly meetup just blocks from the new NEIU campus. Most of that building is accessable. Room for improvement. Also room for improvement is considering public transit route to PS: One especially for those that must roll there all the way to the door and how they might roll there and roll in. Also meetings at either NEIU campus might be considered. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rnelsonchem at gmail.com Sat Mar 21 17:06:33 2015 From: rnelsonchem at gmail.com (Ryan Nelson) Date: Sat, 21 Mar 2015 12:06:33 -0400 Subject: [Chicago] Suggestions on improving histogram in matplotlib? Message-ID: Douglas, First of all, to answer you specific comments: * It is probably best not to use newline characters to move around the text like that. You can adjust the axes (plot area) to give the title more room. I couldn't reproduce your problem, though, so I can't comment directly on what you expected to see. * When you use an integer number to the hist bin keyword argument, you are not necessarily going to get bins that start exactly at integer values. You can however pass in a list (or array) of specific values that you want to use. (See below) Anyway, I rewrote your script in a different style. See attached. First of all, Numpy is your friend. It is installed with Matplotlib, so you already have it available. The dice roll calculation with Numpy is much faster and the code is simpler. Also, for various reasons, you should create your histogram as a separate function call, and probably as a first step. I've never passed an argument to the show function, but there might be some times when it is necessary. I also passed an align keyword argument to the histogram function to align the bins on top of the ticks. Hope that helps. The folks at the Matplotlib user email list are very helpful. Ryan Numpy is your friend here. > > > Message: 1 > Date: Fri, 20 Mar 2015 13:33:24 -0500 > From: "Lewit, Douglas" > To: The Chicago Python Users Group > Subject: [Chicago] Suggestions on improving histogram in matplotlib? > Message-ID: > < > CAPdZZGwuY7XPhwckv14Pj3FwLXsTpMyDjR9ocXGkENz4M+CVLw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hey there, > > I'm attaching my script (done in Python 3 but it should work almost the > same in Python 2) and also a .png file that shows the resulting histogram. > It looks really good! However, a couple of comments or criticisms. First > off, if you look at my command *pyplot.title(.....)* you'll see that the > title begins with "\n" (the newline character) but it doesn't cause an > extra blank line above the title in my plot. Any suggestions? Or is that > just a minor bug in matplotlib? > > Also, please note that the rectangles of the histogram are not squarely > placed over the corresponding tickmarks, except when you get closer to the > center of the histogram, around 11, 12, 13, 14, 15, 16, 17, 18, etc. But > further out the rectangles appear toward the side of the corresponding > tickmark. Again, I'm not sure if that's a true "bug" or maybe I'm just not > interpreting the histogram properly or maybe that's how all histograms > should be drawn! I really don't know, but if you have any suggestions > please let me know. > > In case you're wondering, this is the problem of rolling 4 dice and > recording their sums. So the smallest sum should be 4 (1 + 1 + 1 + 1) and > the largest sum should be 24 (6 + 6 + 6 + 6). The sum of 14 is the most > probable of all the sums, with a probability of close to 12%. The other > sums are less probable, and the least probable sums of all are 4 and 24. > The data look normally distributed with a mean of about 14, but I'm not > sure about the variance and standard deviation. I didn't bother to compute > those, but they are probably not that difficult to compute from the raw > data generated by Python. > > The script won't work unless you have matplotlib as part of your Python > installation! Matplotlib is pretty amazing, and produces graphics that are > on par with Maple, Mathematica and Matlab. (Matplotlib's plots look very > "Matlabby" to me. I'm not sure if that's a coincidence or if that was an > intentional part of the design. What do you think? ) > > Okay, thanks! I appreciate any constructive suggestions on improving the > histogram so that it has professional textbook quality. > > Best, > > Douglas Lewit > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dice2.py Type: text/x-python Size: 394 bytes Desc: not available URL: From d-lewit at neiu.edu Sat Mar 21 07:18:34 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sat, 21 Mar 2015 01:18:34 -0500 Subject: [Chicago] Suggestions on improving histogram in matplotlib? In-Reply-To: <9A03DDB7-3855-4EC4-82DD-9A9620F82C64@cs.depaul.edu> References: <550C9B75.5090501@gmail.com> <9A03DDB7-3855-4EC4-82DD-9A9620F82C64@cs.depaul.edu> Message-ID: I don't remember the name of the textbook, but I know for a fact that in numerical linear algebra (and other applications) one often does encounter really big matrices that are larger than 100 x 100. Some algorithms are indeed pretty numerically unstable. Gram-Schmidt is a good example of this. Other algorithms are fundamentally very stable, such as the Householder algorithm. (Householder does the same thing as Gram-Schmidt, but leads to much less roundoff error.) Determining the numerical stability or instability of an algorithm is a giant mess! It's really complicated, and I only know the basics of that. For one thing, computers are supposed to be better at addition and multiplication, and a little less efficient when it comes to subtraction and division, especially when it comes to subtracting and dividing quantities that are very close in value. For example, you can compute the first derivative using the following formula, (f(x2) - f(x1)) /(x2 - x1), where x2 and x1 are extremely close to each other in value. BUT if x2 and x1 are too close, then the computer thinks you're dividing by 0 and the program will raise an exception. That cutoff of "how close is too close" is the machine epsilon for the computer that you're working on, and I think it's a function of how many bytes are allocated for each number. (The more bytes, the better.) I think this is the real power of Fortran because with Fortran I think you can declare REALS (kind of like floats and doubles) that have a huge number of decimal places of accuracy. (I just messed around with Fortran for a couple of months, but was impressed with its speed and numerical precision.) >From what I've learned in linear algebra and numerical analysis courses is this.... if an algorithm has a lot of addition and multiplication in it, it's probably a safe bet to assume that it's stable and will converge. If the algorithm contains a lot of subtraction and division, it could be stable but there is the possibility of a lack of stability and lack of convergence. It's actually a really interesting field of research, and I think it's the crossroads of math and computation. Pretty fun stuff. Douglas. On Fri, Mar 20, 2015 at 8:51 PM, DiPierro, Massimo wrote: > Linear algebra operations on matrices larger than 100x100 make almost no > sense because of large numerical errors, unless they are sparse. In Lattice > QCD we even invert sparse matrices 10^9x 10^9 (not with Matlab). SciPy can > do linear algebra with large sparse matrices > http://docs.scipy.org/doc/scipy/reference/sparse.html . > > > On Mar 20, 2015, at 7:50 PM, Lewit, Douglas d-lewit at neiu.edu>> wrote: > > Too bad about John Hunter. How did he pass? How old was he? > > I took a couple courses at IIT. While there I noticed that a lot of > people mentioned Matlab and Python in the same sentence. I don't know > enough about Matlab to make an intelligent comparison, but according to > some of the "experts" that I've chatted with Matlab is really good at > implementing some super complex numerical linear algebra algorithms on > giant matrices (like 100,000 rows and 100,000 columns) in just a couple of > seconds. I don't use Python to handle matrices that large, so I'm not > really qualified to comment on that, but Python sure is fun to work with, > and so far I think it has a much smoother learning curve than Java. > > On Fri, Mar 20, 2015 at 5:13 PM, Rob Kapteyn robkapteyn at gmail.com>> wrote: > On 03/20/2015 01:33 PM, Lewit, Douglas wrote: > (Matplotlib's plots look very "Matlabby" to me. I'm not sure if that's a > coincidence or if that was an intentional part of the design. What do you > think? ) > > Before he died, John Hunter gave presentations at ChiPy a couple of times. > He said he deliberately mimicked the look of Matlab ;) > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Sat Mar 21 20:50:29 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sat, 21 Mar 2015 14:50:29 -0500 Subject: [Chicago] Suggestions on improving histogram in matplotlib? In-Reply-To: References: Message-ID: Very helpful! Thank you! Not sure why you couldn't reproduce my results. I tried Python versions 2 and 3, and both worked. Oh well. Thanks for mentioning the "align" keyword. I must try that out and see how that works. Numpy is great, thanks! And yes, I could probably use Numpy to simplify a lot of things. However, in the process of simplifying things I'm denying myself a programming education. Sometimes it's helpful to do things the hard way or the long way. In terms of production it may not make much sense, but in terms of education it may make all the sense in the world. For example, we're learning about Stacks right now in my Java class. We're creating our own Stack class based on our Node class. Of course this is really the long way of doing it because Java has its own builtin Stack class! Why reinvent the wheel? But I understand the professor's point of view. He wants us to become more conscious of what is happening under the hood, and that won't happen (or will happen very slowly) if we keep on taking shortcuts to solve problems. Sometimes I'm interested in just getting results, but sometimes I'm more interested in how the computer figured out those results. Does that make any sense? On Sat, Mar 21, 2015 at 11:06 AM, Ryan Nelson wrote: > Douglas, > > First of all, to answer you specific comments: > * It is probably best not to use newline characters to move around the > text like that. You can adjust the axes (plot area) to give the title more > room. I couldn't reproduce your problem, though, so I can't comment > directly on what you expected to see. > * When you use an integer number to the hist bin keyword argument, you are > not necessarily going to get bins that start exactly at integer values. You > can however pass in a list (or array) of specific values that you want to > use. (See below) > > Anyway, I rewrote your script in a different style. See attached. First of > all, Numpy is your friend. It is installed with Matplotlib, so you already > have it available. The dice roll calculation with Numpy is much faster and > the code is simpler. Also, for various reasons, you should create your > histogram as a separate function call, and probably as a first step. I've > never passed an argument to the show function, but there might be some > times when it is necessary. I also passed an align keyword argument to the > histogram function to align the bins on top of the ticks. > > Hope that helps. The folks at the Matplotlib user email list are very > helpful. > > Ryan > > Numpy is your friend here. > >> >> >> Message: 1 >> Date: Fri, 20 Mar 2015 13:33:24 -0500 >> From: "Lewit, Douglas" >> To: The Chicago Python Users Group >> Subject: [Chicago] Suggestions on improving histogram in matplotlib? >> Message-ID: >> < >> CAPdZZGwuY7XPhwckv14Pj3FwLXsTpMyDjR9ocXGkENz4M+CVLw at mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hey there, >> >> I'm attaching my script (done in Python 3 but it should work almost the >> same in Python 2) and also a .png file that shows the resulting histogram. >> It looks really good! However, a couple of comments or criticisms. First >> off, if you look at my command *pyplot.title(.....)* you'll see that the >> title begins with "\n" (the newline character) but it doesn't cause an >> extra blank line above the title in my plot. Any suggestions? Or is that >> just a minor bug in matplotlib? >> >> Also, please note that the rectangles of the histogram are not squarely >> placed over the corresponding tickmarks, except when you get closer to the >> center of the histogram, around 11, 12, 13, 14, 15, 16, 17, 18, etc. But >> further out the rectangles appear toward the side of the corresponding >> tickmark. Again, I'm not sure if that's a true "bug" or maybe I'm just >> not >> interpreting the histogram properly or maybe that's how all histograms >> should be drawn! I really don't know, but if you have any suggestions >> please let me know. >> >> In case you're wondering, this is the problem of rolling 4 dice and >> recording their sums. So the smallest sum should be 4 (1 + 1 + 1 + 1) and >> the largest sum should be 24 (6 + 6 + 6 + 6). The sum of 14 is the most >> probable of all the sums, with a probability of close to 12%. The other >> sums are less probable, and the least probable sums of all are 4 and 24. >> The data look normally distributed with a mean of about 14, but I'm not >> sure about the variance and standard deviation. I didn't bother to >> compute >> those, but they are probably not that difficult to compute from the raw >> data generated by Python. >> >> The script won't work unless you have matplotlib as part of your Python >> installation! Matplotlib is pretty amazing, and produces graphics that >> are >> on par with Maple, Mathematica and Matlab. (Matplotlib's plots look very >> "Matlabby" to me. I'm not sure if that's a coincidence or if that was an >> intentional part of the design. What do you think? ) >> >> Okay, thanks! I appreciate any constructive suggestions on improving the >> histogram so that it has professional textbook quality. >> >> Best, >> >> Douglas Lewit >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From proba at allstate.com Sat Mar 21 16:24:52 2015 From: proba at allstate.com (Robare, Phillip (Randstant)) Date: Sat, 21 Mar 2015 15:24:52 +0000 Subject: [Chicago] Suggestions on improving histogram in matplotlib? In-Reply-To: <9A03DDB7-3855-4EC4-82DD-9A9620F82C64@cs.depaul.edu> References: <550C9B75.5090501@gmail.com> <9A03DDB7-3855-4EC4-82DD-9A9620F82C64@cs.depaul.edu> Message-ID: <50869A74BA4F07468AD797C9BFF1FE3E04302D22@A0185-XPO1026-C.ad.allstate.com> For a brief bio, and some links to other articles on John Hunter, you can check his Wikipedia page (http://en.wikipedia.org/wiki/John_D._Hunter) Phil Robare probare at rcnchicago.com -----Original Message----- From: Chicago [mailto:chicago-bounces+proba=allstate.com at python.org] On Behalf Of DiPierro, Massimo Sent: Friday, March 20, 2015 8:52 PM To: The Chicago Python Users Group Subject: Re: [Chicago] Suggestions on improving histogram in matplotlib? Linear algebra operations on matrices larger than 100x100 make almost no sense because of large numerical errors, unless they are sparse. In Lattice QCD we even invert sparse matrices 10^9x 10^9 (not with Matlab). SciPy can do linear algebra with large sparse matrices http://docs.scipy.org/doc/scipy/reference/sparse.html . On Mar 20, 2015, at 7:50 PM, Lewit, Douglas > wrote: Too bad about John Hunter. How did he pass? How old was he? I took a couple courses at IIT. While there I noticed that a lot of people mentioned Matlab and Python in the same sentence. I don't know enough about Matlab to make an intelligent comparison, but according to some of the "experts" that I've chatted with Matlab is really good at implementing some super complex numerical linear algebra algorithms on giant matrices (like 100,000 rows and 100,000 columns) in just a couple of seconds. I don't use Python to handle matrices that large, so I'm not really qualified to comment on that, but Python sure is fun to work with, and so far I think it has a much smoother learning curve than Java. On Fri, Mar 20, 2015 at 5:13 PM, Rob Kapteyn > wrote: On 03/20/2015 01:33 PM, Lewit, Douglas wrote: (Matplotlib's plots look very "Matlabby" to me. I'm not sure if that's a coincidence or if that was an intentional part of the design. What do you think? ) Before he died, John Hunter gave presentations at ChiPy a couple of times. He said he deliberately mimicked the look of Matlab ;) _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago _______________________________________________ Chicago mailing list Chicago at python.org https://mail.python.org/mailman/listinfo/chicago From d-lewit at neiu.edu Mon Mar 23 07:49:58 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Mon, 23 Mar 2015 01:49:58 -0500 Subject: [Chicago] Can anyone explain this behavior in Java? Message-ID: Hey guys, I'm pretty impressed with Python's dictionary data structure, so I did some research and found out that Java has something equivalent called a "HashMap". (Is that the same as a hash table or lookup table? I guess it is.) I'm also interested in simulating games of chance, so I decided to write a couple programs to simulate the game of rolling four dice. (In statistics textbooks they always talk about rolling two dice, but that gets really boring after a while. Why not three or four dice, right?) If you roll four dice and record the sums, the sums can range from 4 (so you rolled all 1's) to 24 (which means you rolled all 6's). The domain or sample space for this problem thus includes all integers from 4 to 24, inclusive. But then you have to compute the probability values. I decided to compute empirical probabilities by creating a random object that simulates throwing a die. Pretty simple, right? I'm attaching two different but very closely related .java files. In one I just use an array to store the probabilities. In the other I use the Java version of a dictionary or "HashMap". Arrays are great, but with an array all the keys are sequentially ordered integers starting at 0. Well for this problem I don't want to start at 0; I want to start at 4, so it makes more sense to use some type of dictionary, right? Everything compiles and runs just great! That's not the problem. The problem is this. If you look at my program that uses a HashMap, check out the empirical probabilities. The final digits of the decimal are just screwed up! For example, let's say that I run my simulation 1,000,000 times, and in 1,000,000 throws of four dice I get a sum of 4 775 times, okay? So the probability for rolling a 4 should be 0.000775, right? When I use an array, that's exactly what I get. But with a HashMap I'm getting 0.0007750000775. ????? What the hell is that? I tried using *System.out.printf* and *System.out.format* but they don't work! I'm really at a loss. I just don't get it. It's not a big tragedy and the program still basically works, but I guess I'm disappointed because my first HashMap program has a bug in it! If anyone can shed light on this bug, hey, then please enlighten me cause I can't figure it out. Take it easy and thanks for the suggestions. Best, Douglas Lewit P.S. I can just hear someone out there saying, "Doug, throw Java away and just stick with Python!" While that is extremely tempting, right now that's not an option. I want to pass my Java course with at least a B! :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Roll4Dice.java Type: text/x-java Size: 1762 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Roll4Dice_.java Type: text/x-java Size: 2306 bytes Desc: not available URL: From diomedestydeus at gmail.com Mon Mar 23 13:39:57 2015 From: diomedestydeus at gmail.com (Philip Doctor) Date: Mon, 23 Mar 2015 07:39:57 -0500 Subject: [Chicago] Can anyone explain this behavior in Java? In-Reply-To: References: Message-ID: Doing your homework and learning how to code is a struggle every software professional needs to overcome. I won't be reading your source code, but a common problem among programmers is an "off by one" problem, where you started or stopped counting before you thought you did. Imagine you had an off by 1 problem for your 1000000 and divided 775 by 999999 instead... .000775000775 hmmm look familiar? You should look for where you start/stop counting and iteration in your code for bugs. *System.out.format* but they don't work If this sounds harsh I apologize. Yes, they work. They work, and are being used extensively in industry daily due to their reliable nature of working. When you're taking your first java class and encounter behavior you don't understand, it's an opportunity to learn something about java rather than blame java for not working. > Well for this problem I don't want to start at 0; I want to start at 4, so it makes more sense to use some type of dictionary, right? choosing a datastructure in trivial code doesn't really matter. In non-trivial code when you have a performance or memory goal, you can pick data structures based on their performance or memory usage (they differ greatly). Finding java hash maps is a good first step, next in your research you can try reading about when to use a hashmap vs an array. Most of the discussions will not revolve around API friendliness to the problem. Although in the spirit of Spinal Tap ("this one goes to 11!") you can just say that the first spot in an array in 4 and make 4 your first entry. Right? Best. On Mon, Mar 23, 2015 at 1:49 AM, Lewit, Douglas wrote: > Hey guys, > > I'm pretty impressed with Python's dictionary data structure, so I did > some research and found out that Java has something equivalent called a > "HashMap". (Is that the same as a hash table or lookup table? I guess it > is.) I'm also interested in simulating games of chance, so I decided to > write a couple programs to simulate the game of rolling four dice. (In > statistics textbooks they always talk about rolling two dice, but that gets > really boring after a while. Why not three or four dice, right?) If you > roll four dice and record the sums, the sums can range from 4 (so you > rolled all 1's) to 24 (which means you rolled all 6's). The domain or > sample space for this problem thus includes all integers from 4 to 24, > inclusive. But then you have to compute the probability values. I decided > to compute empirical probabilities by creating a random object that > simulates throwing a die. Pretty simple, right? > > I'm attaching two different but very closely related .java files. In one > I just use an array to store the probabilities. In the other I use the > Java version of a dictionary or "HashMap". Arrays are great, but with an > array all the keys are sequentially ordered integers starting at 0. Well > for this problem I don't want to start at 0; I want to start at 4, so it > makes more sense to use some type of dictionary, right? > > Everything compiles and runs just great! That's not the problem. The > problem is this. If you look at my program that uses a HashMap, check out > the empirical probabilities. The final digits of the decimal are just > screwed up! For example, let's say that I run my simulation 1,000,000 > times, and in 1,000,000 throws of four dice I get a sum of 4 775 times, > okay? So the probability for rolling a 4 should be 0.000775, right? When > I use an array, that's exactly what I get. But with a HashMap I'm getting > 0.0007750000775. ????? What the hell is that? I tried using > *System.out.printf* and *System.out.format* but they don't work! I'm > really at a loss. I just don't get it. It's not a big tragedy and the > program still basically works, but I guess I'm disappointed because my > first HashMap program has a bug in it! If anyone can shed light on this > bug, hey, then please enlighten me cause I can't figure it out. > > Take it easy and thanks for the suggestions. > > Best, > > Douglas Lewit > > P.S. I can just hear someone out there saying, "Doug, throw Java away and > just stick with Python!" While that is extremely tempting, right now > that's not an option. I want to pass my Java course with at least a B! > :-) > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeremy.mcmillan at gmail.com Mon Mar 23 13:43:52 2015 From: jeremy.mcmillan at gmail.com (Jeremy McMillan) Date: Mon, 23 Mar 2015 07:43:52 -0500 Subject: [Chicago] Can anyone explain this behavior in Java? In-Reply-To: References: Message-ID: Doug, don't throw away Java, but do abandon java questions on the Python mailing list. Might we suggest you inquire at an appropriate forum? Chicago Java Users Group (Chicago, IL) - Meetup Actually, I think your questions might get the best reception from http://stackoverflow.com/ Please repost there, and try to restrain your urges to post off topic. I want to help, but after not too many empirical trials the probability that I will discover something Python related to address in your posts gets vanishingly small, and I'm likely to skip them without reading them. That would be a waste, because you seem to spend a lot of time making them. Your right foot is itching, but you're scratching your left foot. On Mon, Mar 23, 2015 at 1:49 AM, Lewit, Douglas wrote: > Hey guys, > > I'm pretty impressed with Python's dictionary data structure, so I did > some research and found out that Java has something equivalent called a > "HashMap". (Is that the same as a hash table or lookup table? I guess it > is.) I'm also interested in simulating games of chance, so I decided to > write a couple programs to simulate the game of rolling four dice. (In > statistics textbooks they always talk about rolling two dice, but that gets > really boring after a while. Why not three or four dice, right?) If you > roll four dice and record the sums, the sums can range from 4 (so you > rolled all 1's) to 24 (which means you rolled all 6's). The domain or > sample space for this problem thus includes all integers from 4 to 24, > inclusive. But then you have to compute the probability values. I decided > to compute empirical probabilities by creating a random object that > simulates throwing a die. Pretty simple, right? > > I'm attaching two different but very closely related .java files. In one > I just use an array to store the probabilities. In the other I use the > Java version of a dictionary or "HashMap". Arrays are great, but with an > array all the keys are sequentially ordered integers starting at 0. Well > for this problem I don't want to start at 0; I want to start at 4, so it > makes more sense to use some type of dictionary, right? > > Everything compiles and runs just great! That's not the problem. The > problem is this. If you look at my program that uses a HashMap, check out > the empirical probabilities. The final digits of the decimal are just > screwed up! For example, let's say that I run my simulation 1,000,000 > times, and in 1,000,000 throws of four dice I get a sum of 4 775 times, > okay? So the probability for rolling a 4 should be 0.000775, right? When > I use an array, that's exactly what I get. But with a HashMap I'm getting > 0.0007750000775. ????? What the hell is that? I tried using > *System.out.printf* and *System.out.format* but they don't work! I'm > really at a loss. I just don't get it. It's not a big tragedy and the > program still basically works, but I guess I'm disappointed because my > first HashMap program has a bug in it! If anyone can shed light on this > bug, hey, then please enlighten me cause I can't figure it out. > > Take it easy and thanks for the suggestions. > > Best, > > Douglas Lewit > > P.S. I can just hear someone out there saying, "Doug, throw Java away and > just stick with Python!" While that is extremely tempting, right now > that's not an option. I want to pass my Java course with at least a B! > :-) > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Mon Mar 23 14:40:46 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Mon, 23 Mar 2015 08:40:46 -0500 Subject: [Chicago] Can anyone explain this behavior in Java? In-Reply-To: References: Message-ID: Hi Phillip, The "off by 1" sounds like a great suggestion, but the catch is this. My 1000,000 (or whatever number I enter) is *final*. Therefore the variable's value is not allowed to change during the program's execution. The variable's value shouldn't just magically change to 999,999, although that would explain a lot. I didn't say that *printf *and *format *didn't work! I just said that they didn't work for my specific output. I've used printf and format before, and yes, they work really well! But something "funny" is happening with my variables to cause this "off by 1" behavior that you're talking about. I will look into this further, and thanks for letting me know about it--or reminding me of this problem. Best, Douglas. P.S. This isn't really homework. It wasn't assigned. It's just something extra that I'm doing for my class. On Mon, Mar 23, 2015 at 7:39 AM, Philip Doctor wrote: > Doing your homework and learning how to code is a struggle every software > professional needs to overcome. > > I won't be reading your source code, but a common problem among > programmers is an "off by one" problem, where you started or stopped > counting before you thought you did. Imagine you had an off by 1 problem > for your 1000000 and divided 775 by 999999 instead... .000775000775 hmmm > look familiar? You should look for where you start/stop counting and > iteration in your code for bugs. > > *System.out.format* but they don't work > > If this sounds harsh I apologize. Yes, they work. They work, and are > being used extensively in industry daily due to their reliable nature of > working. When you're taking your first java class and encounter behavior > you don't understand, it's an opportunity to learn something about java > rather than blame java for not working. > > > Well for this problem I don't want to start at 0; I want to start at > 4, so it makes more sense to use some type of dictionary, right? > > choosing a datastructure in trivial code doesn't really matter. In > non-trivial code when you have a performance or memory goal, you can pick > data structures based on their performance or memory usage (they differ > greatly). Finding java hash maps is a good first step, next in your > research you can try reading about when to use a hashmap vs an array. Most > of the discussions will not revolve around API friendliness to the > problem. Although in the spirit of Spinal Tap ("this one goes to 11!") you > can just say that the first spot in an array in 4 and make 4 your first > entry. Right? > > Best. > > On Mon, Mar 23, 2015 at 1:49 AM, Lewit, Douglas wrote: > >> Hey guys, >> >> I'm pretty impressed with Python's dictionary data structure, so I did >> some research and found out that Java has something equivalent called a >> "HashMap". (Is that the same as a hash table or lookup table? I guess it >> is.) I'm also interested in simulating games of chance, so I decided to >> write a couple programs to simulate the game of rolling four dice. (In >> statistics textbooks they always talk about rolling two dice, but that gets >> really boring after a while. Why not three or four dice, right?) If you >> roll four dice and record the sums, the sums can range from 4 (so you >> rolled all 1's) to 24 (which means you rolled all 6's). The domain or >> sample space for this problem thus includes all integers from 4 to 24, >> inclusive. But then you have to compute the probability values. I decided >> to compute empirical probabilities by creating a random object that >> simulates throwing a die. Pretty simple, right? >> >> I'm attaching two different but very closely related .java files. In one >> I just use an array to store the probabilities. In the other I use the >> Java version of a dictionary or "HashMap". Arrays are great, but with an >> array all the keys are sequentially ordered integers starting at 0. Well >> for this problem I don't want to start at 0; I want to start at 4, so it >> makes more sense to use some type of dictionary, right? >> >> Everything compiles and runs just great! That's not the problem. The >> problem is this. If you look at my program that uses a HashMap, check out >> the empirical probabilities. The final digits of the decimal are just >> screwed up! For example, let's say that I run my simulation 1,000,000 >> times, and in 1,000,000 throws of four dice I get a sum of 4 775 times, >> okay? So the probability for rolling a 4 should be 0.000775, right? When >> I use an array, that's exactly what I get. But with a HashMap I'm getting >> 0.0007750000775. ????? What the hell is that? I tried using >> *System.out.printf* and *System.out.format* but they don't work! I'm >> really at a loss. I just don't get it. It's not a big tragedy and the >> program still basically works, but I guess I'm disappointed because my >> first HashMap program has a bug in it! If anyone can shed light on this >> bug, hey, then please enlighten me cause I can't figure it out. >> >> Take it easy and thanks for the suggestions. >> >> Best, >> >> Douglas Lewit >> >> P.S. I can just hear someone out there saying, "Doug, throw Java away >> and just stick with Python!" While that is extremely tempting, right now >> that's not an option. I want to pass my Java course with at least a B! >> :-) >> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Mon Mar 23 15:59:35 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Mon, 23 Mar 2015 09:59:35 -0500 Subject: [Chicago] Can anyone explain this behavior in Java? In-Reply-To: References: Message-ID: Not my left foot or right foot, it's my nose that's itching! ;-) I actually went over my program and printed out the intermediate values (values BEFORE any computation of the probability). Interestingly enough, all the values look just fine, so I'm still scratching my head on this one. My professor never replied to my email, so this is where I'll have to get a little aggressive and just corner him in his office during office hours. I actually contemplated sending my code to Oracle, but I'm sure I'll get a reply like, "Do you think this is Homework Central? Don't bother us with such trivia!!!" But hey, why not? Worst case scenario, they'll just ignore me. The only thing I found on Stack Overflow was something to the effect of "double division can produce roundoff errors", and that was a segue into the BigDecimal class. We'll see. In Python, this problem is very simple to do. In Java, even a simple walk in the park gets transformed into a Thanksgiving Day parade! On Mon, Mar 23, 2015 at 7:43 AM, Jeremy McMillan wrote: > Doug, don't throw away Java, but do abandon java questions on the Python > mailing list. > > Might we suggest you inquire at an appropriate forum? > > Chicago Java Users Group (Chicago, IL) - Meetup > > > Actually, I think your questions might get the best reception from > http://stackoverflow.com/ > > Please repost there, and try to restrain your urges to post off topic. I > want to help, but after not too many empirical trials the probability that > I will discover something Python related to address in your posts gets > vanishingly small, and I'm likely to skip them without reading them. That > would be a waste, because you seem to spend a lot of time making them. Your > right foot is itching, but you're scratching your left foot. > > On Mon, Mar 23, 2015 at 1:49 AM, Lewit, Douglas wrote: > >> Hey guys, >> >> I'm pretty impressed with Python's dictionary data structure, so I did >> some research and found out that Java has something equivalent called a >> "HashMap". (Is that the same as a hash table or lookup table? I guess it >> is.) I'm also interested in simulating games of chance, so I decided to >> write a couple programs to simulate the game of rolling four dice. (In >> statistics textbooks they always talk about rolling two dice, but that gets >> really boring after a while. Why not three or four dice, right?) If you >> roll four dice and record the sums, the sums can range from 4 (so you >> rolled all 1's) to 24 (which means you rolled all 6's). The domain or >> sample space for this problem thus includes all integers from 4 to 24, >> inclusive. But then you have to compute the probability values. I decided >> to compute empirical probabilities by creating a random object that >> simulates throwing a die. Pretty simple, right? >> >> I'm attaching two different but very closely related .java files. In one >> I just use an array to store the probabilities. In the other I use the >> Java version of a dictionary or "HashMap". Arrays are great, but with an >> array all the keys are sequentially ordered integers starting at 0. Well >> for this problem I don't want to start at 0; I want to start at 4, so it >> makes more sense to use some type of dictionary, right? >> >> Everything compiles and runs just great! That's not the problem. The >> problem is this. If you look at my program that uses a HashMap, check out >> the empirical probabilities. The final digits of the decimal are just >> screwed up! For example, let's say that I run my simulation 1,000,000 >> times, and in 1,000,000 throws of four dice I get a sum of 4 775 times, >> okay? So the probability for rolling a 4 should be 0.000775, right? When >> I use an array, that's exactly what I get. But with a HashMap I'm getting >> 0.0007750000775. ????? What the hell is that? I tried using >> *System.out.printf* and *System.out.format* but they don't work! I'm >> really at a loss. I just don't get it. It's not a big tragedy and the >> program still basically works, but I guess I'm disappointed because my >> first HashMap program has a bug in it! If anyone can shed light on this >> bug, hey, then please enlighten me cause I can't figure it out. >> >> Take it easy and thanks for the suggestions. >> >> Best, >> >> Douglas Lewit >> >> P.S. I can just hear someone out there saying, "Doug, throw Java away >> and just stick with Python!" While that is extremely tempting, right now >> that's not an option. I want to pass my Java course with at least a B! >> :-) >> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g at rre.tt Mon Mar 23 17:16:40 2015 From: g at rre.tt (Garrett Smith) Date: Mon, 23 Mar 2015 11:16:40 -0500 Subject: [Chicago] Can anyone explain this behavior in Java? In-Reply-To: References: Message-ID: You're not seeing a bug - this is expected behavior. http://floating-point-gui.de/ http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html On Mon, Mar 23, 2015 at 9:59 AM, Lewit, Douglas wrote: > Not my left foot or right foot, it's my nose that's itching! ;-) I > actually went over my program and printed out the intermediate values > (values BEFORE any computation of the probability). Interestingly enough, > all the values look just fine, so I'm still scratching my head on this one. > My professor never replied to my email, so this is where I'll have to get a > little aggressive and just corner him in his office during office hours. > > I actually contemplated sending my code to Oracle, but I'm sure I'll get a > reply like, "Do you think this is Homework Central? Don't bother us with > such trivia!!!" But hey, why not? Worst case scenario, they'll just ignore > me. > > The only thing I found on Stack Overflow was something to the effect of > "double division can produce roundoff errors", and that was a segue into the > BigDecimal class. We'll see. > > In Python, this problem is very simple to do. In Java, even a simple walk > in the park gets transformed into a Thanksgiving Day parade! > > On Mon, Mar 23, 2015 at 7:43 AM, Jeremy McMillan > wrote: >> >> Doug, don't throw away Java, but do abandon java questions on the Python >> mailing list. >> >> Might we suggest you inquire at an appropriate forum? >> >> Chicago Java Users Group (Chicago, IL) - Meetup >> >> >> Actually, I think your questions might get the best reception from >> http://stackoverflow.com/ >> >> Please repost there, and try to restrain your urges to post off topic. I >> want to help, but after not too many empirical trials the probability that I >> will discover something Python related to address in your posts gets >> vanishingly small, and I'm likely to skip them without reading them. That >> would be a waste, because you seem to spend a lot of time making them. Your >> right foot is itching, but you're scratching your left foot. >> >> On Mon, Mar 23, 2015 at 1:49 AM, Lewit, Douglas wrote: >>> >>> Hey guys, >>> >>> I'm pretty impressed with Python's dictionary data structure, so I did >>> some research and found out that Java has something equivalent called a >>> "HashMap". (Is that the same as a hash table or lookup table? I guess it >>> is.) I'm also interested in simulating games of chance, so I decided to >>> write a couple programs to simulate the game of rolling four dice. (In >>> statistics textbooks they always talk about rolling two dice, but that gets >>> really boring after a while. Why not three or four dice, right?) If you >>> roll four dice and record the sums, the sums can range from 4 (so you rolled >>> all 1's) to 24 (which means you rolled all 6's). The domain or sample space >>> for this problem thus includes all integers from 4 to 24, inclusive. But >>> then you have to compute the probability values. I decided to compute >>> empirical probabilities by creating a random object that simulates throwing >>> a die. Pretty simple, right? >>> >>> I'm attaching two different but very closely related .java files. In one >>> I just use an array to store the probabilities. In the other I use the Java >>> version of a dictionary or "HashMap". Arrays are great, but with an array >>> all the keys are sequentially ordered integers starting at 0. Well for this >>> problem I don't want to start at 0; I want to start at 4, so it makes more >>> sense to use some type of dictionary, right? >>> >>> Everything compiles and runs just great! That's not the problem. The >>> problem is this. If you look at my program that uses a HashMap, check out >>> the empirical probabilities. The final digits of the decimal are just >>> screwed up! For example, let's say that I run my simulation 1,000,000 >>> times, and in 1,000,000 throws of four dice I get a sum of 4 775 times, >>> okay? So the probability for rolling a 4 should be 0.000775, right? When I >>> use an array, that's exactly what I get. But with a HashMap I'm getting >>> 0.0007750000775. ????? What the hell is that? I tried using >>> System.out.printf and System.out.format but they don't work! I'm really at >>> a loss. I just don't get it. It's not a big tragedy and the program still >>> basically works, but I guess I'm disappointed because my first HashMap >>> program has a bug in it! If anyone can shed light on this bug, hey, then >>> please enlighten me cause I can't figure it out. >>> >>> Take it easy and thanks for the suggestions. >>> >>> Best, >>> >>> Douglas Lewit >>> >>> P.S. I can just hear someone out there saying, "Doug, throw Java away >>> and just stick with Python!" While that is extremely tempting, right now >>> that's not an option. I want to pass my Java course with at least a B! >>> :-) >>> >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > From diomedestydeus at gmail.com Mon Mar 23 17:42:05 2015 From: diomedestydeus at gmail.com (Philip Doctor) Date: Mon, 23 Mar 2015 11:42:05 -0500 Subject: [Chicago] Can anyone explain this behavior in Java? In-Reply-To: References: Message-ID: Unless you're doing a lot of repeated math on floats, I wouldn't expect a significant precision error here. hint: I finally looked at the code because this email chain made me grumpy, it's not a float error. It's just a bug in Douglas' code. On Mon, Mar 23, 2015 at 11:16 AM, Garrett Smith wrote: > You're not seeing a bug - this is expected behavior. > > http://floating-point-gui.de/ > > http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html > > On Mon, Mar 23, 2015 at 9:59 AM, Lewit, Douglas wrote: > > Not my left foot or right foot, it's my nose that's itching! ;-) I > > actually went over my program and printed out the intermediate values > > (values BEFORE any computation of the probability). Interestingly > enough, > > all the values look just fine, so I'm still scratching my head on this > one. > > My professor never replied to my email, so this is where I'll have to > get a > > little aggressive and just corner him in his office during office hours. > > > > I actually contemplated sending my code to Oracle, but I'm sure I'll get > a > > reply like, "Do you think this is Homework Central? Don't bother us with > > such trivia!!!" But hey, why not? Worst case scenario, they'll just > ignore > > me. > > > > The only thing I found on Stack Overflow was something to the effect of > > "double division can produce roundoff errors", and that was a segue into > the > > BigDecimal class. We'll see. > > > > In Python, this problem is very simple to do. In Java, even a simple > walk > > in the park gets transformed into a Thanksgiving Day parade! > > > > On Mon, Mar 23, 2015 at 7:43 AM, Jeremy McMillan < > jeremy.mcmillan at gmail.com> > > wrote: > >> > >> Doug, don't throw away Java, but do abandon java questions on the Python > >> mailing list. > >> > >> Might we suggest you inquire at an appropriate forum? > >> > >> Chicago Java Users Group (Chicago, IL) - Meetup > >> > >> > >> Actually, I think your questions might get the best reception from > >> http://stackoverflow.com/ > >> > >> Please repost there, and try to restrain your urges to post off topic. I > >> want to help, but after not too many empirical trials the probability > that I > >> will discover something Python related to address in your posts gets > >> vanishingly small, and I'm likely to skip them without reading them. > That > >> would be a waste, because you seem to spend a lot of time making them. > Your > >> right foot is itching, but you're scratching your left foot. > >> > >> On Mon, Mar 23, 2015 at 1:49 AM, Lewit, Douglas > wrote: > >>> > >>> Hey guys, > >>> > >>> I'm pretty impressed with Python's dictionary data structure, so I did > >>> some research and found out that Java has something equivalent called a > >>> "HashMap". (Is that the same as a hash table or lookup table? I > guess it > >>> is.) I'm also interested in simulating games of chance, so I decided > to > >>> write a couple programs to simulate the game of rolling four dice. (In > >>> statistics textbooks they always talk about rolling two dice, but that > gets > >>> really boring after a while. Why not three or four dice, right?) If > you > >>> roll four dice and record the sums, the sums can range from 4 (so you > rolled > >>> all 1's) to 24 (which means you rolled all 6's). The domain or sample > space > >>> for this problem thus includes all integers from 4 to 24, inclusive. > But > >>> then you have to compute the probability values. I decided to compute > >>> empirical probabilities by creating a random object that simulates > throwing > >>> a die. Pretty simple, right? > >>> > >>> I'm attaching two different but very closely related .java files. In > one > >>> I just use an array to store the probabilities. In the other I use > the Java > >>> version of a dictionary or "HashMap". Arrays are great, but with an > array > >>> all the keys are sequentially ordered integers starting at 0. Well > for this > >>> problem I don't want to start at 0; I want to start at 4, so it makes > more > >>> sense to use some type of dictionary, right? > >>> > >>> Everything compiles and runs just great! That's not the problem. The > >>> problem is this. If you look at my program that uses a HashMap, check > out > >>> the empirical probabilities. The final digits of the decimal are just > >>> screwed up! For example, let's say that I run my simulation 1,000,000 > >>> times, and in 1,000,000 throws of four dice I get a sum of 4 775 times, > >>> okay? So the probability for rolling a 4 should be 0.000775, right? > When I > >>> use an array, that's exactly what I get. But with a HashMap I'm > getting > >>> 0.0007750000775. ????? What the hell is that? I tried using > >>> System.out.printf and System.out.format but they don't work! I'm > really at > >>> a loss. I just don't get it. It's not a big tragedy and the program > still > >>> basically works, but I guess I'm disappointed because my first HashMap > >>> program has a bug in it! If anyone can shed light on this bug, hey, > then > >>> please enlighten me cause I can't figure it out. > >>> > >>> Take it easy and thanks for the suggestions. > >>> > >>> Best, > >>> > >>> Douglas Lewit > >>> > >>> P.S. I can just hear someone out there saying, "Doug, throw Java away > >>> and just stick with Python!" While that is extremely tempting, right > now > >>> that's not an option. I want to pass my Java course with at least a B! > >>> :-) > >>> > >>> > >>> _______________________________________________ > >>> Chicago mailing list > >>> Chicago at python.org > >>> https://mail.python.org/mailman/listinfo/chicago > >>> > >> > >> > >> _______________________________________________ > >> Chicago mailing list > >> Chicago at python.org > >> https://mail.python.org/mailman/listinfo/chicago > >> > > > > > > _______________________________________________ > > Chicago mailing list > > Chicago at python.org > > https://mail.python.org/mailman/listinfo/chicago > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -------------- next part -------------- An HTML attachment was scrubbed... URL: From don at drakeconsulting.com Mon Mar 23 18:58:57 2015 From: don at drakeconsulting.com (Don Drake) Date: Mon, 23 Mar 2015 12:58:57 -0500 Subject: [Chicago] Can anyone explain this behavior in Java? In-Reply-To: References: Message-ID: I?ll bite. It?s not a floating point issue (as it normally is), it?s that System.out.format does NOT output a new line character, so the two outputs appear on the same line. System.out.format( "\t\tEmpirical Probability: %12.10f", probability ); System.out.print( Probabilities.get(Int) ); -Don -- Don Drake www.drakeconsulting.com www.maillaunder.com 312-560-1574 800-733-2143 > On Mar 23, 2015, at 11:42 AM, Philip Doctor wrote: > > Unless you're doing a lot of repeated math on floats, I wouldn't expect a significant precision error here. > > hint: I finally looked at the code because this email chain made me grumpy, it's not a float error. It's just a bug in Douglas' code. > > > On Mon, Mar 23, 2015 at 11:16 AM, Garrett Smith > wrote: > You're not seeing a bug - this is expected behavior. > > http://floating-point-gui.de/ > > http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html > > On Mon, Mar 23, 2015 at 9:59 AM, Lewit, Douglas > wrote: > > Not my left foot or right foot, it's my nose that's itching! ;-) I > > actually went over my program and printed out the intermediate values > > (values BEFORE any computation of the probability). Interestingly enough, > > all the values look just fine, so I'm still scratching my head on this one. > > My professor never replied to my email, so this is where I'll have to get a > > little aggressive and just corner him in his office during office hours. > > > > I actually contemplated sending my code to Oracle, but I'm sure I'll get a > > reply like, "Do you think this is Homework Central? Don't bother us with > > such trivia!!!" But hey, why not? Worst case scenario, they'll just ignore > > me. > > > > The only thing I found on Stack Overflow was something to the effect of > > "double division can produce roundoff errors", and that was a segue into the > > BigDecimal class. We'll see. > > > > In Python, this problem is very simple to do. In Java, even a simple walk > > in the park gets transformed into a Thanksgiving Day parade! > > > > On Mon, Mar 23, 2015 at 7:43 AM, Jeremy McMillan > > > wrote: > >> > >> Doug, don't throw away Java, but do abandon java questions on the Python > >> mailing list. > >> > >> Might we suggest you inquire at an appropriate forum? > >> > >> Chicago Java Users Group (Chicago, IL) - Meetup > >> > >> > >> Actually, I think your questions might get the best reception from > >> http://stackoverflow.com/ > >> > >> Please repost there, and try to restrain your urges to post off topic. I > >> want to help, but after not too many empirical trials the probability that I > >> will discover something Python related to address in your posts gets > >> vanishingly small, and I'm likely to skip them without reading them. That > >> would be a waste, because you seem to spend a lot of time making them. Your > >> right foot is itching, but you're scratching your left foot. > >> > >> On Mon, Mar 23, 2015 at 1:49 AM, Lewit, Douglas > wrote: > >>> > >>> Hey guys, > >>> > >>> I'm pretty impressed with Python's dictionary data structure, so I did > >>> some research and found out that Java has something equivalent called a > >>> "HashMap". (Is that the same as a hash table or lookup table? I guess it > >>> is.) I'm also interested in simulating games of chance, so I decided to > >>> write a couple programs to simulate the game of rolling four dice. (In > >>> statistics textbooks they always talk about rolling two dice, but that gets > >>> really boring after a while. Why not three or four dice, right?) If you > >>> roll four dice and record the sums, the sums can range from 4 (so you rolled > >>> all 1's) to 24 (which means you rolled all 6's). The domain or sample space > >>> for this problem thus includes all integers from 4 to 24, inclusive. But > >>> then you have to compute the probability values. I decided to compute > >>> empirical probabilities by creating a random object that simulates throwing > >>> a die. Pretty simple, right? > >>> > >>> I'm attaching two different but very closely related .java files. In one > >>> I just use an array to store the probabilities. In the other I use the Java > >>> version of a dictionary or "HashMap". Arrays are great, but with an array > >>> all the keys are sequentially ordered integers starting at 0. Well for this > >>> problem I don't want to start at 0; I want to start at 4, so it makes more > >>> sense to use some type of dictionary, right? > >>> > >>> Everything compiles and runs just great! That's not the problem. The > >>> problem is this. If you look at my program that uses a HashMap, check out > >>> the empirical probabilities. The final digits of the decimal are just > >>> screwed up! For example, let's say that I run my simulation 1,000,000 > >>> times, and in 1,000,000 throws of four dice I get a sum of 4 775 times, > >>> okay? So the probability for rolling a 4 should be 0.000775, right? When I > >>> use an array, that's exactly what I get. But with a HashMap I'm getting > >>> 0.0007750000775. ????? What the hell is that? I tried using > >>> System.out.printf and System.out.format but they don't work! I'm really at > >>> a loss. I just don't get it. It's not a big tragedy and the program still > >>> basically works, but I guess I'm disappointed because my first HashMap > >>> program has a bug in it! If anyone can shed light on this bug, hey, then > >>> please enlighten me cause I can't figure it out. > >>> > >>> Take it easy and thanks for the suggestions. > >>> > >>> Best, > >>> > >>> Douglas Lewit > >>> > >>> P.S. I can just hear someone out there saying, "Doug, throw Java away > >>> and just stick with Python!" While that is extremely tempting, right now > >>> that's not an option. I want to pass my Java course with at least a B! > >>> :-) > >>> > >>> > >>> _______________________________________________ > >>> Chicago mailing list > >>> Chicago at python.org > >>> https://mail.python.org/mailman/listinfo/chicago > >>> > >> > >> > >> _______________________________________________ > >> Chicago mailing list > >> Chicago at python.org > >> https://mail.python.org/mailman/listinfo/chicago > >> > > > > > > _______________________________________________ > > Chicago mailing list > > Chicago at python.org > > https://mail.python.org/mailman/listinfo/chicago > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago -------------- next part -------------- An HTML attachment was scrubbed... URL: From amerz at rmitechnologies.net Mon Mar 23 18:42:21 2015 From: amerz at rmitechnologies.net (andrew) Date: Mon, 23 Mar 2015 12:42:21 -0500 Subject: [Chicago] Chicago region opportunity! -- Deerfield, IL Message-ID: <055501d06590$b8fd5310$2af7f930$@rmitechnologies.net> WEB DEVELOPER (Python, HTML, CSS, jQuery, JavaScript) will develop the next-generation of this company's proprietary software for collaboration and productivity tools. CNN Headline News said this company's CPM application may be "the most sophisticated business-to-business Internet-based application in the world." Requirements: Python, good experience with SQL, and able to do front end and back end development (Python, HTML, CSS, jQuery, JavaScript). . A minimum of 3 years of GUI or server side web-application Python software development experience -or-- if NO experience with Python - a willingness to jump in and learn Python will be considered! . Understanding of object oriented concepts, using formal development methods. (Experience with agile/test driven methodologies a plus). . Developing robust, secure, complex, scalable, high volume, commercial-grade web applications. . Some database programming with PostgreSQL or SQLAlchemy. . Financial and business workflow development experience. . Expertise with all phases of the software development lifecycle, including requirements analysis, design, coding, testing, implementation, and support. . Working in a collaborative team environment; Verbal and written skills. Desired Experience: . Behavior Driven Development . Architecture and systems development . Application development experience using Linux, Apache, Webware, SQLObject, Reportlab technologies . Business Process focused systems is a plus. Location: Deerfield, IL Company will not sponsor at this time. Salary is open. We will pay $1,000 referral fee. Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 119460 bytes Desc: not available URL: From d-lewit at neiu.edu Mon Mar 23 19:10:19 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Mon, 23 Mar 2015 13:10:19 -0500 Subject: [Chicago] Can anyone explain this behavior in Java? In-Reply-To: References: Message-ID: I'll buy you a beer if you tell me what the bug is.....??? My program's output is making *me* grumpy! Is it the line where I do something like this: IntegerType.doubleValue( ) I thought that's kosher..... I mean, the doubleValue( ) method converts the int attribute of the Integer to its equivalent double value? Or.... maybe my System.out.printf or System.out.format lines are messed up. Oh well.... time to give up programming and think about a career in politics. I mean.... how smart do you have to be to become a great politician? :-) Now, about that beer! Which is your favorite? On Mon, Mar 23, 2015 at 11:42 AM, Philip Doctor wrote: > Unless you're doing a lot of repeated math on floats, I wouldn't expect a > significant precision error here. > > hint: I finally looked at the code because this email chain made me > grumpy, it's not a float error. It's just a bug in Douglas' code. > > > On Mon, Mar 23, 2015 at 11:16 AM, Garrett Smith wrote: > >> You're not seeing a bug - this is expected behavior. >> >> http://floating-point-gui.de/ >> >> http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html >> >> On Mon, Mar 23, 2015 at 9:59 AM, Lewit, Douglas wrote: >> > Not my left foot or right foot, it's my nose that's itching! ;-) I >> > actually went over my program and printed out the intermediate values >> > (values BEFORE any computation of the probability). Interestingly >> enough, >> > all the values look just fine, so I'm still scratching my head on this >> one. >> > My professor never replied to my email, so this is where I'll have to >> get a >> > little aggressive and just corner him in his office during office hours. >> > >> > I actually contemplated sending my code to Oracle, but I'm sure I'll >> get a >> > reply like, "Do you think this is Homework Central? Don't bother us >> with >> > such trivia!!!" But hey, why not? Worst case scenario, they'll just >> ignore >> > me. >> > >> > The only thing I found on Stack Overflow was something to the effect of >> > "double division can produce roundoff errors", and that was a segue >> into the >> > BigDecimal class. We'll see. >> > >> > In Python, this problem is very simple to do. In Java, even a simple >> walk >> > in the park gets transformed into a Thanksgiving Day parade! >> > >> > On Mon, Mar 23, 2015 at 7:43 AM, Jeremy McMillan < >> jeremy.mcmillan at gmail.com> >> > wrote: >> >> >> >> Doug, don't throw away Java, but do abandon java questions on the >> Python >> >> mailing list. >> >> >> >> Might we suggest you inquire at an appropriate forum? >> >> >> >> Chicago Java Users Group (Chicago, IL) - Meetup >> >> >> >> >> >> Actually, I think your questions might get the best reception from >> >> http://stackoverflow.com/ >> >> >> >> Please repost there, and try to restrain your urges to post off topic. >> I >> >> want to help, but after not too many empirical trials the probability >> that I >> >> will discover something Python related to address in your posts gets >> >> vanishingly small, and I'm likely to skip them without reading them. >> That >> >> would be a waste, because you seem to spend a lot of time making them. >> Your >> >> right foot is itching, but you're scratching your left foot. >> >> >> >> On Mon, Mar 23, 2015 at 1:49 AM, Lewit, Douglas >> wrote: >> >>> >> >>> Hey guys, >> >>> >> >>> I'm pretty impressed with Python's dictionary data structure, so I did >> >>> some research and found out that Java has something equivalent called >> a >> >>> "HashMap". (Is that the same as a hash table or lookup table? I >> guess it >> >>> is.) I'm also interested in simulating games of chance, so I decided >> to >> >>> write a couple programs to simulate the game of rolling four dice. >> (In >> >>> statistics textbooks they always talk about rolling two dice, but >> that gets >> >>> really boring after a while. Why not three or four dice, right?) If >> you >> >>> roll four dice and record the sums, the sums can range from 4 (so you >> rolled >> >>> all 1's) to 24 (which means you rolled all 6's). The domain or >> sample space >> >>> for this problem thus includes all integers from 4 to 24, inclusive. >> But >> >>> then you have to compute the probability values. I decided to compute >> >>> empirical probabilities by creating a random object that simulates >> throwing >> >>> a die. Pretty simple, right? >> >>> >> >>> I'm attaching two different but very closely related .java files. In >> one >> >>> I just use an array to store the probabilities. In the other I use >> the Java >> >>> version of a dictionary or "HashMap". Arrays are great, but with an >> array >> >>> all the keys are sequentially ordered integers starting at 0. Well >> for this >> >>> problem I don't want to start at 0; I want to start at 4, so it makes >> more >> >>> sense to use some type of dictionary, right? >> >>> >> >>> Everything compiles and runs just great! That's not the problem. The >> >>> problem is this. If you look at my program that uses a HashMap, >> check out >> >>> the empirical probabilities. The final digits of the decimal are just >> >>> screwed up! For example, let's say that I run my simulation 1,000,000 >> >>> times, and in 1,000,000 throws of four dice I get a sum of 4 775 >> times, >> >>> okay? So the probability for rolling a 4 should be 0.000775, right? >> When I >> >>> use an array, that's exactly what I get. But with a HashMap I'm >> getting >> >>> 0.0007750000775. ????? What the hell is that? I tried using >> >>> System.out.printf and System.out.format but they don't work! I'm >> really at >> >>> a loss. I just don't get it. It's not a big tragedy and the program >> still >> >>> basically works, but I guess I'm disappointed because my first HashMap >> >>> program has a bug in it! If anyone can shed light on this bug, hey, >> then >> >>> please enlighten me cause I can't figure it out. >> >>> >> >>> Take it easy and thanks for the suggestions. >> >>> >> >>> Best, >> >>> >> >>> Douglas Lewit >> >>> >> >>> P.S. I can just hear someone out there saying, "Doug, throw Java away >> >>> and just stick with Python!" While that is extremely tempting, right >> now >> >>> that's not an option. I want to pass my Java course with at least a >> B! >> >>> :-) >> >>> >> >>> >> >>> _______________________________________________ >> >>> Chicago mailing list >> >>> Chicago at python.org >> >>> https://mail.python.org/mailman/listinfo/chicago >> >>> >> >> >> >> >> >> _______________________________________________ >> >> Chicago mailing list >> >> Chicago at python.org >> >> https://mail.python.org/mailman/listinfo/chicago >> >> >> > >> > >> > _______________________________________________ >> > Chicago mailing list >> > Chicago at python.org >> > https://mail.python.org/mailman/listinfo/chicago >> > >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Mon Mar 23 20:46:13 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Mon, 23 Mar 2015 14:46:13 -0500 Subject: [Chicago] Can anyone explain this behavior in Java? In-Reply-To: References: Message-ID: Oh my god, thank you so much!!!!!! That was unbelievably simple. I don't know why I overlooked such a stupid mistake. I just deleted that line and now the output is exactly as it should be. I was just throwing an extra line in there, and why??? Oh well..... am I the only programmer who has these problems? Sometimes the simplest and easiest bugs are the hardest to find. Maybe I was just overthinking the problem. Oh well. Thanks for the help Don. If I sell my code to a big casino in Las Vegas for a million dollars, I'll give you a cut since you were so helpful! And I also owe you a beer!!!! Oh wait a moment, the trend now is toward free software and open source. Well forget about selling my code to that casino in Las Vegas. They can get it for free! ;-) Thanks for your help. I just can't believe I overlooked something so simple!!!!!! Okay, I feel retarded right now! :-) On Mon, Mar 23, 2015 at 12:58 PM, Don Drake wrote: > > I?ll bite. It?s not a floating point issue (as it normally is), it?s that > System.out.format does NOT output a new line character, so the two outputs > appear on the same line. > > > System.out.format( "\t\tEmpirical Probability: %12.10f", > probability ); > > System.out.print( Probabilities.get(Int) ); > > > -Don > > -- > Don Drake > www.drakeconsulting.com > www.maillaunder.com > 312-560-1574 > 800-733-2143 > > On Mar 23, 2015, at 11:42 AM, Philip Doctor > wrote: > > Unless you're doing a lot of repeated math on floats, I wouldn't expect a > significant precision error here. > > hint: I finally looked at the code because this email chain made me > grumpy, it's not a float error. It's just a bug in Douglas' code. > > > On Mon, Mar 23, 2015 at 11:16 AM, Garrett Smith wrote: > >> You're not seeing a bug - this is expected behavior. >> >> http://floating-point-gui.de/ >> >> http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html >> >> On Mon, Mar 23, 2015 at 9:59 AM, Lewit, Douglas wrote: >> > Not my left foot or right foot, it's my nose that's itching! ;-) I >> > actually went over my program and printed out the intermediate values >> > (values BEFORE any computation of the probability). Interestingly >> enough, >> > all the values look just fine, so I'm still scratching my head on this >> one. >> > My professor never replied to my email, so this is where I'll have to >> get a >> > little aggressive and just corner him in his office during office hours. >> > >> > I actually contemplated sending my code to Oracle, but I'm sure I'll >> get a >> > reply like, "Do you think this is Homework Central? Don't bother us >> with >> > such trivia!!!" But hey, why not? Worst case scenario, they'll just >> ignore >> > me. >> > >> > The only thing I found on Stack Overflow was something to the effect of >> > "double division can produce roundoff errors", and that was a segue >> into the >> > BigDecimal class. We'll see. >> > >> > In Python, this problem is very simple to do. In Java, even a simple >> walk >> > in the park gets transformed into a Thanksgiving Day parade! >> > >> > On Mon, Mar 23, 2015 at 7:43 AM, Jeremy McMillan < >> jeremy.mcmillan at gmail.com> >> > wrote: >> >> >> >> Doug, don't throw away Java, but do abandon java questions on the >> Python >> >> mailing list. >> >> >> >> Might we suggest you inquire at an appropriate forum? >> >> >> >> Chicago Java Users Group (Chicago, IL) - Meetup >> >> >> >> >> >> Actually, I think your questions might get the best reception from >> >> http://stackoverflow.com/ >> >> >> >> Please repost there, and try to restrain your urges to post off topic. >> I >> >> want to help, but after not too many empirical trials the probability >> that I >> >> will discover something Python related to address in your posts gets >> >> vanishingly small, and I'm likely to skip them without reading them. >> That >> >> would be a waste, because you seem to spend a lot of time making them. >> Your >> >> right foot is itching, but you're scratching your left foot. >> >> >> >> On Mon, Mar 23, 2015 at 1:49 AM, Lewit, Douglas >> wrote: >> >>> >> >>> Hey guys, >> >>> >> >>> I'm pretty impressed with Python's dictionary data structure, so I did >> >>> some research and found out that Java has something equivalent called >> a >> >>> "HashMap". (Is that the same as a hash table or lookup table? I >> guess it >> >>> is.) I'm also interested in simulating games of chance, so I decided >> to >> >>> write a couple programs to simulate the game of rolling four dice. >> (In >> >>> statistics textbooks they always talk about rolling two dice, but >> that gets >> >>> really boring after a while. Why not three or four dice, right?) If >> you >> >>> roll four dice and record the sums, the sums can range from 4 (so you >> rolled >> >>> all 1's) to 24 (which means you rolled all 6's). The domain or >> sample space >> >>> for this problem thus includes all integers from 4 to 24, inclusive. >> But >> >>> then you have to compute the probability values. I decided to compute >> >>> empirical probabilities by creating a random object that simulates >> throwing >> >>> a die. Pretty simple, right? >> >>> >> >>> I'm attaching two different but very closely related .java files. In >> one >> >>> I just use an array to store the probabilities. In the other I use >> the Java >> >>> version of a dictionary or "HashMap". Arrays are great, but with an >> array >> >>> all the keys are sequentially ordered integers starting at 0. Well >> for this >> >>> problem I don't want to start at 0; I want to start at 4, so it makes >> more >> >>> sense to use some type of dictionary, right? >> >>> >> >>> Everything compiles and runs just great! That's not the problem. The >> >>> problem is this. If you look at my program that uses a HashMap, >> check out >> >>> the empirical probabilities. The final digits of the decimal are just >> >>> screwed up! For example, let's say that I run my simulation 1,000,000 >> >>> times, and in 1,000,000 throws of four dice I get a sum of 4 775 >> times, >> >>> okay? So the probability for rolling a 4 should be 0.000775, right? >> When I >> >>> use an array, that's exactly what I get. But with a HashMap I'm >> getting >> >>> 0.0007750000775. ????? What the hell is that? I tried using >> >>> System.out.printf and System.out.format but they don't work! I'm >> really at >> >>> a loss. I just don't get it. It's not a big tragedy and the program >> still >> >>> basically works, but I guess I'm disappointed because my first HashMap >> >>> program has a bug in it! If anyone can shed light on this bug, hey, >> then >> >>> please enlighten me cause I can't figure it out. >> >>> >> >>> Take it easy and thanks for the suggestions. >> >>> >> >>> Best, >> >>> >> >>> Douglas Lewit >> >>> >> >>> P.S. I can just hear someone out there saying, "Doug, throw Java away >> >>> and just stick with Python!" While that is extremely tempting, right >> now >> >>> that's not an option. I want to pass my Java course with at least a >> B! >> >>> :-) >> >>> >> >>> >> >>> _______________________________________________ >> >>> Chicago mailing list >> >>> Chicago at python.org >> >>> https://mail.python.org/mailman/listinfo/chicago >> >>> >> >> >> >> >> >> _______________________________________________ >> >> Chicago mailing list >> >> Chicago at python.org >> >> https://mail.python.org/mailman/listinfo/chicago >> >> >> > >> > >> > _______________________________________________ >> > Chicago mailing list >> > Chicago at python.org >> > https://mail.python.org/mailman/listinfo/chicago >> > >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeremy.mcmillan at gmail.com Mon Mar 23 21:30:07 2015 From: jeremy.mcmillan at gmail.com (Jeremy McMillan) Date: Mon, 23 Mar 2015 15:30:07 -0500 Subject: [Chicago] hark! datasize.data_size class for understanding data_size('2TiB') > data_size('2TB') In-Reply-To: References: Message-ID: Thanks for that link. That module (python-measurement) is awesome for continuous values because it bases off float base type. I have a strong opinion that data sizes are always integers. Measuring units of data are kind-of special in that respect. Basically, I wanted a class that I could use to handle '45MiB' like an integer value, and I wanted to extend the format() behavior to support different units. The goal was a safe class that allows code about data allocations to read more naturally. On Tue, Mar 17, 2015 at 8:36 PM, Carl Karsten wrote: > I only 1/2 understand your problem, and I only half understand what this > does,. > and I half think I saw this at a PyOhio lightning talk that I can't find > now. > > https://readthedocs.org/projects/python-measurement/ > > Maybe some of this is useful. > > > On Tue, Mar 17, 2015 at 8:35 AM, Jeremy McMillan < > jeremy.mcmillan at gmail.com> wrote: > >> Not really. I'm concerned about accumulated rounding errors. It's >> something I haven't completely thought through yet. >> >> Also I remember vaguely that I had trouble using string format with >> decimals, but that may have been a long time ago. It seems more correct >> than floats, but I'll need to think hard about a test case. >> >> On Mon, Mar 16, 2015 at 8:51 PM, Brian Ray wrote: >> >>> Are you talking about the complexity >>> of floating >>> point numbers? >>> >>> I am guessing for consistency you might want is: >>> >>> int(round(some_float)) >>> >>> and >>> >>> float(some_int) >>> >>> However, I am not entirely sure this solves all problems. You may want >>> to do decimal math >>> instead of floating point. >>> >>> >>> >>> >>> >>> On Mon, Mar 16, 2015 at 5:08 PM, Jeremy McMillan < >>> jeremy.mcmillan at gmail.com> wrote: >>> >>>> That's pretty much it, except subclassing immutable base types requires >>>> splitting the constructor work between __init__() and __new__(). >>>> >>>> Yeah, unit tests are good. I should add some coverage. Aside from >>>> asserting some deterministic values, I'm uneasy about converting back and >>>> forth between int and float values. What's the best way to cover that? >>>> On Mar 16, 2015 4:49 PM, "Brian Ray" wrote: >>>> >>>>> Very cool, so you subclass int and overwrite __format__ if i read >>>>> correctly? I would recommend writing some unit tests. >>>>> >>>>> >>>>> >>>>> On Sunday, March 15, 2015, Jeremy McMillan >>>>> wrote: >>>>> >>>>>> I am doing some SaltStack states at work, and I decided I will not >>>>>> write any more data size string parsing or formatting human readable memory >>>>>> or storage footprint demand/capacity. I'm tired of reinventing the wheel. >>>>>> >>>>>> I'm done. >>>>>> >>>>>> Well, I'm done with the first draft anyway. >>>>>> >>>>>> https://github.com/aphor/data_size >>>>>> >>>>>> There's a better than fair chance I will get to open source the >>>>>> SaltStack formula work too, which means I need to be kind about the >>>>>> dependency on this little data_size utility class, and that means >>>>>> publishing it on PyPI. Before it gets there, I sadly don't work in a Python >>>>>> shop, so I need to ask for help from you, the Python community, to review >>>>>> the code. For your effort, maybe you will be able to scratch your own itch >>>>>> with this wee snippet. >>>>>> >>>>>> If you've ever needed to compare two data allocations, or report on >>>>>> even one, I hope you will try it. Criticism, issues on GitHub, kudos, and >>>>>> especially pull requests are appreciated with gratitude. >>>>>> >>>>>> From the README.md: >>>>>> >>>>>> There is support for metric and IEC units in both bits and bytes and >>>>>> nonstandard abbreviated IEC units (for legacy Java -Xmx). There is support >>>>>> for variable word-lengths, but because I thought it would get confusing, >>>>>> converting between two different word lengths is not supported. The word >>>>>> length constructor keyword argument will allow converting counts of weird >>>>>> (actually non-byte) word or symbol bit lengths to bit rates, which can then >>>>>> be explicitly converted to standard 8-bit bytes. >>>>>> >>>>>> The really sweet feature that everyone (now everybody's me!) should >>>>>> love is the Python 3 string.format() support! >>>>>> >>>>>> Help on method __format__ in module datasize.data_size: >>>>>> >>>>>> __format__(self, code) unbound datasize.__data_size__.data_size method >>>>>> formats as a decimal number, but recognizes data units as type format codes. >>>>>> Precision is ignored for integer multiples of the unit specified in the format code. >>>>>> format codes: >>>>>> a autoformat will choose a unit defaulting to the largest >>>>>> size with a quantity >= 1 (default) >>>>>> A abbreviated number of bytes (implied IEC units, and implied 'B' bytes suffix omitted) >>>>>> B bytes (1) >>>>>> kiB kibibytes (1024) >>>>>> kB kilobytes (1000) >>>>>> ... >>>>>> GiB Gibibytes (1024**3) >>>>>> GB Gigabytes (10**9) >>>>>> ... >>>>>> YiB Yobibytes (1024**8) >>>>>> YB Yottabytes (10**24) >>>>>> >>>>>> >>> from datasize import data_size >>>>>> >>> 'My new {0:GB} SSD really only stores {1:.2GiB} of data.'.format(data_size('750GB'),data_size(data_size('750GB') * 0.8)) >>>>>> 'My new 750GB SSD really only stores 558.79GiB of data.' >>>>>> >>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> -- >>>>> Brian Ray >>>>> @brianray >>>>> (773) 669-7717 >>>>> >>>>> >>>>> _______________________________________________ >>>>> Chicago mailing list >>>>> Chicago at python.org >>>>> https://mail.python.org/mailman/listinfo/chicago >>>>> >>>>> >>>> _______________________________________________ >>>> Chicago mailing list >>>> Chicago at python.org >>>> https://mail.python.org/mailman/listinfo/chicago >>>> >>>> >>> >>> >>> -- >>> Brian Ray >>> @brianray >>> (773) 669-7717 >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >>> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > > -- > Carl K > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From randy7771026 at gmail.com Tue Mar 24 15:30:37 2015 From: randy7771026 at gmail.com (Randy Baxley) Date: Tue, 24 Mar 2015 09:30:37 -0500 Subject: [Chicago] Users and Programmers Message-ID: I have always thought we are all users, program designers and project managers. We play these roles for varying amounts of time from moments to... http://www.pgbovine.net/two-cultures-of-computing.htm How dare I cross post. There are actually four or five other groups I could have added and it pains me that we are all so NIH, not invented here. -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at imagescape.com Tue Mar 24 18:11:57 2015 From: brian at imagescape.com (Brian Moloney) Date: Tue, 24 Mar 2015 12:11:57 -0500 Subject: [Chicago] Chicago Djangonauts meetup THIS THURSDAY Message-ID: 6:30pm @ Grind 2 N. LaSalle St. Space provided by Riot Food and drink provided by Imaginary Landscape Agenda "Reusable Webapp Deployment Scripts" a quick demo followed by discussion on packaging apps for repeatable deployment in differing environments by Trent Jurewicz "Formsets, Concurrent Edits and Uncaught Exceptions" a lightning talk about fixing three separate bugs in the Django codebase with the same root cause by Brad Martsberger "How my Dog Sends Selfies" a presentation about writing Python on the Arduina Yun by Greg Baugues RSVP https://www.facebook.com/events/407945816050702/ Alternate RSVP Contact form on http://chicagodjango.com Hope to see everyone there! Brian __ Brian J. Moloney President & CEO Imaginary Landscape, LLC Web Design | Development | Strategy (877) 275-9144 toll free http://chicagodjango.com http://imagescape.com From amerz at rmitechnologies.net Wed Mar 25 17:16:21 2015 From: amerz at rmitechnologies.net (andrew) Date: Wed, 25 Mar 2015 11:16:21 -0500 Subject: [Chicago] Python - Deerfield -- why not? Message-ID: <0cc701d06717$0a2b1a10$1e814e30$@rmitechnologies.net> WEB DEVELOPER (Python, HTML, CSS, jQuery, JavaScript) will develop the next-generation of this company's proprietary software for collaboration and productivity tools. CNN Headline News said this company's CPM application may be "the most sophisticated business-to-business Internet-based application in the world." Requirements: Python, good experience with SQL, and able to do front end and back end development (Python, HTML, CSS, jQuery, JavaScript). . A minimum of 3 years of GUI or server side web-application Python software development experience -or-- if NO experience with Python - a willingness to jump in and learn Python will be considered! . Understanding of object oriented concepts, using formal development methods. (Experience with agile/test driven methodologies a plus). . Developing robust, secure, complex, scalable, high volume, commercial-grade web applications. . Some database programming with PostgreSQL or SQLAlchemy. . Financial and business workflow development experience. . Expertise with all phases of the software development lifecycle, including requirements analysis, design, coding, testing, implementation, and support. . Working in a collaborative team environment; Verbal and written skills. Desired Experience: . Behavior Driven Development . Architecture and systems development . Application development experience using Linux, Apache, Webware, SQLObject, Reportlab technologies . Business Process focused systems is a plus. Location: Deerfield, IL Company will not sponsor at this time. Salary is open and D.O.E. We will pay $1,000 referral fee. Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 119460 bytes Desc: not available URL: From brianhray at gmail.com Wed Mar 25 18:23:50 2015 From: brianhray at gmail.com (Brian Ray) Date: Wed, 25 Mar 2015 12:23:50 -0500 Subject: [Chicago] Python - Deerfield -- why not? In-Reply-To: <0cc701d06717$0a2b1a10$1e814e30$@rmitechnologies.net> References: <0cc701d06717$0a2b1a10$1e814e30$@rmitechnologies.net> Message-ID: Reminder everyone, we do have some referral rules for those who solicit off our list. http://www.chipy.org/pages/referrals/ Also, you should have a conversation with Jerry (cc'd) or Myself before posting. It is really best that both those who a posting as well as those who are looking work through us so we can assist and to make sure it benefits ChiPy in the long run. Thanks for your cooperation! Brian PS Send Jerry your resume and he will discuss with you where he sees a fit! On Wed, Mar 25, 2015 at 11:16 AM, andrew wrote: > WEB DEVELOPER (Python, HTML, CSS, jQuery, JavaScript) will develop the > next-generation of this company's proprietary software for collaboration > and productivity tools? CNN Headline News said this company?s CPM > application may be "the most sophisticated business-to-business > Internet-based application in the world." > > > > *Requirements:* > > Python, good experience with SQL, and able to do front end and back end > development (Python, HTML, CSS, jQuery, JavaScript). > > > > ? A minimum of 3 years of GUI or server side web-application Python > software development experience ?or-- if NO experience with Python ? a > willingness to jump in and learn Python will be considered! > > ? Understanding of object oriented concepts, using formal > development methods. (Experience with agile/test driven methodologies a > plus). > > ? Developing robust, secure, complex, scalable, high volume, > commercial-grade web applications. > > ? Some database programming with PostgreSQL or SQLAlchemy. > > ? Financial and business workflow development experience. > > ? Expertise with all phases of the software development lifecycle, > including requirements analysis, design, coding, testing, implementation, > and support. > > ? Working in a collaborative team environment; Verbal and written > skills. > > *Desired Experience:* > > ? Behavior Driven Development > > ? Architecture and systems development > > ? Application development experience using Linux, Apache, Webware, > SQLObject, Reportlab technologies > > ? Business Process focused systems is a plus. > > > > Location: Deerfield, IL > > Company will not sponsor at this time. > > > > Salary is open and D.O.E. > > We will pay $1,000 referral fee. > > > > Thanks, Andrew > > > > > > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -- Brian Ray @brianray (773) 669-7717 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 119460 bytes Desc: not available URL: From japhy at pearachute.com Wed Mar 25 18:22:03 2015 From: japhy at pearachute.com (Japhy Bartlett) Date: Wed, 25 Mar 2015 12:22:03 -0500 Subject: [Chicago] Python - Deerfield -- why not? In-Reply-To: <0cc701d06717$0a2b1a10$1e814e30$@rmitechnologies.net> References: <0cc701d06717$0a2b1a10$1e814e30$@rmitechnologies.net> Message-ID: We're pretty open to recruiters, but maybe not the same posting every other day? On Wed, Mar 25, 2015 at 11:16 AM, andrew wrote: > WEB DEVELOPER (Python, HTML, CSS, jQuery, JavaScript) will develop the > next-generation of this company's proprietary software for collaboration > and productivity tools? CNN Headline News said this company?s CPM > application may be "the most sophisticated business-to-business > Internet-based application in the world." > > > > *Requirements:* > > Python, good experience with SQL, and able to do front end and back end > development (Python, HTML, CSS, jQuery, JavaScript). > > > > ? A minimum of 3 years of GUI or server side web-application Python > software development experience ?or-- if NO experience with Python ? a > willingness to jump in and learn Python will be considered! > > ? Understanding of object oriented concepts, using formal > development methods. (Experience with agile/test driven methodologies a > plus). > > ? Developing robust, secure, complex, scalable, high volume, > commercial-grade web applications. > > ? Some database programming with PostgreSQL or SQLAlchemy. > > ? Financial and business workflow development experience. > > ? Expertise with all phases of the software development lifecycle, > including requirements analysis, design, coding, testing, implementation, > and support. > > ? Working in a collaborative team environment; Verbal and written > skills. > > *Desired Experience:* > > ? Behavior Driven Development > > ? Architecture and systems development > > ? Application development experience using Linux, Apache, Webware, > SQLObject, Reportlab technologies > > ? Business Process focused systems is a plus. > > > > Location: Deerfield, IL > > Company will not sponsor at this time. > > > > Salary is open and D.O.E. > > We will pay $1,000 referral fee. > > > > Thanks, Andrew > > > > > > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 119460 bytes Desc: not available URL: From brianhray at gmail.com Wed Mar 25 18:28:18 2015 From: brianhray at gmail.com (Brian Ray) Date: Wed, 25 Mar 2015 12:28:18 -0500 Subject: [Chicago] Python - Deerfield -- why not? In-Reply-To: References: <0cc701d06717$0a2b1a10$1e814e30$@rmitechnologies.net> Message-ID: I agree with Japhy here. Please don't keep resending the same posting over and over. On Wed, Mar 25, 2015 at 12:22 PM, Japhy Bartlett wrote: > > We're pretty open to recruiters, but maybe not the same posting every > other day? > > On Wed, Mar 25, 2015 at 11:16 AM, andrew > wrote: > >> WEB DEVELOPER (Python, HTML, CSS, jQuery, JavaScript) will develop the >> next-generation of this company's proprietary software for collaboration >> and productivity tools? CNN Headline News said this company?s CPM >> application may be "the most sophisticated business-to-business >> Internet-based application in the world." >> >> >> >> *Requirements:* >> >> Python, good experience with SQL, and able to do front end and back end >> development (Python, HTML, CSS, jQuery, JavaScript). >> >> >> >> ? A minimum of 3 years of GUI or server side web-application >> Python software development experience ?or-- if NO experience with Python ? >> a willingness to jump in and learn Python will be considered! >> >> ? Understanding of object oriented concepts, using formal >> development methods. (Experience with agile/test driven methodologies a >> plus). >> >> ? Developing robust, secure, complex, scalable, high volume, >> commercial-grade web applications. >> >> ? Some database programming with PostgreSQL or SQLAlchemy. >> >> ? Financial and business workflow development experience. >> >> ? Expertise with all phases of the software development lifecycle, >> including requirements analysis, design, coding, testing, implementation, >> and support. >> >> ? Working in a collaborative team environment; Verbal and written >> skills. >> >> *Desired Experience:* >> >> ? Behavior Driven Development >> >> ? Architecture and systems development >> >> ? Application development experience using Linux, Apache, >> Webware, SQLObject, Reportlab technologies >> >> ? Business Process focused systems is a plus. >> >> >> >> Location: Deerfield, IL >> >> Company will not sponsor at this time. >> >> >> >> Salary is open and D.O.E. >> >> We will pay $1,000 referral fee. >> >> >> >> Thanks, Andrew >> >> >> >> >> >> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -- Brian Ray @brianray (773) 669-7717 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 119460 bytes Desc: not available URL: From tanya at tickel.net Wed Mar 25 20:12:14 2015 From: tanya at tickel.net (Tanya Schlusser) Date: Wed, 25 Mar 2015 14:12:14 -0500 Subject: [Chicago] pandas' statsmodels vs sklearn -- opinions? Message-ID: Hi, all of the internet discussions on statsmodels vs sklearn are from 2013 or before. Is there a universally preferred way? For my part, pandas is kind of a heavy package and I spent a lot of my first few years in Python writing statistical models from scratch for clients who didn't want to install anything more than numpy -- so I'm partial to sklearn, but right now I want to conform to popular convention. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From goetscher at gmail.com Wed Mar 25 20:59:15 2015 From: goetscher at gmail.com (Kevin Goetsch) Date: Wed, 25 Mar 2015 14:59:15 -0500 Subject: [Chicago] pandas' statsmodels vs sklearn -- opinions? In-Reply-To: References: Message-ID: Hi Tanya, At Braintree we use sklearn and Pandas. There's a few custom classes we had to write to get pipelines to work but overall statsmodels just doesn't offer the same depth of machine learning techniques. It does display it's results in a much nicer form however. I'd recommend sklearn and pandas but I doubt there will ever be agreement across the board. Cheers, Kevin On Wed, Mar 25, 2015 at 2:12 PM, Tanya Schlusser wrote: > Hi, all of the internet discussions on statsmodels vs sklearn are from > 2013 or before. Is there a universally preferred way? > > For my part, pandas is kind of a heavy package and I spent a lot of my > first few years in Python writing statistical models from scratch for > clients who didn't want to install anything more than numpy -- so I'm > partial to sklearn, but right now I want to conform to popular convention. > > Thanks! > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From proba at allstate.com Sat Mar 28 01:43:13 2015 From: proba at allstate.com (Robare, Phillip (Randstant)) Date: Sat, 28 Mar 2015 00:43:13 +0000 Subject: [Chicago] Python head-scratcher Message-ID: <50869A74BA4F07468AD797C9BFF1FE3E04303164@A0185-XPO1026-C.ad.allstate.com> The problem is that a leading zero on a number declares that string to be octal (base 8), and so only comprised of digits 1 to 7. -----Original Message----- From: Robare, Phillip (Randstant) Sent: Friday, March 27, 2015 2:44 PM To: 'The Chicago Python Users Group' Subject: Python head-scratcher I got an instant message this morning from a frustrated co-worker who was trying to get his unit tests to run. He said that when he ran with a date of June 1 specified things went fine, but specifying August first gave him a syntax error. The only change he was making was to change the "6" in the month field to an "8". I was able to help him, but I thought those on this list might enjoy the puzzle. >>> from datetime import date >>> d = date(2014,06,01) >>> print d 2014-06-01 >>> d = date(2014,08,01) File "", line 1 d = date(2014,08,01) ^ SyntaxError: invalid token (for those whose mail readers do not use fixed width fonts, the caret in the error is pointing at the 8.) Clue: A similar problem would exist in Java, C++, C and many others. I will post the solution later today. Phil Robare probare at rcnchicago.com From proba at allstate.com Fri Mar 27 20:43:31 2015 From: proba at allstate.com (Robare, Phillip (Randstant)) Date: Fri, 27 Mar 2015 19:43:31 +0000 Subject: [Chicago] Python head-scratcher Message-ID: <50869A74BA4F07468AD797C9BFF1FE3E04303126@A0185-XPO1026-C.ad.allstate.com> I got an instant message this morning from a frustrated co-worker who was trying to get his unit tests to run. He said that when he ran with a date of June 1 specified things went fine, but specifying August first gave him a syntax error. The only change he was making was to change the "6" in the month field to an "8". I was able to help him, but I thought those on this list might enjoy the puzzle. >>> from datetime import date >>> d = date(2014,06,01) >>> print d 2014-06-01 >>> d = date(2014,08,01) File "", line 1 d = date(2014,08,01) ^ SyntaxError: invalid token (for those whose mail readers do not use fixed width fonts, the caret in the error is pointing at the 8.) Clue: A similar problem would exist in Java, C++, C and many others. I will post the solution later today. Phil Robare probare at rcnchicago.com From d-lewit at neiu.edu Sat Mar 28 08:02:09 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sat, 28 Mar 2015 02:02:09 -0500 Subject: [Chicago] A fun problem using a binary tree. Message-ID: I'm just starting to learn about binary trees in my data structures class. Interesting! Just as I'm getting used to linked lists, the plot thickens and becomes even more complicated! Oh geez! Here's the problem. The root has a value of 1,000. Every left child is 50 less than its parent, and every right child is 50 more than its parent. Continue adding nodes and children until finally the leftmost node (a leaf) has a value of 0. Then add up all the nodes! What is the total sum? I used Python 2.7 to solve the problem, although I believe my code is equally legit for Python 3.#, but try it and let me know. I hope my answer is right! I'm still confused about this whole tabs vs. spaces issue. What's the difference. I mean.... as long as the interpreter doesn't yell at me, why should I worry about the difference between tabs and spaces? I believe that Java has a built-in class for constructing trees. Does Python have such a built-in data structure? If it does I don't know about it. I created my own binary tree structure. Cool stuff. Thanks for the feedback. Best wishes, Douglas Lewit -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BinaryTrees.py Type: text/x-python Size: 1717 bytes Desc: not available URL: From d-lewit at neiu.edu Sat Mar 28 07:55:12 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sat, 28 Mar 2015 01:55:12 -0500 Subject: [Chicago] Python head-scratcher In-Reply-To: <50869A74BA4F07468AD797C9BFF1FE3E04303164@A0185-XPO1026-C.ad.allstate.com> References: <50869A74BA4F07468AD797C9BFF1FE3E04303164@A0185-XPO1026-C.ad.allstate.com> Message-ID: Thanks Robert. I haven't played around with octal numbers in a while. This was interesting. Thanks for sharing. On Fri, Mar 27, 2015 at 7:43 PM, Robare, Phillip (Randstant) < proba at allstate.com> wrote: > The problem is that a leading zero on a number declares that string to be > octal (base 8), and so only comprised of digits 1 to 7. > > > -----Original Message----- > From: Robare, Phillip (Randstant) > Sent: Friday, March 27, 2015 2:44 PM > To: 'The Chicago Python Users Group' > Subject: Python head-scratcher > > I got an instant message this morning from a frustrated co-worker who was > trying to get his unit tests to run. He said that when he ran with a date > of June 1 specified things went fine, but specifying August first gave him > a syntax error. The only change he was making was to change the "6" in the > month field to an "8". I was able to help him, but I thought those on this > list might enjoy the puzzle. > > >>> from datetime import date > >>> d = date(2014,06,01) > >>> print d > 2014-06-01 > >>> d = date(2014,08,01) > File "", line 1 > d = date(2014,08,01) > ^ > SyntaxError: invalid token > > (for those whose mail readers do not use fixed width fonts, the caret in > the error is pointing at the 8.) > > Clue: A similar problem would exist in Java, C++, C and many others. > > I will post the solution later today. > > Phil Robare > probare at rcnchicago.com > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zitterbewegung at gmail.com Sat Mar 28 18:58:19 2015 From: zitterbewegung at gmail.com (Joshua Herman) Date: Sat, 28 Mar 2015 17:58:19 +0000 Subject: [Chicago] A fun problem using a binary tree. In-Reply-To: References: Message-ID: Python doesn't have a built in datastructure for trees but you could represent them as a nested dictionary. On Sat, Mar 28, 2015 at 9:27 AM Lewit, Douglas wrote: > I'm just starting to learn about binary trees in my data structures > class. Interesting! Just as I'm getting used to linked lists, the plot > thickens and becomes even more complicated! Oh geez! > > Here's the problem. The root has a value of 1,000. Every left child is > 50 less than its parent, and every right child is 50 more than its parent. > Continue adding nodes and children until finally the leftmost node (a leaf) > has a value of 0. Then add up all the nodes! What is the total sum? > > I used Python 2.7 to solve the problem, although I believe my code is > equally legit for Python 3.#, but try it and let me know. I hope my answer > is right! I'm still confused about this whole tabs vs. spaces issue. > What's the difference. I mean.... as long as the interpreter doesn't yell > at me, why should I worry about the difference between tabs and spaces? > > I believe that Java has a built-in class for constructing trees. Does > Python have such a built-in data structure? If it does I don't know about > it. I created my own binary tree structure. Cool stuff. > > Thanks for the feedback. > > Best wishes, > > Douglas Lewit > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeremy.mcmillan at gmail.com Sat Mar 28 19:24:26 2015 From: jeremy.mcmillan at gmail.com (Jeremy McMillan) Date: Sat, 28 Mar 2015 13:24:26 -0500 Subject: [Chicago] A fun problem using a binary tree. In-Reply-To: References: Message-ID: A tree is also a directed acyclic graph (DAG). If you want a specialized structure, maybe look for a DAG in graph libraries? On Sat, Mar 28, 2015 at 12:58 PM, Joshua Herman wrote: > Python doesn't have a built in datastructure for trees but you could > represent them as a nested dictionary. > On Sat, Mar 28, 2015 at 9:27 AM Lewit, Douglas wrote: > >> I'm just starting to learn about binary trees in my data structures >> class. Interesting! Just as I'm getting used to linked lists, the plot >> thickens and becomes even more complicated! Oh geez! >> >> Here's the problem. The root has a value of 1,000. Every left child is >> 50 less than its parent, and every right child is 50 more than its parent. >> Continue adding nodes and children until finally the leftmost node (a leaf) >> has a value of 0. Then add up all the nodes! What is the total sum? >> >> I used Python 2.7 to solve the problem, although I believe my code is >> equally legit for Python 3.#, but try it and let me know. I hope my answer >> is right! I'm still confused about this whole tabs vs. spaces issue. >> What's the difference. I mean.... as long as the interpreter doesn't yell >> at me, why should I worry about the difference between tabs and spaces? >> >> I believe that Java has a built-in class for constructing trees. Does >> Python have such a built-in data structure? If it does I don't know about >> it. I created my own binary tree structure. Cool stuff. >> >> Thanks for the feedback. >> >> Best wishes, >> >> Douglas Lewit >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d-lewit at neiu.edu Sat Mar 28 22:01:41 2015 From: d-lewit at neiu.edu (Lewit, Douglas) Date: Sat, 28 Mar 2015 16:01:41 -0500 Subject: [Chicago] A fun problem using a binary tree. In-Reply-To: References: Message-ID: I don't know a lot about DAG's, but I read that they are used a lot by computer algebra systems, such as Maple, Mathematica, Sage, and of course Python's Sympy. By the way, can anyone recommend any good books on Matplotlib and Sympy? The online documentation is very short and doesn't really provide much in the way of examples. Thanks. On Sat, Mar 28, 2015 at 1:24 PM, Jeremy McMillan wrote: > A tree is also a directed acyclic graph (DAG). If you want a specialized > structure, maybe look for a DAG in graph libraries? > > On Sat, Mar 28, 2015 at 12:58 PM, Joshua Herman > wrote: > >> Python doesn't have a built in datastructure for trees but you could >> represent them as a nested dictionary. >> On Sat, Mar 28, 2015 at 9:27 AM Lewit, Douglas wrote: >> >>> I'm just starting to learn about binary trees in my data structures >>> class. Interesting! Just as I'm getting used to linked lists, the plot >>> thickens and becomes even more complicated! Oh geez! >>> >>> Here's the problem. The root has a value of 1,000. Every left child is >>> 50 less than its parent, and every right child is 50 more than its parent. >>> Continue adding nodes and children until finally the leftmost node (a leaf) >>> has a value of 0. Then add up all the nodes! What is the total sum? >>> >>> I used Python 2.7 to solve the problem, although I believe my code is >>> equally legit for Python 3.#, but try it and let me know. I hope my answer >>> is right! I'm still confused about this whole tabs vs. spaces issue. >>> What's the difference. I mean.... as long as the interpreter doesn't yell >>> at me, why should I worry about the difference between tabs and spaces? >>> >>> I believe that Java has a built-in class for constructing trees. Does >>> Python have such a built-in data structure? If it does I don't know about >>> it. I created my own binary tree structure. Cool stuff. >>> >>> Thanks for the feedback. >>> >>> Best wishes, >>> >>> Douglas Lewit >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl at personnelware.com Sun Mar 29 00:07:21 2015 From: carl at personnelware.com (Carl Karsten) Date: Sat, 28 Mar 2015 18:07:21 -0500 Subject: [Chicago] A fun problem using a binary tree. In-Reply-To: References: Message-ID: On Sat, Mar 28, 2015 at 2:02 AM, Lewit, Douglas wrote: > I'm just starting to learn about binary trees in my data structures > class. Interesting! Just as I'm getting used to linked lists, the plot > thickens and becomes even more complicated! Oh geez! > > Here's the problem. The root has a value of 1,000. Every left child is > 50 less than its parent, and every right child is 50 more than its parent. > Continue adding nodes and children until finally the leftmost node (a leaf) > has a value of 0. Then add up all the nodes! What is the total sum? > There are a few ways to implement this. my thought: def f(x): return [ x, f(x-50), (x+50) ] tree = f(1000) and some code to traverse the tree adding it all up. and somehow figure out how to make f() stop. we could track the depth and count to 1000/50 but that seems outside the spirit of the question that says "until finally the leftmost node (a leaf) has a value of 0." I am having trouble doing this in my head, but I think the tree will look like this: [1000, [9950, [...]], [1050, [...]]] > > I used Python 2.7 to solve the problem, although I believe my code is > equally legit for Python 3.#, but try it and let me know. I hope my answer > is right! I'm still confused about this whole tabs vs. spaces issue. > What's the difference. I mean.... as long as the interpreter doesn't yell > at me, why should I worry about the difference between tabs and spaces? > Because I look at your code and get confused I may yell at you. easy answer: use 4 spaces. why? easy: Guido says. details: http://www.jwz.org/doc/tabs-vs-spaces.html https://www.python.org/dev/peps/pep-0008/ > > I believe that Java has a built-in class for constructing trees. Does > Python have such a built-in data structure? If it does I don't know about > it. I created my own binary tree structure. Cool stuff. > > Thanks for the feedback. > > Best wishes, > > Douglas Lewit > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -- Carl K -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at adamforsyth.net Sun Mar 29 00:53:06 2015 From: adam at adamforsyth.net (Adam Forsyth) Date: Sat, 28 Mar 2015 18:53:06 -0500 Subject: [Chicago] A fun problem using a binary tree. In-Reply-To: References: Message-ID: The depth of the tree is 1000 / 50 + 1 = 21 The average node value is 1000, because you subtract the same amount from the left child as you add to the right child. The number of nodes is 2 ^ depth - 1 -- so in this case, 2 ^ 21 - 1 = 2097152 - 1 = 2097151 The total sum = number of nodes * average node value = 2097151 * 1000 = 2097151000. On Sat, Mar 28, 2015 at 2:02 AM, Lewit, Douglas wrote: > I'm just starting to learn about binary trees in my data structures > class. Interesting! Just as I'm getting used to linked lists, the plot > thickens and becomes even more complicated! Oh geez! > > Here's the problem. The root has a value of 1,000. Every left child is > 50 less than its parent, and every right child is 50 more than its parent. > Continue adding nodes and children until finally the leftmost node (a leaf) > has a value of 0. Then add up all the nodes! What is the total sum? > > I used Python 2.7 to solve the problem, although I believe my code is > equally legit for Python 3.#, but try it and let me know. I hope my answer > is right! I'm still confused about this whole tabs vs. spaces issue. > What's the difference. I mean.... as long as the interpreter doesn't yell > at me, why should I worry about the difference between tabs and spaces? > > I believe that Java has a built-in class for constructing trees. Does > Python have such a built-in data structure? If it does I don't know about > it. I created my own binary tree structure. Cool stuff. > > Thanks for the feedback. > > Best wishes, > > Douglas Lewit > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sun Mar 29 01:07:09 2015 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 28 Mar 2015 17:07:09 -0700 Subject: [Chicago] A fun problem using a binary tree. In-Reply-To: References: Message-ID: FYI: We've got some free stuff you can read (and I'll mentor for a fee) on binary trees in Python here: http://courses.oreillyschool.com/Python4/index.html (courses written by Steve Holden, got the ball rolling for Pycons, former PSF chair) Primitive implementation but that's all you need to get going. We have good stuff on lambda calculus (composition of functions) for warmup. Kirby OST (long time lurker on Chipy, resident of Portland) On Sat, Mar 28, 2015 at 12:02 AM, Lewit, Douglas wrote: > I'm just starting to learn about binary trees in my data structures > class. Interesting! Just as I'm getting used to linked lists, the plot > thickens and becomes even more complicated! Oh geez! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lane at strapr.com Sat Mar 28 23:55:22 2015 From: lane at strapr.com (Lane Campbell) Date: Sat, 28 Mar 2015 17:55:22 -0500 Subject: [Chicago] Django Study Group Message-ID: Everyone, I'm hosting a Django study group tomorrow at noon in Lincoln Park. Everyone attending is a student, there will be folks working on projects interesting to them. As a group we will try and help each other. Feel free to sign up and stop in. No payment is required but donations are welcome so we can buy lunch. https://www.eventbrite.com/e/chicago-django-study-group-tickets-16324138939 Sent from my iPhone From zitterbewegung at gmail.com Sun Mar 29 03:15:02 2015 From: zitterbewegung at gmail.com (Joshua Herman) Date: Sun, 29 Mar 2015 01:15:02 +0000 Subject: [Chicago] A fun problem using a binary tree. In-Reply-To: References: Message-ID: Dear Douglas, No I am not a professor I have a bachelors in CS and I am a web programmer . Sincerely, Joshua herman On Sat, Mar 28, 2015 at 3:38 PM Jeremy McMillan wrote: > A tree is also a directed acyclic graph (DAG). If you want a specialized > structure, maybe look for a DAG in graph libraries? > > On Sat, Mar 28, 2015 at 12:58 PM, Joshua Herman > wrote: > >> Python doesn't have a built in datastructure for trees but you could >> represent them as a nested dictionary. >> On Sat, Mar 28, 2015 at 9:27 AM Lewit, Douglas wrote: >> >>> I'm just starting to learn about binary trees in my data structures >>> class. Interesting! Just as I'm getting used to linked lists, the plot >>> thickens and becomes even more complicated! Oh geez! >>> >>> Here's the problem. The root has a value of 1,000. Every left child is >>> 50 less than its parent, and every right child is 50 more than its parent. >>> Continue adding nodes and children until finally the leftmost node (a leaf) >>> has a value of 0. Then add up all the nodes! What is the total sum? >>> >>> I used Python 2.7 to solve the problem, although I believe my code is >>> equally legit for Python 3.#, but try it and let me know. I hope my answer >>> is right! I'm still confused about this whole tabs vs. spaces issue. >>> What's the difference. I mean.... as long as the interpreter doesn't yell >>> at me, why should I worry about the difference between tabs and spaces? >>> >>> I believe that Java has a built-in class for constructing trees. Does >>> Python have such a built-in data structure? If it does I don't know about >>> it. I created my own binary tree structure. Cool stuff. >>> >>> Thanks for the feedback. >>> >>> Best wishes, >>> >>> Douglas Lewit >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -------------- next part -------------- An HTML attachment was scrubbed... URL: From prometheus235 at gmail.com Sun Mar 29 17:34:17 2015 From: prometheus235 at gmail.com (Nick Timkovich) Date: Sun, 29 Mar 2015 10:34:17 -0500 Subject: [Chicago] Python head-scratcher In-Reply-To: References: <50869A74BA4F07468AD797C9BFF1FE3E04303164@A0185-XPO1026-C.ad.allstate.com> Message-ID: Note that in Python 3, the first date would also cause a SyntaxError. Octal literals must start with "0o" just like hex ("0x") and binary ("0b"). On Sat, Mar 28, 2015 at 1:55 AM, Lewit, Douglas wrote: > Thanks Robert. I haven't played around with octal numbers in a while. > This was interesting. Thanks for sharing. > > On Fri, Mar 27, 2015 at 7:43 PM, Robare, Phillip (Randstant) < > proba at allstate.com> wrote: > >> The problem is that a leading zero on a number declares that string to be >> octal (base 8), and so only comprised of digits 1 to 7. >> >> >> -----Original Message----- >> From: Robare, Phillip (Randstant) >> Sent: Friday, March 27, 2015 2:44 PM >> To: 'The Chicago Python Users Group' >> Subject: Python head-scratcher >> >> I got an instant message this morning from a frustrated co-worker who was >> trying to get his unit tests to run. He said that when he ran with a date >> of June 1 specified things went fine, but specifying August first gave him >> a syntax error. The only change he was making was to change the "6" in the >> month field to an "8". I was able to help him, but I thought those on this >> list might enjoy the puzzle. >> >> >>> from datetime import date >> >>> d = date(2014,06,01) >> >>> print d >> 2014-06-01 >> >>> d = date(2014,08,01) >> File "", line 1 >> d = date(2014,08,01) >> ^ >> SyntaxError: invalid token >> >> (for those whose mail readers do not use fixed width fonts, the caret in >> the error is pointing at the 8.) >> >> Clue: A similar problem would exist in Java, C++, C and many others. >> >> I will post the solution later today. >> >> Phil Robare >> probare at rcnchicago.com >> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> > > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emperorcezar at gmail.com Sun Mar 29 20:22:51 2015 From: emperorcezar at gmail.com (Adam "Cezar" Jenkins) Date: Sun, 29 Mar 2015 13:22:51 -0500 Subject: [Chicago] Python head-scratcher In-Reply-To: References: <50869A74BA4F07468AD797C9BFF1FE3E04303164@A0185-XPO1026-C.ad.allstate.com> Message-ID: That's pretty awesome. I love when a language help keep my from shooting myself in the foot as I'm ought to do. ---------------------------------------------------------------------------------- Father, dabbling at being a Python developer specializing in Django, Cyclist, and home brewer. On Sun, Mar 29, 2015 at 10:34 AM, Nick Timkovich wrote: > Note that in Python 3, the first date would also cause a SyntaxError. > Octal literals must start with "0o" just like hex ("0x") and binary ("0b"). > > On Sat, Mar 28, 2015 at 1:55 AM, Lewit, Douglas wrote: > >> Thanks Robert. I haven't played around with octal numbers in a while. >> This was interesting. Thanks for sharing. >> >> On Fri, Mar 27, 2015 at 7:43 PM, Robare, Phillip (Randstant) < >> proba at allstate.com> wrote: >> >>> The problem is that a leading zero on a number declares that string to >>> be octal (base 8), and so only comprised of digits 1 to 7. >>> >>> >>> -----Original Message----- >>> From: Robare, Phillip (Randstant) >>> Sent: Friday, March 27, 2015 2:44 PM >>> To: 'The Chicago Python Users Group' >>> Subject: Python head-scratcher >>> >>> I got an instant message this morning from a frustrated co-worker who >>> was trying to get his unit tests to run. He said that when he ran with a >>> date of June 1 specified things went fine, but specifying August first gave >>> him a syntax error. The only change he was making was to change the "6" in >>> the month field to an "8". I was able to help him, but I thought those on >>> this list might enjoy the puzzle. >>> >>> >>> from datetime import date >>> >>> d = date(2014,06,01) >>> >>> print d >>> 2014-06-01 >>> >>> d = date(2014,08,01) >>> File "", line 1 >>> d = date(2014,08,01) >>> ^ >>> SyntaxError: invalid token >>> >>> (for those whose mail readers do not use fixed width fonts, the caret in >>> the error is pointing at the 8.) >>> >>> Clue: A similar problem would exist in Java, C++, C and many others. >>> >>> I will post the solution later today. >>> >>> Phil Robare >>> probare at rcnchicago.com >>> >>> >>> _______________________________________________ >>> Chicago mailing list >>> Chicago at python.org >>> https://mail.python.org/mailman/listinfo/chicago >>> >> >> >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> >> > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave at dabeaz.com Mon Mar 30 14:32:02 2015 From: dave at dabeaz.com (David Beazley) Date: Mon, 30 Mar 2015 07:32:02 -0500 Subject: [Chicago] PyCon Tutorial Preview - Free- April 3 Message-ID: <19D2F4D0-FE49-4450-B2AA-542B2EA3873E@dabeaz.com> Hi, Just a heads up that I'm running a free preview of my upcoming PyCon tutorial on modules and packages this Friday, April 3, 1:30pm - 5:00pm in Andersonville. Space is limited, but there are still a few spaces available. Further details at http://www.eventbrite.com/e/modules-and-packages-live-and-let-die-tickets-16058790274 Cheers, Dave From lane at strapr.com Mon Mar 30 23:35:37 2015 From: lane at strapr.com (Lane Campbell) Date: Mon, 30 Mar 2015 16:35:37 -0500 Subject: [Chicago] Chicago Django Study Group Message-ID: Hello All, I wanted to share an update and link to the next meeting for all those who couldn't attend the first Chicago Django Study Group that was held Yesterday. *Background*: As a student learning Django I have been attending Chipy events, the Chicago Pythonistas events, and the Friendly Django 101 course by Richard Cornish. The Chicago Django Study Group is here to help busy people dedicate a few hours a week to furthering our skills by learning or teaching Django. *Event Update*: Big thanks to all who came out and my apologies to those who have been emailing me about the problems getting into the building. It was my first time trying to host something and I learned a lot. I hope you haven't given up and are willing to try again in the future. *Attendance Issues*: We had about 15 people sign up for last weekends event but some folks ended up being turned away by building security. I forgot to mention in my initial posting to tell building security that you are here to visit Lane Campbell when you show up. If you have any issues my phone number is in my signature and now in the event information, feel free to call or text me. *Can you help*: Why Sunday? I polled a select set of people who were interested in doing study groups and they agreed Sunday was the best day for them. If you or anyone you know has room for a weekly event on Sunday and wants to host a group of students and mentors while we learn together please don't hesitate to reach out. *Meanwhile*: We will continue to host these once a week on Sunday's at noon since there seems to be decent interest. If you want to join us for the next one please visit: http://www.eventbrite.com/e/chicago-django-study-group-april-5th-2015-tickets-16386027048 I also created an open Google Group so we can discuss some of the stuff we talk about as we collaborate: https://groups.google.com/forum/#!forum/chicago-django-study-group *Become a Mentor*: A big shout out to Julian Eden who showed up and offered to help others! Thank you for all your help! We are could certainly use more mentors so if you or anyone you know might have some time please feel free to stop in and help. To that end I am bcc'ing some people I know personally along with people that Shuvankar Halder put me in touch with. I have bcc'ed you in case you are interested in helping with a location or stopping by and mentoring new developers. Either way let me know if you want to help! Regards, Lane Campbell (312) 775-2632 -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at lorenamesa.com Tue Mar 31 14:12:23 2015 From: me at lorenamesa.com (Lorena Mesa) Date: Tue, 31 Mar 2015 07:12:23 -0500 Subject: [Chicago] DjangoGirls needs your help to find coaches + venue space! Message-ID: Greetings ChiPy, We at Chicago PyLadies are bringing DjangoGirls to Chicago on June 20th and we need your help! We are looking for people that are interested in being a coach for the day long event (roughly 9am to 6pm) as well as coaches that can help with the Installfest the preceding evening (June 19th roughly 6pm to 9pm). Coaches will answer questions that attendees have and may be invited to give smaller break out lightning talks. High level details about DjangoGirls: DG is a free day long workshop for women where attendees will build their first Django app (a blog). While the event is geared towards women men are welcome to apply however priority will be given to women applicants. We are aiming to have somewhere around 35 attendees. How you can help: As I mentioned we are in need of coaches and we are seeking sponsors, anyone interested in providing food, space, etc! We recognize all sponsors on the website, social media, and give intros/etc at the event. Email chicago at pyladies.com if you are interested in helping out! Or you can email me directly at me at lorenamesa.com. Thank you for all you do ChiPy! I will be at PyCon (sadly not for the Sprints) should you want to chat in person! Lorena Mesa :D -- -------------- next part -------------- An HTML attachment was scrubbed... URL: