├── ..bfg-report └── 2023-01-24 │ └── 15-40-03 │ ├── protected-dirt │ └── .empty │ ├── deleted-files.txt │ ├── cache-stats.txt │ └── object-id-map.old-new.txt ├── .sparkleshare ├── Misc.apkg ├── Analysis.apkg ├── K Theory.apkg ├── Vocabulary.apkg ├── 022 Sheaves.apkg ├── 030 Schemes.apkg ├── 032 Morphisms.apkg ├── 040 Divisors.apkg ├── Math Tricks.apkg ├── NewFlashcards.apkg ├── String Theory.apkg ├── 031 O_X Modules.apkg ├── Grad Math Facts.apkg ├── Lattice Theory.apkg ├── Toric Varieties.apkg ├── 033 Misc Schemes.apkg ├── 800 Looijenga IAS.apkg ├── Algebraic Geometry.apkg ├── Algebraic Topology.apkg ├── Complex Analysis.apkg ├── Complex Surfaces.apkg ├── Griffiths-Harris.apkg ├── Videos Kedlaya NT.apkg ├── 060 Toric Varieties.apkg ├── Arithmetic Geometry.apkg ├── Commutative Algebra.apkg ├── 070 Curves and Surfaces.apkg ├── Beilinson Conjectures.apkg ├── Kodaira Dimension Notes.apkg ├── Notes Kodaira Dimension.apkg ├── 020 Varieties Definitions.apkg ├── 050 Cohomology of Schemes.apkg ├── Galois theory for schemes.apkg ├── Video Birational Geometry.apkg ├── Beauville Complex Surfaces.apkg ├── Geometry and Moduli of K3s.apkg ├── Notes Beilinson Conjectures.apkg ├── Notes Hodge Theory Looijenga.apkg ├── Video Global Homotopy Theory.apkg ├── Algebraic Geometry Definitions.apkg ├── Books Beauville Complex Surfaces.apkg ├── Books Galois theory for schemes.apkg ├── Notes Geometry and Moduli of K3s.apkg ├── Lectures on K3 Surfaces Huybrechts.apkg ├── Lectures on K3 Surfaces Kuybrechts.apkg ├── Alessandra Sarti Topics on K3 surfaces.apkg ├── Videos Class Field Theory Pete Clark.apkg ├── Books Lectures on K3 Surfaces (Huybrechts).apkg ├── Notes Lectures on Etale Cohomology (Litt).apkg ├── Notes Lectures on Etale Cohomology (Milne).apkg ├── Hochschild Cohomology for Algebras (Witherspoon).apkg ├── Basic Structures of Function Field Arithmetic Goss.apkg ├── Books Hochschild Cohomology for Algebras (Witherspoon).apkg ├── A Complete Moduli Space for K3 Surfaces of Degree 2 Shah.apkg ├── COMPACT MODULI OF K3 SURFACES WITH A NONSYMPLECTIC AUTOMORPHISM.apkg ├── STABLE PAIR COMPACTIFICATION OF MODULI OF K3 SURFACES OF DEGREE 2.apkg ├── COXETER DIAGRAMS OF 2-ELEMENTARY K3 SURFACES OF GENUS 0, AND BEYOND.apkg ├── Papers COMPACT MODULI OF K3 SURFACES WITH A NONSYMPLECTIC AUTOMORPHISM.apkg ├── Finite groups of automorphisms of K3 surfaces and the Mathieu group Mukai.apkg ├── styling.txt ├── Finite groups of symplectic automorphisms of K3 surfaces in positive characteristic.apkg ├── Papers Finite groups of symplectic automorphisms of K3 surfaces in positive characteristic.apkg ├── MIRROR SYMMETRIC COMPACTIFICATIONS OF MODULI SPACES OF K3 SURFACES WITH A NONSYMPLECTIC INVOLUTION.apkg ├── Dolgachev-Keum '04. Finite groups of symplectic automorphisms of K3 surfaces in positive characteristic .apkg ├── SparkleShare.txt ├── front_template.txt ├── back_template.txt ├── README.md └── ankdown.py /..bfg-report/2023-01-24/15-40-03/protected-dirt/.empty: -------------------------------------------------------------------------------- 1 | I'm a folder! -------------------------------------------------------------------------------- /.sparkleshare: -------------------------------------------------------------------------------- 1 | b25544a9243a5cf5159b8b05b45bfd310d9d1d2079b302e6f1e6faaa43212baa -------------------------------------------------------------------------------- /Misc.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Misc.apkg -------------------------------------------------------------------------------- /Analysis.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Analysis.apkg -------------------------------------------------------------------------------- /K Theory.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/K Theory.apkg -------------------------------------------------------------------------------- /Vocabulary.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Vocabulary.apkg -------------------------------------------------------------------------------- /022 Sheaves.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/022 Sheaves.apkg -------------------------------------------------------------------------------- /030 Schemes.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/030 Schemes.apkg -------------------------------------------------------------------------------- /032 Morphisms.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/032 Morphisms.apkg -------------------------------------------------------------------------------- /040 Divisors.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/040 Divisors.apkg -------------------------------------------------------------------------------- /Math Tricks.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Math Tricks.apkg -------------------------------------------------------------------------------- /NewFlashcards.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/NewFlashcards.apkg -------------------------------------------------------------------------------- /String Theory.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/String Theory.apkg -------------------------------------------------------------------------------- /031 O_X Modules.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/031 O_X Modules.apkg -------------------------------------------------------------------------------- /Grad Math Facts.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Grad Math Facts.apkg -------------------------------------------------------------------------------- /Lattice Theory.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Lattice Theory.apkg -------------------------------------------------------------------------------- /Toric Varieties.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Toric Varieties.apkg -------------------------------------------------------------------------------- /033 Misc Schemes.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/033 Misc Schemes.apkg -------------------------------------------------------------------------------- /800 Looijenga IAS.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/800 Looijenga IAS.apkg -------------------------------------------------------------------------------- /Algebraic Geometry.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Algebraic Geometry.apkg -------------------------------------------------------------------------------- /Algebraic Topology.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Algebraic Topology.apkg -------------------------------------------------------------------------------- /Complex Analysis.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Complex Analysis.apkg -------------------------------------------------------------------------------- /Complex Surfaces.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Complex Surfaces.apkg -------------------------------------------------------------------------------- /Griffiths-Harris.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Griffiths-Harris.apkg -------------------------------------------------------------------------------- /Videos Kedlaya NT.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Videos Kedlaya NT.apkg -------------------------------------------------------------------------------- /060 Toric Varieties.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/060 Toric Varieties.apkg -------------------------------------------------------------------------------- /Arithmetic Geometry.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Arithmetic Geometry.apkg -------------------------------------------------------------------------------- /Commutative Algebra.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Commutative Algebra.apkg -------------------------------------------------------------------------------- /070 Curves and Surfaces.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/070 Curves and Surfaces.apkg -------------------------------------------------------------------------------- /Beilinson Conjectures.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Beilinson Conjectures.apkg -------------------------------------------------------------------------------- /Kodaira Dimension Notes.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Kodaira Dimension Notes.apkg -------------------------------------------------------------------------------- /Notes Kodaira Dimension.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Notes Kodaira Dimension.apkg -------------------------------------------------------------------------------- /020 Varieties Definitions.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/020 Varieties Definitions.apkg -------------------------------------------------------------------------------- /050 Cohomology of Schemes.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/050 Cohomology of Schemes.apkg -------------------------------------------------------------------------------- /Galois theory for schemes.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Galois theory for schemes.apkg -------------------------------------------------------------------------------- /Video Birational Geometry.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Video Birational Geometry.apkg -------------------------------------------------------------------------------- /..bfg-report/2023-01-24/15-40-03/deleted-files.txt: -------------------------------------------------------------------------------- 1 | ea81873bf805f3cf8e87d9c373ff5907b49a1807 1430434602 Archived Decks.tar.gz 2 | -------------------------------------------------------------------------------- /Beauville Complex Surfaces.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Beauville Complex Surfaces.apkg -------------------------------------------------------------------------------- /Geometry and Moduli of K3s.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Geometry and Moduli of K3s.apkg -------------------------------------------------------------------------------- /Notes Beilinson Conjectures.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Notes Beilinson Conjectures.apkg -------------------------------------------------------------------------------- /Notes Hodge Theory Looijenga.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Notes Hodge Theory Looijenga.apkg -------------------------------------------------------------------------------- /Video Global Homotopy Theory.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Video Global Homotopy Theory.apkg -------------------------------------------------------------------------------- /Algebraic Geometry Definitions.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Algebraic Geometry Definitions.apkg -------------------------------------------------------------------------------- /Books Beauville Complex Surfaces.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Books Beauville Complex Surfaces.apkg -------------------------------------------------------------------------------- /Books Galois theory for schemes.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Books Galois theory for schemes.apkg -------------------------------------------------------------------------------- /Notes Geometry and Moduli of K3s.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Notes Geometry and Moduli of K3s.apkg -------------------------------------------------------------------------------- /Lectures on K3 Surfaces Huybrechts.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Lectures on K3 Surfaces Huybrechts.apkg -------------------------------------------------------------------------------- /Lectures on K3 Surfaces Kuybrechts.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Lectures on K3 Surfaces Kuybrechts.apkg -------------------------------------------------------------------------------- /Alessandra Sarti Topics on K3 surfaces.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Alessandra Sarti Topics on K3 surfaces.apkg -------------------------------------------------------------------------------- /Videos Class Field Theory Pete Clark.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Videos Class Field Theory Pete Clark.apkg -------------------------------------------------------------------------------- /Books Lectures on K3 Surfaces (Huybrechts).apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Books Lectures on K3 Surfaces (Huybrechts).apkg -------------------------------------------------------------------------------- /Notes Lectures on Etale Cohomology (Litt).apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Notes Lectures on Etale Cohomology (Litt).apkg -------------------------------------------------------------------------------- /Notes Lectures on Etale Cohomology (Milne).apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Notes Lectures on Etale Cohomology (Milne).apkg -------------------------------------------------------------------------------- /Hochschild Cohomology for Algebras (Witherspoon).apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Hochschild Cohomology for Algebras (Witherspoon).apkg -------------------------------------------------------------------------------- /Basic Structures of Function Field Arithmetic Goss.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Basic Structures of Function Field Arithmetic Goss.apkg -------------------------------------------------------------------------------- /Books Hochschild Cohomology for Algebras (Witherspoon).apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Books Hochschild Cohomology for Algebras (Witherspoon).apkg -------------------------------------------------------------------------------- /A Complete Moduli Space for K3 Surfaces of Degree 2 Shah.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/A Complete Moduli Space for K3 Surfaces of Degree 2 Shah.apkg -------------------------------------------------------------------------------- /COMPACT MODULI OF K3 SURFACES WITH A NONSYMPLECTIC AUTOMORPHISM.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/COMPACT MODULI OF K3 SURFACES WITH A NONSYMPLECTIC AUTOMORPHISM.apkg -------------------------------------------------------------------------------- /STABLE PAIR COMPACTIFICATION OF MODULI OF K3 SURFACES OF DEGREE 2.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/STABLE PAIR COMPACTIFICATION OF MODULI OF K3 SURFACES OF DEGREE 2.apkg -------------------------------------------------------------------------------- /COXETER DIAGRAMS OF 2-ELEMENTARY K3 SURFACES OF GENUS 0, AND BEYOND.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/COXETER DIAGRAMS OF 2-ELEMENTARY K3 SURFACES OF GENUS 0, AND BEYOND.apkg -------------------------------------------------------------------------------- /Papers COMPACT MODULI OF K3 SURFACES WITH A NONSYMPLECTIC AUTOMORPHISM.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Papers COMPACT MODULI OF K3 SURFACES WITH A NONSYMPLECTIC AUTOMORPHISM.apkg -------------------------------------------------------------------------------- /Finite groups of automorphisms of K3 surfaces and the Mathieu group Mukai.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Finite groups of automorphisms of K3 surfaces and the Mathieu group Mukai.apkg -------------------------------------------------------------------------------- /styling.txt: -------------------------------------------------------------------------------- 1 | .card { 2 | font-family: 'Crimson Pro', 'Crimson Text', 'Cardo', 'Times', 'serif'; 3 | text-align: center; 4 | color: black; 5 | background-color: white; 6 | font-size: 18pt; 7 | } 8 | -------------------------------------------------------------------------------- /Finite groups of symplectic automorphisms of K3 surfaces in positive characteristic.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Finite groups of symplectic automorphisms of K3 surfaces in positive characteristic.apkg -------------------------------------------------------------------------------- /Papers Finite groups of symplectic automorphisms of K3 surfaces in positive characteristic.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Papers Finite groups of symplectic automorphisms of K3 surfaces in positive characteristic.apkg -------------------------------------------------------------------------------- /MIRROR SYMMETRIC COMPACTIFICATIONS OF MODULI SPACES OF K3 SURFACES WITH A NONSYMPLECTIC INVOLUTION.apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/MIRROR SYMMETRIC COMPACTIFICATIONS OF MODULI SPACES OF K3 SURFACES WITH A NONSYMPLECTIC INVOLUTION.apkg -------------------------------------------------------------------------------- /Dolgachev-Keum '04. Finite groups of symplectic automorphisms of K3 surfaces in positive characteristic .apkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzackgarza/Math-Flashcards/HEAD/Dolgachev-Keum '04. Finite groups of symplectic automorphisms of K3 surfaces in positive characteristic .apkg -------------------------------------------------------------------------------- /SparkleShare.txt: -------------------------------------------------------------------------------- 1 | Congratulations, you've successfully created a SparkleShare repository! 2 | 3 | Any files you add or change in this folder will be automatically synced to 4 | ssh://git@github.com/dzackgarza/Math-Flashcards.git and everyone connected to it. 5 | 6 | SparkleShare is an Open Source software program that helps people collaborate and 7 | share files. If you like what we do, consider buying us a beer: http://www.sparkleshare.org/ 8 | 9 | Have fun! :) 10 | -------------------------------------------------------------------------------- /..bfg-report/2023-01-24/15-40-03/cache-stats.txt: -------------------------------------------------------------------------------- 1 | (apply,CacheStats{hitCount=1638, missCount=1173, loadSuccessCount=1173, loadExceptionCount=0, totalLoadTime=917454269, evictionCount=0}) 2 | (tree,CacheStats{hitCount=2775, missCount=1440, loadSuccessCount=1421, loadExceptionCount=0, totalLoadTime=1140402839, evictionCount=0}) 3 | (commit,CacheStats{hitCount=587, missCount=588, loadSuccessCount=588, loadExceptionCount=0, totalLoadTime=189588443, evictionCount=0}) 4 | (tag,CacheStats{hitCount=0, missCount=0, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=0}) 5 | -------------------------------------------------------------------------------- /front_template.txt: -------------------------------------------------------------------------------- 1 | {{Question}} 2 | 3 | 35 | 45 | -------------------------------------------------------------------------------- /back_template.txt: -------------------------------------------------------------------------------- 1 | {{Question}}
{{Answer}} 2 | 3 | 35 | 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Instructions 2 | 3 | - You'll need a working installation of [Python 3](https://realpython.com/installing-python/) 4 | - (Optional) Install [ankdown](https://github.com/benwr/ankdown). If you have pip, you can just run something like `pip3 install --user ankdown`. 5 | - Alternative: I've included my own modified copy of `ankdown.py` that can just be run directly by either 6 | - Running `chmod +x ankdown.py` and subsequently `ankdown.py ...` 7 | - Running `python3 ./ankdown.py ...` 8 | - As a test, you can try running `ankdown ./ankdown.py -r ./Decks -p ./mathnotes.apkg` 9 | - The '-r' option points it at a directory, which is recursively searches for '.md' files to parse as cards 10 | - The '-p' option tells it to output a '.apkg' file, which can be imported to Anki 11 | - This should generate 'mathnotes.apkg', which you can import into Anki directly: 12 | 13 | ![](figures/image_2020-05-15-22-58-48.png) 14 | 15 | ![](figures/image_2020-05-15-22-59-55.png) 16 | 17 | ![](figures/image_2020-05-15-23-00-17.png) 18 | 19 | - If you now click "Browse" and "Whole Collection" (or the specific new deck) from the left-side panel, you should see a list of cards: 20 | 21 | ![](figures/image_2020-05-15-23-03-30.png) 22 | 23 | ![](figures/image_2020-05-15-23-03-46.png) 24 | 25 | - If you click a card from the list and click "Cards", you should be able to preview the card being rendered in Mathjax: 26 | 27 | ![](figures/image_2020-05-15-23-05-10.png) 28 | 29 | ![](figures/image_2020-05-15-23-05-35.png) 30 | 31 | - To begin studying, from the main screen, just click the deck and "Study Now": 32 | 33 | ![](figures/image_2020-05-15-23-21-40.png) 34 | 35 | 36 | # Notes 37 | 38 | - The general template for new cards is 39 | ``` 40 | Question Field, with inline math $ax+b$ and/or displaymath $$\int_D f(z)$$ 41 | % 42 | Answer Field, with inline math $cx+d$ and/or displaymath $$\sum_{i=1}^N c_n$$ 43 | % 44 | tag1, tag2 45 | ``` 46 | 47 | - See the files under 'Decks' for examples of how to typeset things. Generally basic inline math like `$ax+b$` and display style equations like `$$\int_0^1 f(x)$$` tend to work fine. 48 | - You can use markdown in your cards, including lists. I haven't tested images yet. See [here](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) for general markdown syntax. 49 | 50 | - Everything is rendered with Mathjax, which has only a small subset of Latex functionality. 51 | One nice way to edit cards is to use something like [HackMD](http://hackmd.io) where you can preview the output of all of the cards before actually "compiling" it into Anki deck: 52 | 53 | ![](figures/image_2020-05-15-23-23-30.png) 54 | 55 | - You can add Mathjax macros directly to the card template within Anki, but it's better to modify 'ankdown.py' so that your macros are included whenever a new deck is generated. 56 | 57 | 58 | ## Automating 59 | 60 | - Install the [ankdown Anki plugin](https://ankiweb.net/shared/info/109255569) (Tools->Addons->Get Add-ons, then enter the add-on code) 61 | 62 | ![](figures/image_2020-05-15-23-28-22.png) 63 | 64 | - Restart Anki, navigate back to the Ankdown add-on and click "Config" 65 | - Change the file path for "Ankdown Location" to wherever your installed version is, or the version in this repository. 66 | - Change the file path for "Markdown Deck Library Path" to the "Decks" path in this repository, or wherever you'd like to store yours. 67 | - For example, 68 | ``` 69 | { 70 | "Ankdown Location": "/home/zack/SparkleShare/github.com/Math-Flashcards/ankdown.py", 71 | "Markdown Deck Library Path": "/home/zack/SparkleShare/github.com/Math-Flashcards/Decks" 72 | } 73 | ``` 74 | 75 | - Now pressing F5 or selecting "Tools->Reload Markdown Decks" will automatically re-scan your directory and add any new cards it finds. Cool! 76 | - Note: it's hard to tell if/when this works. My modified ankdown script will attempt to send a push notification to your OS when it updates decks: 77 | 78 | ![](figures/image_2020-05-15-23-40-41.png) 79 | 80 | - To test, just modify any of the files under "Decks", add a new entry, press F5 in Anki, then browse the Deck to see if it appears: 81 | 82 | ![](figures/image_2020-05-15-23-42-51.png) 83 | 84 | ![](figures/image_2020-05-15-23-43-12.png) 85 | 86 | - It's also helpful to create an Ankiweb account and enable syncing -- then you can review your cards on the phone app: 87 | 88 | ![](figures/image_2020-05-15-23-51-35.png) 89 | -------------------------------------------------------------------------------- /..bfg-report/2023-01-24/15-40-03/object-id-map.old-new.txt: -------------------------------------------------------------------------------- 1 | 03ea7582840679a748c751ec0a1f75e6c9fdd2dd 0fc1d2c4b9567ad2ebf778b59d90f59aaf532c12 2 | 05f7d6c67c6e7edb9a9fe72a53a61f8f9436ca1c 4f0c83d12d318f7e6b20c383f900e6494e19c38e 3 | 08888da65df34186a67659f26c584a4eb95bafb2 fbfc4b42dfa82d463c7e47b6ea0a462ceff05f55 4 | 0a58e3aadc879f02c1d12de959c91c6194853b52 045dc04b1e228d4aed57559f13dbc318be8da5a7 5 | 0f5bd5c8dd13c1c528ea8b1a8a8c1a0f3e07d28f a73cd6512b5d1a06b175f525c2d5666a50f00de7 6 | 108bbdb3e6097499b7f2647dace13f21332ad07a 4823ce2002e36355b7fe26283ac416fc985ee0d2 7 | 177aa9d79797791a33c838b7dcdc55d6d16a441e 3d31b571467145b66c5cdedf504103fe44265360 8 | 1b658478131b7f1e797a29b3a4ceba667a08fc47 9a5b3df1fcd80be57429b4a069a934dda9bfc099 9 | 1c201cac4f1b5507d34b108bb456851e0df91150 6f7a902e6c67e191996d56643d43a2fb57c6d7ca 10 | 1feda70310dbd94c354d2fe404ffe5b1b6a7c9ec fc573b9c3e8f9ad57e71ec6f572c4e77438bc10c 11 | 209fa2383af8740b94705025ad92f90085deb353 ac02fd19fae3c6166ad5f95daaf3c540c6c2d517 12 | 21be843f8bdd5249129fc4d1e2e8046daf9a31a5 8bec3313216a882e5fe373666f62931dee5bd1f5 13 | 222570600d1d53c637f3cc081641d5d7041846ca 92b5efb18c5aaa8e7f2ccebbfa89ce118fa9ceff 14 | 26da092f5e86fab06f8a661f3a55350e3473350f 8a3a0d569042346b63757f9654aab41077a0e522 15 | 2b2d274173e6dfc0f53b82ea6d8aa214c7ac9433 62ddc1b5a1499b4b321a53bc709a7e5d31aa5c04 16 | 2f7a5c3241cb6fef07d67a55548dcdb97843b985 cb8f5dbbd6efc8501cfc6c7b77f16be57f75d720 17 | 31bd2b9722ff1bfa66d2dcd82ed8069f0b5bb6cf 71b9bb6926a19dea4179fe18511b1219084ccf70 18 | 38b2f41c503eb83b8a12da85dddc891d29ab2a82 b0b77f693c58cbcac0ea5fee31eddc900af88f05 19 | 39539e515cdaa8ce98dc19918e98027b2de4358e e5241919ac5f7aac03504d62185860177c292b6e 20 | 3ec1ccc68b5c89c84f6d1975942b467c29a6236c e07b9a48bb74b64607f7f0e51551be3f97792554 21 | 3fef510fea6abdc5e6980a7d2f3bdcecf3db0b08 4c33062b6ffe9490541c4e1edbe048acb157531f 22 | 435f4aa6c0287b7ce7659d46325aa1e5f89de6e7 c81f89cec28dd68797768beb5bbdb027dcea0c01 23 | 4ab977ae9db07a070915b236f23e252a0937a4e3 0c34b6c39832a9898c828e9701c40e024159a704 24 | 51bc041479382189606a0a1eaccb6337091d15b3 fb7f317b2afcd861a813ba68266320fae2949fdf 25 | 51fc992755ce839768d19696a71dc81c2d8f22a6 9ca04aa6bf05ad9cad875e30bec0e40900b20b68 26 | 561698554ffddd25bb3044e9fd2e50d8e316ac9a f8e02c5403d4fb750df0dbd824cd3444ec70d8f3 27 | 62d73208262e2b1b2f39b09082e55f9d94abed8a 81cdcce3d231288fa6094de60998366c95d84489 28 | 679707a0e963fffd0cd5a7465ede3c8bf4216858 087ff4ecee9c365d3baa7208b98f83cf0b3d3968 29 | 6d06322ba3039c32a76ec54d47d50bbd960a8ba0 78480d2e4c5e46a03b9fb0357f88464ab47febff 30 | 6db4b42bb0da65644b10796010d8c02a73d5687e b3cfd6d41465623ddd8b70324c8c67739ce581fd 31 | 6eef6c23c281ee8919ca387f6ee599a305a2dc0e 8aeaf4a2d85bae82a75bbf0d23f36418418f397d 32 | 6fba17de4ff9f0b6eefc74eb33cb3891ace10311 ea83a38fe7adb547cc29d6bfcdd8e789c222dade 33 | 719b99a7a9fe87973fdfbe22305aecab2aa8ece6 75461339aaf432e22cdad63aa1ced7f0af504030 34 | 746cb229bee78c7505bce7895565309af3f52f60 cc838e6192c7c22a1494c637a9c4bbacc0fe9374 35 | 7a169f5f424653da3088a175c17c93439733cbe2 3859ac99cb59922cc434866e4f0a54a22d95f2cc 36 | 7b44fede8fb116894a548bf0c196863e24676d94 e44e6e1e9f6554e81b1dc14ea53c09478f68bf3f 37 | 7ce7e81a1a70316b0b513fffd64b931e9eeec586 3da8cbdbda0101feeea0939ee44f261357a6d7ad 38 | 80279f8fc2216c61121a7318bb2cbcb870336053 df0f278cf43a0c58e4a3e98cf441a3ef2ecd624a 39 | 80afda4d4d77697ec83ea6550896582610483d5a cbc3f5e09fca2c5baf1245a9342e0a8483764265 40 | 81ae8b250ef912e8cbedb8ef99247fa625f68716 443a7a36447d0937385888239c1e3f45e1458c02 41 | 8410febc32eca86fbb941cabc205235e36784bb6 7bc8958af6ac7a022c871534dfa6b9bd920b6ea1 42 | 876d408ae024a458bbb0c698237be5b5c27b9efe 3c58b740a64f8b9309717386b93b828335aa5e81 43 | 88b3ae7a78e49efed094683bdf5a63ff2e4d8c61 b1fa175c63372de89824e2750b6e3f19a237f2e4 44 | 8ae81b5dc15e4bcfe5fe719e9607bae9cdacf39c 6a0d54f80b635bb49d8483867353b9349e9dfd2e 45 | 91e819bc490e9e3ccf832b9473296921e18b8113 58a3165c0cb0e1dc8ee8b821814197f59bce8951 46 | 9ad4ae6478d5f0f028100d785da89360171d4462 25527ffe205245e635bc3a0d29583ccc4eaacdc7 47 | 9b8bbf6b08856668ae50e758ca271b3c1aeb9484 5ece73af8ca4e0035e1f1fac75acb2c366c01ac0 48 | 9f317d062f419c2d4867cbf279f7c89db39b8b22 e56cf865e413cc35d9a17e74d41ea78aa5a3cfc4 49 | a21e9cdc27ac371b6e0658111feb65ea79c2b0db 74fb9bea1675f1daf0f0167e13b7d9deada72449 50 | a3357bbb72248c2e610d35318ddfe1d658cdf23d 3486281fb5bace332030026ed3b068f70139c619 51 | a48211b2446e5c89ff0e4d26252d4d95ccbcb045 b5d9a3d55eb37fbf1cfae44263c42496f579c552 52 | a55407f3a7d5e247ab61c5aeb1dfca457d236edc 79978a0cda10d99e70266b9e1d8655c2c14b2602 53 | a5e17f89918d9b80c26c9289d82956e6db395cbe 122f0fc3b7a19d77f0ebed274fa7cc9fd79ebbbb 54 | a78bd8b5ecee04311fa83388ca75639b062eae05 098225cd50d56aebf03646ea434bcd392630b2bf 55 | a7d6527c571233eb53eaad408c667afc8cda0142 6a345591197d9d30f21c17e9556280c95633d104 56 | a93a1c375caba14b5af220670fe070b360146cbf e8a3b8a084c99f894736ebe2a3449b97e19417bf 57 | a995ffb9ae43fe3bdd3a654cda838174a6c23514 22c301a5220f123f1ba12d250dea681d014dc67e 58 | ac3a2c7cf902a5a9e85805e0f42ed40e22f8e394 6e4487424b78d0dbdfe38f52c3995157bbc1369a 59 | b2ee84fb5737a44a2c2989c4451c38b75f02cebf 0325ec2aeafd415f691ae741e87e900daa7591a4 60 | b7594659cbdacafbc94ba29c3d9a5b689bfb952a bd238b0c83e69cde023d9db9a2ddca8c25c4b6e0 61 | b7b879d360940b8e415059b3c325134ffbea220e e14d4f28e1f72d9780e3cf5bb79d66e8f4f136c0 62 | b8bc18a03e5c7ffaacab2e610b8a4f519cb965b1 0dd79ad331ede3ea41c01c5f69c972958dfdddab 63 | b941e6f52f4749986372835e09db12ac5f14a1fc 4eda9b8ac98470d3ecac093f6667d938d9d4d3b6 64 | b9732480498cdd36849dab90b815b92b27ab9874 d91f6a95577bd6b95fb4400d38d7bf2fb68b663c 65 | bd3355bf91b8f5fa03225cae26cfb1a6066b27af 6cdd10eb9eecad9bc2f0bbb93592e9631ab45929 66 | be95bfa2025694f0a54a8e1ce12bc1fc8727f5a3 bc221d85db5cee8cfc0a47951d1f38ffcaebafba 67 | c214bf70de2c677cb3e1a43faaa275e73935cc76 850fafeec345071fb4478970f2ea8d742ce06a69 68 | c2cf207fa0c92621def08d952f20303a7dc783d9 ba6dd83027d2613818daec3cec275f52f3467238 69 | c3b727a9d308c1d88dc21131646b670bfb10dd06 965a4bdcc999c66370dae0549521d78aa65b3dec 70 | c79e1f17a25ccf9fa67a7886ec7915d278182c95 5bc357c1d5cd8ee31ada83a64e6b0ad2e94c6b94 71 | c858da969b3becd0385245abea44e51751776aa5 d0b7c5327455eb56d2f7e7a6380f2384938c5479 72 | c8d74011c550ee8305254783af63f7c4972146c7 eab3cb6df55be63470836d3f8e315ce8deafcd2c 73 | ca6c49d43c285c3e139d463c8e181af67f05ec71 20838b1c84b39870136be7424f6564669985f7db 74 | caabd10b8cf9251e6fc88ffc75b6579c1a630e68 fa599fe0a09fee9de54e90ef6be71b2601983c85 75 | cb8c6b71ddbc228ea17b7a25564cb7b3f475b48c d85570eae45799e5fb8b17f8b1dc1698b7bf5c68 76 | cc618407ecae284f673391c12a94f934630597fc daba940408d12663c8023cfa2fc11c13fef6fa31 77 | d5e2bb0be084d78ac3b27050b594d65db9d0fc97 7664625e685f88a84235b567105147cc162f9892 78 | d9574a042a08e420c13012fd6eb37865026efe2f 38f8fc508b963ba223c6e85c43fcb4ed0b95f332 79 | dc2c962dd4751fca1a2d2dbc0631e59a9a5d1b9d 9f815b0bb53871c9b9c2fad863cc41f69d897fb6 80 | dc6a8c618c8ab8140db56353b3732e0149168e88 6b17e47883cef4c8a2e83381a96a3b81def219c8 81 | dee6660fed8779c2a5d3f282c015577e21c4db02 43aa69fcb49fee0443419f4fa3b71d17d9bae532 82 | df61f6ef37ddb6789446e71c47e45dfe9805cddc ee1e76506caaa36b7260a68e83fbbb2b374dfa13 83 | e2be6b93a9d6b01b910380c87677a3d61f977087 af9cd54176fa096965038c0365cb728baac88b34 84 | e79f345d99f2dd3ce6de128c60114621461e8548 9de29518d0da7aa6a44d032eb363a8f14c9aad84 85 | ebcb58125797dc619bcd85995ed7acc2115c29b1 9179e2506be290041e78559af183853da0b97ba2 86 | ec0d76baffc48976c8646d8b7d977ca0c378867d d50c5275f60863a6616c5c4a5f1cae2ade58d769 87 | ec92aba04383cba22fccc6a3eca31d9c580c9624 5cfce5bef35db63c7644a084609212ca676df30d 88 | ed8ec381fd720e79e598553a8e9e415b1d05e2a0 e627569edbcba7cd0ef96cd0a4130bbd141dcf37 89 | f88736c33c9dd9cd44af33dc5a0e82109d559ec9 b2e135e15673210cb3047023bdc1b5df71487f68 90 | fd525fcfe60b041c5c8571df00f2e263ee9aca72 19e6f0647f219bff3421eb9ddf9ca71fcda21b38 91 | fdb93ea71363fa78efd92172445f461cc0155cd9 f4083e686890404b75bdd4f9f15ea1edea419e5f 92 | fe92a23b60aca9d11af0c0b938aee7c1fe4ddb24 4de4e328eaa12f68c0c1fcfc3011f160031e0036 93 | -------------------------------------------------------------------------------- /ankdown.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Ankdown: Convert Markdown files into anki decks. 3 | 4 | This is a hacky script that I wrote because I wanted to use 5 | aesthetically pleasing editing tools to make anki cards, instead of 6 | the (somewhat annoying, imo) card editor in the anki desktop app. 7 | 8 | The math support is via MathJax, which is more full-featured (and 9 | much prettier) than Anki's builtin LaTeX support. 10 | 11 | The markdown inputs should look like this: 12 | 13 | ``` 14 | First Card Front ![alt_text](local_image.png) 15 | 16 | % 17 | 18 | First Card Back: \\(\\text{TeX inline math}\\) 19 | 20 | % 21 | 22 | first, card, tags 23 | 24 | --- 25 | 26 | Second Card Front: 27 | 28 | \\[\\text{TeX Math environment}\\] 29 | 30 | % 31 | 32 | Second Card Back (note that tags are optional) 33 | ``` 34 | 35 | Ankdown can be configured via yaml. A possible configuration file might look like this: 36 | 37 | ```yaml 38 | recur_dir: ~/ankdown_cards 39 | pkg_arg: ~/ankdown_cards.apkg 40 | card_model_name: CustomModelName 41 | card_model_css: ".card {font-family: 'Crimson Pro', 'Crimson Text', 'Cardo', 'Times', 'serif'; text-align: left; color: black; background-color: white;}" 42 | dollar: True 43 | ``` 44 | 45 | A configuration can also be passed as a string: `"{dollar: True, card_model_name: CustomModelName, card_model_css: \".card {text-align: left;}\"}"` 46 | 47 | Usage: 48 | ankdown.py [-r DIR] [-p PACKAGENAME] [--highlight] [--config CONFIG_STRING] [--configFile CONFIG_FILE_PATH] 49 | 50 | Options: 51 | -h --help Show this help message 52 | --version Show version 53 | 54 | -r DIR Recursively visit DIR, accumulating cards from `.md` files. 55 | 56 | -p PACKAGE Instead of a .txt file, produce a .apkg file. recommended. 57 | 58 | --highlight Enable syntax highlighting for code 59 | 60 | --config CONFIG_STRING ankdown configuration as YAML string 61 | 62 | --configFile CONFIG_FILE_PATH path to ankdown configuration as YAML file 63 | """ 64 | 65 | 66 | import hashlib 67 | import os 68 | import re 69 | import tempfile 70 | import textwrap 71 | 72 | from shutil import copyfile 73 | 74 | import misaka 75 | import genanki 76 | import yaml 77 | 78 | from docopt import docopt 79 | 80 | import houdini as h 81 | from pygments import highlight 82 | from pygments.formatters import HtmlFormatter, ClassNotFound 83 | from pygments.lexers import get_lexer_by_name 84 | 85 | 86 | class HighlighterRenderer(misaka.HtmlRenderer): 87 | def blockcode(self, text, lang): 88 | try: 89 | lexer = get_lexer_by_name(lang, stripall=True) 90 | except ClassNotFound: 91 | lexer = None 92 | 93 | if lexer: 94 | formatter = HtmlFormatter() 95 | return highlight(text, lexer, formatter) 96 | # default 97 | return '\n
{}
\n'.format( 98 | h.escape_html(text.strip())) 99 | 100 | 101 | renderer = HighlighterRenderer() 102 | highlight_markdown = misaka.Markdown(renderer, extensions=("fenced-code", "math")) 103 | 104 | 105 | VERSION = "0.7.1" 106 | 107 | # Anki 2.1 has mathjax built in, but ankidroid and other clients don't. 108 | CARD_MATHJAX_CONTENT = textwrap.dedent(r""" 109 | 250 | 260 | """) 261 | 262 | CONFIG = { 263 | 'pkg_arg': 'AnkdownPkg.apkg', 264 | 'recur_dir': '.', 265 | 'dollar': False, 266 | 'highlight': False, 267 | 'card_model_name': 'Custom Ankdown Model', 268 | 'card_model_css': """ 269 | .card { 270 | font-family: 'Crimson Pro', 'Crimson Text', 'Cardo', 'Times', 'serif'; 271 | text-align: left; 272 | color: black; 273 | background-color: white; 274 | font-size: 18pt; 275 | } 276 | """, 277 | 'card_model_fields': [ 278 | {"name": "Question"}, 279 | {"name": "Answer"}, 280 | {"name": "Tags"}, 281 | ], 282 | 'card_model_templates': [ 283 | { 284 | "name": "Ankdown Card", 285 | "qfmt": "{{{{Question}}}}\n{0}".format(CARD_MATHJAX_CONTENT), 286 | "afmt": "{{{{Question}}}}
{{{{Answer}}}}\n{0}".format(CARD_MATHJAX_CONTENT), 287 | } 288 | ] 289 | } 290 | 291 | 292 | def simple_hash(text): 293 | """MD5 of text, mod 2^63. Probably not a great hash function.""" 294 | h = hashlib.md5() 295 | h.update(text.encode("utf-8")) 296 | return int(h.hexdigest(), 16) % (1 << 63) 297 | 298 | 299 | class Card(object): 300 | """A single anki card.""" 301 | 302 | def __init__(self, filename, file_index): 303 | self.fields = [] 304 | self.filename = filename 305 | self.file_index = file_index 306 | self.model = genanki.Model( 307 | simple_hash(CONFIG['card_model_name']), 308 | CONFIG['card_model_name'], 309 | fields=CONFIG['card_model_fields'], 310 | templates=CONFIG['card_model_templates'], 311 | css=CONFIG['card_model_css'] 312 | ) 313 | 314 | def deckdir(self): 315 | return os.path.dirname(self.filename) 316 | 317 | def deckname(self): 318 | return os.path.basename(self.deckdir()) 319 | 320 | def basename(self): 321 | return os.path.basename(self.filename) 322 | 323 | def card_id(self): 324 | return "{}/{}{}".format(self.deckname(), self.basename(), self.file_index) 325 | 326 | def add_field(self, field): 327 | self.fields.append(field) 328 | 329 | def has_data(self): 330 | return len(self.fields) > 0 and any([s.strip() for s in self.fields]) 331 | 332 | def has_front_and_back(self): 333 | return len(self.fields) >= 2 334 | 335 | def finalize(self): 336 | """Ensure proper shape, for extraction into result formats.""" 337 | if len(self.fields) > 3: 338 | self.fields = self.fields[:3] 339 | else: 340 | while len(self.fields) < 3: 341 | self.fields.append('') 342 | 343 | def guid(self): 344 | return simple_hash(self.card_id()) 345 | 346 | def to_genanki_note(self): 347 | """Produce a genanki.Note with the specified guid.""" 348 | return genanki.Note(model=self.model, fields=self.fields, guid=self.guid()) 349 | 350 | def make_ref_pair(self, filename): 351 | """Take a filename relative to the card, and make it absolute.""" 352 | newname = '%'.join(filename.split(os.sep)) 353 | 354 | if os.path.isabs(filename): 355 | abspath = filename 356 | else: 357 | abspath = os.path.normpath(os.path.join(self.deckdir(), filename)) 358 | return (abspath, newname) 359 | 360 | def determine_media_references(self): 361 | """Find all media references in a card""" 362 | for i, field in enumerate(self.fields): 363 | current_stage = field 364 | for regex in [r'src="([^"]*?)"']: # TODO not sure how this should work:, r'\[sound:(.*?)\]']: 365 | results = [] 366 | 367 | def process_match(m): 368 | initial_contents = m.group(1) 369 | abspath, newpath = self.make_ref_pair(initial_contents) 370 | results.append((abspath, newpath)) 371 | return r'src="' + newpath + '"' 372 | 373 | current_stage = re.sub(regex, process_match, current_stage) 374 | 375 | for r in results: 376 | yield r 377 | 378 | # Anki seems to hate alt tags :( 379 | self.fields[i] = re.sub(r'alt="[^"]*?"', '', current_stage) 380 | 381 | 382 | class DeckCollection(dict): 383 | """Defaultdict for decks, but with stored name.""" 384 | def __getitem__(self, deckname): 385 | if deckname not in self: 386 | deck_id = simple_hash(deckname) 387 | self[deckname] = genanki.Deck(deck_id, deckname) 388 | return super(DeckCollection, self).__getitem__(deckname) 389 | 390 | 391 | def field_to_html(field): 392 | """Need to extract the math in brackets so that it doesn't get markdowned. 393 | If math is separated with dollar sign it is converted to brackets.""" 394 | if CONFIG['dollar']: 395 | for (sep, (op, cl)) in [("$$", (r"\\[", r"\\]")), ("$", (r"\\(", r"\\)"))]: 396 | escaped_sep = sep.replace(r"$", r"\$") 397 | # ignore escaped dollar signs when splitting the field 398 | field = re.split(r"(?