Skip to content

WGM-Devils/web-recommendations-system

Repository files navigation

Recommendations System for KlingtGut

Contents:

Setup:

Requirements:

  • python 3.11
  • pip

Libraries:

  • requests
  • pandas
  • numpy
  • python-dateutil

Note

you only need to install pip than you can run the following command to install the libraries

$ python ./hashtags_for_user/base_info.py

this will install all the required libraries

Files:

  • base_info.py
  • hashtags_from_post.py
  • post_score.py

Warning

you ne d to have all the files in the same folder named hashtags_for_user

Get hashtags from a seen post

command:

syntax:

$ python /location/to/file/hashtags_from_post.py {userid} {postid}

example:

$ python hashtags_for_user/hashtags_from_post.py 65846334e4aa365544dd06af 65b111bdd0ba272101646dad

Output:

Filename:

syntax:

hashtags-{userid}-.csv

example:

hashtags-65846334e4aa365544dd06af-.csv

Filelayout:

syntax:

none viewed liked comments posted score
test 0 0 0 0 0
{hashtag} {a} {b} {c} {d} {$a + 10 * b + 5 * c + 10 * d$}

layout:

,viewed,liked,comments,posted,score
test,0,0,0,0,0

example:

none viewed liked comments posted score
test 0 0 0 0 0
#musik 5 4 1 1 60
#python 5 4 1 1 60
layout:
,viewed,liked,comments,posted,score
test,0,0,0,0,0
#musik,5,4,1,1,60
#python,5,4,1,1,60

Score post based on hashtags for user

command:

syntax:

$ python /location/to/file/post_score.py {userid} {postid}

example:

$ python hashtags_for_user/post_score.py 65846334e4aa365544dd06af 65b111bdd0ba272101646dad

Output:

Filename:

syntax:

post-scores-{userid}-.csv

example:

post-scores-65846334e4aa365544dd06af-.csv

Filelayout:

syntax:

none viewed score
0 False 0.0
{postid} {boolean} {$postscore / nhashtags + likes * 10$}

layout:

,viewed,score
0,False,0.0

example:

none viewed score
0 False 0.0
65b111bdd0ba272101646dad False 70.0
layout:
,viewed,score
0,False,0.0
65b111bdd0ba272101646dad,False,70.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages