sysofwan / zapfeeds

A news aggregation web app that collects information from news and social sites and predicts trendiness of contents.
3 stars 1 forks source link

Content ranking #10

Open sysofwan opened 11 years ago

sysofwan commented 11 years ago

Figure a ranking system, discuss and implement.

lidsky commented 11 years ago

Until we get all the data and analysis, let's implement this for the time being : http://amix.dk/blog/post/19588

So rank each item based on their score.

lidsky commented 11 years ago

So i'm reproducing the script for ranking but having a hard time pinning down a specific timestamp format and converting it to a desired form based on the link above. Discovered that:

  1. In the database: 2013-10-02 18:12:50.216898
  2. using psycopg2: datetime.datetime type
  3. exporting to csv: 38:09.7

Currently the ranking script is written based on the first form. So do you know what format is the timestamp?

Epoch timestamp : http://www.epochconverter.com/

sysofwan commented 11 years ago

If you use sqlalchemy, it will convert it automatically to python datetime object.

On Oct 2, 2013, at 4:14 PM, lidsky notifications@github.com wrote:

So i'm reproducing the script for ranking but having a hard time pinning down a specific timestamp format and converting it to a desired form based on the link above. Discovered that:

  1. In the database: 2013-10-02 18:12:50.216898
  2. using psycopg2: datetime.datetime type
  3. exporting to csv: 38:09.7

Currently the ranking script is written based on the first form. So do you know what format is the timestamp?

Epoch timestamp : http://www.epochconverter.com/

— Reply to this email directly or view it on GitHub.

sysofwan commented 11 years ago

just use content.timestamp to get the time..