Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] help with a little project ...

Expand Messages
  • Axel Berger
    ... The first thing to do is transform that terrible date format into ISO, i.e. yy-mm-dd. Then sort lines. Axel
    Message 1 of 9 , Jul 19, 2013
    View Source
    • 0 Attachment
      Don wrote:
      > I have a block on how to start even ...

      The first thing to do is transform that terrible date format into ISO,
      i.e. yy-mm-dd. Then sort lines.

      Axel
    • Dave
      Hi One way would be load as text file sort and then do text statistics . THANKYOU DAVE ... From: Don To:
      Message 2 of 9 , Jul 20, 2013
      View Source
      • 0 Attachment
        Hi
        One way would be load as text file sort and then do text statistics .
        THANKYOU DAVE

        ----- Original Message -----
        From: "Don" <don@...>
        To: <ntb-clips@yahoogroups.com>
        Sent: Saturday, July 20, 2013 12:20 PM
        Subject: [Clip] help with a little project ...


        >I have the following type of data:
        > 058001e58517 07-13-13 10:05:22
        > 058001e58517 07-13-13 10:05:22
        > 058001e58573 07-13-13 09:39:54
        > 058001e58573 07-13-13 09:39:54
        > 058001e5861a 07-13-13 09:53:40
        > 058001e5861a 07-13-13 09:53:40
        > 058001e5861a 07-13-13 09:53:40
        > 058001e5861a 07-13-13 09:53:40
        > 058001e58620 07-13-13 10:08:37
        > 058001e58620 07-13-13 10:08:37
        > 058001e58620 07-13-13 10:08:37
        > 058001e58620 07-13-13 10:08:37
        > 058001e58620 07-13-13 10:08:38
        > 058001e58620 07-13-13 10:08:38
        > 058001e58620 07-13-13 10:08:38
        > 058001e58620 07-13-13 10:08:38
        > 058001e58620 07-13-13 10:08:38
        > 058001e58620 07-13-13 10:08:38
        > 058001e58620 07-13-13 10:08:38
        > 058001e58623 07-13-13 10:51:36
        > 058001e58623 07-13-13 10:51:36
        > 058001e58623 07-13-13 10:51:36
        > 058001e58623 07-13-13 10:51:36
        > 058001e58623 07-13-13 10:51:36
        > 058001e58623 07-13-13 10:51:36
        > 058001e586e0 07-13-13 11:12:53
        > 058001e586e0 07-13-13 11:12:54
        > 058001e586e0 07-13-13 11:12:54
        > 058001e586e0 07-13-13 11:12:54
        > 058001e586e0 07-13-13 11:12:54
        > 058001e586e0 07-13-13 11:12:54
        > 058001e586e0 07-13-13 11:12:54
        > 058001e586e0 07-13-13 11:12:54
        > 058001e586e0 07-13-13 11:12:54
        > 058001e586e0 07-13-13 11:12:54
        > 058001e586e0 07-13-13 11:12:54
        > 058001e58749 07-13-13 11:09:54
        > 058001e58749 07-13-13 11:09:54
        > 058001e58749 07-13-13 11:09:54
        > 058001e58749 07-13-13 11:09:54
        > 058001e58749 07-13-13 11:09:54
        > 058001e58749 07-13-13 11:09:54
        > 058001e58749 07-13-13 11:09:54
        > 058001e58749 07-13-13 11:09:54
        > 058001e58749 07-13-13 11:09:55
        > 058001e58749 07-13-13 11:09:55
        > 058001e58749 07-13-13 11:09:55
        > 058001e58749 07-13-13 11:09:55
        > 058001e58a33 07-13-13 10:24:41
        > 058001e58a33 07-13-13 10:24:41
        > 058001e58a33 07-13-13 10:24:42
        > 058001e58a33 07-13-13 10:24:42
        > 058001e58a33 07-13-13 10:24:42
        > 058001e58a33 07-13-13 10:24:42
        > 058001e58a33 07-13-13 10:24:42
        > 058001e58a33 07-13-13 10:24:42
        > 058001e58a35 07-13-13 10:04:26
        > 058001e58aa4 07-13-13 11:17:25
        > 058001e58aa4 07-13-13 11:17:25
        > 058001e58aa4 07-13-13 11:17:25
        > 058001e58aa4 07-13-13 11:17:25
        > 058001e58bb4 07-13-13 10:53:01
        > 058001e58ded 07-13-13 09:45:01
        > 058001e58ded 07-13-13 09:45:01
        > 058001e58ded 07-13-13 09:45:02
        > 058001e58ded 07-13-13 09:45:02
        > 058001e58ded 07-13-13 09:45:02
        > 058001e58ded 07-13-13 09:45:02
        > 058001e58ded 07-13-13 09:45:02
        > 058001e596bc 07-13-13 10:01:57
        > 058001e596bc 07-13-13 10:01:57
        > 058001e596bc 07-13-13 10:01:57
        > 058001e596bc 07-13-13 10:01:57
        > 058001e596bc 07-13-13 10:01:58
        > 058001e596bc 07-13-13 10:01:58
        > 058001e596bc 07-13-13 10:01:58
        > 058001e596bc 07-13-13 10:01:58
        > 058001e59816 07-13-13 09:50:16
        > 058001e59816 07-13-13 09:50:16
        > 058001e59a2c 07-13-13 10:38:02
        > 058001e59a2c 07-13-13 10:38:02
        > 058001e59a2c 07-13-13 10:38:02
        > 058001e59a2c 07-13-13 10:38:02
        > 058001e59a2c 07-13-13 10:38:02
        > 058001e59a2c 07-13-13 10:38:03
        > 058001e59aca 07-13-13 09:40:55
        > 058001e59aca 07-13-13 09:40:56
        > 058001e59aca 07-13-13 09:40:56
        > 058001e59aca 07-13-13 09:40:56
        > 058001e59aca 07-13-13 09:40:56
        > 058001e59aca 07-13-13 09:40:56
        > 058001e59ad6 07-13-13 10:46:38
        > 058001e59ad6 07-13-13 10:46:38
        > 058001e59ad6 07-13-13 10:46:38
        > 058001e59ad6 07-13-13 10:46:38
        > 058001e59ad6 07-13-13 10:46:38
        > 058001e59ad6 07-13-13 10:46:38
        > 058001e59ad6 07-13-13 10:46:38
        > 058001e59ad6 07-13-13 10:46:38
        > 058001e59ad6 07-13-13 10:46:38
        > 058001e59ad6 07-13-13 10:46:38
        > 058001e59c5c 07-13-13 10:55:37
        > 058001e59c5c 07-13-13 10:55:37
        > 058001e59c5c 07-13-13 10:55:37
        > 058001e59c5c 07-13-13 10:55:38
        > 058001e59c5c 07-13-13 10:55:38
        > 058001e59d0a 07-13-13 10:39:29
        > 058001e59d0a 07-13-13 10:39:29
        > 058001e59d0a 07-13-13 10:39:29
        > 058001e59d0a 07-13-13 10:39:29
        > 058001e59d0a 07-13-13 10:39:29
        > 058001e59d0a 07-13-13 10:39:29
        > 058001e59d0a 07-13-13 10:39:29
        > 058001e59d0a 07-13-13 10:39:29
        > 058001e59d0a 07-13-13 10:39:29
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59e99 07-13-13 11:25:48
        > 058001e59f54 07-13-13 10:55:01
        > 058001e59f54 07-13-13 10:55:01
        > 058001e59f54 07-13-13 10:55:01
        > 058001e59f54 07-13-13 10:55:01
        > 058001e59f54 07-13-13 10:55:01
        > 058001e59f54 07-13-13 10:55:01
        > 058001e59f5a 07-13-13 09:44:34
        > 058001e59f5a 07-13-13 09:44:34
        > 058001e59f5a 07-13-13 09:44:34
        > 058001e59f5a 07-13-13 09:44:35
        > 058001e5a013 07-13-13 10:28:09
        > 058001e5a013 07-13-13 10:28:09
        > 058001e5a013 07-13-13 10:28:09
        > 058001e5a013 07-13-13 10:28:09
        > 058001e5a013 07-13-13 10:28:09
        > 058001e5a013 07-13-13 10:28:09
        > 058001e5a013 07-13-13 10:28:10
        > 058001e5a013 07-13-13 10:28:10
        > 058001e5a0dd 07-13-13 10:01:36
        > 058001e5a0dd 07-13-13 10:01:36
        > 058001e5a0dd 07-13-13 10:01:36
        > 058001e5a0dd 07-13-13 10:01:36
        > 058001e5a0dd 07-13-13 10:01:36
        > 058001e5a0dd 07-13-13 10:01:36
        > 058001e5a0dd 07-13-13 10:01:36
        > 058001e5a0dd 07-13-13 10:01:36
        > 058001e5a0dd 07-13-13 10:01:36
        > 058001e5a0dd 07-13-13 10:01:37
        > 058001e5a0dd 07-13-13 10:01:37
        > 058001e5a0dd 07-13-13 10:01:37
        > 058001e5a0dd 07-13-13 10:01:37
        > 058001e5a337 07-13-13 09:38:54
        > 058001e5a337 07-13-13 09:38:54
        > 058001e5a337 07-13-13 09:38:54
        > 058001e5a337 07-13-13 09:38:54
        > 058001e5a337 07-13-13 09:38:54
        > 058001e5a337 07-13-13 09:38:54
        > 058001e5a337 07-13-13 09:38:54
        > 058001e5a337 07-13-13 09:38:54
        > 058001e5a337 07-13-13 09:38:55
        > 058001e5a337 07-13-13 09:38:55
        > 058001e5a337 07-13-13 09:38:55
        > 058001e5a337 07-13-13 09:38:55
        > 058001e5a337 07-13-13 09:38:55
        > 058001e5a337 07-13-13 09:38:55
        > 058001e5a337 07-13-13 09:38:55
        > 058001e5a337 07-13-13 09:38:55
        > 058001e5a337 07-13-13 09:38:55
        > 058001e5a684 07-13-13 10:01:04
        > 058001e5a684 07-13-13 10:01:04
        > 058001e5a684 07-13-13 10:01:04
        > 058001e5a684 07-13-13 10:01:04
        > 058001e5a684 07-13-13 10:01:04
        > 058001e5a684 07-13-13 10:01:05
        > 058001e5a764 07-13-13 10:57:07
        > 058001e5a764 07-13-13 10:57:07
        > 058001e5a764 07-13-13 10:57:07
        > 058001e5a764 07-13-13 10:57:07
        > 058001e5a764 07-13-13 10:57:07
        > 058001e5a764 07-13-13 10:57:07
        > 058001e5a76e 07-13-13 10:11:51
        > 058001e5a76e 07-13-13 10:11:51
        > 058001e5a76e 07-13-13 10:11:51
        > 058001e5a76e 07-13-13 10:11:51
        > 058001e5a812 07-13-13 10:17:39
        > 058001e5a812 07-13-13 10:17:39
        > 058001e5a812 07-13-13 10:17:39
        > 058001e5a812 07-13-13 10:17:39
        > 058001e5a812 07-13-13 10:17:39
        > 058001e5a812 07-13-13 10:17:39
        > 058001e5a812 07-13-13 10:17:39
        > 058001e5a831 07-13-13 10:42:48
        >
        > I want to know how many times each number on the left appears. In a
        > perfect world I would also calculate the amount of time from the first
        > view of that item to the last (times on left). I have a block on how to
        > start even ...
        >
        >
        > ------------------------------------
        >
        > Fookes Software: http://www.fookes.com/
        > NoteTab website: http://www.notetab.com/
        > NoteTab Discussion Lists: http://www.notetab.com/groups.php
        >
        > ***
        > Yahoo! Groups Links
        >
        >
        >
      • joy8388608
        Here is some code to help/get you started... As was said, you really should sort the data first by converting dates to yyyy-mm-dd then sorting. This code will
        Message 3 of 9 , Jul 21, 2013
        View Source
        • 0 Attachment
          Here is some code to help/get you started...

          As was said, you really should sort the data first by converting dates to yyyy-mm-dd then sorting.

          This code will select each block of duplicates and tell you how many there are. It will not select (report on) any lines where the first 12 chars are unique. That is, only 2 or more lines with the same first 12 chars are found. Not sure if this is possible with your data.

          To find the elapsed time, you would have to isolate the time in the last selected line and subtract it from the time in the first selected line. Easiest would be to convert both to seconds and then subtract.

          Hope this quick help helps.

          Joy

          ^!Jump TEXT_START
          :LT
          ; Find and select next group of 2 or more lines that have the same
          ; chars in cols 1-12
          ^!Find "^(.{12}).*\R(\1.*\R)+" R
          ; Stop when no matches found
          ^!IfError END
          ; Tell how many lines selected
          ^!Prompt ^$StrCount("^%NL%";"^$GetSelection$";I)$
          ^!Goto LT



          --- In ntb-clips@yahoogroups.com, Don <don@...> wrote:
          >
          > I have the following type of data:
          > 058001e58517 07-13-13 10:05:22
          > 058001e58517 07-13-13 10:05:22
          > 058001e58573 07-13-13 09:39:54
          > 058001e58573 07-13-13 09:39:54
          > 058001e5861a 07-13-13 09:53:40

          -------- snip -----------

          > 058001e5a812 07-13-13 10:17:39
          > 058001e5a812 07-13-13 10:17:39
          > 058001e5a812 07-13-13 10:17:39
          > 058001e5a812 07-13-13 10:17:39
          > 058001e5a831 07-13-13 10:42:48
          >
          > I want to know how many times each number on the left appears. In a
          > perfect world I would also calculate the amount of time from the first view of that item to the last (times on left). I have a block on how to start even ...
          >
        • Don
          Very much so. Easy to redo the date as suggested since I make this with a regex from raw data. Never even occurred to me to format that way. It is possible
          Message 4 of 9 , Jul 21, 2013
          View Source
          • 0 Attachment
            Very much so. Easy to redo the date as suggested since I make this with
            a regex from raw data. Never even occurred to me to format that way.

            It is possible to have a "single" appearance of the initial code so I'll
            have a look at that.

            On 7/21/2013 12:41 PM, joy8388608 wrote:
            > Here is some code to help/get you started...
            >
          • flo.gehrke
            ... This clip inserts the frequency at the beginning of each line. Also single occurrences are marked up: ^!Jump Doc_Start ... ^!Find ^( w+).+( R 1.+)* RS
            Message 5 of 9 , Jul 22, 2013
            View Source
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, Don <don@...> wrote:
              >
              > It is possible to have a "single" appearance of the initial code
              > so I'll have a look at that.

              This clip inserts the frequency at the beginning of each line. Also single occurrences are marked up:

              ^!Jump Doc_Start
              :Loop
              ^!Find "^(\w+).+(\R\1.+)*" RS
              ^!IfError End
              ^!Set %Freq%=^$StrCount("^\d+";"^$GetSelection$";R)$
              ^!Replace "^" >> "^%Freq%:\x20" HRAS
              ^!Goto Loop

              Regards,
              Flo
            • flo.gehrke
              ... Joy informed me that the RegEx in this clip will fail in case the list has got 333 or more lines. Sorry, I didn t expect Don s list to be that long. For
              Message 6 of 9 , Jul 24, 2013
              View Source
              • 0 Attachment
                --- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
                >
                > This clip inserts the frequency at the beginning of each line. Also single occurrences are marked up:
                >
                > ^!Jump Doc_Start
                > :Loop
                > ^!Find "^(\w+).+(\R\1.+)*" RS
                > ^!IfError End
                > ^!Set %Freq%=^$StrCount("^\d+";"^$GetSelection$";R)$
                > ^!Replace "^" >> "^%Freq%:\x20" HRAS
                > ^!Goto Loop

                Joy informed me that the RegEx in this clip will fail in case the list has got 333 or more lines.

                Sorry, I didn't expect Don's list to be that long.

                For me, it works when using a Possessive Quantifier: '^(\w+).+(\R\1.+)*+' or '^(\w+).+(\R\1.++)*'.

                Probably, that problem is caused by a PCRE Error Recursion Limit. For more details, please see what I posted to the Clip Group on 6/20/2012 with message #22824.

                Regards,
                Flo
              • flo.gehrke
                ... No, sorry -- it s not the size of the whole list. It pertains to the size of the groups (i.e. duplicate 12-character-strings at start of line) that are
                Message 7 of 9 , Jul 24, 2013
                View Source
                • 0 Attachment
                  --- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
                  >
                  > Joy informed me that the RegEx in this clip will fail in case the
                  > list has got 333 or more lines.

                  No, sorry -- it's not the size of the whole list. It pertains to the size of the groups (i.e. duplicate 12-character-strings at start of line) that are matched with back reference...

                  Flo
                • Don
                  ... Truly fascinating. My file will often have thousands of lines actually ... for a long time.
                  Message 8 of 9 , Jul 24, 2013
                  View Source
                  • 0 Attachment
                    On 7/24/2013 5:26 PM, flo.gehrke wrote:
                    > --- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
                    >>
                    >> This clip inserts the frequency at the beginning of each line. Also single occurrences are marked up:
                    >>
                    >> ^!Jump Doc_Start
                    >> :Loop
                    >> ^!Find "^(\w+).+(\R\1.+)*" RS
                    >> ^!IfError End
                    >> ^!Set %Freq%=^$StrCount("^\d+";"^$GetSelection$";R)$
                    >> ^!Replace "^" >> "^%Freq%:\x20" HRAS
                    >> ^!Goto Loop
                    >
                    > Joy informed me that the RegEx in this clip will fail in case the list has got 333 or more lines.
                    >
                    > Sorry, I didn't expect Don's list to be that long.
                    >
                    > For me, it works when using a Possessive Quantifier: '^(\w+).+(\R\1.+)*+' or '^(\w+).+(\R\1.++)*'.
                    >
                    > Probably, that problem is caused by a PCRE Error Recursion Limit. For more details, please see what I posted to the Clip Group on 6/20/2012 with message #22824.
                    >
                    > Regards,
                    > Flo

                    Truly fascinating. My file will often have thousands of lines actually
                    :-) so good you knew the solution. I would have been scratching my head
                    for a long time.
                  Your message has been successfully submitted and would be delivered to recipients shortly.