Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #355209 > unrolled thread
| Started by | DFS <nospam@dfs.com> |
|---|---|
| First post | 2016-05-13 21:27 -0400 |
| Last post | 2016-05-14 05:28 -0700 |
| Articles | 20 on this page of 25 — 6 participants |
Back to article view | Back to comp.os.linux.advocacy
Melzzzzz, where's your stats source code? DFS <nospam@dfs.com> - 2016-05-13 21:27 -0400
Re: Melzzzzz, where's your stats source code? Melzzzzz <mel@zzzzz.com> - 2016-05-14 04:11 +0200
Re: Melzzzzz, where's your stats source code? DFS <nospam@dfs.com> - 2016-05-13 23:08 -0400
Re: Melzzzzz, where's your stats source code? owl <owl@rooftop.invalid> - 2016-05-14 03:16 +0000
Re: Melzzzzz, where's your stats source code? Melzzzzz <mel@zzzzz.com> - 2016-05-14 05:22 +0200
Re: Melzzzzz, where's your stats source code? DFS <nospam@dfs.com> - 2016-05-14 20:47 -0400
Re: Melzzzzz, where's your stats source code? DFS <nospam@dfs.com> - 2016-05-14 00:02 -0400
Re: Melzzzzz, where's your stats source code? owl <owl@rooftop.invalid> - 2016-05-14 05:09 +0000
Re: Melzzzzz, where's your stats source code? DFS <nospam@dfs.com> - 2016-05-15 12:00 -0400
Re: Melzzzzz, where's your stats source code? owl <owl@rooftop.invalid> - 2016-05-15 17:07 +0000
Re: Melzzzzz, where's your stats source code? DFS <nospam@dfs.com> - 2016-05-15 14:12 -0400
Re: Melzzzzz, where's your stats source code? DFS <nospam@dfs.com> - 2016-05-15 20:05 -0400
Re: Melzzzzz, where's your stats source code? owl <owl@rooftop.invalid> - 2016-05-16 01:45 +0000
Re: Melzzzzz, where's your stats source code? owl <owl@rooftop.invalid> - 2016-05-16 02:06 +0000
Re: Melzzzzz, where's your stats source code? Melzzzzz <mel@zzzzz.com> - 2016-05-14 15:00 +0200
Re: Melzzzzz, where's your stats source code? DFS <nospam@dfs.com> - 2016-05-16 19:16 -0400
Re: Melzzzzz, where's your stats source code? Melzzzzz <mel@zzzzz.com> - 2016-05-17 01:28 +0200
Re: Melzzzzz, where's your stats source code? DFS <nospam@dfs.com> - 2016-05-16 19:45 -0400
Re: Melzzzzz, where's your stats source code? Steve Carroll <fretwizzer@gmail.com> - 2016-05-16 18:19 -0700
Re: Melzzzzz, where's your stats source code? DFS <nospam@dfs.com> - 2016-05-18 09:14 -0400
No body wants your defective source code John Gohde <john.h.gohde@gmail.com> - 2016-05-13 20:27 -0700
Re: No body wants your defective source code owl <owl@rooftop.invalid> - 2016-05-14 03:45 +0000
Can owl kindly STOP pooping crap all over the place? John Gohde <john.h.gohde@gmail.com> - 2016-05-14 05:26 -0700
Re: Melzzzzz, where's your stats source code? 7 <7@enemygadgets.com> - 2016-05-14 11:14 +0000
Re: Melzzzzz, where's your stats source code? John Gohde <john.h.gohde@gmail.com> - 2016-05-14 05:28 -0700
Page 1 of 2 [1] 2 Next page →
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2016-05-13 21:27 -0400 |
| Subject | Melzzzzz, where's your stats source code? |
| Message-ID | <nh5uo7$gca$1@dont-email.me> |
It's time for you to post it.
[toc] | [next] | [standalone]
| From | Melzzzzz <mel@zzzzz.com> |
|---|---|
| Date | 2016-05-14 04:11 +0200 |
| Message-ID | <20160514041144.59c3bfaa@maxa-pc> |
| In reply to | #355209 |
On Fri, 13 May 2016 21:27:53 -0400 DFS <nospam@dfs.com> wrote: > It's time for you to post it. Sure...
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2016-05-13 23:08 -0400 |
| Message-ID | <nh64ll$tib$1@dont-email.me> |
| In reply to | #355214 |
On 5/13/2016 10:11 PM, Melzzzzz wrote: > On Fri, 13 May 2016 21:27:53 -0400 > DFS <nospam@dfs.com> wrote: > >> It's time for you to post it. > > Sure... ?
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2016-05-14 03:16 +0000 |
| Message-ID | <fhgvm.fkf0iz@rooftop.invalid> |
| In reply to | #355222 |
DFS <nospam@dfs.com> wrote: > On 5/13/2016 10:11 PM, Melzzzzz wrote: >> On Fri, 13 May 2016 21:27:53 -0400 >> DFS <nospam@dfs.com> wrote: >> >>> It's time for you to post it. >> >> Sure... > > ? > That code is Melzzzzz'zz. Make your own.
[toc] | [prev] | [next] | [standalone]
| From | Melzzzzz <mel@zzzzz.com> |
|---|---|
| Date | 2016-05-14 05:22 +0200 |
| Message-ID | <20160514052242.0e813055@maxa-pc> |
| In reply to | #355225 |
On Sat, 14 May 2016 03:16:22 +0000 (UTC) owl <owl@rooftop.invalid> wrote: > DFS <nospam@dfs.com> wrote: > > On 5/13/2016 10:11 PM, Melzzzzz wrote: > >> On Fri, 13 May 2016 21:27:53 -0400 > >> DFS <nospam@dfs.com> wrote: > >> > >>> It's time for you to post it. > >> > >> Sure... > > > > ? > > > > That code is Melzzzzz'zz. Make your own. > He can't compile it anyway as I use my tree&qt library.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2016-05-14 20:47 -0400 |
| Message-ID | <nh8gor$cd8$1@dont-email.me> |
| In reply to | #355227 |
On 5/13/2016 11:22 PM, Melzzzzz wrote: > On Sat, 14 May 2016 03:16:22 +0000 (UTC) > owl <owl@rooftop.invalid> wrote: > >> DFS <nospam@dfs.com> wrote: >>> On 5/13/2016 10:11 PM, Melzzzzz wrote: >>>> On Fri, 13 May 2016 21:27:53 -0400 >>>> DFS <nospam@dfs.com> wrote: >>>> >>>>> It's time for you to post it. >>>> >>>> Sure... >>> >>> ? >>> >> >> That code is Melzzzzz'zz. Make your own. >> > > He can't compile it anyway as I use my tree&qt library. fraidy-cat...
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2016-05-14 00:02 -0400 |
| Message-ID | <nh67q5$4pu$2@dont-email.me> |
| In reply to | #355225 |
On 5/13/2016 11:16 PM, owl wrote: > DFS <nospam@dfs.com> wrote: >> On 5/13/2016 10:11 PM, Melzzzzz wrote: >>> On Fri, 13 May 2016 21:27:53 -0400 >>> DFS <nospam@dfs.com> wrote: >>> >>>> It's time for you to post it. >>> >>> Sure... >> >> ? >> > > That code is Melzzzzz'zz. Make your own. That code belongs to the community!
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2016-05-14 05:09 +0000 |
| Message-ID | <fhgjvncmd00ae.fju@rooftop.invalid> |
| In reply to | #355235 |
DFS <nospam@dfs.com> wrote: > On 5/13/2016 11:16 PM, owl wrote: >> DFS <nospam@dfs.com> wrote: >>> On 5/13/2016 10:11 PM, Melzzzzz wrote: >>>> On Fri, 13 May 2016 21:27:53 -0400 >>>> DFS <nospam@dfs.com> wrote: >>>> >>>>> It's time for you to post it. >>>> >>>> Sure... >>> >>> ? >>> >> >> That code is Melzzzzz'zz. Make your own. > > > That code belongs to the community! > Nope. Get to work, boy. Here's what I get for you from yesterday. Checked all posts matching date "13 May 2016" and used min and max article ids returned to match your nym over that range: xpat date 2155087-2240910 *13 May 2016* 221 date matches follow (NOV) 2240584 Fri, 13 May 2016 00:19:20 +0200 2240588 Fri, 13 May 2016 00:27:28 +0200 2240610 Fri, 13 May 2016 01:32:11 +0200 2240612 Fri, 13 May 2016 01:37:11 +0200 2240616 13 May 2016 00:13:24 GMT 2240617 Fri, 13 May 2016 00:25:20 -0000 (UTC) ... 2240902 Fri, 13 May 2016 20:27:58 -0700 (PDT) 2240908 Fri, 13 May 2016 23:59:50 -0400 2240910 Fri, 13 May 2016 21:28:57 -0700 . xpat from 2240584-2240910 *DFS* 221 from matches follow (NOV) 2240613 DFS <nospam@dfs.com> 2240631 DFS <nospam@dfs.com> 2240642 DFS <nospam@dfs.com> 2240643 DFS <nospam@dfs.com> 2240644 DFS <nospam@dfs.com> 2240648 DFS <nospam@dfs.com> ... 2240895 DFS <nospam@dfs.com> 2240900 DFS <nospam@dfs.com> 2240908 DFS <nospam@dfs.com> 2240909 DFS <nospam@dfs.com> . You can pipe your connection to /usr/bin/tee and have everything saved to a file: anon@lowtide:~$ telnet localhost 119 | tee newsout Cull out what you want: anon@lowtide:~$ cat dfscount20160513 2240613 DFS <nospam@dfs.com> 2240631 DFS <nospam@dfs.com> 2240642 DFS <nospam@dfs.com> 2240643 DFS <nospam@dfs.com> 2240644 DFS <nospam@dfs.com> 2240648 DFS <nospam@dfs.com> 2240649 DFS <nospam@dfs.com> 2240650 DFS <nospam@dfs.com> 2240653 DFS <nospam@dfs.com> 2240684 DFS <nospam@dfs.com> 2240685 DFS <nospam@dfs.com> 2240688 DFS <nospam@dfs.com> 2240690 DFS <nospam@dfs.com> 2240691 DFS <nospam@dfs.com> 2240692 DFS <nospam@dfs.com> 2240693 DFS <nospam@dfs.com> 2240696 DFS <nospam@dfs.com> 2240701 DFS <nospam@dfs.com> 2240787 DFS <nospam@dfs.com> 2240789 DFS <nospam@dfs.com> 2240794 DFS <nospam@dfs.com> 2240798 DFS <nospam@dfs.com> 2240802 DFS <nospam@dfs.com> 2240806 DFS <nospam@dfs.com> 2240850 DFS <nospam@dfs.com> 2240860 DFS <nospam@dfs.com> 2240861 DFS <nospam@dfs.com> 2240863 DFS <nospam@dfs.com> 2240864 DFS <nospam@dfs.com> 2240877 DFS <nospam@dfs.com> 2240895 DFS <nospam@dfs.com> 2240900 DFS <nospam@dfs.com> 2240908 DFS <nospam@dfs.com> 2240909 DFS <nospam@dfs.com> anon@lowtide:~$ anon@lowtide:~$ wc -l dfscount20160513 34 dfscount20160513 anon@lowtide:~$ Have your code do that kind of stuff over and over, toss in a little math and some text formatting, and you're done.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2016-05-15 12:00 -0400 |
| Message-ID | <nha68h$9re$1@dont-email.me> |
| In reply to | #355239 |
On 5/14/2016 1:09 AM, owl wrote:
> Have your code do that kind of stuff over and over, toss in a little
> math and some text formatting, and you're done.
?!?!
I'm all over it. I know how to write frickin' newsgroup stats code...
----------------------------------------------------------
import sys, nntplib
SRV = "reader80.eternal-september.org"
GRP = "comp.os.linux.advocacy"
news = nntplib.NNTP(SRV,80,"<usr>","<pwd>")
resp, IDs, beginID, endID, grpNm = news.group(GRP)
getLatest = int(sys.argv[2])
firstID = int(endID) - getLatest + 1
lastID = int(endID)
articles = "%s-%s" % (firstID, lastID)
def calcStat(stat, hdr, rng):
p = []
for item in stat:
resp, data = news.xhdr(item,rng)
for i in range(len(data)): p.append(data[i][1])
x = [(i,p.count(i)) for i in set(p)]
x.sort(key=lambda s: (-s[1], s[0].lower()))
print "Posts %s %s" % (len(set(p)), hdr)
print "----- --------------------------------------------------"
for val in x: print " %s %s" % (val[1], val[0])
print "---------------------------------------------------------"
if len(p) == getLatest: print " " + str(len(p)) + " total"
if len(p) != getLatest: print " %s total (%s posts missing the header)"
% (len(p), getLatest-len(p))
print; print
def newThreadCount(rng):
resp, references = news.xhdr("References", rng)
resp, subjects = news.xhdr("Subject", rng)
resp, messageIDs = news.xhdr("Message-ID",rng)
t1,t2 = [],[]
for refID, refs in references:
if refs == "":
for subID, subject in subjects:
if refID == subID:
for articleID, msgID in messageIDs:
if refID == articleID:
t1.append((refID, subject, msgID))
for articleID, sub, msgID in t1:
i = 0
for refID, refs in references:
if msgID in refs:i += 1
t2.append((articleID, sub, msgID, i))
t2.sort(key=lambda s: (-s[3], s[1].lower()))
print "Posts %s %s" % (len(t2), "New Threads")
print "----- ---------------------------------------------------------"
for val in t2: print " %s %s" % (val[3], val[1])
print "----- ---------------------------------------------------------"
calcStat(['From'],"Posters", articles)
calcStat(['User-Agent','X-Newsreader'],"Newsreaders", articles)
calcStat(['Organization'],"Organizations", articles)
newThreadCount(articles)
news.quit()
----------------------------------------------------------
(note: that's 50 TIGHT lines of hi-kualitee hobbyware)
usage: python filename.py last N
Melzzzzz ran away a while back when I asked why his code split a thread
into 3 parts and counted them separately, while Thunderbird threaded and
displayed it correctly.
That's the main reason I wanted to see his code. But for some reason,
he's afraid to give it up.
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2016-05-15 17:07 +0000 |
| Message-ID | <fhjgoz03.a33@rooftop.invalid> |
| In reply to | #355494 |
DFS <nospam@dfs.com> wrote:
> On 5/14/2016 1:09 AM, owl wrote:
>
>
>> Have your code do that kind of stuff over and over, toss in a little
>> math and some text formatting, and you're done.
>
>
> ?!?!
>
> I'm all over it. I know how to write frickin' newsgroup stats code...
>
> ----------------------------------------------------------
> import sys, nntplib
> SRV = "reader80.eternal-september.org"
> GRP = "comp.os.linux.advocacy"
> news = nntplib.NNTP(SRV,80,"<usr>","<pwd>")
> resp, IDs, beginID, endID, grpNm = news.group(GRP)
> getLatest = int(sys.argv[2])
> firstID = int(endID) - getLatest + 1
> lastID = int(endID)
> articles = "%s-%s" % (firstID, lastID)
> def calcStat(stat, hdr, rng):
> p = []
> for item in stat:
> resp, data = news.xhdr(item,rng)
> for i in range(len(data)): p.append(data[i][1])
> x = [(i,p.count(i)) for i in set(p)]
> x.sort(key=lambda s: (-s[1], s[0].lower()))
> print "Posts %s %s" % (len(set(p)), hdr)
> print "----- --------------------------------------------------"
> for val in x: print " %s %s" % (val[1], val[0])
> print "---------------------------------------------------------"
> if len(p) == getLatest: print " " + str(len(p)) + " total"
> if len(p) != getLatest: print " %s total (%s posts missing the header)"
> % (len(p), getLatest-len(p))
> print; print
> def newThreadCount(rng):
> resp, references = news.xhdr("References", rng)
> resp, subjects = news.xhdr("Subject", rng)
> resp, messageIDs = news.xhdr("Message-ID",rng)
> t1,t2 = [],[]
> for refID, refs in references:
> if refs == "":
> for subID, subject in subjects:
> if refID == subID:
> for articleID, msgID in messageIDs:
> if refID == articleID:
> t1.append((refID, subject, msgID))
> for articleID, sub, msgID in t1:
> i = 0
> for refID, refs in references:
> if msgID in refs:i += 1
> t2.append((articleID, sub, msgID, i))
> t2.sort(key=lambda s: (-s[3], s[1].lower()))
> print "Posts %s %s" % (len(t2), "New Threads")
> print "----- ---------------------------------------------------------"
> for val in t2: print " %s %s" % (val[3], val[1])
> print "----- ---------------------------------------------------------"
> calcStat(['From'],"Posters", articles)
> calcStat(['User-Agent','X-Newsreader'],"Newsreaders", articles)
> calcStat(['Organization'],"Organizations", articles)
> newThreadCount(articles)
> news.quit()
> ----------------------------------------------------------
>
> (note: that's 50 TIGHT lines of hi-kualitee hobbyware)
>
> usage: python filename.py last N
>
>
>
> Melzzzzz ran away a while back when I asked why his code split a thread
> into 3 parts and counted them separately, while Thunderbird threaded and
> displayed it correctly.
>
> That's the main reason I wanted to see his code. But for some reason,
> he's afraid to give it up.
>
Cool, but you have to feed a number of posts, not all posts since a
particular date, like last week.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2016-05-15 14:12 -0400 |
| Message-ID | <nhae0b$avp$3@dont-email.me> |
| In reply to | #355512 |
On 5/15/2016 1:07 PM, owl wrote: > Cool, but you have to feed a number of posts, not all posts since a > particular date, like last week. Stay tuned!
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2016-05-15 20:05 -0400 |
| Message-ID | <nhb2lf$2rv$1@dont-email.me> |
| In reply to | #355239 |
On 5/14/2016 1:09 AM, owl wrote: > anon@lowtide:~$ wc -l dfscount20160513 > 34 dfscount20160513 I submitted 24 posts on 20160513.
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2016-05-16 01:45 +0000 |
| Message-ID | <llhjgid03.a3@rooftop.invalid> |
| In reply to | #355567 |
DFS <nospam@dfs.com> wrote: > On 5/14/2016 1:09 AM, owl wrote: > >> anon@lowtide:~$ wc -l dfscount20160513 >> 34 dfscount20160513 > > > I submitted 24 posts on 20160513. > > Right, you have to convert to UTC and verify. That list of 34 is just the received posts by you that came in within the range of all posts by anybody presenting a Date: header that matched the pattern "13 May 2016", not taking timezone into account. I'm showing 25 posts by you verified to be on 5/13 UTC. What's the first and last message-id you show for yourself on that date? These are the first and last I have by you that convert to 5/13 UTC: xpat message-id 2240631 * 221 message-id matches follow (NOV) 2240631 <nh3bqk$n03$1@dont-email.me> . xpat date 2240631 * 221 date matches follow (NOV) 2240631 Thu, 12 May 2016 21:52:41 -0400 . xpat message-id 2240860 * 221 message-id matches follow (NOV) 2240860 <nh5pik$36l$1@dont-email.me> . xpat date 2240860 * 221 date matches follow (NOV) 2240860 Fri, 13 May 2016 19:59:34 -0400 . anon@lowtide:~$ date -u -d "Thu, 12 May 2016 21:52:41 -0400" Fri May 13 01:52:41 UTC 2016 anon@lowtide:~$ date -u -d "Fri, 13 May 2016 19:59:34 -0400" Fri May 13 23:59:34 UTC 2016 anon@lowtide:~$
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2016-05-16 02:06 +0000 |
| Message-ID | <ghjdi03f.awefh@rooftop.invalid> |
| In reply to | #355571 |
owl <owl@rooftop.invalid> wrote: > DFS <nospam@dfs.com> wrote: >> On 5/14/2016 1:09 AM, owl wrote: >> >>> anon@lowtide:~$ wc -l dfscount20160513 >>> 34 dfscount20160513 >> >> >> I submitted 24 posts on 20160513. >> >> > > Right, you have to convert to UTC and verify. That list of 34 is just > the received posts by you that came in within the range of all posts by > anybody presenting a Date: header that matched the pattern "13 May 2016", > not taking timezone into account. > > I'm showing 25 posts by you verified to be on 5/13 UTC. What's the > first and last message-id you show for yourself on that date? > > These are the first and last I have by you that convert to 5/13 UTC: > > xpat message-id 2240631 * > 221 message-id matches follow (NOV) > 2240631 <nh3bqk$n03$1@dont-email.me> > . > xpat date 2240631 * > 221 date matches follow (NOV) > 2240631 Thu, 12 May 2016 21:52:41 -0400 > . > xpat message-id 2240860 * > 221 message-id matches follow (NOV) > 2240860 <nh5pik$36l$1@dont-email.me> > . > xpat date 2240860 * > 221 date matches follow (NOV) > 2240860 Fri, 13 May 2016 19:59:34 -0400 > . > > anon@lowtide:~$ date -u -d "Thu, 12 May 2016 21:52:41 -0400" > Fri May 13 01:52:41 UTC 2016 > anon@lowtide:~$ date -u -d "Fri, 13 May 2016 19:59:34 -0400" > Fri May 13 23:59:34 UTC 2016 > anon@lowtide:~$ > In fact, to get them all, you probably need to grab all messages one day before and one day after the target date before conversion.
[toc] | [prev] | [next] | [standalone]
| From | Melzzzzz <mel@zzzzz.com> |
|---|---|
| Date | 2016-05-14 15:00 +0200 |
| Message-ID | <20160514150026.71228635@maxa-pc> |
| In reply to | #355235 |
On Sat, 14 May 2016 00:02:32 -0400
DFS <nospam@dfs.com> wrote:
> On 5/13/2016 11:16 PM, owl wrote:
> > DFS <nospam@dfs.com> wrote:
> >> On 5/13/2016 10:11 PM, Melzzzzz wrote:
> >>> On Fri, 13 May 2016 21:27:53 -0400
> >>> DFS <nospam@dfs.com> wrote:
> >>>
> >>>> It's time for you to post it.
> >>>
> >>> Sure...
> >>
> >> ?
> >>
> >
> > That code is Melzzzzz'zz. Make your own.
>
>
> That code belongs to the community!
>
>
I won't post all but here is relevant part (golang):
ids,_ := conn.NewNews(grp,tm)
out := fmt.Sprintln("articles",len(ids),"since",tm)
rt := fmt.Sprintln(n,l,h)
var stat = make(map[string]int)
var subjects = make(map[string]int)
type Posters struct {
reader,poster string
}
var readers = make(map[Posters]int)
var repl = make(map[string]int)
for _,v := range ids {
v := strings.Replace(v,"%","%%",-1)
article,err := conn.Head(v)
if err == nil {
poster := RFC2047.Decode(article.Header["From"][0])
stat[poster]++
if rdr,ok := article.Header["X-Newsreader"];ok {
readers[Posters{rdr[0],poster}]++
} else if rdr,ok = article.Header["X-Mailer"];ok {
readers[Posters{rdr[0],poster}]++
} else if rdr,ok = article.Header["User-Agent"];ok{
readers[Posters{rdr[0],poster}]++
} else {
readers[Posters{"unknown",poster}]++
}
if s,ok:=article.Header["References"];ok {
ss := s[0]
strs := strings.Split(ss," ")
fmt.Sscan(ss,&ss);
subjects[strings.Replace(ss,"%","%%",-1)]++
parent,err := conn.Head(strings.Replace(strs[len(strs)-1],"%","%%",-1))
if err == nil {
repl[RFC2047.Decode(parent.Header["From"][0])]++
}
} else {
subjects[v] = 0
}
} else {
fmt.Println("error:",v,":",err)
stat["unknown"]++
}
}
tr1 := avl.New()
for k,v := range subjects {
fmt.Println(k,v)
article,err := conn.Head(k)
if err == nil {
tr1.InsertEqual(tree.Item{Key(v),RFC2047.Decode(article.Header["Subject"][0])})
} else {
log.Print(err)
}
}
tr := avl.New()
for k,v := range stat {
tr.InsertEqual(tree.Item{Key(v),k})
}
tr2 := avl.New()
for k,v := range readers {
tr2.InsertEqual(tree.Item{Key(v),k})
}
tr3 := avl.New()
for k,v := range repl {
tr3.InsertEqual(tree.Item{CRatio(stat[k],v),k})
}
out += fmt.Sprintln("\nPosters with most posts\nPosts\tPoster\tPosters",tr.Size())
for i := tr.Begin();i!=tr.End();i=i.Next() {
out += fmt.Sprintln(i.Value().Key.(Key),"\t",i.Value().Value.(string))
}
out += fmt.Sprintln("\nSubjects with most replies\nReplies\tSubject\tSubjects",tr1.Size())
for i := tr1.Begin();i!=tr1.End();i=i.Next() {
out += fmt.Sprintln(i.Value().Key.(Key),"\t",i.Value().Value.(string))
}
out += fmt.Sprintln("\nMost posts by newsreader,poster\nPosts\t\tReader,Poster\tReaders",tr2.Size())
for i := tr2.Begin();i!=tr2.End();i=i.Next() {
out += fmt.Sprintln(i.Value().Key.(Key),"\t",i.Value().Value.(Posters).reader,",",i.Value().Value.(Posters).poster)
}
out += fmt.Sprintln("\nPosters with most replies\nRatio\tReplies/Posts\tPoster")
for i := tr3.Begin();i!=tr3.End();i=i.Next() {
ratio := i.Value().Key.(Ratio)
out += fmt.Sprintf("%d/%d\t%f\t%s\n",ratio.replies,ratio.posts,float64(ratio.replies)/float64(ratio.posts),i.Value().Value.(string))
}
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2016-05-16 19:16 -0400 |
| Message-ID | <nhdk61$4hr$1@dont-email.me> |
| In reply to | #355270 |
On 5/14/2016 9:00 AM, Melzzzzz wrote:
> On Sat, 14 May 2016 00:02:32 -0400
> DFS <nospam@dfs.com> wrote:
>
>> On 5/13/2016 11:16 PM, owl wrote:
>>> DFS <nospam@dfs.com> wrote:
>>>> On 5/13/2016 10:11 PM, Melzzzzz wrote:
>>>>> On Fri, 13 May 2016 21:27:53 -0400
>>>>> DFS <nospam@dfs.com> wrote:
>>>>>
>>>>>> It's time for you to post it.
>>>>>
>>>>> Sure...
>>>>
>>>> ?
>>>>
>>>
>>> That code is Melzzzzz'zz. Make your own.
>>
>>
>> That code belongs to the community!
>>
>>
>
> I won't post all
Why not?
How are you getting the list of articleIDs to use?
If you're using a range of articles (say 584121-585327), are you
checking each one to be sure it falls in the UTC date range of your report?
> but here is relevant part (golang):
>
> ids,_ := conn.NewNews(grp,tm)
> out := fmt.Sprintln("articles",len(ids),"since",tm)
> rt := fmt.Sprintln(n,l,h)
> var stat = make(map[string]int)
> var subjects = make(map[string]int)
> type Posters struct {
> reader,poster string
> }
> var readers = make(map[Posters]int)
> var repl = make(map[string]int)
> for _,v := range ids {
> v := strings.Replace(v,"%","%%",-1)
> article,err := conn.Head(v)
> if err == nil {
> poster := RFC2047.Decode(article.Header["From"][0])
> stat[poster]++
> if rdr,ok := article.Header["X-Newsreader"];ok {
> readers[Posters{rdr[0],poster}]++
> } else if rdr,ok = article.Header["X-Mailer"];ok {
> readers[Posters{rdr[0],poster}]++
> } else if rdr,ok = article.Header["User-Agent"];ok{
> readers[Posters{rdr[0],poster}]++
> } else {
> readers[Posters{"unknown",poster}]++
> }
> if s,ok:=article.Header["References"];ok {
> ss := s[0]
> strs := strings.Split(ss," ")
> fmt.Sscan(ss,&ss);
> subjects[strings.Replace(ss,"%","%%",-1)]++
> parent,err := conn.Head(strings.Replace(strs[len(strs)-1],"%","%%",-1))
> if err == nil {
> repl[RFC2047.Decode(parent.Header["From"][0])]++
> }
> } else {
> subjects[v] = 0
> }
> } else {
> fmt.Println("error:",v,":",err)
> stat["unknown"]++
> }
> }
>
> tr1 := avl.New()
> for k,v := range subjects {
> fmt.Println(k,v)
> article,err := conn.Head(k)
> if err == nil {
> tr1.InsertEqual(tree.Item{Key(v),RFC2047.Decode(article.Header["Subject"][0])})
> } else {
> log.Print(err)
> }
> }
>
> tr := avl.New()
>
> for k,v := range stat {
> tr.InsertEqual(tree.Item{Key(v),k})
> }
>
> tr2 := avl.New()
> for k,v := range readers {
> tr2.InsertEqual(tree.Item{Key(v),k})
> }
>
> tr3 := avl.New()
> for k,v := range repl {
> tr3.InsertEqual(tree.Item{CRatio(stat[k],v),k})
> }
>
> out += fmt.Sprintln("\nPosters with most posts\nPosts\tPoster\tPosters",tr.Size())
> for i := tr.Begin();i!=tr.End();i=i.Next() {
> out += fmt.Sprintln(i.Value().Key.(Key),"\t",i.Value().Value.(string))
> }
> out += fmt.Sprintln("\nSubjects with most replies\nReplies\tSubject\tSubjects",tr1.Size())
> for i := tr1.Begin();i!=tr1.End();i=i.Next() {
> out += fmt.Sprintln(i.Value().Key.(Key),"\t",i.Value().Value.(string))
> }
> out += fmt.Sprintln("\nMost posts by newsreader,poster\nPosts\t\tReader,Poster\tReaders",tr2.Size())
> for i := tr2.Begin();i!=tr2.End();i=i.Next() {
> out += fmt.Sprintln(i.Value().Key.(Key),"\t",i.Value().Value.(Posters).reader,",",i.Value().Value.(Posters).poster)
> }
> out += fmt.Sprintln("\nPosters with most replies\nRatio\tReplies/Posts\tPoster")
> for i := tr3.Begin();i!=tr3.End();i=i.Next() {
> ratio := i.Value().Key.(Ratio)
> out += fmt.Sprintf("%d/%d\t%f\t%s\n",ratio.replies,ratio.posts,float64(ratio.replies)/float64(ratio.posts),i.Value().Value.(string))
> }
>
>
[toc] | [prev] | [next] | [standalone]
| From | Melzzzzz <mel@zzzzz.com> |
|---|---|
| Date | 2016-05-17 01:28 +0200 |
| Message-ID | <20160517012850.38be25d4@maxa-pc> |
| In reply to | #355667 |
On Mon, 16 May 2016 19:16:35 -0400 DFS <nospam@dfs.com> wrote: > On 5/14/2016 9:00 AM, Melzzzzz wrote: > > On Sat, 14 May 2016 00:02:32 -0400 > > DFS <nospam@dfs.com> wrote: > > > >> On 5/13/2016 11:16 PM, owl wrote: > >>> DFS <nospam@dfs.com> wrote: > >>>> On 5/13/2016 10:11 PM, Melzzzzz wrote: > >>>>> On Fri, 13 May 2016 21:27:53 -0400 > >>>>> DFS <nospam@dfs.com> wrote: > >>>>> > >>>>>> It's time for you to post it. > >>>>> > >>>>> Sure... > >>>> > >>>> ? > >>>> > >>> > >>> That code is Melzzzzz'zz. Make your own. > >> > >> > >> That code belongs to the community! > >> > >> > > > > I won't post all > > Why not? > > How are you getting the list of articleIDs to use? I use NewNews function from nntp library. > > If you're using a range of articles (say 584121-585327), are you > checking each one to be sure it falls in the UTC date range of your > report? Date `from` is given as function parameter. Function returns array of ids.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2016-05-16 19:45 -0400 |
| Message-ID | <nhdlsj$986$1@dont-email.me> |
| In reply to | #355668 |
On 5/16/2016 7:28 PM, Melzzzzz wrote: > On Mon, 16 May 2016 19:16:35 -0400 > DFS <nospam@dfs.com> wrote: > >> On 5/14/2016 9:00 AM, Melzzzzz wrote: >>> On Sat, 14 May 2016 00:02:32 -0400 >>> DFS <nospam@dfs.com> wrote: >>> >>>> On 5/13/2016 11:16 PM, owl wrote: >>>>> DFS <nospam@dfs.com> wrote: >>>>>> On 5/13/2016 10:11 PM, Melzzzzz wrote: >>>>>>> On Fri, 13 May 2016 21:27:53 -0400 >>>>>>> DFS <nospam@dfs.com> wrote: >>>>>>> >>>>>>>> It's time for you to post it. >>>>>>> >>>>>>> Sure... >>>>>> >>>>>> ? >>>>>> >>>>> >>>>> That code is Melzzzzz'zz. Make your own. >>>> >>>> >>>> That code belongs to the community! >>>> >>>> >>> >>> I won't post all >> >> Why not? What's up with the refusal to post all the code? >> How are you getting the list of articleIDs to use? > > I use NewNews function from nntp library. >> >> If you're using a range of articles (say 584121-585327), are you >> checking each one to be sure it falls in the UTC date range of your >> report? > > Date `from` is given as function parameter. Function returns array of > ids. >
[toc] | [prev] | [next] | [standalone]
| From | Steve Carroll <fretwizzer@gmail.com> |
|---|---|
| Date | 2016-05-16 18:19 -0700 |
| Message-ID | <8de39efa-5d55-4a36-a773-d38bafaf2b68@googlegroups.com> |
| In reply to | #355674 |
On Monday, May 16, 2016 at 5:45:49 PM UTC-6, DFS wrote: > On 5/16/2016 7:28 PM, Melzzzzz wrote: > > On Mon, 16 May 2016 19:16:35 -0400 > > DFS <nospam@dfs.com> wrote: > > > >> On 5/14/2016 9:00 AM, Melzzzzz wrote: > >>> On Sat, 14 May 2016 00:02:32 -0400 > >>> DFS <nospam@dfs.com> wrote: > >>> > >>>> On 5/13/2016 11:16 PM, owl wrote: > >>>>> DFS <nospam@dfs.com> wrote: > >>>>>> On 5/13/2016 10:11 PM, Melzzzzz wrote: > >>>>>>> On Fri, 13 May 2016 21:27:53 -0400 > >>>>>>> DFS <nospam@dfs.com> wrote: > >>>>>>> > >>>>>>>> It's time for you to post it. > >>>>>>> > >>>>>>> Sure... > >>>>>> > >>>>>> ? > >>>>>> > >>>>> > >>>>> That code is Melzzzzz'zz. Make your own. > >>>> > >>>> > >>>> That code belongs to the community! > >>>> > >>>> > >>> > >>> I won't post all > >> > >> Why not? > > What's up with the refusal to post all the code? > > > >> How are you getting the list of articleIDs to use? > > > > I use NewNews function from nntp library. > >> > >> If you're using a range of articles (say 584121-585327), are you > >> checking each one to be sure it falls in the UTC date range of your > >> report? > > > > Date `from` is given as function parameter. Function returns array of > > ids. > > Probably because you're all about paying for code ;)
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2016-05-18 09:14 -0400 |
| Message-ID | <nhhpk2$r0f$2@dont-email.me> |
| In reply to | #355685 |
On 5/16/2016 9:19 PM, Steve Carroll wrote: > On Monday, May 16, 2016 at 5:45:49 PM UTC-6, DFS wrote: >> On 5/16/2016 7:28 PM, Melzzzzz wrote: (refused to give it up) >> What's up with the refusal to post all the code? > > Probably because you're all about paying for code ;) Good point! Melzzzzz, here's some fresh Georgia USA possum roadkill in exchange for your code.
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.os.linux.advocacy
csiph-web