Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patarapolw/jupyter-flashcard
Create a database of Jupyter Notebooks and convert them into flashcards.
https://github.com/patarapolw/jupyter-flashcard
jupyter-notebook
Last synced: 11 days ago
JSON representation
Create a database of Jupyter Notebooks and convert them into flashcards.
- Host: GitHub
- URL: https://github.com/patarapolw/jupyter-flashcard
- Owner: patarapolw
- Created: 2018-09-29T05:03:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-29T05:23:23.000Z (over 6 years ago)
- Last Synced: 2024-12-17T07:48:57.472Z (2 months ago)
- Topics: jupyter-notebook
- Language: Python
- Size: 1.43 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jupyter-flashcard
Create a database of Jupyter Notebooks and convert them into flashcards.
## Installation
- Clone the project from GitHub
- Navigate to the project folder and `poetry install`
- Run a Python script:```python
from jupyter_flashcard import JupyterFlashcardJupyterFlashcard().init(PATH_TO_THE_FOLDER_CONTAINING_JUPYTER_FILES)
```By default, it uses PostGRESQL of the database named `jupyter-flashcard`, so you have to initialize the database first, before running the script, but you can also use SQLite by specifying:
```python
JupyterFlashcard(engine='sqlite:///PATH_TO_SQLITE_DATABASE')
```## Jupyter Notebooks to import's format
- Front side of the flashcard:
- Begins with `#`
- Back side of the flashcard:
- All cells behind the front side of the card, until the next `#`## Quizzing
In a new Jupyter Notebook:
```python
>>> from jupyter_flashcard import JupyterFlashcard
>>> jfc = JupyterFlashcard()
>>> iter_fc = jfc.iter_quiz()
>>> fc = next(iter_fc)
>>> fc
'Front side of the flashcard is shown.'
>>> fc.show()
'Back side of the flashcard is shown.'
>>> fc.wrong()
'Mark the flashcard as wrong.'
>>> fc.right()
'Mark the flashcard as right.'
>>> fc.mark()
'Add the tag "marked" to the flashcard.'
```If you want to quiz only on **"marked"** flashcards, use:
```python
>>> iter_fc = jfc.iter_quiz(tags=['marked'])
```## Screenshots


## Related Projects
- [ImServ](https://github.com/patarapolw/ImServ) - Spin an image server, store images from Clipboard in single place, and prevent duplication. This can be useful for using in Jupyter Notebook (with having to store images as HEX).