Comments (3)
Simple idea: Create a list with all known hashes, in such a way that each hash appears X times, where X = votes + 1 for that hash. So if there are three hashes: A, B and C with 2, 1 and 0 votes respectively, the list would be: [A,A,A,B,B,C]. Then pick a random element out of this list. This would probably not be fair though. Here is some more inspiration: http://www.evanmiller.org/how-not-to-sort-by-average-rating.html
from ipfspics-server.
On another part of the problem, I'll most likely use a virtual table (CREATE VIEW) to combine both our current tables and make the vote count easier.
from ipfspics-server.
Another idea:
x = the number of hashes
y = a random humber between 0 and x^2
the selected hash is the one in position closest to sqrt(y) when they are
reverse-ordered by (upvotes - downvotes)
It should be a very fast query. It won't advantage much the best one though, but having some bad ones should be an aspect of a random pictures.
@arvidj's link could be very good for a best-of page.
from ipfspics-server.
Related Issues (20)
- Status HOT 4
- archive/mirror of all images HOT 7
- Album HOT 2
- [SOLVED.MYSELF] Multiple image upload HOT 2
- Create a Reddit bot HOT 4
- update ipfs HOT 3
- rename the repo HOT 4
- Markdown embed code HOT 3
- Reddit thumbnail and expando support HOT 2
- Mime type for WMV screencasts wrong - just says 'document' HOT 2
- Can't see any pics. HOT 1
- Users should only be able to Up or Down vote once.
- ipfs.pics seems to have no ipfs server running, images are not loading HOT 19
- Deploy to Heroku button
- Can an user delete a photo which he posted ? HOT 1
- how can i deploy on my sever local? HOT 1
- HTTP Error 500 when trying to upload HOT 1
- There's nothing here, yet. HOT 1
- SSL_ERROR_NO_CYPHER_OVERLAP
- Is there a mechanism stop users adding duplicate images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipfspics-server.