Coder Social home page Coder Social logo

algolia-test's Introduction

Data engineer test - algolia

To run the project

Copy the project on your pc

git clone https://github.com/focom/algolia-test.git
cd algolia-test

Create a .env file this will contain your Github API token (to have a 5000 rate call on the Github API)

echo 'token={your-access-token}' > .env

Then install depedencies

npm i

You can now start the api with

npm start

Once you have the server running you can test the output of the api with this call

curl http://localhost:5000/stat/hn-search

It follows this pattern:

curl http://localhost:5000/stat/{repo-name}

The result use the json format. It shows the all the stat for the requested repo

You can generate the dataset with the src/analytics.js file This is long as I have to wait for Github api to generate the stat for each repo If I receive a 202 code, I wait ~2min and try again. This part should be handle by a job queu like https://github.com/Automattic/kue

The dataset

To generate the dataset, here are the steps I made :

You can browse the dataset, in algolia.db file. It is a sqliteDB. It is a subset of all the repo (~60 repos out of the ~360).

Use https://sqlitebrowser.org/ to browse the db easily

algolia-test's People

Contributors

pievalentin avatar

Watchers

 avatar

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.