- https://github.com/topics/spaced-repetition
- https://github.com/ap4y/leaf
- https://github.com/Networks-Learning/memorize (http://learning.mpi-sws.org/memorize/)
- https://github.com/fasiha/ebisu#how-it-works
- https://gist.github.com/fasiha/31ce46c36371ff57fdbc1254af424174
- https://pypi.org/project/django-memorize/
- https://gist.github.com/doctorpangloss/13ab29abd087dc1927475e560f876797
- https://github.com/theq629/fulgurate/blob/master/cards.py
- https://massimmersionapproach.com/table-of-contents/anki/low-key-anki/the-ease-factor-problem/
- https://mochi.cards/
This file contains hidden or 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
| const std = @import("std"); | |
| const warn = std.debug.warn; | |
| pub fn main() !void { | |
| // 1. This works | |
| var buf = try std.Buffer.init(std.debug.global_allocator, ""); | |
| defer buf.deinit(); | |
| try buf.append("hello"); | |
| warn("buffer:\n\t {}", buf); |
This file contains hidden or 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
| import copy | |
| # see: https://stackoverflow.com/questions/13260557/create-new-class-instance-from-class-method | |
| class Animal(object): | |
| request_id = "Original_Animal" | |
| def reproduce(self): | |
| """ | |
| gives birth to new instances of Animal |
This file contains hidden or 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
| import time | |
| import logging | |
| import collections | |
| # Inspired by; https://tersesystems.com/blog/2019/07/28/triggering-diagnostic-logging-on-exception/ | |
| # Also see; https://docs.python.org/3.6/library/logging.handlers.html#logging.handlers.MemoryHandler | |
| # Also see; https://github.com/komuw/naz/blob/e0666550396400f86b9a547932bb9075c520a5d9/naz/log.py#L159-L230 | |
| class BreachHandler(logging.StreamHandler): | |
| """ | |
| Log handler that buffers logs in an in-memory ring buffer until a trigger. |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "runtime" | |
| "strconv" | |
| "strings" | |
| ) | |
| /* |
This file contains hidden or 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
| package main | |
| import "fmt" | |
| // Usage: | |
| // | |
| // func main() { | |
| // defer panicHandler() | |
| // } | |
| // |
This file contains hidden or 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
| package main | |
| import ( | |
| "log" | |
| "math/rand" | |
| "os" | |
| "syscall" | |
| "testing" | |
| "time" |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| "testing" | |
| ) | |
| /* ---------- package ---------- */ | |
| type h struct { |
This file contains hidden or 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
| def sample_anomalous(samples): | |
| """ | |
| Sampling: | |
| - Central limit theorem(Alan Turing) | |
| - 3-sigma rule: In a normal distribution, 99.7% of the values are not anomalous. | |
| Which means you can throw away 99.7% without losing context. | |
| - You may also use 2-sigma(95%) or 1-sigma(68%) | |
| see: | |
| 1. https://youtu.be/inrqE0Grgk0?t=26080 (Emmanuel T Odeke) | |
| 2. https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule |
This file contains hidden or 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
| # gotten from; https://github.com/jetstack/cert-manager/releases/download/v1.3.3/cert-manager.yamlhttps://github.com/jetstack/cert-manager/releases/download/v1.3.3/cert-manager.yaml | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: cert-manager | |
| app.kubernetes.io/component: controller | |
| app.kubernetes.io/instance: cert-manager | |
| app.kubernetes.io/name: cert-manager | |
| name: cert-manager |