Instructions to use HyperionGrayAI/cybermodels-fused with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use HyperionGrayAI/cybermodels-fused with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("HyperionGrayAI/qwennifer-flash-bf16") model = PeftModel.from_pretrained(base_model, "HyperionGrayAI/cybermodels-fused") - Notebooks
- Google Colab
- Kaggle
Release source-grounded rank-12 Cybermodels PEFT adapter and comparison
Browse files- .gitattributes +1 -0
- COPYING +674 -0
- LICENSE-ADAPTER +202 -0
- LICENSE-DATA +395 -0
- NOTICE +1 -0
- README.md +32 -0
- adapter_config.json +19 -0
- adapter_model.safetensors +3 -0
- ask.py +77 -0
- cases.json +20 -0
- compare.py +91 -0
- fuse.py +98 -0
- fusion-check.json +6 -0
- fusion.json +27 -0
- reference.py +49 -0
- sources/cybermodels-linux-drivers/NOTICE.md +1 -0
- sources/cybermodels-linux-drivers/references.sqlite +0 -0
- sources/cybermodels-linux-drivers/sources.json +65 -0
- sources/cybermodels-linux-drivers/specialist.json +5 -0
- sources/cybermodels-linux-drivers/specialist.toml +105 -0
- sources/cybermodels-web-defense/NOTICE.md +1 -0
- sources/cybermodels-web-defense/references.sqlite +0 -0
- sources/cybermodels-web-defense/sources.json +65 -0
- sources/cybermodels-web-defense/specialist.json +5 -0
- sources/cybermodels-web-defense/specialist.toml +105 -0
- sources/cybermodels-windows/NOTICE.md +7 -0
- sources/cybermodels-windows/additional-references.json +4 -0
- sources/cybermodels-windows/questions.tsv +38 -0
- sources/cybermodels-windows/references.sqlite +3 -0
- sources/cybermodels-windows/sources.json +121 -0
- sources/cybermodels-windows/win32-LICENSE-CODE +17 -0
- sources/cybermodels-windows/windows-driver-docs-LICENSE-CODE +17 -0
- team_brief.py +33 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
sources/cybermodels-windows/references.sqlite filter=lfs diff=lfs merge=lfs -text
|
COPYING
ADDED
|
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
GNU GENERAL PUBLIC LICENSE
|
| 2 |
+
Version 3, 29 June 2007
|
| 3 |
+
|
| 4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
| 5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 6 |
+
of this license document, but changing it is not allowed.
|
| 7 |
+
|
| 8 |
+
Preamble
|
| 9 |
+
|
| 10 |
+
The GNU General Public License is a free, copyleft license for
|
| 11 |
+
software and other kinds of works.
|
| 12 |
+
|
| 13 |
+
The licenses for most software and other practical works are designed
|
| 14 |
+
to take away your freedom to share and change the works. By contrast,
|
| 15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
| 16 |
+
share and change all versions of a program--to make sure it remains free
|
| 17 |
+
software for all its users. We, the Free Software Foundation, use the
|
| 18 |
+
GNU General Public License for most of our software; it applies also to
|
| 19 |
+
any other work released this way by its authors. You can apply it to
|
| 20 |
+
your programs, too.
|
| 21 |
+
|
| 22 |
+
When we speak of free software, we are referring to freedom, not
|
| 23 |
+
price. Our General Public Licenses are designed to make sure that you
|
| 24 |
+
have the freedom to distribute copies of free software (and charge for
|
| 25 |
+
them if you wish), that you receive source code or can get it if you
|
| 26 |
+
want it, that you can change the software or use pieces of it in new
|
| 27 |
+
free programs, and that you know you can do these things.
|
| 28 |
+
|
| 29 |
+
To protect your rights, we need to prevent others from denying you
|
| 30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
| 31 |
+
certain responsibilities if you distribute copies of the software, or if
|
| 32 |
+
you modify it: responsibilities to respect the freedom of others.
|
| 33 |
+
|
| 34 |
+
For example, if you distribute copies of such a program, whether
|
| 35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
| 36 |
+
freedoms that you received. You must make sure that they, too, receive
|
| 37 |
+
or can get the source code. And you must show them these terms so they
|
| 38 |
+
know their rights.
|
| 39 |
+
|
| 40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
| 41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
| 42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
| 43 |
+
|
| 44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
| 45 |
+
that there is no warranty for this free software. For both users' and
|
| 46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
| 47 |
+
changed, so that their problems will not be attributed erroneously to
|
| 48 |
+
authors of previous versions.
|
| 49 |
+
|
| 50 |
+
Some devices are designed to deny users access to install or run
|
| 51 |
+
modified versions of the software inside them, although the manufacturer
|
| 52 |
+
can do so. This is fundamentally incompatible with the aim of
|
| 53 |
+
protecting users' freedom to change the software. The systematic
|
| 54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
| 55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
| 56 |
+
have designed this version of the GPL to prohibit the practice for those
|
| 57 |
+
products. If such problems arise substantially in other domains, we
|
| 58 |
+
stand ready to extend this provision to those domains in future versions
|
| 59 |
+
of the GPL, as needed to protect the freedom of users.
|
| 60 |
+
|
| 61 |
+
Finally, every program is threatened constantly by software patents.
|
| 62 |
+
States should not allow patents to restrict development and use of
|
| 63 |
+
software on general-purpose computers, but in those that do, we wish to
|
| 64 |
+
avoid the special danger that patents applied to a free program could
|
| 65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
| 66 |
+
patents cannot be used to render the program non-free.
|
| 67 |
+
|
| 68 |
+
The precise terms and conditions for copying, distribution and
|
| 69 |
+
modification follow.
|
| 70 |
+
|
| 71 |
+
TERMS AND CONDITIONS
|
| 72 |
+
|
| 73 |
+
0. Definitions.
|
| 74 |
+
|
| 75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
| 76 |
+
|
| 77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
| 78 |
+
works, such as semiconductor masks.
|
| 79 |
+
|
| 80 |
+
"The Program" refers to any copyrightable work licensed under this
|
| 81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
| 82 |
+
"recipients" may be individuals or organizations.
|
| 83 |
+
|
| 84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
| 85 |
+
in a fashion requiring copyright permission, other than the making of an
|
| 86 |
+
exact copy. The resulting work is called a "modified version" of the
|
| 87 |
+
earlier work or a work "based on" the earlier work.
|
| 88 |
+
|
| 89 |
+
A "covered work" means either the unmodified Program or a work based
|
| 90 |
+
on the Program.
|
| 91 |
+
|
| 92 |
+
To "propagate" a work means to do anything with it that, without
|
| 93 |
+
permission, would make you directly or secondarily liable for
|
| 94 |
+
infringement under applicable copyright law, except executing it on a
|
| 95 |
+
computer or modifying a private copy. Propagation includes copying,
|
| 96 |
+
distribution (with or without modification), making available to the
|
| 97 |
+
public, and in some countries other activities as well.
|
| 98 |
+
|
| 99 |
+
To "convey" a work means any kind of propagation that enables other
|
| 100 |
+
parties to make or receive copies. Mere interaction with a user through
|
| 101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
| 102 |
+
|
| 103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
| 104 |
+
to the extent that it includes a convenient and prominently visible
|
| 105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
| 106 |
+
tells the user that there is no warranty for the work (except to the
|
| 107 |
+
extent that warranties are provided), that licensees may convey the
|
| 108 |
+
work under this License, and how to view a copy of this License. If
|
| 109 |
+
the interface presents a list of user commands or options, such as a
|
| 110 |
+
menu, a prominent item in the list meets this criterion.
|
| 111 |
+
|
| 112 |
+
1. Source Code.
|
| 113 |
+
|
| 114 |
+
The "source code" for a work means the preferred form of the work
|
| 115 |
+
for making modifications to it. "Object code" means any non-source
|
| 116 |
+
form of a work.
|
| 117 |
+
|
| 118 |
+
A "Standard Interface" means an interface that either is an official
|
| 119 |
+
standard defined by a recognized standards body, or, in the case of
|
| 120 |
+
interfaces specified for a particular programming language, one that
|
| 121 |
+
is widely used among developers working in that language.
|
| 122 |
+
|
| 123 |
+
The "System Libraries" of an executable work include anything, other
|
| 124 |
+
than the work as a whole, that (a) is included in the normal form of
|
| 125 |
+
packaging a Major Component, but which is not part of that Major
|
| 126 |
+
Component, and (b) serves only to enable use of the work with that
|
| 127 |
+
Major Component, or to implement a Standard Interface for which an
|
| 128 |
+
implementation is available to the public in source code form. A
|
| 129 |
+
"Major Component", in this context, means a major essential component
|
| 130 |
+
(kernel, window system, and so on) of the specific operating system
|
| 131 |
+
(if any) on which the executable work runs, or a compiler used to
|
| 132 |
+
produce the work, or an object code interpreter used to run it.
|
| 133 |
+
|
| 134 |
+
The "Corresponding Source" for a work in object code form means all
|
| 135 |
+
the source code needed to generate, install, and (for an executable
|
| 136 |
+
work) run the object code and to modify the work, including scripts to
|
| 137 |
+
control those activities. However, it does not include the work's
|
| 138 |
+
System Libraries, or general-purpose tools or generally available free
|
| 139 |
+
programs which are used unmodified in performing those activities but
|
| 140 |
+
which are not part of the work. For example, Corresponding Source
|
| 141 |
+
includes interface definition files associated with source files for
|
| 142 |
+
the work, and the source code for shared libraries and dynamically
|
| 143 |
+
linked subprograms that the work is specifically designed to require,
|
| 144 |
+
such as by intimate data communication or control flow between those
|
| 145 |
+
subprograms and other parts of the work.
|
| 146 |
+
|
| 147 |
+
The Corresponding Source need not include anything that users
|
| 148 |
+
can regenerate automatically from other parts of the Corresponding
|
| 149 |
+
Source.
|
| 150 |
+
|
| 151 |
+
The Corresponding Source for a work in source code form is that
|
| 152 |
+
same work.
|
| 153 |
+
|
| 154 |
+
2. Basic Permissions.
|
| 155 |
+
|
| 156 |
+
All rights granted under this License are granted for the term of
|
| 157 |
+
copyright on the Program, and are irrevocable provided the stated
|
| 158 |
+
conditions are met. This License explicitly affirms your unlimited
|
| 159 |
+
permission to run the unmodified Program. The output from running a
|
| 160 |
+
covered work is covered by this License only if the output, given its
|
| 161 |
+
content, constitutes a covered work. This License acknowledges your
|
| 162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
| 163 |
+
|
| 164 |
+
You may make, run and propagate covered works that you do not
|
| 165 |
+
convey, without conditions so long as your license otherwise remains
|
| 166 |
+
in force. You may convey covered works to others for the sole purpose
|
| 167 |
+
of having them make modifications exclusively for you, or provide you
|
| 168 |
+
with facilities for running those works, provided that you comply with
|
| 169 |
+
the terms of this License in conveying all material for which you do
|
| 170 |
+
not control copyright. Those thus making or running the covered works
|
| 171 |
+
for you must do so exclusively on your behalf, under your direction
|
| 172 |
+
and control, on terms that prohibit them from making any copies of
|
| 173 |
+
your copyrighted material outside their relationship with you.
|
| 174 |
+
|
| 175 |
+
Conveying under any other circumstances is permitted solely under
|
| 176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
| 177 |
+
makes it unnecessary.
|
| 178 |
+
|
| 179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
| 180 |
+
|
| 181 |
+
No covered work shall be deemed part of an effective technological
|
| 182 |
+
measure under any applicable law fulfilling obligations under article
|
| 183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
| 184 |
+
similar laws prohibiting or restricting circumvention of such
|
| 185 |
+
measures.
|
| 186 |
+
|
| 187 |
+
When you convey a covered work, you waive any legal power to forbid
|
| 188 |
+
circumvention of technological measures to the extent such circumvention
|
| 189 |
+
is effected by exercising rights under this License with respect to
|
| 190 |
+
the covered work, and you disclaim any intention to limit operation or
|
| 191 |
+
modification of the work as a means of enforcing, against the work's
|
| 192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
| 193 |
+
technological measures.
|
| 194 |
+
|
| 195 |
+
4. Conveying Verbatim Copies.
|
| 196 |
+
|
| 197 |
+
You may convey verbatim copies of the Program's source code as you
|
| 198 |
+
receive it, in any medium, provided that you conspicuously and
|
| 199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
| 200 |
+
keep intact all notices stating that this License and any
|
| 201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
| 202 |
+
keep intact all notices of the absence of any warranty; and give all
|
| 203 |
+
recipients a copy of this License along with the Program.
|
| 204 |
+
|
| 205 |
+
You may charge any price or no price for each copy that you convey,
|
| 206 |
+
and you may offer support or warranty protection for a fee.
|
| 207 |
+
|
| 208 |
+
5. Conveying Modified Source Versions.
|
| 209 |
+
|
| 210 |
+
You may convey a work based on the Program, or the modifications to
|
| 211 |
+
produce it from the Program, in the form of source code under the
|
| 212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
| 213 |
+
|
| 214 |
+
a) The work must carry prominent notices stating that you modified
|
| 215 |
+
it, and giving a relevant date.
|
| 216 |
+
|
| 217 |
+
b) The work must carry prominent notices stating that it is
|
| 218 |
+
released under this License and any conditions added under section
|
| 219 |
+
7. This requirement modifies the requirement in section 4 to
|
| 220 |
+
"keep intact all notices".
|
| 221 |
+
|
| 222 |
+
c) You must license the entire work, as a whole, under this
|
| 223 |
+
License to anyone who comes into possession of a copy. This
|
| 224 |
+
License will therefore apply, along with any applicable section 7
|
| 225 |
+
additional terms, to the whole of the work, and all its parts,
|
| 226 |
+
regardless of how they are packaged. This License gives no
|
| 227 |
+
permission to license the work in any other way, but it does not
|
| 228 |
+
invalidate such permission if you have separately received it.
|
| 229 |
+
|
| 230 |
+
d) If the work has interactive user interfaces, each must display
|
| 231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
| 232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
| 233 |
+
work need not make them do so.
|
| 234 |
+
|
| 235 |
+
A compilation of a covered work with other separate and independent
|
| 236 |
+
works, which are not by their nature extensions of the covered work,
|
| 237 |
+
and which are not combined with it such as to form a larger program,
|
| 238 |
+
in or on a volume of a storage or distribution medium, is called an
|
| 239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
| 240 |
+
used to limit the access or legal rights of the compilation's users
|
| 241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
| 242 |
+
in an aggregate does not cause this License to apply to the other
|
| 243 |
+
parts of the aggregate.
|
| 244 |
+
|
| 245 |
+
6. Conveying Non-Source Forms.
|
| 246 |
+
|
| 247 |
+
You may convey a covered work in object code form under the terms
|
| 248 |
+
of sections 4 and 5, provided that you also convey the
|
| 249 |
+
machine-readable Corresponding Source under the terms of this License,
|
| 250 |
+
in one of these ways:
|
| 251 |
+
|
| 252 |
+
a) Convey the object code in, or embodied in, a physical product
|
| 253 |
+
(including a physical distribution medium), accompanied by the
|
| 254 |
+
Corresponding Source fixed on a durable physical medium
|
| 255 |
+
customarily used for software interchange.
|
| 256 |
+
|
| 257 |
+
b) Convey the object code in, or embodied in, a physical product
|
| 258 |
+
(including a physical distribution medium), accompanied by a
|
| 259 |
+
written offer, valid for at least three years and valid for as
|
| 260 |
+
long as you offer spare parts or customer support for that product
|
| 261 |
+
model, to give anyone who possesses the object code either (1) a
|
| 262 |
+
copy of the Corresponding Source for all the software in the
|
| 263 |
+
product that is covered by this License, on a durable physical
|
| 264 |
+
medium customarily used for software interchange, for a price no
|
| 265 |
+
more than your reasonable cost of physically performing this
|
| 266 |
+
conveying of source, or (2) access to copy the
|
| 267 |
+
Corresponding Source from a network server at no charge.
|
| 268 |
+
|
| 269 |
+
c) Convey individual copies of the object code with a copy of the
|
| 270 |
+
written offer to provide the Corresponding Source. This
|
| 271 |
+
alternative is allowed only occasionally and noncommercially, and
|
| 272 |
+
only if you received the object code with such an offer, in accord
|
| 273 |
+
with subsection 6b.
|
| 274 |
+
|
| 275 |
+
d) Convey the object code by offering access from a designated
|
| 276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
| 277 |
+
Corresponding Source in the same way through the same place at no
|
| 278 |
+
further charge. You need not require recipients to copy the
|
| 279 |
+
Corresponding Source along with the object code. If the place to
|
| 280 |
+
copy the object code is a network server, the Corresponding Source
|
| 281 |
+
may be on a different server (operated by you or a third party)
|
| 282 |
+
that supports equivalent copying facilities, provided you maintain
|
| 283 |
+
clear directions next to the object code saying where to find the
|
| 284 |
+
Corresponding Source. Regardless of what server hosts the
|
| 285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
| 286 |
+
available for as long as needed to satisfy these requirements.
|
| 287 |
+
|
| 288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
| 289 |
+
you inform other peers where the object code and Corresponding
|
| 290 |
+
Source of the work are being offered to the general public at no
|
| 291 |
+
charge under subsection 6d.
|
| 292 |
+
|
| 293 |
+
A separable portion of the object code, whose source code is excluded
|
| 294 |
+
from the Corresponding Source as a System Library, need not be
|
| 295 |
+
included in conveying the object code work.
|
| 296 |
+
|
| 297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
| 298 |
+
tangible personal property which is normally used for personal, family,
|
| 299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
| 300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
| 301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
| 302 |
+
product received by a particular user, "normally used" refers to a
|
| 303 |
+
typical or common use of that class of product, regardless of the status
|
| 304 |
+
of the particular user or of the way in which the particular user
|
| 305 |
+
actually uses, or expects or is expected to use, the product. A product
|
| 306 |
+
is a consumer product regardless of whether the product has substantial
|
| 307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
| 308 |
+
the only significant mode of use of the product.
|
| 309 |
+
|
| 310 |
+
"Installation Information" for a User Product means any methods,
|
| 311 |
+
procedures, authorization keys, or other information required to install
|
| 312 |
+
and execute modified versions of a covered work in that User Product from
|
| 313 |
+
a modified version of its Corresponding Source. The information must
|
| 314 |
+
suffice to ensure that the continued functioning of the modified object
|
| 315 |
+
code is in no case prevented or interfered with solely because
|
| 316 |
+
modification has been made.
|
| 317 |
+
|
| 318 |
+
If you convey an object code work under this section in, or with, or
|
| 319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
| 320 |
+
part of a transaction in which the right of possession and use of the
|
| 321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
| 322 |
+
fixed term (regardless of how the transaction is characterized), the
|
| 323 |
+
Corresponding Source conveyed under this section must be accompanied
|
| 324 |
+
by the Installation Information. But this requirement does not apply
|
| 325 |
+
if neither you nor any third party retains the ability to install
|
| 326 |
+
modified object code on the User Product (for example, the work has
|
| 327 |
+
been installed in ROM).
|
| 328 |
+
|
| 329 |
+
The requirement to provide Installation Information does not include a
|
| 330 |
+
requirement to continue to provide support service, warranty, or updates
|
| 331 |
+
for a work that has been modified or installed by the recipient, or for
|
| 332 |
+
the User Product in which it has been modified or installed. Access to a
|
| 333 |
+
network may be denied when the modification itself materially and
|
| 334 |
+
adversely affects the operation of the network or violates the rules and
|
| 335 |
+
protocols for communication across the network.
|
| 336 |
+
|
| 337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
| 338 |
+
in accord with this section must be in a format that is publicly
|
| 339 |
+
documented (and with an implementation available to the public in
|
| 340 |
+
source code form), and must require no special password or key for
|
| 341 |
+
unpacking, reading or copying.
|
| 342 |
+
|
| 343 |
+
7. Additional Terms.
|
| 344 |
+
|
| 345 |
+
"Additional permissions" are terms that supplement the terms of this
|
| 346 |
+
License by making exceptions from one or more of its conditions.
|
| 347 |
+
Additional permissions that are applicable to the entire Program shall
|
| 348 |
+
be treated as though they were included in this License, to the extent
|
| 349 |
+
that they are valid under applicable law. If additional permissions
|
| 350 |
+
apply only to part of the Program, that part may be used separately
|
| 351 |
+
under those permissions, but the entire Program remains governed by
|
| 352 |
+
this License without regard to the additional permissions.
|
| 353 |
+
|
| 354 |
+
When you convey a copy of a covered work, you may at your option
|
| 355 |
+
remove any additional permissions from that copy, or from any part of
|
| 356 |
+
it. (Additional permissions may be written to require their own
|
| 357 |
+
removal in certain cases when you modify the work.) You may place
|
| 358 |
+
additional permissions on material, added by you to a covered work,
|
| 359 |
+
for which you have or can give appropriate copyright permission.
|
| 360 |
+
|
| 361 |
+
Notwithstanding any other provision of this License, for material you
|
| 362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
| 363 |
+
that material) supplement the terms of this License with terms:
|
| 364 |
+
|
| 365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
| 366 |
+
terms of sections 15 and 16 of this License; or
|
| 367 |
+
|
| 368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
| 369 |
+
author attributions in that material or in the Appropriate Legal
|
| 370 |
+
Notices displayed by works containing it; or
|
| 371 |
+
|
| 372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
| 373 |
+
requiring that modified versions of such material be marked in
|
| 374 |
+
reasonable ways as different from the original version; or
|
| 375 |
+
|
| 376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
| 377 |
+
authors of the material; or
|
| 378 |
+
|
| 379 |
+
e) Declining to grant rights under trademark law for use of some
|
| 380 |
+
trade names, trademarks, or service marks; or
|
| 381 |
+
|
| 382 |
+
f) Requiring indemnification of licensors and authors of that
|
| 383 |
+
material by anyone who conveys the material (or modified versions of
|
| 384 |
+
it) with contractual assumptions of liability to the recipient, for
|
| 385 |
+
any liability that these contractual assumptions directly impose on
|
| 386 |
+
those licensors and authors.
|
| 387 |
+
|
| 388 |
+
All other non-permissive additional terms are considered "further
|
| 389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
| 390 |
+
received it, or any part of it, contains a notice stating that it is
|
| 391 |
+
governed by this License along with a term that is a further
|
| 392 |
+
restriction, you may remove that term. If a license document contains
|
| 393 |
+
a further restriction but permits relicensing or conveying under this
|
| 394 |
+
License, you may add to a covered work material governed by the terms
|
| 395 |
+
of that license document, provided that the further restriction does
|
| 396 |
+
not survive such relicensing or conveying.
|
| 397 |
+
|
| 398 |
+
If you add terms to a covered work in accord with this section, you
|
| 399 |
+
must place, in the relevant source files, a statement of the
|
| 400 |
+
additional terms that apply to those files, or a notice indicating
|
| 401 |
+
where to find the applicable terms.
|
| 402 |
+
|
| 403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
| 404 |
+
form of a separately written license, or stated as exceptions;
|
| 405 |
+
the above requirements apply either way.
|
| 406 |
+
|
| 407 |
+
8. Termination.
|
| 408 |
+
|
| 409 |
+
You may not propagate or modify a covered work except as expressly
|
| 410 |
+
provided under this License. Any attempt otherwise to propagate or
|
| 411 |
+
modify it is void, and will automatically terminate your rights under
|
| 412 |
+
this License (including any patent licenses granted under the third
|
| 413 |
+
paragraph of section 11).
|
| 414 |
+
|
| 415 |
+
However, if you cease all violation of this License, then your
|
| 416 |
+
license from a particular copyright holder is reinstated (a)
|
| 417 |
+
provisionally, unless and until the copyright holder explicitly and
|
| 418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
| 419 |
+
holder fails to notify you of the violation by some reasonable means
|
| 420 |
+
prior to 60 days after the cessation.
|
| 421 |
+
|
| 422 |
+
Moreover, your license from a particular copyright holder is
|
| 423 |
+
reinstated permanently if the copyright holder notifies you of the
|
| 424 |
+
violation by some reasonable means, this is the first time you have
|
| 425 |
+
received notice of violation of this License (for any work) from that
|
| 426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
| 427 |
+
your receipt of the notice.
|
| 428 |
+
|
| 429 |
+
Termination of your rights under this section does not terminate the
|
| 430 |
+
licenses of parties who have received copies or rights from you under
|
| 431 |
+
this License. If your rights have been terminated and not permanently
|
| 432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
| 433 |
+
material under section 10.
|
| 434 |
+
|
| 435 |
+
9. Acceptance Not Required for Having Copies.
|
| 436 |
+
|
| 437 |
+
You are not required to accept this License in order to receive or
|
| 438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
| 439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
| 440 |
+
to receive a copy likewise does not require acceptance. However,
|
| 441 |
+
nothing other than this License grants you permission to propagate or
|
| 442 |
+
modify any covered work. These actions infringe copyright if you do
|
| 443 |
+
not accept this License. Therefore, by modifying or propagating a
|
| 444 |
+
covered work, you indicate your acceptance of this License to do so.
|
| 445 |
+
|
| 446 |
+
10. Automatic Licensing of Downstream Recipients.
|
| 447 |
+
|
| 448 |
+
Each time you convey a covered work, the recipient automatically
|
| 449 |
+
receives a license from the original licensors, to run, modify and
|
| 450 |
+
propagate that work, subject to this License. You are not responsible
|
| 451 |
+
for enforcing compliance by third parties with this License.
|
| 452 |
+
|
| 453 |
+
An "entity transaction" is a transaction transferring control of an
|
| 454 |
+
organization, or substantially all assets of one, or subdividing an
|
| 455 |
+
organization, or merging organizations. If propagation of a covered
|
| 456 |
+
work results from an entity transaction, each party to that
|
| 457 |
+
transaction who receives a copy of the work also receives whatever
|
| 458 |
+
licenses to the work the party's predecessor in interest had or could
|
| 459 |
+
give under the previous paragraph, plus a right to possession of the
|
| 460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
| 461 |
+
the predecessor has it or can get it with reasonable efforts.
|
| 462 |
+
|
| 463 |
+
You may not impose any further restrictions on the exercise of the
|
| 464 |
+
rights granted or affirmed under this License. For example, you may
|
| 465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
| 466 |
+
rights granted under this License, and you may not initiate litigation
|
| 467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
| 468 |
+
any patent claim is infringed by making, using, selling, offering for
|
| 469 |
+
sale, or importing the Program or any portion of it.
|
| 470 |
+
|
| 471 |
+
11. Patents.
|
| 472 |
+
|
| 473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
| 474 |
+
License of the Program or a work on which the Program is based. The
|
| 475 |
+
work thus licensed is called the contributor's "contributor version".
|
| 476 |
+
|
| 477 |
+
A contributor's "essential patent claims" are all patent claims
|
| 478 |
+
owned or controlled by the contributor, whether already acquired or
|
| 479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
| 480 |
+
by this License, of making, using, or selling its contributor version,
|
| 481 |
+
but do not include claims that would be infringed only as a
|
| 482 |
+
consequence of further modification of the contributor version. For
|
| 483 |
+
purposes of this definition, "control" includes the right to grant
|
| 484 |
+
patent sublicenses in a manner consistent with the requirements of
|
| 485 |
+
this License.
|
| 486 |
+
|
| 487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
| 488 |
+
patent license under the contributor's essential patent claims, to
|
| 489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
| 490 |
+
propagate the contents of its contributor version.
|
| 491 |
+
|
| 492 |
+
In the following three paragraphs, a "patent license" is any express
|
| 493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
| 494 |
+
(such as an express permission to practice a patent or covenant not to
|
| 495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
| 496 |
+
party means to make such an agreement or commitment not to enforce a
|
| 497 |
+
patent against the party.
|
| 498 |
+
|
| 499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
| 500 |
+
and the Corresponding Source of the work is not available for anyone
|
| 501 |
+
to copy, free of charge and under the terms of this License, through a
|
| 502 |
+
publicly available network server or other readily accessible means,
|
| 503 |
+
then you must either (1) cause the Corresponding Source to be so
|
| 504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
| 505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
| 506 |
+
consistent with the requirements of this License, to extend the patent
|
| 507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
| 508 |
+
actual knowledge that, but for the patent license, your conveying the
|
| 509 |
+
covered work in a country, or your recipient's use of the covered work
|
| 510 |
+
in a country, would infringe one or more identifiable patents in that
|
| 511 |
+
country that you have reason to believe are valid.
|
| 512 |
+
|
| 513 |
+
If, pursuant to or in connection with a single transaction or
|
| 514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
| 515 |
+
covered work, and grant a patent license to some of the parties
|
| 516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
| 517 |
+
or convey a specific copy of the covered work, then the patent license
|
| 518 |
+
you grant is automatically extended to all recipients of the covered
|
| 519 |
+
work and works based on it.
|
| 520 |
+
|
| 521 |
+
A patent license is "discriminatory" if it does not include within
|
| 522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
| 523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
| 524 |
+
specifically granted under this License. You may not convey a covered
|
| 525 |
+
work if you are a party to an arrangement with a third party that is
|
| 526 |
+
in the business of distributing software, under which you make payment
|
| 527 |
+
to the third party based on the extent of your activity of conveying
|
| 528 |
+
the work, and under which the third party grants, to any of the
|
| 529 |
+
parties who would receive the covered work from you, a discriminatory
|
| 530 |
+
patent license (a) in connection with copies of the covered work
|
| 531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
| 532 |
+
for and in connection with specific products or compilations that
|
| 533 |
+
contain the covered work, unless you entered into that arrangement,
|
| 534 |
+
or that patent license was granted, prior to 28 March 2007.
|
| 535 |
+
|
| 536 |
+
Nothing in this License shall be construed as excluding or limiting
|
| 537 |
+
any implied license or other defenses to infringement that may
|
| 538 |
+
otherwise be available to you under applicable patent law.
|
| 539 |
+
|
| 540 |
+
12. No Surrender of Others' Freedom.
|
| 541 |
+
|
| 542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
| 543 |
+
otherwise) that contradict the conditions of this License, they do not
|
| 544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
| 545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
| 546 |
+
License and any other pertinent obligations, then as a consequence you may
|
| 547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
| 548 |
+
to collect a royalty for further conveying from those to whom you convey
|
| 549 |
+
the Program, the only way you could satisfy both those terms and this
|
| 550 |
+
License would be to refrain entirely from conveying the Program.
|
| 551 |
+
|
| 552 |
+
13. Use with the GNU Affero General Public License.
|
| 553 |
+
|
| 554 |
+
Notwithstanding any other provision of this License, you have
|
| 555 |
+
permission to link or combine any covered work with a work licensed
|
| 556 |
+
under version 3 of the GNU Affero General Public License into a single
|
| 557 |
+
combined work, and to convey the resulting work. The terms of this
|
| 558 |
+
License will continue to apply to the part which is the covered work,
|
| 559 |
+
but the special requirements of the GNU Affero General Public License,
|
| 560 |
+
section 13, concerning interaction through a network will apply to the
|
| 561 |
+
combination as such.
|
| 562 |
+
|
| 563 |
+
14. Revised Versions of this License.
|
| 564 |
+
|
| 565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
| 566 |
+
the GNU General Public License from time to time. Such new versions will
|
| 567 |
+
be similar in spirit to the present version, but may differ in detail to
|
| 568 |
+
address new problems or concerns.
|
| 569 |
+
|
| 570 |
+
Each version is given a distinguishing version number. If the
|
| 571 |
+
Program specifies that a certain numbered version of the GNU General
|
| 572 |
+
Public License "or any later version" applies to it, you have the
|
| 573 |
+
option of following the terms and conditions either of that numbered
|
| 574 |
+
version or of any later version published by the Free Software
|
| 575 |
+
Foundation. If the Program does not specify a version number of the
|
| 576 |
+
GNU General Public License, you may choose any version ever published
|
| 577 |
+
by the Free Software Foundation.
|
| 578 |
+
|
| 579 |
+
If the Program specifies that a proxy can decide which future
|
| 580 |
+
versions of the GNU General Public License can be used, that proxy's
|
| 581 |
+
public statement of acceptance of a version permanently authorizes you
|
| 582 |
+
to choose that version for the Program.
|
| 583 |
+
|
| 584 |
+
Later license versions may give you additional or different
|
| 585 |
+
permissions. However, no additional obligations are imposed on any
|
| 586 |
+
author or copyright holder as a result of your choosing to follow a
|
| 587 |
+
later version.
|
| 588 |
+
|
| 589 |
+
15. Disclaimer of Warranty.
|
| 590 |
+
|
| 591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
| 592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
| 593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
| 594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
| 595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
| 596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
| 597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
| 598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
| 599 |
+
|
| 600 |
+
16. Limitation of Liability.
|
| 601 |
+
|
| 602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
| 604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
| 605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
| 606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
| 607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
| 608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
| 609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
| 610 |
+
SUCH DAMAGES.
|
| 611 |
+
|
| 612 |
+
17. Interpretation of Sections 15 and 16.
|
| 613 |
+
|
| 614 |
+
If the disclaimer of warranty and limitation of liability provided
|
| 615 |
+
above cannot be given local legal effect according to their terms,
|
| 616 |
+
reviewing courts shall apply local law that most closely approximates
|
| 617 |
+
an absolute waiver of all civil liability in connection with the
|
| 618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
| 619 |
+
copy of the Program in return for a fee.
|
| 620 |
+
|
| 621 |
+
END OF TERMS AND CONDITIONS
|
| 622 |
+
|
| 623 |
+
How to Apply These Terms to Your New Programs
|
| 624 |
+
|
| 625 |
+
If you develop a new program, and you want it to be of the greatest
|
| 626 |
+
possible use to the public, the best way to achieve this is to make it
|
| 627 |
+
free software which everyone can redistribute and change under these terms.
|
| 628 |
+
|
| 629 |
+
To do so, attach the following notices to the program. It is safest
|
| 630 |
+
to attach them to the start of each source file to most effectively
|
| 631 |
+
state the exclusion of warranty; and each file should have at least
|
| 632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
| 633 |
+
|
| 634 |
+
{one line to give the program's name and a brief idea of what it does.}
|
| 635 |
+
Copyright (C) {year} {name of author}
|
| 636 |
+
|
| 637 |
+
This program is free software: you can redistribute it and/or modify
|
| 638 |
+
it under the terms of the GNU General Public License as published by
|
| 639 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 640 |
+
(at your option) any later version.
|
| 641 |
+
|
| 642 |
+
This program is distributed in the hope that it will be useful,
|
| 643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 645 |
+
GNU General Public License for more details.
|
| 646 |
+
|
| 647 |
+
You should have received a copy of the GNU General Public License
|
| 648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 649 |
+
|
| 650 |
+
Also add information on how to contact you by electronic and paper mail.
|
| 651 |
+
|
| 652 |
+
If the program does terminal interaction, make it output a short
|
| 653 |
+
notice like this when it starts in an interactive mode:
|
| 654 |
+
|
| 655 |
+
{project} Copyright (C) {year} {fullname}
|
| 656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
| 657 |
+
This is free software, and you are welcome to redistribute it
|
| 658 |
+
under certain conditions; type `show c' for details.
|
| 659 |
+
|
| 660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
| 661 |
+
parts of the General Public License. Of course, your program's commands
|
| 662 |
+
might be different; for a GUI interface, you would use an "about box".
|
| 663 |
+
|
| 664 |
+
You should also get your employer (if you work as a programmer) or school,
|
| 665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
| 666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
| 667 |
+
<http://www.gnu.org/licenses/>.
|
| 668 |
+
|
| 669 |
+
The GNU General Public License does not permit incorporating your program
|
| 670 |
+
into proprietary programs. If your program is a subroutine library, you
|
| 671 |
+
may consider it more useful to permit linking proprietary applications with
|
| 672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
| 673 |
+
Public License instead of this License. But first, please read
|
| 674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
LICENSE-ADAPTER
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright [yyyy] [name of copyright owner]
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
LICENSE-DATA
ADDED
|
@@ -0,0 +1,395 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Attribution 4.0 International
|
| 2 |
+
|
| 3 |
+
=======================================================================
|
| 4 |
+
|
| 5 |
+
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
| 6 |
+
does not provide legal services or legal advice. Distribution of
|
| 7 |
+
Creative Commons public licenses does not create a lawyer-client or
|
| 8 |
+
other relationship. Creative Commons makes its licenses and related
|
| 9 |
+
information available on an "as-is" basis. Creative Commons gives no
|
| 10 |
+
warranties regarding its licenses, any material licensed under their
|
| 11 |
+
terms and conditions, or any related information. Creative Commons
|
| 12 |
+
disclaims all liability for damages resulting from their use to the
|
| 13 |
+
fullest extent possible.
|
| 14 |
+
|
| 15 |
+
Using Creative Commons Public Licenses
|
| 16 |
+
|
| 17 |
+
Creative Commons public licenses provide a standard set of terms and
|
| 18 |
+
conditions that creators and other rights holders may use to share
|
| 19 |
+
original works of authorship and other material subject to copyright
|
| 20 |
+
and certain other rights specified in the public license below. The
|
| 21 |
+
following considerations are for informational purposes only, are not
|
| 22 |
+
exhaustive, and do not form part of our licenses.
|
| 23 |
+
|
| 24 |
+
Considerations for licensors: Our public licenses are
|
| 25 |
+
intended for use by those authorized to give the public
|
| 26 |
+
permission to use material in ways otherwise restricted by
|
| 27 |
+
copyright and certain other rights. Our licenses are
|
| 28 |
+
irrevocable. Licensors should read and understand the terms
|
| 29 |
+
and conditions of the license they choose before applying it.
|
| 30 |
+
Licensors should also secure all rights necessary before
|
| 31 |
+
applying our licenses so that the public can reuse the
|
| 32 |
+
material as expected. Licensors should clearly mark any
|
| 33 |
+
material not subject to the license. This includes other CC-
|
| 34 |
+
licensed material, or material used under an exception or
|
| 35 |
+
limitation to copyright. More considerations for licensors:
|
| 36 |
+
wiki.creativecommons.org/Considerations_for_licensors
|
| 37 |
+
|
| 38 |
+
Considerations for the public: By using one of our public
|
| 39 |
+
licenses, a licensor grants the public permission to use the
|
| 40 |
+
licensed material under specified terms and conditions. If
|
| 41 |
+
the licensor's permission is not necessary for any reason--for
|
| 42 |
+
example, because of any applicable exception or limitation to
|
| 43 |
+
copyright--then that use is not regulated by the license. Our
|
| 44 |
+
licenses grant only permissions under copyright and certain
|
| 45 |
+
other rights that a licensor has authority to grant. Use of
|
| 46 |
+
the licensed material may still be restricted for other
|
| 47 |
+
reasons, including because others have copyright or other
|
| 48 |
+
rights in the material. A licensor may make special requests,
|
| 49 |
+
such as asking that all changes be marked or described.
|
| 50 |
+
Although not required by our licenses, you are encouraged to
|
| 51 |
+
respect those requests where reasonable. More_considerations
|
| 52 |
+
for the public:
|
| 53 |
+
wiki.creativecommons.org/Considerations_for_licensees
|
| 54 |
+
|
| 55 |
+
=======================================================================
|
| 56 |
+
|
| 57 |
+
Creative Commons Attribution 4.0 International Public License
|
| 58 |
+
|
| 59 |
+
By exercising the Licensed Rights (defined below), You accept and agree
|
| 60 |
+
to be bound by the terms and conditions of this Creative Commons
|
| 61 |
+
Attribution 4.0 International Public License ("Public License"). To the
|
| 62 |
+
extent this Public License may be interpreted as a contract, You are
|
| 63 |
+
granted the Licensed Rights in consideration of Your acceptance of
|
| 64 |
+
these terms and conditions, and the Licensor grants You such rights in
|
| 65 |
+
consideration of benefits the Licensor receives from making the
|
| 66 |
+
Licensed Material available under these terms and conditions.
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
Section 1 -- Definitions.
|
| 70 |
+
|
| 71 |
+
a. Adapted Material means material subject to Copyright and Similar
|
| 72 |
+
Rights that is derived from or based upon the Licensed Material
|
| 73 |
+
and in which the Licensed Material is translated, altered,
|
| 74 |
+
arranged, transformed, or otherwise modified in a manner requiring
|
| 75 |
+
permission under the Copyright and Similar Rights held by the
|
| 76 |
+
Licensor. For purposes of this Public License, where the Licensed
|
| 77 |
+
Material is a musical work, performance, or sound recording,
|
| 78 |
+
Adapted Material is always produced where the Licensed Material is
|
| 79 |
+
synched in timed relation with a moving image.
|
| 80 |
+
|
| 81 |
+
b. Adapter's License means the license You apply to Your Copyright
|
| 82 |
+
and Similar Rights in Your contributions to Adapted Material in
|
| 83 |
+
accordance with the terms and conditions of this Public License.
|
| 84 |
+
|
| 85 |
+
c. Copyright and Similar Rights means copyright and/or similar rights
|
| 86 |
+
closely related to copyright including, without limitation,
|
| 87 |
+
performance, broadcast, sound recording, and Sui Generis Database
|
| 88 |
+
Rights, without regard to how the rights are labeled or
|
| 89 |
+
categorized. For purposes of this Public License, the rights
|
| 90 |
+
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
| 91 |
+
Rights.
|
| 92 |
+
|
| 93 |
+
d. Effective Technological Measures means those measures that, in the
|
| 94 |
+
absence of proper authority, may not be circumvented under laws
|
| 95 |
+
fulfilling obligations under Article 11 of the WIPO Copyright
|
| 96 |
+
Treaty adopted on December 20, 1996, and/or similar international
|
| 97 |
+
agreements.
|
| 98 |
+
|
| 99 |
+
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
| 100 |
+
any other exception or limitation to Copyright and Similar Rights
|
| 101 |
+
that applies to Your use of the Licensed Material.
|
| 102 |
+
|
| 103 |
+
f. Licensed Material means the artistic or literary work, database,
|
| 104 |
+
or other material to which the Licensor applied this Public
|
| 105 |
+
License.
|
| 106 |
+
|
| 107 |
+
g. Licensed Rights means the rights granted to You subject to the
|
| 108 |
+
terms and conditions of this Public License, which are limited to
|
| 109 |
+
all Copyright and Similar Rights that apply to Your use of the
|
| 110 |
+
Licensed Material and that the Licensor has authority to license.
|
| 111 |
+
|
| 112 |
+
h. Licensor means the individual(s) or entity(ies) granting rights
|
| 113 |
+
under this Public License.
|
| 114 |
+
|
| 115 |
+
i. Share means to provide material to the public by any means or
|
| 116 |
+
process that requires permission under the Licensed Rights, such
|
| 117 |
+
as reproduction, public display, public performance, distribution,
|
| 118 |
+
dissemination, communication, or importation, and to make material
|
| 119 |
+
available to the public including in ways that members of the
|
| 120 |
+
public may access the material from a place and at a time
|
| 121 |
+
individually chosen by them.
|
| 122 |
+
|
| 123 |
+
j. Sui Generis Database Rights means rights other than copyright
|
| 124 |
+
resulting from Directive 96/9/EC of the European Parliament and of
|
| 125 |
+
the Council of 11 March 1996 on the legal protection of databases,
|
| 126 |
+
as amended and/or succeeded, as well as other essentially
|
| 127 |
+
equivalent rights anywhere in the world.
|
| 128 |
+
|
| 129 |
+
k. You means the individual or entity exercising the Licensed Rights
|
| 130 |
+
under this Public License. Your has a corresponding meaning.
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
Section 2 -- Scope.
|
| 134 |
+
|
| 135 |
+
a. License grant.
|
| 136 |
+
|
| 137 |
+
1. Subject to the terms and conditions of this Public License,
|
| 138 |
+
the Licensor hereby grants You a worldwide, royalty-free,
|
| 139 |
+
non-sublicensable, non-exclusive, irrevocable license to
|
| 140 |
+
exercise the Licensed Rights in the Licensed Material to:
|
| 141 |
+
|
| 142 |
+
a. reproduce and Share the Licensed Material, in whole or
|
| 143 |
+
in part; and
|
| 144 |
+
|
| 145 |
+
b. produce, reproduce, and Share Adapted Material.
|
| 146 |
+
|
| 147 |
+
2. Exceptions and Limitations. For the avoidance of doubt, where
|
| 148 |
+
Exceptions and Limitations apply to Your use, this Public
|
| 149 |
+
License does not apply, and You do not need to comply with
|
| 150 |
+
its terms and conditions.
|
| 151 |
+
|
| 152 |
+
3. Term. The term of this Public License is specified in Section
|
| 153 |
+
6(a).
|
| 154 |
+
|
| 155 |
+
4. Media and formats; technical modifications allowed. The
|
| 156 |
+
Licensor authorizes You to exercise the Licensed Rights in
|
| 157 |
+
all media and formats whether now known or hereafter created,
|
| 158 |
+
and to make technical modifications necessary to do so. The
|
| 159 |
+
Licensor waives and/or agrees not to assert any right or
|
| 160 |
+
authority to forbid You from making technical modifications
|
| 161 |
+
necessary to exercise the Licensed Rights, including
|
| 162 |
+
technical modifications necessary to circumvent Effective
|
| 163 |
+
Technological Measures. For purposes of this Public License,
|
| 164 |
+
simply making modifications authorized by this Section 2(a)
|
| 165 |
+
(4) never produces Adapted Material.
|
| 166 |
+
|
| 167 |
+
5. Downstream recipients.
|
| 168 |
+
|
| 169 |
+
a. Offer from the Licensor -- Licensed Material. Every
|
| 170 |
+
recipient of the Licensed Material automatically
|
| 171 |
+
receives an offer from the Licensor to exercise the
|
| 172 |
+
Licensed Rights under the terms and conditions of this
|
| 173 |
+
Public License.
|
| 174 |
+
|
| 175 |
+
b. No downstream restrictions. You may not offer or impose
|
| 176 |
+
any additional or different terms or conditions on, or
|
| 177 |
+
apply any Effective Technological Measures to, the
|
| 178 |
+
Licensed Material if doing so restricts exercise of the
|
| 179 |
+
Licensed Rights by any recipient of the Licensed
|
| 180 |
+
Material.
|
| 181 |
+
|
| 182 |
+
6. No endorsement. Nothing in this Public License constitutes or
|
| 183 |
+
may be construed as permission to assert or imply that You
|
| 184 |
+
are, or that Your use of the Licensed Material is, connected
|
| 185 |
+
with, or sponsored, endorsed, or granted official status by,
|
| 186 |
+
the Licensor or others designated to receive attribution as
|
| 187 |
+
provided in Section 3(a)(1)(A)(i).
|
| 188 |
+
|
| 189 |
+
b. Other rights.
|
| 190 |
+
|
| 191 |
+
1. Moral rights, such as the right of integrity, are not
|
| 192 |
+
licensed under this Public License, nor are publicity,
|
| 193 |
+
privacy, and/or other similar personality rights; however, to
|
| 194 |
+
the extent possible, the Licensor waives and/or agrees not to
|
| 195 |
+
assert any such rights held by the Licensor to the limited
|
| 196 |
+
extent necessary to allow You to exercise the Licensed
|
| 197 |
+
Rights, but not otherwise.
|
| 198 |
+
|
| 199 |
+
2. Patent and trademark rights are not licensed under this
|
| 200 |
+
Public License.
|
| 201 |
+
|
| 202 |
+
3. To the extent possible, the Licensor waives any right to
|
| 203 |
+
collect royalties from You for the exercise of the Licensed
|
| 204 |
+
Rights, whether directly or through a collecting society
|
| 205 |
+
under any voluntary or waivable statutory or compulsory
|
| 206 |
+
licensing scheme. In all other cases the Licensor expressly
|
| 207 |
+
reserves any right to collect such royalties.
|
| 208 |
+
|
| 209 |
+
|
| 210 |
+
Section 3 -- License Conditions.
|
| 211 |
+
|
| 212 |
+
Your exercise of the Licensed Rights is expressly made subject to the
|
| 213 |
+
following conditions.
|
| 214 |
+
|
| 215 |
+
a. Attribution.
|
| 216 |
+
|
| 217 |
+
1. If You Share the Licensed Material (including in modified
|
| 218 |
+
form), You must:
|
| 219 |
+
|
| 220 |
+
a. retain the following if it is supplied by the Licensor
|
| 221 |
+
with the Licensed Material:
|
| 222 |
+
|
| 223 |
+
i. identification of the creator(s) of the Licensed
|
| 224 |
+
Material and any others designated to receive
|
| 225 |
+
attribution, in any reasonable manner requested by
|
| 226 |
+
the Licensor (including by pseudonym if
|
| 227 |
+
designated);
|
| 228 |
+
|
| 229 |
+
ii. a copyright notice;
|
| 230 |
+
|
| 231 |
+
iii. a notice that refers to this Public License;
|
| 232 |
+
|
| 233 |
+
iv. a notice that refers to the disclaimer of
|
| 234 |
+
warranties;
|
| 235 |
+
|
| 236 |
+
v. a URI or hyperlink to the Licensed Material to the
|
| 237 |
+
extent reasonably practicable;
|
| 238 |
+
|
| 239 |
+
b. indicate if You modified the Licensed Material and
|
| 240 |
+
retain an indication of any previous modifications; and
|
| 241 |
+
|
| 242 |
+
c. indicate the Licensed Material is licensed under this
|
| 243 |
+
Public License, and include the text of, or the URI or
|
| 244 |
+
hyperlink to, this Public License.
|
| 245 |
+
|
| 246 |
+
2. You may satisfy the conditions in Section 3(a)(1) in any
|
| 247 |
+
reasonable manner based on the medium, means, and context in
|
| 248 |
+
which You Share the Licensed Material. For example, it may be
|
| 249 |
+
reasonable to satisfy the conditions by providing a URI or
|
| 250 |
+
hyperlink to a resource that includes the required
|
| 251 |
+
information.
|
| 252 |
+
|
| 253 |
+
3. If requested by the Licensor, You must remove any of the
|
| 254 |
+
information required by Section 3(a)(1)(A) to the extent
|
| 255 |
+
reasonably practicable.
|
| 256 |
+
|
| 257 |
+
4. If You Share Adapted Material You produce, the Adapter's
|
| 258 |
+
License You apply must not prevent recipients of the Adapted
|
| 259 |
+
Material from complying with this Public License.
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
Section 4 -- Sui Generis Database Rights.
|
| 263 |
+
|
| 264 |
+
Where the Licensed Rights include Sui Generis Database Rights that
|
| 265 |
+
apply to Your use of the Licensed Material:
|
| 266 |
+
|
| 267 |
+
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
| 268 |
+
to extract, reuse, reproduce, and Share all or a substantial
|
| 269 |
+
portion of the contents of the database;
|
| 270 |
+
|
| 271 |
+
b. if You include all or a substantial portion of the database
|
| 272 |
+
contents in a database in which You have Sui Generis Database
|
| 273 |
+
Rights, then the database in which You have Sui Generis Database
|
| 274 |
+
Rights (but not its individual contents) is Adapted Material; and
|
| 275 |
+
|
| 276 |
+
c. You must comply with the conditions in Section 3(a) if You Share
|
| 277 |
+
all or a substantial portion of the contents of the database.
|
| 278 |
+
|
| 279 |
+
For the avoidance of doubt, this Section 4 supplements and does not
|
| 280 |
+
replace Your obligations under this Public License where the Licensed
|
| 281 |
+
Rights include other Copyright and Similar Rights.
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
| 285 |
+
|
| 286 |
+
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
| 287 |
+
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
| 288 |
+
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
| 289 |
+
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
| 290 |
+
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
| 291 |
+
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
| 292 |
+
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
| 293 |
+
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
| 294 |
+
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
| 295 |
+
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
| 296 |
+
|
| 297 |
+
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
| 298 |
+
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
| 299 |
+
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
| 300 |
+
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
| 301 |
+
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
| 302 |
+
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
| 303 |
+
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
| 304 |
+
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
| 305 |
+
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
| 306 |
+
|
| 307 |
+
c. The disclaimer of warranties and limitation of liability provided
|
| 308 |
+
above shall be interpreted in a manner that, to the extent
|
| 309 |
+
possible, most closely approximates an absolute disclaimer and
|
| 310 |
+
waiver of all liability.
|
| 311 |
+
|
| 312 |
+
|
| 313 |
+
Section 6 -- Term and Termination.
|
| 314 |
+
|
| 315 |
+
a. This Public License applies for the term of the Copyright and
|
| 316 |
+
Similar Rights licensed here. However, if You fail to comply with
|
| 317 |
+
this Public License, then Your rights under this Public License
|
| 318 |
+
terminate automatically.
|
| 319 |
+
|
| 320 |
+
b. Where Your right to use the Licensed Material has terminated under
|
| 321 |
+
Section 6(a), it reinstates:
|
| 322 |
+
|
| 323 |
+
1. automatically as of the date the violation is cured, provided
|
| 324 |
+
it is cured within 30 days of Your discovery of the
|
| 325 |
+
violation; or
|
| 326 |
+
|
| 327 |
+
2. upon express reinstatement by the Licensor.
|
| 328 |
+
|
| 329 |
+
For the avoidance of doubt, this Section 6(b) does not affect any
|
| 330 |
+
right the Licensor may have to seek remedies for Your violations
|
| 331 |
+
of this Public License.
|
| 332 |
+
|
| 333 |
+
c. For the avoidance of doubt, the Licensor may also offer the
|
| 334 |
+
Licensed Material under separate terms or conditions or stop
|
| 335 |
+
distributing the Licensed Material at any time; however, doing so
|
| 336 |
+
will not terminate this Public License.
|
| 337 |
+
|
| 338 |
+
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
| 339 |
+
License.
|
| 340 |
+
|
| 341 |
+
|
| 342 |
+
Section 7 -- Other Terms and Conditions.
|
| 343 |
+
|
| 344 |
+
a. The Licensor shall not be bound by any additional or different
|
| 345 |
+
terms or conditions communicated by You unless expressly agreed.
|
| 346 |
+
|
| 347 |
+
b. Any arrangements, understandings, or agreements regarding the
|
| 348 |
+
Licensed Material not stated herein are separate from and
|
| 349 |
+
independent of the terms and conditions of this Public License.
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
Section 8 -- Interpretation.
|
| 353 |
+
|
| 354 |
+
a. For the avoidance of doubt, this Public License does not, and
|
| 355 |
+
shall not be interpreted to, reduce, limit, restrict, or impose
|
| 356 |
+
conditions on any use of the Licensed Material that could lawfully
|
| 357 |
+
be made without permission under this Public License.
|
| 358 |
+
|
| 359 |
+
b. To the extent possible, if any provision of this Public License is
|
| 360 |
+
deemed unenforceable, it shall be automatically reformed to the
|
| 361 |
+
minimum extent necessary to make it enforceable. If the provision
|
| 362 |
+
cannot be reformed, it shall be severed from this Public License
|
| 363 |
+
without affecting the enforceability of the remaining terms and
|
| 364 |
+
conditions.
|
| 365 |
+
|
| 366 |
+
c. No term or condition of this Public License will be waived and no
|
| 367 |
+
failure to comply consented to unless expressly agreed to by the
|
| 368 |
+
Licensor.
|
| 369 |
+
|
| 370 |
+
d. Nothing in this Public License constitutes or may be interpreted
|
| 371 |
+
as a limitation upon, or waiver of, any privileges and immunities
|
| 372 |
+
that apply to the Licensor or You, including from the legal
|
| 373 |
+
processes of any jurisdiction or authority.
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
=======================================================================
|
| 377 |
+
|
| 378 |
+
Creative Commons is not a party to its public
|
| 379 |
+
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
| 380 |
+
its public licenses to material it publishes and in those instances
|
| 381 |
+
will be considered the “Licensor.” The text of the Creative Commons
|
| 382 |
+
public licenses is dedicated to the public domain under the CC0 Public
|
| 383 |
+
Domain Dedication. Except for the limited purpose of indicating that
|
| 384 |
+
material is shared under a Creative Commons public license or as
|
| 385 |
+
otherwise permitted by the Creative Commons policies published at
|
| 386 |
+
creativecommons.org/policies, Creative Commons does not authorize the
|
| 387 |
+
use of the trademark "Creative Commons" or any other trademark or logo
|
| 388 |
+
of Creative Commons without its prior written consent including,
|
| 389 |
+
without limitation, in connection with any unauthorized modifications
|
| 390 |
+
to any of its public licenses or any other arrangements,
|
| 391 |
+
understandings, or agreements concerning use of licensed material. For
|
| 392 |
+
the avoidance of doubt, this paragraph does not form part of the
|
| 393 |
+
public licenses.
|
| 394 |
+
|
| 395 |
+
Creative Commons may be contacted at creativecommons.org.
|
NOTICE
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Hyperion Gray Cybermodels. The adapter is licensed under Apache-2.0 (LICENSE-ADAPTER). ask.py is Apache-2.0. The other Python programs are GPLv3 (COPYING). Authored notes and questions are CC BY 4.0 (LICENSE-DATA). Adapted Microsoft documentation in the Windows index is CC BY 4.0. See sources/ for attribution and original notices. Qwen provides the separately downloaded base checkpoint under Apache-2.0.
|
README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
base_model: HyperionGrayAI/qwennifer-flash-bf16
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- lora
|
| 8 |
+
- retrieval-augmented-generation
|
| 9 |
+
- qwennifer
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Cybermodels Fused v0.1
|
| 13 |
+
|
| 14 |
+
A single rank-12 PEFT adapter for Windows internals, Linux driver maintenance and browser-facing web defense. Hyperion Gray combined all three v0.1 rank-four output-head adapters at weight 1 each. The update equals the sum of the three trained linear updates, up to floating-point rounding. The individual models were trained using GPUless on a frozen packed Qwennifer Flash base. No additional training took place during the merge. The `lm_head` update affects 553 vocabulary rows. The three reference indexes provide the supporting material at inference.
|
| 15 |
+
|
| 16 |
+
## Ask a question
|
| 17 |
+
|
| 18 |
+
Download this adapter repository. Install CUDA PyTorch, Transformers, Accelerate and PEFT. From its root:
|
| 19 |
+
|
| 20 |
+
```sh
|
| 21 |
+
python ask.py --adapter . "$(python team_brief.py 'Can a browser cache a response with Cache-Control: no-cache?')"
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
This loads the stock [Qwennifer Flash BF16 reference](https://huggingface.co/HyperionGrayAI/qwennifer-flash-bf16/tree/v0.1). Its weights alone need 148.4 GiB, with additional memory for generation. The command requires GPU residency by default. To run explicitly in host RAM, add `--device cpu`. Programmatic users can attach this release via `PeftModel.from_pretrained(base, "HyperionGrayAI/cybermodels-fused", revision="v0.1")`. Enable retrieval independently with `team_brief.py`.
|
| 25 |
+
|
| 26 |
+
## Reproduce the merge and comparison
|
| 27 |
+
|
| 28 |
+
The [team dataset](https://huggingface.co/datasets/HyperionGrayAI/cybermodels-team/tree/v0.1) contains the training and held-out examples and the original council definition. Download that dataset, run its `download_team.py ./members`, and copy its `catalog.json` to `./members/catalog.json`. Run this release's `python fuse.py ./members ./rebuilt` to recreate the adapter. See `fusion.json` for the version and SHA-256 of each component.
|
| 29 |
+
|
| 30 |
+
Run `python compare.py` from the adapter directory to record GPU placement and compare plain versus fused BF16 answers for the three questions in `cases.json`. Both arms use the same source passages and greedy decoding. Benchmark reports are published separately. The system can misstate source facts and present paraphrases as quotations. Check exact wording against the linked documents.
|
| 31 |
+
|
| 32 |
+
The adapter weights and new BF16 reference helper are Apache-2.0. The included retrieval software is GPLv3. Original authored reference notes and the adapted Windows reference content are CC BY 4.0. Source notices, upstream revisions and attribution are included in `sources/`. The scripting license details are in NOTICE.
|
adapter_config.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"peft_type": "LORA",
|
| 3 |
+
"task_type": "CAUSAL_LM",
|
| 4 |
+
"inference_mode": true,
|
| 5 |
+
"base_model_name_or_path": "HyperionGrayAI/qwennifer-flash-bf16",
|
| 6 |
+
"revision": "v0.1",
|
| 7 |
+
"r": 12,
|
| 8 |
+
"lora_alpha": 12,
|
| 9 |
+
"lora_dropout": 0.0,
|
| 10 |
+
"bias": "none",
|
| 11 |
+
"fan_in_fan_out": false,
|
| 12 |
+
"use_rslora": false,
|
| 13 |
+
"use_dora": false,
|
| 14 |
+
"target_modules": [
|
| 15 |
+
"lm_head"
|
| 16 |
+
],
|
| 17 |
+
"rank_pattern": {},
|
| 18 |
+
"alpha_pattern": {}
|
| 19 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9216863fa682b24cd8dc7d9d67e07744b2a0dad51e06917c76639b289dfdbc2f
|
| 3 |
+
size 7391480
|
ask.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Generate an answer with a GPU-resident stock Transformers BF16 reference."""
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
|
| 5 |
+
import torch
|
| 6 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 7 |
+
|
| 8 |
+
BASE = "HyperionGrayAI/qwennifer-flash-bf16"
|
| 9 |
+
REVISION = "v0.1"
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def load(base=BASE, revision=REVISION, device="cuda"):
|
| 13 |
+
if device == "cuda" and not torch.cuda.is_available():
|
| 14 |
+
raise RuntimeError(
|
| 15 |
+
"CUDA is required for GPU-resident serving. For a host-memory control, choose --device cpu."
|
| 16 |
+
)
|
| 17 |
+
kwargs = {"revision": revision, "dtype": torch.bfloat16, "trust_remote_code": False}
|
| 18 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
| 19 |
+
base, revision=revision, trust_remote_code=False
|
| 20 |
+
)
|
| 21 |
+
if device == "cuda":
|
| 22 |
+
free = [torch.cuda.mem_get_info(i)[0] for i in range(torch.cuda.device_count())]
|
| 23 |
+
if sum(free) < 159348782592:
|
| 24 |
+
raise RuntimeError(
|
| 25 |
+
"The BF16 weights alone need 148.4 GiB. Supply enough free GPU memory plus room for context."
|
| 26 |
+
)
|
| 27 |
+
kwargs["device_map"] = "auto"
|
| 28 |
+
else:
|
| 29 |
+
kwargs["device_map"] = {"": "cpu"}
|
| 30 |
+
model = AutoModelForCausalLM.from_pretrained(base, **kwargs).eval()
|
| 31 |
+
if model.config.num_experts_per_tok != 6:
|
| 32 |
+
raise ValueError("The model configuration must route six experts per token.")
|
| 33 |
+
if device == "cuda" and (
|
| 34 |
+
any(p.device.type != "cuda" for p in model.parameters())
|
| 35 |
+
or any(str(d) in ("cpu", "disk", "meta") for d in model.hf_device_map.values())
|
| 36 |
+
):
|
| 37 |
+
raise RuntimeError(
|
| 38 |
+
"The device map offloaded part of the checkpoint. Provide more GPU memory or use --device cpu."
|
| 39 |
+
)
|
| 40 |
+
return model, tokenizer
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
@torch.inference_mode()
|
| 44 |
+
def generate(model, tokenizer, question, max_tokens):
|
| 45 |
+
text = tokenizer.apply_chat_template(
|
| 46 |
+
[{"role": "user", "content": question}],
|
| 47 |
+
tokenize=False,
|
| 48 |
+
add_generation_prompt=True,
|
| 49 |
+
)
|
| 50 |
+
inputs = tokenizer(text, add_special_tokens=False, return_tensors="pt").to(
|
| 51 |
+
model.get_input_embeddings().weight.device
|
| 52 |
+
)
|
| 53 |
+
output = model.generate(**inputs, max_new_tokens=max_tokens, do_sample=False)
|
| 54 |
+
suffix = output[0, inputs.input_ids.shape[1] :]
|
| 55 |
+
return (
|
| 56 |
+
tokenizer.decode(suffix, skip_special_tokens=True),
|
| 57 |
+
int(inputs.input_ids.shape[1]),
|
| 58 |
+
int(suffix.numel()),
|
| 59 |
+
)
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
if __name__ == "__main__":
|
| 63 |
+
p = argparse.ArgumentParser(description=__doc__)
|
| 64 |
+
p.add_argument("question")
|
| 65 |
+
p.add_argument("--adapter", help="PEFT adapter directory or Hub model ID")
|
| 66 |
+
p.add_argument("--adapter-revision", default="v0.1")
|
| 67 |
+
p.add_argument("--max-tokens", type=int, default=160)
|
| 68 |
+
p.add_argument("--device", choices=["cuda", "cpu"], default="cuda")
|
| 69 |
+
args = p.parse_args()
|
| 70 |
+
model, tokenizer = load(device=args.device)
|
| 71 |
+
if args.adapter:
|
| 72 |
+
from peft import PeftModel
|
| 73 |
+
|
| 74 |
+
model = PeftModel.from_pretrained(
|
| 75 |
+
model, args.adapter, revision=args.adapter_revision
|
| 76 |
+
).eval()
|
| 77 |
+
print(generate(model, tokenizer, args.question, args.max_tokens)[0])
|
cases.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"id": "shared-index",
|
| 4 |
+
"question": "Our Windows worker pool assigns each thread a different request ID using one allocated TLS index. Our web session cookie has HttpOnly. Must we allocate a TLS index per worker, and can browser JavaScript read our cookie value through document.cookie? Answer both in at most 70 words. Link the supporting documentation and paraphrase it.",
|
| 5 |
+
"criteria": ["One Windows TLS index can name a distinct slot in each thread.", "HttpOnly prevents JavaScript from reading the cookie via document.cookie."],
|
| 6 |
+
"source_terms": ["thread-local-storage", "set-cookie"]
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"id": "handoff-cache",
|
| 10 |
+
"question": "A Linux driver queues a pointer for a worker, then drops its own kref. When should it take the worker's reference relative to the handoff? Separately, an HTTP response in our dashboard carries Cache-Control: no-cache. Can a cache store it and what must happen before reuse? Answer both in at most 70 words. Link the supporting documentation and paraphrase it.",
|
| 11 |
+
"criteria": ["Take the worker reference before publishing or handing over the pointer.", "Storage is allowed and the cache must successfully validate before reuse."],
|
| 12 |
+
"source_terms": ["kref", "cache-control"]
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"id": "missing-observations",
|
| 16 |
+
"question": "An incident note says Windows semaphore waits are FIFO and our production site's HSTS policy was active yesterday. We have no browser policy state or captured HTTPS responses. Is FIFO guaranteed, and can the note establish yesterday's browser policy? Answer both in at most 70 words. Link the supporting documentation and paraphrase it.",
|
| 17 |
+
"criteria": ["Windows semaphores do not guarantee FIFO selection.", "The supplied evidence cannot establish the historical HSTS state."],
|
| 18 |
+
"source_terms": ["semaphore-objects", "strict-transport-security"]
|
| 19 |
+
}
|
| 20 |
+
]
|
compare.py
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Compare the bare reference and fused adapter on identical evidence and decoding settings."""
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
import json
|
| 5 |
+
import time
|
| 6 |
+
from contextlib import nullcontext
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
import peft
|
| 10 |
+
import torch
|
| 11 |
+
import transformers
|
| 12 |
+
from ask import BASE, REVISION, generate, load
|
| 13 |
+
|
| 14 |
+
from team_brief import brief
|
| 15 |
+
|
| 16 |
+
ROOT = Path(__file__).resolve().parent
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def emit(data):
|
| 20 |
+
print("CYBERMODELS_RESULT " + json.dumps(data, ensure_ascii=False), flush=True)
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def compare(args):
|
| 24 |
+
if args.device == "cpu":
|
| 25 |
+
torch.set_num_threads(args.threads)
|
| 26 |
+
start = time.monotonic()
|
| 27 |
+
model, tok = load(args.base, args.revision, args.device)
|
| 28 |
+
model = peft.PeftModel.from_pretrained(
|
| 29 |
+
model, args.adapter, revision=args.adapter_revision
|
| 30 |
+
).eval()
|
| 31 |
+
devices = {}
|
| 32 |
+
for p in model.parameters():
|
| 33 |
+
device = str(p.device)
|
| 34 |
+
devices[device] = devices.get(device, 0) + p.numel() * p.element_size()
|
| 35 |
+
if args.device == "cuda" and any(
|
| 36 |
+
not device.startswith("cuda:") for device in devices
|
| 37 |
+
):
|
| 38 |
+
raise ValueError("Base and adapter must both reside on CUDA")
|
| 39 |
+
emit(
|
| 40 |
+
{
|
| 41 |
+
"type": "placement",
|
| 42 |
+
"load_seconds": round(time.monotonic() - start, 2),
|
| 43 |
+
"device_parameter_bytes": devices,
|
| 44 |
+
"torch": torch.__version__,
|
| 45 |
+
"transformers": transformers.__version__,
|
| 46 |
+
"peft": peft.__version__,
|
| 47 |
+
"experts_per_token": model.config.num_experts_per_tok,
|
| 48 |
+
"expert_count": model.config.num_experts,
|
| 49 |
+
"cuda_devices": [
|
| 50 |
+
torch.cuda.get_device_name(i) for i in range(torch.cuda.device_count())
|
| 51 |
+
]
|
| 52 |
+
if args.device == "cuda"
|
| 53 |
+
else [],
|
| 54 |
+
"dtype": str(model.get_input_embeddings().weight.dtype),
|
| 55 |
+
}
|
| 56 |
+
)
|
| 57 |
+
for enabled in [False, True]:
|
| 58 |
+
with nullcontext() if enabled else model.disable_adapter():
|
| 59 |
+
generate(model, tok, "Reply with the digit 7.", 2)
|
| 60 |
+
for i, case in enumerate(json.loads((ROOT / "cases.json").read_text())):
|
| 61 |
+
question = brief(ROOT, case["question"])
|
| 62 |
+
for enabled in [False, True] if i % 2 == 0 else [True, False]:
|
| 63 |
+
with nullcontext() if enabled else model.disable_adapter():
|
| 64 |
+
start = time.monotonic()
|
| 65 |
+
answer, inputs, output = generate(model, tok, question, args.max_tokens)
|
| 66 |
+
elapsed = time.monotonic() - start
|
| 67 |
+
emit(
|
| 68 |
+
{
|
| 69 |
+
"type": "answer",
|
| 70 |
+
"case": case["id"],
|
| 71 |
+
"mode": "fused" if enabled else "plain",
|
| 72 |
+
"input_tokens": inputs,
|
| 73 |
+
"output_tokens": output,
|
| 74 |
+
"max_tokens": args.max_tokens,
|
| 75 |
+
"seconds": round(elapsed, 3),
|
| 76 |
+
"answer": answer,
|
| 77 |
+
}
|
| 78 |
+
)
|
| 79 |
+
emit({"type": "complete"})
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
if __name__ == "__main__":
|
| 83 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 84 |
+
parser.add_argument("--base", default=BASE)
|
| 85 |
+
parser.add_argument("--revision", default=REVISION)
|
| 86 |
+
parser.add_argument("--adapter", default=str(ROOT))
|
| 87 |
+
parser.add_argument("--adapter-revision", default=REVISION)
|
| 88 |
+
parser.add_argument("--device", choices=["cuda", "cpu"], default="cuda")
|
| 89 |
+
parser.add_argument("--max-tokens", type=int, default=240)
|
| 90 |
+
parser.add_argument("--threads", type=int, default=12)
|
| 91 |
+
compare(parser.parse_args())
|
fuse.py
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Build a single PEFT output-head adapter from the tagged Cybermodels specialists."""
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
import hashlib
|
| 5 |
+
import json
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
import numpy as np
|
| 9 |
+
from safetensors.numpy import load_file, save_file
|
| 10 |
+
|
| 11 |
+
BASE = "HyperionGrayAI/qwennifer-flash-bf16"
|
| 12 |
+
PREFIX = "base_model.model.lm_head.lora_"
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def build(sources, output, revision):
|
| 16 |
+
catalog = json.loads((sources / "catalog.json").read_text())
|
| 17 |
+
a_blocks, b_blocks, members = [], [], []
|
| 18 |
+
reference = None
|
| 19 |
+
for member in catalog["models"]:
|
| 20 |
+
model = member["model"]
|
| 21 |
+
folder = sources / model / member["revision"]
|
| 22 |
+
path = folder / "adapter_model.safetensors"
|
| 23 |
+
digest = hashlib.sha256(path.read_bytes()).hexdigest()
|
| 24 |
+
if digest != member["adapter_sha256"]:
|
| 25 |
+
raise ValueError(f"Unexpected source weights for {model}")
|
| 26 |
+
config = json.loads((folder / "adapter_config.json").read_text())
|
| 27 |
+
if (
|
| 28 |
+
config["target_modules"] != ["lm_head"]
|
| 29 |
+
or config["bias"] != "none"
|
| 30 |
+
or config["use_rslora"]
|
| 31 |
+
or config["use_dora"]
|
| 32 |
+
or config["fan_in_fan_out"]
|
| 33 |
+
or config.get("modules_to_save")
|
| 34 |
+
or config.get("rank_pattern")
|
| 35 |
+
or config.get("alpha_pattern")
|
| 36 |
+
):
|
| 37 |
+
raise ValueError(f"Unsupported source adapter configuration for {model}")
|
| 38 |
+
if reference is None:
|
| 39 |
+
reference = config
|
| 40 |
+
for key in ("base_model_name_or_path", "revision"):
|
| 41 |
+
if reference[key] != config[key]:
|
| 42 |
+
raise ValueError(f"Source bases differ for {model}")
|
| 43 |
+
weights = load_file(str(path))
|
| 44 |
+
a, b = (weights[PREFIX + key + ".weight"] for key in ("A", "B"))
|
| 45 |
+
if (
|
| 46 |
+
set(weights) != {PREFIX + k + ".weight" for k in ("A", "B")}
|
| 47 |
+
or a.shape[0] != config["r"]
|
| 48 |
+
or b.shape[1] != config["r"]
|
| 49 |
+
):
|
| 50 |
+
raise ValueError(f"Unexpected source structure for {model}")
|
| 51 |
+
a_blocks.append(a)
|
| 52 |
+
b_blocks.append(b * (config["lora_alpha"] / config["r"]))
|
| 53 |
+
members.append(
|
| 54 |
+
{
|
| 55 |
+
"model": model,
|
| 56 |
+
"revision": member["revision"],
|
| 57 |
+
"sha256": digest,
|
| 58 |
+
"weight": 1.0,
|
| 59 |
+
}
|
| 60 |
+
)
|
| 61 |
+
a = np.concatenate(a_blocks, axis=0)
|
| 62 |
+
b = np.concatenate(b_blocks, axis=1)
|
| 63 |
+
output.mkdir(parents=True, exist_ok=False)
|
| 64 |
+
config = dict(
|
| 65 |
+
reference,
|
| 66 |
+
base_model_name_or_path=BASE,
|
| 67 |
+
revision=revision,
|
| 68 |
+
r=a.shape[0],
|
| 69 |
+
lora_alpha=a.shape[0],
|
| 70 |
+
)
|
| 71 |
+
(output / "adapter_config.json").write_text(json.dumps(config, indent=2) + "\n")
|
| 72 |
+
save_file(
|
| 73 |
+
{PREFIX + "A.weight": a, PREFIX + "B.weight": b},
|
| 74 |
+
str(output / "adapter_model.safetensors"),
|
| 75 |
+
metadata={"format": "pt"},
|
| 76 |
+
)
|
| 77 |
+
provenance = {
|
| 78 |
+
"base": BASE,
|
| 79 |
+
"base_revision": revision,
|
| 80 |
+
"members": members,
|
| 81 |
+
"method": "Equal-weight sum of output-head deltas via rank concatenation",
|
| 82 |
+
"rank": a.shape[0],
|
| 83 |
+
"changed_vocabulary_rows": int(np.any(b, axis=1).sum()),
|
| 84 |
+
}
|
| 85 |
+
(output / "fusion.json").write_text(json.dumps(provenance, indent=2) + "\n")
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
if __name__ == "__main__":
|
| 89 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 90 |
+
parser.add_argument(
|
| 91 |
+
"sources",
|
| 92 |
+
type=Path,
|
| 93 |
+
help="Directory containing catalog.json and the output of the team dataset's download_team.py",
|
| 94 |
+
)
|
| 95 |
+
parser.add_argument("output", type=Path)
|
| 96 |
+
parser.add_argument("--revision", default="v0.1")
|
| 97 |
+
args = parser.parse_args()
|
| 98 |
+
build(args.sources, args.output, args.revision)
|
fusion-check.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tested_hidden_vectors": 32,
|
| 3 |
+
"max_absolute_difference_in_logit_delta": 8.344650268554688e-07,
|
| 4 |
+
"dtype": "float32",
|
| 5 |
+
"method": "On captured Flash hidden states, compared the three individual head updates against a stock PEFT-loaded rank-12 adapter on an isolated zero reference head."
|
| 6 |
+
}
|
fusion.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base": "HyperionGrayAI/qwennifer-flash-bf16",
|
| 3 |
+
"base_revision": "v0.1",
|
| 4 |
+
"members": [
|
| 5 |
+
{
|
| 6 |
+
"model": "cybermodels-windows",
|
| 7 |
+
"revision": "v0.1",
|
| 8 |
+
"sha256": "7f161a35e82e3edf364e69736e673334de469eaa4fd9a0e1cc8b4ccfefa16955",
|
| 9 |
+
"weight": 1.0
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"model": "cybermodels-linux-drivers",
|
| 13 |
+
"revision": "v0.1",
|
| 14 |
+
"sha256": "afccb1ccb2cc9c40b0a4e727ea877db8b96f24df55eca8f2445aa3187c1c6c8d",
|
| 15 |
+
"weight": 1.0
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"model": "cybermodels-web-defense",
|
| 19 |
+
"revision": "v0.1",
|
| 20 |
+
"sha256": "1925ef0decdf5f7c305c18958de856c2bb2ced0cb55aac167c2c96f5c03edc1c",
|
| 21 |
+
"weight": 1.0
|
| 22 |
+
}
|
| 23 |
+
],
|
| 24 |
+
"method": "Equal-weight sum of output-head deltas via rank concatenation",
|
| 25 |
+
"rank": 12,
|
| 26 |
+
"changed_vocabulary_rows": 553
|
| 27 |
+
}
|
reference.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Bounded, offline retrieval for Windows Cybermodels."""
|
| 2 |
+
|
| 3 |
+
import re
|
| 4 |
+
import sqlite3
|
| 5 |
+
from contextlib import closing
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
STOP = frozenset(
|
| 9 |
+
"""a an and are as at be by can could did do does for from how i if in is it its my of on one or
|
| 10 |
+
should tell that the their there these this to use was what when where which why will windows with would""".split()
|
| 11 |
+
)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
def retrieve(database: Path, question: str):
|
| 15 |
+
words = dict.fromkeys(
|
| 16 |
+
t
|
| 17 |
+
for t in re.findall(r"[a-z0-9_]+", question.lower())
|
| 18 |
+
if t not in STOP and len(t) > 1
|
| 19 |
+
)
|
| 20 |
+
if not words:
|
| 21 |
+
return []
|
| 22 |
+
query = " OR ".join(f'"{term}"' for term in list(words)[:64])
|
| 23 |
+
with closing(
|
| 24 |
+
sqlite3.connect(database.resolve().as_uri() + "?mode=ro", uri=True)
|
| 25 |
+
) as db:
|
| 26 |
+
rows = db.execute(
|
| 27 |
+
"SELECT title, body, url, source FROM passages WHERE passages MATCH ? "
|
| 28 |
+
"ORDER BY bm25(passages, 3, 1, 0, 0), rowid LIMIT 10",
|
| 29 |
+
(query,),
|
| 30 |
+
)
|
| 31 |
+
hits = []
|
| 32 |
+
for title, body, url, source in rows:
|
| 33 |
+
if any(hit["id"] == source for hit in hits):
|
| 34 |
+
continue
|
| 35 |
+
hits.append(dict(id=source, title=title, body=body, url=url))
|
| 36 |
+
if len(hits) == 2:
|
| 37 |
+
break
|
| 38 |
+
return hits
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def evidence_prompt(question, hits):
|
| 42 |
+
evidence = "\n\n".join(f"[{h['title']}]({h['url']})\n{h['body']}" for h in hits)
|
| 43 |
+
return (
|
| 44 |
+
"Answer the Windows question concisely. Use the applicable reference and cite its link. "
|
| 45 |
+
"If the references do not establish the answer, identify the missing information.\n\n"
|
| 46 |
+
+ (evidence or "(No matching reference.)")
|
| 47 |
+
+ "\n\nQuestion: "
|
| 48 |
+
+ question
|
| 49 |
+
)
|
sources/cybermodels-linux-drivers/NOTICE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Hyperion Gray releases the adapter under Apache-2.0 (LICENSE-ADAPTER), its original editorial summaries and examples under CC BY 4.0 (LICENSE-DATA), and the included software under GPLv3 (COPYING). The Qwen team supplies the separately downloaded Apache-2.0 base. Each note is an original paraphrase. The external source owners retain their rights in the linked documentation. See data/sources.json for attribution and exact source revisions.
|
sources/cybermodels-linux-drivers/references.sqlite
ADDED
|
Binary file (24.6 kB). View file
|
|
|
sources/cybermodels-linux-drivers/sources.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"id": "devres",
|
| 4 |
+
"url": "https://docs.kernel.org/6.12/driver-api/driver-model/devres.html",
|
| 5 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/driver-api/driver-model/devres.rst",
|
| 6 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 7 |
+
"sha256": "5c1cfcdb1aecf80a62817b56c001fe941a54dcbcb565c80c52d597856cf4ab80"
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"id": "dma",
|
| 11 |
+
"url": "https://docs.kernel.org/6.12/core-api/dma-api-howto.html",
|
| 12 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/core-api/dma-api-howto.rst",
|
| 13 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 14 |
+
"sha256": "abe4374de5908e154080ee6452667af79605c8bd21bf22cbbfb9c632f067e7c0"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"id": "binding",
|
| 18 |
+
"url": "https://docs.kernel.org/6.12/driver-api/driver-model/driver.html",
|
| 19 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/driver-api/driver-model/driver.rst",
|
| 20 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 21 |
+
"sha256": "26888df4ebaa27d1b351494d2d31da6540607d7f40d47904351b1cddebe275d0"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"id": "sysfs",
|
| 25 |
+
"url": "https://docs.kernel.org/6.12/filesystems/sysfs.html",
|
| 26 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/filesystems/sysfs.rst",
|
| 27 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 28 |
+
"sha256": "2b9acca3fbb9730e25ed5c5124f67b9dc37acc057f3fcad22e603cd400555e7a"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"id": "runtime-pm",
|
| 32 |
+
"url": "https://docs.kernel.org/6.12/power/runtime_pm.html",
|
| 33 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/power/runtime_pm.rst",
|
| 34 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 35 |
+
"sha256": "046315b56c44d9233370895c8359e73df847a924aec3b947e15444c2773c3869"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"id": "bus",
|
| 39 |
+
"url": "https://docs.kernel.org/6.12/driver-api/driver-model/bus.html",
|
| 40 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/driver-api/driver-model/bus.rst",
|
| 41 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 42 |
+
"sha256": "57fa8cb92e0e630cc48edddab4d25ebbf468df6139180218c66f3f52d7c83e00"
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"id": "kref",
|
| 46 |
+
"url": "https://docs.kernel.org/6.12/core-api/kref.html",
|
| 47 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/core-api/kref.rst",
|
| 48 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 49 |
+
"sha256": "5724ae3846fa826b8678e909d41ba7ec43c37713f42335cc14f3b080181893e6"
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"id": "workqueue",
|
| 53 |
+
"url": "https://docs.kernel.org/6.12/core-api/workqueue.html",
|
| 54 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/core-api/workqueue.rst",
|
| 55 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 56 |
+
"sha256": "c406ea880503a459a44d5152f13f058f31ccd55f70cbd59cc772d7d812cb8145"
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"id": "device-links",
|
| 60 |
+
"url": "https://docs.kernel.org/6.12/driver-api/device_link.html",
|
| 61 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/driver-api/device_link.rst",
|
| 62 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 63 |
+
"sha256": "eb66a6b08f54d69fcbfad66a446ff2648fc67ef36996854425501dbfdbae9edd"
|
| 64 |
+
}
|
| 65 |
+
]
|
sources/cybermodels-linux-drivers/specialist.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "cybermodels-linux-drivers",
|
| 3 |
+
"topic": "Linux driver maintenance",
|
| 4 |
+
"summary": "Driver resource lifetime, DMA ownership, device binding and power management in Linux 6.12."
|
| 5 |
+
}
|
sources/cybermodels-linux-drivers/specialist.toml
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model = "cybermodels-linux-drivers"
|
| 2 |
+
topic = "Linux driver maintenance"
|
| 3 |
+
summary = "Driver resource lifetime, DMA ownership, device binding and power management in Linux 6.12."
|
| 4 |
+
source_root = "https://docs.kernel.org/6.12/"
|
| 5 |
+
source_revision = "v6.12"
|
| 6 |
+
|
| 7 |
+
[[source]]
|
| 8 |
+
id = "devres"
|
| 9 |
+
title = "Managed device resources"
|
| 10 |
+
path = "driver-api/driver-model/devres.html"
|
| 11 |
+
notes = "A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release."
|
| 12 |
+
qa = [
|
| 13 |
+
["Why use a managed device allocation during probe?", "Its lifetime is tied to the device binding. The driver core releases it on failed probe or detach."],
|
| 14 |
+
["How can a driver unwind a set of managed acquisitions together?", "Use a devres group for the related acquisitions and release the group on failure."],
|
| 15 |
+
["Does managed cleanup alone stop asynchronous users of the allocation?", "The driver must arrange for outstanding users to stop before the resource is released."]
|
| 16 |
+
]
|
| 17 |
+
|
| 18 |
+
[[source]]
|
| 19 |
+
id = "dma"
|
| 20 |
+
title = "DMA mapping, ownership and synchronization"
|
| 21 |
+
path = "core-api/dma-api-howto.html"
|
| 22 |
+
notes = "A streaming DMA mapping has a transfer direction and an ownership interval. Check whether dma_map_single succeeded with dma_mapping_error. For a reused mapping, synchronize for the CPU before examining device-written data and synchronize for the device before returning the buffer. Coherent mappings still need appropriate ordering barriers."
|
| 23 |
+
qa = [
|
| 24 |
+
["How should a driver check a dma_map_single result before submitting it?", "Call dma_mapping_error with the device and returned DMA address and handle failure before submission."],
|
| 25 |
+
["When reusing a streaming DMA buffer, when may the CPU inspect device-written data?", "After the device has finished and the mapping has been synchronized for CPU access."],
|
| 26 |
+
["Can a coherent DMA descriptor ring still need memory barriers?", "Yes. Coherent visibility alone does not order the writes that publish the descriptor."]
|
| 27 |
+
]
|
| 28 |
+
|
| 29 |
+
[[source]]
|
| 30 |
+
id = "binding"
|
| 31 |
+
title = "Driver binding and probe"
|
| 32 |
+
path = "driver-api/driver-model/driver.html"
|
| 33 |
+
notes = "Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry."
|
| 34 |
+
qa = [
|
| 35 |
+
["A driver matches the device ID. Is initialization guaranteed to have succeeded?", "Matching selects a candidate. The probe callback still has to succeed before the driver is bound."],
|
| 36 |
+
["What can probe return if a necessary supplier has not initialized yet?", "Return -EPROBE_DEFER when retrying later could resolve the missing dependency."],
|
| 37 |
+
["Can the reference tell whether my own device's probe completed this morning?", "Check the actual device binding and relevant kernel logs. The documentation cannot establish the state of your machine."]
|
| 38 |
+
]
|
| 39 |
+
|
| 40 |
+
[[source]]
|
| 41 |
+
id = "sysfs"
|
| 42 |
+
title = "Sysfs attribute conventions"
|
| 43 |
+
path = "filesystems/sysfs.html"
|
| 44 |
+
notes = "Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate."
|
| 45 |
+
qa = [
|
| 46 |
+
["Which sysfs operations implement reads and writes of an ordinary device attribute?", "The show callback supplies read data, and the store callback handles a write."],
|
| 47 |
+
["Should a new driver pack an unrelated table of text fields into one sysfs attribute?", "Use separate attributes for separate values. A small array of values of the same type is an accepted convention."],
|
| 48 |
+
["Do sysfs directories represent kernel objects or copies of every driver buffer?", "Directories reflect registered kernel objects. Their attribute files expose selected properties."]
|
| 49 |
+
]
|
| 50 |
+
|
| 51 |
+
[[source]]
|
| 52 |
+
id = "runtime-pm"
|
| 53 |
+
title = "Runtime power management usage counters"
|
| 54 |
+
path = "power/runtime_pm.html"
|
| 55 |
+
notes = "A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling."
|
| 56 |
+
qa = [
|
| 57 |
+
["How can runtime PM acquire a usage reference only if resuming succeeds?", "Use pm_runtime_resume_and_get and handle its return value before using the device."],
|
| 58 |
+
["Should a successful runtime PM resume-and-get remain unbalanced after the operation?", "Release the usage reference when the operation finishes, using the put helper appropriate to the driver's policy."],
|
| 59 |
+
["Why delay runtime autosuspend on a device with frequent short idle gaps?", "The delay can avoid repeated suspend and resume transitions between closely spaced operations."]
|
| 60 |
+
]
|
| 61 |
+
|
| 62 |
+
[[source]]
|
| 63 |
+
id = "bus"
|
| 64 |
+
title = "Linux bus device and driver registration"
|
| 65 |
+
path = "driver-api/driver-model/bus.html"
|
| 66 |
+
notes = "The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device."
|
| 67 |
+
qa = [
|
| 68 |
+
["What does a bus_type represent in the driver model?", "It describes a bus and its operations and connects the devices and drivers registered on that bus."],
|
| 69 |
+
["Who decides the bus-specific rules for matching a device to a candidate driver?", "The bus supplies the match callback."],
|
| 70 |
+
["Does adding a driver to a bus by itself prove a particular device is functioning?", "Inspect the device's binding and successful initialization. Registration by itself only makes a candidate driver available."]
|
| 71 |
+
]
|
| 72 |
+
|
| 73 |
+
[[source]]
|
| 74 |
+
id = "kref"
|
| 75 |
+
title = "Object lifetime with kref references"
|
| 76 |
+
path = "core-api/kref.html"
|
| 77 |
+
split = "test"
|
| 78 |
+
notes = "A kref tracks object lifetime. Take a reference before handing an object to another thread, and drop the reference when that owner finishes. The last put calls the release function. Acquiring a reference through a lookup that has no existing valid reference requires serialization against final release."
|
| 79 |
+
qa = [
|
| 80 |
+
["Should I take the kref before or after handing a pointer to a worker thread?", "Take a reference before the handoff so the object stays alive for the worker."],
|
| 81 |
+
["When does kref_put invoke the release callback?", "When dropping that reference brings the count to zero."],
|
| 82 |
+
["Can an unprotected table lookup race with the last kref_put?", "Yes. Serialize acquisition from that lookup with final release or use an appropriate lifetime protection scheme."]
|
| 83 |
+
]
|
| 84 |
+
|
| 85 |
+
[[source]]
|
| 86 |
+
id = "workqueue"
|
| 87 |
+
title = "Workqueue ordering and parallel execution"
|
| 88 |
+
path = "core-api/workqueue.html"
|
| 89 |
+
split = "test"
|
| 90 |
+
notes = "Queued work items execute in worker context. When strict execution order is required, an ordered workqueue processes one item at a time in queue order. A general workqueue can have multiple workers. Choosing a bound or unbound workqueue determines how work execution relates to CPU affinity."
|
| 91 |
+
qa = [
|
| 92 |
+
["Two queued work items must execute strictly in submission order. Which workqueue fits?", "Use an ordered workqueue so it runs one item at a time in queue order."],
|
| 93 |
+
["Will two unrelated work items on a general workqueue always run serially?", "No. General workqueues can execute multiple items concurrently."]
|
| 94 |
+
]
|
| 95 |
+
|
| 96 |
+
[[source]]
|
| 97 |
+
id = "device-links"
|
| 98 |
+
title = "Device links between a consumer and a supplier"
|
| 99 |
+
path = "driver-api/device_link.html"
|
| 100 |
+
split = "test"
|
| 101 |
+
notes = "A device link describes a consumer's dependency on a supplier. Managed links can enforce driver binding and power-management ordering. A consumer should be suspended before its supplier, and the supplier resumed before the consumer. Flags and link type determine which relationships the core enforces."
|
| 102 |
+
qa = [
|
| 103 |
+
["For a device link, which resumes first: a consumer or its supplier?", "Resume the supplier before the dependent consumer."],
|
| 104 |
+
["Why would a driver describe a dependency by adding a device link?", "It gives the driver core an explicit consumer-supplier relationship for the applicable binding and power-management ordering."]
|
| 105 |
+
]
|
sources/cybermodels-web-defense/NOTICE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Hyperion Gray releases the adapter under Apache-2.0 (LICENSE-ADAPTER), its original editorial summaries and examples under CC BY 4.0 (LICENSE-DATA), and the included software under GPLv3 (COPYING). The Qwen team supplies the separately downloaded Apache-2.0 base. Each note is an original paraphrase. The external source owners retain their rights in the linked documentation. See data/sources.json for attribution and exact source revisions.
|
sources/cybermodels-web-defense/references.sqlite
ADDED
|
Binary file (24.6 kB). View file
|
|
|
sources/cybermodels-web-defense/sources.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"id": "cache-control",
|
| 4 |
+
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control",
|
| 5 |
+
"upstream": "https://raw.githubusercontent.com/mdn/content/7a7bbec489b457159a0597779a7eb3d3d950612d/files/en-us/web/http/reference/headers/cache-control/index.md",
|
| 6 |
+
"revision": "7a7bbec489b457159a0597779a7eb3d3d950612d",
|
| 7 |
+
"sha256": "f896383cf09679fb21c68b920695e3f3c89b8aed66ddb0019b4defc06cdf7c70"
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"id": "set-cookie",
|
| 11 |
+
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie",
|
| 12 |
+
"upstream": "https://raw.githubusercontent.com/mdn/content/7a7bbec489b457159a0597779a7eb3d3d950612d/files/en-us/web/http/reference/headers/set-cookie/index.md",
|
| 13 |
+
"revision": "7a7bbec489b457159a0597779a7eb3d3d950612d",
|
| 14 |
+
"sha256": "eb6d8f2ec0be81745c75f4d0fa0a768ffb989b9d30aecf14c0c007c5a0b1f58a"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"id": "hsts",
|
| 18 |
+
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security",
|
| 19 |
+
"upstream": "https://raw.githubusercontent.com/mdn/content/7a7bbec489b457159a0597779a7eb3d3d950612d/files/en-us/web/http/reference/headers/strict-transport-security/index.md",
|
| 20 |
+
"revision": "7a7bbec489b457159a0597779a7eb3d3d950612d",
|
| 21 |
+
"sha256": "3d21fc61a42646397918871c054ca31197417186ac966bc25957395df22d6b4a"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"id": "frame-ancestors",
|
| 25 |
+
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/frame-ancestors",
|
| 26 |
+
"upstream": "https://raw.githubusercontent.com/mdn/content/7a7bbec489b457159a0597779a7eb3d3d950612d/files/en-us/web/http/reference/headers/content-security-policy/frame-ancestors/index.md",
|
| 27 |
+
"revision": "7a7bbec489b457159a0597779a7eb3d3d950612d",
|
| 28 |
+
"sha256": "8ef5d5e0a08acaf62c8522d77c3ffa162e73f91566356f65903d7d0d1cad5cc3"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"id": "referrer-policy",
|
| 32 |
+
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy",
|
| 33 |
+
"upstream": "https://raw.githubusercontent.com/mdn/content/7a7bbec489b457159a0597779a7eb3d3d950612d/files/en-us/web/http/reference/headers/referrer-policy/index.md",
|
| 34 |
+
"revision": "7a7bbec489b457159a0597779a7eb3d3d950612d",
|
| 35 |
+
"sha256": "0ff817795f8fd056378dc8550e871bf4cf6a59fb30ef920958fac6c841425707"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"id": "nosniff",
|
| 39 |
+
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Content-Type-Options",
|
| 40 |
+
"upstream": "https://raw.githubusercontent.com/mdn/content/7a7bbec489b457159a0597779a7eb3d3d950612d/files/en-us/web/http/reference/headers/x-content-type-options/index.md",
|
| 41 |
+
"revision": "7a7bbec489b457159a0597779a7eb3d3d950612d",
|
| 42 |
+
"sha256": "9437e3341df5481394e46b2bdf0dd9543df3a3dbfc5fdfc741e5314068efe303"
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"id": "permissions-policy",
|
| 46 |
+
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy",
|
| 47 |
+
"upstream": "https://raw.githubusercontent.com/mdn/content/7a7bbec489b457159a0597779a7eb3d3d950612d/files/en-us/web/http/reference/headers/permissions-policy/index.md",
|
| 48 |
+
"revision": "7a7bbec489b457159a0597779a7eb3d3d950612d",
|
| 49 |
+
"sha256": "baa59247b004ddf6c7597b381e2cf5aeebfdd09a87226c999c3f7f888fc9a2d2"
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"id": "clear-site-data",
|
| 53 |
+
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Clear-Site-Data",
|
| 54 |
+
"upstream": "https://raw.githubusercontent.com/mdn/content/7a7bbec489b457159a0597779a7eb3d3d950612d/files/en-us/web/http/reference/headers/clear-site-data/index.md",
|
| 55 |
+
"revision": "7a7bbec489b457159a0597779a7eb3d3d950612d",
|
| 56 |
+
"sha256": "72fc588c029357d9e15c8f4f0f320b0a0680ce5a9e1af8b07695ac488727d18d"
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"id": "vary",
|
| 60 |
+
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Vary",
|
| 61 |
+
"upstream": "https://raw.githubusercontent.com/mdn/content/7a7bbec489b457159a0597779a7eb3d3d950612d/files/en-us/web/http/reference/headers/vary/index.md",
|
| 62 |
+
"revision": "7a7bbec489b457159a0597779a7eb3d3d950612d",
|
| 63 |
+
"sha256": "25d2de4c18b1bebfbe223031acce2e162a5ebb27b4661b64a018e240d751222a"
|
| 64 |
+
}
|
| 65 |
+
]
|
sources/cybermodels-web-defense/specialist.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "cybermodels-web-defense",
|
| 3 |
+
"topic": "Web application defense",
|
| 4 |
+
"summary": "Browser-facing HTTP response policies, session cookies, caching, privacy and transport settings."
|
| 5 |
+
}
|
sources/cybermodels-web-defense/specialist.toml
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model = "cybermodels-web-defense"
|
| 2 |
+
topic = "Web application defense"
|
| 3 |
+
summary = "Browser-facing HTTP response policies, session cookies, caching, privacy and transport settings."
|
| 4 |
+
source_root = "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/"
|
| 5 |
+
source_revision = "7a7bbec489b457159a0597779a7eb3d3d950612d"
|
| 6 |
+
|
| 7 |
+
[[source]]
|
| 8 |
+
id = "cache-control"
|
| 9 |
+
title = "Cache-Control storage and revalidation"
|
| 10 |
+
path = "Cache-Control"
|
| 11 |
+
notes = "The no-store response directive asks caches to avoid storing the response. With no-cache, storage is allowed but the cache must validate before reuse. The private directive confines storage to private caches. Changing a policy on a new response does not itself purge an earlier response from every cache."
|
| 12 |
+
qa = [
|
| 13 |
+
["Which Cache-Control directive prevents a sensitive response being stored?", "Use no-store on that response."],
|
| 14 |
+
["Can a cache store a response marked no-cache?", "Yes. It must validate it before reusing it."],
|
| 15 |
+
["Can I rely on private alone to prevent a browser caching an account page?", "No. Private permits a private cache to store the response. Use no-store when storage must be prevented."]
|
| 16 |
+
]
|
| 17 |
+
|
| 18 |
+
[[source]]
|
| 19 |
+
id = "set-cookie"
|
| 20 |
+
title = "Set-Cookie session cookie attributes"
|
| 21 |
+
path = "Set-Cookie"
|
| 22 |
+
notes = "Secure restricts cookie transmission to secure channels, with a localhost exception in browsers. HttpOnly prevents script APIs from reading a cookie while the browser can still attach it to eligible requests. SameSite controls cross-site delivery; SameSite=None requires Secure. Omitting Domain makes a cookie host-only."
|
| 23 |
+
qa = [
|
| 24 |
+
["Which session cookie attribute blocks document.cookie from reading its value?", "Set HttpOnly. The browser can still send that cookie on eligible requests."],
|
| 25 |
+
["What other attribute is required on a SameSite=None cookie?", "Set Secure alongside SameSite=None."],
|
| 26 |
+
["How should I scope a session cookie to the issuing host alone?", "Omit Domain to create a host-only cookie."]
|
| 27 |
+
]
|
| 28 |
+
|
| 29 |
+
[[source]]
|
| 30 |
+
id = "hsts"
|
| 31 |
+
title = "Strict-Transport-Security and HTTPS"
|
| 32 |
+
path = "Strict-Transport-Security"
|
| 33 |
+
notes = "A browser learns HSTS from a response delivered over HTTPS and remembers the policy for the max-age interval. The includeSubDomains directive extends that policy to subdomains. Verify that the affected subdomains can all serve HTTPS before enabling it. Sending this header over HTTP does not establish the policy."
|
| 34 |
+
qa = [
|
| 35 |
+
["Can my browser learn HSTS from the site's plain HTTP redirect?", "Send Strict-Transport-Security on the HTTPS response. Browsers ignore it over plain HTTP."],
|
| 36 |
+
["What should we confirm before enabling HSTS includeSubDomains?", "Confirm that all affected subdomains support HTTPS for the duration of the policy."],
|
| 37 |
+
["What determines how long a browser remembers an HSTS policy?", "The max-age directive sets the policy lifetime in seconds."]
|
| 38 |
+
]
|
| 39 |
+
|
| 40 |
+
[[source]]
|
| 41 |
+
id = "frame-ancestors"
|
| 42 |
+
title = "Content-Security-Policy frame-ancestors"
|
| 43 |
+
path = "Content-Security-Policy/frame-ancestors"
|
| 44 |
+
notes = "The frame-ancestors directive controls which parents may embed a page. A policy of 'none' excludes all ancestors. The directive is delivered as an HTTP response header, and it has no default-src fallback. frame-src deals with the frames the page itself may load."
|
| 45 |
+
qa = [
|
| 46 |
+
["What HTTP policy stops any parent from framing my page?", "Send Content-Security-Policy with frame-ancestors 'none' on the response."],
|
| 47 |
+
["Does default-src 'none' automatically set frame-ancestors?", "No. Specify frame-ancestors explicitly."],
|
| 48 |
+
["Should the page restrict who can embed it with frame-src or frame-ancestors?", "Use frame-ancestors for parents that embed the page. frame-src controls frames loaded by the page."]
|
| 49 |
+
]
|
| 50 |
+
|
| 51 |
+
[[source]]
|
| 52 |
+
id = "referrer-policy"
|
| 53 |
+
title = "Referrer-Policy on outbound requests"
|
| 54 |
+
path = "Referrer-Policy"
|
| 55 |
+
notes = "A no-referrer policy omits the Referer header. Under strict-origin-when-cross-origin, same-origin requests can carry a fuller referrer, eligible cross-origin requests carry only the origin, and downgrades from HTTPS to HTTP omit it. Referrer policy governs this header and does not remove secrets already embedded in destination URLs."
|
| 56 |
+
qa = [
|
| 57 |
+
["How do I omit the Referer header on outbound requests?", "Send Referrer-Policy: no-referrer."],
|
| 58 |
+
["With strict-origin-when-cross-origin, what reaches another HTTPS origin?", "Only the origin is sent as the referrer."],
|
| 59 |
+
["With strict-origin-when-cross-origin, does an HTTPS page send a referrer on a downgrade to HTTP?", "No. A downgrade from HTTPS to HTTP omits the referrer."]
|
| 60 |
+
]
|
| 61 |
+
|
| 62 |
+
[[source]]
|
| 63 |
+
id = "nosniff"
|
| 64 |
+
title = "X-Content-Type-Options nosniff and MIME types"
|
| 65 |
+
path = "X-Content-Type-Options"
|
| 66 |
+
notes = "Send an accurate Content-Type with X-Content-Type-Options: nosniff. Browsers enforce MIME checks for script and style destinations. For example, a stylesheet response must use text/css. Applying nosniff can expose an existing server misconfiguration when an asset has the wrong declared MIME type."
|
| 67 |
+
qa = [
|
| 68 |
+
["A stylesheet stopped loading with nosniff. Which response metadata should we check?", "Check Content-Type on the actual asset response. A stylesheet must be served as text/css."],
|
| 69 |
+
["Can nosniff compensate for omitting the correct MIME type on JavaScript?", "Provide an appropriate JavaScript MIME type. nosniff enforces the declared type for script requests."],
|
| 70 |
+
["Can documentation establish the Content-Type our CDN sent yesterday?", "Check the captured response or CDN records. Documentation alone cannot establish what that deployment served."]
|
| 71 |
+
]
|
| 72 |
+
|
| 73 |
+
[[source]]
|
| 74 |
+
id = "permissions-policy"
|
| 75 |
+
title = "Permissions-Policy feature restrictions"
|
| 76 |
+
path = "Permissions-Policy"
|
| 77 |
+
split = "test"
|
| 78 |
+
notes = "Permissions-Policy constrains browser features available to a document and embedded contexts. An empty allowlist denies the named feature. Allowing a feature through policy does not grant user consent. Browser support and the feature's own permission rules still apply."
|
| 79 |
+
qa = [
|
| 80 |
+
["Does allowing geolocation through Permissions-Policy grant user consent?", "No. The feature still follows the browser's permission and user-consent rules."],
|
| 81 |
+
["What does an empty allowlist mean for a named Permissions-Policy feature?", "It disables that feature for all origins covered by the policy."]
|
| 82 |
+
]
|
| 83 |
+
|
| 84 |
+
[[source]]
|
| 85 |
+
id = "clear-site-data"
|
| 86 |
+
title = "Clear-Site-Data response on sign-out"
|
| 87 |
+
path = "Clear-Site-Data"
|
| 88 |
+
split = "test"
|
| 89 |
+
notes = "Over a secure connection, Clear-Site-Data asks a supporting browser to clear specified categories of local site data. Directives include quoted cookies, storage and cache values. Clearing client data does not revoke a session in the application's backend."
|
| 90 |
+
qa = [
|
| 91 |
+
["Does sending Clear-Site-Data on sign-out revoke the server-side session?", "Invalidate the session on the server as well. The header targets data held by the browser."],
|
| 92 |
+
["How can a secure sign-out response request removal of browser-side storage?", "Send Clear-Site-Data with the quoted storage directive and account for browser support."]
|
| 93 |
+
]
|
| 94 |
+
|
| 95 |
+
[[source]]
|
| 96 |
+
id = "vary"
|
| 97 |
+
title = "Vary response selection in HTTP caches"
|
| 98 |
+
path = "Vary"
|
| 99 |
+
split = "test"
|
| 100 |
+
notes = "Vary names request headers that affected a response, so caches can distinguish representations. For a resource negotiated by language, Vary: Accept-Language tells a cache to take the request's language header into account. It does not set a storage lifetime or prohibit caching."
|
| 101 |
+
qa = [
|
| 102 |
+
["Our cache mixes negotiated language variants. Which HTTP response header describes that variation?", "Use Vary: Accept-Language if that request header selects the language representation."],
|
| 103 |
+
["Does a Vary header define how long a representation can stay fresh?", "No. Vary governs selection among representations. Cache freshness is a separate policy."],
|
| 104 |
+
["Should different responses for the same negotiated URL use a consistent Vary value?", "Yes. Return a consistent Vary value for that URL, including relevant revalidation responses."]
|
| 105 |
+
]
|
sources/cybermodels-windows/NOTICE.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Attribution and licenses
|
| 2 |
+
|
| 3 |
+
The adapter parameters are released by Hyperion Gray under Apache-2.0, included in LICENSE-ADAPTER. The base is Qwen/Qwen3-Coder-Next by the Qwen team, revision a7fbcb5c0e12d62a448eaa0e260346bf5dcc0feb, published under Apache-2.0. The base weights are downloaded separately.
|
| 4 |
+
|
| 5 |
+
The Microsoft Learn documents in sources/MicrosoftDocs are by Microsoft and contributors. Their contents are licensed under Creative Commons Attribution 4.0 International. Source code examples in those repositories carry the included MIT license. Each source record in sources.json links both the versioned original and the reader-facing page. The snapshot preserves the source Markdown. The SQLite reference index strips Markdown and splits the text into shorter passages for retrieval.
|
| 6 |
+
|
| 7 |
+
Hyperion Gray releases the authored questions, answers, additional reference notes, and their adaptations in the training examples under CC BY 4.0. Attribute Microsoft and contributors for the underlying documentation, and Hyperion Gray for the curation and adaptations. The license texts are included in the source directories. The software in this release follows the workspace's GPLv3 license in COPYING. Third-party runtimes retain their respective licenses.
|
sources/cybermodels-windows/additional-references.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{"id":"thread-standby-state","title":"Thread states and the standby thread per logical processor","url":"https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.threadstate","body":"A processor can have one thread selected to run next. Windows calls that thread standby. Several threads can be ready, waiting for CPU time, while at most one thread is on standby for a given logical processor. A thread reported as running is already executing. These state observations are for diagnostics, and are unsuitable for synchronizing application threads."},
|
| 3 |
+
{"id":"page-file-sizing","title":"Sizing a Windows paging file for commit and crash dumps","url":"https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/how-to-determine-the-appropriate-page-file-size-for-64-bit-versions-of-windows","body":"Page file sizing depends on the workload’s peak system commit charge and the size required for the configured crash dump. A fixed multiple of installed memory cannot capture both requirements for every computer. Check the dump policy and observe peak commit under representative load before choosing a manual size."}
|
| 4 |
+
]
|
sources/cybermodels-windows/questions.tsv
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
source split question answer
|
| 2 |
+
context-switches train Why did a thread give up the CPU before its time slice ran out? A running thread that starts waiting gives up the rest of its time slice. A newly ready higher-priority thread can also trigger a switch.
|
| 3 |
+
context-switches train Will raising the priority of a blocked thread give it CPU time right away? The scheduler can run the thread once it becomes ready. Raising its priority alone leaves the wait in place.
|
| 4 |
+
thread-local-storage train Can two threads use the same TLS index and still see different data? Yes. The index selects a separate slot in each thread, so each thread can store its own value.
|
| 5 |
+
thread-local-storage train Do worker threads need a distinct TLS index apiece for the same per-thread field? One allocated index can identify the field across the process. Each thread accesses its own slot at that index.
|
| 6 |
+
job-objects train What Windows object lets a supervisor apply resource limits to a group of processes? A job object groups processes so the supervisor can set limits and collect accounting information for the group.
|
| 7 |
+
job-objects train How could a supervisor collect accounting for several related processes as a unit? Associate those processes with a job object and query the job's accounting information.
|
| 8 |
+
process-handles-and-identifiers train My program knows a PID. What must it obtain to use APIs that take a process handle? Call OpenProcess with the process ID and the access rights needed for the intended operation.
|
| 9 |
+
process-handles-and-identifiers train Can I treat a PID as a permanent identifier after a process terminates? A process ID is unique during the process lifetime. A later process can receive a reused ID.
|
| 10 |
+
scheduling-priorities train What two settings contribute to the Windows base priority of a thread? The process priority class and the thread's priority within that class determine its base priority.
|
| 11 |
+
scheduling-priorities train If several ready threads share the highest priority, how is their CPU time divided? The scheduler gives ready threads at that priority time slices in round-robin order.
|
| 12 |
+
event-objects test What happens to a manual-reset event after it releases a waiter? It stays signaled until explicitly reset, allowing other waiting threads to proceed.
|
| 13 |
+
event-objects test No thread was waiting when an auto-reset event was signaled. Does a later waiter see it? Yes. It stays signaled until it releases a waiting thread, then resets automatically.
|
| 14 |
+
mutex-objects train The previous owner of a Windows mutex died. What does an abandoned-mutex wait tell me? The waiter acquired the mutex, but the prior owner exited without releasing it. Check the protected data for consistency.
|
| 15 |
+
mutex-objects train May a thread acquire the same mutex twice? Yes. The owning thread can acquire it recursively and must release it once per successful acquisition.
|
| 16 |
+
semaphore-objects train Why did the semaphore become nonsignaled after the last available permit was taken? A successful wait decrements the count. At zero the semaphore is nonsignaled until a release increases the count.
|
| 17 |
+
semaphore-objects train Can I assume Windows semaphore waiters get permits in arrival order? No. Waiting threads are selected without a guaranteed first-in, first-out order.
|
| 18 |
+
critical-section-objects train Can two separate processes share a Windows critical section for mutual exclusion? A critical section coordinates threads within one process. A mutex can coordinate threads in different processes.
|
| 19 |
+
critical-section-objects train May a thread reenter a critical section it already owns? Yes. It must leave once for each successful entry before another thread can acquire it.
|
| 20 |
+
condition-variables test Why should a Windows condition-variable wait recheck its predicate after waking? Spurious and stolen wakeups are possible. After reacquiring the lock, retest the predicate in a loop.
|
| 21 |
+
condition-variables test Which condition-variable operation wakes every waiting thread? WakeAllConditionVariable wakes all waiters on that condition variable. Each must still reacquire the lock and check its predicate.
|
| 22 |
+
working-set train What does a process working set count? It consists of the pageable virtual-memory pages currently resident in physical memory for the process.
|
| 23 |
+
working-set train Does every fault for a page outside the working set require a disk read? No. A soft fault can be resolved without reading backing storage. A hard fault requires reading the page from backing storage.
|
| 24 |
+
page-state train Can my application write to an address range immediately after reserving it? Reservation sets aside virtual address space. The pages must be committed with suitable protection before they can be used.
|
| 25 |
+
page-state train Does reserving virtual addresses reserve physical RAM for every page? No. Reservation sets aside addresses without allocating physical storage for the range.
|
| 26 |
+
file-mapping train How does a process access a chosen portion of a file through memory mapping? Create or open a file-mapping object and map a view of the desired portion into the process address space.
|
| 27 |
+
file-mapping train Can multiple processes view the same data through one file-mapping object? Yes. Each process maps its own view of the shared mapping into its address space.
|
| 28 |
+
i-o-completion-ports test How do the queue orders for completion packets and waiting completion-port threads differ? Packets are queued first-in, first-out. Threads blocked on the port are released in last-in, first-out order subject to the concurrency limit.
|
| 29 |
+
i-o-completion-ports test What does the concurrency value on an I/O completion port control? It limits the number of runnable threads associated with the port, allowing other waiting workers to remain blocked.
|
| 30 |
+
synchronous-and-asynchronous-i-o train What does FILE_FLAG_OVERLAPPED tell Windows about I/O on a file handle? It opens the handle for overlapped I/O. The caller supplies a separate OVERLAPPED structure for each outstanding operation.
|
| 31 |
+
synchronous-and-asynchronous-i-o train Does an asynchronous file operation always finish after the initiating call returns? No. An overlapped operation can complete immediately or remain pending. The caller must handle either result.
|
| 32 |
+
introduction-to-kernel-dispatcher-objects train What do waitable kernel dispatcher objects have in common? They have a signaled or nonsignaled state that the kernel uses when satisfying waits.
|
| 33 |
+
introduction-to-kernel-dispatcher-objects train Does satisfying a kernel wait guarantee that the thread starts executing immediately? It makes the thread eligible to run. Actual execution depends on scheduling.
|
| 34 |
+
canceling-irps test What kernel routine begins cancellation of an I/O request packet? IoCancelIrp initiates cancellation. The cancellation path must complete the request while maintaining system integrity.
|
| 35 |
+
canceling-irps test Is there a Windows facility for drivers that need a queue of cancelable IRPs? Yes. A cancel-safe IRP queue provides cancellation support for drivers that queue requests.
|
| 36 |
+
semaphore-objects train From the Windows semaphore rules, how many permits does my application's semaphore have right now? The rules explain how the count changes. Determining your live count requires information about that semaphore and its operations.
|
| 37 |
+
job-objects train What exact memory cap has my service assigned to its job object? The reference describes available job limits. The actual cap depends on the job's configured limits.
|
| 38 |
+
working-set train How many pages are in my process working set at this moment? The reference defines a working set. Answering for your process requires a current measurement.
|
sources/cybermodels-windows/references.sqlite
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec36f2cd13038441beb5479be561a2028745e1e8f8b6b6ad414dfa0d13d96032
|
| 3 |
+
size 167936
|
sources/cybermodels-windows/sources.json
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"id": "context-switches",
|
| 4 |
+
"file": "sources/MicrosoftDocs/win32/context-switches.md",
|
| 5 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/ProcThread/context-switches.md",
|
| 6 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/procthread/context-switches",
|
| 7 |
+
"license": "CC-BY-4.0"
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"id": "thread-local-storage",
|
| 11 |
+
"file": "sources/MicrosoftDocs/win32/thread-local-storage.md",
|
| 12 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/ProcThread/thread-local-storage.md",
|
| 13 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/procthread/thread-local-storage",
|
| 14 |
+
"license": "CC-BY-4.0"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"id": "job-objects",
|
| 18 |
+
"file": "sources/MicrosoftDocs/win32/job-objects.md",
|
| 19 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/ProcThread/job-objects.md",
|
| 20 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/procthread/job-objects",
|
| 21 |
+
"license": "CC-BY-4.0"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"id": "process-handles-and-identifiers",
|
| 25 |
+
"file": "sources/MicrosoftDocs/win32/process-handles-and-identifiers.md",
|
| 26 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/ProcThread/process-handles-and-identifiers.md",
|
| 27 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/procthread/process-handles-and-identifiers",
|
| 28 |
+
"license": "CC-BY-4.0"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"id": "scheduling-priorities",
|
| 32 |
+
"file": "sources/MicrosoftDocs/win32/scheduling-priorities.md",
|
| 33 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/ProcThread/scheduling-priorities.md",
|
| 34 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/procthread/scheduling-priorities",
|
| 35 |
+
"license": "CC-BY-4.0"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"id": "event-objects",
|
| 39 |
+
"file": "sources/MicrosoftDocs/win32/event-objects.md",
|
| 40 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/Sync/event-objects.md",
|
| 41 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/sync/event-objects",
|
| 42 |
+
"license": "CC-BY-4.0"
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"id": "mutex-objects",
|
| 46 |
+
"file": "sources/MicrosoftDocs/win32/mutex-objects.md",
|
| 47 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/Sync/mutex-objects.md",
|
| 48 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/sync/mutex-objects",
|
| 49 |
+
"license": "CC-BY-4.0"
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"id": "semaphore-objects",
|
| 53 |
+
"file": "sources/MicrosoftDocs/win32/semaphore-objects.md",
|
| 54 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/Sync/semaphore-objects.md",
|
| 55 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/sync/semaphore-objects",
|
| 56 |
+
"license": "CC-BY-4.0"
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"id": "critical-section-objects",
|
| 60 |
+
"file": "sources/MicrosoftDocs/win32/critical-section-objects.md",
|
| 61 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/Sync/critical-section-objects.md",
|
| 62 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/sync/critical-section-objects",
|
| 63 |
+
"license": "CC-BY-4.0"
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"id": "condition-variables",
|
| 67 |
+
"file": "sources/MicrosoftDocs/win32/condition-variables.md",
|
| 68 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/Sync/condition-variables.md",
|
| 69 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/sync/condition-variables",
|
| 70 |
+
"license": "CC-BY-4.0"
|
| 71 |
+
},
|
| 72 |
+
{
|
| 73 |
+
"id": "working-set",
|
| 74 |
+
"file": "sources/MicrosoftDocs/win32/working-set.md",
|
| 75 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/Memory/working-set.md",
|
| 76 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/memory/working-set",
|
| 77 |
+
"license": "CC-BY-4.0"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"id": "page-state",
|
| 81 |
+
"file": "sources/MicrosoftDocs/win32/page-state.md",
|
| 82 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/Memory/page-state.md",
|
| 83 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/memory/page-state",
|
| 84 |
+
"license": "CC-BY-4.0"
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"id": "file-mapping",
|
| 88 |
+
"file": "sources/MicrosoftDocs/win32/file-mapping.md",
|
| 89 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/Memory/file-mapping.md",
|
| 90 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/memory/file-mapping",
|
| 91 |
+
"license": "CC-BY-4.0"
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"id": "i-o-completion-ports",
|
| 95 |
+
"file": "sources/MicrosoftDocs/win32/i-o-completion-ports.md",
|
| 96 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/FileIO/i-o-completion-ports.md",
|
| 97 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/fileio/i-o-completion-ports",
|
| 98 |
+
"license": "CC-BY-4.0"
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"id": "synchronous-and-asynchronous-i-o",
|
| 102 |
+
"file": "sources/MicrosoftDocs/win32/synchronous-and-asynchronous-i-o.md",
|
| 103 |
+
"source": "https://github.com/MicrosoftDocs/win32/blob/bc82a65f74ef2c4f2f44a3d7db5f7cfebfdc3583/desktop-src/FileIO/synchronous-and-asynchronous-i-o.md",
|
| 104 |
+
"url": "https://learn.microsoft.com/en-us/windows/win32/fileio/synchronous-and-asynchronous-i-o",
|
| 105 |
+
"license": "CC-BY-4.0"
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"id": "introduction-to-kernel-dispatcher-objects",
|
| 109 |
+
"file": "sources/MicrosoftDocs/windows-driver-docs/introduction-to-kernel-dispatcher-objects.md",
|
| 110 |
+
"source": "https://github.com/MicrosoftDocs/windows-driver-docs/blob/7fd40adfd95e9728b95fa7df5230267157509d88/windows-driver-docs-pr/kernel/introduction-to-kernel-dispatcher-objects.md",
|
| 111 |
+
"url": "https://learn.microsoft.com/en-us/windows-hardware/drivers/kernel/introduction-to-kernel-dispatcher-objects",
|
| 112 |
+
"license": "CC-BY-4.0"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"id": "canceling-irps",
|
| 116 |
+
"file": "sources/MicrosoftDocs/windows-driver-docs/canceling-irps.md",
|
| 117 |
+
"source": "https://github.com/MicrosoftDocs/windows-driver-docs/blob/7fd40adfd95e9728b95fa7df5230267157509d88/windows-driver-docs-pr/kernel/canceling-irps.md",
|
| 118 |
+
"url": "https://learn.microsoft.com/en-us/windows-hardware/drivers/kernel/canceling-irps",
|
| 119 |
+
"license": "CC-BY-4.0"
|
| 120 |
+
}
|
| 121 |
+
]
|
sources/cybermodels-windows/win32-LICENSE-CODE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The MIT License (MIT)
|
| 2 |
+
Copyright (c) Microsoft Corporation
|
| 3 |
+
|
| 4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
| 5 |
+
associated documentation files (the "Software"), to deal in the Software without restriction,
|
| 6 |
+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
| 7 |
+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
| 8 |
+
subject to the following conditions:
|
| 9 |
+
|
| 10 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
| 11 |
+
portions of the Software.
|
| 12 |
+
|
| 13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
| 14 |
+
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
| 15 |
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
| 16 |
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
| 17 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
sources/cybermodels-windows/windows-driver-docs-LICENSE-CODE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The MIT License (MIT)
|
| 2 |
+
Copyright (c) Microsoft Corporation
|
| 3 |
+
|
| 4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
| 5 |
+
associated documentation files (the "Software"), to deal in the Software without restriction,
|
| 6 |
+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
| 7 |
+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
| 8 |
+
subject to the following conditions:
|
| 9 |
+
|
| 10 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
| 11 |
+
portions of the Software.
|
| 12 |
+
|
| 13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
| 14 |
+
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
| 15 |
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
| 16 |
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
| 17 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
team_brief.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Prepare a question with source notes that all three seats can read."""
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
|
| 6 |
+
from reference import retrieve
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def brief(root, question):
|
| 10 |
+
sections = []
|
| 11 |
+
for database in sorted((root / "sources").glob("*/references.sqlite")):
|
| 12 |
+
hits = retrieve(database, question)
|
| 13 |
+
if hits:
|
| 14 |
+
notes = "\n\n".join(f"{h['title']}\n{h['url']}\n{h['body']}" for h in hits)
|
| 15 |
+
sections.append(f"{database.parent.name}\n{notes}")
|
| 16 |
+
if not sections:
|
| 17 |
+
return question
|
| 18 |
+
return (
|
| 19 |
+
"Reference notes for all participants and the synthesizer. "
|
| 20 |
+
"For the final answer, cover each part of the question. Use the relevant passages "
|
| 21 |
+
"to resolve conflicts between drafts, cite their documentation, and identify "
|
| 22 |
+
"any dispute the sources do not settle.\n\n"
|
| 23 |
+
+ "\n\n".join(sections)
|
| 24 |
+
+ "\n\nQuestion: "
|
| 25 |
+
+ question
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
if __name__ == "__main__":
|
| 30 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 31 |
+
parser.add_argument("question")
|
| 32 |
+
args = parser.parse_args()
|
| 33 |
+
print(brief(Path(__file__).resolve().parent, args.question))
|