This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SmartCropper: | |
"""Smart cropper that uses a saliency map to determine the most interesting point in an image.""" | |
def __init__(self): | |
# Initialize the saliency detector (using the spectral residual method) | |
try: | |
self.saliency = cv2.saliency.StaticSaliencySpectralResidual_create() | |
except AttributeError: | |
print("run `pip install opencv_contrib_python`") | |
raise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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} }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------ | |
# ATtiny13 | |
#------------------------------------------------------------ | |
part | |
id = "t13"; | |
desc = "ATtiny13"; | |
has_debugwire = yes; | |
flash_instr = 0xB4, 0x0E, 0x1E; | |
eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)() |