On Fri, Sep 3, 2021 at 3:42 PM DFS wrote:
>
> Having a problem with the DB2 connector
>
> test.py
>
> import ibm_db_dbi
> connectstring =
> 'DATABASE=xxx;HOSTNAME=localhost;PORT=5;PROTOCOL=TCPIP;UID=xxx;PWD=xxx;'
> conn = ibm_db_
Having a problem with the DB2 connector
test.py
import ibm_db_dbi
connectstring =
'DATABASE=xxx;HOSTNAME=localhost;PORT=5;PROTOCOL=TCPIP;UID=xxx;PWD=xxx;'
conn = ibm_db_dbi.connect(connectstring,'','')
curr = conn.cursor
pri
Hi Python Team,
I think the statement "The __init__.py files are required to make Python
treat directories containing the file as packages" is wrong in the
documentation[1] because it is valid only for Python 2.x version not Python
3.x version.
Even though it is good practice to have this file, it
On 2021-09-02 at 20:12:19 -0300,
Michio Suginoo wrote:
> I have the following question regarding how to scrape Google Map to get
> address based on a given list of geocodes.
> Given a list of geocodes (latitude; longitude) of locations, I would like
> to scrape municipalities of all the spots in
On Fri, Sep 3, 2021 at 8:15 AM Dennis Lee Bieber wrote:
>
> On Fri, 3 Sep 2021 04:43:02 +1000, Chris Angelico
> declaimed the following:
>
> >
> >The naive summation algorithm used by sum() is compatible with a
> >variety of different data types - even lists, although it's documented
> >as being
On Fri, Sep 3, 2021 at 8:01 AM Alan Gauld via Python-list
wrote:
>
> On 02/09/2021 19:28, Chris Angelico wrote:
>
> >> Except for the places that don't follow the IANA scheme and/or
> >> dynamically change their time settings on a whim. To be complete
> >> you need the ability to manually override
Dear all,
I have the following question regarding how to scrape Google Map to get
address based on a given list of geocodes.
Given a list of geocodes (latitude; longitude) of locations, I would like
to scrape municipalities of all the spots in the list. How can I do that?
For example, I have
la
Edward Spencer wrote at 2021-9-2 10:02 -0700:
>Sometimes I like to pass the logging level up to the command line params so my
>user can specific what level of logging they want. However there is no easy
>method for pulling the named logging level names.
>
>Looking into the code, it would actually
def how_many_times():
x, y = 0, 1
c = 0
while x != y:
c = c + 1
x, y = roll()
return c, (x, y)
Since I haven't seen it used in answers yet, here's another option using our
new walrus operator
def how_many_times():
roll_count = 1
while (rolls := roll())[0] != rol
Hello, forum,
I have a data frame with covid-19 cases per month from 2019 - 2021 like a
header like this:
Country, 01/01/2019, 2/01/2019, 01/02/2019, 3/01/2019, ... 01/01/2021,
2/01/2021, 01/02/2021, 3/01/2021
I want to filter my data frame for columns of a specific month range of march
to Sep
How about this?:
python3 -c 'list_ = [1, 3, 5, 4, 2]; am = max((value, index) for index,
value in enumerate(list_)); print(am)'
On Wed, Sep 1, 2021 at 6:51 AM ABCCDE921
wrote:
> Because that does 2 passes over the entire array when you only need one
> and there is no option to specify if you w
On Fri, 3 Sep 2021 04:43:02 +1000, Chris Angelico
declaimed the following:
>
>The naive summation algorithm used by sum() is compatible with a
>variety of different data types - even lists, although it's documented
>as being intended for numbers - but if you know for sure that you're
>working wit
On Thu, 02 Sep 2021 12:08:21 -0300, Hope Rouselle
declaimed the following:
>Suppose these numbers are prices in dollar, never going beyond cents.
>Would it be safe to multiply each one of them by 100 and therefore work
>with cents only? For instance
>
A lot of software with a "monetary
On Thu, 02 Sep 2021 10:51:03 -0300, Hope Rouselle
declaimed the following:
ls = [7.23, 8.41, 6.15, 2.31, 7.73, 7.77]
sum(ls)
>39.594
>
ls = [8.41, 6.15, 2.31, 7.73, 7.77, 7.23]
sum(ls)
>39.61
>
>All I did was to take the first number, 7.23, and move it
On 2021-09-02, Hope Rouselle wrote:
> Suppose these numbers are prices in dollar, never going beyond cents.
> Would it be safe to multiply each one of them by 100 and therefore work
> with cents only?
The _practical_ answer is that no, it's not safe to use floating point
when doing normal bookee
On 02/09/2021 20:11, MRAB wrote:
>> In one of them (I can't recall which is which) they change on the 4th
>> weekend of October/March in the other they change on the last weekend.
>>
>>
> In the EU (and UK) it's the last Sunday in March/October.
>
> In the US it's second Sunday in March and the f
On Fri, Sep 3, 2021 at 4:40 AM Alan Gauld via Python-list
wrote:
>
> On 31/08/2021 23:31, Chris Angelico wrote:
>
> > Ah, good to know. I think that actually makes a lot of sense; in the
> > US, they try to let everyone pretend that the rest of the world
> > doesn't exist ("we always change at 2AM
On 02/09/2021 19:28, Chris Angelico wrote:
>> Except for the places that don't follow the IANA scheme and/or
>> dynamically change their time settings on a whim. To be complete
>> you need the ability to manually override too.
>>
>
> What places are those?
Mainly small non-tech oriented places
On Fri, Sep 3, 2021 at 4:26 AM Alan Gauld via Python-list
wrote:
>
> On 31/08/2021 22:32, Chris Angelico wrote:
>
> > If we could abolish DST world-wide, life would be far easier. All the
> > rest of it would be easy enough to handle.
> We tried that in the UK for 2 years back in the '70s and very
On Fri, Sep 3, 2021 at 4:58 AM Hope Rouselle wrote:
>
> Hope Rouselle writes:
>
> > Just sharing a case of floating-point numbers. Nothing needed to be
> > solved or to be figured out. Just bringing up conversation.
> >
> > (*) An introduction to me
> >
> > I don't understand floating-point num
On 2021-09-02 08:40, Alan Gauld via Python-list wrote:
On 31/08/2021 23:31, Chris Angelico wrote:
Ah, good to know. I think that actually makes a lot of sense; in the
US, they try to let everyone pretend that the rest of the world
doesn't exist ("we always change at 2AM"), but in Europe, they t
On Fri, Sep 3, 2021 at 4:51 AM Hope Rouselle wrote:
>
> Chris Angelico writes:
>
> > On Mon, Aug 30, 2021 at 11:13 PM David Raymond
> > wrote:
> >>
> >> > def how_many_times():
> >> > x, y = 0, 1
> >> > c = 0
> >> > while x != y:
> >> > c = c + 1
> >> > x, y = roll()
> >> > retu
On Fri, Sep 3, 2021 at 4:29 AM Hope Rouselle wrote:
>
> Just sharing a case of floating-point numbers. Nothing needed to be
> solved or to be figured out. Just bringing up conversation.
>
> (*) An introduction to me
>
> I don't understand floating-point numbers from the inside out, but I do
> kn
Sometimes I like to pass the logging level up to the command line params so my
user can specific what level of logging they want. However there is no easy
method for pulling the named logging level names.
Looking into the code, it would actually be incredibly easy to implement;
in `logging.__in
More best kept secrets of Prolog: Pattern Matching
Everybody loves pattern matching. Languages
like Python, release 3.10, even provide it
now. There is now a match/case statement
in Python. But Prolog users will scratch their
head. Will my if-then-else be as fast as a
imperative switch jump tabl
On Fri, Sep 3, 2021 at 4:33 AM Hope Rouselle wrote:
> Yeah. Here's a little context. I came across this by processing a list
> of exercises. (I'm teaching a course --- you know that by now, I
> guess.) So the first thing I observed was the equal volume of work
> dedicated to while loops and fo
Hope Rouselle writes:
> Just sharing a case of floating-point numbers. Nothing needed to be
> solved or to be figured out. Just bringing up conversation.
>
> (*) An introduction to me
>
> I don't understand floating-point numbers from the inside out, but I do
> know how to work with base 2 and
On Fri, Sep 3, 2021 at 4:22 AM Alan Gauld via Python-list
wrote:
>
> On 31/08/2021 22:13, Chris Angelico wrote:
>
> > But ultimately, it all just means that timezones are too hard for
> > humans to handle, and we MUST handle them using IANA's database. It is
> > the only way.
>
> Except for the pl
Am 02.09.21 um 15:51 schrieb Hope Rouselle:
Just sharing a case of floating-point numbers. Nothing needed to be
solved or to be figured out. Just bringing up conversation.
(*) An introduction to me
I don't understand floating-point numbers from the inside out, but I do
know how to work with b
On Fri, Sep 3, 2021 at 4:18 AM Dennis Lee Bieber wrote:
>
> On Tue, 31 Aug 2021 16:53:14 -0500, 2qdxy4rzwzuui...@potatochowder.com
> declaimed the following:
>
> >On 2021-09-01 at 07:32:43 +1000,
> >Chris Angelico wrote:
> >> If we could abolish DST world-wide, life would be far easier. All the
>
Chris Angelico writes:
> On Mon, Aug 30, 2021 at 11:13 PM David Raymond
> wrote:
>>
>> > def how_many_times():
>> > x, y = 0, 1
>> > c = 0
>> > while x != y:
>> > c = c + 1
>> > x, y = roll()
>> > return c, (x, y)
>>
>> Since I haven't seen it used in answers yet, here's another
Terry Reedy writes:
> On 8/28/2021 9:31 AM, Hope Rouselle wrote:
>> I'd like get a statistic of how often each loop is used in practice.
>
> My guess is that for loops are at least twice as common as while loops.
Scanning just the Python 3.9.6's Lib/ directory --- using the ast module
and the pr
On 31/08/2021 18.02, Barry wrote:
The big problem with >>> is that it means a third level quote in email clients.
So when people cut-n-paste REPL output it’s formatted badly by email clients.
A prompt that avoided that issue would be nice.
A little bit of piping fixes that:
username@hostname$
Chris Angelico writes:
> On Sun, Aug 29, 2021 at 7:40 AM Hope Rouselle wrote:
>>
>> I'd like get a statistic of how often each loop is used in practice.
>>
>> I was trying to take a look at the Python's standard libraries --- those
>> included in a standard installation of Python 3.9.6, say ---
Am 02.09.21 um 16:49 schrieb Julio Di Egidio:
On Thursday, 2 September 2021 at 16:41:38 UTC+2, Peter Pearson wrote:
On Thu, 02 Sep 2021 10:51:03 -0300, Hope Rouselle wrote:
39.61
Welcome to the exciting world of roundoff error:
Welcome to the exiting world of Usenet.
*Plonk*
On 31/08/2021 23:31, Chris Angelico wrote:
> Ah, good to know. I think that actually makes a lot of sense; in the
> US, they try to let everyone pretend that the rest of the world
> doesn't exist ("we always change at 2AM"), but in Europe, they try to
> synchronize for the convenience of commerce
David Raymond writes:
>> def how_many_times():
>> x, y = 0, 1
>> c = 0
>> while x != y:
>> c = c + 1
>> x, y = roll()
>> return c, (x, y)
>
> Since I haven't seen it used in answers yet, here's another option using our
> new walrus operator
>
> def how_many_times():
> roll_co
On Thursday, September 2, 2021 at 10:16:09 AM UTC+8, hongy...@gmail.com wrote:
> On Wednesday, September 1, 2021 at 11:20:21 PM UTC+8, Lee Congdon wrote:
> > Does a mutually exclusive group, as described in "Mutual exclusion" at
> > https://docs.python.org/3/library/argparse.html meet your needs?
On Thu, 02 Sep 2021 10:51:03 -0300, Hope Rouselle wrote:
>
import sys
sys.version
> '3.8.10 (tags/...
>
ls = [7.23, 8.41, 6.15, 2.31, 7.73, 7.77]
sum(ls)
> 39.594
>
ls = [8.41, 6.15, 2.31, 7.73, 7.77, 7.23]
sum(ls)
> 39.61
Welcome to the excit
On Wednesday, September 1, 2021 at 11:20:21 PM UTC+8, Lee Congdon wrote:
> Does a mutually exclusive group, as described in "Mutual exclusion" at
> https://docs.python.org/3/library/argparse.html meet your needs?
Thanks for letting me know about this feature. I'll give it a try.
>
> On Wed, Se
dn writes:
> On 29/08/2021 08.46, Hope Rouselle wrote:
>> Here's my solution:
>>
>> --8<---cut here---start->8---
>> def how_many_times():
>> x, y = 0, 1
>> c = 0
>> while x != y:
>> c = c + 1
>> x, y = roll()
>> return c, (x, y)
>
>>
>> Why a
Just sharing a case of floating-point numbers. Nothing needed to be
solved or to be figured out. Just bringing up conversation.
(*) An introduction to me
I don't understand floating-point numbers from the inside out, but I do
know how to work with base 2 and scientific notation. So the idea of
Looking for Python package to develop positive inventory control
for a chain of stores.
Alex kaye
--
https://mail.python.org/mailman/listinfo/python-list
Barry writes:
>> On 28 Aug 2021, at 22:42, Hope Rouselle wrote:
>>
>> I'd like get a statistic of how often each loop is used in practice.
>>
>> I was trying to take a look at the Python's standard libraries --- those
>> included in a standard installation of Python 3.9.6, say --- to see
>>
On 31/08/2021 22:32, Chris Angelico wrote:
> If we could abolish DST world-wide, life would be far easier. All the
> rest of it would be easy enough to handle.
We tried that in the UK for 2 years back in the '70s and very
quickly reverted to DST when they realized that the number
of fatalities amo
On 31/08/2021 22:13, Chris Angelico wrote:
> But ultimately, it all just means that timezones are too hard for
> humans to handle, and we MUST handle them using IANA's database. It is
> the only way.
Except for the places that don't follow the IANA scheme and/or
dynamically change their time sett
On Tue, 31 Aug 2021 16:53:14 -0500, 2qdxy4rzwzuui...@potatochowder.com
declaimed the following:
>On 2021-09-01 at 07:32:43 +1000,
>Chris Angelico wrote:
>> If we could abolish DST world-wide, life would be far easier. All the
>> rest of it would be easy enough to handle.
>
>Agreed.
>
Unf
"Dieter Maurer" writes:
> Loris Bennett wrote at 2021-9-1 13:48 +0200:
>> ...
>>Yes, but to quote from
>>https://docs.python.org/3.6/howto/logging.html#logging-basic-tutorial:
>>
>> A good convention to use when naming loggers is to use a module-level
>> logger, in each module which uses loggi
On Wed, 1 Sep 2021 09:38:30 +1000, Chris Angelico
declaimed the following:
>Yeah, I have no idea where the "farmers" explanation came from.
>Growing up, we had some friends in countrified areas, including a
>sheep farmer who showed us a ton of stuff about how shearing worked,
>how moronic sheep
On Wed, 1 Sep 2021 11:19:03 +1200, dn via Python-list
declaimed the following:
>time-zones. (Yes, you did say "CA", but easily 'missed' - by author and
>reader alike)
Or possibly misread as the Peoples Republic of CALIFORNIA (even if
there isn't a "New Brunswick" in the PRCa)
50 matches
Mail list logo