results

package module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 3 Imported by: 3

README

gitpulse-results

This is an implementation of the scoring algorithm to be used in Gitpulse-01.

It makes use of minheaps to maintain the top N candidates based on their scores.

The scores are calculated in a normalized-weighted summation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candidate

type Candidate struct {
	CandidateMeta
	CandidateId             string
	TotalContributions      int
	TotalFollowers          int
	TopRepo                 string
	TopRepoStars            int
	TopContributedRepo      string
	TopContributedRepoStars int
	Languages               int
	Topics                  int
	JobId                   string
	Score                   int
}

func TopNCandidates

func TopNCandidates(list []Candidate, n int) []Candidate

type CandidateMeta

type CandidateMeta struct {
	Name       string
	Username   string
	AvatarURL  string
	Bio        string
	Email      string
	WebsiteURL string
}

type MinHeap

type MinHeap []Candidate

Minheap to maintaing the top n candidates with highest scores

func (MinHeap) Len

func (h MinHeap) Len() int

func (MinHeap) Less

func (h MinHeap) Less(i, j int) bool

func (*MinHeap) Pop

func (h *MinHeap) Pop() interface{}

func (*MinHeap) Push

func (h *MinHeap) Push(x interface{})

func (MinHeap) Swap

func (h MinHeap) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL