On Tuesday, September 23, 2014 7:33:06 PM UTC+3, Rob Gaddi wrote:
> While you're at it, think
> long and hard about that definition of fuzziness. If you can make it
> closer to the concept of histogram "bins" you'll get much better
> performance.
The problem for me here is that I can't determin
On Tuesday, September 23, 2014 4:37:10 PM UTC+3, Peter Otten wrote:
> x eq y
> y eq z
> not (x eq z)
>
> where eq is the test given above -- should x, y, and z land in the same bin?
Yeah, I know the counting depends on the order of items. But I'm OK with that.
--
https://mail.python.org/mailman/
dieter wrote:
> I have no experience with "SOAPpy", but with "suds" (another Python
> SAOP client). A "suds" client exposes two attributes "factory"
*miaows happily*
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Sep 23, 2014 at 8:46 PM, Terry Reedy wrote:
>
> Did you use tabs? They are more likely to disappear than spaces.
Yes, I use tabs.
On Tue, Sep 23, 2014 at 9:33 PM, Jon Ribbens
wrote:
>
> app.run(port=8000, debug=True) might've made the problem easier to find.
>
I didn't learn debug wit
On 2014-09-23, Juan Christian wrote:
> if __name__ == '__main__':
> app.run(port = 8000)
app.run(port=8000, debug=True) might've made the problem easier to find.
--
https://mail.python.org/mailman/listinfo/python-list
On 9/23/14 4:53 PM, Denis McMahon wrote:
from string import *
You aren't using any names from string, so you can skip this line.
x={'f1':1,'f2':2,'f3':3}
y = [ (a,x[a]) for a in x.keys() ]
y.sort( cmp=lambda a,b: cmp(a[0],b[0]) )
This is more easily done as:
y = sorted(x.items())
.it
On 9/23/2014 5:57 PM, Juan Christian wrote:
On Tue, Sep 23, 2014 at 6:48 PM, John Gordon mailto:gor...@panix.com>> wrote:
> @app.route('/')
> def index():
> return 'Hello World'
As posted, your code is not indented. Is this literally how your code
looks?
The mail screwed t
how can i create the proper html file with /Jinjia/2 or other temple?
Joel Goldstick wrote:
Generally, you would use a framework like django or others.
--
https://mail.python.org/mailman/listinfo/python-list
On 23/09/2014 22:48, blindanagram wrote:
On 23/09/2014 20:30, Mark Lawrence wrote:
On 23/09/2014 18:43, blindanagram wrote:
On 23/09/2014 18:26, Stefan Behnel wrote:
Wolfgang Maier schrieb am 23.09.2014 um 18:38:
While at first I thought this to be a rather irrelevant debate over
module
priva
On Tue, Sep 23, 2014 at 6:05 PM, Rock Neurotiko
wrote:
> 2014-09-24 0:01 GMT+02:00 Larry Martell :
>>
>> I have some code that I inherited:
>>
>> ' '.join([self.get_abbrev()] +
>>[str(f['value')
>> for f in self.filters
>> if f.has_key('value')]).strip()
>>
>>
>
On 22-9-2014 20:28, Chris Angelico wrote:
> On Tue, Sep 23, 2014 at 4:23 AM, Irmen de Jong wrote:
>> This is why Pyro has been using a different (and safe) serializer by default
>> for a while
>> now. You have to plow through the usual security warnings in the docs and
>> make a
>> conscious eff
On Tue, Sep 23, 2014 at 3:01 PM, Larry Martell
wrote:
> I have some code that I inherited:
>
> ' '.join([self.get_abbrev()] +
>[str(f['value')
> for f in self.filters
> if f.has_key('value')]).strip()
>
> This broke today when it encountered some non-ascii dat
Maybe there are a different way, but you can do this:
' '.join([self.get_abbrev()] +
[str(f['value').encode('utf-8') if type(f['value']) is str else
str(f['value']
for f in self.filters
if f.has_key('value')]).strip()
2014-09-24 0:01 GMT+02:00 Larry Martell :
>
I have some code that I inherited:
' '.join([self.get_abbrev()] +
[str(f['value')
for f in self.filters
if f.has_key('value')]).strip()
This broke today when it encountered some non-ascii data.
I changed the str(f['value']) line to f['value'].encode('utf-8'),
On Tue, Sep 23, 2014 at 6:48 PM, John Gordon wrote:
>
> > @app.route('/')
> > def index():
> > return 'Hello World'
>
> As posted, your code is not indented. Is this literally how your code
> looks?
>
>
The mail screwed the indentation, it's indented in the file.
> > {% block content %}{% endlb
In Juan Christian
writes:
> @app.route('/')
> def index():
> return 'Hello World'
As posted, your code is not indented. Is this literally how your code
looks?
> {% block content %}{% endlbock content %}
"endlbock" is certainly a typo.
> I typed everything correct,acessing http://localhost:
On 23/09/2014 20:30, Mark Lawrence wrote:
> On 23/09/2014 18:43, blindanagram wrote:
>> On 23/09/2014 18:26, Stefan Behnel wrote:
>>> Wolfgang Maier schrieb am 23.09.2014 um 18:38:
While at first I thought this to be a rather irrelevant debate over
module
private vs public naming con
On 23/09/2014 18:55, Stefan Behnel wrote:
> blindanagram schrieb am 23.09.2014 um 19:43:
>> On 23/09/2014 18:26, Stefan Behnel wrote:
>>> Wolfgang Maier schrieb am 23.09.2014 um 18:38:
While at first I thought this to be a rather irrelevant debate over module
private vs public naming conv
I'm following a tutorial about Flask using Python 3.4.1, but I'm getting an
error with a dead simple example:
generator.py:
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello World'
@app.route('/blog/post/')
def post():
return render_tem
Once the runtime of SHORT starts to increase by a certain threshold,
Such as 2x, 4x, or 16x its last runtime? The other ideas already
proposed sound better, but I am wondering if it would work.
On Tue, Sep 23, 2014 at 12:21 PM, Terry Reedy wrote:
> On 9/23/2014 10:48 AM, Steven D'Aprano wrote:
>>
On Tue, 23 Sep 2014 17:34:53 +, John Gordon wrote:
> In luofeiyu
> writes:
>
>> x={'f1':1,'f2':2,'f3':3}
>> how can i create the following html file automatically with python to
>> display x ?
>
> You might want to use something other than a dictionary, as the order
> isn't guaranteed.
As
On Tue, 23 Sep 2014 09:53:40 -0700, Tobiah wrote:
> On 09/23/2014 07:18 AM, luofeiyu wrote:
>> how can i create the following html
>> f3
>>
No here?
>>
>> 1
...
>>
>> 3
>>
>>
What is the above doing there?
>>
>>
> [code]
Although your solution will produce valid html, it doesn'
On Sunday, September 21, 2014 9:31:46 PM UTC-5, vek@gmail.com wrote:
> I'm messing with SOAP, trying to write a small library to handle stuff I buy
> from Aramex (shipper). I'm learning XML/SOAP and I'm familiar with RPC from C
> (Stevens) but no other relevant experience. If this is incredib
On 9/23/2014 4:16 AM, blindanagram wrote:
What is the rationale for gcd(x, y) in Fractions returning a negative
value when y is negtive?
For example gcd(3, -7) returns -1,
Since the doc says "the result will have the same sign as b", this is
intentinal. However, I consider this a *design*
On 23/09/2014 18:43, blindanagram wrote:
On 23/09/2014 18:26, Stefan Behnel wrote:
Wolfgang Maier schrieb am 23.09.2014 um 18:38:
While at first I thought this to be a rather irrelevant debate over module
private vs public naming conventions, I now think the OP is probably right
and renaming fr
On 9/23/2014 10:48 AM, Steven D'Aprano wrote:
I have a certain calculation which can be performed two radically different
ways. With the first algorithm, let's call it SHORT, performance is very
fast for small values of the argument, but terrible for large values. For
the second algorithm, LARGE,
Hi,
On Tue, 23 Sep 2014 15:56:41 +0200
Arulnambi Nandagoban wrote:
> Hello all,
>
>
>
> I developed a multithreaded tcp server with python and I converted into a
> windows executable using pyinstaller.
>
> I would like to run the server as a windows service so that server restarts
> whenev
Ian Kelly schrieb am 23.09.2014 um 19:39:
> On Tue, Sep 23, 2014 at 11:26 AM, Stefan Behnel wrote:
>> Wolfgang Maier schrieb am 23.09.2014 um 18:38:
>>> While at first I thought this to be a rather irrelevant debate over module
>>> private vs public naming conventions, I now think the OP is probabl
On Tue, Sep 23, 2014 at 1:54 PM, SK wrote:
> Hi EK,
> Did you figure out questions 1, 2 and 3? SciPy (0.14.0) on installation asks
> me for Python 2.7. First day on Python here, I am really struggling :/
> Thanks,
> SK
Did you download the SciPy installer for python 3.3? I see it listed
for dow
blindanagram schrieb am 23.09.2014 um 19:43:
> On 23/09/2014 18:26, Stefan Behnel wrote:
>> Wolfgang Maier schrieb am 23.09.2014 um 18:38:
>>> While at first I thought this to be a rather irrelevant debate over module
>>> private vs public naming conventions, I now think the OP is probably right
>>
Hi EK,
Did you figure out questions 1, 2 and 3? SciPy (0.14.0) on installation asks me
for Python 2.7. First day on Python here, I am really struggling :/
Thanks,
SK
On Saturday, May 10, 2014 7:07:33 PM UTC+2, esa...@gmail.com wrote:
> Hi All--
>
>
>
> Let me state at the start that I am new t
On Tue, Sep 23, 2014 at 11:39 AM, Ian Kelly wrote:
> I'm not convinced it's all that clear. In addition to Mathworld and
> Wikipedia that were already cited, ProofWiki provides an actual proof
> that gcd(a, b) = gcd(|a|, |b|), by way of noting that a and |a| have
> the same factors.
I forgot to i
On 23/09/2014 18:26, Stefan Behnel wrote:
> Wolfgang Maier schrieb am 23.09.2014 um 18:38:
>> While at first I thought this to be a rather irrelevant debate over module
>> private vs public naming conventions, I now think the OP is probably right
>> and renaming fractions.gcd to fractions._gcd may
On Tue, Sep 23, 2014 at 11:26 AM, Stefan Behnel wrote:
> Wolfgang Maier schrieb am 23.09.2014 um 18:38:
>> While at first I thought this to be a rather irrelevant debate over module
>> private vs public naming conventions, I now think the OP is probably right
>> and renaming fractions.gcd to fract
On 23/09/2014 18:20, Ian Kelly wrote:
> On Tue, Sep 23, 2014 at 10:38 AM, Wolfgang Maier
> wrote:
>> Maybe fractions.gcd could be renamed, but be wrapped or reimplemented
>> correctly somewhere else in the stdlib or even in fractions ?
>
> +1
>
> I don't think the math module as suggested upthre
In luofeiyu
writes:
> x={'f1':1,'f2':2,'f3':3}
> how can i create the following html file automatically with python to
> display x ?
You might want to use something other than a dictionary, as the order
isn't guaranteed.
--
John Gordon Imagine what it must be like for a real medical
Wolfgang Maier schrieb am 23.09.2014 um 18:38:
> While at first I thought this to be a rather irrelevant debate over module
> private vs public naming conventions, I now think the OP is probably right
> and renaming fractions.gcd to fractions._gcd may be a good idea.
Making a public API private is
On Tue, Sep 23, 2014 at 10:38 AM, Wolfgang Maier
wrote:
> Maybe fractions.gcd could be renamed, but be wrapped or reimplemented
> correctly somewhere else in the stdlib or even in fractions ?
+1
I don't think the math module as suggested upthread is the right
place, as that module houses wrapper
On Tue, Sep 23, 2014 at 6:39 PM, Skip Montanaro wrote:
>
> On Tue, Sep 23, 2014 at 4:11 AM, wrote:
>
>> I created some code recently to parse a string and create a timedelta
>> from it.
>
>
> Interesting. I notice that dateutil.parser.parse already understands you
> notation:
>
> >>> x = dateuti
On 09/23/2014 07:18 AM, luofeiyu wrote:
x={'f1':1,'f2':2,'f3':3}
how can i create the following html file automatically with python to display x
?
f1
f2
f3
1
2
3
def tablefy(values):
print ""
for value in values:
print "%s" % value
pri
On Wed, Sep 24, 2014 at 2:32 AM, Rob Gaddi
wrote:
> You'll probably have to write that yourself. While you're at it, think
> long and hard about that definition of fuzziness. If you can make it
> closer to the concept of histogram "bins" you'll get much better
> performance. If, for instance, y
On Tue, Sep 23, 2014 at 4:11 AM, wrote:
> I created some code recently to parse a string and create a timedelta from
> it.
Interesting. I notice that dateutil.parser.parse already understands you
notation:
>>> x = dateutil.parser.parse("5h32m15s")
>>> x
datetime.datetime(2014, 9, 23, 5, 32, 15
On 09/23/2014 02:50 PM, Steven D'Aprano wrote:
Normally, gcd is only defined for non-negative integers. Wolfram Mathworld,
for example, doesn't mention negative values at all (as far as I can see):
http://mathworld.wolfram.com/GreatestCommonDivisor.html
although buried deep in the documentatio
On Tue, 23 Sep 2014 05:34:19 -0700 (PDT)
Miki Tebeka wrote:
> Greetings,
>
> Before I start writing my own. Is there something like collections.Counter
> (fore frequencies) that does "fuzzy" matching?
>
> Meaning x is considered equal to y if abs(x - y) < epsilon. (x, y and my case
> will be
On 2014-09-23 15:48, Steven D'Aprano wrote:
I have a certain calculation which can be performed two radically different
ways. With the first algorithm, let's call it SHORT, performance is very
fast for small values of the argument, but terrible for large values. For
the second algorithm, LARGE, p
Add a timing harness and use a test interval (N) and call LARGE every
Nth loop until LARGE's timing is better than the prior SHORT's run.
Emile
On 09/23/2014 07:48 AM, Steven D'Aprano wrote:
I have a certain calculation which can be performed two radically different
ways. With the first algor
On Wed, Sep 24, 2014 at 12:48 AM, Steven D'Aprano
wrote:
> (3) SHORT starts off relatively speedy, significantly faster than LARGE for
> the first few tens of thousands of loops. I'm not talking about trivial
> micro-optimizations here, I'm talking about the difference between 0.1
> second for SHO
On Wed, Sep 24, 2014 at 12:48 AM, Ian Kelly wrote:
> On Mon, Sep 22, 2014 at 6:55 PM, Chris Angelico wrote:
>> Lua is a much simpler language than ECMAScript, incredibly
>> light-weight, and easily sandboxed. It doesn't work with Unicode (I
>> think its string type is eight-bit, so you have to wo
On Mon, Sep 22, 2014 at 6:55 PM, Chris Angelico wrote:
> Lua is a much simpler language than ECMAScript, incredibly
> light-weight, and easily sandboxed. It doesn't work with Unicode (I
> think its string type is eight-bit, so you have to work with encoded
> bytes), which is a serious downside in
I have a certain calculation which can be performed two radically different
ways. With the first algorithm, let's call it SHORT, performance is very
fast for small values of the argument, but terrible for large values. For
the second algorithm, LARGE, performance is quite poor for small values,
but
On Tue, Sep 23, 2014 at 10:18 AM, luofeiyu wrote:
> x={'f1':1,'f2':2,'f3':3}
> how can i create the following html file automatically with python to
> display x ?
>
Generally, you would use a framework like django or others, but you
can make your html a string and use format:
html = "%d... " % x['
On Wed, Sep 24, 2014 at 12:37 AM, blindanagram wrote:
> That's an argument for a private gcd within the fractions module and a a
> 'normal' version in math.
Steven's examples show that there's not really much definition of
"normal" as regards GCD of negative numbers.
ChrisA
--
https://mail.pyth
On 23/09/2014 13:50, Steven D'Aprano wrote:
> blindanagram wrote:
>
>> What is the rationale for gcd(x, y) in Fractions returning a negative
>> value when y is negtive?
>
> Good question.
>
> Normally, gcd is only defined for non-negative integers. Wolfram Mathworld,
> for example, doesn't menti
x={'f1':1,'f2':2,'f3':3}
how can i create the following html file automatically with python to
display x ?
f1
f2
f3
1
2
3
--
https://mail.python.org/mailman/listinfo/python-list
Hello all,
I developed a multithreaded tcp server with python and I converted into a
windows executable using pyinstaller.
I would like to run the server as a windows service so that server restarts
whenever pc restarts without
doing it manually . Help me out with some sample code .
-
On 2014-09-23 05:34, Miki Tebeka wrote:
> Before I start writing my own. Is there something like
> collections.Counter (fore frequencies) that does "fuzzy" matching?
>
> Meaning x is considered equal to y if abs(x - y) < epsilon. (x, y
> and my case will be numpy.array).
Not that I know of -- the
Miki Tebeka wrote:
> Before I start writing my own. Is there something like collections.Counter
> (fore frequencies) that does "fuzzy" matching?
>
> Meaning x is considered equal to y if abs(x - y) < epsilon. (x, y and my
> case will be numpy.array).
The problem I see with that description is th
blindanagram wrote:
> What is the rationale for gcd(x, y) in Fractions returning a negative
> value when y is negtive?
Good question.
Normally, gcd is only defined for non-negative integers. Wolfram Mathworld,
for example, doesn't mention negative values at all (as far as I can see):
http://mat
On 23/09/2014 12:53, Wolfgang Maier wrote:
> On 09/23/2014 10:16 AM, blindanagram wrote:
>> What is the rationale for gcd(x, y) in Fractions returning a negative
>> value when y is negtive?
>>
>
> I guess it is implemented this way because its main use is in the
> Fraction constructor.
This is no
Greetings,
Before I start writing my own. Is there something like collections.Counter
(fore frequencies) that does "fuzzy" matching?
Meaning x is considered equal to y if abs(x - y) < epsilon. (x, y and my case
will be numpy.array).
Thanks,
--
Miki
--
https://mail.python.org/mailman/listinfo/
On 09/23/2014 10:16 AM, blindanagram wrote:
What is the rationale for gcd(x, y) in Fractions returning a negative
value when y is negtive?
I guess it is implemented this way because its main use is in the
Fraction constructor.
For example gcd(3, -7) returns -1, which means that a co-prime
LJ wrote:
> I have a network in which the nodes are defined as dictionaries using the
> NetworkX package. Inside each node (each dictionary) I defined a
> dictionary of dictionaries holding attributes corresponding to different
> ways in which the node can be reached (this dictionaries I refer to
On 9/23/14 4:29 AM, Frank Liou wrote:
I use PIL Image.open()
but it show 'list' object has no attribute 'open'
this is my code
class Image2():
trans = connection.begin()
session = Session()
ProductId =
session.query(ProductEntity.ProductId).filter(ProductEntity.CompanyId=="2"
[This announcement is in German since it targets a local user group
meeting in Düsseldorf, Germany]
ANKÜNDIGUNG
Python Meeting Düsseldorf
http://pyddf.de/
Ein Treffen v
Hello everyone!
I created some code recently to parse a string and create a timedelta from it.
Right now it only accepts positive integers, and only hours, minutes and
seconds, but I think it could be easily extended to support everything that
timedelta accepts.
time_delta_regex = re.compile(
On Tue, Sep 23, 2014 at 6:29 PM, Frank Liou wrote:
> I use PIL Image.open()
>
> but it show 'list' object has no attribute 'open'
>
> this is my code
>
> class Image2():
> trans = connection.begin()
> session = Session()
> ProductId =
> session.query(ProductEntity.ProductId).filter(
I use PIL Image.open()
but it show 'list' object has no attribute 'open'
this is my code
class Image2():
trans = connection.begin()
session = Session()
ProductId =
session.query(ProductEntity.ProductId).filter(ProductEntity.CompanyId=="2").all()
Image =
session.query(ProductI
What is the rationale for gcd(x, y) in Fractions returning a negative
value when y is negtive?
For example gcd(3, -7) returns -1, which means that a co-prime test that
would work in many other languages 'if gcd(x, y) == 1' will fail in
Python for negative y.
And, of course, since -|x| is less tha
jayte wrote:
> On Tue, 16 Sep 2014 13:22:02 +0200, Peter Otten <__pete...@web.de> wrote:
>
>>jayte wrote:
>>
>>> On Mon, 15 Sep 2014 09:29:02 +0200, Peter Otten <__pete...@web.de>
>>> wrote:
>
> [...]
>
but you can read raw data
with numpy. Something like
with open(filename, "
not quite sure what you mean.. python uses 'list' instead of the C/C++ array
data type. there are __builtin__ and builtins module in 2.7 and 3.2 and a
'array' module. make install, copies files into the system dir-tree but you can
run the interpreter from the build-dir and it should work.
--
ht
70 matches
Mail list logo