Re: Curious Omission In New-Style Formats

2016-07-14 Thread Robert Kern
erm "significand" and specifically avoids the term "mantissa". Confirmed. -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: Quick poll: gmean or geometric_mean

2016-07-09 Thread Robert Kern
On 2016-07-09 17:13, Michael Selik wrote: On Sat, Jul 9, 2016 at 10:17 AM Jason Friedman wrote: +1 for consistency What do other languages use? R, the most likely candidate, doesn't have them built-in. scipy.stats uses gmean() and hmean() -- Robert Kern "I have come to believ

Re: Gzip module does not support Unix compressed .Z files [SEC=UNOFFICIAL]

2016-07-04 Thread Robert Kern
When I am right, then the "zipfile" module handles ".Z" compressed files. No, that handles PKZIP .zip files. There are third-party modules that handle the .Z format, but shelling out to external programs may still be preferable: https://github.com/umeat/unlzw -- Robert Kern

Re: Well, I finally ran into a Python Unicode problem, sort of

2016-07-03 Thread Robert Kern
ngs are clearly delimited. Keywords, operators, and [{(braces)}] are all explicitly whitelisted from finite lists. Well, I guess it could have been intended by the user to be a numerical literal, but I suspect that's attempted before identifier. -- Robert Kern "I have come to believe t

Re: sympy

2016-03-30 Thread Robert Kern
/lambdify.html#sympy.utilities.lambdify.lambdify -- 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 -- https://mail.python.o

Re: How can I get/save Pandas DataFrame help content?

2015-12-17 Thread Robert Kern
page this: In [1]: pandas.DataFrame? http://ipython.readthedocs.org/en/stable/interactive/reference.html#dynamic-object-information -- 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

Re: Question about figure plot

2015-12-15 Thread Robert Kern
f the examples here (note: "pylab" is the essentially the same as "pyplot" for these purposes): http://matplotlib.org/examples/pylab_examples/index.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terr

Re: don't understand matrix-multiplication should be reversed in python?

2015-11-12 Thread Robert Kern
put. There is no "reversed definition of rows and columns". He simply instantiated the two vectors as row-vectors instead of column-vectors, which he could have easily done, so he had to flip the matrix expression. -- Robert Kern "I have come to believe that the whole world is an

Re: (side-)effects and ...

2015-07-05 Thread Robert Kern
ppend(self, x) which will give you different results depending on the number of times you call it, even if the arguments are the same. Functions that don't change state at all are naturally idempotent, but many idempotent functions do change state. -- Robert Kern "I have come to beli

Re: calculating entropy of image or alternative?

2015-07-03 Thread Robert Kern
uantity that your code is computing will be exactly the same because the pixels contribute to the histogram in the same way. -- 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

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-30 Thread Robert Kern
always has the same number of children, etc.), then it probably does represent an ordered collection. If it's variable, then putting it into a table structure probably doesn't make any sense regardless of ordering issues. -- Robert Kern "I have come to believe that the whole world

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-29 Thread Robert Kern
.w3.org/TR/xml-infoset/#infoitem.element If it didn't, then XHTML would have a hell of a time with ordered constructs like this: First item Second item Third item -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is

Re: Pure Python Data Mangling or Encrypting

2015-06-27 Thread Robert Kern
On 2015-06-27 08:58, Robert Kern wrote: On 2015-06-27 04:38, Steven D'Aprano wrote: Maybe you use Python's standard library and the Mersenne Twister. The period of that is huge, possibly bigger than 256! (or not, I forget, and I'm too lazy to look it up). So you think that'

Re: Pure Python Data Mangling or Encrypting

2015-06-27 Thread Robert Kern
Mersenne Twister is not a cryptographically secure pseudorandom number generator. If I can get some small number of values from the Twister (by memory, something of the order of 100 such values) then I can predict the rest for ever. 634. -- Robert Kern "I have come to believe that the whole world is an e

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-10 Thread Robert Kern
On 2015-06-10 13:08, Marko Rauhamaa wrote: Robert Kern : By the very nature of the stated problem: serializing all language objects. Being able to construct any object, including instances of arbitrary classes, means that arbitrary code can be executed. All I have to do is make a pickle file

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-10 Thread Robert Kern
ent module, or did one of your third-party dependencies do this? Poof! Your pickle files no longer 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 u

Re: Tit for tat

2015-04-28 Thread Robert Kern
ed for it, using two different search engines, and neither come up with any references for "Toot For Tail" strategies. I do believe he is trying to make a crude joke. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: [SciPy-User] Is there existing code to log-with-bells-on for runtime algorithm diagnostics?

2015-04-21 Thread Robert Kern
ured logging". http://www.structlog.org/en/stable/ http://eliot.readthedocs.org/en/stable/ https://twiggy.readthedocs.org/en/latest/logging.html#structured-logging http://netlogger.lbl.gov/ -- Robert Kern -- https://mail.python.org/mailman/listinfo/python-list

Re: Code critique please

2015-04-08 Thread Robert Kern
compatible. https://pillow.readthedocs.org/porting-pil-to-pillow.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 -- h

Re: PiCxx

2015-03-29 Thread Robert Kern
current license. http://opensource.org/licenses -- 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 -- https://mail.python.or

Re: Use à Python 2 module with Python 3

2015-03-11 Thread Robert Kern
by the initial development team due to a lack of funding, so right now the destiny of the bugs such as this is in hands of those who understand how to debug them." (Quoted from https://bugreports.qt.io/browse/PYSIDE-164) Anatoly was wrong. -- Robert Kern "I have come to believe t

Re: Use à Python 2 module with Python 3

2015-03-11 Thread Robert Kern
optional style guide. -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about python package numpy

2015-03-02 Thread Robert Kern
e of these examples come prepackaged in any distribution I am aware of. You are intended to copy-and-paste them from the wiki if you want to use 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 to

Re: Bug in timsort!?

2015-02-25 Thread Robert Kern
_at(ms, n) < 0) return -1; } else break; } return 0; } Or does "Python function" mean something else in this context? "Corrected merge_collapse function [from the Python implementation of TimSort]" as opposed t

Re: line_profiler: what am I doing wrong?

2015-02-16 Thread Robert Kern
On 2015-02-13 13:35, Neal Becker wrote: Robert Kern wrote: @profile def run(): pass run() No, this doesn't work either. Same failure kernprof -l test_prof.py Wrote profile results to test_prof.py.lprof Traceback (most recent call last): File "/home/nbecker/.local/bin/kernpro

Re: line_profiler: what am I doing wrong?

2015-02-11 Thread Robert Kern
s way? Does a trivial module work? I.e. """ @profile def run(): pass run() """ -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: line_profiler: what am I doing wrong?

2015-02-11 Thread Robert Kern
line_profiler is written in C, perhaps the author (Robert Kern) doesn't care about supporting Jython or IronPython, but there may be Python implementations (PyPy perhaps?) which can run C code but don't have __builtins__. Indeed, I do not care about any of them. PyPy does not i

Re: [OT] Question about Git branches

2014-09-16 Thread Robert Kern
On 2014-09-16 17:25, Chris Angelico wrote: On Wed, Sep 17, 2014 at 2:08 AM, Robert Kern wrote: Yes, but this is due to different design decisions of git and Mercurial. git prioritized the multiple branches in a single clone use case; Mercurial prioritized re-cloning. It's natural to do

Re: [OT] Question about Git branches

2014-09-16 Thread Robert Kern
orrectly, the way to begin an experimental branch is to use hg clone. Yes, but this is due to different design decisions of git and Mercurial. git prioritized the multiple branches in a single clone use case; Mercurial prioritized re-cloning. It's natural to do this kind of branching in gi

Re: Python vs C++

2014-08-24 Thread Robert Kern
esire to learn it. Trouble is, I don't have any project that calls for it - there's nothing I'm desperately wanting to do that involves both Python and C/C++. Anyone got any suggestions? :) Class-based, Python 3-compatible bindings for libtcod? http://doryen.eptalys.net/libtcod/

Re: 'is not' or '!='

2014-08-20 Thread Robert Kern
h the committer's name/id. I use it all the time at $DAYJOB. I've managed to avoid CVS, so I can't speak to that. cvs annotate http://compbio.soe.ucsc.edu/cvsdoc/cvs-manual/cvs_74.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma t

Re: how to get the ordinal number in list

2014-08-11 Thread Robert Kern
ation? Using [x] for subscripts: x[n+1] = x[n] + 1 we have a perfectly good mathematical recursive definition. All it needs is an initial value x[0] and we're good to go. Or a different operator for assignment (to distinguish it more clearly from equality, which it isn't). x <- x

Re: Bug with help (was Re: Getting a list of all modules)

2014-08-02 Thread Robert Kern
sh is in the 3rd party modules, Python could (and maybe Python 3 does) import each module in a separate subprocess and collect the information that way. -- 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

Re: Getting a list of all modules

2014-08-01 Thread Robert Kern
http://code.google.com/p/tabhistory/source/browse/tabhistory.py where I have indenting, code completion, filename completion, and module completion all working to some degree or another. Take a look at what has already been implemented in IPython: https://github.com/ipython/ipython/blob/master/IPyth

Re: Getting a list of all modules

2014-07-30 Thread Robert Kern
es that cannot be imported because their names are not Python identifiers: e.g. check-newconfigs.py. Those are easy to filter out, fortunately. -- 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

Re: Proposal: === and !=== operators

2014-07-09 Thread Robert Kern
] |2> x == 3 array([False, False, False, True, False], dtype=bool) You can blame Numeric/numpy for that feature getting in. :-) Now certainly, many uses of __eq__, like containment comparisons, do assume that the result is a bool(able). -- Robert Kern "I have come to believe that the w

Re: Module name does not match file name

2014-07-07 Thread Robert Kern
On 2014-07-07 12:56, Steven D'Aprano wrote: On Mon, 07 Jul 2014 12:15:51 +0100, Robert Kern wrote: On 2014-07-07 09:57, Steven D'Aprano wrote: What I don't understand is how "import pg" gets turned into "run pgmodule.so"? This has been standard Python b

Re: Module name does not match file name

2014-07-07 Thread Robert Kern
[~] |1> import imp [~] |2> imp.get_suffixes() [('.so', 'rb', 3), ('module.so', 'rb', 3), ('.py', 'U', 1), ('.pyc', 'rb', 2)] -- Robert Kern "I have come to believe that the whole world is an enigma, a har

Re: PEP8 and 4 spaces

2014-07-05 Thread Robert Kern
g form feeds to separate sections of 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." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list

Re: Single underscore in interactive mode

2014-06-25 Thread Robert Kern
ode ? See the documentation on `sys.displayhook()`, which is the function that makes the assignment: https://docs.python.org/3/library/sys.html#sys.displayhook -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own

Re: Python's re module and genealogy problem

2014-06-11 Thread Robert Kern
egex. This will help you QA your regexes, too, to be sure that they match what you expect them to and not match non-names. https://github.com/asciimoo/exrex -- 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

Re: Numpy Array of Sets

2014-05-24 Thread Robert Kern
ts like so: [[]]*3 https://docs.python.org/2/faq/programming.html#how-do-i-create-a-multidimensional-list -- 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: Parallel python in the cloud

2014-05-24 Thread Robert Kern
s your client code (i.e. what you wrote above) is concerned, it's just another library. E.g. https://github.com/ipython/ipython/blob/master/examples/Parallel%20Computing/nwmerge.py https://github.com/ipython/ipython/blob/master/examples/Parallel%20Computing/itermapresult.py etc. -- Robert Ker

Re: Python and Math

2014-05-21 Thread Robert Kern
But all easily available with well-established open source packages. Just because it's not in the standard library doesn't mean that Python isn't a suitable language for doing this stuff. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless

Re: Python and Math

2014-05-21 Thread Robert Kern
/ Can do heaps of stuff, too. For free. And with Python! http://sagemath.org/ -- 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: Python and Math

2014-05-18 Thread Robert Kern
;math"). Many mathematicians would disagree. http://sagemath.org/ -- 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 E

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Robert Kern
On 2014-05-17 13:07, Steven D'Aprano wrote: On Sat, 17 May 2014 09:57:06 +0100, Robert Kern wrote: On 2014-05-17 02:07, Steven D'Aprano wrote: On Fri, 16 May 2014 14:46:23 +, Grant Edwards wrote: At least in the US, there doesn't seem to be such a thing as "pla

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Robert Kern
On 2014-05-17 15:15, Steven D'Aprano wrote: On Sat, 17 May 2014 10:29:00 +0100, Robert Kern wrote: One can state many things, but that doesn't mean they have legal effect. The US Code has provisions for how works become copyrighted automatically, how they leave copyright automatica

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Robert Kern
Note how they distinguish the CC0 Waiver from their Public Domain Mark: the Public Domain Mark is just a label for things that are known to be free of copyright worldwide but does not make a work so. The CC0 *does* have an operative effect that is substantially similar to the work being in the

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Robert Kern
public domain. The author has no choice in the matter. -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: First attempt at a Python prog (Chess)

2014-04-30 Thread Robert Kern
tening to. He is to be killfiled and ignored. Chris, I'm sorry you ran into him on your first introduction to this community. -- 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: Simple question

2014-04-15 Thread Robert Kern
rt Decimal' you can get a much closer result i.e. 'Decimal('0.0')' What I'm wondering is why the first calculation that arrives at '5.55111...' is so far out? The `...` elides the exponent: >>> 0.1 + 0.1 + 0.1 - 0.3 5.551115123125783e-17 If you c

Re: Examples of modern GUI python programms

2014-04-03 Thread Robert Kern
On 2014-04-02 12:52, Sturla Molden wrote: Wolfgang Keller wrote: Judging from the example screenshots on their website, Kivy might be adequate. Kivy depends on PyGame which is GPL, and can only be used to build GPL software. It is not. http://www.pygame.org/LGPL -- Robert Kern "I

Re: pip and distutils2-1.0a4

2014-03-03 Thread Robert Kern
On 2014-03-03 21:37, Mark H. Harris wrote: On Monday, March 3, 2014 3:32:43 PM UTC-6, Robert Kern wrote: Probably. If you want us to help, you need to show us what you tried, tell us what results you expected, and copy-paste the output that you got. Robert Kern hi Robert, well, I finally

Re: pip and distutils2-1.0a4

2014-03-03 Thread Robert Kern
If you want us to help, you need to show us what you tried, tell us what results you expected, and copy-paste the output that you got. -- 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

Re: An example of Python in action!

2014-02-25 Thread Robert Kern
software from AutoDesk. -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: singleton ... again

2014-02-13 Thread Robert Kern
7;, but since that optimization isn't guaranteed, neither is that code pattern. We don't use `is None` instead of `== None` for the speed. We use it for robustness. We don't want arbitrary __eq__()s to interfere with our sentinel tests. If None weren't a singleton that we could

Re: [OT] Usage of U+00B6 PILCROW SIGN

2014-02-06 Thread Robert Kern
g to. It's working for me now. -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: pytz question: GMT vs. UTC

2014-01-31 Thread Robert Kern
ng UNICODE DOUBLE COMBINING LINEFEED WITH QUOTE MARKER as line terminators. >>> len('\n\n>') 3 Clearly, the FSR is broken beyond repair. -- 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: data validation when creating an object

2014-01-16 Thread Robert Kern
ying to get our unit test suite to run faster. I came across one slow test which had an interesting twist. The class being tested had an __init__() method which read over 900,000 records from a database and took something like 5-10 seconds to run. Man, talk about heavy-weight constructors :-) I

Re: data validation when creating an object

2014-01-16 Thread Robert Kern
On 2014-01-16 16:18, Roy Smith wrote: On Thursday, January 16, 2014 10:46:10 AM UTC-5, Robert Kern wrote: I prefer to keep my __init__() methods as dumb as possible to retain the flexibility to construct my objects in different ways. Sure, it's convenient to, say, pass a filename and hav

Re: Debugging on the Mac question.

2014-01-03 Thread Robert Kern
der Perl I just added the -d switch and had a full debugger that worked at the console level. Python also has a console debugger. -d does not invoke it; -d is for something else. $ python -m pdb myscript.py http://docs.python.org/3.3/library/pdb -- Robert Kern "I have come to believe

Re: how to handle captcha through machanize module or any module

2013-12-18 Thread Robert Kern
n, but not this. Please stop asking this question. -- 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 -- https://mail.python.

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Robert Kern
-- It most certainly is not. wxPython has handled Unicode (via `unicode` strings) for many, many years now. -- 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

Re: smart splitting - how to

2013-12-13 Thread Robert Kern
ibrary/shlex [~] |1> import shlex [~] |2> shlex.split(r'"Guido \"van\" Rossum" invented Python') ['Guido "van" Rossum', 'invented', 'Python'] -- Robert Kern "I have come to believe that the whole world is an eni

Re: Figuring out what dependencies are needed

2013-12-11 Thread Robert Kern
t (if any) error message is given by that assert, or how it fails. No, the > arrow points to the active line in that frame of the traceback. Unfortunately, the OP cut off the remaining frames under `load_from_yahoo()` actually has the assert that is failing. -- Robert Kern "I h

Re: Does Python optimize low-power functions?

2013-12-06 Thread Robert Kern
han numerical exponentiation where `x**2` is not equivalent to `x*x`. Since objects are free to do so, the interpreter itself cannot choose to optimize that exponentiation down to multiplication. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made t

Re: Packaging a proprietary Python library for multiple OSs

2013-12-05 Thread Robert Kern
ENET server (not just an NNTP server) to access. -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: Extending the 'function' built-in class

2013-12-01 Thread Robert Kern
ot-subtype#20030324rcnwbkfedhzbaf3vmiuer3z4xq -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-27 Thread Robert Kern
On 2013-11-27 13:29, rusi wrote: On Wednesday, November 27, 2013 6:27:52 PM UTC+5:30, Robert Kern wrote: On 2013-11-27 08:16, Antoon Pardon wrote: Op 26-11-13 22:42, Tim Delaney schreef: On 27 November 2013 03:57, Antoon Pardon wrote: So I can now ask my questions in dutch and expect

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-27 Thread Robert Kern
ilege given to any particular dialect has nothing to do with the form of the dialect itself and everything to do with the sociopolitical history of its speakers. None of that is relevant to speaking comprehensibly in an international environment. -- Robert Kern "I have come to believe that t

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-27 Thread Robert Kern
icantly matter. [1] To the extent that there is such a thing as a "standard" form of any language. Which there isn't, but I will grant you your premise for the time being. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is

Re: Cracking hashes with Python

2013-11-26 Thread Robert Kern
t in class about this subject? -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: argparse feature request

2013-11-22 Thread Robert Kern
On 2013-11-22 18:15, Neal Becker wrote: Robert Kern wrote: On 2013-11-22 16:52, Neal Becker wrote: Robert Kern wrote: On 2013-11-22 14:56, Neal Becker wrote: I use arparse all the time and find it serves my needs well. One thing I'd like to see. In the help message, I'

Re: argparse feature request

2013-11-22 Thread Robert Kern
On 2013-11-22 16:52, Neal Becker wrote: Robert Kern wrote: On 2013-11-22 14:56, Neal Becker wrote: I use arparse all the time and find it serves my needs well. One thing I'd like to see. In the help message, I'd like to automatically add the default values. What I'd

Re: argparse feature request

2013-11-22 Thread Robert Kern
) parser.add_argument('file', help='The sample file.') ... [git/mpstack]$ python print_stacks.py -h usage: print_stacks.py [-h] [-p] file positional arguments: file The sample file. optional arguments: -h, --help show this help message and exit -p, --perc

Re: Question regarding 2 modules installed via 'pip'

2013-11-16 Thread Robert Kern
r the code of conduct. I'm old enough to remember moderated listservs (as was the fashion at the time) that would automatically reply to each new poster with the listserv's charter and expected rules of netiquette (which is what we called it in those halcyon days). -- Robert Kern "I

Re: Question regarding 2 modules installed via 'pip'

2013-11-16 Thread Robert Kern
On 2013-11-16 13:59, Νίκος wrote: HELP ME The kind people at http://serverfault.com/ can help you with your system administration problems. I'm afraid that we cannot. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is mad

Re: To whoever hacked into my Database

2013-11-14 Thread Robert Kern
our server administration questions. Try this one: http://serverfault.com/ -- 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 -- htt

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Robert Kern
ble, but it may not be hashable because one of its contained objects is unhashable (whether due to mutability or something else). So your function is subject to both false negatives and false positives. Agreed. -- Robert Kern "I have come to believe that the whole world is an enigma, a

Re: New user's initial thoughts / criticisms of Python

2013-11-11 Thread Robert Kern
draw from the random tables on Abulafia[2] which have nearly the same structure. It scales up reasonably well beyond d100s. It's certainly not a technique I would pull out to replace one-off if-elif chains that you literally write, but it works well when you write the generic code once to a

Re: Code with random module faster on the vm than the vm host...

2013-11-10 Thread Robert Kern
. os.urandom() gets called in the initial default seeding, but not for each value. -- 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: Adding 'download' column to existing 'visitors' table (as requested)

2013-11-09 Thread Robert Kern
e that. Just a majority of Greeks? How comforting. Please don't. -- 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

Re: datetime question

2013-11-08 Thread Robert Kern
forum. -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Robert Kern
On 2013-10-31 14:49, Chris Angelico wrote: On Fri, Nov 1, 2013 at 1:41 AM, Robert Kern wrote: On 2013-10-31 14:05, Chris Angelico wrote: On Fri, Nov 1, 2013 at 12:17 AM, Alain Ketterlin wrote: "E.D.G." writes: The calculation speed question just involves relatively s

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Robert Kern
ays, then only the arrays need to be unboxed once, then the rest of the arithmetic happens in C. -- 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: skipping __init__ and using exploiting a class member instead

2013-10-19 Thread Robert Kern
a default for an instance attribute is accepted practice, and one that gets touted as a positive feature of Python's namespace model when compared against other languages. That said, I have seen it more often in the past. [1] In the general "unchanging" sense rather than the C++ "sta

Re: strange array size problem

2013-10-18 Thread Robert Kern
example (with data) that demonstrates the problem. Use pastebin.com or a similar service if necessary. http://www.scipy.org/scipylib/mailing-lists.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 attem

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Robert Kern
e and axe on the end. Just 'cos that would be cooler than naming it after the fish. I don't know which it was named after (could also be a road, eg turnpike), but the language's logo is the fish. Our logo is a snake, so that's obviously not a good guide. :-) -- Robert Kern

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Robert Kern
ral term applied to things with a pointed tip. The fish name is a shortening of "pike-fish", so it's obviously not the source of the word. The weapon only really comes into fashion a couple of centuries after the fish's name is first recorded, so it's not the source either.

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Robert Kern
explanation. I studied it briefly in class in 1970, and have no idea if there are current implementations. You are in luck! GNU APL 1.0 was just released! http://www.gnu.org/software/apl/ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made ter

Re: Referrer key missing form os.environ dictionary?

2013-09-26 Thread Robert Kern
HTTP request, headers and body, through stdin and just make the program parse them apart. -- 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: Referrer key missing form os.environ dictionary?

2013-09-25 Thread Robert Kern
line, you have probably left off a closing bracket or something similar in a previous line. Look back a few lines. -- 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 u

Re: Possibilities of Building "Stacked Neural Networks"

2013-09-25 Thread Robert Kern
one will probably take a couple of days of computation (for the final run, *after* you have debugged your code and done the initial experiments to find all of the right hyperparameters for your problem). Good luck! -- Robert Kern "I have come to believe that the whole world is an enigma,

Re: Python GUI?

2013-09-20 Thread Robert Kern
*driven by* contributions from the community. http://qt-project.org/contribute http://qt-project.org/wiki/PySideContributors -- 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: What minimum should a person know before saying "I know Python"

2013-09-20 Thread Robert Kern
#x27;?" At what point in your Python career did you feel comfortable claiming that? -- 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: Tryign to send mail via a python script by using the local MTA

2013-09-20 Thread Robert Kern
Python list. Please don't valorize my message. I did neither Nikos nor the group any favors. I can only plead dizziness from the whooshing of Tim's sarcasm flying over Nikos' head. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma t

Re: Having both if() and for() statements in one liner

2013-09-17 Thread Robert Kern
ahve both if and for in a one liner? Not in Python, no. -- 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 -- https://mail.python.org/mailman/listinfo/python-list

Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Robert Kern
d the standard SMTP library. http://docs.python.org/2/library/smtplib -- 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." -- Umbert

Re: Python GUI?

2013-09-12 Thread Robert Kern
ing forcing you to use the GUI designers if you don't want to. -- 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 -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >