Skip to content

Instantly share code, notes, and snippets.

@grandinquisitor
grandinquisitor / anki_algorithm.py
Last active January 12, 2023 04:23 — forked from riceissa/anki_algorithm.py
my current understanding of Anki's spacing algorithm
"""
This is my understanding of the Anki scheduling algorithm, which I mostly
got from watching https://www.youtube.com/watch?v=lz60qTP2Gx0
and https://www.youtube.com/watch?v=1XaJjbCSXT0
and from reading
https://faqs.ankiweb.net/what-spaced-repetition-algorithm.html
There is also https://github.com/dae/anki/blob/master/anki/sched.py but I find
it really hard to understand.
Things I don't bother to implement here: the random fudge factor (that Anki
// composed by TwinkleTwinkie
const Note NOTES[] PROGMEM = {
{851, 1} , {0, 1} , {758, 1} , {0, 1} , {638, 1} , {0, 1} , {638, 1} , {0, 1} ,
{638, 1} , {0, 1} , {638, 1} , {0, 2} , {638, 1} , {638, 1} , {0, 1} , {851, 1} ,
{0, 1} , {758, 1} , {0, 1} , {638, 1} , {0, 1} , {638, 1} , {0, 1} , {638, 1} ,
{0, 1} , {638, 1} , {0, 2} , {638, 1} , {0, 2} , {851, 1} , {0, 1} , {758, 1} ,
{0, 1} , {638, 1} , {0, 1} , {638, 1} , {0, 1} , {638, 1} , {0, 1} , {638, 1} ,
{0, 2} , {638, 1} , {0, 2} , {638, 1} , {0, 1} , {638, 1} , {0, 1} , {676, 1} };
#------------------------------------------------------------
# ATtiny13
#------------------------------------------------------------
part
id = "t13";
desc = "ATtiny13";
has_debugwire = yes;
flash_instr = 0xB4, 0x0E, 0x1E;
eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
@grandinquisitor
grandinquisitor / gist:1691648
Created January 27, 2012 23:50
simplest possible 'search this site' bookmarklet
javascript:(function()%7Bvar%20s;(s=(prompt('search%20within%20'+location.hostname)%7C%7C'').replace(/%5Es+%7Cs+$/g,''))&&(location.href='http://www.google.com/search?q=site:'+location.hostname+'+'+encodeURIComponent(s));%7D)()