lf Of
Steven D'Aprano
Sent: Friday, December 28, 2018 11:12 PM
To: tutor@python.org
Subject: Re: [Tutor] decomposing a problem
On Fri, Dec 28, 2018 at 10:39:53PM -0500, Avi Gross wrote:
> I will answer this question then head off on vacation.
You wrote about 140 or more lines, but didn
mark which rows are to be used for which purpose. Later,
when using the data, you include a CONDITION that row X is true, or
whatever.
-Original Message-
From: Tutor On Behalf Of
Steven D'Aprano
Sent: Friday, December 28, 2018 11:12 PM
To: tutor@python.org
Subject: Re: [Tutor] dec
On Fri, Dec 28, 2018 at 10:39:53PM -0500, Avi Gross wrote:
> I will answer this question then head off on vacation.
You wrote about 140 or more lines, but didn't come close to answering
the question: how to randomly split data from a dictionary into training
data and reserved data.
--
Steve
ne language to be able to do what the other does, in some cases.
And, amusingly, much of the underlying functionality accessed is in C or C++
with some data structures being translated to/from the compiled C/C++
equivalents as you enter a function, them translated back at exit.
This is not very deep
On Fri, Dec 28, 2018 at 03:34:19PM -0500, Avi Gross wrote:
[...]
> You replied to one of my points with this about a way to partition data:
>
> ---
> The obvious solution:
>
> keys = list(mydict.keys())
> random.shuffle(keys)
> index = len(keys)*3//4
> training_data = keys[:index]
> reserved = k
On 28/12/2018 20:34, Avi Gross wrote:
> So before I respond, here is a general statement. I am NOT particularly
> interested in much of what we discuss here from a specific point of view.
> Someone raises a question and I think about it. They want to know of a
> better way to get a random key from
Steve,
I am going to just respond to one part of your message and will snip the
rest. I am not is disagreement with most of what you say and may simply
stress different aspects. I will say that unless I have reason to, I don't
feel a need to test speeds for an academic discussion. Had this been a
> On Dec 27, 2018, at 3:32 PM, Avi Gross wrote:
>
> [Mark Lawrence please press DELETE now in case the rest of this message is
> all about you.]
> [[If that is not working, if on Windows, try Control-ALT-DELETE as that will
> really get rid of my message.]]
>
Hi Avi,
Mark doesn’t have a basi
Subject: Re: [Tutor] decomposing a problem
On Wed, Dec 26, 2018 at 11:02:07AM -0500, Avi Gross wrote:
> I often find that I try to make a main point ad people then focus on
> something else, like an example.
I can't speak for others, but for me, that could be because of a number of
reason
On Wed, Dec 26, 2018 at 11:02:07AM -0500, Avi Gross wrote:
> I often find that I try to make a main point ad people then focus on
> something else, like an example.
I can't speak for others, but for me, that could be because of a number
of reasons:
- I agree with what you say, but don't feel li
On Thu, Dec 27, 2018 at 07:03:18PM +, Mark Lawrence wrote:
> On 26/12/2018 00:00, Avi Gross wrote:
> >[Long enough that some should neither read nor comment on.]
> >
>
> PLEASE GO AWAY YOU ARE REALLY IRRITATING.
People in glass houses...
Mark, you're not the arbiter of who is allowed to post
On 26/12/2018 00:00, Avi Gross wrote:
[Long enough that some should neither read nor comment on.]
PLEASE GO AWAY YOU ARE REALLY IRRITATING.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
may be required. And
extremely clever solutions being offered that may not even be understood,
often defeat the purpose.
-Original Message-
From: Tutor On Behalf Of
Steven D'Aprano
Sent: Wednesday, December 26, 2018 12:45 AM
To: tutor@python.org
Subject: Re: [Tutor] decomposing a proble
Behalf Of
Cameron Simpson
Sent: Tuesday, December 25, 2018 8:44 PM
To: tutor@python.org
Subject: Re: [Tutor] decomposing a problem
On 26Dec2018 01:06, Alan Gauld wrote:
>On 26/12/2018 00:00, Avi Gross wrote:
>> great. Many things in python can be made to fit and some need work.
>> Du
On Tue, Dec 25, 2018 at 11:56:21PM -0500, Avi Gross wrote:
> I find that many people are fairly uncomfortable with abstraction and
> tend to resist a pure top down approach by diving to any solutions
> they may envision.
https://blog.codinghorror.com/it-came-from-planet-architecture/
> As some
self near each other.
P.P.S. Please pardon my puns, especially the ones you did not notice.
-Original Message-
From: Tutor On Behalf Of
Steven D'Aprano
Sent: Tuesday, December 25, 2018 11:39 PM
To: tutor@python.org
Subject: Re: [Tutor] decomposing a problem
On Tue, Dec 25, 2018 at
al Message-
From: Mike Mossey
Sent: Tuesday, December 25, 2018 9:49 PM
To: Avi Gross
Subject: Re: [Tutor] decomposing a problem
> On Dec 25, 2018, at 4:00 PM, Avi Gross wrote:
>
> [Long enough that some should neither read nor comment on.]
>
> Mats raised an issue that
On Tue, Dec 25, 2018 at 10:25:50PM -0500, Avi Gross wrote:
> class chainable_list(list):
> """Same as list but sort() can now be chained"""
> def chainsort(this, *args, **kwargs):
> this.sort(*args, **kwargs)
> return this
In Python, it is traditional to use "self" rather
id something similar to many of the
methods that now return None, you could use the new class when needed.
This seems too simple so it must have been done. Obviously not in the
standard distribution but perhaps elsewhere. And, no, I do not expect a
method like pop() to suddenly return the list
On 26Dec2018 01:06, Alan Gauld wrote:
On 26/12/2018 00:00, Avi Gross wrote:
great. Many things in python can be made to fit and some need work.
Dumb example is that sorting something internally returns None and
not the object itself.
This is one of my few complaints about Python.
In Smalltal
On Wed, Dec 26, 2018 at 01:06:04AM +, Alan Gauld via Tutor wrote:
> In Smalltalk the default return value from
> any method is self. In Python it is None.
>
> self allows chaining of methods, None does not.
You might be interested in this simple recipe for retrofitting method
chaining onto
On 26/12/2018 00:00, Avi Gross wrote:
> great. Many things in python can be made to fit and some need work. Dumb
> example is that sorting something internally returns None and not the object
> itself.
This is one of my few complaints about Python.
In Smalltalk the default return value from
any
22 matches
Mail list logo