GithubHelp home page GithubHelp logo

flash_cards's People

Contributors

jalletto avatar

Watchers

 avatar  avatar

flash_cards's Issues

Add some database fixtures.

Would be nice if you could spin up a db with test data out of the box. Right now it you need to add data via the admin panel manually.

Create Django management command to be used by Heroku scheduler.

Basically this https://www.freecodecamp.org/news/scheduling-jobs-in-a-django-application-using-heroku-scheduler-13c971a22979/

Job would run every minute or so. Look back to see how longs it's been since the last question was asked. If it's been more than 30 min or something like that, then send a question to slack.

  • Check when the last question was asked.
    • If less than 30 minutes OR there is already an active question that is waiting to be answered, do nothing.
    • else
    • Ask a question

Refactor the Slack client

The slack needs a few changes.

  1. It is setting a useless instance variable in the open conversation method.
  2. Right now you have to open the conversation and then send the message.
     slack_client = SlackClient()
     slack_client.open_conversation(["U01C06563L2"])
     slack_client.send_messgage(response['message'])

Would rather initiate the client with the reciever of the message and then just send message.

     slack_client = SlackClient(["U01C06563L2"])
     slack_client.send_messgage(response['message'])
  1. Make sure to close the conversation after a message is sent.

Can the text that wraps the questions and answers be more dynamic?

Right now all questions are wrapped with a hardcoded message.

f'Como se dice {card.front} en espanol?'

Same with all the answers.

No. La respuesta correcta es {card.back}'

This works for basic vocab but would be nice to add questions about grammar. Maybe even Cultural questions down the road.

Need Tests!!!

Tests need to be added for

  • the message parser
  • the action template
  • Each action
    • Ask Question
    • Answer Question
    • Challenge
    • Bot

Make asking questions smarter

Short Term Solution

  • avoid getting the same question twice in a row
    • if last state.last.card == card
    • Actually might just want to see if this card was asked in the last 24 hours.

Longer Term Solutions

  • don't ask questions that have been answered correctly as often. (This might be difficult).
    • get all the states for the card that have state.correct == True
    • Get the ratio with correct / total
    • Get the date it was last asked
      • if the ratio is between 100 80% and it has been asked in the last month there should be a 20% change it will get asked(or something like that)
      • if btw 79 and 60 and it hasn't been asked in the two weeks etc.

A solution for this needs to be more fully flushed out.

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.