mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -05:00
* start of load balancer * add configuration options; option to load balance per deck * formatting * clippy * add myself to contributors * cleanup * cargo fmt * copyright header on load_balancer.rs * remove extra space * more formatting * python formatting * ignore this being None only doing this cause python has awful lambdas and can't loop in a meaningful way without doing this * only calculate notes on each day if we are trying to avoid siblings * don't fuzz intervals if the load balancer is enabled * force generator to eval so this actually happens * load balance instead of fuzzing, rather than in addition to * use builtin fuzz_bounds rather than reinvent something new * print some debug info on how its load balancing * clippy * more accurately load balance only when we want to fuzz * incorrectly doublechecking the presence of the load balancer * more printfs for debugging * avoid siblings -> disperse siblings * load balance learning graduating intervals * load balancer: respect min/max intervals; graduating easy should be at least +1 good * filter out after-days under minimum interval * this is an inclusive check * switch load balancer to caching instead of on the fly calculation * handle case where load balancer would balance outside of its bounds * disable lb when unselecting it in preferences * call load_balancer in StateContext::with_review_fuzz instead of next to * rebuild load balancer when card queue is rebuilt * remove now-unused configuration options * add note option to notetype to enable/disable sibling dispersion * add options to exclude decks from load balancing * theres a lint checking that the link actually exists so I guess I'll add the anchor back in later? * how did I even update this * move load balancer to cardqueue * remove per-deck balancing options * improve determining whether to disperse siblings when load balancing * don't recalculate notes on days every time * remove debug code * remove all configuration; load balancer enabled by default; disperse siblings if bury_reviews is set * didn't fully remove caring about decks from load balancer sql query * load balancer should only count cards in the same preset * fuzz interval if its outside of load balancer's range * also check minimum when bailing out of load balancer * cleanup; make tests happy * experimental weight-based load balance fuzzing * take into account interval when weighting as it seems to help * if theres no cards the interval weight is just 1.0 * make load balancer disableable through debug console * remove debug prints * typo * remove debugging print * explain a bit how load balancer works * properly balance per preset * use inclusive range rather than +1 * -1 type cast * move type hint somewhere less ugly; fix comment typo * Reuse existing deck list from parent function (dae) Minor optimisation
220 lines
8.9 KiB
Text
220 lines
8.9 KiB
Text
If you have made changes to Anki's AGPL code, you are welcome to distribute
|
|
the changed code under the AGPL license.
|
|
|
|
If you would like to contribute your code back to the official release, we ask
|
|
that you license your contributions under the BSD 3 clause license. Portions
|
|
of the code are also used in AnkiWeb and AnkiMobile, and accepting
|
|
contributions under an AGPL license would mean we could no longer use the code
|
|
we have written in those projects.
|
|
|
|
In your first pull request, please add your name below. By adding your name to
|
|
this file, you assert that any code you contribute to the Anki project is
|
|
licensed under the BSD 3 clause license. If any pull request you make contains
|
|
code that you don't own the copyright to, you agree to make that clear when
|
|
submitting the request.
|
|
|
|
When submitting a pull request, GitHub Actions will check that the Git email you
|
|
are submitting from matches the one you used to edit this file. A common issue
|
|
is adding yourself to this file using the username on your computer, but then
|
|
using GitHub to rebase or edit a pull request online. This will result in your
|
|
Git email becoming something like user@noreply.github.com. To prevent the
|
|
automatic check from failing, you can edit this file again using GitHub's online
|
|
editor, making a trivial edit like adding a space after your name, and then pull
|
|
requests will work regardless of whether you create them using your computer or
|
|
GitHub's online interface.
|
|
|
|
For users who previously confirmed the license of their contributions on the
|
|
support site, it would be great if you could add your name below as well.
|
|
|
|
********************
|
|
|
|
AMBOSS MD Inc. <https://www.amboss.com/>
|
|
Aristotelis P. <https://glutanimate.com/contact>
|
|
Erez Volk <erez.volk@gmail.com>
|
|
zjosua <zjosua@hotmail.com>
|
|
Arthur Milchior <arthur@milchior.fr>
|
|
Yngve Hoiseth <yngve@hoiseth.net>
|
|
Ijgnd
|
|
Yoonchae Lee <bluegreenmagick@gmail.com>
|
|
Evandro Coan <github.com/evandrocoan>
|
|
Alan Du <alanhdu@gmail.com>
|
|
Yuchen Lei <lyc@xuming.studio>
|
|
Henry Tang <hktang@ualberta.ca>
|
|
Simone Gaiarin <simgunz@gmail.com>
|
|
Rai (Michal Pokorny) <agentydragon@gmail.com>
|
|
Zeno Gantner <zeno.gantner@gmail.com>
|
|
Henrik Giesel <hengiesel@gmail.com>
|
|
Michał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
|
|
Sander Santema <github.com/sandersantema/>
|
|
Thomas Brownback <https://github.com/brownbat/>
|
|
Andrew Gaul <andrew@gaul.org>
|
|
kenden
|
|
Nickolay Yudin <kelciour@gmail.com>
|
|
neitrinoweb <github.com/neitrinoweb/>
|
|
Andreas Reis <github.com/nwwt>
|
|
Matt Krump <github.com/mkrump>
|
|
Alexander Presnyakov <flagist0@gmail.com>
|
|
Abdo <github.com/abdnh>
|
|
aplaice <plaice.adam+github@gmail.com>
|
|
phwoo <github.com/phwoo>
|
|
Soren Bjornstad <anki@sorenbjornstad.com>
|
|
Aleksa Sarai <cyphar@cyphar.com>
|
|
Jakub Kaczmarzyk <jakub.kaczmarzyk@gmail.com>
|
|
Akshara Balachandra <akshara.bala.18@gmail.com>
|
|
lukkea <github.com/lukkea/>
|
|
David Allison <davidallisongithub@gmail.com>
|
|
Tsung-Han Yu <johan456789@gmail.com>
|
|
Piotr Kubowicz <piotr.kubowicz@gmail.com>
|
|
RumovZ <gp5glkw78@relay.firefox.com>
|
|
Cecini <github.com/cecini>
|
|
Krish Shah <github.com/k12ish>
|
|
ianki <iankigit@gmail.com>
|
|
rye761 <ryebread761@gmail.com>
|
|
Guillem Palau Salvà <guillempalausalva@gmail.com>
|
|
Meredith Derecho <meredithderecho@gmail.com>
|
|
Daniel Wallgren <github.com/wallgrenen>
|
|
Kerrick Staley <kerrick@kerrickstaley.com>
|
|
Maksim Abramchuk <maximabramchuck@gmail.com>
|
|
Benjamin Kulnik <benjamin.kulnik@student.tuwien.ac.at>
|
|
Shaun Ren <shaun.ren@linux.com>
|
|
Ryan Greenblatt <greenblattryan@gmail.com>
|
|
Matthias Metelka <github.com/kleinerpirat>
|
|
qubist-pixel-ux <github.com/qubist-pixel-ux>
|
|
cherryblossom <github.com/cherryblossom000>
|
|
Hikaru Yoshiga <github.com/hikaru-y/>
|
|
Thore Tyborski <github.com/ThoreBor>
|
|
Alexander Giorev <alex.giorev@gmail.com>
|
|
Ren Tatsumoto <tatsu@autistici.org>
|
|
lolilolicon <lolilolicon@gmail.com>
|
|
Gesa Stupperich <gesa.stupperich@gmail.com>
|
|
git9527 <github.com/git9527>
|
|
Vova Selin <vselin12@gmail.com>
|
|
qxo <49526356@qq.com>
|
|
Spooghetti420 <github.com/spooghetti420>
|
|
Danish Prakash <github.com/danishprakash>
|
|
Araceli Yanez <github.com/aracelix>
|
|
Sam Bradshaw <samjr.bradshaw@gmail.com>
|
|
gnnoh <gerongfenh@gmail.com>
|
|
Sachin Govind <sachin.govind.too@gmail.com>
|
|
Bruce Harris <github.com/bruceharris>
|
|
Patric Cunha <patricc@agap2.pt>
|
|
Brayan Oliveira <github.com/BrayanDSO>
|
|
Luka Warren <github.com/lukawarren>
|
|
wisherhxl <wisherhxl@gmail.com>
|
|
dobefore <1432338032@qq.com>
|
|
Bart Louwers <bart.git@emeel.net>
|
|
Sam Penny <github.com/sam1penny>
|
|
Yutsuten <mateus.etto@gmail.com>
|
|
Zoom <zoomrmc+git@gmail.com>
|
|
TRIAEIOU <github.com/TRIAEIOU>
|
|
Stefan Kangas <stefankangas@gmail.com>
|
|
Fabricio Duarte <fabricio.duarte.jr@gmail.com>
|
|
Mani <github.com/krmanik>
|
|
Kaben Nanlohy <kaben.nanlohy@gmail.com>
|
|
Tobias Predel <tobias.predel@gmail.com>
|
|
Daniel Tang <danielzgtg.opensource@gmail.com>
|
|
Jack Pearson <github.com/jrpear>
|
|
yellowjello <github.com/yellowjello>
|
|
Ingemar Berg <github.com/ingemarberg>
|
|
Ben Kerman <ben@kermanic.org>
|
|
Euan Kemp <euank@euank.com>
|
|
Kieran Black <kieranlblack@gmail.com>
|
|
XeR <github.com/XeR>
|
|
mgrottenthaler <github.com/mgrottenthaler>
|
|
Austin Siew <github.com/Aquafina-water-bottle>
|
|
Joel Koen <mail@joelkoen.com>
|
|
Christopher Woggon <christopher.woggon@gmail.com>
|
|
Kavel Rao <github.com/kavelrao>
|
|
Ben Yip <github.com/bennyyip>
|
|
mmjang <752515918@qq.com>
|
|
shunlog <github.com/shunlog>
|
|
3ter <github.com/3ter>
|
|
Derek Dang <github.com/derekdang/>
|
|
Luc Mcgrady <github.com/Luc-Mcgrady>
|
|
Kehinde Adeleke <adelekekehinde06@gmail.com>
|
|
Marko Juhanne <github.com/mjuhanne>
|
|
Gabriel Heinatz <anorot@gmail.com>
|
|
Monty Evans <montyevans@gmail.com>
|
|
Nil Admirari <https://github.com/nihil-admirari>
|
|
Michael Winkworth <github.com/SteelColossus>
|
|
Mateusz Wojewoda <kawa1.11@o2.pl>
|
|
Jarrett Ye <jarrett.ye@outlook.com>
|
|
Sam Waechter <github.com/swektr>
|
|
Michael Eliachevitch <m.eliachevitch@posteo.de>
|
|
Carlo Quick <https://github.com/CarloQuick>
|
|
Dominique Martinet <asmadeus@codewreck.org>
|
|
chandraiyengar <github.com/chandraiyengar>
|
|
user1823 <92206575+user1823@users.noreply.github.com>
|
|
Gustaf Carefall <https://github.com/Gustaf-C>
|
|
virinci <github.com/virinci>
|
|
snowtimeglass <snowtimeglass@gmail.com>
|
|
brishtibheja <sorata225yume@gmail.com>
|
|
Ben Olson <github.com/grepgrok>
|
|
Akash Reddy <akashreddy2003@gmail.com>
|
|
Lucio Sauer <watermanpaint@posteo.net>
|
|
Gustavo Sales <gustavosmendes14@gmail.com>
|
|
Shawn M Moore <https://github.com/sartak>
|
|
Marko Sisovic <msisovic13@gmail.com>
|
|
Viktor Ricci <ricci@primateer.de>
|
|
Harvey Randall <harveyrandall2001@gmail.com>
|
|
Pedro Lameiras <pedrolameiras@tecnico.ulisboa.pt>
|
|
Kai Knoblich <kai@FreeBSD.org>
|
|
Lucas Scharenbroch <lucasscharenbroch@gmail.com>
|
|
Antonio Cavallo <a.cavallo@cavallinux.eu>
|
|
Han Yeong-woo <han@yeongwoo.dev>
|
|
Jean Khawand <jk@jeankhawand.com>
|
|
Pedro Schreiber <schreiber.mmb@gmail.com>
|
|
Foxy_null <https://github.com/Foxy-null>
|
|
Arbyste <arbyste@outlook.com>
|
|
Vasll <github.com/vasll>
|
|
laalsaas <laalsaas@systemli.org>
|
|
ijqq <ijqq@protonmail.ch>
|
|
AntoineQ1 <https://github.com/AntoineQ1>
|
|
jthulhu <https://github.com/jthulhu>
|
|
Escape0707 <tothesong@gmail.com>
|
|
Loudwig <https://github.com/Loudwig>
|
|
Wu Yi-Wei <https://github.com/Ianwu0812>
|
|
RRomeroJr <117.rromero@gmail.com>
|
|
Xidorn Quan <me@upsuper.org>
|
|
Alexander Bocken <alexander@bocken.org>
|
|
James Elmore <email@jameselmore.org>
|
|
Ian Samir Yep Manzano <https://github.com/isym444>
|
|
David Culley <6276049+davidculley@users.noreply.github.com>
|
|
Rastislav Kish <rastislav.kish@protonmail.com>
|
|
jake <jake@sharnoth.com>
|
|
Expertium <https://github.com/Expertium>
|
|
Christian Donat <https://github.com/cdonat2>
|
|
Asuka Minato <https://asukaminato.eu.org>
|
|
Dillon Baldwin <https://github.com/DillBal>
|
|
Voczi <https://github.com/voczi>
|
|
Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>
|
|
********************
|
|
|
|
The text of the 3 clause BSD license follows:
|
|
|
|
Contributions copyright the above contributors, 2010-Present.
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
modification, are permitted provided that the following conditions are met:
|
|
|
|
1. Redistributions of source code must retain the above copyright notice, this
|
|
list of conditions and the following disclaimer.
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
this list of conditions and the following disclaimer in the documentation
|
|
and/or other materials provided with the distribution.
|
|
|
|
3. Neither the name of the copyright holder nor the names of its contributors
|
|
may be used to endorse or promote products derived from this software without
|
|
specific prior written permission.
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|