Help beautify ugly heuristic code

Stuart D. Gathman stuart at bmsi.com
Thu Dec 9 00:38:14 CET 2004


On Wed, 08 Dec 2004 18:00:06 -0500, Mitja wrote:

> On Wed, 08 Dec 2004 16:09:43 -0500, Stuart D. Gathman <stuart at bmsi.com>
> 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
> 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
> to implement.

This is a heuristic, so there is no exhaustive list or hard rule.
However, I have posted 23K+ examples at http://bmsi.com/python/dynip.samp
with DYN appended for examples which the current algorithm classifies
as dynamic.

Here are the last 20 (which my subjective judgement says are correct):

65.112.76.15    usfshlxmx01.myreg.net
201.128.108.41  dsl-201-128-108-41.prod-infinitum.com.mx DYN
206.221.177.128 mail128.tanthillyingyang.com
68.234.254.147  68-234-254-147.stmnca.adelphia.net DYN
63.110.30.30    mx81.goingwiththe-flow.info
62.178.226.189  chello062178226189.14.15.vie.surfer.at DYN
80.179.107.85   80.179.107.85.ispeednet.net DYN
200.204.68.52   200-204-68-52.dsl.telesp.net.br DYN
12.203.156.234  12-203-156-234.client.insightBB.com DYN
200.83.68.217   CM-lconC1-68-217.cm.vtr.net DYN
81.57.115.43    pauguste-3-81-57-115-43.fbx.proxad.net DYN
64.151.91.225   sv2a.entertainmentnewsclips.com
64.62.197.31    teenfreeway.sparklist.com
201.9.136.235   201009136235.user.veloxzone.com.br DYN
66.63.187.91    91.asandox.com
83.69.188.198   st11h07.ptambre.com
66.192.199.217  66-192-199-217.pyramidcollection.org DYN
69.40.166.49    h49.166.40.69.ip.alltel.net DYN
203.89.206.62   smtp.immigrationexpert.ca
80.143.79.97    p508F4F61.dip0.t-ipconnect.de DYN



More information about the Python-list mailing list