Giter Club home page Giter Club logo

supermemo2's Introduction

Hi there

I'm Alan, a fan of Python and Golang.

๐Ÿ’ป Hobby Projects

  • SuperMemo2, a spaced repetition algorithm package called SM-2 writtien in Python.
  • CyaAPI, an API built in FastAPI(Python) for spaced reptition learning.
    • I found this website called Zorbi that uses the SM-2 algorithm, essentially doing what I want to achieve with CyaAPI, so I been using that since instead.

๐ŸŒ Open Source Contributions

Mattermost

Target

supermemo2's People

Contributors

alankan886 avatar blazej-czapp avatar praneetheus avatar

Stargazers

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

Watchers

 avatar  avatar

supermemo2's Issues

๐Ÿ”– v2.0.0

After speaking with @blazej-czapp and receiving useful feedback, I'm looking to push out a new version that's simpler and more user-friendly.

To toss off the over-engineered code, my main goals are:

  1. Keeping the class attributes simple (i.e. no previous and current values)
  2. Adding review(quality, review_date) function and keeping first_review(quality, review_date), removing everything else.
  3. Allowing the user to input date as a string with format Year-Month-Day and other common formats.

The flow of using the package when pulling data from the database would be:

from supermemo2 import SMTwo
# first review
review = SMTwo.first_review(quality, review_date)

# after first review
# your read data from db for your existing values
# new review
# returns an SMTwo object with the new values
review = SMTwo(easiness, interval, repetitions).review(quality, review_date)

Can't Import supermemo2.models

>>> import supermemo2.models
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'supermemo2.models'

Improve tests under test_api.py

User Story

As a developer, I want stronger tests for first_review and modify in test_api.py, so that I can rely more on the tests.

Description

Tests for first_review and modify aren't checking current values.

Especially with the modify method, the current values update correspond to changes in the previous values. I think it's important to check if the current values have been updated correctly.

Acceptance Criteria

  • All tests under test_api.py besides test_modify_no_inputs checks current values.

Steps

  1. Find the expected values in test_sm_two.py or calculate them.
  2. Add expected values into test cases for each test.
  3. Add asserts checking the current value against the expected values.

need help with API usage

Is it possible that the next review_date is today? Like Anki does when the answer is "Again" (I don't know what it means in the SM2 terms)

E-Factor not calculated when q < 3

I had some misunderstanding of the explanation of the algorithm, EF factor should always be calculated for every quality value.

I thought If the quality response was lower than 3 then start repetitions for the item from the beginning without changing the E-Factor means not to calculate a new EF factor, but it really means reset the repetitions and keep the new E-Factor.

Error when importing

>>> from supermemo2 import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python38\site-packages\supermemo2\__init__.py", line 1, in <module>
    from .api import first_review, modify
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python38\site-packages\supermemo2\api.py", line 3, in <module>
    from .model import SMTwo
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python38\site-packages\supermemo2\model.py", line 11, in <module>
    class SMTwo:
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python38\site-packages\supermemo2\model.py", line 18, in SMTwo
    on_setattr=attr.setters.validate
AttributeError: module 'attr' has no attribute 'setters'

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.