Tiny python script

완료 등록 시간: Jan 5, 2016 착불
완료 착불

I need a simple script that parses a file and counts some occurrences of keyword.

The file is very large (millions of lines) so the script should use readline for a file object or some other way, to avoid loading the whole file into memory all at once

The file contents are sections, with a single title line and 1 or more lines under each section title

section title lines (and only them) start with “@@@$”

sample file contents:

@@@$section_title_one

apple strudel

chocolate

@@@$section title 2

ice cream pie

@@@$another title

some

more

lines

the script should contain hardcoded a set of keywords, for developing it use kws = [“apple”,”banana”,”candy”]

the script should count how many lines in each section contain 1 or more keywords. and print out the titles of all of the sections which have at least 5 occurrences, ordered descending by number of occurrences, in the following format

[number of occurrences] - [section title]

e.g.

25 - section_title_ten

23 - title of some other section

....

the budget for this is $10, not more.

with your bid, at the top of the private message, please indicate in how many hours from the time I accept your bid can you deliver this.

thanks

Python

프로젝트 ID: #9244052

프로젝트 소개

23 건(제안서) 재택 근무형 프로젝트 서비스 이용 중: Jan 7, 2016

수상자:

red12345

HERE IS YOUR SOLUTION: Using python version 2.7 i would solve this like that: I can adjust my solution to another python version if you like #!/usr/bin/python2.7 from collections import OrderedDict # ADJUS 기타

$10 USD (0일 이내)
(1 리뷰)
0.0

이 일자리에 대한 프리랜서 23 명의 평균 입찰가: $16

kostyaf

Hello! I can do this script for you in 40 minutes since my bid would be accepted. Please contact me if you are interested. Best regards.

$25 USD (1일 이내)
(21 리뷰)
4.9
cracken

@@@$ Hi, I am well equip to this kind of task, can handle it pretty well. In fact, I already done related to this job before. Let me know the best of your time so we can discuss further based on your requirements and 기타

$10 USD (0일 이내)
(19 리뷰)
4.8
Zee93

A proposal has not yet been provided

$15 USD (1일 이내)
(10 리뷰)
4.3
eitan1195

A proposal has not yet been provided

$25 USD (1일 이내)
(21 리뷰)
4.3
The24CarrotsInc

A proposal has not yet been provided

$30 USD (1일 이내)
(12 리뷰)
3.7
bookshop1989

A proposal has not yet been provided

$34 USD (1일 이내)
(13 리뷰)
4.0
mahershahmeer

1-Day Hi there! I'm a Professional Software developer and Data Analyst for a well known Software House in Islamabad named PacSquare Pvt Ltd. If I get this job, I assure you that you'll get my best services in ret 기타

$50 USD (1일 이내)
(8 리뷰)
3.5
juanzapico

I can help you with your project, send me a sample file so I can check on it, it wont take much maybe 1-2 hours.

$15 USD (0일 이내)
(9 리뷰)
3.3
fox235

Hi, It will take at most 4 hours after hired for me to finish the task. Thanks

$11 USD (1일 이내)
(3 리뷰)
2.5
bhoir

Hello, No. of hrs: 10 hrs. I am having 10+ yrs of experience in software programming with various technologies like c++, .net, python and Perl. With expertise in various phase of development, I believe i can prov 기타

$15 USD (1일 이내)
(2 리뷰)
2.5
KaDoom

Hello, I am very intrested to do this project for you. I am studing software engineering and I have couple of years expirience in this feild, so it wont take much time to do it. This is very important to me because 기타

$10 USD (1일 이내)
(3 리뷰)
1.9
ggarciacordoba

Young proactive IT engineer that works with python everyday developing neural networks models in Python and Java.

$10 USD (1일 이내)
(0 리뷰)
0.0
johnmoonjunior

Should be able to do this in less than an hour.

$10 USD (1일 이내)
(0 리뷰)
0.0
w25927447

Hey, I am very interesting in your project. I have years experience of python. i hope i could help you for this project. Thank you

$15 USD (1일 이내)
(0 리뷰)
0.0
joncyli

I already have the script written. It can be sent to you for completion of the project immediately once the bid is accepted.

$10 USD (1일 이내)
(0 리뷰)
0.0
s11hivang

Hello Sir/Ma'am, Your script is ready... I used line by line file reading. so no memory wastage. Line number - title are stored in dictionary. Right now it prints on console.... but if you want in text file, let m 기타

$10 USD (0일 이내)
(0 리뷰)
1.2
chanswork

Can give flexibility to choose the headers. can give flexibility to choose number of occurrences. can give ability to use more then one file as input. can give ability to supply keywords as part of script or a diffe 기타

$11 USD (1일 이내)
(0 리뷰)
0.0
surajnakka

Hi, I have 4 years of experience in python. I can compete this script in 2 - 3 hrs. I have the alghorithm ready if you are interested. for loop: Read the file line by line. search for string'@@@$' for loop:rea 기타

$10 USD (0일 이내)
(0 리뷰)
0.0
vineeet12

i am python developer and have knowledge of backend databases(mysql,sqlite),big data handling using python data handling frameworks like pandas, petl and have experience in some web frameworks of python like django 기타

$15 USD (1일 이내)
(0 리뷰)
0.0
chrismckennacmk

This reason for the low bid is that I want to build some reviews and contacts for future projects. I have a degree in computer science and I teach python in high school. My plan would be: 1. To parse in the 기타

$10 USD (3일 이내)
(0 리뷰)
0.0