Flow
Flow
TriniTuner.com  |  Latest Event:  

Forums

HELP: Computer Programmers (i think)

this is how we do it.......

Moderator: 3ne2nr Mods

User avatar
bushwakka
punchin NOS
Posts: 4353
Joined: August 24th, 2007, 1:02 pm
Location: GPS unavailable

HELP: Computer Programmers (i think)

Postby bushwakka » June 27th, 2011, 11:46 am

I have a txt file which contains the records of pressure-time data. There is an insane amount of records or rows in this file.

The problem is that I have to use this data in a program to analyse something. However, at several points in the txt file, records or rows are repeated (duplicated) exactly. This gives a time continuity problem in the program I'm using so I have to delete the duplicate rows. There is an insane amount of duplicate rows and its virtually impossible to do this manually. I need a method to first parse the txt file records into excel I think and then do some kinda program/macro to find and delete the duplicates?

Help please?

oh, the number of rows is about 893,000

User avatar
ismithx
punchin NOS
Posts: 4285
Joined: August 12th, 2010, 11:46 am
Location: riding till the wheels fall off

Re: HELP: Computer Programmers (i think)

Postby ismithx » June 27th, 2011, 12:16 pm

do you want me to make such a program for you?

User avatar
RBphoto
TriniTuner 24-7
Posts: 7627
Joined: June 26th, 2007, 10:46 am
Location: Pikchatekoutin
Contact:

Re: HELP: Computer Programmers (i think)

Postby RBphoto » June 27th, 2011, 12:25 pm

I will do it... 10 cents per row :|...

But seriously

What you can do is paste into word. In the find dialog, do a find and replace. Then.. replace all.

Will be done in a few mins.

User avatar
RBphoto
TriniTuner 24-7
Posts: 7627
Joined: June 26th, 2007, 10:46 am
Location: Pikchatekoutin
Contact:

Re: HELP: Computer Programmers (i think)

Postby RBphoto » June 27th, 2011, 12:27 pm

Mind me asking what application did the logging and what you are trying to read the text log with?

User avatar
ismithx
punchin NOS
Posts: 4285
Joined: August 12th, 2010, 11:46 am
Location: riding till the wheels fall off

Re: HELP: Computer Programmers (i think)

Postby ismithx » June 27th, 2011, 12:29 pm

crossdrilled wrote:I will do it... 10 cents per row :|...

But seriously

What you can do is paste into word. In the find dialog, do a find and replace. Then.. replace all.

Will be done in a few mins.



hehehehe you want word to crash?

as i say bushwakka i could organize and make a program for that.... for a small price ($100-$200)

User avatar
dry
Admin
Posts: 2195
Joined: March 21st, 2003, 7:01 pm
Contact:

Re: HELP: Computer Programmers (i think)

Postby dry » June 27th, 2011, 12:32 pm

http://unxutils.sourceforge.net/
you want uniq.exe

c:\> uniq.exe infile.txt outfile.txt

User avatar
bushwakka
punchin NOS
Posts: 4353
Joined: August 24th, 2007, 1:02 pm
Location: GPS unavailable

Re: HELP: Computer Programmers (i think)

Postby bushwakka » June 27th, 2011, 12:35 pm

crossdrilled wrote:Mind me asking what application did the logging and what you are trying to read the text log with?


dunno what app made the log, im importing into pansystem to do the well test analysis

You cant use find and replace in word cuz the duplicates are not unique.....it looks like this:

01/18/2010 10:11:31 4279.786133
01/18/2010 10:11:31 4279.786133
01/18/2010 10:11:36 4279.787598
01/18/2010 10:11:36 4279.787598
01/18/2010 10:11:41 4279.788086
01/18/2010 10:11:41 4279.788086

a friend pointed out this feature to me in excel
http://office.microsoft.com/en-us/excel ... 34626.aspx

im gonna parse the text file into a table in word by using the convert text to table option (hope computer doesnt frig up) and then paste that table into excel and try the above

...crosses fingers

User avatar
RBphoto
TriniTuner 24-7
Posts: 7627
Joined: June 26th, 2007, 10:46 am
Location: Pikchatekoutin
Contact:

Re: HELP: Computer Programmers (i think)

Postby RBphoto » June 27th, 2011, 12:39 pm

32MB is the maximum word file size... that is all I know of the limitations. Anyway, I used stuff like Jpad pro and 1st page to do this in years gone by. Don't know what is the best editor nowdays that can do this find and replace.

User avatar
RBphoto
TriniTuner 24-7
Posts: 7627
Joined: June 26th, 2007, 10:46 am
Location: Pikchatekoutin
Contact:

Re: HELP: Computer Programmers (i think)

Postby RBphoto » June 27th, 2011, 12:43 pm

Hmmm, looking at this, if you can import to a database (like access or mysql), you can use wildcard searches and do more efficient filters. Cool thing is, once done with a database filter, you can run a report and have your stuff formated any which way you need.

User avatar
bushwakka
punchin NOS
Posts: 4353
Joined: August 24th, 2007, 1:02 pm
Location: GPS unavailable

Re: HELP: Computer Programmers (i think)

Postby bushwakka » June 27th, 2011, 12:53 pm

ok....so i encountered a problem......i cant make a table in word that is so long.....so i have to find another way to parse the records from the text file into a table......suggestions?

User avatar
dry
Admin
Posts: 2195
Joined: March 21st, 2003, 7:01 pm
Contact:

Re: HELP: Computer Programmers (i think)

Postby dry » June 27th, 2011, 1:10 pm

dude, try the uniq command from the command prompt.

it takes an arbitrary text file and spits it back out with the duplicates removed. exactly what you want.

User avatar
RBphoto
TriniTuner 24-7
Posts: 7627
Joined: June 26th, 2007, 10:46 am
Location: Pikchatekoutin
Contact:

Re: HELP: Computer Programmers (i think)

Postby RBphoto » June 27th, 2011, 1:16 pm

1st page 2000? is a free download, and I think you can get search and replace capability. Ditto with Jpad pro. Try them out (nothing to loose I guess)

User avatar
Bizzare
TriniTuner 24-7
Posts: 10873
Joined: June 2nd, 2010, 12:26 pm
Location: I'm in it

Re: HELP: Computer Programmers (i think)

Postby Bizzare » June 27th, 2011, 1:17 pm

Are the duplicates doubled like in the example above, or are there some areas where it triples etc?

given
Riding on 13's
Posts: 5
Joined: October 16th, 2008, 2:57 pm
Contact:

Re: HELP: Computer Programmers (i think)

Postby given » June 27th, 2011, 1:40 pm

MSExcel go help yuh out use data filters to remove dups


only prob is to get it into excel i sure it have something out there man good luck ! :D

User avatar
bushwakka
punchin NOS
Posts: 4353
Joined: August 24th, 2007, 1:02 pm
Location: GPS unavailable

Re: HELP: Computer Programmers (i think)

Postby bushwakka » June 27th, 2011, 2:43 pm

Bizzare wrote:Are the duplicates doubled like in the example above, or are there some areas where it triples etc?


only doubles....i gonna check out crossdrilled programs

dry wrote:dude, try the uniq command from the command prompt.

it takes an arbitrary text file and spits it back out with the duplicates removed. exactly what you want.


more info please on this uniq thing.....i seeing sumn to do with linux and all that jazz and i not sure i understand it

benko
Ricer
Posts: 27
Joined: November 9th, 2005, 6:15 pm
Contact:

Re: HELP: Computer Programmers (i think)

Postby benko » June 27th, 2011, 2:54 pm

dry wrote:dude, try the uniq command from the command prompt.

it takes an arbitrary text file and spits it back out with the duplicates removed. exactly what you want.

^it requires that the file be sorted beforehand (it will only remove duplicates on adjacent lines), it is a windows commandline app that was ported from unix

I would suggest importing the file into any database app or even simply use excel if your file is not sorted or you need to work through a few sanitization steps

User avatar
psykomorf
Sweet on this forum
Posts: 257
Joined: April 18th, 2003, 1:44 am

Re: HELP: Computer Programmers (i think)

Postby psykomorf » June 27th, 2011, 2:58 pm


Smokey
Street 2NR
Posts: 84
Joined: October 14th, 2004, 7:47 pm
Location: ^ local trini ass

Re: HELP: Computer Programmers (i think)

Postby Smokey » June 27th, 2011, 3:26 pm

*cough* basic excel *cough*

User avatar
bushwakka
punchin NOS
Posts: 4353
Joined: August 24th, 2007, 1:02 pm
Location: GPS unavailable

Re: HELP: Computer Programmers (i think)

Postby bushwakka » June 27th, 2011, 3:36 pm

wow ok....thanks psyko....cant believe the answer to importing in excel was so ez all along...did the import, now trying the filters....taking a lil while

User avatar
Sky
punchin NOS
Posts: 4121
Joined: September 1st, 2006, 10:30 pm
Location: BRRAAAPP!!!

Re: HELP: Computer Programmers (i think)

Postby Sky » June 27th, 2011, 3:46 pm

*in French Accent* 200 Years later..

User avatar
TK!
Riding on 18's
Posts: 1785
Joined: April 13th, 2004, 10:29 am
Location: North, Trinidad
Contact:

Re: HELP: Computer Programmers (i think)

Postby TK! » June 27th, 2011, 4:04 pm

excel as they said. was gonna say how, but psyk... said it

User avatar
bushwakka
punchin NOS
Posts: 4353
Joined: August 24th, 2007, 1:02 pm
Location: GPS unavailable

Re: HELP: Computer Programmers (i think)

Postby bushwakka » June 27th, 2011, 8:02 pm

ok....excel didnt work out, at least on my comp.....893,000 + rows of data seems too much for it to sort, it just locks up...i left it for like 4 hrs

my friend said he'll do some magic with a mysql database or sumn so

User avatar
Bizzare
TriniTuner 24-7
Posts: 10873
Joined: June 2nd, 2010, 12:26 pm
Location: I'm in it

Re: HELP: Computer Programmers (i think)

Postby Bizzare » June 27th, 2011, 8:07 pm

Copy and paste like 25 of the duplicated rows here if you can/ if you still need help.

User avatar
FullStop
punchin NOS
Posts: 3198
Joined: August 11th, 2007, 8:47 pm

Re: HELP: Computer Programmers (i think)

Postby FullStop » June 27th, 2011, 8:08 pm

um, that is an easy piece of code to write, how big is the text file? in terms of MB? email me the text file, iwill try and write the code to do it tonight... ghostbustersss at gmail dot com, hit me a pm when you send it.
Last edited by M_2NR on June 27th, 2011, 8:24 pm, edited 1 time in total.
Reason: saved the horror... thank Bizarre

User avatar
Bizzare
TriniTuner 24-7
Posts: 10873
Joined: June 2nd, 2010, 12:26 pm
Location: I'm in it

Re: HELP: Computer Programmers (i think)

Postby Bizzare » June 27th, 2011, 8:12 pm

ghostbusters, expects lots and LOTS of spam!!
Putting ur email on a public forum....great idea :|

User avatar
Bizzare
TriniTuner 24-7
Posts: 10873
Joined: June 2nd, 2010, 12:26 pm
Location: I'm in it

Re: HELP: Computer Programmers (i think)

Postby Bizzare » June 27th, 2011, 8:14 pm

But yea, Sounds like a simple piece of code. Could write a code an allow you to parse the file through yuh browser and remove d duplicates.

User avatar
bushwakka
punchin NOS
Posts: 4353
Joined: August 24th, 2007, 1:02 pm
Location: GPS unavailable

Re: HELP: Computer Programmers (i think)

Postby bushwakka » June 27th, 2011, 8:47 pm

ok...i uploaded the rar file to rapidshare
here is the link: https://rapidshare.com/files/2971643094/pressures.rar

u guys can give it a go

ok, a friend helped me a bit, he did some magic with some database app and he got rid of the duplicates

some of the readings are now out of order though and they have to be put in order to ensure time continuity otherwise my analysis program gives an error.....here's an update to the original file

https://rapidshare.com/files/3549555402 ... sorted.zip

User avatar
Bizzare
TriniTuner 24-7
Posts: 10873
Joined: June 2nd, 2010, 12:26 pm
Location: I'm in it

Re: HELP: Computer Programmers (i think)

Postby Bizzare » June 27th, 2011, 9:41 pm

So I write a script and remove duplicates. But I not clear on what duplicates to remove. D ones with exact date, time and pressure? Or only the ones with exact pressures? Currently it remove the duplicates with exact date, time and pressure like in your example above.

User avatar
psykomorf
Sweet on this forum
Posts: 257
Joined: April 18th, 2003, 1:44 am

Re: HELP: Computer Programmers (i think)

Postby psykomorf » June 27th, 2011, 9:46 pm

not sure if this is what u looking for
https://rapidshare.com/files/4097995993/pressures.zip

User avatar
FullStop
punchin NOS
Posts: 3198
Joined: August 11th, 2007, 8:47 pm

Re: HELP: Computer Programmers (i think)

Postby FullStop » June 27th, 2011, 9:49 pm

my bad there bizzare, i a bit out of it, am currently piped up on muscle relaxer...look slike bushwakka get through, if any further assistance is needed, i around...

Advertisement

Return to “Ole talk and more Ole talk”

Who is online

Users browsing this forum: pugboy and 15 guests