Mark Lawrence writes:
> Any civil engineers reading this who would find 22/7 perfectly
> adequate for their task?
Civil engineering? Pffft, that deals with only a few orders of magnitude
range at most. “π is roughly 3” is usually good enough in that arena :-)
--
\ “You don't need a book o
On 25/07/2012 07:07, Steven D'Aprano wrote:
On Wed, 25 Jul 2012 13:07:03 +1000, Ben Finney wrote:
Maarten writes:
You just missed it:
22/7
Which is appropriate, since 22/7 misses π by a wide margin. (355/113 is
my favourite approximation to π, and is far more accurate.)
Approximation? Pf
Am 24.07.2012 17:01, schrieb cpppw...@gmail.com:
reader = codecs.getreader(encoding)
lines = []
with open(filename, 'rb') as f:
lines = reader(f, 'strict').readlines(keepends=False)
where encoding == 'utf-16-be'
Everything works fine, except that lines[0] is equal to c
On Wed, 25 Jul 2012 13:07:03 +1000, Ben Finney wrote:
> Maarten writes:
>
>> You just missed it:
>> 22/7
>
> Which is appropriate, since 22/7 misses π by a wide margin. (355/113 is
> my favourite approximation to π, and is far more accurate.)
Approximation? Pffft. I use the exact value:
π = 1
On Wed, Jul 25, 2012 at 1:07 PM, Ben Finney wrote:
> Which is appropriate, since 22/7 misses π by a wide margin. (355/113 is
> my favourite approximation to π, and is far more accurate.)
22/7 is no worse than 3.14, though. Sure, 355/113 is closer still, but
how often do really need more accuracy
Maarten writes:
> You just missed it:
> 22/7
Which is appropriate, since 22/7 misses π by a wide margin. (355/113 is
my favourite approximation to π, and is far more accurate.)
−1 on associating 22/7 as anything to do with π.
+1 on celebrating τ day! https://www.youtube.com/watch?v=jG7vhMMXagQ
On Jul 25, 2:25 am, eric.lemi...@gmail.com wrote:
> On Monday, July 23, 2012 11:59:10 PM UTC-6, Rusi wrote:
> > Ive heard good things about scons http://en.wikipedia.org/wiki/SCons
>
> I've heard about SCons but don't know much about it. From what little I've
> read, it's
> only a make tool repla
On Sat, Jul 14, 2012 at 1:00 AM, Gelonida N wrote:
>
> What I do at the moment is:
>
> For Windows I use winsound.Beep
>
> For Linux I create some raw data and pipe it into sox's
> 'play' command.
>
> I don't consider this very elegant
You may want to get over that. Some software vendors/distr
On Fri, Jul 13, 2012 at 9:00 PM, Gelonida N wrote:
> I tried the simplest approach (just printing the BEL character '\a' chr(7)
> to the console.
That's what I do when I want to send an audible alert to the user of a
console based program. It's then up to the user's terminal to do
whatever the u
On 24 July 2012 21:34, Lipska the Kat wrote:
> On 24/07/12 06:13, rusi wrote:
>
>> On Jul 22, 10:23 pm, Lipska the Kat wrote:
>>
>> Heh heh, Nothing to do with Eclipse, just another thing to get my head
>>> around. For work and Java IMHO you can't beat eclipse...
>>> at the moment I'm getting m
On Wed, Jul 25, 2012 at 7:39 AM, Gelonida N wrote:
> On 07/15/2012 03:15 AM, rantingrickjohn...@gmail.com wrote:> On Friday, July
> 13, 2012 8:00:05 PM UTC-5, gelonida wrote:
>>> I just want to use a beep command that works cross platform. [...] I
>>> just want to use them as alert, when certain e
On 07/15/2012 03:15 AM, rantingrickjohn...@gmail.com wrote:> On Friday,
July 13, 2012 8:00:05 PM UTC-5, gelonida wrote:
>> I just want to use a beep command that works cross platform. [...] I
>> just want to use them as alert, when certain events occur within a
>> very long running non GUI applic
On Jul 24, 5:22 pm, Ian Kelly wrote:
> On Tue, Jul 24, 2012 at 2:44 PM, Wanderer wrote:
> > I'm using getopt but not at that point. I really don't have a problem.
> > I'm just curious. I've never seen anything else after
> > assert False,
>
> > Here is some code.
>
> It doesn't matter what you pu
On Monday, July 23, 2012 11:59:10 PM UTC-6, Rusi wrote:
> On Jul 23, 11:16 pm, eric.lemi...@gmail.com wrote:
> > Greetings all,
> >
> > I would like to leverage the Python packaging tools (e.g. distutils,
> setuptools, distribute, et. al.) to maintain (i.e. download, extract,
> configure, make, i
On Tue, Jul 24, 2012 at 2:44 PM, Wanderer wrote:
> I'm using getopt but not at that point. I really don't have a problem.
> I'm just curious. I've never seen anything else after
> assert False,
>
> Here is some code.
It doesn't matter what you put after the assert False, because that
line is not
On Jul 24, 4:31 pm, Ian Kelly wrote:
> On Tue, Jul 24, 2012 at 1:57 PM, Wanderer wrote:
> > If I use the code
>
> > assert False, "unhandled option"
>
> > I get output like:
>
> > option -q not recognized
> > for help use --help
>
> > What other expressions can I use other than "unhandled option"
On Jul 24, 4:47 pm, Wanderer wrote:
> On Jul 24, 4:31 pm, Ian Kelly wrote:
>
>
>
>
>
>
>
>
>
> > On Tue, Jul 24, 2012 at 1:57 PM, Wanderer wrote:
> > > If I use the code
>
> > > assert False, "unhandled option"
>
> > > I get output like:
>
> > > option -q not recognized
> > > for help use --help
On Jul 24, 4:31 pm, Ian Kelly wrote:
> On Tue, Jul 24, 2012 at 1:57 PM, Wanderer wrote:
> > If I use the code
>
> > assert False, "unhandled option"
>
> > I get output like:
>
> > option -q not recognized
> > for help use --help
>
> > What other expressions can I use other than "unhandled option"
On Tue, Jul 24, 2012 at 1:57 PM, Wanderer wrote:
> If I use the code
>
> assert False, "unhandled option"
>
> I get output like:
>
> option -q not recognized
> for help use --help
>
> What other expressions can I use other than "unhandled option"? Is there a
> list somewhere?
Are you using argpa
If I use the code
assert False, "unhandled option"
I get output like:
option -q not recognized
for help use --help
What other expressions can I use other than "unhandled option"? Is there a list
somewhere?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jul 24, 2012 at 1:32 PM, Paul Rubin wrote:
> Dieter Maurer writes:
>> I have only one vague idea: should something try to terminate the
>> process, modules would start to lose their variables during shutdown.
>
> That happens all the time with multi-threaded programs, because the
> shutdo
On Tue, Jul 24, 2012 at 8:59 AM, Dieter Maurer wrote:
> "ivdn...@gmail.com" writes:
>
>> I have a daemon process that runs for a considerable amount of time (weeks
>> on end) without any problems. At some point I start getting the exception:
>>
>> Exception info: Traceback (most recent call last
Dieter Maurer writes:
> I have only one vague idea: should something try to terminate the
> process, modules would start to lose their variables during shutdown.
That happens all the time with multi-threaded programs, because the
shutdown is happening concurrently with other threads doing stuff.
On 7/24/2012 2:27 PM, giuseppe.amatu...@gmail.com wrote:
Hi,
would like to take eliminate a specific number in an array and its
correspondent in an other array, and vice-versa.
given
a=np.array([1,2,4,4,5,4,1,4,1,1,2,4])
b=np.array([1,2,3,5,4,4,1,3,2,1,3,4])
no_data_a=1
no_data_b=2
a_clean=a
On Jul 24, 2012 12:32 PM, wrote:
> after i need to calculate unique combination in pairs to count the
observations
> and obtain
> (4,3,2)
> (4,5,1)
> (5,4,1)
> (4,4,2)
I don't know about a numpy solution, but this could be achieved by
collections.Counter(zip(a, b)).items(). That gives you:
((4,3
On 24/07/2012 19:51, MRAB wrote:
On 24/07/2012 19:27, giuseppe.amatu...@gmail.com wrote:
Hi,
would like to take eliminate a specific number in an array and its
correspondent in an other array, and vice-versa.
given
a=np.array([1,2,4,4,5,4,1,4,1,1,2,4])
b=np.array([1,2,3,5,4,4,1,3,2,1,3,4])
n
On 24/07/2012 19:27, giuseppe.amatu...@gmail.com wrote:
Hi,
would like to take eliminate a specific number in an array and its
correspondent in an other array, and vice-versa.
given
a=np.array([1,2,4,4,5,4,1,4,1,1,2,4])
b=np.array([1,2,3,5,4,4,1,3,2,1,3,4])
no_data_a=1
no_data_b=2
a_clean=ar
Hi,
would like to take eliminate a specific number in an array and its
correspondent in an other array, and vice-versa.
given
a=np.array([1,2,4,4,5,4,1,4,1,1,2,4])
b=np.array([1,2,3,5,4,4,1,3,2,1,3,4])
no_data_a=1
no_data_b=2
a_clean=array([4,4,5,4,4,4])
b_clean=array([3,5,4,4,3,4])
after i
Ian Kelly wrote:
On Tue, Jul 24, 2012 at 8:50 AM, Chris Angelico wrote:
Americans celebrate March 14th as 3.14; some Europeans celebrate July
22nd as 22/7 (which is 3.142857, fairly close to 3.14159). We claim
both, and also June 28th (aka Tau Day or Two Pi Day, 6.28).
Hey now, Tau Day is an
On Wed, Jul 25, 2012 at 2:36 AM, Ian Kelly wrote:
> On Tue, Jul 24, 2012 at 8:50 AM, Chris Angelico wrote:
>> Americans celebrate March 14th as 3.14; some Europeans celebrate July
>> 22nd as 22/7 (which is 3.142857, fairly close to 3.14159). We claim
>> both, and also June 28th (aka Tau Day or Tw
On Tue, Jul 24, 2012 at 8:50 AM, Chris Angelico wrote:
> Americans celebrate March 14th as 3.14; some Europeans celebrate July
> 22nd as 22/7 (which is 3.142857, fairly close to 3.14159). We claim
> both, and also June 28th (aka Tau Day or Two Pi Day, 6.28).
Hey now, Tau Day is an American invent
Dear Group,
I was looking for the following solutions.
(i) a Python Hidden Markov Model(HMM) library.
(ii)a Python Conditional Random Field(CRF) library.
(iii) I am using Python 3.2.1 on Windows 7(64 bit) and also like to get a NLTK
version.
(iv) I may use unicode character as input.
If any one
On Tuesday, July 24, 2012 4:35:29 PM UTC+2, Ben Finney wrote:
> Chris Angelico writes:
>
> > […] Pi Day, has two different dates (the American and the European -
> > of course, here in Australia, we celebrate both).
>
> What would be the two days? The 14th day of the 3rd month, and, um,
> what?
>
Hi,
I have a simple question, I'm using something like the following lines in
python 2.6.2
reader = codecs.getreader(encoding)
lines = []
with open(filename, 'rb') as f:
lines = reader(f, 'strict').readlines(keepends=False)
where encoding == 'utf-16-be'
Everything works f
"ivdn...@gmail.com" writes:
> I have a daemon process that runs for a considerable amount of time (weeks on
> end) without any problems. At some point I start getting the exception:
>
> Exception info: Traceback (most recent call last):
> File "scheduler.py", line 376, in applyrule
> resul
On Wed, Jul 25, 2012 at 12:35 AM, Ben Finney wrote:
> Chris Angelico writes:
>
>> […] Pi Day, has two different dates (the American and the European -
>> of course, here in Australia, we celebrate both).
>
> What would be the two days? The 14th day of the 3rd month, and, um,
> what?
Americans ce
Chris Angelico writes:
> […] Pi Day, has two different dates (the American and the European -
> of course, here in Australia, we celebrate both).
What would be the two days? The 14th day of the 3rd month, and, um,
what?
Or do you Australians have the third day of the fourteenth month?
--
\
On Mon, Jul 23, 2012 at 12:09 PM, Chris Angelico wrote:
> It is, in many places. It's one of the few truly international
> holidays. The next nearest, Pi Day, has two different dates (the
> American and the European - of course, here in Australia, we celebrate
> both).
Here in Canada we celebrate
On Tue, Jul 24, 2012 at 12:51 PM, Devin Jeanpierre
wrote:
> When people boycott a product, it isn't because not having the product
> is better than having the product. That's clearly untrue: despite the
> reasons for the boycott, the product has some value.
That's because you don't call it boycot
On Tue, Jul 24, 2012 at 1:56 AM, John Gordon wrote:
> In Mark Lawrence
> writes:
>
>> Sorry not with you is there something special about April 1st next year?
>
> In the United States, April 1st (also known as April Fool's Day) is an
> occasion for practical jokes, faked 'news' stories, and gen
On Tuesday, July 24, 2012 2:29:19 PM UTC+2, Laszlo Nagy wrote:
> On 2012-07-24 14:17, ivdn...@gmail.com wrote:
> > Hello all,
> >
> > I have a deamon process that runs for some considerable time (weeks)
> without any problems. At some point it starts throwing the following
> exception:
> >
> >
On Tuesday, July 24, 2012 2:24:31 PM UTC+2, Ervin Hegedüs wrote:
> hello,
>
> On Tue, Jul 24, 2012 at 04:48:42AM -0700, ivdn...@gmail.com wrote:
> > Hello,
> >
> > I have a daemon process that runs for a considerable amount of time
> (weeks on end) without any problems. At some point I start get
If you use fork(), it drops all file descriptors, and creates new
ones - may be then loss the __file__...?
I don't think this is the case. He wrote that the process runs for weeks
without problems, and code using __file__ is being executed all the time.
--
http://mail.python.org/mailman/listi
On 2012-07-24 14:17, ivdn...@gmail.com wrote:
Hello all,
I have a deamon process that runs for some considerable time (weeks) without
any problems. At some point it starts throwing the following exception:
File "/some/path/scheduler.py", line 376, in applyrule
result = execrule(rule_co
hello,
On Tue, Jul 24, 2012 at 04:48:42AM -0700, ivdn...@gmail.com wrote:
> Hello,
>
> I have a daemon process that runs for a considerable amount of time (weeks on
> end) without any problems. At some point I start getting the exception:
>
> Exception info: Traceback (most recent call last):
>
Hello all,
I have a deamon process that runs for some considerable time (weeks) without
any problems. At some point it starts throwing the following exception:
File "/some/path/scheduler.py", line 376, in applyrule
result = execrule(rule_code)
File "/some/path/scheduler.py", line 521, in
On 24/07/2012 08:50, paul618 wrote:
#!/usr/bin/env python
# grep_for_QA.py I am only looking to isolate uniq Q:: and A:: stmts from my
daily files
#
# note: This algorithm will fail if there are any blank lines within the Q and
A area of interest (a paragraph)
# D. Beazley is my fav document
Hello,
I have a daemon process that runs for a considerable amount of time (weeks on
end) without any problems. At some point I start getting the exception:
Exception info: Traceback (most recent call last):
File "scheduler.py", line 376, in applyrule
result = execrule(rule_code)
File "s
On 2012-07-24 12:29, Christian Heimes wrote:
Am 24.07.2012 11:55, schrieb Laszlo Nagy:
What is the good representation here? Should I implement my own date
type? (I wouldn't want to.)
JDN [1] is a commonly used format for wide ranges of dates. I've used it
in the past to refer to days BC. PyPI
On 24/07/12 06:13, rusi wrote:
On Jul 22, 10:23 pm, Lipska the Kat wrote:
Heh heh, Nothing to do with Eclipse, just another thing to get my head
around. For work and Java IMHO you can't beat eclipse...
at the moment I'm getting my head around git,
Bumped into this yesterday. Seems like a goo
Am 24.07.2012 11:58, schrieb Dave Angel:
> There are some limitations to 32 bits, that have nothing to do with
> Python specifically. However, they have different impact, depending on
> the environment you're running in. First and foremost, address are
> 32bits, which limits them to 4gb of ram.
Am 24.07.2012 11:55, schrieb Laszlo Nagy:
> What is the good representation here? Should I implement my own date
> type? (I wouldn't want to.)
JDN [1] is a commonly used format for wide ranges of dates. I've used it
in the past to refer to days BC. PyPI offers a Python module [2] that
looks well w
Am 24.07.2012 10:24, schrieb Chris Angelico:
On Tue, Jul 24, 2012 at 5:47 PM, Ulrich Eckhardt
wrote:
There is one model that has helped me much understanding how Python ticks
and that is the model of name tags. The code "a = 1" creates an integer with
value 1 and attaches a tag with "a" written
On 07/24/2012 04:06 AM, Sammy Danso wrote:
> Hello Experts,
> I am having a 'memory error',
Please post the actual error message.
> which suggest that I
> have run out of memory, but I am not sure this is the case as I have
> considerable amount of memory unused on my computer.
What OS, vers
>>> import datetime
>>> old_date = datetime.date(1,12,31)
>>> str(old_date)
'0001-12-31'
>>> one_year = datetime.timedelta(days=365)
>>> str(one_year)
'365 days, 0:00:00'
>>> old_date - 10*one_year
Traceback (most recent call last):
File "", line 1, in
OverflowError: date value out of range
>>>
Am 24.07.2012 09:47 schrieb Ulrich Eckhardt:
[0] Note that in almost all cases, when referring to a tag, Python
implicitly operates on the object attached to it. One case (the only
one?) where it doesn't is the "del" statement.
The del and the =, concerning the left side.
But even those don't
Hi Steve:
Thank you for your quick response.
Ah, indeed I failed to ask my question:: Why doesnt this code print the
sampledata? Instead it prints the empty list.
The answer is probably quite simple, as I really am an idiot.
Thanks again,
paul
--
http://mail.python.org/mailman/listinf
On Mon, Jul 23, 2012 at 7:19 PM, Andrew Cooper wrote:
> Python is a statically scoped language, whereas the functionality you
> are expecting would be an example of dynamically scoped.
While it's true that Python is statically scoped, that has nothing at
all to do with the code from the OP's ques
Am 23.07.2012 17:59 schrieb Steven D'Aprano:
>> Before you
get a language that uses full Unicode, you'll need to have fairly
generally available keyboards that have those keys.
Or at least keys or key combinations for the stuff you need, which might
differ e. g. with the country you live in.
Am 23.07.2012 16:50 schrieb Stone Li:
I'm totally confused by this code:
Code:
a = None
b = None
c = None
d = None
x = [[a,b],
[c,d]]
e,f = x[1]
print e,f
c = 1
d = 2
print e,f
e = 1
f = 2
print c,d
Output:
None None
None N
On Mon, 23 Jul 2012 22:56:42 -0700, rusi wrote:
>> On Mon, 23 Jul 2012 22:51:07 -0400, Devin Jeanpierre wrote:
>> > When people boycott a product, it isn't because not having the
>> > product is better than having the product. That's clearly untrue:
>> > despite the reasons for the boycott, the pr
On Tue, 24 Jul 2012 09:47:38 +0200, Ulrich Eckhardt wrote:
> [0] Note that in almost all cases, when referring to a tag, Python
> implicitly operates on the object attached to it. One case (the only
> one?) where it doesn't is the "del" statement.
Name-binding:
x = 1
operates on the name "x", n
On Tue, 24 Jul 2012 00:50:22 -0700, paul618 wrote:
> #!/usr/bin/env python
> # grep_for_QA.py I am only looking to isolate uniq Q:: and A:: stmts
> from my daily files #
> # note: This algorithm will fail if there are any blank lines within
> the Q and A area of interest (a paragraph)
>
> # D.
On Tue, Jul 24, 2012 at 5:47 PM, Ulrich Eckhardt
wrote:
> There is one model that has helped me much understanding how Python ticks
> and that is the model of name tags. The code "a = 1" creates an integer with
> value 1 and attaches a tag with "a" written on it using a small piece of
> rope.
A d
There is one model that has helped me much understanding how Python
ticks and that is the model of name tags. The code "a = 1" creates an
integer with value 1 and attaches a tag with "a" written on it using a
small piece of rope. Now, if you attach the tag to a different item, it
obviously does
Hello Experts,
I am having a 'memory error', which suggest that I
have run out of memory, but I am not sure this is the case as I have
considerable amount of memory unused on my computer.
A little
search suggest this is a limitation of python 32 and an option is to
have a 64bit. I however hav
#!/usr/bin/env python
# grep_for_QA.py I am only looking to isolate uniq Q:: and A:: stmts from my
daily files
#
# note: This algorithm will fail if there are any blank lines within the Q and
A area of interest (a paragraph)
# D. Beazley is my fav documentation
import re, glob
import pprint a
Pythonistas:
We are happy to remind all Django users that DjangoCon US is in DC this year,
from September 3-8 (main conference September 4-6). Early bird pricing is
available until August 3, and the schedule will be published shortly after this
announcement is made.
http://djangocon.us/
Sin
On Tue, Jul 24, 2012 at 1:38 AM, Steven D'Aprano
wrote:
> I don't know about a bad idea or not, but it is certainly redundant,
> because Python automatically adds '' (equivalent to '.') to the very
> start of the search path.
No, it only does that if Python is reading commands from stdin, or if
P
On Tue, Jul 24, 2012 at 2:23 AM, Mark Lawrence wrote:
> strictly speaking Python doesn't have variables, it has names. This will
> possibly start a flame war which, by the standards of this ng/ml, will be an
> intense conflagration, hence the duck and cover.
The two terms are nearly synonymous w
As a scientist I would be more than happy to publish in Open-Access Journals
rather than in IEEE/ACM/Springer-published ones. However, I also have to be
sure that my publications reach the scientific community and make an impact on
it. Unfortunately, in many fields AFAIK the better journals (= h
On 07/23/2012 06:22 AM, Dave Angel wrote:
On 07/23/2012 09:06 AM, Chris Angelico wrote:
On Mon, Jul 23, 2012 at 10:55 PM, Roy Smith wrote:
Some day, we're going to have programming languages that take advantage
of the full unicode character set. Right now, we're working in ASCII
and creating
72 matches
Mail list logo