so I can find the maximum profit.
Have I to use heuristics? Do you know some examples?.
You would not use a heuristic to generate all possibilities. You might
use one to *avoid* doing that, and still get a good, not necessarily
optimal, answer.
True. Basically there are two ways of approa
What do you suggest Terry? I think this problem its similar to
traveler salesman. Some people solve it with Heuristic and some with
Linear programming or Stochastic programming.
On 25 jun, 03:28, Terry Reedy wrote:
> On 6/24/2010 9:13 PM, Marcos wrote:
>
> > I have a store,
order.
> >
> > >> So I want to create a function which I can pass the data, and
> > >> generates all the possibilities so I can find the maximum profit.
> >
> > >> Have I to use heuristics? Do you know some examples?.
> >
> > > You would
oducts for a order.
>
> >> So I want to create a function which I can pass the data, and
> >> generates all the possibilities so I can find the maximum profit.
>
> >> Have I to use heuristics? Do you know some examples?.
>
> > You would not use a heu
.
Have I to use heuristics? Do you know some examples?.
You would not use a heuristic to generate all possibilities. You might
use one to *avoid* doing that, and still get a good, not necessarily
optimal, answer.
True. Basically there are two ways of approaching the problem. One is to
try all
On 25 jun, 03:36, geremy condra wrote:
> On Thu, Jun 24, 2010 at 9:13 PM, Marcos wrote:
> > I have a store, so I want to maximize the profit. I have all the
> > suppliers with diferent prices, some providers can send products to a
> > client an others not, this has a plus price. Some providers ha
; So I want to create a function which I can pass the data, and
> > generates all the possibilities so I can find the maximum profit.
>
> > Have I to use heuristics? Do you know some examples?.
>
> You would not use a heuristic to generate all possibilities. You might
> use one to *avoid
On Thu, Jun 24, 2010 at 9:13 PM, Marcos wrote:
> I have a store, so I want to maximize the profit. I have all the
> suppliers with diferent prices, some providers can send products to a
> client an others not, this has a plus price. Some providers has a
> discount over the tansport if a quantity i
heuristics? Do you know some examples?.
You would not use a heuristic to generate all possibilities. You might
use one to *avoid* doing that, and still get a good, not necessarily
optimal, answer. Wikipedia has an general entry on 'heuristic'.
Algorithm books often specifically discuss
I have a store, so I want to maximize the profit. I have all the
suppliers with diferent prices, some providers can send products to a
client an others not, this has a plus price. Some providers has a
discount over the tansport if a quantity is reached.
Sometimes its better to me receive the order
On Thu, 09 Dec 2004 00:01:36 -0800, Lonnie Princehouse wrote:
> I believe you can still do this with only compiling a regex once and
> then performing a few substitutions on the hostname.
That is a interesting idea. Convert ip matches to fixed patterns, and
*then* match the regex. I think I wo
On Fri, 10 Dec 2004 22:03:20 +, JanC wrote:
> Stuart D. Gathman schreef:
>
>> I have a function that recognizes PTR records for dynamic IPs. There
> Did you also think about ISPs that use such a PTR record for both dynamic
> and fixed IPs?
There seems to be a lot of misunderstanding about
Stuart D. Gathman schreef:
> I have a function that recognizes PTR records for dynamic IPs. There
> is no hard and fast rule for this - every ISP does it differently, and
> may change their policy at any time, and use different conventions in
> different places. Nevertheless, it is useful to app
On Thu, 09 Dec 2004 00:01:36 -0800, Lonnie Princehouse wrote:
> I believe you can still do this with only compiling a regex once and
> then performing a few substitutions on the hostname.
Cool idea. Convert ip matches to fixed patterns before matching a fixed
regex. The leftovers like shaw cable
On Wed, 08 Dec 2004 18:38:14 -0500, Stuart D. Gathman wrote:
>> Here are the last 20 (which my subjective judgement says are correct):
>
> 65.112.76.15usfshlxmx01.myreg.net 201.128.108.41
[snip]
> 80.143.79.97p508F4F61.dip0.t-ipconnect.de DYN
Looks like you could do something like look
ther hostname is likely to represent
a dynamic ip.
Returns True or False.
"""
#for easier matching
ip=[int(p) for p in ip.split('.')]
host=host.lower()
#since it's heuristic, we'll give the hostname
#(de)merits for every pattern it matches further on.
Doh! I misread "a" as host instead of ip in your first post. I'm
sorry about that; I really must slow down. Anyhow,
I believe you can still do this with only compiling a regex once and
then performing a few substitutions on the hostname.
Substitutions:
1st byte of IP => (0)
2nd byte of IP =>
On Wed, 08 Dec 2004 19:52:53 -0500, Lonnie Princehouse wrote:
> I don't think a Bayesian classifier is going to be very helpful here,
> unless you have tens of thousands of examples to feed it, or unless it
We do have tens of thousands of examples to feed it.
> The series of if host.find(...) li
I don't think a Bayesian classifier is going to be very helpful here,
unless you have tens of thousands of examples to feed it, or unless it
was specially coded to first break addresses into better tokens for
classification (such as alphanumeric strings and numbers).
The series of if host.find(...
On Wed, 08 Dec 2004 18:39:15 -0500, Lonnie Princehouse wrote:
> Regular expressions.
>
> It takes a while to craft the expressions, but this will be more
> elegant, more extensible, and considerably faster to compute (matching
> compiled re's is fast).
I'm already doing that with the rehmac rege
On 8 Dec 2004 15:39:15 -0800, Lonnie Princehouse
<[EMAIL PROTECTED]> wrote:
> Regular expressions.
>
> It takes a while to craft the expressions, but this will be more
> elegant, more extensible, and considerably faster to compute (matching
> compiled re's is fast).
I think that this problem is p
Regular expressions.
It takes a while to craft the expressions, but this will be more
elegant, more extensible, and considerably faster to compute (matching
compiled re's is fast).
Example using the top five from your function's comments:
. host_patterns = [
. '^1Cust\d+\.tnt\d+\..*\.da\.uu\
;> # examples we don't yet recognize:
>> ...
>
> This doesn't help much; post example of all the possible patterns you
> have to match (kind of like the docstring at the beginning, only more
> elaborate), otherwise it's hard to know what kind of code you're trying
On Wed, 08 Dec 2004 16:09:43 -0500, Stuart D. Gathman <[EMAIL PROTECTED]>
wrote:
I have a function that recognizes PTR records for dynamic IPs
Here is the very ugly code so far.
...
# examples we don't yet recognize:
...
This doesn't help much; post example of all the possible patterns you h
I have a function that recognizes PTR records for dynamic IPs. There is
no hard and fast rule for this - every ISP does it differently, and may
change their policy at any time, and use different conventions in
different places. Nevertheless, it is useful to apply stricter
authentication standards
25 matches
Mail list logo