ttiagojm / dailymath Goto Github PK
View Code? Open in Web Editor NEWWeb app showing some new math exercise everyday
License: MIT License
Web app showing some new math exercise everyday
License: MIT License
To validate our Python code we need to build a CI to test the code.
It's important to run mypy
too, since it is a type checher, it will validate if the infered types are the same as the annotaded ones.
The layout doesn't have a specific line of thought, so be creative.
All you need to do is follow the points below:
Create a script or a class which should be executed when the server starts, createing the tables and populating them.
A csv file will be added later where you should use to populate the DB. However, if you have a better idea to keep the database populated comment it out, please.
We implemented a singleton to prevent to made unnecessary queries to the database since the exercise is the same during the day.
@bugelseif suggest to use FastAPI cache instead of the singleton instance and the functions to select a new exercise everyday.
In main.py
we have some global variables and some functions which are not FastAPI routes. If we have global variables means we can encapsulate them in a class and use an instance of that class instead of global variables. Same for the functions that are about selecting exercises.
You can create a class ConfigExercise or something like that to encapsulate those variables and functions.
#ToDo
Before starting to develop databases, we need to create the database format.
I think 2 tables are enough.
Probably you're asking: "Why the multiple choice table doesn't have some flag saying what is the right answer?". Well, since all the exercises will have a detailed solution, the author will say, in the beggining, what solution is correct.
Probably, because options
will be a string with all options, some pattern will be developed to parse the options, but that's a back-end problem
Refactor code by applying Python design patterns.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.