35589f701645ae72f8f85062dcebc93421e7b3d9
Computer Science Flash Cards
This is a little website I've put together to allow me to easily make flash cards and quiz myself for memorization of:
- general cs knowledge
- vocabulary
- definitions of processes
- powers of 2
- design patterns
- code
- data structures
- algorithms
- solving problems
- bitwise operations
Will be able to use it on: - desktop - mobile (phone and tablet)
It uses:
- Python 3
- Flask
- SQLite
How to run it on a server
- Clone project to a directory on your web server.
- Edit the config.txt file. Change the secret key, username and password. The username and password will be the login for your site. There is only one user - you.
- Follow this long tutorial to get Flask running. It was way more work than it should be:
https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-16-04
wsgy.pyis the entry point. It callsflash_cards.py- This is my systemd file
/etc/systemd/system/flash_cards.service: view- you can see the paths where I installed it, and the name of my virtualenv directory
- when done with tutorial:
sudo systemctl restart flash_cards sudo systemctl daemon-reload - When you see a login page, you're good to go.
- Uncomment the commented block in
flash_cards.py - Restart Flask. You have to use
sudo systemctl restart flash_cards. - Hit the URL /initdb on your web server. You'll see a message that the database has been initialized.
- Comment that code again.
- Restart Flask.
- Go to / on your webserver.
- Log in.
- Click the "General" or "Code" button and make a card!
- When you're ready to start memorizing, click either "General" or "Code" in the top menu.
How to run with Docker
Provided by @Tinpee - tinpee.dev@gmail.com
Make sure you already installed docker
- Clone project to any where you want and go to source folder.
- Edit the config.txt file. Change the secret key, username and password. The username and password will be the login for your site. There is only one user - you.
- Build image:
docker build . -t cs-flash-cards - Run container:
docker run -d -p 8000:8000 --name cs-flash-cards cs-flash-cards - Go your browser and type
http://localhost:8000 - To back up your cards db, run
docker cp cs-flash-cards:/src/cards.db /path/to/save
Happy learning!
Description
Mini website for testing both general CS knowledge and enforce coding practice and common algorithm/data structure memorization.
Languages
HTML
53.6%
Python
35.1%
JavaScript
5%
CSS
5%
Dockerfile
0.8%
Other
0.5%