Giter Site home page Giter Site logo

paramt / memeadviser Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 3.0 255 KB

A reddit bot that evaluates memes and predicts growth on r/MemeEconomy

Home Page: https://param.me/MemeAdviser

License: Mozilla Public License 2.0

Python 96.72% Shell 3.28%
meme-economy praw reddit-bot

memeadviser's Introduction

Hi there ๐Ÿ‘‹

Hi there! I'm a CS student @ UWaterloo with a passion for exploring technology!

Links

ย  ย  ย 

memeadviser's People

Contributors

dependabot-preview[bot] avatar imgbot[bot] avatar paramt avatar rdil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

memeadviser's Issues

Store memeadviser.log in the repo's wiki

Advantages

The log can be viewed online in real-time

Implementation

One way to do this is to save the log file in MemeAdviser.wiki and run a shell script each time the program runs that looks like this:

#!/bin/bash
cd MemeAdviser.wiki/
git add .
git commit -m "Update log"
git push

Use Reddit to save data

Description:

Instead of using replied.txt to keep track of submissions that have already been replied to, we can use reddit's save feature. So writing to file would be replaced by saving a post on Reddit, and accessing that list would be something like:

replied = reddit.user.me().saved(limit=None)

Furthermore, subscribed.txt can be replaced by a text submission in a private subreddit, which can be edited whenever the subscribed list needs to be updated

Advantages:

  • The script can run from tests directly, making CI tests simpler and increasing code coverage at the same time

Script takes more than 1 minute to run

Description
The cronjob is scheduled to run every minute, but this is a problem when the bot has to send 100+ PMs because it takes more than 1 minute to execute and is interrupted by the next scheduled job before it gets a chance to finish

MemeAdviser/src/app.py

Lines 121 to 122 in aab7e5a

for user in subscribed:
reddit.redditor(user).message("MemeEconomy Update", constants.Messages.pm.format(link=submission.permalink, upvotes=submission.score, break_even=algorithm.break_even(submission.score)))

Possible Solutions

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.