Re: object.enable() anti-pattern

2013-05-10 Thread Robert Kern
e they are misapplied, where YAGNI, why novices overuse it, other patterns that should be used instead, and also the circumstances where it is actually a good pattern instead. To artificially limit the discussion of the anti-pattern to the trivial, entirely unmotivated case forbids most of the in

Re: object.enable() anti-pattern

2013-05-10 Thread Robert Kern
On 2013-05-10 15:01, Roy Smith wrote: In article , Robert Kern wrote: I'd be curious to see in-the-wild instances of the anti-pattern that you are talking about, then. I think everyone agrees that entirely unmotivated "enable" methods should be avoided, but I have my doubts

Re: object.enable() anti-pattern

2013-05-10 Thread Robert Kern
On 2013-05-10 16:44, Serhiy Storchaka wrote: 10.05.13 15:19, Robert Kern написав(ла): I'd be curious to see in-the-wild instances of the anti-pattern that you are talking about, then. Many (if not most) GUI frameworks use this pattern. button = Button(

Re: object.enable() anti-pattern

2013-05-11 Thread Robert Kern
On 2013-05-11 08:51, Steven D'Aprano wrote: On Fri, 10 May 2013 18:20:34 +0100, Robert Kern wrote: According to Steven's criteria, neither of these are instances of the anti-pattern because there are good reasons they are this way. He is reducing the anti-pattern to just those c

Re: Future standard GUI library

2013-05-20 Thread Robert Kern
candidate to replace tkinter. FLTK? (http://www.fltk.org/index.php) tkinter is the Python wrapper of the tk library, just as wxpython is the python wrapper of the wx library. I do not see a py-fltk wrapper. It exists, but it's really old. http://pyfltk.sourceforge.net/ -- Robert Kern "I

Re: Python for IPSA (Power flow analysis)

2013-05-28 Thread Robert Marshall
flows. IPSA has a linkedin discussion group and current IPSA developers will I think respond to you there (if you have an account) Robert -- La grenouille songe..dans son château d'eau Links and things http://rmstar.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart: The problem with "print"

2013-06-03 Thread Robert Kern
On 2013-06-03 05:20, Dan Sommers wrote: On Sun, 02 Jun 2013 23:23:42 -0400, Jason Swails wrote: ... (And yes, a good portion of our code is -still- in Fortran -- but at least it's F90+ :). I am a huge proponent of using the right tool for the job. There is nothing wrong with some well-place

Re: Interactive interpreter hooks

2013-06-03 Thread Robert Kern
])". You will need to write your own REPL for this. Use the code.InteractiveConsole class: http://docs.python.org/2/library/code I recommend source-diving to see what you need to override, but I suspect you can just wrap around the `runsource()` method. -- Robert Kern "I have

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Robert Kern
. With something fully dynamic like Python, it's probably not worth the effort. But maybe checks like this could be useful to something like Coverity. As Serhiy notes, Go does this, almost exactly as you wrote it (modulo syntax). http://golang.org/doc/effective_go.html#interfaces_and_typ

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Robert Kern
compile-time checking of that. Say that on a Haskell list, and they'll take it as a challenge. :-) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlyin

Re: Re-using copyrighted code

2013-06-10 Thread Robert Kern
? Larry Rosen's free (open source, even!) book _Open Source Licensing_ is good introductory reading. Larry is an intellectual property lawyer and helped draft the current PSF license. http://www.rosenlaw.com/oslbook.htm -- Robert Kern "I have come to believe that the whole w

Re: Simple algorithm question - how to reorder a sequence economically

2013-06-12 Thread Robert Kern
vided by a source such as /dev/random (on Unix systems). It's sometimes referred to as "cryptographic" randomness, due to its necessity in secure encryption work. There are various ways to get this in a cross-platform way. os.random() and os.urandom(), particularly. -- Robert Kern

Re: Newbie: standard way to add version, author and license to a source file?

2013-06-13 Thread Robert Kern
uthor: http://producingoss.com/en/license-quickstart.html#license-quickstart-applying -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth."

Re: Must we include urllib just to decode a URL-encoded string, when using Requests?

2013-06-13 Thread Robert Kern
so? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Must we include urllib just to decode a URL-encoded string, when using Requests?

2013-06-13 Thread Robert Kern
On 2013-06-13 14:25, Dotan Cohen wrote: On Thu, Jun 13, 2013 at 4:20 PM, Robert Kern wrote: Yes. Do you think there is a problem with doing so? I'm pretty sure that Requests will use either urllib or urllib2, depending on what is available on the server. No, it doesn't. It gets

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Robert Kern
hort-circuit. That is why the (name or month or year) returns the first truthy value while (name and month and year) returns the last truthy value. When "or" finds the first truthy value, it can stop looking since the whole expression must be truthy no matter what the values are a

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Robert Kern
? because that will evaluate to the correct Boolean value How do you mean? Please elaborate. Please read the link I gave. It explains why. http://docs.python.org/2/reference/expressions.html#boolean-operations -- Robert Kern "I have come to believe that the whole world is an enigma

Re: Don't feed the troll...

2013-06-15 Thread Robert Kern
client until they fix that. Sorry, I could have sworn you said you weren't using a mail client for this... He's suggesting that *you* who are using a mail reader to use the "reply to list" functionality or request it if it is not present. -- Robert Kern "I have come

Re: Timsort in Cpython

2013-06-15 Thread Robert Kern
ere, could somebody point to me which one is timsort? listsort() http://hg.python.org/cpython/file/default/Objects/listobject.c#l1896 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it a

Re: Timsort in Cpython

2013-06-15 Thread Robert Kern
(), etc. C.f. http://hg.python.org/cpython/file/default/Objects/listobject.c#l2362 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth.&q

Re: weird behavior. bug perhaps?

2013-06-18 Thread Robert Kern
lly, I recommend avoiding the matrix type. It causes too many problems. Stick to plain ndarrays. You will probably want to ask further numpy questions on the numpy-discussion mailing list: http://www.scipy.org/scipylib/mailing-lists.html -- Robert Kern "I have come to believe that

Re: n00b question on spacing

2013-06-25 Thread Robert Kern
That is not necessary. The rule is already there. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a name for a deployment framework...

2013-06-25 Thread Robert Kern
On 2013-06-24 13:50, Roy Smith wrote: Without forming any opinion on the software itself, the best advice I can offer is that naming puns are very popular. If you're thinking of this as a fabric replacement, I would go with cloth, textile, material, gabardine, etc. brocade -- Robert

Re: n00b question on spacing

2013-06-25 Thread Robert Kern
On 2013-06-25 12:48, Chris Angelico wrote: On Tue, Jun 25, 2013 at 9:19 PM, Robert Kern wrote: There is quite a bit of Python's lexical analysis that is specified in places other than the formal notation. That does not mean it is undefined. It is well defined in the lexer code an

Re: Why is the argparse module so inflexible?

2013-06-27 Thread Robert Kern
ding error(). https://github.com/ipython/ipython/blob/master/IPython/core/magic_arguments.py -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Making a pass form cgi => webpy framework

2013-06-28 Thread Robert Kern
different ways of deploying web applications without having to rewrite your code. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- U

Re: Making a pass form cgi => webpy framework

2013-06-28 Thread Robert Kern
On 2013-06-28 11:15, Νίκος wrote: Στις 28/6/2013 12:35 μμ, ο/η Robert Kern έγραψε: On 2013-06-28 04:38, Νίκος wrote: Στις 28/6/2013 2:08 πμ, ο/η Cameron Simpson έγραψε: Pick a simple framework or templating engine and try it. I have no recommendations to make in this area myself. Can you

Re: Problems with subclassing enum34

2013-06-28 Thread Robert Kern
Switching the order of the two might work. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with subclassing enum34

2013-06-28 Thread Robert Kern
On 2013-06-28 16:32, Thomas Heller wrote: Am 28.06.2013 17:25, schrieb Thomas Heller: Robert Kern: enum.EnumMeta uses super() in its __new__() implementation but _ctypes.PyCSimpleType doesn't. Thus, only _ctypes.PyCSimpleType.__new__() gets a chance to run. Switching the order of th

Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Robert Kern
ot;import numpy" in my code. The seems to be a result of using ipython, or at least how I am using it "ipython notebook --pylab inline". The --pylab option will do the following import: from matplotlib.pyplot import * That includes a "from numpy import *" in there.

Re: python adds an extra half space when reading from a string or list

2013-06-30 Thread Robert Kern
the gratuitous insults offlist. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listi

Re: python adds an extra half space when reading from a string or list

2013-06-30 Thread Robert Kern
On 2013-06-30 21:14, Νίκος wrote: Στις 30/6/2013 10:58 μμ, ο/η Robert Kern έγραψε: On 2013-06-30 18:24, Νίκος wrote: Στις 29/6/2013 8:00 μμ, ο/η Mark Lawrence έγραψε: Why this when the approach to Nick the Incompetant Greek has been to roll out the red carpet? Your mother is incompetent

Re: python adds an extra half space when reading from a string or list

2013-06-30 Thread Robert Kern
On 2013-06-30 22:57, Joshua Landau wrote: On 30 June 2013 20:58, Robert Kern wrote: On 2013-06-30 18:24, Νίκος wrote: Στις 29/6/2013 8:00 μμ, ο/η Mark Lawrence έγραψε: Why this when the approach to Nick the Incompetant Greek has been to roll out the red carpet? Your mother is

Re: indexerror: list index out of range??

2013-07-01 Thread Robert Kern
27;ll upset the Python Mailing List Police. *doesn't understand* Mark frequently makes similar comments (in content and tone) to people who come here using Google Groups. Presumably, he has received criticism for this (mostly on tone grounds, I imagine), either on or off list. -- Rober

Re: Need explanation of this error

2013-07-01 Thread Robert Kern
but failing. How did you install scipy? If you used a prebuilt binary installer, can you please link to the exact one that you used? Try using depends.exe to find out what DLL it is looking for. http://www.dependencywalker.com/ The file that you want to check in depends.exe: c:\Python

Re: File exists but Python says 'not found'.

2013-07-01 Thread Robert Kern
ion_2.py", line 80, in main train_data = pd.read_csv(train) Since the filename of regression_2.py in the traceback is fully-qualified, I expect that you are running the program from something other than the c:\Project_1\ directory. -- Robert Kern "I have come to believe that the whol

Re: OSError [Errno 26] ?!?!

2013-07-02 Thread Robert Kern
. He is indeed using actual, bona fide CGI scripts. It's not just an antiquated wording for "web app". -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: Important features for editors

2013-07-04 Thread Robert Kern
On 2013-07-04 10:14, Νίκος wrote: If you guys want to use it i can send you a patch for it. I know its illegal thing to say but it will help you use it without buying it. Please do not use this forum to make such offers. -- Robert Kern "I have come to believe that the whole world

Convert SOAP response (ArrayOfInt) to Python list

2013-07-04 Thread robert . winkler
Thanks to the OSA library, which works for SOAP requests with Python 3.x, I can now use SOAP services at http://www.chemspider.com. The results structure is int int The result is a list of accession numbers (which correspond to chemical compounds) and I get them i

calculating binomial coefficients using itertools

2013-07-05 Thread Robert Hunter
from itertools import count, repeat, izip, starmap def binomial(n): """Calculate list of Nth-order binomial coefficients using itertools.""" l = range(2) for _ in xrange(n): indices = izip(count(-1), count(1), repeat(1, len(l) + 1)) slices = starmap(slice, indices)

Re: Explain your acronyms (RSI?)

2013-07-06 Thread Robert Kern
' as a choice. "RSI wrist" would probably have been a wiser start. Not all medical conditions have medication associated with them. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt t

Re: Geo Location extracted from visitors ip address

2013-07-08 Thread Robert Kern
with the proper JavaScript to get the geolocation (if the user allows it) and then send it back to your server through a different CGI script (or web application endpoint). http://diveintohtml5.info/geolocation.html -- Robert Kern "I have come to believe that the whole world is an enigma, a h

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread Robert Kern
On 2013-07-10 10:52, Joshua Landau wrote: On 10 July 2013 10:12, Ian Kelly wrote: On Wed, Jul 10, 2013 at 2:46 AM, Mats Peterson wrote: Then they would have full control of this list and what gets pos Ahhh so this is pos, right? Telling the truth? Interesting. I don't know what you me

Re: could you change PYPI downloads number for not-uploaded packages?

2013-07-22 Thread Robert Kern
r package downloads from PyPI itself. There is no good way for PyPI to count downloads from any other source. What you might want to ask for instead is to have the download count not shown when the packages are not hosted on PyPI. That would be a reasonable change that I think the PyPI team woul

Re: Frustrating circular bytes issue

2012-06-26 Thread Robert Kern
fer_new: break lines = re.split(delimiter, buffer_old + buffer_new) buffer_old = lines.pop(-1) for line in lines: yield line yield buffer_old if __name__ == '__main__': d = Dummy() d.load_filename(__file__) -- Robert K

Re: question about numpy, subclassing, and a DeprecationWarning

2012-06-27 Thread Robert Kern
stions on the numpy mailing list. http://www.scipy.org/Mailing_Lists Personally, I recommend not subclassing ndarray at all. It rarely works out well. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad att

Re: lambda in list comprehension acting funny

2012-07-12 Thread Robert Kern
t tests for each would add significantly to those counts. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Text editors

2012-07-29 Thread Robert Marshall
s can do likewise[1] > I used to use tpu (used to have piles of tpu macros..) and I first got used to emacs by using its tpu mode - I see that still exists so you can use emacs and pretend it is really tpu! Robert -- La grenouille songe..dans son château d'eau Links and things http://rmstar.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Interview Questions

2012-08-14 Thread Robert Miles
On 7/10/2012 1:08 PM, Demian Brecht wrote: I also judge candidates on their beards (http://www.wired.com/wiredenterprise/2012/06/beard-gallery/). If the beard's awesome enough, no questions needed. They're pro. You should hire me quickly, then, since I have a beard, already turning partly gr

Re: lambda in list comprehension acting funny

2012-08-15 Thread Robert Miles
n has a version of Python available, in case you're interested. Robert Miles -- http://mail.python.org/mailman/listinfo/python-list

Re: type(None)()

2012-08-16 Thread Robert Kern
pes there is no use case for that. It's simpler to raise an error. What are the use cases for the empty-argument versions of bool(), int(), float(), and str()? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own m

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Robert Kern
you told the browser to treat it like plain text instead of HTML. Use text/html instead. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth."

Re: Encapsulation, inheritance and polymorphism

2012-08-18 Thread Robert Miles
On 7/23/2012 11:18 AM, Albert van der Horst wrote: In article <5006b48a$0$29978$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: Even with a break, why bother continuing through the body of the function when you already have the result? When your calculation is done, it's done, just

Re: Unittest - testing for filenames and filesize

2012-08-24 Thread Robert Day
On Fri, 2012-08-24 at 09:20 -0700, Tigerstyle wrote: > def test_3(self): > f = open("test.dat", "wb") > filesize = b"0"*100 > f.write(filesize) > f.close() > self.assertEqual(os.stat, filesize) > The test_3 is to test if the created binary file har

Re: the meaning of r?.......ï¾

2012-08-28 Thread Robert Miles
On 7/23/2012 1:10 PM, Dennis Lee Bieber wrote: On Mon, 23 Jul 2012 16:42:51 +0200, Henrik Faber declaimed the following in gmane.comp.python.general: If that was written by my coworkers, I'd strangle them. My first real assignment, 31 years ago, was porting an application to CDC MP-

Re: catch UnicodeDecodeError

2012-08-29 Thread Robert Miles
On 7/26/2012 5:51 AM, Jaroslav Dobrek wrote: And the cool thing is: you can! :) In Python 2.6 and later, the new Py3 open() function is a bit more hidden, but it's still available: from io import open filename = "somefile.txt" try: with open(filename, encoding="utf-8")

Re: Dumping all the sql statements as backup

2012-08-29 Thread Robert Miles
On 7/25/2012 8:56 AM, andrea crotti wrote: I have some long running processes that do very long simulations which at the end need to write things on a database. At the moment sometimes there are network problems and we end up with half the data on the database. The half-data problem is probably

Re: OT: Text editors

2012-08-30 Thread Robert Miles
uperminis. I'm not sure whether I still could, though. Robert Miles -- http://mail.python.org/mailman/listinfo/python-list

Re: Obnoxious postings from Google Groups

2012-09-20 Thread Robert Miles
, not something you have much control over, except to stop using Google Groups. Could this mean that Google wants all the spam posted through Google Groups to look obnoxious to the rest of Usenet that the spammers will go elsewhere? Robert Miles -- http://mail.python.org/mailman/listinfo/python-list

Re: Private methods

2012-10-09 Thread Robert Kern
that other things don't need to care about. In Python, using an underscore is simply a convention to note that a method is private - it doesn't actually hide it from other things - correct? This is correct. -- Robert Kern "I have come to believe that the whole world is an enigm

Re: Private methods

2012-10-10 Thread Robert Kern
l_analysis.html#reserved-classes-of-identifiers -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: serialization and versioning

2012-10-12 Thread Robert Kern
ves as implying "version 0". -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: [on topic] Re: readline trick needed

2012-10-16 Thread Robert Kern
using IPython, the pure Python REPL for CPython, for IronPython, the C# implementation of Python? https://github.com/ipython/ipython -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as

Re: OT Questions

2012-10-17 Thread Robert Kern
well, so don't get uppity with me. No, you misread his sentence. That's not at all what he was saying. He was saying that one of the benefits that a person may get from working with people smarter than said person is that they can ascertain said person's strengths. -- Robert Kern

Re: Aggressive language on python-list

2012-10-18 Thread Robert Kern
tly state so, but the lack of such a statement is not an excuse for the recipient to make the email public. The default assumption must be that they meant to send it to exactly those people they actually sent it to. Thank you for listening. -- Robert Kern "I have come to believe that the w

Re: turn list of letters into an array of integers

2012-10-24 Thread Robert Kern
On 10/24/12 1:03 PM, 8 Dihedral wrote: The list in python is a list of valid python objects. For the number crunching part, please use arrays in numarray and scipy. Your bot's database is laughably out of date. -- Robert Kern "I have come to believe that the whole world is an

Re: Obnoxious postings from Google Groups

2012-10-30 Thread Robert Miles
ple levels of quoting. The incompatibility tends to insert a blank line after every line. With multiple levels of quoting, this gives blank line groups that often roughly double in size for every level of quoting. Robert Miles -- http://mail.python.org/mailman/listinfo/python-list

Re: Obnoxious postings from Google Groups

2012-10-30 Thread Robert Miles
On 9/16/2012 10:44 AM, pandora.ko...@gmail.com wrote: Whaen i tried to post just now by hitting sumbit, google groups told me that the following addresssed has benn found in this thread! i guess is used them all to notify everything! cdf072b2-7359-4417-b1e4-d984e4317...@googlegroups.com mailma

Re: Obnoxious postings from Google Groups

2012-10-30 Thread Robert Miles
On 9/16/2012 8:14 PM, alex23 wrote: On Sep 17, 10:55 am, Roy Smith wrote: They didn't buy the service. They bought the data. Well, they really bought both, but the data is all they wanted. I thought they'd taken most of the historical data offline now too? Some of it, but they still had m

Re: datetime issue

2012-10-31 Thread Robert Miles
On 10/31/2012 2:35 PM, ru...@yahoo.com wrote: On 10/31/2012 09:11 AM, Grant Edwards wrote:> On 2012-09-16, ?? wrote: Iam positng via google groups using chrome, thats all i know. Learn something else. Google Groups is seriously and permanently broken, and all posts from Googl

Re: datetime issue

2012-10-31 Thread Robert Miles
On 10/31/2012 4:38 PM, Mark Lawrence wrote: On 31/10/2012 19:35, ru...@yahoo.com wrote: On 10/31/2012 09:11 AM, Grant Edwards wrote:> On 2012-09-16, ?? wrote:. "Broken"? Yes. But so is every piece of software in one way or another. Thunderbird is one of the most perpetually bug

Re: Python garbage collector/memory manager behaving strangely

2012-10-31 Thread Robert Miles
On 9/16/2012 9:12 PM, Dave Angel wrote: On 09/16/2012 09:07 PM, Jadhav, Alok wrote: Hi Everyone, I have a simple program which reads a large file containing few million rows, parses each row (`numpy array`) and converts into an array of doubles (`python array`) and later writes into an `hdf5

Re: Negative array indicies and slice()

2012-11-01 Thread Robert Kern
"step" slot, mgrid will interpret it as the number of items requested instead of the step. [~] |6> numpy.mgrid[1.5:2.5:11j] array([ 1.5, 1.6, 1.7, 1.8, 1.9, 2. , 2.1, 2.2, 2.3, 2.4, 2.5]) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless

Re: how to perform word sense disambiguation?

2012-11-01 Thread Robert Kern
/ch06.html http://nltk.org/api/nltk.classify.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.o

Re: Organisation of python classes and their methods

2012-11-02 Thread Robert Kern
eat each time a new version of the 'official' class file is released. Do not make them methods of the time-series class. Make functions that take a time-series object. Then you can organize the functions in separate modules to your heart's content and import them all into a single

Re: Negative array indicies and slice()

2012-11-02 Thread Robert Kern
index or offset is needed, not just in slices. List indices, file.seek(), mmap.mmap(), etc. The change to use PyIndex_Check() instead of PyInt_Check() was not very difficult or extensive. Even if you were to change the slicing API for your other reasons, __index__() would still be needed. -- Rob

Re: Organisation of python classes and their methods

2012-11-02 Thread Robert Kern
doc/numpy/reference/index.html http://docs.scipy.org/doc/scipy/reference/index.html http://www.sagemath.org/doc/reference/ http://docs.sympy.org/0.7.2/modules/index.html http://scikit-learn.org/stable/modules/classes.html -- Robert Kern "I have come to believe that the whole world is

Re: Organisation of python classes and their methods

2012-11-02 Thread Robert Kern
a analysis environment. Frequently, they not only have to describe what it's doing, but also introduce the whole concept of what it's doing, why you would want to do such a thing, and provide examples of its use. That's why they are so long. For example: http://docs.scipy.org/doc

Re: word sense disambiguation

2012-11-02 Thread Robert Kern
g/api/nltk.classify.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Proper place for everything

2012-11-02 Thread Robert Kern
be a strange question, but I might as well start somewhere. There are plenty of good, free blog hosting options. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underl

Re: Strange object identity problem

2012-11-12 Thread Robert Franke
11 150835852 > 2012 149727788 > >>>> for y in sorted (bas.keys ()): > b = bas [year] Shouldn't that be b = bas[y]? > print y, id (b) > > 2010 149727788 > 2011 149727788 > 2012 149727788 > [...] Cheers, Robert -- http://mail.python.org/mailman/listinfo/python-list

Upcoming Webinar "SQLAlchemy Creator Mike Bayer on How and Why to Integrate Akiban and SQLAlchemy"

2012-11-13 Thread Robert Riegel
nd we'll share the recording after the event. *Akiban* 560 Harrison Avenue, Suite 411 Boston, MA 02445 United States of America Contact Us <http://info.akiban.com/contact-us.html> -- Robert Riegel @akiban <https://twitter.com/#!/akiban> skype: robert.c.riegel.III | 617-826-9990 -- http://mail.python.org/mailman/listinfo/python-list

Re: Unpaking Tuple

2012-11-18 Thread Robert Miles
On 10/9/2012 1:07 AM, Bob Martin wrote: in 682592 20121008 232126 "Prasad, Ramit" wrote: Thomas Bach wrote:=0D=0A> Hi there,=0D=0A> =0D=0A> On Sat, Oct 06, 2012 at = 03:08:38PM +, Steven D'Aprano wrote:=0D=0A> >=0D=0A> > my_tuple =3D my_= tuple[:4]=0D=0A> > a,b,c,d =3D my_tuple if len(my_tu

Re: Spam source (Re: Horror Horror Horror!!!!!)

2012-11-18 Thread Robert Miles
On Sunday, November 18, 2012 1:35:00 PM UTC-6, Terry Reedy wrote: > The question was raised as to how much spam comes from googlegroups. > > Not all, but more that half, I believe. This one does. > > > > From: MoneyMaker > > ... > > Message-ID: <2d2a0b98-c587-4459-9489-680b1ddc4...@googlegro

Re: Web Frameworks Excessive Complexity

2012-11-20 Thread Robert Kern
urnal/PaperInformation.aspx?paperID=779 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Web Frameworks Excessive Complexity

2012-11-20 Thread Robert Kern
On 20/11/2012 19:46, Andriy Kornatskyy wrote: Robert, Thank you for the comment. I do not try relate CC with LOC. Instead pointing to excessive complexity, something that is beyond recommended threshold, a subject to refactoring in respective web frameworks. Those areas are likely to be

Re: Web Frameworks Excessive Complexity

2012-11-20 Thread Robert Kern
On 20/11/2012 20:22, Andriy Kornatskyy wrote: Robert, I respect your point of view and it definitely make sense to me. I personally do not have a problem to understand CC but agree, method LoC is easier to understand. Regardless the path your choose in your next refactoring (based on method

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Robert Kern
On 21/11/2012 01:43, Steven D'Aprano wrote: On Tue, 20 Nov 2012 20:07:54 +0000, Robert Kern wrote: The source of bugs is not excessive complexity in a method, just excessive lines of code. Taken literally, that cannot possibly the case. def method(self, a, b, c): do_t

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Robert Kern
On 21/11/2012 11:02, Andriy Kornatskyy wrote: Robert, You would never get a better product by accident. The meaning of better product might differ from team to team but you can not ignore excessive complexity. Earlier or later you get back to that code and refactor it, thus existence of

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Robert Kern
ction. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Robert Kern
On 21/11/2012 12:47, Andriy Kornatskyy wrote: Hm... what serves an evidence purpose for you? Well-done empirical studies, like the one I gave you. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attem

Re: Spam source (Re: Horror Horror Horror!!!!!)

2012-11-22 Thread Robert Miles
On Sunday, November 18, 2012 8:18:53 PM UTC-6, Mark Lawrence wrote: > On 18/11/2012 19:31, Terry Reedy wrote: > > > The question was raised as to how much spam comes from googlegroups. > > I don't know the answer but I take the greatest pleasure in hurtling > onto the dread googlegroups and gman

Password hash

2012-12-23 Thread Robert Montgomery
I am writing a script that will send an email using an account I set up in gmail. It is an smtp server using tls on port 587, and I would like to use a password hash in the (python) script for login rather than plain text. Is this do-able? Details please. -- http://mail.python.org/mailman/listinf

Re: Numpy outlier removal

2013-01-07 Thread Robert Kern
a is not "really" normal. "Having outliers" literally means that assuming normality is not fine. If assuming normality were fine, then you wouldn't need to remove outliers. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enig

Re: [Offtopic] Line fitting [was Re: Numpy outlier removal]

2013-01-08 Thread Robert Kern
ns of slowing down *should* be alarming. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: [Offtopic] Line fitting [was Re: Numpy outlier removal]

2013-01-08 Thread Robert Kern
On 08/01/2013 20:14, Chris Angelico wrote: On Wed, Jan 9, 2013 at 2:55 AM, Robert Kern wrote: On 08/01/2013 06:35, Chris Angelico wrote: ... it looks quite significant to show a line going from the bottom of the graph to the top, but sounds a lot less noteworthy when you see it as a half

Re: Reinforced Concrete: Mechanics and Design (5th Ed., James G. MacGregor & James K. Wight)

2013-01-18 Thread Robert Miles
On 1/18/2013 7:32 PM, Roy Smith wrote: Can whoever manages the mailing list block this bozo? In article , kalvinmanual1 wrote: I have solutions manuals to all problems and exercises in these textbooks. To get one in an electronic format contact me at: kalvinmanual(at)gmail(dot)com and let m

Re: importing module versus using function?

2012-01-31 Thread Robert Kern
x27;s namespace in which the function is defined, not one of the many namespaces where the function is called from. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an un

Re: Numeric root-finding in Python

2012-02-12 Thread Robert Kern
oximation. This mostly works well, but sometimes the root-finder gets stuck in a cycle. I don't have any advice for fixing your code, per se, but I would just grab mpmath and use their lambertw function: http://mpmath.googlecode.com/svn/trunk/doc/build/functions/powers.html#lambert-w-function

Re: Numerical Linear Algebra in arbitrary precision

2012-02-17 Thread Robert Kern
ic tasks: http://docs.scipy.org/doc/numpy/reference/routines.linalg.html This will not do arbitrary-precision, though. We use the double- and single-precision routines from LAPACK. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by

<    1   2   3   4   5   6   7   8   9   10   >