Script to analyze text streams to split and count by week number
45 USDI have lots of files which have the date YYYY-MM-DD in the first field.
I want to be able to easily split, count, or label the lines.
Any content after the first tab is considered one block. Content after the first tab could contain any text, utf8, including tabs.
----
Example input:
2016-11-04a
2016-11-04b
2016-11-07c
2016-11-08d
----
Example output with "-w" for "week number":
45 2016-11-04a
45 2016-11-04b
46 2016-11-07c
46 2016-11-08d
Inserted field 1 is the week number 1..52, restarts at zero each year. This inserts week numbers in new field 1.
Variant -w0 is the same, but count first week from 0 instead of 1,
----
Example output with "-b" for "line Break":
2016-11-04a
2016-11-04b
2016-11-07c
2016-11-08d
Note the extra line break between weeks. Just one line break between weeks.
----
Example output with "-w" for "week start day and count".
# WEEK of 2016-10-30: 2
2016-11-04a
2016-11-04b
# WEEK of 2016-11-06: 2
2016-11-07c
2016-11-08d
The week start date is inserted once at the start of any week, after the colon is the count.
----
Option -z to output each week (between first and last), even if count = 0.
The purpose is if there's sparse data, eg many empty weeks.
----
Option to set the week start. Default week start = Sunday. -s = sunday, -m = monday
----
Option -y to invert the date to DD-MM-YYYY instead of YYYY-MM-DD.
----
Options can be combined. -help, -h = list of options.
No options = -w -b -s
----
I will invoke your script with piped input on the command line. Ubuntu or MacOSX. (Use normal ruby, perl, etc.) Script should be self-contained. I will provide test files.
-
260 Expirienced perl developer, ready to take it.
-
5 days45 USD
28 1 0 5 days45 USDI can do this in Ruby
Current freelance projects in the category Web Programming
Google Tag Manager (server-side) through Stape
23 USD
Need a specialist with experience in setting up Google Tag Manager (server-side) via Stape. The goal is to check the current setup and errors in the Stape-Shopify chain, tag managers. Identify the error and fix it. Tracking should be set up for purchases, cart, views, etc.… Web Programming, Contextual Advertising ∙ 34 minutes back ∙ 4 proposals |
Remove 404 errors from the websiteOn the website of the online store (Khoroshop platform), about 11,000 "Not Found (404)" errors have been recorded in Google Search Console. Analyzing the logs revealed that bots (including bot traffic from Asia) are massively scanning incorrectly generated mutant links. The… HTML & CSS, Web Programming ∙ 1 hour 46 minutes back ∙ 15 proposals |
Need to extract POST / GET / PUT requests from the TikTok mobile application urgently.In essence. It is necessary to extract POST / GET / PUT requests from the TikTok mobile application. Even by essence, it is not necessary to fully reverse anything since signatures are available on the internet, etc. But it would also be great. All authorization (Sending… Web Programming, Desktop Apps ∙ 6 hours 41 minutes back ∙ 8 proposals |
Product search function by imageIt is necessary to develop and integrate a product search function by image on the website.What needs to be implementedA "Search by Photo" button on the website.Image upload by the user: JPG.Search for visually similar products in the catalog.Display results in the form of… PHP, Web Programming ∙ 7 hours 17 minutes back ∙ 27 proposals |
Full-stack development — Amazon PPC Dashboard (Stage 1)Need a full-stack developer with experience working with Amazon API to implement Stage 1 of the internal PPC dashboard. The project is real, the data is live, everything is ready to start. Frontend prototype (5 pages, React + TypeScript): WHAT IS ALREADY READY — Frontend… Javascript and Typescript, Web Programming ∙ 15 hours 59 seconds back ∙ 18 proposals |