├── ComparePyTorchModelsForImageClassification.m ├── LICENSE ├── README.md ├── SECURITY.md ├── banana.png ├── images ├── banana.png ├── banana_classified.png ├── matlab_plus_pytorch.png └── network_analyzer.png ├── requirements.txt └── rights ├── numpy.rights ├── python.license ├── pytorch.rights └── torchvision.rights /ComparePyTorchModelsForImageClassification.m: -------------------------------------------------------------------------------- 1 | % This example shows how to call Python® from MATLAB® to compare PyTorch® 2 | % image classification models, and then import the fastest PyTorch model 3 | % into MATLAB. 4 | 5 | %% Python Environment 6 | 7 | % Set up the Python environment. 8 | !python -m venv env 9 | % For Windows 10 | !env\Scripts\pip.exe install -r requirements.txt 11 | 12 | % Set up the Python interpreter for MATLAB. 13 | pe = pyenv(ExecutionMode="OutOfProcess",Version="env\Scripts\python.exe"); 14 | 15 | %% PyTorch Models 16 | % Get three pretrained PyTorch models (VGG, MobileNet v2, and MNASNet) from 17 | % the torchvision library. 18 | model1 = py.torchvision.models.vgg16(pretrained=true); 19 | model2 = py.torchvision.models.mobilenet_v2(pretrained=true); 20 | model3 = py.torchvision.models.mnasnet1_0(pretrained=true); 21 | 22 | %% Preprocess Image 23 | % Read the image you want to classify. Show the image. 24 | imgOriginal = imread("banana.png"); 25 | imshow(imgOriginal) 26 | 27 | % Resize the image to the input size of the network. 28 | InputSize = [224 224 3]; 29 | img = imresize(imgOriginal,InputSize(1:2)); 30 | 31 | % You must preprocess the image in the same way as the training data. 32 | % Rescale the image. Then, normalize the image by subtracting the training 33 | % images mean and dividing by the training images standard deviation. 34 | imgProcessed = rescale(img,0,1); 35 | 36 | meanIm = [0.485 0.456 0.406]; 37 | stdIm = [0.229 0.224 0.225]; 38 | imgProcessed = (imgProcessed - reshape(meanIm,[1 1 3]))./reshape(stdIm,[1 1 3]); 39 | 40 | % Permute the image data from the Deep Learning Toolbox dimension ordering 41 | % (HWCN) to the PyTorch dimension ordering (NCHW). 42 | imgForTorch = permute(imgProcessed,[4 3 1 2]); 43 | 44 | %% Classify Image with Co-Execution 45 | % Check that the PyTorch models work as expected by classifying an image. 46 | % Call Python from MATLAB to predict the label. 47 | 48 | % Get the class names from squeezenet, which is also trained with 49 | % ImageNet images (same as the torchvision models). 50 | 51 | squeezeNet = squeezenet; 52 | ClassNames = squeezeNet.Layers(end).Classes; 53 | 54 | % Convert the image to a tensor in order to classify the image with a 55 | % PyTorch model. 56 | X = py.numpy.asarray(imgForTorch); 57 | X_torch = py.torch.from_numpy(X).float(); 58 | 59 | % Classify the image with co-execution using the MNASNet model. The model 60 | % predicts the correct label. 61 | y_val = model1(X_torch); 62 | predicted = py.torch.argmax(y_val); 63 | label = ClassNames(double(predicted.tolist)+1); 64 | 65 | %% Compare PyTorch Models 66 | % Find the fastest PyTorch model by calling Python from MATLAB. Predict the 67 | % image classification label multiple times for each of the PyTorch models. 68 | N = 30; 69 | 70 | for i = 1:N 71 | tic 72 | model1(X_torch); 73 | T(i) = toc; 74 | end 75 | mean(T) 76 | 77 | for i = 1:N 78 | tic 79 | model2(X_torch); 80 | T(i) = toc; 81 | end 82 | mean(T) 83 | 84 | for i = 1:N 85 | tic 86 | model3(X_torch); 87 | T(i) = toc; 88 | end 89 | mean(T) 90 | 91 | %% Save PyTorch Model 92 | % Save the fastest PyTorch model, among the three models compared. Then, 93 | % trace the model. 94 | pyrun("import torch;X_rnd = torch.rand(1,3,224,224)") 95 | pyrun("traced_model = torch.jit.trace(model3.forward,X_rnd)",model3=model3) 96 | pyrun("traced_model.save('traced_mnasnet1_0.pt')") 97 | 98 | %% Import PyTorch Model 99 | % Import the MNASNet model by using the importNetworkFromPyTorch function. 100 | net = importNetworkFromPyTorch("traced_mnasnet1_0.pt"); 101 | 102 | % Create an image input layer. Then, add the image input layer to the 103 | % imported network and initialize the network. 104 | inputLayer = imageInputLayer(InputSize,Normalization="none"); 105 | net = addInputLayer(net,inputLayer,Initialize=true); 106 | 107 | % Analyze the imported network. Observe that there are no warnings or 108 | % errors, which means that the network is ready to use. 109 | analyzeNetwork(net) 110 | 111 | %% Classify Image in MATLAB 112 | % Convert the image to a dlarray object. Format the image with dimensions 113 | % "SSCB" (spatial, spatial, channel, batch). 114 | Img_dlarray = dlarray(single(imgProcessed),"SSCB"); 115 | 116 | % Classify the image and find the predicted label. 117 | prob = predict(net,Img_dlarray); 118 | [~,label_ind] = max(prob); 119 | 120 | % Show the image with the classification label. 121 | imshow(imgOriginal) 122 | title(ClassNames(label_ind),FontSize=18) 123 | 124 | %% 125 | % Copyright 2022, The MathWorks, Inc. Copyright 2022, The MathWorks, Inc. 126 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022, The MathWorks, Inc. 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 5 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 6 | 3. In all cases, the software is, and all modifications and derivatives of the software shall be, licensed to you solely for use in conjunction with MathWorks products and service offerings. 7 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=matlab-deep-learning/compare-PyTorch-models-from-MATLAB) 2 | 3 | # Call Python from MATLAB to Compare PyTorch Models for Image Classification 4 | # Overview 5 | 6 | 7 | This example shows how to call Python® from MATLAB® to compare PyTorch® image classification models, and then import the fastest PyTorch model into MATLAB. 8 | 9 | 10 | 11 | 12 | Preprocess an image in MATLAB, find the fastest PyTorch model with co-execution, and then import the model into MATLAB for deep learning workflows that Deep Learning Toolbox™ supports. For example, take advantage of MATLAB's easy-to-use low-code apps for visualizing, analyzing, and modifying deep neural networks, or deploy the imported network. 13 | 14 | 15 | 16 | 17 | This example shows the co-execution workflow between PyTorch and Deep Learning Toolbox. You can use the same workflow for co-execution with TensorFlow™. 18 | 19 | 20 | 21 | 22 | ![](images/matlab_plus_pytorch.png) 23 | 24 | ## Requirements 25 | To run the following code, you need: 26 | - [MATLAB](https://www.mathworks.com/products/matlab.html) R2022b 27 | - [Deep Learning Toolbox](https://www.mathworks.com/products/deep-learning.html) 28 | - [Python](https://www.python.org/) (tested with 3.10.8) 29 | - [PyTorch](https://pytorch.org/) (tested with 1.13.0) 30 | - [Torchvision](https://pytorch.org/vision/stable/index.html) (tested with 1.13.0) 31 | - [NumPy](https://numpy.org/) (tested with 1.23.4) 32 | 33 | # Python Environment 34 | 35 | 36 | Set up the Python environment by first running commands at a command prompt (Windows® machine) and then, set up the Python interpreter in MATLAB. 37 | 38 | 39 | 40 | 41 | Go to your working folder. Create the Python virtual environment `venv` in a command prompt outside MATLAB. If you have multiple versions of Python installed, you can specify which Python version to use for your virtual environment. 42 | 43 | 44 | 45 | ```matlab:Code(Display) 46 | python -m venv env 47 | ``` 48 | 49 | 50 | 51 | 52 | Activate the Python virtual environment `env` in your working folder. 53 | 54 | 55 | 56 | ```matlab:Code(Display) 57 | env\Scripts\activate 58 | ``` 59 | 60 | 61 | 62 | Install the necessary Python libraries for this example. Check the installed versions of the libraries. 63 | 64 | 65 | 66 | ```matlab:Code(Display) 67 | pip install numpy torch torchvision 68 | python -m pip show numpy torch torchvision 69 | ``` 70 | 71 | 72 | 73 | From MATLAB, set up the Python interpreter for MATLAB. 74 | 75 | 76 | 77 | ```matlab:Code 78 | pe = pyenv(ExecutionMode="OutOfProcess",Version="env\Scripts\python.exe"); 79 | ``` 80 | 81 | # PyTorch Models 82 | 83 | 84 | Get three pretrained PyTorch models (VGG, MobileNet v2, and MNASNet) from the torchvision library. For more information, see [TORCHVISION.MODELS](https://pytorch.org/vision/0.8/models.html). 85 | 86 | 87 | 88 | 89 | You can access Python libraries directly from MATLAB by adding the `py.` prefix to the Python name. For more information on how to access Python libraries, see [Access Python Modules from MATLAB - Getting Started](https://www.mathworks.com/help/matlab/matlab_external/create-object-from-python-class.html). 90 | 91 | 92 | 93 | ```matlab:Code 94 | model1 = py.torchvision.models.vgg16(pretrained=true); 95 | ``` 96 | 97 | 98 | 99 | ```matlab:Code 100 | model2 = py.torchvision.models.mobilenet_v2(pretrained=true); 101 | ``` 102 | 103 | 104 | ```matlab:Code 105 | model3 = py.torchvision.models.mnasnet1_0(pretrained=true); 106 | ``` 107 | 108 | 109 | # Preprocess Image 110 | 111 | 112 | Read the image you want to classify. Show the image. 113 | 114 | 115 | 116 | ```matlab:Code 117 | imgOriginal = imread("banana.png"); 118 | imshow(imgOriginal) 119 | ``` 120 | 121 | 122 | ![](images/banana.png) 123 | 124 | 125 | 126 | Resize the image to the input size of the network. 127 | 128 | 129 | 130 | ```matlab:Code 131 | InputSize = [224 224 3]; 132 | img = imresize(imgOriginal,InputSize(1:2)); 133 | ``` 134 | 135 | 136 | 137 | You must preprocess the image in the same way as the training data. For more information, see [Input Data Preprocessing](https://www.mathworks.com/help/deeplearning/ug/tips-on-importing-models-from-tensorflow-pytorch-and-onnx.html#mw_7d593336-5595-49a0-9bc0-184ba6cebb80). Rescale the image. Then, normalize the image by subtracting the training images mean and dividing by the training images standard deviation. 138 | 139 | 140 | 141 | ```matlab:Code 142 | imgProcessed = rescale(img,0,1); 143 | 144 | meanIm = [0.485 0.456 0.406]; 145 | stdIm = [0.229 0.224 0.225]; 146 | imgProcessed = (imgProcessed - reshape(meanIm,[1 1 3]))./reshape(stdIm,[1 1 3]); 147 | ``` 148 | 149 | 150 | 151 | Permute the image data from the Deep Learning Toolbox dimension ordering (HWCN) to the PyTorch dimension ordering (NCHW). For more information on input dimension data ordering for different deep learning platforms, see [Input Dimension Ordering](https://www.mathworks.com/help/deeplearning/ug/tips-on-importing-models-from-tensorflow-pytorch-and-onnx.html#mw_ca5d4cba-9c12-4f01-8fe1-6329730c92b2). 152 | 153 | 154 | 155 | ```matlab:Code 156 | imgForTorch = permute(imgProcessed,[4 3 1 2]); 157 | ``` 158 | 159 | # Classify Image with Co-Execution 160 | 161 | 162 | Check that the PyTorch models work as expected by classifying an image. Call Python from MATLAB to predict the label. 163 | 164 | 165 | 166 | 167 | Get the class names from `squeezenet`, which is also trained with ImageNet images (same as the torchvision models). 168 | 169 | 170 | 171 | ```matlab:Code 172 | squeezeNet = squeezenet; 173 | ClassNames = squeezeNet.Layers(end).Classes; 174 | ``` 175 | 176 | 177 | 178 | Convert the image to a tensor in order to classify the image with a PyTorch model. 179 | 180 | 181 | 182 | ```matlab:Code 183 | X = py.numpy.asarray(imgForTorch); 184 | X_torch = py.torch.from_numpy(X).float(); 185 | ``` 186 | 187 | 188 | 189 | Classify the image with co-execution using the MNASNet model. The model predicts the correct label. 190 | 191 | 192 | 193 | ```matlab:Code 194 | y_val = model1(X_torch); 195 | 196 | predicted = py.torch.argmax(y_val); 197 | label = ClassNames(double(predicted.tolist)+1) 198 | ``` 199 | 200 | 201 | ```text:Output 202 | label = 203 | banana 204 | 205 | ``` 206 | 207 | # Compare PyTorch Models 208 | 209 | 210 | Find the fastest PyTorch model by calling Python from MATLAB. Predict the image classification label multiple times for each of the PyTorch models. 211 | 212 | 213 | 214 | ```matlab:Code 215 | N = 30; 216 | 217 | for i = 1:N 218 | tic 219 | model1(X_torch); 220 | T(i) = toc; 221 | end 222 | mean(T) 223 | ``` 224 | 225 | 226 | ```text:Output 227 | ans = 0.5947 228 | ``` 229 | 230 | 231 | ```matlab:Code 232 | for i = 1:N 233 | tic 234 | model2(X_torch); 235 | T(i) = toc; 236 | end 237 | mean(T) 238 | ``` 239 | 240 | 241 | ```text:Output 242 | ans = 0.1400 243 | ``` 244 | 245 | 246 | ```matlab:Code 247 | for i = 1:N 248 | tic 249 | model3(X_torch); 250 | T(i) = toc; 251 | end 252 | mean(T) 253 | ``` 254 | 255 | 256 | ```text:Output 257 | ans = 0.1096 258 | ``` 259 | 260 | 261 | 262 | This simple test shows that the fastest model in predicting is MNASNet. You can run different tests on PyTorch models easily and fast with co-execution to find the model that best suits your application and workflow. 263 | 264 | 265 | # Save PyTorch Model 266 | 267 | 268 | You can execute Python statements in the Python interpreter directly from MATLAB by using the [`pyrun`](https://www.mathworks.com/help/matlab/ref/pyrun.html) function. The pyrun function is a stateful interface between MATLAB and Python that saves the state between the two platforms. 269 | 270 | 271 | 272 | 273 | Save the fastest PyTorch model, among the three models compared. Then, trace the model. For more information on how to trace a PyTorch model, see [Torch documentation: Tracing a function](https://pytorch.org/docs/stable/generated/torch.jit.trace.html). 274 | 275 | 276 | 277 | ```matlab:Code 278 | pyrun("import torch;X_rnd = torch.rand(1,3,224,224)") 279 | pyrun("traced_model = torch.jit.trace(model3.forward,X_rnd)",model3=model3) 280 | ``` 281 | 282 | 283 | 284 | ```matlab:Code 285 | pyrun("traced_model.save('traced_mnasnet1_0.pt')") 286 | ``` 287 | 288 | # Import PyTorch Model 289 | 290 | 291 | Import the MNASNet model by using the [`importNetworkFromPyTorch`](https://www.mathworks.com/help/deeplearning/ref/importnetworkfrompytorch.html) function. The function imports the model as an uninitialized `dlnetwork` object. 292 | 293 | 294 | 295 | ```matlab:Code 296 | net = importNetworkFromPyTorch("traced_mnasnet1_0.pt") 297 | ``` 298 | 299 | 300 | ```text:Output 301 | Warning: Network was imported as an uninitialized dlnetwork. Before using the network, add input layer(s): 302 | 303 | inputLayer1 = imageInputLayer(, Normalization="none"); 304 | net = addInputLayer(net, inputLayer1, Initialize=true); 305 | net = 306 | dlnetwork with properties: 307 | 308 | Layers: [152x1 nnet.cnn.layer.Layer] 309 | Connections: [163x2 table] 310 | Learnables: [210x3 table] 311 | State: [104x3 table] 312 | InputNames: {'TopLevelModule_layers_0'} 313 | OutputNames: {'aten__linear12'} 314 | Initialized: 0 315 | 316 | View summary with summary. 317 | 318 | ``` 319 | 320 | 321 | 322 | Create an image input layer. Then, add the image input layer to the imported network and initialize the network by using the [`addInputLayer`](https://www.mathworks.com/help/deeplearning/ref/dlnetwork.addinputlayer.html) function. 323 | 324 | 325 | 326 | ```matlab:Code 327 | inputLayer = imageInputLayer(InputSize,Normalization="none"); 328 | net = addInputLayer(net,inputLayer,Initialize=true); 329 | ``` 330 | 331 | 332 | 333 | Analyze the imported network. Observe that there are no warnings or errors, which means that the network is ready to use. 334 | 335 | 336 | 337 | ```matlab:Code 338 | analyzeNetwork(net) 339 | ``` 340 | 341 | ![](images/network_analyzer.png) 342 | 343 | 344 | # Classify Image in MATLAB 345 | 346 | 347 | Convert the image to a [`dlarray`](https://www.mathworks.com/help/deeplearning/ref/dlarray.html) object. Format the image with dimensions "SSCB" (spatial, spatial, channel, batch). 348 | 349 | 350 | 351 | ```matlab:Code 352 | Img_dlarray = dlarray(single(imgProcessed),"SSCB"); 353 | ``` 354 | 355 | 356 | 357 | Classify the image and find the predicted label. 358 | 359 | 360 | 361 | ```matlab:Code 362 | prob = predict(net,Img_dlarray); 363 | [~,label_ind] = max(prob); 364 | ``` 365 | 366 | 367 | 368 | Show the image with the classification label. 369 | 370 | 371 | 372 | ```matlab:Code 373 | imshow(imgOriginal) 374 | title(ClassNames(label_ind),FontSize=18) 375 | ``` 376 | 377 | 378 | ![](images/banana_classified.png) 379 | 380 | 381 | 382 | Copyright 2022, The MathWorks, Inc. 383 | 384 | 385 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting Security Vulnerabilities 2 | 3 | If you believe you have discovered a security vulnerability, please report it to 4 | [security@mathworks.com](mailto:security@mathworks.com). Please see 5 | [MathWorks Vulnerability Disclosure Policy for Security Researchers](https://www.mathworks.com/company/aboutus/policies_statements/vulnerability-disclosure-policy.html) 6 | for additional information. -------------------------------------------------------------------------------- /banana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matlab-deep-learning/compare-PyTorch-models-from-MATLAB/537d8e7e25e03dd5b308cc204003540876875d76/banana.png -------------------------------------------------------------------------------- /images/banana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matlab-deep-learning/compare-PyTorch-models-from-MATLAB/537d8e7e25e03dd5b308cc204003540876875d76/images/banana.png -------------------------------------------------------------------------------- /images/banana_classified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matlab-deep-learning/compare-PyTorch-models-from-MATLAB/537d8e7e25e03dd5b308cc204003540876875d76/images/banana_classified.png -------------------------------------------------------------------------------- /images/matlab_plus_pytorch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matlab-deep-learning/compare-PyTorch-models-from-MATLAB/537d8e7e25e03dd5b308cc204003540876875d76/images/matlab_plus_pytorch.png -------------------------------------------------------------------------------- /images/network_analyzer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matlab-deep-learning/compare-PyTorch-models-from-MATLAB/537d8e7e25e03dd5b308cc204003540876875d76/images/network_analyzer.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | torch 3 | torchvision 4 | -------------------------------------------------------------------------------- /rights/numpy.rights: -------------------------------------------------------------------------------- 1 | Copyright (c) 2005-2022, NumPy Developers. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above 12 | copyright notice, this list of conditions and the following 13 | disclaimer in the documentation and/or other materials provided 14 | with the distribution. 15 | 16 | * Neither the name of the NumPy Developers nor the names of any 17 | contributors may be used to endorse or promote products derived 18 | from this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /rights/python.license: -------------------------------------------------------------------------------- 1 | PSF LICENSE AGREEMENT FOR PYTHON 3.10.8 2 | 3 | 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and 4 | the Individual or Organization ("Licensee") accessing and otherwise using Python 5 | 3.10.8 software in source or binary form and its associated documentation. 6 | 7 | 2. Subject to the terms and conditions of this License Agreement, PSF hereby 8 | grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, 9 | analyze, test, perform and/or display publicly, prepare derivative works, 10 | distribute, and otherwise use Python 3.10.8 alone or in any derivative 11 | version, provided, however, that PSF's License Agreement and PSF's notice of 12 | copyright, i.e., "Copyright © 2001-2021 Python Software Foundation; All Rights 13 | Reserved" are retained in Python 3.10.8 alone or in any derivative version 14 | prepared by Licensee. 15 | 16 | 3. In the event Licensee prepares a derivative work that is based on or 17 | incorporates Python 3.10.8 or any part thereof, and wants to make the 18 | derivative work available to others as provided herein, then Licensee hereby 19 | agrees to include in any such work a brief summary of the changes made to Python 20 | 3.10.8. 21 | 22 | 4. PSF is making Python 3.10.8 available to Licensee on an "AS IS" basis. 23 | PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF 24 | EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR 25 | WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE 26 | USE OF PYTHON 3.10.8 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 27 | 28 | 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 3.10.8 29 | FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF 30 | MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 3.10.8, OR ANY DERIVATIVE 31 | THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 32 | 33 | 6. This License Agreement will automatically terminate upon a material breach of 34 | its terms and conditions. 35 | 36 | 7. Nothing in this License Agreement shall be deemed to create any relationship 37 | of agency, partnership, or joint venture between PSF and Licensee. This License 38 | Agreement does not grant permission to use PSF trademarks or trade name in a 39 | trademark sense to endorse or promote products or services of Licensee, or any 40 | third party. 41 | 42 | 8. By copying, installing or otherwise using Python 3.9.6, Licensee agrees 43 | to be bound by the terms and conditions of this License Agreement. 44 | 45 | BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 46 | 47 | BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 48 | 49 | 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at 50 | 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization 51 | ("Licensee") accessing and otherwise using this software in source or binary 52 | form and its associated documentation ("the Software"). 53 | 54 | 2. Subject to the terms and conditions of this BeOpen Python License Agreement, 55 | BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license 56 | to reproduce, analyze, test, perform and/or display publicly, prepare derivative 57 | works, distribute, and otherwise use the Software alone or in any derivative 58 | version, provided, however, that the BeOpen Python License is retained in the 59 | Software, alone or in any derivative version prepared by Licensee. 60 | 61 | 3. BeOpen is making the Software available to Licensee on an "AS IS" basis. 62 | BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF 63 | EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR 64 | WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE 65 | USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 66 | 67 | 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR 68 | ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, 69 | MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF 70 | ADVISED OF THE POSSIBILITY THEREOF. 71 | 72 | 5. This License Agreement will automatically terminate upon a material breach of 73 | its terms and conditions. 74 | 75 | 6. This License Agreement shall be governed by and interpreted in all respects 76 | by the law of the State of California, excluding conflict of law provisions. 77 | Nothing in this License Agreement shall be deemed to create any relationship of 78 | agency, partnership, or joint venture between BeOpen and Licensee. This License 79 | Agreement does not grant permission to use BeOpen trademarks or trade names in a 80 | trademark sense to endorse or promote products or services of Licensee, or any 81 | third party. As an exception, the "BeOpen Python" logos available at 82 | http://www.pythonlabs.com/logos.html may be used according to the permissions 83 | granted on that web page. 84 | 85 | 7. By copying, installing or otherwise using the software, Licensee agrees to be 86 | bound by the terms and conditions of this License Agreement. 87 | 88 | CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 89 | 90 | 1. This LICENSE AGREEMENT is between the Corporation for National Research 91 | Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 92 | ("CNRI"), and the Individual or Organization ("Licensee") accessing and 93 | otherwise using Python 1.6.1 software in source or binary form and its 94 | associated documentation. 95 | 96 | 2. Subject to the terms and conditions of this License Agreement, CNRI hereby 97 | grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, 98 | analyze, test, perform and/or display publicly, prepare derivative works, 99 | distribute, and otherwise use Python 1.6.1 alone or in any derivative version, 100 | provided, however, that CNRI's License Agreement and CNRI's notice of copyright, 101 | i.e., "Copyright © 1995-2001 Corporation for National Research Initiatives; All 102 | Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version 103 | prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, 104 | Licensee may substitute the following text (omitting the quotes): "Python 1.6.1 105 | is made available subject to the terms and conditions in CNRI's License 106 | Agreement. This Agreement together with Python 1.6.1 may be located on the 107 | Internet using the following unique, persistent identifier (known as a handle): 108 | 1895.22/1013. This Agreement may also be obtained from a proxy server on the 109 | Internet using the following URL: http://hdl.handle.net/1895.22/1013." 110 | 111 | 3. In the event Licensee prepares a derivative work that is based on or 112 | incorporates Python 1.6.1 or any part thereof, and wants to make the derivative 113 | work available to others as provided herein, then Licensee hereby agrees to 114 | include in any such work a brief summary of the changes made to Python 1.6.1. 115 | 116 | 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI 117 | MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, 118 | BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY 119 | OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF 120 | PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 121 | 122 | 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR 123 | ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF 124 | MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE 125 | THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 126 | 127 | 6. This License Agreement will automatically terminate upon a material breach of 128 | its terms and conditions. 129 | 130 | 7. This License Agreement shall be governed by the federal intellectual property 131 | law of the United States, including without limitation the federal copyright 132 | law, and, to the extent such U.S. federal law does not apply, by the law of the 133 | Commonwealth of Virginia, excluding Virginia's conflict of law provisions. 134 | Notwithstanding the foregoing, with regard to derivative works based on Python 135 | 1.6.1 that incorporate non-separable material that was previously distributed 136 | under the GNU General Public License (GPL), the law of the Commonwealth of 137 | Virginia shall govern this License Agreement only as to issues arising under or 138 | with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in 139 | this License Agreement shall be deemed to create any relationship of agency, 140 | partnership, or joint venture between CNRI and Licensee. This License Agreement 141 | does not grant permission to use CNRI trademarks or trade name in a trademark 142 | sense to endorse or promote products or services of Licensee, or any third 143 | party. 144 | 145 | 8. By clicking on the "ACCEPT" button where indicated, or by copying, installing 146 | or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and 147 | conditions of this License Agreement. 148 | 149 | CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 150 | 151 | Copyright © 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The 152 | Netherlands. All rights reserved. 153 | 154 | Permission to use, copy, modify, and distribute this software and its 155 | documentation for any purpose and without fee is hereby granted, provided that 156 | the above copyright notice appear in all copies and that both that copyright 157 | notice and this permission notice appear in supporting documentation, and that 158 | the name of Stichting Mathematisch Centrum or CWI not be used in advertising or 159 | publicity pertaining to distribution of the software without specific, written 160 | prior permission. 161 | 162 | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 163 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 164 | EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT 165 | OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 166 | DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 167 | ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 168 | SOFTWARE. 169 | 170 | ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON 3.9.6 DOCUMENTATION 171 | 172 | Permission to use, copy, modify, and/or distribute this software for any 173 | purpose with or without fee is hereby granted. 174 | 175 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 176 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 177 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 178 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 179 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 180 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 181 | PERFORMANCE OF THIS SOFTWARE. 182 | 183 | Licenses and Acknowledgements for Incorporated Software 184 | 185 | This section is an incomplete, but growing list of licenses and acknowledgements for third-party software incorporated in the Python distribution. 186 | Mersenne Twister 187 | 188 | The _random module includes code based on a download from http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html. The following are the verbatim comments from the original code: 189 | 190 | A C-program for MT19937, with initialization improved 2002/1/26. 191 | Coded by Takuji Nishimura and Makoto Matsumoto. 192 | 193 | Before using, initialize the state by using init_genrand(seed) 194 | or init_by_array(init_key, key_length). 195 | 196 | Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, 197 | All rights reserved. 198 | 199 | Redistribution and use in source and binary forms, with or without 200 | modification, are permitted provided that the following conditions 201 | are met: 202 | 203 | 1. Redistributions of source code must retain the above copyright 204 | notice, this list of conditions and the following disclaimer. 205 | 206 | 2. Redistributions in binary form must reproduce the above copyright 207 | notice, this list of conditions and the following disclaimer in the 208 | documentation and/or other materials provided with the distribution. 209 | 210 | 3. The names of its contributors may not be used to endorse or promote 211 | products derived from this software without specific prior written 212 | permission. 213 | 214 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 215 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 216 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 217 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 218 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 219 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 220 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 221 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 222 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 223 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 224 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 225 | 226 | 227 | Any feedback is very welcome. 228 | http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html 229 | email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) 230 | 231 | Sockets 232 | 233 | The socket module uses the functions, getaddrinfo(), and getnameinfo(), which are coded in separate source files from the WIDE Project, http://www.wide.ad.jp/. 234 | 235 | Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 236 | All rights reserved. 237 | 238 | Redistribution and use in source and binary forms, with or without 239 | modification, are permitted provided that the following conditions 240 | are met: 241 | 1. Redistributions of source code must retain the above copyright 242 | notice, this list of conditions and the following disclaimer. 243 | 2. Redistributions in binary form must reproduce the above copyright 244 | notice, this list of conditions and the following disclaimer in the 245 | documentation and/or other materials provided with the distribution. 246 | 3. Neither the name of the project nor the names of its contributors 247 | may be used to endorse or promote products derived from this software 248 | without specific prior written permission. 249 | 250 | THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 251 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 252 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 253 | ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 254 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 255 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 256 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 257 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 258 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 259 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 260 | SUCH DAMAGE. 261 | 262 | Asynchronous socket services 263 | 264 | The asynchat and asyncore modules contain the following notice: 265 | 266 | Copyright 1996 by Sam Rushing 267 | 268 | All Rights Reserved 269 | 270 | Permission to use, copy, modify, and distribute this software and 271 | its documentation for any purpose and without fee is hereby 272 | granted, provided that the above copyright notice appear in all 273 | copies and that both that copyright notice and this permission 274 | notice appear in supporting documentation, and that the name of Sam 275 | Rushing not be used in advertising or publicity pertaining to 276 | distribution of the software without specific, written prior 277 | permission. 278 | 279 | SAM RUSHING DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 280 | INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN 281 | NO EVENT SHALL SAM RUSHING BE LIABLE FOR ANY SPECIAL, INDIRECT OR 282 | CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 283 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 284 | NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 285 | CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 286 | 287 | Cookie management 288 | 289 | The http.cookies module contains the following notice: 290 | 291 | Copyright 2000 by Timothy O'Malley 292 | 293 | All Rights Reserved 294 | 295 | Permission to use, copy, modify, and distribute this software 296 | and its documentation for any purpose and without fee is hereby 297 | granted, provided that the above copyright notice appear in all 298 | copies and that both that copyright notice and this permission 299 | notice appear in supporting documentation, and that the name of 300 | Timothy O'Malley not be used in advertising or publicity 301 | pertaining to distribution of the software without specific, written 302 | prior permission. 303 | 304 | Timothy O'Malley DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 305 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 306 | AND FITNESS, IN NO EVENT SHALL Timothy O'Malley BE LIABLE FOR 307 | ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 308 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 309 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 310 | ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 311 | PERFORMANCE OF THIS SOFTWARE. 312 | 313 | Execution tracing 314 | 315 | The trace module contains the following notice: 316 | 317 | portions copyright 2001, Autonomous Zones Industries, Inc., all rights... 318 | err... reserved and offered to the public under the terms of the 319 | Python 2.2 license. 320 | Author: Zooko O'Whielacronx 321 | http://zooko.com/ 322 | mailto:zooko@zooko.com 323 | 324 | Copyright 2000, Mojam Media, Inc., all rights reserved. 325 | Author: Skip Montanaro 326 | 327 | Copyright 1999, Bioreason, Inc., all rights reserved. 328 | Author: Andrew Dalke 329 | 330 | Copyright 1995-1997, Automatrix, Inc., all rights reserved. 331 | Author: Skip Montanaro 332 | 333 | Copyright 1991-1995, Stichting Mathematisch Centrum, all rights reserved. 334 | 335 | 336 | Permission to use, copy, modify, and distribute this Python software and 337 | its associated documentation for any purpose without fee is hereby 338 | granted, provided that the above copyright notice appears in all copies, 339 | and that both that copyright notice and this permission notice appear in 340 | supporting documentation, and that the name of neither Automatrix, 341 | Bioreason or Mojam Media be used in advertising or publicity pertaining to 342 | distribution of the software without specific, written prior permission. 343 | 344 | UUencode and UUdecode functions 345 | 346 | The uu module contains the following notice: 347 | 348 | Copyright 1994 by Lance Ellinghouse 349 | Cathedral City, California Republic, United States of America. 350 | All Rights Reserved 351 | Permission to use, copy, modify, and distribute this software and its 352 | documentation for any purpose and without fee is hereby granted, 353 | provided that the above copyright notice appear in all copies and that 354 | both that copyright notice and this permission notice appear in 355 | supporting documentation, and that the name of Lance Ellinghouse 356 | not be used in advertising or publicity pertaining to distribution 357 | of the software without specific, written prior permission. 358 | LANCE ELLINGHOUSE DISCLAIMS ALL WARRANTIES WITH REGARD TO 359 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 360 | FITNESS, IN NO EVENT SHALL LANCE ELLINGHOUSE CENTRUM BE LIABLE 361 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 362 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 363 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 364 | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 365 | 366 | Modified by Jack Jansen, CWI, July 1995: 367 | - Use binascii module to do the actual line-by-line conversion 368 | between ascii and binary. This results in a 1000-fold speedup. The C 369 | version is still 5 times faster, though. 370 | - Arguments more compliant with Python standard 371 | 372 | XML Remote Procedure Calls 373 | 374 | The xmlrpc.client module contains the following notice: 375 | 376 | The XML-RPC client interface is 377 | 378 | Copyright (c) 1999-2002 by Secret Labs AB 379 | Copyright (c) 1999-2002 by Fredrik Lundh 380 | 381 | By obtaining, using, and/or copying this software and/or its 382 | associated documentation, you agree that you have read, understood, 383 | and will comply with the following terms and conditions: 384 | 385 | Permission to use, copy, modify, and distribute this software and 386 | its associated documentation for any purpose and without fee is 387 | hereby granted, provided that the above copyright notice appears in 388 | all copies, and that both that copyright notice and this permission 389 | notice appear in supporting documentation, and that the name of 390 | Secret Labs AB or the author not be used in advertising or publicity 391 | pertaining to distribution of the software without specific, written 392 | prior permission. 393 | 394 | SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD 395 | TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- 396 | ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR 397 | BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 398 | DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 399 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 400 | ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 401 | OF THIS SOFTWARE. 402 | 403 | test_epoll 404 | 405 | The test_epoll module contains the following notice: 406 | 407 | Copyright (c) 2001-2006 Twisted Matrix Laboratories. 408 | 409 | Permission is hereby granted, free of charge, to any person obtaining 410 | a copy of this software and associated documentation files (the 411 | "Software"), to deal in the Software without restriction, including 412 | without limitation the rights to use, copy, modify, merge, publish, 413 | distribute, sublicense, and/or sell copies of the Software, and to 414 | permit persons to whom the Software is furnished to do so, subject to 415 | the following conditions: 416 | 417 | The above copyright notice and this permission notice shall be 418 | included in all copies or substantial portions of the Software. 419 | 420 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 421 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 422 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 423 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 424 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 425 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 426 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 427 | 428 | Select kqueue 429 | 430 | The select module contains the following notice for the kqueue interface: 431 | 432 | Copyright (c) 2000 Doug White, 2006 James Knight, 2007 Christian Heimes 433 | All rights reserved. 434 | 435 | Redistribution and use in source and binary forms, with or without 436 | modification, are permitted provided that the following conditions 437 | are met: 438 | 1. Redistributions of source code must retain the above copyright 439 | notice, this list of conditions and the following disclaimer. 440 | 2. Redistributions in binary form must reproduce the above copyright 441 | notice, this list of conditions and the following disclaimer in the 442 | documentation and/or other materials provided with the distribution. 443 | 444 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 445 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 446 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 447 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 448 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 449 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 450 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 451 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 452 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 453 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 454 | SUCH DAMAGE. 455 | 456 | SipHash24 457 | 458 | The file Python/pyhash.c contains Marek Majkowski’ implementation of Dan Bernstein’s SipHash24 algorithm. It contains the following note: 459 | 460 | 461 | Copyright (c) 2013 Marek Majkowski 462 | 463 | Permission is hereby granted, free of charge, to any person obtaining a copy 464 | of this software and associated documentation files (the "Software"), to deal 465 | in the Software without restriction, including without limitation the rights 466 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 467 | copies of the Software, and to permit persons to whom the Software is 468 | furnished to do so, subject to the following conditions: 469 | 470 | The above copyright notice and this permission notice shall be included in 471 | all copies or substantial portions of the Software. 472 | 473 | 474 | Original location: 475 | https://github.com/majek/csiphash/ 476 | 477 | Solution inspired by code from: 478 | Samuel Neves (supercop/crypto_auth/siphash24/little) 479 | djb (supercop/crypto_auth/siphash24/little2) 480 | Jean-Philippe Aumasson (https://131002.net/siphash/siphash24.c) 481 | 482 | strtod and dtoa 483 | 484 | The file Python/dtoa.c, which supplies C functions dtoa and strtod for conversion of C doubles to and from strings, is derived from the file of the same name by David M. Gay, currently available from http://www.netlib.org/fp/. The original file, as retrieved on March 16, 2009, contains the following copyright and licensing notice: 485 | 486 | /**************************************************************** 487 | * 488 | * The author of this software is David M. Gay. 489 | * 490 | * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. 491 | * 492 | * Permission to use, copy, modify, and distribute this software for any 493 | * purpose without fee is hereby granted, provided that this entire notice 494 | * is included in all copies of any software which is or includes a copy 495 | * or modification of this software and in all copies of the supporting 496 | * documentation for such software. 497 | * 498 | * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED 499 | * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY 500 | * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY 501 | * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. 502 | * 503 | ***************************************************************/ 504 | 505 | OpenSSL 506 | 507 | The modules hashlib, posix, ssl, crypt use the OpenSSL library for added performance if made available by the operating system. Additionally, the Windows and Mac OS X installers for Python may include a copy of the OpenSSL libraries, so we include a copy of the OpenSSL license here: 508 | 509 | LICENSE ISSUES 510 | ============== 511 | 512 | The OpenSSL toolkit stays under a dual license, i.e. both the conditions of 513 | the OpenSSL License and the original SSLeay license apply to the toolkit. 514 | See below for the actual license texts. Actually both licenses are BSD-style 515 | Open Source licenses. In case of any license issues related to OpenSSL 516 | please contact openssl-core@openssl.org. 517 | 518 | OpenSSL License 519 | --------------- 520 | 521 | /* ==================================================================== 522 | * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. 523 | * 524 | * Redistribution and use in source and binary forms, with or without 525 | * modification, are permitted provided that the following conditions 526 | * are met: 527 | * 528 | * 1. Redistributions of source code must retain the above copyright 529 | * notice, this list of conditions and the following disclaimer. 530 | * 531 | * 2. Redistributions in binary form must reproduce the above copyright 532 | * notice, this list of conditions and the following disclaimer in 533 | * the documentation and/or other materials provided with the 534 | * distribution. 535 | * 536 | * 3. All advertising materials mentioning features or use of this 537 | * software must display the following acknowledgment: 538 | * "This product includes software developed by the OpenSSL Project 539 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 540 | * 541 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 542 | * endorse or promote products derived from this software without 543 | * prior written permission. For written permission, please contact 544 | * openssl-core@openssl.org. 545 | * 546 | * 5. Products derived from this software may not be called "OpenSSL" 547 | * nor may "OpenSSL" appear in their names without prior written 548 | * permission of the OpenSSL Project. 549 | * 550 | * 6. Redistributions of any form whatsoever must retain the following 551 | * acknowledgment: 552 | * "This product includes software developed by the OpenSSL Project 553 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 554 | * 555 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 556 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 557 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 558 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 559 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 560 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 561 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 562 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 563 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 564 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 565 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 566 | * OF THE POSSIBILITY OF SUCH DAMAGE. 567 | * ==================================================================== 568 | * 569 | * This product includes cryptographic software written by Eric Young 570 | * (eay@cryptsoft.com). This product includes software written by Tim 571 | * Hudson (tjh@cryptsoft.com). 572 | * 573 | */ 574 | 575 | Original SSLeay License 576 | ----------------------- 577 | 578 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 579 | * All rights reserved. 580 | * 581 | * This package is an SSL implementation written 582 | * by Eric Young (eay@cryptsoft.com). 583 | * The implementation was written so as to conform with Netscapes SSL. 584 | * 585 | * This library is free for commercial and non-commercial use as long as 586 | * the following conditions are aheared to. The following conditions 587 | * apply to all code found in this distribution, be it the RC4, RSA, 588 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 589 | * included with this distribution is covered by the same copyright terms 590 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 591 | * 592 | * Copyright remains Eric Young's, and as such any Copyright notices in 593 | * the code are not to be removed. 594 | * If this package is used in a product, Eric Young should be given attribution 595 | * as the author of the parts of the library used. 596 | * This can be in the form of a textual message at program startup or 597 | * in documentation (online or textual) provided with the package. 598 | * 599 | * Redistribution and use in source and binary forms, with or without 600 | * modification, are permitted provided that the following conditions 601 | * are met: 602 | * 1. Redistributions of source code must retain the copyright 603 | * notice, this list of conditions and the following disclaimer. 604 | * 2. Redistributions in binary form must reproduce the above copyright 605 | * notice, this list of conditions and the following disclaimer in the 606 | * documentation and/or other materials provided with the distribution. 607 | * 3. All advertising materials mentioning features or use of this software 608 | * must display the following acknowledgement: 609 | * "This product includes cryptographic software written by 610 | * Eric Young (eay@cryptsoft.com)" 611 | * The word 'cryptographic' can be left out if the rouines from the library 612 | * being used are not cryptographic related :-). 613 | * 4. If you include any Windows specific code (or a derivative thereof) from 614 | * the apps directory (application code) you must include an acknowledgement: 615 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 616 | * 617 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 618 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 619 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 620 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 621 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 622 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 623 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 624 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 625 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 626 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 627 | * SUCH DAMAGE. 628 | * 629 | * The licence and distribution terms for any publically available version or 630 | * derivative of this code cannot be changed. i.e. this code cannot simply be 631 | * copied and put under another distribution licence 632 | * [including the GNU Public Licence.] 633 | */ 634 | 635 | expat 636 | 637 | The pyexpat extension is built using an included copy of the expat sources unless the build is configured --with-system-expat: 638 | 639 | Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd 640 | and Clark Cooper 641 | 642 | Permission is hereby granted, free of charge, to any person obtaining 643 | a copy of this software and associated documentation files (the 644 | "Software"), to deal in the Software without restriction, including 645 | without limitation the rights to use, copy, modify, merge, publish, 646 | distribute, sublicense, and/or sell copies of the Software, and to 647 | permit persons to whom the Software is furnished to do so, subject to 648 | the following conditions: 649 | 650 | The above copyright notice and this permission notice shall be included 651 | in all copies or substantial portions of the Software. 652 | 653 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 654 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 655 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 656 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 657 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 658 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 659 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 660 | 661 | libffi 662 | 663 | The _ctypes extension is built using an included copy of the libffi sources unless the build is configured --with-system-libffi: 664 | 665 | Copyright (c) 1996-2008 Red Hat, Inc and others. 666 | 667 | Permission is hereby granted, free of charge, to any person obtaining 668 | a copy of this software and associated documentation files (the 669 | ``Software''), to deal in the Software without restriction, including 670 | without limitation the rights to use, copy, modify, merge, publish, 671 | distribute, sublicense, and/or sell copies of the Software, and to 672 | permit persons to whom the Software is furnished to do so, subject to 673 | the following conditions: 674 | 675 | The above copyright notice and this permission notice shall be included 676 | in all copies or substantial portions of the Software. 677 | 678 | THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, 679 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 680 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 681 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 682 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 683 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 684 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 685 | DEALINGS IN THE SOFTWARE. 686 | 687 | zlib 688 | 689 | The zlib extension is built using an included copy of the zlib sources if the zlib version found on the system is too old to be used for the build: 690 | 691 | Copyright (C) 1995-2011 Jean-loup Gailly and Mark Adler 692 | 693 | This software is provided 'as-is', without any express or implied 694 | warranty. In no event will the authors be held liable for any damages 695 | arising from the use of this software. 696 | 697 | Permission is granted to anyone to use this software for any purpose, 698 | including commercial applications, and to alter it and redistribute it 699 | freely, subject to the following restrictions: 700 | 701 | 1. The origin of this software must not be misrepresented; you must not 702 | claim that you wrote the original software. If you use this software 703 | in a product, an acknowledgment in the product documentation would be 704 | appreciated but is not required. 705 | 706 | 2. Altered source versions must be plainly marked as such, and must not be 707 | misrepresented as being the original software. 708 | 709 | 3. This notice may not be removed or altered from any source distribution. 710 | 711 | Jean-loup Gailly Mark Adler 712 | jloup@gzip.org madler@alumni.caltech.edu 713 | 714 | cfuhash 715 | 716 | The implementation of the hash table used by the tracemalloc is based on the cfuhash project: 717 | 718 | Copyright (c) 2005 Don Owens 719 | All rights reserved. 720 | 721 | This code is released under the BSD license: 722 | 723 | Redistribution and use in source and binary forms, with or without 724 | modification, are permitted provided that the following conditions 725 | are met: 726 | 727 | * Redistributions of source code must retain the above copyright 728 | notice, this list of conditions and the following disclaimer. 729 | 730 | * Redistributions in binary form must reproduce the above 731 | copyright notice, this list of conditions and the following 732 | disclaimer in the documentation and/or other materials provided 733 | with the distribution. 734 | 735 | * Neither the name of the author nor the names of its 736 | contributors may be used to endorse or promote products derived 737 | from this software without specific prior written permission. 738 | 739 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 740 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 741 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 742 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 743 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 744 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 745 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 746 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 747 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 748 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 749 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 750 | OF THE POSSIBILITY OF SUCH DAMAGE. 751 | 752 | libmpdec 753 | 754 | The _decimal module is built using an included copy of the libmpdec library unless the build is configured --with-system-libmpdec: 755 | 756 | Copyright (c) 2008-2020 Stefan Krah. All rights reserved. 757 | 758 | Redistribution and use in source and binary forms, with or without 759 | modification, are permitted provided that the following conditions 760 | are met: 761 | 762 | 1. Redistributions of source code must retain the above copyright 763 | notice, this list of conditions and the following disclaimer. 764 | 765 | 2. Redistributions in binary form must reproduce the above copyright 766 | notice, this list of conditions and the following disclaimer in the 767 | documentation and/or other materials provided with the distribution. 768 | 769 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND 770 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 771 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 772 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 773 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 774 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 775 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 776 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 777 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 778 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 779 | SUCH DAMAGE. 780 | 781 | W3C C14N test suite 782 | 783 | The C14N 2.0 test suite in the test package (Lib/test/xmltestdata/c14n-20/) was retrieved from the W3C website at https://www.w3.org/TR/xml-c14n2-testcases/ and is distributed under the 3-clause BSD license: 784 | 785 | Copyright (c) 2013 W3C(R) (MIT, ERCIM, Keio, Beihang), 786 | All Rights Reserved. 787 | 788 | Redistribution and use in source and binary forms, with or without 789 | modification, are permitted provided that the following conditions 790 | are met: 791 | 792 | * Redistributions of works must retain the original copyright notice, 793 | this list of conditions and the following disclaimer. 794 | * Redistributions in binary form must reproduce the original copyright 795 | notice, this list of conditions and the following disclaimer in the 796 | documentation and/or other materials provided with the distribution. 797 | * Neither the name of the W3C nor the names of its contributors may be 798 | used to endorse or promote products derived from this work without 799 | specific prior written permission. 800 | 801 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 802 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 803 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 804 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 805 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 806 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 807 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 808 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 809 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 810 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 811 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /rights/pytorch.rights: -------------------------------------------------------------------------------- 1 | From PyTorch: 2 | 3 | Copyright (c) 2016- Facebook, Inc (Adam Paszke) 4 | Copyright (c) 2014- Facebook, Inc (Soumith Chintala) 5 | Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) 6 | Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) 7 | Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) 8 | Copyright (c) 2011-2013 NYU (Clement Farabet) 9 | Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston) 10 | Copyright (c) 2006 Idiap Research Institute (Samy Bengio) 11 | Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz) 12 | 13 | From Caffe2: 14 | 15 | Copyright (c) 2016-present, Facebook Inc. All rights reserved. 16 | 17 | All contributions by Facebook: 18 | Copyright (c) 2016 Facebook Inc. 19 | 20 | All contributions by Google: 21 | Copyright (c) 2015 Google Inc. 22 | All rights reserved. 23 | 24 | All contributions by Yangqing Jia: 25 | Copyright (c) 2015 Yangqing Jia 26 | All rights reserved. 27 | 28 | All contributions by Kakao Brain: 29 | Copyright 2019-2020 Kakao Brain 30 | 31 | All contributions by Cruise LLC: 32 | Copyright (c) 2022 Cruise LLC. 33 | All rights reserved. 34 | 35 | All contributions from Caffe: 36 | Copyright(c) 2013, 2014, 2015, the respective contributors 37 | All rights reserved. 38 | 39 | All other contributions: 40 | Copyright(c) 2015, 2016 the respective contributors 41 | All rights reserved. 42 | 43 | Caffe2 uses a copyright model similar to Caffe: each contributor holds 44 | copyright over their contributions to Caffe2. The project versioning records 45 | all such contribution and copyright details. If a contributor wants to further 46 | mark their specific copyright on a particular contribution, they should 47 | indicate their copyright solely in the commit message of the change when it is 48 | committed. 49 | 50 | All rights reserved. 51 | 52 | Redistribution and use in source and binary forms, with or without 53 | modification, are permitted provided that the following conditions are met: 54 | 55 | 1. Redistributions of source code must retain the above copyright 56 | notice, this list of conditions and the following disclaimer. 57 | 58 | 2. Redistributions in binary form must reproduce the above copyright 59 | notice, this list of conditions and the following disclaimer in the 60 | documentation and/or other materials provided with the distribution. 61 | 62 | 3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America 63 | and IDIAP Research Institute nor the names of its contributors may be 64 | used to endorse or promote products derived from this software without 65 | specific prior written permission. 66 | 67 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 68 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 69 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 70 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 71 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 72 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 73 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 74 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 75 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 76 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 77 | POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /rights/torchvision.rights: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) Soumith Chintala 2016, 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------