Em Andamento

small test program in python

Small test program in python. the program needs to read a text file, build an array of unique records from fields in the csv file, do some date/time calculations then output the array in the form of a csv that's compilation of the results.

I have worked out the details here:

Read a record

If status = ‘unavailable’ proceed

Calculate end-date = add duration to the input record time-stamp

start-date = time-stamp

calculate end-date

if start-month = end-month

check to see if there’s an array entry with the ID Month & Year of this record

if yes =

update array count = count+1

add duration to array-duration-total (has to be kept for calculating average)

calculate array-average = array-duration-total / count

else

// we have to create a new record in the array for this ID, Month & Year

Set count =1

Add duration to array-duration-total // it will be zero to start with anyway

Set array-average = duration ( we can do this since this is the first record in the array)

Else // this mean the end of month was different than the month in which the outage occurred – therefore we need to add two record - one that extends to the end of the month and another start that’s starts at the beginning of the month

Calculate the last day of the month

Calculate how-many-minutes from time-stamp until 23:59:59 on the last day of the month

// next we have to determine if there’s an array record using for ID & Date

If yes

Update array count = count+1 (for this id/date combo

Add how-many-minutes to array-duration-total

Set array-average (for this id/date record) = array-duration-total

else

// we have to create a new record in the array for this ID, Month & Year

Set count =1

Add how-many-minute to array-duration-total // it will be zero to start with anyway

Set array-average = how-many-minutes ( we can do this since this is the first record in the array)

// here is where we add the second record that has the number of minutes from the start of the following month – but we have calculations to do first

from date time stamp calculate the first day of the following month and create a time-stamp = mm/dd-yy 00:00:00

next subtract start of month to how many minutes the outrage rolled over into the following month (we’re going to be lazy here and assume that no outages lasted longer than 1 whole month and moved us into 2 months from the outage start – peeking at the data it does not)

either insert a new record into the array if no unique record exists for that ID & Date or update an existing record in the array

when complete output the records in the array to a text file.

Habilidades: Python

Veja mais: software to write the chip, software read write data smart card, software rfid write tag, rfid software read write, simple python program test telit module, software read write emv chip, software description write, software need write ipad app, custom software request write, software engineering write requirement proposal, software project write ups, software program write book, software product write specifications, program test active directory, ebook software formate write, software need write java, python selenium test suite, sandbox program test, software application write business letters company project letterhead, python program play craps, interface python program reads csv outputs csv, python program checks validity numbers, python program craps, python program extract info website, python automaion test suite

Acerca do Empregador:
( 1 comentário ) North East, United States

ID do Projeto: #13348723

Concedido a:

rajdeepa555

Hello Sir, I have 6 years of experience in J2EE,c#,C, php, python based technologies. Regarding front end technologies, I am proficient in html, java script, jquery. My recent java works are as follows - I'm Mais

$10 USD / hora
(8 Comentários)
3.9

4 freelancers estão ofertando em média $11/hora para esse trabalho

bestit4u

Need help with Python development? Feel free to contact me any time! I have been a very successful developer for over 7 years, working for individuals all over the world. I always aim to maintain a long term relatio Mais

$12 USD / hora
(12 Comentários)
4.8
JustinLee890410

Only RESULT will prove my ability. I have used Python from middle school and I have deep understanding in Python. As an experienced Developer, I seriously place my cover letter on you job posting. I have the enough Mais

$12 USD / hora
(0 Comentários)
0.0
schoudhary1553

Greetings sir, i am an expert freelancer for this job and your 100% satisfaction is assured if you allow me to serve. Here is the reason. Why you should pick me? a) I am a very expert and have the same kind of ex Mais

$12 USD / hora
(0 Comentários)
0.0
$11 USD / hora
(0 Comentários)
0.0