From darrell at golliher.net Mon Oct 13 10:56:55 2003 From: darrell at golliher.net (Darrell Golliher) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Next meeting(?) Message-ID: <20031013155655.GA18800@golliher.net> I've been asked when the next meeting is. How about this Thursday at 6:30? -Darrell From cygnus at cprogrammer.org Mon Oct 13 11:34:18 2003 From: cygnus at cprogrammer.org (Jonathan Daugherty) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Next meeting(?) In-Reply-To: <20031013155655.GA18800@golliher.net> References: <20031013155655.GA18800@golliher.net> Message-ID: <20031013163418.GA10212@mail.theserver.ath.cx> # I've been asked when the next meeting is. How about this Thursday # at 6:30? I motion to move the meeting day to wednesday, assuming that works for everyone else. Deanne and I are enrolled in a yoga class which, incidentally, will last for the rest of this calendar year; it meets on tues / thurs and prevents me from coming to the cc.pm meetings. -- Jonathan Daugherty http://www.cprogrammer.org "It's a book about a Spanish guy called Manual, you should read it." -- Dilbert From lgrove at uga.edu Mon Oct 13 12:51:52 2003 From: lgrove at uga.edu (Leslie Grove) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Next meeting(?) In-Reply-To: <20031013163418.GA10212@mail.theserver.ath.cx> References: <20031013155655.GA18800@golliher.net> <20031013163418.GA10212@mail.theserver.ath.cx> Message-ID: <3F8AE638.3050709@uga.edu> Don't suppose I could talk anyone into Fridays? Jonathan Daugherty wrote: > # I've been asked when the next meeting is. How about this Thursday > # at 6:30? > > I motion to move the meeting day to wednesday, assuming that works for > everyone else. Deanne and I are enrolled in a yoga class which, > incidentally, will last for the rest of this calendar year; it meets > on tues / thurs and prevents me from coming to the cc.pm meetings. > -- Leslie Grove Computing Services UGA Law School (706) 542-5070 lgrove@uga.edu From clmf8 at yahoo.com Mon Oct 13 13:05:03 2003 From: clmf8 at yahoo.com (Sam Feltus) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Re: Classiccity-pm Digest, Vol 4, Issue 1 In-Reply-To: <200310131700.h9DH0dl02519@mail.pm.org> Message-ID: <20031013180503.12363.qmail@web12507.mail.yahoo.com> Sounds good to me. classiccity-pm-request@mail.pm.org wrote:Send Classiccity-pm mailing list submissions to classiccity-pm@mail.pm.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.pm.org/mailman/listinfo/classiccity-pm or, via email, send a message with subject or body 'help' to classiccity-pm-request@mail.pm.org You can reach the person managing the list at classiccity-pm-owner@mail.pm.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Classiccity-pm digest..." Today's Topics: 1. Next meeting(?) (Darrell Golliher) ---------------------------------------------------------------------- Message: 1 Date: Mon, 13 Oct 2003 11:56:55 -0400 From: Darrell Golliher Subject: [Classiccity-pm] Next meeting(?) To: classiccity-pm@mail.pm.org Message-ID: <20031013155655.GA18800@golliher.net> Content-Type: text/plain; charset=us-ascii I've been asked when the next meeting is. How about this Thursday at 6:30? -Darrell ------------------------------ _______________________________________________ Classiccity-pm mailing list Classiccity-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/classiccity-pm End of Classiccity-pm Digest, Vol 4, Issue 1 ******************************************** --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/classiccity-pm/attachments/20031013/985b1d11/attachment.htm From darrell at golliher.net Mon Oct 13 13:47:36 2003 From: darrell at golliher.net (Darrell Golliher) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Next meeting(?) In-Reply-To: <20031013163418.GA10212@mail.theserver.ath.cx> References: <20031013155655.GA18800@golliher.net> <20031013163418.GA10212@mail.theserver.ath.cx> Message-ID: <20031013184736.GA20550@golliher.net> On Mon, Oct 13, 2003 at 12:34:18PM -0400, Jonathan Daugherty wrote: > # I've been asked when the next meeting is. How about this Thursday > # at 6:30? > > I motion to move the meeting day to wednesday, assuming that works for > everyone else. Deanne and I are enrolled in a yoga class which, > incidentally, will last for the rest of this calendar year; it meets > on tues / thurs and prevents me from coming to the cc.pm meetings. > It's so difficult to find one day and time that works for everybody. Wednesdays don't work for me for example. I have standing plans in Atlanta every Wednesday. The only thing I have on the agenda for this month is a talk about HTML::Mason. Let's try it another way.. Please go here and put your name down if you plan to attend (or wish to be on the agenda). http://classiccity.pm.org/null?ThirdMeeting Assuming we get three people besides myself we'll go ahead and hold the meeting. Otherwise, we'll try something else. -Darrell From darrell at golliher.net Tue Oct 14 10:43:50 2003 From: darrell at golliher.net (Darrell Golliher) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Setting the time and place for our next meeting Message-ID: <20031014154349.GA1462@golliher.net> Unfortunately the Library's conference room is booked for this Thursday and also Thursday the 23rd. So our options as I see them are to meet on the 30th or find a different meeting place. If you can secure a place for us to meet please let me know. Network access and a projector would both be nice to have. I've already had the Library pencil us in for the 30th, but I can call and cancel that if we decide to meet somewhere else. -Darrell From clmf8 at yahoo.com Tue Oct 14 12:07:20 2003 From: clmf8 at yahoo.com (Sam Feltus) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Re: Classiccity-pm Digest, Vol 4, Issue 2 In-Reply-To: <200310141700.h9EH0Kx12847@mail.pm.org> Message-ID: <20031014170720.5773.qmail@web12507.mail.yahoo.com> Wednesdays work for me, same as Thursdays Sam the Gardener classiccity-pm-request@mail.pm.org wrote: Send Classiccity-pm mailing list submissions to classiccity-pm@mail.pm.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.pm.org/mailman/listinfo/classiccity-pm or, via email, send a message with subject or body 'help' to classiccity-pm-request@mail.pm.org You can reach the person managing the list at classiccity-pm-owner@mail.pm.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Classiccity-pm digest..." Today's Topics: 1. Re: Next meeting(?) (Jonathan Daugherty) 2. Re: Next meeting(?) (Leslie Grove) 3. Re: Classiccity-pm Digest, Vol 4, Issue 1 (Sam Feltus) 4. Re: Next meeting(?) (Darrell Golliher) 5. Setting the time and place for our next meeting (Darrell Golliher) ---------------------------------------------------------------------- Message: 1 Date: Mon, 13 Oct 2003 12:34:18 -0400 From: Jonathan Daugherty Subject: Re: [Classiccity-pm] Next meeting(?) To: "All purpose mailing list for Athens, Ga Perl Mongers" Message-ID: <20031013163418.GA10212@mail.theserver.ath.cx> Content-Type: text/plain; charset=us-ascii # I've been asked when the next meeting is. How about this Thursday # at 6:30? I motion to move the meeting day to wednesday, assuming that works for everyone else. Deanne and I are enrolled in a yoga class which, incidentally, will last for the rest of this calendar year; it meets on tues / thurs and prevents me from coming to the cc.pm meetings. -- Jonathan Daugherty http://www.cprogrammer.org "It's a book about a Spanish guy called Manual, you should read it." -- Dilbert ------------------------------ Message: 2 Date: Mon, 13 Oct 2003 13:51:52 -0400 From: Leslie Grove Subject: Re: [Classiccity-pm] Next meeting(?) To: "All purpose mailing list for Athens, Ga Perl Mongers" Message-ID: <3F8AE638.3050709@uga.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Don't suppose I could talk anyone into Fridays? Jonathan Daugherty wrote: > # I've been asked when the next meeting is. How about this Thursday > # at 6:30? > > I motion to move the meeting day to wednesday, assuming that works for > everyone else. Deanne and I are enrolled in a yoga class which, > incidentally, will last for the rest of this calendar year; it meets > on tues / thurs and prevents me from coming to the cc.pm meetings. > -- Leslie Grove Computing Services UGA Law School (706) 542-5070 lgrove@uga.edu ------------------------------ Message: 3 Date: Mon, 13 Oct 2003 11:05:03 -0700 (PDT) From: Sam Feltus Subject: [Classiccity-pm] Re: Classiccity-pm Digest, Vol 4, Issue 1 To: classiccity-pm@mail.pm.org Message-ID: <20031013180503.12363.qmail@web12507.mail.yahoo.com> Content-Type: text/plain; charset="us-ascii" Sounds good to me. classiccity-pm-request@mail.pm.org wrote:Send Classiccity-pm mailing list submissions to classiccity-pm@mail.pm.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.pm.org/mailman/listinfo/classiccity-pm or, via email, send a message with subject or body 'help' to classiccity-pm-request@mail.pm.org You can reach the person managing the list at classiccity-pm-owner@mail.pm.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Classiccity-pm digest..." Today's Topics: 1. Next meeting(?) (Darrell Golliher) ---------------------------------------------------------------------- Message: 1 Date: Mon, 13 Oct 2003 11:56:55 -0400 From: Darrell Golliher Subject: [Classiccity-pm] Next meeting(?) To: classiccity-pm@mail.pm.org Message-ID: <20031013155655.GA18800@golliher.net> Content-Type: text/plain; charset=us-ascii I've been asked when the next meeting is. How about this Thursday at 6:30? -Darrell ------------------------------ _______________________________________________ Classiccity-pm mailing list Classiccity-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/classiccity-pm End of Classiccity-pm Digest, Vol 4, Issue 1 ******************************************** --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/classiccity-pm/attachments/20031013/985b1d11/attachment-0001.htm ------------------------------ Message: 4 Date: Mon, 13 Oct 2003 14:47:36 -0400 From: Darrell Golliher Subject: Re: [Classiccity-pm] Next meeting(?) To: "All purpose mailing list for Athens, Ga Perl Mongers" Message-ID: <20031013184736.GA20550@golliher.net> Content-Type: text/plain; charset=us-ascii On Mon, Oct 13, 2003 at 12:34:18PM -0400, Jonathan Daugherty wrote: > # I've been asked when the next meeting is. How about this Thursday > # at 6:30? > > I motion to move the meeting day to wednesday, assuming that works for > everyone else. Deanne and I are enrolled in a yoga class which, > incidentally, will last for the rest of this calendar year; it meets > on tues / thurs and prevents me from coming to the cc.pm meetings. > It's so difficult to find one day and time that works for everybody. Wednesdays don't work for me for example. I have standing plans in Atlanta every Wednesday. The only thing I have on the agenda for this month is a talk about HTML::Mason. Let's try it another way.. Please go here and put your name down if you plan to attend (or wish to be on the agenda). http://classiccity.pm.org/null?ThirdMeeting Assuming we get three people besides myself we'll go ahead and hold the meeting. Otherwise, we'll try something else. -Darrell ------------------------------ Message: 5 Date: Tue, 14 Oct 2003 11:43:50 -0400 From: Darrell Golliher Subject: [Classiccity-pm] Setting the time and place for our next meeting To: classiccity-pm@mail.pm.org Message-ID: <20031014154349.GA1462@golliher.net> Content-Type: text/plain; charset=us-ascii Unfortunately the Library's conference room is booked for this Thursday and also Thursday the 23rd. So our options as I see them are to meet on the 30th or find a different meeting place. If you can secure a place for us to meet please let me know. Network access and a projector would both be nice to have. I've already had the Library pencil us in for the 30th, but I can call and cancel that if we decide to meet somewhere else. -Darrell ------------------------------ _______________________________________________ Classiccity-pm mailing list Classiccity-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/classiccity-pm End of Classiccity-pm Digest, Vol 4, Issue 2 ******************************************** --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/classiccity-pm/attachments/20031014/bd2b7096/attachment.htm From markh at markh.com Tue Oct 14 14:03:02 2003 From: markh at markh.com (Mark Hazen) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Setting the time and place for our next meeting In-Reply-To: <20031014154349.GA1462@golliher.net> Message-ID: As for date and time... I can't make Tuesdays, Wednesdays, Fridays, or weekends... as Darrell said, it's hard to find a time that fits everyone, but hopefully those of you who have conflicts, they aren't long-term ones and you can join us soon. -mh. ---- . _+m"m+_"+_ Mark Hazen d' Jp qh qh Jp O O O Yb Yb dY dY O "Y5m2Y" " even the mightiest wave starts out as a ripple. "Y_ why make waves when it's easier to nurture ripples? From darrell at golliher.net Wed Oct 15 11:02:39 2003 From: darrell at golliher.net (Darrell Golliher) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Meeting set for Oct. 30th @ 6:30pm Message-ID: <20031015160239.GA16677@golliher.net> I want to be sure to avoid any confusion. We are NOT meeting this week because the room at the library is not available. The next meeting is scheduled for Oct.30th at 6:30pm-- the room at the library is reserved. -Darrell From rail at uga.edu Fri Oct 24 14:19:36 2003 From: rail at uga.edu (Jeff Scarbrough) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] basic idiot question Message-ID: <5.2.1.1.0.20031024131930.01aeaeb8@pop.charter.net> Hello all stations, I have been using Perl for simple file processing for about a year, mostly to reorganize lines of data and do simple averaging. Today's project is a little more complicated: I have two or three similar data files from different instruments, and I need to read them all in and output a file where the times recorded in each line match. It's complicated because each instrument will not necessarily put out data each minute - sometimes it will skip a minute, sometimes it will skip twenty minutes. I have some ideas about how I might make this happen, but before I use brute force, I wondered if Perl might have some special functions I'm not aware of that would make the job a lot easier...seems like this is a perfect job for Perl, and I'm sure it's been done before. TIA, Jeff From markh at markh.com Fri Oct 24 19:08:28 2003 From: markh at markh.com (Mark Hazen) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] basic idiot question In-Reply-To: <5.2.1.1.0.20031024131930.01aeaeb8@pop.charter.net> Message-ID: On Fri, 24 Oct 2003, Jeff Scarbrough wrote: > Today's project is a little more complicated: I have two or three similar > data files from different instruments, and I need to read them all in and > output a file where the times recorded in each line match. It's Can you give some examples of what the data looks like? Basically, what you will want to do is iterate through both files at the same time, and parse the time. Read a line from FILE1 and FILE2. If the time is equal, output the lines to your output file and read the next line from both files. If the time in FILE1 is less than the time in FILE2, read another line from FILE1 and compare again. If the time is greater, read another line from FILE2, and so forth. If you can give lines of data as a test, I am sure one of us can write out a sample of code to handle it. I wouldn't consider this brute force, but it's the sanest way to handle the problem. If the data includes a date as well as the time, and is therefore guaranteed to be unique, you *could* parse one file into a hash using the time+date as the key and the entire line as the value, then scan the second file, and for every line with a matching key, delete the element from that hash and write it out to the output file... but that is so much messier, and requires more memory as the first file is in size. Hope this helps straighten out some of the mess... -mh. ---- . _+m"m+_"+_ Mark Hazen d' Jp qh qh Jp O O O Yb Yb dY dY O "Y5m2Y" " even the mightiest wave starts out as a ripple. "Y_ why make waves when it's easier to nurture ripples? From rail at uga.edu Fri Oct 24 22:19:51 2003 From: rail at uga.edu (Jeff Scarbrough) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] basic idiot question In-Reply-To: References: <5.2.1.1.0.20031024131930.01aeaeb8@pop.charter.net> Message-ID: <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> At 07:08 PM 10/24/2003 -0500, you wrote: >On Fri, 24 Oct 2003, Jeff Scarbrough wrote: > > > Today's project is a little more complicated: I have two or three similar > > data files from different instruments, and I need to read them all in and > > output a file where the times recorded in each line match. It's > >Can you give some examples of what the data looks like? Sure... One file: 293.4077, 2711.00, 21.78, 1, 81, 125, 1766, 1766, 2003, 10, 20, 9, 47, CH4OP-1005, 4001 293.4085, 2588.50, 20.79, 2, 79, 125, 1697, 1751, 2003, 10, 20, 9, 48, CH4OP-1005, 4001 293.4100, 2379.50, 19.11, 2, 74, 125, 1653, 1676, 2003, 10, 20, 9, 50, CH4OP-1005, 4001 293.4105, 2210.00, 17.75, 1, 71, 125, 1659, 1659, 2003, 10, 20, 9, 51, CH4OP-1005, 4001 293.4113, 2261.00, 18.16, 2, 74, 125, 1678, 1681, 2003, 10, 20, 9, 52, CH4OP-1005, 4001 The other file: 293.4084, 356.00, 2.94, 1, 99, 121, 5873, 5873, 2003, 10, 20, 9, 48, CH4OP-1006, 4001 293.4091, 382.00, 3.16, 2, 98, 121, 5894, 5994, 2003, 10, 20, 9, 49, CH4OP-1006, 4001 293.4099, 320.00, 2.64, 2, 98, 121, 5854, 5889, 2003, 10, 20, 9, 50, CH4OP-1006, 4001 Columns are: Day-Of-Year (not unique or concurrent across files - DOY for same minute could be different in each file data 1 data 2 data3 data4 data5 data6 data7 year month day hour minute ID status All lines contain newline character except last line. Output file will contain DOY, then data1 through status for each file. >Basically, what you will want to do is iterate through both files at the >same time, and parse the time. This is sort of what I had in mind, but I will need to write a line of data if it exists in either file. Also I will need to write the data in the first column of the first file that has data for a given minute into the first column of that output for that minute. Did that make sense? I will be drawing graphs from the files, and the first column of the output file will be the x axis data. Data is to be comma separated, and the case of no data will be represented by consecutive commas. One thing I wanted to try was to set it up to read more than two files. We have three instruments right now, but may go as high as five or six in one location. I'm not sure whether it's practical to write the program to do more than two at a time, though, at this point - I'd go for the easy one first, then complicate as necessary. >If you can give lines of data as a test, I am sure one of us can write out >a sample of code to handle it. I wouldn't consider this brute force, but >it's the sanest way to handle the problem. If the data includes a date as >well as the time, and is therefore guaranteed to be unique, you *could* >parse one file into a hash using the time+date as the key and the entire >line as the value, then scan the second file, and for every line with a >matching key, delete the element from that hash and write it out to the >output file... but that is so much messier, and requires more memory as >the first file is in size. I hadn't thought about the hash trick, but I was reading about them trying to see if that might be helpful...hmmm. As a rule, the files are not large (<150k) so that might be an approach...though 'messy' doesn't appeal to me, the state of my office notwithstanding. >Hope this helps straighten out some of the mess... Thanks, Mark. I'm enjoying the learning process. The last computer language I was formally trained in was FORTRAN66. My boss wrote a bunch of programs in BASIC, and I'm trying to show him that there's better solutions out there now.... Cheers, Jeff From nhruby at uga.edu Sat Oct 25 09:15:34 2003 From: nhruby at uga.edu (nathan r. hruby) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] basic idiot question In-Reply-To: <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> References: <5.2.1.1.0.20031024131930.01aeaeb8@pop.charter.net> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> Message-ID: On Fri, 24 Oct 2003, Jeff Scarbrough wrote: > At 07:08 PM 10/24/2003 -0500, you wrote: > >On Fri, 24 Oct 2003, Jeff Scarbrough wrote: > > > > > Today's project is a little more complicated: I have two or three similar > > > data files from different instruments, and I need to read them all in and > > > output a file where the times recorded in each line match. It's > > > >Can you give some examples of what the data looks like? > > Sure... > [snip] > All lines contain newline character except last line. > > Output file will contain DOY, then data1 through status for each file. > To make your life easier (assuming I'm understanding your needs correctly), you could cat them all into one file and then run sort on them, which should put everything in consecutive order, then All you need to do is have your perl script just insert empty values where needed and do any other post processing. -n -- ------------------------------------------- nathan hruby uga enterprise information technology services production systems support metaphysically wrinkle-free ------------------------------------------- From rail at uga.edu Sat Oct 25 15:26:30 2003 From: rail at uga.edu (Jeff Scarbrough) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] basic idiot question In-Reply-To: References: <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031024131930.01aeaeb8@pop.charter.net> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> Message-ID: <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> At 10:15 AM 10/25/2003 -0400, you wrote: > > > > > > > Today's project is a little more complicated: I have two or three > similar > > > > data files from different instruments, and I need to read them all > in and > > > > output a file where the times recorded in each line match. It's > > > > Output file will contain DOY, then data1 through status for each file. > > > >To make your life easier (assuming I'm understanding your needs >correctly), you could cat them all into one file and then run sort on >them, which should put everything in consecutive order, then All you need >to do is have your perl script just insert empty values where needed and >do any other post processing. All of the data from the various files for a given minute needs to be on one line...I'm not sure if cat and sort could do that - could it? Thanks, Jeff From nhruby at uga.edu Sat Oct 25 17:02:41 2003 From: nhruby at uga.edu (nathan r. hruby) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] basic idiot question In-Reply-To: <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> References: <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031024131930.01aeaeb8@pop.charter.net> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> Message-ID: On Sat, 25 Oct 2003, Jeff Scarbrough wrote: > >To make your life easier (assuming I'm understanding your needs > >correctly), you could cat them all into one file and then run sort on > >them, which should put everything in consecutive order, then All you need > >to do is have your perl script just insert empty values where needed and > >do any other post processing. > > All of the data from the various files for a given minute needs to be on > one line...I'm not sure if cat and sort could do that - could it? > I don't think so, at least not easily. Sorry I didn't realize that all the data needed to be one one line. You could cat | sort them into one file to make the parsing easier though.. Read a line, buffer it, read the next line, if the timestamp is the same, add it to the buffer, wash-rinse-repeat till you get to the next timestamp, output the buffered line you've been appending to, and start over. In this case the hash idea Hazen brought up would be an ideal storage conatiner for the "buffered" data. This of course assumes that each line can tell you where it came from, as sort may or may not always put them in the same order per sample group. -n -- ------------------------------------------- nathan hruby uga enterprise information technology services production systems support metaphysically wrinkle-free ------------------------------------------- From rail at uga.edu Sat Oct 25 19:51:48 2003 From: rail at uga.edu (Jeff Scarbrough) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] basic idiot question In-Reply-To: References: <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031024131930.01aeaeb8@pop.charter.net> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> Message-ID: <5.2.1.1.0.20031025184420.00ba0be0@email.uga.edu> At 06:02 PM 10/25/2003 -0400, you wrote: >On Sat, 25 Oct 2003, Jeff Scarbrough wrote: > > > All of the data from the various files for a given minute needs to be on > > one line...I'm not sure if cat and sort could do that - could it? > > > >I don't think so, at least not easily. Sorry I didn't realize that all >the data needed to be one one line. > >You could cat | sort them into one file to make the parsing easier >though.. OK, between the suggestions you and Mark put forth, I think I'm on to something... So far I've got a program that will read each file in turn, generating a time stamp (DOY, for Day Of Year) for each line of data based on month, day, hour, minute on the fly. The DOY is used for a key to an element of a hash which is the line of data. So, now I've got one hash for each file, and I ~think~ I know how to get an array of keys... Next trick is to merge the arrays of keys, eliminate duplicates, and sort into numerical/chronological order. Then I can write a line consisting of the key (the DOY) and the lines of data from each file that match that key, or blank spaces if there is no data in one or more of the files. The part I need to learn now is how to do the cat |sort...back to Mr. Google's Laboratory... Thanks, Jeff From rail at uga.edu Sat Oct 25 21:46:32 2003 From: rail at uga.edu (Jeff Scarbrough) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] basic idiot question In-Reply-To: <5.2.1.1.0.20031025184420.00ba0be0@email.uga.edu> References: <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031024131930.01aeaeb8@pop.charter.net> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> Message-ID: <5.2.1.1.0.20031025203519.00b91590@email.uga.edu> At 06:51 PM 10/25/2003 -0600, I wrote: >OK, between the suggestions you and Mark put forth, I think I'm on to >something... > >So, now I've got one hash for each file, and I ~think~ I know how to get >an array of keys... I do... >Next trick is to merge the arrays of keys, eliminate duplicates, and sort >into numerical/chronological order. Then I can write a line consisting of >the key (the DOY) and the lines of data from each file that match that >key, or blank spaces if there is no data in one or more of the files. > >The part I need to learn now is how to do the cat |sort...back to Mr. >Google's Laboratory... Simple... I found a bit of code which ends up like this: @key_list = (); push @key_list, (keys %array_1); push @key_list, (keys %array_2); # Eliminate duplicate entries in key file and sort in ascending order @key_dup = grep { ++$count{$_} < 2 } @key_list; @key_sort = sort {$a <=> $b} @key_dup; Eventually I will come to understand those two statements. I assume the grep goes through and putts only one (<2) occurrrence of the items in @key_list into @key_dup. I'm not sure yet why the sort is written as $a <=> $b... but it works. I'm learning.... Anyway from there, I can write according to a format statement thusly: foreach $key_sort(@key_sort) { write OUTPUT_FILE; } where my format writes the following: $key_sort, $array_1{$key_sort},$array_2{$key_sort}; Now, the only problem I have is when data does not exist for the key, I get an "uninitialized" kind of error when I write...I need to include something on the order of: if ! $array_1{$key_sort} { $array_1{$key_sort} = " "; } before I do the write... I'm sure the syntax there is faulty, but that's the idea - same for each of the other arrays. Perhaps a nice single malt will aid comprehension.... Progress! Cheers, Jeff From pkeck at uga.edu Sat Oct 25 23:43:57 2003 From: pkeck at uga.edu (Paul Keck) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] basic idiot question In-Reply-To: <5.2.1.1.0.20031025203519.00b91590@email.uga.edu> References: <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031024131930.01aeaeb8@pop.charter.net> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> <5.2.1.1.0.20031025203519.00b91590@email.uga.edu> Message-ID: <20031026044357.GA22164@uga.edu> On Sat, Oct 25, 2003 at 08:46:32PM -0600, Jeff Scarbrough wrote: > Now, the only problem I have is when data does not exist for the key, I get > an "uninitialized" kind of error when I write...I need to include something > on the order of: > > if ! $array_1{$key_sort} { > $array_1{$key_sort} = " "; > } > > before I do the write... I'm sure the syntax there is faulty, but that's You're probably looking for "defined". I've been mulling this over and although I don't have all the details yet, I think a hash of arrays might be the way to go. The idea is to open one file after another (however many doesn't matter) and for each timestamp push the data you want onto the array that is defined in each hash element (sorted by key of course). I think you said you were newish to perl so here's a prog I whipped up for your sample data: ================= #!/usr/bin/perl -w use strict; my %bow; #whole ball of wax for (@ARGV) { #read command-line args, I'll pass it filenames my @wholefile = <>; chomp @wholefile; #read in file to array for my $line (@wholefile) { my (undef, undef, undef, undef, undef, undef, undef, undef, $year, $month, $day, $hour, $min, undef, undef) = split /,\s+/, $line; #add leading 0's so things sort properly - could use sprintf if (length($month) == 1) { $month = "0" . $month}; if (length($day) == 1) { $day = "0" . $day}; if (length($hour) == 1) { $hour = "0" . $hour}; if (length($min) == 1) { $min = "0" . $min}; my $timestamp = $year . $month . $day . $hour . $min ; #now push the line of data onto the array push @{ $bow{$timestamp}}, $line; } } use Data::Dumper; print Dumper(\%bow); ====================== When run you get (long lines): pkeck@dirdir:~$ ./jeff.pl jeff1.txt jeff2.txt $VAR1 = { '200310200952' => [ ' 293.4113, 2261.00, 18.16, 2, 74, 125, 1678, 1681, 2003, 10, 20, 9, 52, CH4OP-1005, 4001' ], '200310200947' => [ ' 293.4077, 2711.00, 21.78, 1, 81, 125, 1766, 1766, 2003, 10, 20, 9, 47, CH4OP-1005, 4001' ], '200310200949' => [ ' 293.4091, 382.00, 3.16, 2, 98, 121, 5894, 5994, 2003, 10, 20, 9, 49, CH4OP-1006, 4001' ], '200310200950' => [ ' 293.4100, 2379.50, 19.11, 2, 74, 125, 1653, 1676, 2003, 10, 20, 9, 50, CH4OP-1005, 4001', ' 293.4099, 320.00, 2.64, 2, 98, 121, 5854, 5889, 2003, 10, 20, 9, 50, CH4OP-1006, 4001' ], '200310200951' => [ ' 293.4105, 2210.00, 17.75, 1, 71, 125, 1659, 1659, 2003, 10, 20, 9, 51, CH4OP-1005, 4001' ], '200310200948' => [ ' 293.4085, 2588.50, 20.79, 2, 79, 125, 1697, 1751, 2003, 10, 20, 9, 48, CH4OP-1005, 4001', ' 293.4084, 356.00, 2.94, 1, 99, 121, 5873, 5873, 2003, 10, 20, 9, 48, CH4OP-1006, 4001' ] }; pkeck@dirdir:~$ I just used dumper because if gives a nice view of the data. To access it yourself you should probably use something like: ============ for my $timestmp (sort keys %bow) { for my $line ( @{ $bow{$timestmp} } ) { print $line, "\n"; } } ============ Notice the syntax " @{ $bow{$timestmp} } " - this is an array that is pushed into the hash element $bow{$timestmp} . That hash element is really an ARRAYREF, but you don't need to care. which gives: pkeck@dirdir:~$ ./jeff.pl jeff1.txt jeff2.txt 293.4077, 2711.00, 21.78, 1, 81, 125, 1766, 1766, 2003, 10, 20, 9, 47, CH4OP-1005, 4001 293.4085, 2588.50, 20.79, 2, 79, 125, 1697, 1751, 2003, 10, 20, 9, 48, CH4OP-1005, 4001 293.4084, 356.00, 2.94, 1, 99, 121, 5873, 5873, 2003, 10, 20, 9, 48, CH4OP-1006, 4001 293.4091, 382.00, 3.16, 2, 98, 121, 5894, 5994, 2003, 10, 20, 9, 49, CH4OP-1006, 4001 293.4100, 2379.50, 19.11, 2, 74, 125, 1653, 1676, 2003, 10, 20, 9, 50, CH4OP-1005, 4001 293.4099, 320.00, 2.64, 2, 98, 121, 5854, 5889, 2003, 10, 20, 9, 50, CH4OP-1006, 4001 293.4105, 2210.00, 17.75, 1, 71, 125, 1659, 1659, 2003, 10, 20, 9, 51, CH4OP-1005, 4001 293.4113, 2261.00, 18.16, 2, 74, 125, 1678, 1681, 2003, 10, 20, 9, 52, CH4OP-1005, 4001 pkeck@dirdir:~$ Now here is where my fuzziness comes in- back on the line with all the undef's you could be assigning stuff to real variables and then just pushing onto the arrays the things you really care about, rather than the entire lines like I did. And I don't know what exactly you're going to do with this stuff later- maybe it would make sense to make a hash of hashes rather than arrays. If you wanted to go really crazy you could replace the line my (undef, undef, undef, undef, undef, undef, undef, undef, $year, $month, $day, $hour, $min, undef, undef) = split /,\s+/, $line; with my (undef, undef, undef, undef, undef, undef, undef, undef, $year, $month, $day, $hour, $min, $device, undef) = split /,\s+/, $line; and push @{ $bow{$timestamp}}, $line; with $bow{$timestamp}{$device} = $line; Running with the Dumper again gives you: pkeck@dirdir:~$ ./jeff.pl jeff1.txt jeff2.txt $VAR1 = { '200310200952' => { 'CH4OP-1005' => ' 293.4113, 2261.00, 18.16, 2, 74, 125, 1678, 1681, 2003, 10, 20, 9, 52, CH4OP-1005, 4001' }, '200310200947' => { 'CH4OP-1005' => ' 293.4077, 2711.00, 21.78, 1, 81, 125, 1766, 1766, 2003, 10, 20, 9, 47, CH4OP-1005, 4001' }, '200310200949' => { 'CH4OP-1006' => ' 293.4091, 382.00, 3.16, 2, 98, 121, 5894, 5994, 2003, 10, 20, 9, 49, CH4OP-1006, 4001' }, '200310200950' => { 'CH4OP-1006' => ' 293.4099, 320.00, 2.64, 2, 98, 121, 5854, 5889, 2003, 10, 20, 9, 50, CH4OP-1006, 4001', 'CH4OP-1005' => ' 293.4100, 2379.50, 19.11, 2, 74, 125, 1653, 1676, 2003, 10, 20, 9, 50, CH4OP-1005, 4001' }, '200310200951' => { 'CH4OP-1005' => ' 293.4105, 2210.00, 17.75, 1, 71, 125, 1659, 1659, 2003, 10, 20, 9, 51, CH4OP-1005, 4001' }, '200310200948' => { 'CH4OP-1006' => ' 293.4084, 356.00, 2.94, 1, 99, 121, 5873, 5873, 2003, 10, 20, 9, 48, CH4OP-1006, 4001', 'CH4OP-1005' => ' 293.4085, 2588.50, 20.79, 2, 79, 125, 1697, 1751, 2003, 10, 20, 9, 48, CH4OP-1005, 4001' } }; pkeck@dirdir:~$ Notice now you have little hashes under your big hash, with the line assigned to another hash keyed on what device it came from. To do the "simple print" for that data structure: ========= for my $timestmp (sort keys %bow) { for my $subkey ( sort keys %{ $bow{$timestmp} } ) { print $bow{$timestmp}{$subkey}, "\n"; } } ========= Notice the syntax "%{ $bow{$timestmp} }" - that is a hash defined by the contents of $bow{$timestmp}. $bow{$timestmp} is a HASHREF, but you don't need to care. which gives: pkeck@dirdir:~$ ./jeff.pl jeff1.txt jeff2.txt 293.4077, 2711.00, 21.78, 1, 81, 125, 1766, 1766, 2003, 10, 20, 9, 47, CH4OP-1005, 4001 293.4085, 2588.50, 20.79, 2, 79, 125, 1697, 1751, 2003, 10, 20, 9, 48, CH4OP-1005, 4001 293.4084, 356.00, 2.94, 1, 99, 121, 5873, 5873, 2003, 10, 20, 9, 48, CH4OP-1006, 4001 293.4091, 382.00, 3.16, 2, 98, 121, 5894, 5994, 2003, 10, 20, 9, 49, CH4OP-1006, 4001 293.4100, 2379.50, 19.11, 2, 74, 125, 1653, 1676, 2003, 10, 20, 9, 50, CH4OP-1005, 4001 293.4099, 320.00, 2.64, 2, 98, 121, 5854, 5889, 2003, 10, 20, 9, 50, CH4OP-1006, 4001 293.4105, 2210.00, 17.75, 1, 71, 125, 1659, 1659, 2003, 10, 20, 9, 51, CH4OP-1005, 4001 293.4113, 2261.00, 18.16, 2, 74, 125, 1678, 1681, 2003, 10, 20, 9, 52, CH4OP-1005, 4001 pkeck@dirdir:~$ Which should look like the first way. > the idea - same for each of the other arrays. Perhaps a nice single malt > will aid comprehension.... I second that! I don't know how much you've used hashes of hashes or hashes of arrays, but they help get a handle on these complicated sets of data that you might not be able to do much with on a line-by-line basis. -- Paul Keck pkeck@uga.edu http://www.arches.uga.edu/~pkeck University of Georgia http://www.uga.edu/ucns/telecom EITS Network Engineering mailto:pkeck@ediacara.org --Opinions mine.-- Go fighting anomalocaridids!!! From darrell at golliher.net Wed Oct 29 14:25:07 2003 From: darrell at golliher.net (Darrell Golliher) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Meeting tomorrow night Message-ID: <20031029202507.GA2051@golliher.net> Just a reminder: http://classiccity.pm.org/null?ThirdMeeting Two talks on the agenda so far... -Darrell From clmf8 at yahoo.com Fri Oct 31 09:01:21 2003 From: clmf8 at yahoo.com (Sam Feltus) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] Re: Classiccity-pm Digest, Vol 4, Issue 6 In-Reply-To: <200310301800.h9UI0gW15651@mail.pm.org> Message-ID: <20031031150121.68620.qmail@web12506.mail.yahoo.com> I enjoyed the meeting last night. 1. I looked at again FLAP (Flash Remoting In Perl). Maybe I should work on adding to that instead of writing my own seperate code. I don't think I read it carefully the first time. 2. I will try and organize my Flash Perl code, better explain the idea and put it online to see if it is interesting or useful. 3. Darrell, my web host has all sorts of Perl stuff but not Mason, what was the name of the Web Hosting company that supported Mason??? Sam the Gardener clmf8@yahoo.com http://HenryJamesFeltus.com classiccity-pm-request@mail.pm.org wrote: Send Classiccity-pm mailing list submissions to classiccity-pm@mail.pm.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.pm.org/mailman/listinfo/classiccity-pm or, via email, send a message with subject or body 'help' to classiccity-pm-request@mail.pm.org You can reach the person managing the list at classiccity-pm-owner@mail.pm.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Classiccity-pm digest..." Today's Topics: 1. Meeting tomorrow night (Darrell Golliher) ---------------------------------------------------------------------- Message: 1 Date: Wed, 29 Oct 2003 15:25:07 -0500 From: Darrell Golliher Subject: [Classiccity-pm] Meeting tomorrow night To: classiccity-pm@mail.pm.org Message-ID: <20031029202507.GA2051@golliher.net> Content-Type: text/plain; charset=us-ascii Just a reminder: http://classiccity.pm.org/null?ThirdMeeting Two talks on the agenda so far... -Darrell ------------------------------ _______________________________________________ Classiccity-pm mailing list Classiccity-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/classiccity-pm End of Classiccity-pm Digest, Vol 4, Issue 6 ******************************************** --------------------------------- Do you Yahoo!? Exclusive Video Premiere - Britney Spears -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/classiccity-pm/attachments/20031031/25a57cbd/attachment.htm From rail at uga.edu Fri Oct 31 00:05:01 2003 From: rail at uga.edu (Jeff Scarbrough) Date: Mon Aug 2 21:28:36 2004 Subject: [Classiccity-pm] basic idiot question In-Reply-To: <20031026044357.GA22164@uga.edu> References: <5.2.1.1.0.20031025203519.00b91590@email.uga.edu> <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031024131930.01aeaeb8@pop.charter.net> <5.2.1.1.0.20031024204825.02123ea8@email.uga.edu> <5.2.1.1.0.20031025142502.01fe5170@email.uga.edu> <5.2.1.1.0.20031025203519.00b91590@email.uga.edu> Message-ID: <5.2.1.1.0.20031030210228.02598520@email.uga.edu> Sorry, folks, I thought I had sent this while I was out west. No wonder nobody commented.... Cheers, Jeff At 12:43 AM 10/26/2003 -0400, you wrote: >On Sat, Oct 25, 2003 at 08:46:32PM -0600, Jeff Scarbrough wrote: > > Now, the only problem I have is when data does not exist for the key, I > get > > an "uninitialized" kind of error when I write...I need to include > something > > on the order of: > > > > if ! $array_1{$key_sort} { > > $array_1{$key_sort} = " "; > > } > > > > before I do the write... I'm sure the syntax there is faulty, but that's > >You're probably looking for "defined". Yep, that helped. Sorry for not replying sooner, I am holed up in a motel in Utah, putting my programs to work The final program is listed at http://www.fishplate.org/perl/data_prep.txt if you want to see how I made it work. I'd be interested in any critiques you folks can provide, as this is not just a job, but also a learning experience...I'm curious to see if there is a better solution. Thanks again, Jeff