Giter VIP home page Giter VIP logo

mostactivecookie's Introduction

MostActiveCookie

MostActiveCookie is a command line program in Python to process the log file and return the most active cookie for specified day. This was a project proceeded for Quantcast.

In order to run this program, you will need a csv file with cookie and timestamp inside. The example for csv will be like following:

Cookie,Timestamp
AtY0laUfhglK3lC7,2018-12-09T14:21:00+00:00
AtY0laUfhglK3l67,2018-12-09T14:20:00+00:00

You would need Python with version at least 3.8 and csv file that includes appropriate cookie and timestamp with header.

Quick Start

Scenario: Extract Most Active Cookie in 2018-12-09.

You can either use pip install, or just clone repository itself.

Use pip install

> pip install most-active-cookie
> python3 -m most_active_cookie your_cookie_file.csv --date 2018-12-09
> AtY0laUfhglK3lC7
> AtY0laUfhglK3l67

Clone repository

> git clone https://github.com/yongchand/MostActiveCookie.git && cd MostActiveCookie
> python3 -m most_active_cookie your_cookie_file.csv --date 2018-12-09
> AtY0laUfhglK3lC7
> AtY0laUfhglK3l67

Testing

Test can be performed using pytest

> pytest -v 
> cd tests/jobs #only when previous command does not work
> python3 -m pytest #only when previous command does not work

Future Works

  • Add support to other file formats
  • Add alert for cookie input
  • Consider adding logging

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.