GithubHelp home page GithubHelp logo

yoshuawuyts / pretty-hot-ranking-algorithm Goto Github PK

View Code? Open in Web Editor NEW
203.0 5.0 9.0 5 KB

Algorithm that measures how relevant a given data set is, kinda like Reddit

License: MIT License

JavaScript 100.00%

pretty-hot-ranking-algorithm's Introduction

pretty-hot-ranking-algorithm stability

npm version build status downloads js-standard-style

Algorithm that measures how relevant a given data set is, kinda like Reddit

Doesn't do any jitter stuff and can probably be gamed if you try hard enough, but it should be useful enough if you want to wire up community-driven news site that always has fresh, relevant content for people to discover.

Usage

var rank = require('pretty-hot-ranking-algorithm')

var start = new Date(20, 2, 2006)
var upvotes = 15
var downvotes = 4
var date = new Date()

var itemRank = rank(upvotes, downvotes, date, start)

API

itemRank = rank(upvotes, downvotes, date, start)

Generate an item rank based off upvotes, downvotes and the current date. The last argument is the time of the first post, generally this should be close to when the server first goes live.

See Also

License

MIT

pretty-hot-ranking-algorithm's People

Contributors

yoshuawuyts avatar

Stargazers

Limbert Lino Mattos avatar Matias Fanger avatar  avatar Melvin avatar John Fromme avatar Daniel Benjamin avatar  avatar  avatar Manuel Beaudru avatar Prathak Paisanwatcharakit avatar Pedro Victor avatar Lucas Alberto avatar Cat  avatar Daniel Chou avatar Kevin.Y avatar  avatar Brandon Sammons avatar raquezha avatar Berkay UNAL avatar Terry Tilley avatar Adrian Carballo avatar Sebastian Cichos avatar Kamil Dzwonkowski avatar Arbaaz Khan avatar  avatar Sacha Arbonel avatar  avatar Nguyen Vu Cuong (Ralph) avatar Rob Ede avatar Matt Burman avatar Amal Karunarathna avatar Ishan Marikar avatar Daniel Bastos avatar luandro avatar hheedat avatar Jonathon Belotti avatar Marko Roganovic avatar Alexis De La Torre avatar  avatar Dr. Lau Cher Han avatar Sandeep Khandewale avatar Francis Chong avatar Shreya Batra avatar Zero avatar Daniyal Ansari avatar Gilles De Mey avatar Gautam Chaudhary avatar Brendan Scullion avatar Rhio Kim avatar Gleb avatar Lasse Mejlvang Tvedt avatar Gregory avatar akoni avatar Double Han avatar Daniel Lindenkreuz avatar Mick Dekkers avatar Steven Demmler avatar HeavenDuke avatar pavan avatar Jacky Tang avatar Velkan.Xu avatar Fabian Beuke avatar Carlos Galarza avatar  avatar Matt avatar Rezha Julio avatar Romet Tagobert avatar Qiqun.H avatar David Authier avatar Dmitri Kunin avatar Sarthak Subramanian avatar Dave Schumaker avatar crapthings avatar 仙森 avatar 爱可可-爱生活 avatar cezary avatar Barry Buck avatar Robin Larsson avatar Jonathan Rutheiser avatar Matt Keas avatar Egor Sharapov avatar Lucian Weber avatar Brecht Savelkoul avatar Huy Nguyen Quang avatar Vishal Isharani avatar Alexander Salas Bastidas avatar Victor Rachieru avatar Mateo Gianolio avatar Anthony avatar Orange Mug avatar Josh Gwosdz avatar Laughing avatar Axetroy avatar Ken O avatar Moose avatar sonny avatar sunkuo avatar Fly Chang avatar Andrei Gec avatar []\ avatar

Watchers

mingfeng.zhang avatar James Cloos avatar Alex Pan avatar  avatar  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.