Debian Codegraph @

LICENSE

raw
1 License for Brian2
2 ------------------
3
4 Copyright ENS, INRIA, CNRS, INSERM, Sorbonne Université, and the
5 respective employers of the contributors
6 Contributors: Brian contributors, see CONTRIBUTORS file
7
8 Brian2 is a computer program whose purpose is to simulate models
9 of biological neural networks that is released under the terms of the
10 CeCILL 2.1 license.
11
12 CeCILL FREE SOFTWARE LICENSE AGREEMENT
13
14 Version 2.1 dated 2013-06-21
15
16 Notice
17
18 This Agreement is a Free Software license agreement that is the result
19 of discussions between its authors in order to ensure compliance with
20 the two main principles guiding its drafting:
21
22 * firstly, compliance with the principles governing the distribution
23 of Free Software: access to source code, broad rights granted to users,
24 * secondly, the election of a governing law, French law, with which it
25 is conformant, both as regards the law of torts and intellectual
26 property law, and the protection that it offers to both authors and
27 holders of the economic rights over software.
28
29 The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
30 license are:
31
32 Commissariat à l'énergie atomique et aux énergies alternatives - CEA, a
33 public scientific, technical and industrial research establishment,
34 having its principal place of business at 25 rue Leblanc, immeuble Le
35 Ponant D, 75015 Paris, France.
36
37 Centre National de la Recherche Scientifique - CNRS, a public scientific
38 and technological establishment, having its principal place of business
39 at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
40
41 Institut National de Recherche en Informatique et en Automatique -
42 Inria, a public scientific and technological establishment, having its
43 principal place of business at Domaine de Voluceau, Rocquencourt, BP
44 105, 78153 Le Chesnay cedex, France.
45
46
47 Preamble
48
49 The purpose of this Free Software license agreement is to grant users
50 the right to modify and redistribute the software governed by this
51 license within the framework of an open source distribution model.
52
53 The exercising of this right is conditional upon certain obligations for
54 users so as to preserve this status for all subsequent redistributions.
55
56 In consideration of access to the source code and the rights to copy,
57 modify and redistribute granted by the license, users are provided only
58 with a limited warranty and the software's author, the holder of the
59 economic rights, and the successive licensors only have limited liability.
60
61 In this respect, the risks associated with loading, using, modifying
62 and/or developing or reproducing the software by the user are brought to
63 the user's attention, given its Free Software status, which may make it
64 complicated to use, with the result that its use is reserved for
65 developers and experienced professionals having in-depth computer
66 knowledge. Users are therefore encouraged to load and test the
67 suitability of the software as regards their requirements in conditions
68 enabling the security of their systems and/or data to be ensured and,
69 more generally, to use and operate it in the same conditions of
70 security. This Agreement may be freely reproduced and published,
71 provided it is not altered, and that no provisions are either added or
72 removed herefrom.
73
74 This Agreement may apply to any or all software for which the holder of
75 the economic rights decides to submit the use thereof to its provisions.
76
77 Frequently asked questions can be found on the official website of the
78 CeCILL licenses family (http://www.cecill.info/index.en.html) for any
79 necessary clarification.
80
81
82 Article 1 - DEFINITIONS
83
84 For the purpose of this Agreement, when the following expressions
85 commence with a capital letter, they shall have the following meaning:
86
87 Agreement: means this license agreement, and its possible subsequent
88 versions and annexes.
89
90 Software: means the software in its Object Code and/or Source Code form
91 and, where applicable, its documentation, "as is" when the Licensee
92 accepts the Agreement.
93
94 Initial Software: means the Software in its Source Code and possibly its
95 Object Code form and, where applicable, its documentation, "as is" when
96 it is first distributed under the terms and conditions of the Agreement.
97
98 Modified Software: means the Software modified by at least one
99 Contribution.
100
101 Source Code: means all the Software's instructions and program lines to
102 which access is required so as to modify the Software.
103
104 Object Code: means the binary files originating from the compilation of
105 the Source Code.
106
107 Holder: means the holder(s) of the economic rights over the Initial
108 Software.
109
110 Licensee: means the Software user(s) having accepted the Agreement.
111
112 Contributor: means a Licensee having made at least one Contribution.
113
114 Licensor: means the Holder, or any other individual or legal entity, who
115 distributes the Software under the Agreement.
116
117 Contribution: means any or all modifications, corrections, translations,
118 adaptations and/or new functions integrated into the Software by any or
119 all Contributors, as well as any or all Internal Modules.
120
121 Module: means a set of sources files including their documentation that
122 enables supplementary functions or services in addition to those offered
123 by the Software.
124
125 External Module: means any or all Modules, not derived from the
126 Software, so that this Module and the Software run in separate address
127 spaces, with one calling the other when they are run.
128
129 Internal Module: means any or all Module, connected to the Software so
130 that they both execute in the same address space.
131
132 GNU GPL: means the GNU General Public License version 2 or any
133 subsequent version, as published by the Free Software Foundation Inc.
134
135 GNU Affero GPL: means the GNU Affero General Public License version 3 or
136 any subsequent version, as published by the Free Software Foundation Inc.
137
138 EUPL: means the European Union Public License version 1.1 or any
139 subsequent version, as published by the European Commission.
140
141 Parties: mean both the Licensee and the Licensor.
142
143 These expressions may be used both in singular and plural form.
144
145
146 Article 2 - PURPOSE
147
148 The purpose of the Agreement is the grant by the Licensor to the
149 Licensee of a non-exclusive, transferable and worldwide license for the
150 Software as set forth in Article 5 <#scope> hereinafter for the whole
151 term of the protection granted by the rights over said Software.
152
153
154 Article 3 - ACCEPTANCE
155
156 3.1 The Licensee shall be deemed as having accepted the terms and
157 conditions of this Agreement upon the occurrence of the first of the
158 following events:
159
160 * (i) loading the Software by any or all means, notably, by
161 downloading from a remote server, or by loading from a physical medium;
162 * (ii) the first time the Licensee exercises any of the rights granted
163 hereunder.
164
165 3.2 One copy of the Agreement, containing a notice relating to the
166 characteristics of the Software, to the limited warranty, and to the
167 fact that its use is restricted to experienced users has been provided
168 to the Licensee prior to its acceptance as set forth in Article 3.1
169 <#accepting> hereinabove, and the Licensee hereby acknowledges that it
170 has read and understood it.
171
172
173 Article 4 - EFFECTIVE DATE AND TERM
174
175
176 4.1 EFFECTIVE DATE
177
178 The Agreement shall become effective on the date when it is accepted by
179 the Licensee as set forth in Article 3.1 <#accepting>.
180
181
182 4.2 TERM
183
184 The Agreement shall remain in force for the entire legal term of
185 protection of the economic rights over the Software.
186
187
188 Article 5 - SCOPE OF RIGHTS GRANTED
189
190 The Licensor hereby grants to the Licensee, who accepts, the following
191 rights over the Software for any or all use, and for the term of the
192 Agreement, on the basis of the terms and conditions set forth hereinafter.
193
194 Besides, if the Licensor owns or comes to own one or more patents
195 protecting all or part of the functions of the Software or of its
196 components, the Licensor undertakes not to enforce the rights granted by
197 these patents against successive Licensees using, exploiting or
198 modifying the Software. If these patents are transferred, the Licensor
199 undertakes to have the transferees subscribe to the obligations set
200 forth in this paragraph.
201
202
203 5.1 RIGHT OF USE
204
205 The Licensee is authorized to use the Software, without any limitation
206 as to its fields of application, with it being hereinafter specified
207 that this comprises:
208
209 1. permanent or temporary reproduction of all or part of the Software
210 by any or all means and in any or all form.
211
212 2. loading, displaying, running, or storing the Software on any or all
213 medium.
214
215 3. entitlement to observe, study or test its operation so as to
216 determine the ideas and principles behind any or all constituent
217 elements of said Software. This shall apply when the Licensee
218 carries out any or all loading, displaying, running, transmission or
219 storage operation as regards the Software, that it is entitled to
220 carry out hereunder.
221
222
223 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS
224
225 The right to make Contributions includes the right to translate, adapt,
226 arrange, or make any or all modifications to the Software, and the right
227 to reproduce the resulting software.
228
229 The Licensee is authorized to make any or all Contributions to the
230 Software provided that it includes an explicit notice that it is the
231 author of said Contribution and indicates the date of the creation thereof.
232
233
234 5.3 RIGHT OF DISTRIBUTION
235
236 In particular, the right of distribution includes the right to publish,
237 transmit and communicate the Software to the general public on any or
238 all medium, and by any or all means, and the right to market, either in
239 consideration of a fee, or free of charge, one or more copies of the
240 Software by any means.
241
242 The Licensee is further authorized to distribute copies of the modified
243 or unmodified Software to third parties according to the terms and
244 conditions set forth hereinafter.
245
246
247 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
248
249 The Licensee is authorized to distribute true copies of the Software in
250 Source Code or Object Code form, provided that said distribution
251 complies with all the provisions of the Agreement and is accompanied by:
252
253 1. a copy of the Agreement,
254
255 2. a notice relating to the limitation of both the Licensor's warranty
256 and liability as set forth in Articles 8 and 9,
257
258 and that, in the event that only the Object Code of the Software is
259 redistributed, the Licensee allows effective access to the full Source
260 Code of the Software for a period of at least three years from the
261 distribution of the Software, it being understood that the additional
262 acquisition cost of the Source Code shall not exceed the cost of the
263 data transfer.
264
265
266 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
267
268 When the Licensee makes a Contribution to the Software, the terms and
269 conditions for the distribution of the resulting Modified Software
270 become subject to all the provisions of this Agreement.
271
272 The Licensee is authorized to distribute the Modified Software, in
273 source code or object code form, provided that said distribution
274 complies with all the provisions of the Agreement and is accompanied by:
275
276 1. a copy of the Agreement,
277
278 2. a notice relating to the limitation of both the Licensor's warranty
279 and liability as set forth in Articles 8 and 9,
280
281 and, in the event that only the object code of the Modified Software is
282 redistributed,
283
284 3. a note stating the conditions of effective access to the full source
285 code of the Modified Software for a period of at least three years
286 from the distribution of the Modified Software, it being understood
287 that the additional acquisition cost of the source code shall not
288 exceed the cost of the data transfer.
289
290
291 5.3.3 DISTRIBUTION OF EXTERNAL MODULES
292
293 When the Licensee has developed an External Module, the terms and
294 conditions of this Agreement do not apply to said External Module, that
295 may be distributed under a separate license agreement.
296
297
298 5.3.4 COMPATIBILITY WITH OTHER LICENSES
299
300 The Licensee can include a code that is subject to the provisions of one
301 of the versions of the GNU GPL, GNU Affero GPL and/or EUPL in the
302 Modified or unmodified Software, and distribute that entire code under
303 the terms of the same version of the GNU GPL, GNU Affero GPL and/or EUPL.
304
305 The Licensee can include the Modified or unmodified Software in a code
306 that is subject to the provisions of one of the versions of the GNU GPL,
307 GNU Affero GPL and/or EUPL and distribute that entire code under the
308 terms of the same version of the GNU GPL, GNU Affero GPL and/or EUPL.
309
310
311 Article 6 - INTELLECTUAL PROPERTY
312
313
314 6.1 OVER THE INITIAL SOFTWARE
315
316 The Holder owns the economic rights over the Initial Software. Any or
317 all use of the Initial Software is subject to compliance with the terms
318 and conditions under which the Holder has elected to distribute its work
319 and no one shall be entitled to modify the terms and conditions for the
320 distribution of said Initial Software.
321
322 The Holder undertakes that the Initial Software will remain ruled at
323 least by this Agreement, for the duration set forth in Article 4.2 <#term>.
324
325
326 6.2 OVER THE CONTRIBUTIONS
327
328 The Licensee who develops a Contribution is the owner of the
329 intellectual property rights over this Contribution as defined by
330 applicable law.
331
332
333 6.3 OVER THE EXTERNAL MODULES
334
335 The Licensee who develops an External Module is the owner of the
336 intellectual property rights over this External Module as defined by
337 applicable law and is free to choose the type of agreement that shall
338 govern its distribution.
339
340
341 6.4 JOINT PROVISIONS
342
343 The Licensee expressly undertakes:
344
345 1. not to remove, or modify, in any manner, the intellectual property
346 notices attached to the Software;
347
348 2. to reproduce said notices, in an identical manner, in the copies of
349 the Software modified or not.
350
351 The Licensee undertakes not to directly or indirectly infringe the
352 intellectual property rights on the Software of the Holder and/or
353 Contributors, and to take, where applicable, vis-à-vis its staff, any
354 and all measures required to ensure respect of said intellectual
355 property rights of the Holder and/or Contributors.
356
357
358 Article 7 - RELATED SERVICES
359
360 7.1 Under no circumstances shall the Agreement oblige the Licensor to
361 provide technical assistance or maintenance services for the Software.
362
363 However, the Licensor is entitled to offer this type of services. The
364 terms and conditions of such technical assistance, and/or such
365 maintenance, shall be set forth in a separate instrument. Only the
366 Licensor offering said maintenance and/or technical assistance services
367 shall incur liability therefor.
368
369 7.2 Similarly, any Licensor is entitled to offer to its licensees, under
370 its sole responsibility, a warranty, that shall only be binding upon
371 itself, for the redistribution of the Software and/or the Modified
372 Software, under terms and conditions that it is free to decide. Said
373 warranty, and the financial terms and conditions of its application,
374 shall be subject of a separate instrument executed between the Licensor
375 and the Licensee.
376
377
378 Article 8 - LIABILITY
379
380 8.1 Subject to the provisions of Article 8.2, the Licensee shall be
381 entitled to claim compensation for any direct loss it may have suffered
382 from the Software as a result of a fault on the part of the relevant
383 Licensor, subject to providing evidence thereof.
384
385 8.2 The Licensor's liability is limited to the commitments made under
386 this Agreement and shall not be incurred as a result of in particular:
387 (i) loss due the Licensee's total or partial failure to fulfill its
388 obligations, (ii) direct or consequential loss that is suffered by the
389 Licensee due to the use or performance of the Software, and (iii) more
390 generally, any consequential loss. In particular the Parties expressly
391 agree that any or all pecuniary or business loss (i.e. loss of data,
392 loss of profits, operating loss, loss of customers or orders,
393 opportunity cost, any disturbance to business activities) or any or all
394 legal proceedings instituted against the Licensee by a third party,
395 shall constitute consequential loss and shall not provide entitlement to
396 any or all compensation from the Licensor.
397
398
399 Article 9 - WARRANTY
400
401 9.1 The Licensee acknowledges that the scientific and technical
402 state-of-the-art when the Software was distributed did not enable all
403 possible uses to be tested and verified, nor for the presence of
404 possible defects to be detected. In this respect, the Licensee's
405 attention has been drawn to the risks associated with loading, using,
406 modifying and/or developing and reproducing the Software which are
407 reserved for experienced users.
408
409 The Licensee shall be responsible for verifying, by any or all means,
410 the suitability of the product for its requirements, its good working
411 order, and for ensuring that it shall not cause damage to either persons
412 or properties.
413
414 9.2 The Licensor hereby represents, in good faith, that it is entitled
415 to grant all the rights over the Software (including in particular the
416 rights set forth in Article 5 <#scope>).
417
418 9.3 The Licensee acknowledges that the Software is supplied "as is" by
419 the Licensor without any other express or tacit warranty, other than
420 that provided for in Article 9.2 <#good-faith> and, in particular,
421 without any warranty as to its commercial value, its secured, safe,
422 innovative or relevant nature.
423
424 Specifically, the Licensor does not warrant that the Software is free
425 from any error, that it will operate without interruption, that it will
426 be compatible with the Licensee's own equipment and software
427 configuration, nor that it will meet the Licensee's requirements.
428
429 9.4 The Licensor does not either expressly or tacitly warrant that the
430 Software does not infringe any third party intellectual property right
431 relating to a patent, software or any other property right. Therefore,
432 the Licensor disclaims any and all liability towards the Licensee
433 arising out of any or all proceedings for infringement that may be
434 instituted in respect of the use, modification and redistribution of the
435 Software. Nevertheless, should such proceedings be instituted against
436 the Licensee, the Licensor shall provide it with technical and legal
437 expertise for its defense. Such technical and legal expertise shall be
438 decided on a case-by-case basis between the relevant Licensor and the
439 Licensee pursuant to a memorandum of understanding. The Licensor
440 disclaims any and all liability as regards the Licensee's use of the
441 name of the Software. No warranty is given as regards the existence of
442 prior rights over the name of the Software or as regards the existence
443 of a trademark.
444
445
446 Article 10 - TERMINATION
447
448 10.1 In the event of a breach by the Licensee of its obligations
449 hereunder, the Licensor may automatically terminate this Agreement
450 thirty (30) days after notice has been sent to the Licensee and has
451 remained ineffective.
452
453 10.2 A Licensee whose Agreement is terminated shall no longer be
454 authorized to use, modify or distribute the Software. However, any
455 licenses that it may have granted prior to termination of the Agreement
456 shall remain valid subject to their having been granted in compliance
457 with the terms and conditions hereof.
458
459
460 Article 11 - MISCELLANEOUS
461
462
463 11.1 EXCUSABLE EVENTS
464
465 Neither Party shall be liable for any or all delay, or failure to
466 perform the Agreement, that may be attributable to an event of force
467 majeure, an act of God or an outside cause, such as defective
468 functioning or interruptions of the electricity or telecommunications
469 networks, network paralysis following a virus attack, intervention by
470 government authorities, natural disasters, water damage, earthquakes,
471 fire, explosions, strikes and labor unrest, war, etc.
472
473 11.2 Any failure by either Party, on one or more occasions, to invoke
474 one or more of the provisions hereof, shall under no circumstances be
475 interpreted as being a waiver by the interested Party of its right to
476 invoke said provision(s) subsequently.
477
478 11.3 The Agreement cancels and replaces any or all previous agreements,
479 whether written or oral, between the Parties and having the same
480 purpose, and constitutes the entirety of the agreement between said
481 Parties concerning said purpose. No supplement or modification to the
482 terms and conditions hereof shall be effective as between the Parties
483 unless it is made in writing and signed by their duly authorized
484 representatives.
485
486 11.4 In the event that one or more of the provisions hereof were to
487 conflict with a current or future applicable act or legislative text,
488 said act or legislative text shall prevail, and the Parties shall make
489 the necessary amendments so as to comply with said act or legislative
490 text. All other provisions shall remain effective. Similarly, invalidity
491 of a provision of the Agreement, for any reason whatsoever, shall not
492 cause the Agreement as a whole to be invalid.
493
494
495 11.5 LANGUAGE
496
497 The Agreement is drafted in both French and English and both versions
498 are deemed authentic.
499
500
501 Article 12 - NEW VERSIONS OF THE AGREEMENT
502
503 12.1 Any person is authorized to duplicate and distribute copies of this
504 Agreement.
505
506 12.2 So as to ensure coherence, the wording of this Agreement is
507 protected and may only be modified by the authors of the License, who
508 reserve the right to periodically publish updates or new versions of the
509 Agreement, each with a separate number. These subsequent versions may
510 address new issues encountered by Free Software.
511
512 12.3 Any Software distributed under a given version of the Agreement may
513 only be subsequently distributed under the same version of the Agreement
514 or a subsequent version, subject to the provisions of Article 5.3.4
515 <#compatibility>.
516
517
518 Article 13 - GOVERNING LAW AND JURISDICTION
519
520 13.1 The Agreement is governed by French law. The Parties agree to
521 endeavor to seek an amicable solution to any disagreements or disputes
522 that may arise during the performance of the Agreement.
523
524 13.2 Failing an amicable solution within two (2) months as from their
525 occurrence, and unless emergency proceedings are necessary, the
526 disagreements or disputes shall be referred to the Paris Courts having
527 jurisdiction, by the more diligent Party.
528
529
530 Licenses for incorporated software
531 ----------------------------------
532
533 The code in brian2.sphinxext.generate_reference.py is based on sphinx.apidoc
534 (http://sphinx-doc.org, https://bitbucket.org/birkenfeld/sphinx/) available
535 under the BSD license:
536
537 --------------------------------------------------------------------------------
538 Copyright (c) 2007-2013 by the Sphinx team (see AUTHORS file).
539 All rights reserved.
540
541 Redistribution and use in source and binary forms, with or without
542 modification, are permitted provided that the following conditions are
543 met:
544
545 * Redistributions of source code must retain the above copyright
546 notice, this list of conditions and the following disclaimer.
547
548 * Redistributions in binary form must reproduce the above copyright
549 notice, this list of conditions and the following disclaimer in the
550 documentation and/or other materials provided with the distribution.
551
552 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
553 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
554 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
555 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
556 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
557 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
558 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
559 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
560 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
561 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
562 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
563 --------------------------------------------------------------------------------
564
565 The code in the brian2.sphinxext package is based on the files numpydoc.py,
566 docscrape.py, docscrape_sphinx.py, part of numpydoc
567 (https://github.com/numpy/numpy/tree/master/doc/sphinxext), available under the
568 BSD license:
569 --------------------------------------------------------------------------------
570 Copyright (C) 2008 Stefan van der Walt <[email protected]>,
571 Pauli Virtanen <[email protected]>
572
573 Redistribution and use in source and binary forms, with or without
574 modification, are permitted provided that the following conditions are
575 met:
576
577 1. Redistributions of source code must retain the above copyright
578 notice, this list of conditions and the following disclaimer.
579 2. Redistributions in binary form must reproduce the above copyright
580 notice, this list of conditions and the following disclaimer in
581 the documentation and/or other materials provided with the
582 distribution.
583
584 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
585 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
586 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
587 DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
588 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
589 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
590 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
591 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
592 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
593 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
594 POSSIBILITY OF SUCH DAMAGE.
595
596 -------------------------------------------------------------------------------
597
598 The implementations for binomial (brian2.input.binomial) and Poisson
599 distributed random numbers (in brian2.codegen.generators.cython_generator and
600 brian2.codegen.generators.cpp_generator) are based on the respective
601 implementations in the numpy library (https://github.com/numpy/numpy),
602 available under the BSD license:
603
604 Copyright (c) 2005-2019, NumPy Developers.
605 All rights reserved.
606
607 Redistribution and use in source and binary forms, with or without
608 modification, are permitted provided that the following conditions are
609 met:
610
611 * Redistributions of source code must retain the above copyright
612 notice, this list of conditions and the following disclaimer.
613
614 * Redistributions in binary form must reproduce the above
615 copyright notice, this list of conditions and the following
616 disclaimer in the documentation and/or other materials provided
617 with the distribution.
618
619 * Neither the name of the NumPy Developers nor the names of any
620 contributors may be used to endorse or promote products derived
621 from this software without specific prior written permission.
622
623 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
624 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
625 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
626 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
627 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
628 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
629 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
630 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
631 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
632 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
633 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
634
635 -------------------------------------------------------------------------------
636
637 The spelling corrector code in brian2.utils.stringtools is based on the spelling
638 corrector by Peter Norvig, available at: http://norvig.com/spell.py
639 It is published under the MIT license:
640
641 The MIT License (MIT)
642
643 Copyright (c) 2007 Peter Norvig
644
645 Permission is hereby granted, free of charge, to any person obtaining a copy
646 of this software and associated documentation files (the "Software"), to deal
647 in the Software without restriction, including without limitation the rights
648 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
649 copies of the Software, and to permit persons to whom the Software is
650 furnished to do so, subject to the following conditions:
651
652 The above copyright notice and this permission notice shall be included in
653 all copies or substantial portions of the Software.
654
655 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
656 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
657 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
658 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
659 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
660 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
661 THE SOFTWARE.
662
663 --
664
665 The `rand()` and `randn()` implementations are based on code by
666 Jean-Sebastien Roy, provided under the MIT license:
667
668 Copyright (c) 2003-2005, Jean-Sebastien Roy ([email protected])
669
670 Permission is hereby granted, free of charge, to any person obtaining a
671 copy of this software and associated documentation files (the
672 "Software"), to deal in the Software without restriction, including
673 without limitation the rights to use, copy, modify, merge, publish,
674 distribute, sublicense, and/or sell copies of the Software, and to
675 permit persons to whom the Software is furnished to do so, subject to
676 the following conditions:
677
678 The above copyright notice and this permission notice shall be included
679 in all copies or substantial portions of the Software.
680
681 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
682 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
683 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
684 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
685 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
686 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
687 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
688
689 --
690
691 Constants used in the rk_double implementation by Isaku Wada.
692
693 --
694
695 The floor division and modulo implementations for integer numbers in C++ standalone
696 are based on the implementation in Cython (https://github.com/cython/cython), published
697 under the Apache License 2.0:
698 Apache License
699 Version 2.0, January 2004
700 https://www.apache.org/licenses/
701
702 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
703
704 1. Definitions.
705
706 "License" shall mean the terms and conditions for use, reproduction,
707 and distribution as defined by Sections 1 through 9 of this document.
708
709 "Licensor" shall mean the copyright owner or entity authorized by
710 the copyright owner that is granting the License.
711
712 "Legal Entity" shall mean the union of the acting entity and all
713 other entities that control, are controlled by, or are under common
714 control with that entity. For the purposes of this definition,
715 "control" means (i) the power, direct or indirect, to cause the
716 direction or management of such entity, whether by contract or
717 otherwise, or (ii) ownership of fifty percent (50%) or more of the
718 outstanding shares, or (iii) beneficial ownership of such entity.
719
720 "You" (or "Your") shall mean an individual or Legal Entity
721 exercising permissions granted by this License.
722
723 "Source" form shall mean the preferred form for making modifications,
724 including but not limited to software source code, documentation
725 source, and configuration files.
726
727 "Object" form shall mean any form resulting from mechanical
728 transformation or translation of a Source form, including but
729 not limited to compiled object code, generated documentation,
730 and conversions to other media types.
731
732 "Work" shall mean the work of authorship, whether in Source or
733 Object form, made available under the License, as indicated by a
734 copyright notice that is included in or attached to the work
735 (an example is provided in the Appendix below).
736
737 "Derivative Works" shall mean any work, whether in Source or Object
738 form, that is based on (or derived from) the Work and for which the
739 editorial revisions, annotations, elaborations, or other modifications
740 represent, as a whole, an original work of authorship. For the purposes
741 of this License, Derivative Works shall not include works that remain
742 separable from, or merely link (or bind by name) to the interfaces of,
743 the Work and Derivative Works thereof.
744
745 "Contribution" shall mean any work of authorship, including
746 the original version of the Work and any modifications or additions
747 to that Work or Derivative Works thereof, that is intentionally
748 submitted to Licensor for inclusion in the Work by the copyright owner
749 or by an individual or Legal Entity authorized to submit on behalf of
750 the copyright owner. For the purposes of this definition, "submitted"
751 means any form of electronic, verbal, or written communication sent
752 to the Licensor or its representatives, including but not limited to
753 communication on electronic mailing lists, source code control systems,
754 and issue tracking systems that are managed by, or on behalf of, the
755 Licensor for the purpose of discussing and improving the Work, but
756 excluding communication that is conspicuously marked or otherwise
757 designated in writing by the copyright owner as "Not a Contribution."
758
759 "Contributor" shall mean Licensor and any individual or Legal Entity
760 on behalf of whom a Contribution has been received by Licensor and
761 subsequently incorporated within the Work.
762
763 2. Grant of Copyright License. Subject to the terms and conditions of
764 this License, each Contributor hereby grants to You a perpetual,
765 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
766 copyright license to reproduce, prepare Derivative Works of,
767 publicly display, publicly perform, sublicense, and distribute the
768 Work and such Derivative Works in Source or Object form.
769
770 3. Grant of Patent License. Subject to the terms and conditions of
771 this License, each Contributor hereby grants to You a perpetual,
772 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
773 (except as stated in this section) patent license to make, have made,
774 use, offer to sell, sell, import, and otherwise transfer the Work,
775 where such license applies only to those patent claims licensable
776 by such Contributor that are necessarily infringed by their
777 Contribution(s) alone or by combination of their Contribution(s)
778 with the Work to which such Contribution(s) was submitted. If You
779 institute patent litigation against any entity (including a
780 cross-claim or counterclaim in a lawsuit) alleging that the Work
781 or a Contribution incorporated within the Work constitutes direct
782 or contributory patent infringement, then any patent licenses
783 granted to You under this License for that Work shall terminate
784 as of the date such litigation is filed.
785
786 4. Redistribution. You may reproduce and distribute copies of the
787 Work or Derivative Works thereof in any medium, with or without
788 modifications, and in Source or Object form, provided that You
789 meet the following conditions:
790
791 (a) You must give any other recipients of the Work or
792 Derivative Works a copy of this License; and
793
794 (b) You must cause any modified files to carry prominent notices
795 stating that You changed the files; and
796
797 (c) You must retain, in the Source form of any Derivative Works
798 that You distribute, all copyright, patent, trademark, and
799 attribution notices from the Source form of the Work,
800 excluding those notices that do not pertain to any part of
801 the Derivative Works; and
802
803 (d) If the Work includes a "NOTICE" text file as part of its
804 distribution, then any Derivative Works that You distribute must
805 include a readable copy of the attribution notices contained
806 within such NOTICE file, excluding those notices that do not
807 pertain to any part of the Derivative Works, in at least one
808 of the following places: within a NOTICE text file distributed
809 as part of the Derivative Works; within the Source form or
810 documentation, if provided along with the Derivative Works; or,
811 within a display generated by the Derivative Works, if and
812 wherever such third-party notices normally appear. The contents
813 of the NOTICE file are for informational purposes only and
814 do not modify the License. You may add Your own attribution
815 notices within Derivative Works that You distribute, alongside
816 or as an addendum to the NOTICE text from the Work, provided
817 that such additional attribution notices cannot be construed
818 as modifying the License.
819
820 You may add Your own copyright statement to Your modifications and
821 may provide additional or different license terms and conditions
822 for use, reproduction, or distribution of Your modifications, or
823 for any such Derivative Works as a whole, provided Your use,
824 reproduction, and distribution of the Work otherwise complies with
825 the conditions stated in this License.
826
827 5. Submission of Contributions. Unless You explicitly state otherwise,
828 any Contribution intentionally submitted for inclusion in the Work
829 by You to the Licensor shall be under the terms and conditions of
830 this License, without any additional terms or conditions.
831 Notwithstanding the above, nothing herein shall supersede or modify
832 the terms of any separate license agreement you may have executed
833 with Licensor regarding such Contributions.
834
835 6. Trademarks. This License does not grant permission to use the trade
836 names, trademarks, service marks, or product names of the Licensor,
837 except as required for reasonable and customary use in describing the
838 origin of the Work and reproducing the content of the NOTICE file.
839
840 7. Disclaimer of Warranty. Unless required by applicable law or
841 agreed to in writing, Licensor provides the Work (and each
842 Contributor provides its Contributions) on an "AS IS" BASIS,
843 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
844 implied, including, without limitation, any warranties or conditions
845 of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
846 PARTICULAR PURPOSE. You are solely responsible for determining the
847 appropriateness of using or redistributing the Work and assume any
848 risks associated with Your exercise of permissions under this License.
849
850 8. Limitation of Liability. In no event and under no legal theory,
851 whether in tort (including negligence), contract, or otherwise,
852 unless required by applicable law (such as deliberate and grossly
853 negligent acts) or agreed to in writing, shall any Contributor be
854 liable to You for damages, including any direct, indirect, special,
855 incidental, or consequential damages of any character arising as a
856 result of this License or out of the use or inability to use the
857 Work (including but not limited to damages for loss of goodwill,
858 work stoppage, computer failure or malfunction, or any and all
859 other commercial damages or losses), even if such Contributor
860 has been advised of the possibility of such damages.
861
862 9. Accepting Warranty or Additional Liability. While redistributing
863 the Work or Derivative Works thereof, You may choose to offer,
864 and charge a fee for, acceptance of support, warranty, indemnity,
865 or other liability obligations and/or rights consistent with this
866 License. However, in accepting such obligations, You may act only
867 on Your own behalf and on Your sole responsibility, not on behalf
868 of any other Contributor, and only if You agree to indemnify,
869 defend, and hold each Contributor harmless for any liability
870 incurred by, or claims asserted against, such Contributor by reason
871 of your accepting any such warranty or additional liability.
872
873 END OF TERMS AND CONDITIONS